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. 54
      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: [
{
path: '/:path(.*)*',
name: PAGE_NOT_FOUND_NAME,
name: 'PAGE_NOT_FOUND_NAME',
component: EXCEPTION_COMPONENT,
meta: {
title: 'ErrorPage',

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

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

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

@ -15,7 +15,13 @@
>
</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 v-if="column && record && column.dataIndex === 'reformName'">
{{ getReformName(record.reformName) }}
@ -23,6 +29,13 @@
<template v-if="column && record && column.dataIndex === 'superLeader'">
{{ getSuperLeader(record.superLeader) }}
</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>
</a-table>
</div>
@ -35,7 +48,7 @@
import { onMounted, ref, nextTick, computed } from 'vue';
import { downloadFile } from '@/api/common/api';
import dayjs from 'dayjs';
import { message } from 'ant-design-vue';
import { message } from 'ant-design-vue';
const tableLoading = ref(false);
const btnLoading1 = ref(false);
const btnLoading2 = ref(false);
@ -87,6 +100,16 @@ import { message } from 'ant-design-vue';
width: 200,
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);
dataSource.value = res;
};
const nowTime = computed(()=>{
return dayjs().format('YYYY-MM-DD HH:mm:ss')
})
const nowTime = computed(() => {
return dayjs().format('YYYY-MM-DD HH:mm:ss');
});
function handleProjectBoardInfo() {
btnLoading1.value = true;
downloadFile('/export/projectBoardInfo', `晾晒看报${nowTime.value}.xlsx`, {}).then((_) => {
@ -108,11 +131,13 @@ import { message } from 'ant-design-vue';
}
function handleTimeOutInfo() {
btnLoading2.value = true;
downloadFile('/export/timeOutInfo', `评分表${nowTime.value}.xlsx`, {}).then((_) => {
downloadFile('/export/timeOutInfo', `评分表${nowTime.value}.xlsx`, {})
.then((_) => {
btnLoading2.value = false;
}).catch(err=>{
message.error(err.message);
})
.catch((err) => {
message.error(err.message);
});
}
function handleProjectResult() {
btnLoading3.value = true;
@ -232,9 +257,20 @@ import { message } from 'ant-design-vue';
}
return text;
};
const getRedFlag = (length:any)=>{
if(length){
return Array.from({ length }, (_, i) => i);
}else{
return
}
}
onMounted(() => {
getInfo();
});
</script>
<style scoped></style>
<style scoped>
.redFlag {
height: 20px;
}
</style>

4
vite.config.ts

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

Loading…
Cancel
Save