| | |
| | | <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="assessor.name" label="技术负责人"> |
| | | <el-input |
| | | v-model="state.formData.leader.name" |
| | | v-model="state.formData.assessor.name" |
| | | size="large" |
| | | placeholder="请选择内部审核员" |
| | | placeholder="请选择技术负责人" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openExperts('技术负责人')"/> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="transmitDate" label="确认日期"> |
| | | <el-form-item label="确认日期"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="state.formData.transmitDate" |
| | | v-model="state.formData.affirmDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD 00:00:00" |
| | | placeholder="选择日期" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="附件上传"> |
| | | <el-upload accept="image/*" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='state.imgLimit' v-model:file-list="state.fileList" list-type="picture-card" :before-upload="picSize" :on-remove="handleRemove" :before-remove="beforeRemove"> |
| | | <el-icon><Plus /></el-icon> |
| | | <template #tip> |
| | | <div class="el-upload__tip">上传jpg/png图片尺寸小于5M,最多可上传1张</div> |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row :gutter="30">--> |
| | | <!-- <el-col :span="6">--> |
| | | <!-- <el-form-item label="附件上传">--> |
| | | <!-- <el-upload accept="image/*" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='state.imgLimit' v-model:file-list="state.fileList" list-type="picture-card" :before-upload="picSize" :on-remove="handleRemove" :before-remove="beforeRemove">--> |
| | | <!-- <el-icon><Plus /></el-icon>--> |
| | | <!-- <template #tip>--> |
| | | <!-- <div class="el-upload__tip">上传jpg/png图片尺寸小于5M,最多可上传1张</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-upload>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | <el-table :data="state.tableData" :border="true" style="margin: 20px 0"> |
| | | <el-table-column label="序号" width="60" align="center" type="index"></el-table-column> |
| | | <el-table-column label="内容" prop="content" header-align="center" :show-overflow-tooltip="true"/> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-form-item prop="technology" label="存在问题及建议"> |
| | | <el-form-item 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 {addInnerReview, editInnerReview, getInnerReviewDetail} from "@/api/projectManage/innerReview" |
| | | import {delPic} from "@/api/login" |
| | | import { getToken } from "@/utils/auth"; |
| | | import Cookies from "js-cookie" |
| | | import ExpertsList from "./expertsList"; |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | const emit = defineEmits(["getNextStatus"]) |
| | | |
| | | const state = reactive({ |
| | | formData: { |
| | | id: '', |
| | | leader: { |
| | | projectId: '', |
| | | auditDate:'', |
| | | auditType: 2, |
| | | assessor: { |
| | | name: '' |
| | | }, |
| | | leaderId: null, |
| | | linkMan: '', |
| | | transmitPerson: '', |
| | | transmitDate: '' |
| | | assessorId: null, |
| | | affirmDate: '', |
| | | suggestions: '' |
| | | }, |
| | | 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'}] |
| | | "assessor.name": [{required: true, message: '请选择内部审核员', trigger: 'blur'}], |
| | | auditDate: [{required: true, message: '请选择审核日期', trigger: 'blur'}] |
| | | }, |
| | | 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: '报告中所列评价依据是否得到引用和验证',key: 'isBasisQuote', status: 1}, |
| | | {id: 2, content: '现场收集的有关资料是否齐全、有效',key: 'isData', status: 1}, |
| | | {id: 3, content: '危险有害因素识别是否充分', key: 'isDangerFull',status: 1}, |
| | | {id: 4, content: '报告是否有重大遗漏', key: 'isOmission',status: 1}, |
| | | {id: 5, content: '评价方法选用是否合理', key: 'isMethodRational',status: 1}, |
| | | {id: 6, content: '对策措施及建议是否具有针对性、合理性', key: 'isMeasureEquitable',status: 1}, |
| | | {id: 7, content: '评价结论及格式是否正确', key: 'isConclusionRight',status: 1}, |
| | | {id: 8, content: '已按要求修改完成', key: 'isAmendFinish',status: 1}, |
| | | {id: 9, content: '可报过程控制负责人审核', key: 'isReportAudit',status: 1} |
| | | ], |
| | | imgLimit: 1, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | header: { |
| | | Authorization: 'Bearer ' + getToken() |
| | | Authorization: getToken() |
| | | }, |
| | | dialogImageUrl: '', |
| | | dialogImg: false |
| | | }) |
| | | const props = { |
| | | expandTrigger: 'hover', |
| | | value: 'name', |
| | | label: 'name' |
| | | } |
| | | |
| | | const isAmin = ref(false) |
| | | const formRef = ref() |
| | | const expertsListRef = ref() |
| | |
| | | }) |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getRiskDetail({projectId: val}); |
| | | const res = await getInnerReviewDetail({projectId: val,auditType: 2}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | state.formData = res.data |
| | | for(let key in res.data){ |
| | | for(let item of state.tableData){ |
| | | if(item.key == key){ |
| | | item.status = res.data[key]==true?1:0 |
| | | } |
| | | } |
| | | } |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | } |
| | | if(type === 'add'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await addRisk(data); |
| | | for(let i of state.tableData){ |
| | | data[i.key] = i.status |
| | | } |
| | | const res = await addInnerReview(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | |
| | | } |
| | | }else if(type === 'clickEdit'){ |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await editRisk(data); |
| | | for(let i of state.tableData){ |
| | | data[i.key] = i.status |
| | | } |
| | | const res = await editInnerReview(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.assessor.name = obj.name |
| | | state.formData.assessorId = obj.id |
| | | } |
| | | |
| | | // 图片上传 |
| | |
| | | }); |
| | | return false |
| | | } |
| | | }; |
| | | |
| | | const handlePictureCardPreview = (uploadFile) => { |
| | | state.dialogImageUrl = uploadFile.url |
| | | state.dialogImg = true |
| | | }; |
| | | |
| | | |