| | |
| | | <el-form ref="formRef" :model="state.formData" :rules="state.rules" class="register-form" label-position="top"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="transmitDate" label="审核日期"> |
| | | <el-form-item prop="auditDate" label="审核日期"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="state.formData.transmitDate" |
| | | v-model="state.formData.auditDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD 00:00:00" |
| | | placeholder="选择日期" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="leader.name" label="过程控制负责人"> |
| | | <el-form-item prop="processLeaderName" label="过程控制负责人"> |
| | | <el-input |
| | | v-model="state.formData.leader.name" |
| | | v-model="state.formData.processLeaderName" |
| | | size="large" |
| | | placeholder="请选择内部审核员" |
| | | placeholder="请选择过程控制负责人" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openExperts('过程控制负责人')"/> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item prop="technology" label="审核结论:是否满足过程控制要求"> |
| | | <el-radio-group v-model="state.formData.status" > |
| | | <el-form-item prop="isFullProcess" label="审核结论:是否满足过程控制要求"> |
| | | <el-radio-group v-model="state.formData.isFullProcess" > |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-table-column label="过程控制关键点" prop="content" header-align="center" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="审核结果" header-align="center" class-name="small-padding fixed-width" width="175"> |
| | | <template #default="scope"> |
| | | <el-radio-group v-model="scope.row.status" > |
| | | <el-radio-group v-model="scope.row.status" @change="changeRadio(scope.row)" > |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="0">不符合</el-radio> |
| | | </el-radio-group> |
| | |
| | | <el-table-column label="不符合描述" header-align="center" class-name="small-padding fixed-width" width="700"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model="state.formData.leader.name" |
| | | v-model="scope.row.des" |
| | | size="large" |
| | | disabled |
| | | :disabled="scope.row.status === 1" |
| | | placeholder="如不符合,请填写不符合描述" |
| | | /> |
| | | </template> |
| | |
| | | </el-table> |
| | | <el-form-item prop="technology" label="存在问题及建议"> |
| | | <el-input |
| | | v-model="state.formData.technology" |
| | | v-model="state.formData.suggestions" |
| | | :autosize="{ minRows: 6 }" |
| | | maxlength="500" |
| | | show-word-limit |
| | |
| | | import {defineEmits, onMounted, reactive, ref} from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Search} from '@element-plus/icons-vue' |
| | | import {addRisk, editRisk, getRiskDetail} from "@/api/projectManage/riskAnalysis" |
| | | import { |
| | | addProcessAudit, |
| | | addRisk, editProcessAudit, |
| | | editRisk, |
| | | getProcessAuditDetail, |
| | | getRiskDetail |
| | | } from "@/api/projectManage/riskAnalysis" |
| | | import {delPic} from "@/api/login" |
| | | import { getToken } from "@/utils/auth"; |
| | | import Cookies from "js-cookie" |
| | | import ExpertsList from "./expertsList"; |
| | | import axios from "axios"; |
| | | import {delAccessoryFile} from "@/api/projectManage/project"; |
| | | import {delAccessoryFile, getAccessoryFile} from "@/api/projectManage/project"; |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | |
| | | const state = reactive({ |
| | | formData: { |
| | | id: '', |
| | | leader: { |
| | | name: '' |
| | | }, |
| | | leaderId: null, |
| | | linkMan: '', |
| | | transmitPerson: '', |
| | | transmitDate: '' |
| | | auditDate: '', |
| | | processLeaderId: '', |
| | | processLeaderName: '', |
| | | isFullProcess: 1, |
| | | }, |
| | | rules: { |
| | | "leader.name": [{required: true, message: '请选择项目负责人', trigger: 'blur'}], |
| | | linkMan: [{required: true, message: '请输入联系人', trigger: 'blur'}], |
| | | linkPhone: [{required: true, message: '请输入联系电话', trigger: 'blur'}], |
| | | transmitDate: [{required: true, message: '请选择任务下达时间', trigger: 'blur'}] |
| | | auditDate: [{required: true, message: '请选择审核日期', trigger: 'blur'}], |
| | | processLeaderName: [{required: true, message: '请选择过程控制负责人', trigger: 'change'}], |
| | | }, |
| | | tableData: [ |
| | | {id: 1, content: '报告中所列评价依据是否得到引用和验证', status: 1}, |
| | | {id: 2, content: '现场收集的有关资料是否齐全、有效', status: 1}, |
| | | {id: 3, content: '危险有害因素识别是否充分', status: 1}, |
| | | {id: 4, content: '报告是否有重大遗漏', status: 0}, |
| | | {id: 5, content: '评价方法选用是否合理', status: 1}, |
| | | {id: 6, content: '对策措施及建议是否具有针对性、合理性', status: 1}, |
| | | {id: 7, content: '评价结论及格式是否正确', status: 1}, |
| | | {id: 8, content: '已按要求修改完成', status: 1}, |
| | | {id: 9, content: '可报过程控制负责人审核', status: 1} |
| | | {id: 1, content: '风险分析', status: 1, des: ''}, |
| | | {id: 2, content: '签订合同', status: 1, des: ''}, |
| | | {id: 3, content: '评价任务通知书', status: 1, des: ''}, |
| | | {id: 4, content: '编制安全评价项目计划书', status: 1, des: ''}, |
| | | {id: 5, content: '被评价单位提供材料清单', status: 1, des: ''}, |
| | | {id: 6, content: '从业告知', status: 1, des: ''}, |
| | | {id: 7, content: '现场勘验记录及影像资料', status: 1, des: ''}, |
| | | {id: 8, content: '评价报告内部审核', status: 1, des: ''}, |
| | | {id: 9, content: '技术负责人审核', status: 1, des: ''}, |
| | | {id: 10, content: '评价报告外审意见', status: 1, des: ''}, |
| | | {id: 11, content: '评价项目网上信息公开', status: 1, des: ''}, |
| | | {id: 12, content: '二维码的使用', status: 1, des: ''}, |
| | | {id: 13, content: '报告归档材料完整性', status: 1, des: ''}, |
| | | ], |
| | | imgLimit: 1, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/manage/accessory-file/uploadFile', |
| | |
| | | uploadData: { |
| | | moduleType: 8 |
| | | }, |
| | | disabled: false |
| | | disabled: false, |
| | | fileList: [] |
| | | }) |
| | | const props = { |
| | | expandTrigger: 'hover', |
| | |
| | | isAmin.value = true; |
| | | } |
| | | if(Cookies.get('projectId')){ |
| | | state.uploadData.projectId = Cookies.get('projectId') |
| | | const val = Cookies.get('projectId'); |
| | | state.uploadData.projectId = val; |
| | | const res = getAccessoryFile({projectId: val,moduleType: 8}); |
| | | if(res.code == 200){ |
| | | if(res.data){ |
| | | state.fileList = res.data.accessoryFiles.map(item => { |
| | | return { |
| | | ...item, |
| | | name: item.originName, |
| | | } |
| | | }) |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.uploadData.projectId = val; |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getRiskDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | const res = await getProcessAuditDetail({projectId: val}); |
| | | if(res.code == 200 ){ |
| | | if(res.data){ |
| | | state.formData = res.data; |
| | | state.fileList = res.data.accessoryFiles.map(item => { |
| | | return { |
| | | ...item, |
| | | name: item.originName, |
| | | } |
| | | }) |
| | | state.formData.processLeaderName = res.data.processLeader.name; |
| | | state.formData.isFullProcess = res.data.isFullProcess ? 1 : 0; |
| | | state.tableData[0].status = res.data.isRiskAnalyse ? 1 : 0; |
| | | state.tableData[0].des = res.data.riskAnalyseDes; |
| | | state.tableData[1].status = res.data.isSignContract ? 1 : 0; |
| | | state.tableData[1].des = res.data.signContractDes; |
| | | state.tableData[2].status = res.data.isEstimateTask ? 1 : 0; |
| | | state.tableData[2].des = res.data.estimateTaskDes; |
| | | state.tableData[3].status = res.data.isEstimatePlan ? 1 : 0; |
| | | state.tableData[3].des = res.data.estimatePlanDes; |
| | | state.tableData[4].status = res.data.isProvideMaterials ? 1 : 0; |
| | | state.tableData[4].des = res.data.provideMaterialsDes; |
| | | state.tableData[5].status = res.data.isWorkNotification ? 1 : 0; |
| | | state.tableData[5].des = res.data.workNotificationDes; |
| | | state.tableData[6].status = res.data.isInvestigationSite ? 1 : 0; |
| | | state.tableData[6].des = res.data.investigationSiteDes; |
| | | state.tableData[7].status = res.data.isInteriorAudit ? 1 : 0; |
| | | state.tableData[7].des = res.data.interiorAuditDes; |
| | | state.tableData[8].status = res.data.isTechnolgyAudit ? 1 : 0; |
| | | state.tableData[8].des = res.data.technolgyAuditDes; |
| | | state.tableData[9].status = res.data.isExteriorAudit ? 1 : 0; |
| | | state.tableData[9].des = res.data.exteriorAuditDes; |
| | | state.tableData[10].status = res.data.isOpenInformation ? 1 : 0; |
| | | state.tableData[10].des = res.data.openInformationDes; |
| | | state.tableData[11].status = res.data.isUseQrcode ? 1 : 0; |
| | | state.tableData[11].des = res.data.useQrcodeDes; |
| | | state.tableData[12].status = res.data.isFullMaterials ? 1 : 0; |
| | | state.tableData[12].des = res.data.fullMaterialsDes; |
| | | } |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | ElMessage.warning("当前用户暂无权限"); |
| | | return; |
| | | } |
| | | state.formData.isRiskAnalyse = state.tableData[0].status; |
| | | state.formData.riskAnalyseDes = state.tableData[0].des; |
| | | state.formData.isSignContract = state.tableData[1].status; |
| | | state.formData.signContractDes = state.tableData[1].des; |
| | | state.formData.isEstimateTask = state.tableData[2].status; |
| | | state.formData.estimateTaskDes = state.tableData[2].des; |
| | | state.formData.isEstimatePlan = state.tableData[3].status; |
| | | state.formData.estimatePlanDes = state.tableData[3].des; |
| | | state.formData.isProvideMaterials = state.tableData[4].status; |
| | | state.formData.provideMaterialsDes = state.tableData[4].des; |
| | | state.formData.isWorkNotification = state.tableData[5].status; |
| | | state.formData.workNotificationDes = state.tableData[5].des; |
| | | state.formData.isInvestigationSite = state.tableData[6].status; |
| | | state.formData.investigationSiteDes = state.tableData[6].des; |
| | | state.formData.isInteriorAudit = state.tableData[7].status; |
| | | state.formData.interiorAuditDes = state.tableData[7].des; |
| | | state.formData.isTechnolgyAudit = state.tableData[8].status; |
| | | state.formData.technolgyAuditDes = state.tableData[8].des; |
| | | state.formData.isExteriorAudit = state.tableData[9].status; |
| | | state.formData.exteriorAuditDes = state.tableData[9].des; |
| | | state.formData.isOpenInformation = state.tableData[10].status; |
| | | state.formData.openInformationDes = state.tableData[10].des; |
| | | state.formData.isUseQrcode = state.tableData[11].status; |
| | | state.formData.useQrcodeDes = state.tableData[11].des; |
| | | state.formData.isFullMaterials = state.tableData[12].status; |
| | | state.formData.fullMaterialsDes = state.tableData[12].des; |
| | | if(type === 'add'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await addRisk(data); |
| | | const {id,processLeaderName, ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | data.projectId = val; |
| | | console.log("auditData",data) |
| | | const res = await addProcessAudit(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', res.data); |
| | | emit('getNextStatus', val); |
| | | |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }else if(type === 'clickEdit'){ |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await editRisk(data); |
| | | const res = await editProcessAudit(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('变更成功') |
| | | formRef.value.clearValidate(); |
| | |
| | | } |
| | | |
| | | const getSelected = (type,obj)=>{ |
| | | state.formData.leader.name = obj.name |
| | | state.formData.leaderId = obj.id |
| | | state.formData.processLeaderName = obj.name |
| | | state.formData.processLeaderId = obj.id |
| | | } |
| | | |
| | | const handleAvatarSuccess = (res) => { |
| | |
| | | }) |
| | | } |
| | | } |
| | | const changeRadio = (val) => { |
| | | if(val.status === 1 && val.des !== ''){ |
| | | state.tableData.forEach((item,index) => { |
| | | if(item.id === val.id){ |
| | | state.tableData[index].des = '' |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | defineExpose({ |
| | | riskOpen |