| | |
| | | <div class="riskBox"> |
| | | <el-table v-loading="loading" ref="tableRef" :data="tableData" :border="true"> |
| | | <el-table-column type="index" width="55" /> |
| | | <el-table-column label="人员姓名" prop="name" align="center"/> |
| | | <el-table-column label="联系电话" prop="phone" align="center"/> |
| | | <el-table-column label="职位" prop="phone" align="center"/> |
| | | <el-table-column label="项目担任角色" prop="username" align="center"/> |
| | | <el-table-column label="评价师等级" prop="username" align="center"/> |
| | | <el-table-column label="人员姓名" prop="person.name" align="center"/> |
| | | <el-table-column label="联系电话" prop="person.phone" align="center"/> |
| | | <el-table-column label="职位" prop="person.post" align="center"/> |
| | | <el-table-column label="项目担任角色" prop="username" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.planPerson.playRole === 1?'项目负责人': scope.row.planPerson.playRole === 2? |
| | | '项目组成员':scope.row.planPerson.playRole === 3? |
| | | '过程控制负责人':scope.row.planPerson.playRole === 4? |
| | | '机构评价负责人':scope.row.planPerson.playRole === 5?'技术负责人':''}} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="评价师等级" prop="person.level" align="center"/> |
| | | <el-table-column label="专业能力" prop="username" align="center"/> |
| | | <el-table-column label="人员类型" prop="username" align="center"/> |
| | | <el-table-column label="扫脸时间" prop="username" align="center"/> |
| | | <el-table-column label="是否扫脸" prop="username" align="center"/> |
| | | <el-table-column label="人员类型" prop="username" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.planPerson.jobType === 1 ? '普通人员' : scope.row.planPerson.jobType === 2?'组长': ''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="扫脸时间" prop="faceRecord.updateTime" align="center" width="120"/> |
| | | <el-table-column label="是否扫脸" prop="username" align="center"> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.facePic">是</span> |
| | | <span v-else>否</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否变更" prop="username" align="center"/> |
| | | <el-table-column label="人员类型" prop="username" align="center"/> |
| | | <el-table-column label="人脸照片" prop="socialSecurity" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <div class="demo-image__preview" v-if="scope.row.socialAttach && scope.row.socialAttach.length>0"> |
| | | <div class="demo-image__preview" v-if="scope.row.facePic && scope.row.facePic.length>0"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src= "scope.row.socialAttach[0]" |
| | | :src= "scope.row.facePic[0]" |
| | | :zoom-rate="1.2" |
| | | :max-scale="7" |
| | | :min-scale="0.2" |
| | | :preview-src-list="scope.row.socialAttach" |
| | | :preview-src-list="scope.row.facePic" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | preview-teleported="true" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="签字图片" prop="socialSecurity" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <div class="demo-image__preview" v-if="scope.row.socialAttach && scope.row.socialAttach.length>0"> |
| | | <div class="demo-image__preview" v-if="scope.row.signPic && scope.row.signPic.length>0"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src= "scope.row.socialAttach[0]" |
| | | :src= "scope.row.signPic[0]" |
| | | :zoom-rate="1.2" |
| | | :max-scale="7" |
| | | :min-scale="0.2" |
| | | :preview-src-list="scope.row.socialAttach" |
| | | :preview-src-list="scope.row.signPic" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | preview-teleported="true" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="承诺书" prop="socialSecurity" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <el-button link>承诺书</el-button> |
| | | <!-- <el-button link>承诺书</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import {defineEmits, onMounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Search} from '@element-plus/icons-vue' |
| | | import {addRisk, editRisk, getRiskDetail} from "@/api/projectManage/riskAnalysis" |
| | | import { |
| | | addFaceRecognition, |
| | | addRisk, checkAll, |
| | | editRisk, |
| | | getRecognitionDetail, |
| | | getRiskDetail |
| | | } from "@/api/projectManage/riskAnalysis" |
| | | import {delPic} from "@/api/login" |
| | | import { getToken } from "@/utils/auth"; |
| | | import Cookies from "js-cookie" |
| | | import {getDetail} from "@/api/projectManage/contractMng"; |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | |
| | | const state = reactive({ |
| | |
| | | if(userInfo.identity === 0){ |
| | | isAmin.value = true; |
| | | } |
| | | if(Cookies.get('projectId')){ |
| | | getRecognition(Cookies.get('projectId')); |
| | | } |
| | | }) |
| | | const getRecognition = async (val) =>{ |
| | | const res = await getRecognitionDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.tableData = res.data.map(item => { |
| | | return { |
| | | ...item, |
| | | facePic: item.faceRecord ? [import.meta.env.VITE_APP_BASE_API + '/' + item.faceRecord.facePath ] : [], |
| | | signPic: item.signPath ? [import.meta.env.VITE_APP_BASE_API + '/' + item.signPath] : [], |
| | | planPerson: { |
| | | playRole: item.planPerson ? item.planPerson.playRole : '', |
| | | jobType: item.planPerson ? item.planPerson.jobType : '', |
| | | } |
| | | } |
| | | }) |
| | | console.log("res",res) |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getRiskDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | if((type === 'detail' || type === 'edit') && !Cookies.get('projectId')){ |
| | | getRecognition(val); |
| | | } |
| | | if(type === 'add' || type === 'clickEdit') { |
| | | const valid = await formRef.value.validate(); |
| | | if(valid){ |
| | | if (isAmin.value) { |
| | | ElMessage.warning("当前用户暂无权限"); |
| | | return; |
| | | } |
| | | if(type === 'add'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await addRisk(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', res.data) |
| | | const resCheck = await checkAll({projectId: val}); |
| | | if (resCheck.code == 200) { |
| | | const res = await addFaceRecognition({projectId: val}); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', val); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }else if(type === 'clickEdit'){ |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await editRisk(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('变更成功') |
| | | formRef.value.clearValidate(); |
| | | // emit('getNextStatus', data.project.id); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | // const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | // const res = await editRisk(data); |
| | | // if (res.code == 200) { |
| | | // ElMessage.success('变更成功') |
| | | // formRef.value.clearValidate(); |
| | | // // emit('getNextStatus', data.project.id); |
| | | // } else { |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |