Browse Source

红旗显示

master
wbc 4 weeks ago
parent
commit
2bd9e83585
  1. BIN
      src/assets/images/红旗.png
  2. 2
      src/router/routes/basic.ts
  3. 10
      src/views/projectBoard/unfinishNode/data.ts
  4. 58
      src/views/projectBoard/unfinishNode/index.vue
  5. 4
      vite.config.ts

BIN
src/assets/images/红旗.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

2
src/router/routes/basic.ts

@ -14,7 +14,7 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = {
children: [ children: [
{ {
path: '/:path(.*)*', path: '/:path(.*)*',
name: PAGE_NOT_FOUND_NAME, name: 'PAGE_NOT_FOUND_NAME',
component: EXCEPTION_COMPONENT, component: EXCEPTION_COMPONENT,
meta: { meta: {
title: 'ErrorPage', title: 'ErrorPage',

10
src/views/projectBoard/unfinishNode/data.ts

@ -37,6 +37,16 @@ export const columns: BasicColumn[] = [{
width: 200, width: 200,
dataIndex: 'superiorFundPayRate', dataIndex: 'superiorFundPayRate',
}, },
{
title: '总分',
width: 200,
dataIndex: 'superiorFundPayRate',
},
{
title: '红旗数量',
width: 200,
dataIndex: 'redFlagCount',
},
], ],
} }

58
src/views/projectBoard/unfinishNode/index.vue

@ -15,7 +15,13 @@
> >
</div> </div>
<div> <div>
<a-table :dataSource="dataSource" :columns="columns" :loading='tableLoading' bordered :pagination="false"> <a-table
:dataSource="dataSource"
:columns="columns"
:loading="tableLoading"
bordered
:pagination="false"
>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column && record && column.dataIndex === 'reformName'"> <template v-if="column && record && column.dataIndex === 'reformName'">
{{ getReformName(record.reformName) }} {{ getReformName(record.reformName) }}
@ -23,6 +29,13 @@
<template v-if="column && record && column.dataIndex === 'superLeader'"> <template v-if="column && record && column.dataIndex === 'superLeader'">
{{ getSuperLeader(record.superLeader) }} {{ getSuperLeader(record.superLeader) }}
</template> </template>
<template v-if="column && record && column.dataIndex === 'redFlagCount'">
<div style="display: flex; justify-content: center">
<div v-for="(item,index) in getRedFlag(record.redFlagCount)" :key="index">
<img src="@/assets/images/红旗.png" alt="" class="redFlag" />
</div>
</div>
</template>
</template> </template>
</a-table> </a-table>
</div> </div>
@ -35,7 +48,7 @@
import { onMounted, ref, nextTick, computed } from 'vue'; import { onMounted, ref, nextTick, computed } from 'vue';
import { downloadFile } from '@/api/common/api'; import { downloadFile } from '@/api/common/api';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
const tableLoading = ref(false); const tableLoading = ref(false);
const btnLoading1 = ref(false); const btnLoading1 = ref(false);
const btnLoading2 = ref(false); const btnLoading2 = ref(false);
@ -87,6 +100,16 @@ import { message } from 'ant-design-vue';
width: 200, width: 200,
dataIndex: 'superiorFundPayRate', dataIndex: 'superiorFundPayRate',
}, },
{
title: '总分',
width: 200,
dataIndex: 'superiorFundPayRate',
},
{
title: '红旗数量',
width: 200,
dataIndex: 'redFlagCount',
},
], ],
}, },
]; ];
@ -97,9 +120,9 @@ import { message } from 'ant-design-vue';
console.log(res); console.log(res);
dataSource.value = res; dataSource.value = res;
}; };
const nowTime = computed(()=>{ const nowTime = computed(() => {
return dayjs().format('YYYY-MM-DD HH:mm:ss') return dayjs().format('YYYY-MM-DD HH:mm:ss');
}) });
function handleProjectBoardInfo() { function handleProjectBoardInfo() {
btnLoading1.value = true; btnLoading1.value = true;
downloadFile('/export/projectBoardInfo', `晾晒看报${nowTime.value}.xlsx`, {}).then((_) => { downloadFile('/export/projectBoardInfo', `晾晒看报${nowTime.value}.xlsx`, {}).then((_) => {
@ -108,11 +131,13 @@ import { message } from 'ant-design-vue';
} }
function handleTimeOutInfo() { function handleTimeOutInfo() {
btnLoading2.value = true; btnLoading2.value = true;
downloadFile('/export/timeOutInfo', `评分表${nowTime.value}.xlsx`, {}).then((_) => { downloadFile('/export/timeOutInfo', `评分表${nowTime.value}.xlsx`, {})
btnLoading2.value = false; .then((_) => {
}).catch(err=>{ btnLoading2.value = false;
message.error(err.message); })
}) .catch((err) => {
message.error(err.message);
});
} }
function handleProjectResult() { function handleProjectResult() {
btnLoading3.value = true; btnLoading3.value = true;
@ -232,9 +257,20 @@ import { message } from 'ant-design-vue';
} }
return text; return text;
}; };
const getRedFlag = (length:any)=>{
if(length){
return Array.from({ length }, (_, i) => i);
}else{
return
}
}
onMounted(() => { onMounted(() => {
getInfo(); getInfo();
}); });
</script> </script>
<style scoped></style> <style scoped>
.redFlag {
height: 20px;
}
</style>

4
vite.config.ts

@ -22,7 +22,7 @@ export default defineApplicationConfig({
hmr: true, hmr: true,
proxy: { proxy: {
'/guoyan': { '/guoyan': {
target: 'http://localhost:8080/', target: 'http://10.1.21.250:18081',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(new RegExp(`^/guoyan`), ''), rewrite: (path) => path.replace(new RegExp(`^/guoyan`), ''),
@ -30,7 +30,7 @@ export default defineApplicationConfig({
// secure: false // secure: false
}, },
'/upload': { '/upload': {
target: 'http://localhost:3300/upload', target: 'http://10.1.21.250:18081/upload',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(new RegExp(`^/upload`), ''), rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),

Loading…
Cancel
Save