Browse Source

合同排序

master
wbc 5 days ago
parent
commit
70ac51711f
  1. 4
      src/views/projectBoard/unfinishNode/api.ts
  2. 69
      src/views/projectBoard/unfinishNode/index.vue

4
src/views/projectBoard/unfinishNode/api.ts

@ -7,10 +7,12 @@ export enum Api {
timeOutInfo = '/export/timeOutInfo', timeOutInfo = '/export/timeOutInfo',
projectResult = "/export/projectResult", projectResult = "/export/projectResult",
listUpload = '/export/uploadProjectScore', listUpload = '/export/uploadProjectScore',
deleteRedisKey = '/huzhouProject/deleteRedisKey' deleteRedisKey = '/huzhouProject/deleteRedisKey',
setSortedContracts = '/huzhouContractinfo/setSortedContracts'
} }
export const queryBoardInfo = () => defHttp.get({ url: Api.queryBoardInfo, timeout: 20 * 60 * 1000 }) export const queryBoardInfo = () => defHttp.get({ url: Api.queryBoardInfo, timeout: 20 * 60 * 1000 })
export const setSortedContracts = () => defHttp.get({ url: Api.setSortedContracts, timeout: 20 * 60 * 1000 })
export const deleteRedisKey = () => defHttp.delete({ url: Api.deleteRedisKey}) export const deleteRedisKey = () => defHttp.delete({ url: Api.deleteRedisKey})
export const projectBoardInfo = () => downloadFile(Api.projectBoardInfo, "晾晒看报.zip") export const projectBoardInfo = () => downloadFile(Api.projectBoardInfo, "晾晒看报.zip")
export const timeOutInfo = () => downloadFile(Api.timeOutInfo, "评分表.zip") export const timeOutInfo = () => downloadFile(Api.timeOutInfo, "评分表.zip")

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

@ -1,16 +1,26 @@
<template> <template>
<div style="margin: 1% 1% 1% 1%"> <div style="margin: 1% 1% 1% 1%">
<div style="margin: 2% 0 2% 0"> <div style="margin: 2% 0 2% 0">
<el-button type="primary" round @click="handleProjectBoardInfo" :loading="btnLoading1" v-if="roleList.includes('sys:admin')"> <el-button
type="primary"
round
@click="handleProjectBoardInfo"
:loading="btnLoading1"
v-if="roleList.includes('sys:admin')"
>
导出晾晒看报</el-button 导出晾晒看报</el-button
> >
<el-button type="primary" round @click="handleTimeOutInfo" :loading="btnLoading2"> <el-button type="primary" round @click="handleTimeOutInfo" :loading="btnLoading2">
导出晾晒比分评分表</el-button 导出晾晒比分评分表</el-button
> >
<el-button type="primary" round @click="handleProjectResult" :loading="btnLoading3"> <el-button type="primary" round @click="handleProjectResult" :loading="btnLoading3"> 导出项目成果</el-button>
导出项目成果</el-button <el-button
type="primary"
round
@click="handleDeleteRedisKey"
:loading="btnLoading4"
v-if="roleList.includes('sys:admin')"
> >
<el-button type="primary" round @click="handleDeleteRedisKey" :loading="btnLoading4" v-if="roleList.includes('sys:admin')">
同步实时数据</el-button 同步实时数据</el-button
> >
<a-upload <a-upload
@ -18,11 +28,14 @@
:before-upload="beforeUpload" :before-upload="beforeUpload"
@change="importChange" @change="importChange"
:showUploadList="false" :showUploadList="false"
style="margin-left: 20px;" style="margin-left: 20px"
v-if="roleList.includes('sys:admin')" v-if="roleList.includes('sys:admin')"
> >
<el-button type="primary" round> 导入评分信息 </el-button> <el-button type="primary" round> 导入评分信息 </el-button>
</a-upload> </a-upload>
<el-button type="primary" round @click="sortContract" v-if="roleList.includes('sys:admin')">
合同支付排序</el-button
>
<el-button type="primary" style="float: right; margin-right: 2%" @click="getInfo"> <el-button type="primary" style="float: right; margin-right: 2%" @click="getInfo">
查询</el-button 查询</el-button
> >
@ -57,16 +70,24 @@
<script lang="ts" setup> <script lang="ts" setup>
//ts //ts
import { queryBoardInfo, projectBoardInfo, timeOutInfo, projectResult,listUpload,deleteRedisKey } from './api'; import {
queryBoardInfo,
projectBoardInfo,
timeOutInfo,
projectResult,
listUpload,
deleteRedisKey,
setSortedContracts
} from './api';
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';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore(); const userStore = useUserStore();
console.log( userStore.roleList) console.log(userStore.roleList);
const roleList = userStore.roleList const roleList = userStore.roleList;
const tableLoading = ref(false); const tableLoading = ref(false);
const btnLoading1 = ref(false); const btnLoading1 = ref(false);
const btnLoading2 = ref(false); const btnLoading2 = ref(false);
@ -164,14 +185,24 @@
btnLoading3.value = false; btnLoading3.value = false;
}); });
} }
function handleDeleteRedisKey (){ async function sortContract() {
const res = await setSortedContracts()
console.log(res)
if(res){
message.success('排序成功')
}
}
function handleDeleteRedisKey() {
btnLoading4.value = true; btnLoading4.value = true;
deleteRedisKey().then(_=>{ deleteRedisKey()
message.success('操作成功') .then((_) => {
btnLoading4.value = false; message.success('操作成功');
}).catch(_=>{ btnLoading4.value = false;
btnLoading4.value = false; })
}) .catch((_) => {
btnLoading4.value = false;
});
} }
// //
const getRowSpanMap = (name) => { const getRowSpanMap = (name) => {
@ -300,9 +331,9 @@
await listUpload(params); await listUpload(params);
return false; return false;
}; };
const importChange = () =>{ const importChange = () => {
message.success('导入成功') message.success('导入成功');
} };
onMounted(() => { onMounted(() => {
getInfo(); getInfo();
}); });

Loading…
Cancel
Save