Browse Source

loading

master
wbc 2 months ago
parent
commit
c174904cc2
  1. 85
      src/views/projectBoard/unfinishNode/index.vue

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

@ -1,15 +1,27 @@
<template>
<div style="margin: 1% 1% 1% 1%">
<div style="margin: 2% 0 2% 0">
<el-button type="primary" round @click="handleProjectBoardInfo" :loading="btnLoading1"> 导出晾晒看报</el-button>
<el-button type="primary" round @click="handleTimeOutInfo" :loading="btnLoading2"> 导出晾晒比分评分表</el-button>
<el-button type="primary" round @click="handleProjectResult" :loading="btnLoading3"> 导出项目成果</el-button>
<el-button type="primary" round @click="handleProjectBoardInfo" :loading="btnLoading1">
导出晾晒看报</el-button
>
<el-button type="primary" round @click="handleTimeOutInfo" :loading="btnLoading2">
导出晾晒比分评分表</el-button
>
<el-button type="primary" round @click="handleProjectResult" :loading="btnLoading3">
导出项目成果</el-button
>
<el-button type="primary" style="float: right; margin-right: 2%" @click="getInfo">
查询</el-button
>
</div>
<div>
<a-table :dataSource="dataSource" :columns="columns" bordered :loading="tableLoading" :pagination="false">
<a-table
:dataSource="dataSource"
:columns="columns"
bordered
:loading="tableLoading"
:pagination="false"
>
<template #bodyCell="{ column, record }">
<template v-if="column && record && column.dataIndex === 'reformName'">
{{ getReformName(record.reformName) }}
@ -18,7 +30,6 @@
{{ getSuperLeader(record.superLeader) }}
</template>
</template>
</a-table>
</div>
</div>
@ -27,12 +38,12 @@
<script lang="ts" setup>
//ts
import { queryBoardInfo, projectBoardInfo, timeOutInfo, projectResult } from './api';
import { onMounted, ref } from 'vue';
import { downloadFile } from "@/api/common/api"
const tableLoading = ref(false)
const btnLoading1 = ref(false)
const btnLoading2 = ref(false)
const btnLoading3 = ref(false)
import { onMounted, ref, nextTick } from 'vue';
import { downloadFile } from '@/api/common/api';
const tableLoading = ref(false);
const btnLoading1 = ref(false);
const btnLoading2 = ref(false);
const btnLoading3 = ref(false);
const dataSource = ref([]);
const columns = [
{
@ -84,27 +95,32 @@
},
];
const getInfo = async () => {
tableLoading.value = true
tableLoading.value = true;
const res = await queryBoardInfo();
tableLoading.value = false
tableLoading.value = false;
console.log(res);
dataSource.value = res;
};
function handleProjectBoardInfo() {
btnLoading1.value = true
downloadFile("/export/projectBoardInfo", '晾晒看报.xlsx',{})
btnLoading1.value = false
btnLoading1.value = true;
downloadFile('/export/projectBoardInfo', '晾晒看报.xlsx', {});
nextTick(() => {
btnLoading1.value = false;
});
}
function handleTimeOutInfo() {
btnLoading2.value = true
downloadFile("/export/timeOutInfo", '评分表.xlsx',{})
btnLoading2.value = false
btnLoading2.value = true;
downloadFile('/export/timeOutInfo', '评分表.xlsx', {});
nextTick(() => {
btnLoading2.value = false;
});
}
function handleProjectResult() {
btnLoading3.value = true
downloadFile("/export/projectResult", '项目成果.xlsx',{})
btnLoading3.value = false
btnLoading3.value = true;
downloadFile('/export/projectResult', '项目成果.xlsx', {});
nextTick(() => {
btnLoading3.value = false;
});
}
//
const getRowSpanMap = (name) => {
@ -115,10 +131,7 @@
const current = dataSource.value[k][name];
let count = 1;
while (
k + count < dataSource.value.length &&
dataSource.value[k + count][name] === current
) {
while (k + count < dataSource.value.length && dataSource.value[k + count][name] === current) {
count++;
}
@ -130,11 +143,11 @@
k += count; //
}
return spans
return spans;
};
//
const getReformName = (name: any) => {
let text = ''
let text = '';
switch (name) {
case '1':
text = '2+N紧密型城市医疗集团建设';
@ -182,12 +195,12 @@
text = '高质量临床重点专科建设';
break;
default:
text='未知'
}
return text
text = '未知';
}
return text;
};
const getSuperLeader = (name: any) => {
let text = ''
let text = '';
switch (name) {
case '1':
text = '医政处';
@ -217,10 +230,10 @@
text = '组织人事处';
break;
default:
text='未知'
}
return text
text = '未知';
}
return text;
};
onMounted(() => {
getInfo();
});

Loading…
Cancel
Save