From 7786e561f165ae3045cc070063cbeaebba6f1ff0 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期四, 20 十一月 2025 17:27:52 +0800
Subject: [PATCH] 修改
---
src/views/safetyReview/expertManage/postEvaluation/components/expertList.vue | 85 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 80 insertions(+), 5 deletions(-)
diff --git a/src/views/safetyReview/expertManage/postEvaluation/components/expertList.vue b/src/views/safetyReview/expertManage/postEvaluation/components/expertList.vue
index d5a6e59..f9c5063 100644
--- a/src/views/safetyReview/expertManage/postEvaluation/components/expertList.vue
+++ b/src/views/safetyReview/expertManage/postEvaluation/components/expertList.vue
@@ -17,7 +17,7 @@
<el-table-column label="身份证号" align="center" prop="idCard" />
<el-table-column label="等级" align="center" prop="ratingLevel">
<template #default="scope">
- {{scope.row.ratingLevel == 1?'一级':scope.row.ratingLevel == 2?'二级':scope.row.ratingLevel == 3?'三级':'暂无'}}
+ {{scope.row.ratingLevel == 1 ?'一级':scope.row.ratingLevel == 1?'二级':scope.row.ratingLevel == 3?'三级':scope.row.ratingLevel == 10?'库外':''}}
</template>
</el-table-column>
<el-table-column label="专业领域" align="center" prop="domain"/>
@@ -41,7 +41,9 @@
<el-table-column label="考评总分" align="center" prop="score" />
<el-table-column v-if="title == '专家评估'" label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-button type="primary" link @click="openEvaluate(scope.row)">评分</el-button>
+ <el-button v-if="scope.row.evaluationState ==0" type="primary" link @click="openEvaluate('add',scope.row)">考评与报销</el-button>
+ <el-button v-if="scope.row.evaluationState ==1" type="primary" link @click="openEvaluate('view',scope.row)">查看</el-button>
+ <el-button v-if="scope.row.evaluationState ==1" type="success" link @click="downloadFile(scope.row)">导出考评表</el-button>
</template>
</el-table-column>
</el-table>
@@ -66,8 +68,10 @@
import {ElMessage} from "element-plus";
import Evaluate from "./evaluate";
import {
+ getExpertEvaDetail,
getProjectExpertEvaluationList,
} from "@/api/backManage/evaluate";
+import {generateWordDocument} from "@/views/safetyReview/projectManage/components/exportWord";
const dialogVisible = ref(false);
const evaluateRef = ref()
const emit = defineEmits(["getList"]);
@@ -80,8 +84,37 @@
pageSize: 10
},
projectName: '',
+ deptName: '',
projectCheckTime: '',
- title: ''
+ title: '',
+ rateList: [
+ {label: '优秀',value: 1},
+ {label: '合格',value: 2},
+ {label: '基本合格',value: 3},
+ {label: '不合格',value: 4}
+ ],
+ directionList: [
+ {
+ value: '1',
+ label: '现场检查'
+ },
+ {
+ value: '2',
+ label: '调查评估'
+ },
+ {
+ value: '3',
+ label: '咨询服务'
+ },
+ {
+ value: '4',
+ label: '教育培训'
+ },
+ {
+ value: '5',
+ label: '其他'
+ }
+ ]
})
const {tableData,total,queryParams,projectName,title,projectCheckTime} = toRefs(state)
const openDialog = async (type,value) => {
@@ -92,6 +125,7 @@
}
state.queryParams.id = value.id
state.projectName = value.projectName
+ state.deptName = value.deptName
state.projectCheckTime = value.projectCheckTime
await getEvaluationList()
dialogVisible.value = true;
@@ -107,8 +141,49 @@
}
}
-const openEvaluate = (value)=>{
- evaluateRef.value.openDialog(value,state.projectName,state.projectCheckTime)
+
+const downloadFile = async (val) => {
+ const res = await getExpertEvaDetail({projectExpertId: val.id,expertType:val.expertType});
+ if(res.code == 200){
+ let outData = res.data
+ outData.deptName = state.deptName
+ outData.name = val.name
+ outData.sex = val.sex == 0?'男':'女'
+ outData.domain = val.domain
+ outData.jobCategory = res.data.jobCategory?res.data.jobCategory.split(',').map(item=>{ return state.directionList.find(i=>i.value == item)?.label}):'暂无'
+ outData.professionalEthicsList = state.rateList.map(i => ({...i, checked: i.value !== res.data.professionalEthics}))
+ outData.impartialHonestList = state.rateList.map(i=> ({...i, checked: i.value !== res.data.impartialHonest}))
+ outData.comprehensiveCoordinationList = state.rateList.map(i=> ({...i, checked: i.value !== res.data.comprehensiveCoordination}))
+ outData.professionalAbilityList = state.rateList.map(i=> ({...i, checked: i.value !== res.data.professionalAbility}))
+ outData.expressingOpinionsList = state.rateList.map(i=> ({...i, checked: i.value !== res.data.expressingOpinions}))
+ outData.comprehensiveEvaluationList = state.rateList.map(i=> ({...i, checked: i.value !== res.data.comprehensiveEvaluation}))
+ try {
+ generateWordDocument('/evaluateFile.docx',outData, outData.name + '专家考评表.docx');
+ } catch (error){
+ ElMessage({
+ type: 'warning',
+ message: '导出失败'
+ });
+ }
+ }else{
+ ElMessage.warning(res.msg)
+ }
+ // data.companyName = data.companyName != '' ? data.companyName: '-'
+ // data.projectCheckTime = data.projectCheckTime != '' ? data.projectCheckTime: '-'
+ // data.tableData = state.dataList.map(item => {
+ // return {
+ // ...item,
+ // ratingLevel: item.ratingLevel == 1 ? '一级' : item.ratingLevel == 2 ? '二级':item.ratingLevel == 3 ? '三级' : '',
+ // sex: item.sex == 0 ? '男' : '女',
+ // selectionMode: item.selectionMode == 1 ? '固定' : '随机',
+ // teamLeader: item.teamLeader == 1 ? '是' : '否',
+ // }
+ // })
+
+};
+
+const openEvaluate = (type,value)=>{
+ evaluateRef.value.openDialog(type,value,state.projectName,state.projectCheckTime)
}
const closeEvaluate = ()=>{
--
Gitblit v1.9.2