| | |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | //根据id获取评估文件 |
| | | export function getAccessoryFile(data) { |
| | | return request({ |
| | | url: '/manage/accessory-file/getAccessoryFileByProjectId', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | //11-过程控制负责人 |
| | | export function addProcessAudit(data) { |
| | | return request({ |
| | | url: '/manage/process-audit/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function getProcessAuditDetail(data) { |
| | | return request({ |
| | | url: '/manage/process-audit/getProcessByProjectId', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function editProcessAudit(params) { |
| | | return request({ |
| | | url: `/manage/process-audit/edit`, |
| | | method: 'put', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | //12-项目归档 |
| | | export function addProcessMaterial(data) { |
| | | return request({ |
| | | url: '/manage/project-material/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | export function getProcessMaterialDetail(data) { |
| | | return request({ |
| | | url: '/manage/project-material/getMaterialByProjectId', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function editProcessMaterial(params) { |
| | | return request({ |
| | | url: `/manage/project-material/edit`, |
| | | method: 'put', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | //13-签字确认 |
| | | export function getRecognitionDetail(data) { |
| | | return request({ |
| | | url: '/manage/face-recognition/getRecognitionByProjectId', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function addFaceRecognition(data) { |
| | | return request({ |
| | | url: '/manage/face-recognition/doProcess', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function checkAll(data) { |
| | | return request({ |
| | | url: '/manage/face-recognition/checkAllFaceRecongnition', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | //14-整改 |
| | | export function getRecognitionList(data) { |
| | | return request({ |
| | | url: '/manage/recitification/getRectifyByProjectId', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function addRecitification(data) { |
| | | return request({ |
| | | url: '/manage/recitification/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | export function delRecitification(data) { |
| | | return request({ |
| | | url: `/manage/recitification/remove/` + data.id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | export function editRecitification(params) { |
| | | return request({ |
| | | url: `/manage/recitification/edit`, |
| | | method: 'put', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | //确认完结 |
| | | |
| | | export function doConfirm(data) { |
| | | return request({ |
| | | url: '/manage/confirm/doConfirm', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | const s_url = sessionObj.url; // 请求地址 |
| | | const s_data = sessionObj.data; // 请求数据 |
| | | const s_time = sessionObj.time; // 请求时间 |
| | | const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交 |
| | | const interval = 10; // 间隔时间(ms),小于此时间视为重复提交 |
| | | if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url && s_url!=='/system/common/uploadFile') { |
| | | const message = '数据正在处理,请勿重复提交'; |
| | | console.warn(`[${s_url}]: ` + message) |
| | |
| | | <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-button type="primary" @click="addRectify">新增整改</el-button> |
| | | <el-button type="primary" @click="addRectify('add',{})">新增整改</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="state.rectifyList" :border="true" style="margin: 20px 0"> |
| | | <el-table :data="state.recitificationList" :border="true" style="margin: 20px 0"> |
| | | <el-table-column label="序号" width="60" align="center" type="index"></el-table-column> |
| | | <el-table-column label="整改时间" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="整改时间" prop="rectifyTime" align="center"></el-table-column> |
| | | <el-table-column label="提交时间" prop="updateTime" align="center"></el-table-column> |
| | | <el-table-column label="整改说明" prop="reason" align="center"></el-table-column> |
| | | <el-table-column label="整改人" prop="rectifyPerson" align="center"></el-table-column> |
| | | <el-table-column label="附件" prop="" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="scope.row.startDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD 00:00:00" |
| | | placeholder="选择日期" |
| | | size="large" |
| | | /> |
| | | <span @click="handlePreview(scope.row.accessoryFile)" style="color: #3b82f6;cursor:pointer">{{scope.row.accessoryFile.originName}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="整改人" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.deviceName" maxlength="50" show-word-limit type="text" size="large"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="附件" header-align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-upload accept=".pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" :limit='1' v-model:file-list="state.fileList[scope.$index]" :before-upload="picSize" :on-remove="handleRemove" :before-remove="beforeRemove"> |
| | | <el-button type="primary">附件上传</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip">上传pdf尺寸小于5M,最多可上传1张</div> |
| | | </template> |
| | | </el-upload> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" header-align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-button link type="danger" @click="delRectify(scope.$index)">删除</el-button> |
| | | <el-button link type="primary" @click="addRectify('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="del(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | <div class="pag-container"> |
| | | <el-pagination |
| | | v-model:current-page="state.queryParams.pageNum" |
| | | v-model:page-size="state.queryParams.pageSize" |
| | | :page-sizes="[10,15,20,25]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <confirm-end-dialog ref="confirmRef" @getList="getList"></confirm-end-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | | <script setup> |
| | | |
| | | import {defineEmits, onMounted, reactive, ref} from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {addRecord, editRecord, getDetail} from "@/api/projectManage/contractMng"; |
| | | import Cookies from "js-cookie"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import confirmEndDialog from './confirmEndDialog.vue' |
| | | import {delProject, getAccessoryFile} from "@/api/projectManage/project"; |
| | | import {delRecitification, doConfirm, getRecognitionList} from "@/api/projectManage/riskAnalysis"; |
| | | import axios from "axios"; |
| | | |
| | | const confirmRef = ref(null); |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | const state = reactive({ |
| | | formData: { |
| | | id: '', |
| | | contractSignDate: '', |
| | | contractMoney: '', |
| | | contractIntroduction: '' |
| | | formData: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | }, |
| | | rectifyList: [], |
| | | rules: { |
| | | contractSignDate: [{required: true, message: '请选择合同签订日期', trigger: 'blur'}], |
| | | contractMoney: [{required: true, message: '请输入项目合同额', trigger: 'blur'}] |
| | | }, |
| | | fileList: [], |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | header: { |
| | | Authorization: 'Bearer ' + getToken() |
| | | } |
| | | recitificationList: [], |
| | | }) |
| | | |
| | | const total = ref(0); |
| | | const isAmin = ref(false) |
| | | const formRef = ref(); |
| | | onMounted(() => { |
| | |
| | | if(userInfo.identity === 0){ |
| | | isAmin.value = true; |
| | | } |
| | | if(Cookies.get('projectId')){ |
| | | state.formData.projectId = Cookies.get('projectId'); |
| | | getList(state.formData.projectId); |
| | | } |
| | | // getList(); |
| | | }); |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val; |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getDetail({projectId: val}); |
| | | |
| | | const getList = async (val) => { |
| | | const res = await getRecognitionList({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | state.recitificationList = res.data.list; |
| | | total.value = res.data.total; |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | 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 addRecord(data); |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | await getList(val); |
| | | state.formData.projectId = val; |
| | | if(type === 'confirm') { |
| | | const res = await doConfirm({projectId: val}); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }else if(type === 'clickEdit'){ |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await editRecord(data); |
| | | if (res.code == 200) { |
| | | ElMessage.success('变更成功') |
| | | formRef.value.clearValidate(); |
| | | // emit('getNextStatus', data.project.id); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const addRectify = ()=>{ |
| | | let file = { |
| | | fileName: '', |
| | | deviceName: '', |
| | | startDate: '', |
| | | endDate: '' |
| | | } |
| | | state.rectifyList.push(file) |
| | | const addRectify = (type,val)=>{ |
| | | val.projectId = state.formData.projectId; |
| | | confirmRef.value.openDialog(type,val) |
| | | } |
| | | |
| | | const delRectify = (index)=>{ |
| | | state.rectifyList.splice(index,1) |
| | | } |
| | | const handleSizeChange = (val) => { |
| | | state.queryParams.pageNum = 1; |
| | | state.queryParams.pageSize = val |
| | | getList() |
| | | } |
| | | const handleCurrentChange = (val) => { |
| | | state.queryParams.pageNum = val |
| | | getList() |
| | | } |
| | | |
| | | // 图片上传 |
| | |
| | | }) |
| | | } |
| | | } |
| | | const handlePreview = (file) => { |
| | | const url = import.meta.env.VITE_APP_BASE_API + '/' + file.path |
| | | axios.get( url,{ |
| | | headers: |
| | | { |
| | | 'Content-Type': 'application/json', |
| | | 'Authorization':getToken(), |
| | | }, |
| | | responseType: 'blob' |
| | | } |
| | | ).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", file.originName); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | | }) |
| | | } |
| | | const del = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delRecitification(val) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | defineExpose({ |
| | | riskOpen |
| | |
| | | font-size: 15px; |
| | | } |
| | | } |
| | | .pag-container{ |
| | | float: right; |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="notice"> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="state.title" |
| | | width="550px" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="formRef" :rules="state.formRules" label-width="110px" > |
| | | <el-form-item label="整改时间:" prop="rectifyTime" > |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="state.form.rectifyTime" |
| | | type="date" |
| | | value-format="YYYY-MM-DD 00:00:00" |
| | | placeholder="选择日期" |
| | | size="large" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="整改人:" prop="rectifyPerson"> |
| | | <el-input v-model="state.form.rectifyPerson" show-word-limit type="text" size="large"/> |
| | | </el-form-item> |
| | | <el-form-item label="整改说明:" prop="reason"> |
| | | <el-input v-model="state.form.reason" show-word-limit type="text" size="large"/> |
| | | </el-form-item> |
| | | <el-form-item prop="fileList"> |
| | | <el-upload accept=".pdf" |
| | | :action="state.uploadUrl" |
| | | :disabled="state.disabled" |
| | | :headers="state.header" |
| | | method="post" |
| | | :limit="state.imgLimit" |
| | | :before-upload="beforeUpload" |
| | | :on-success="handleAvatarSuccess" |
| | | v-model:file-list="state.form.fileList" |
| | | :on-remove="handleRemove" |
| | | :data="state.uploadData" |
| | | :on-preview="handlePreview" |
| | | > |
| | | <el-button type="primary">附件上传</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | 只能上传pdf类型,且只能上传一个 |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer > |
| | | <span class="dialog-footer"> |
| | | <el-button @click="handleClose" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import {defineEmits, nextTick, reactive, ref} from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {delAccessoryFile} from "@/api/projectManage/project"; |
| | | import {addRate, addRecitification, editRecitification} from "@/api/projectManage/riskAnalysis"; |
| | | const emit = defineEmits(["getList"]); |
| | | const formRef = ref(null) |
| | | const state = reactive({ |
| | | title: '', |
| | | form: { |
| | | id: null, |
| | | }, |
| | | formRules:{ |
| | | rectifyTime: [{ required: true, message: '请选择整改时间', trigger: 'blur' }], |
| | | rectifyPerson: [{ required: true, message: '请输入整改人', trigger: 'blur' }], |
| | | fileList: [{ required: true, message: '请上传附件', trigger: 'blur' }], |
| | | }, |
| | | imgLimit: 1, |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/manage/accessory-file/uploadFile', |
| | | header: { |
| | | Authorization: getToken() |
| | | }, |
| | | uploadData: { |
| | | moduleType: 11 |
| | | }, |
| | | |
| | | }) |
| | | const dialogVisible = ref(false) |
| | | |
| | | const openDialog = (type, value) => { |
| | | state.uploadData.projectId = value.projectId; |
| | | state.title = type === 'add' ? '新增' : '编辑' ; |
| | | if(state.title === '编辑'){ |
| | | state.form = value; |
| | | state.form.fileList = [value.accessoryFile] |
| | | state.form.fileList[0].name = value.accessoryFile.originName |
| | | } |
| | | dialogVisible.value = true |
| | | } |
| | | |
| | | const beforeUpload = (file) => { |
| | | let fileType = file.name.substring(file.name.lastIndexOf(".") + 1); |
| | | if (fileType === 'pdf') { |
| | | } else { |
| | | ElMessage.error("文件类型必须为pdf格式") |
| | | return false |
| | | } |
| | | } |
| | | const handleAvatarSuccess = (res) => { |
| | | if(res.code === 200){ |
| | | console.log("file",state.form.fileList) |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件上传成功' |
| | | }) |
| | | }else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件上传失败' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const handlePreview = (file) => { |
| | | let path = ""; |
| | | if(file.path){ |
| | | path = file.path |
| | | }else { |
| | | path = file.response.data.path |
| | | |
| | | } |
| | | const url = import.meta.env.VITE_APP_BASE_API + '/' + path |
| | | axios.get( url,{ |
| | | headers: |
| | | { |
| | | 'Content-Type': 'application/json', |
| | | 'Authorization':getToken(), |
| | | }, |
| | | responseType: 'blob' |
| | | } |
| | | ).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", file.name); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | | }) |
| | | } |
| | | const onSubmit = async () => { |
| | | const valid = await formRef.value.validate(); |
| | | if(valid){ |
| | | state.form.fileId = state.form.fileList ? state.form.fileList[0].response ? state.form.fileList[0].response.data.id : state.form.fileList[0].id : ''; |
| | | if(state.title === '新增'){ |
| | | const {id,fileList, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | data.projectId = state.uploadData.projectId; |
| | | console.log("Add",data) |
| | | const res = await addRecitification(data); |
| | | if (res.code == 200) { |
| | | dialogVisible.value = false; |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getList'); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }else if(state.title === '编辑'){ |
| | | const {ileList, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | data.projectId = state.uploadData.projectId; |
| | | const res = await editRecitification(data); |
| | | if (res.code == 200) { |
| | | dialogVisible.value = false; |
| | | ElMessage.success('编辑成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getList'); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | const handleRemove = async (file, uploadFiles) => { |
| | | console.log("file",file) |
| | | let accessoryFileId = ""; |
| | | if(file.id){ |
| | | accessoryFileId = file.id |
| | | }else { |
| | | accessoryFileId = file.response.data.id |
| | | |
| | | } |
| | | const res = await delAccessoryFile(accessoryFileId) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const handleClose = () => { |
| | | state.form = { |
| | | id: null, |
| | | rectifyTime: '', |
| | | rectifyPerson: '', |
| | | reason: '', |
| | | fileList: [] |
| | | } |
| | | formRef.value.clearValidate(); |
| | | dialogVisible.value = false; |
| | | |
| | | } |
| | | defineExpose({ |
| | | openDialog |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
| | |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | if(res.data){ |
| | | state.formData = res.data; |
| | | } |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | <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}); |
| | | 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 |
| | |
| | | <div class="riskBox"> |
| | | <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-button type="primary" @click="addUpload">新增附件</el-button> |
| | | <el-col :span="10"> |
| | | <el-button type="primary" :disabled="projectType === 'edit'" @click="addUpload">新增附件列表</el-button> |
| | | <span style="font-size: 13px;color: rgb(232, 78, 79);font-weight: 400;margin-left: 10px">项目列表仅支持pdf、jpg、jpeg 等格式上传</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="state.uploadList" :border="true" style="margin: 20px 0"> |
| | | <el-table-column label="序号" width="60" align="center" type="index"></el-table-column> |
| | | <el-table-column label="名称" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="名称" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.fileName" maxlength="30" show-word-limit type="text" size="large"/> |
| | | <el-input v-model="scope.row.name" show-word-limit type="text" size="large"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否必须文件" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="是否必须文件" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-radio-group v-model="state.formData.status" > |
| | | <el-radio-group v-model="scope.row.type" > |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="原因说明" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="原因说明" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.deviceName" maxlength="50" show-word-limit type="text" size="large"/> |
| | | <el-input v-model="scope.row.remark" show-word-limit type="text" size="large"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="附件上传" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="附件上传" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-upload accept="image/*,.pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" :limit='1' v-model:file-list="state.fileList[scope.$index]" :before-upload="picSize" :on-remove="handleRemove" :before-remove="beforeRemove"> |
| | | <el-upload accept=".pdf,.doc,.docx" |
| | | :action="state.uploadUrl" |
| | | :disabled="state.disabled" |
| | | :headers="state.header" |
| | | method="post" |
| | | :on-success="handleAvatarSuccess" |
| | | v-model:file-list="scope.row.fileList" |
| | | :on-remove="handleRemove" |
| | | :data="state.uploadData" |
| | | :on-preview="handlePreview" |
| | | > |
| | | <el-button type="primary">附件上传</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip">上传图片或pdf尺寸小于5M,最多可上传1张</div> |
| | | </template> |
| | | </el-upload> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" header-align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-button link type="danger" @click="delUpload(scope.$index)">删除</el-button> |
| | | </template> |
| | |
| | | 项目合同额<span style="font-size: 13px;color: red;font-weight: normal;display: inline-block;margin-left: 6px">预估合同金额,归档阶段可以进行修改。仅支持数字,单位万元,小数点后最多两位,数值范围(0.01-999.99)</span> |
| | | </template> |
| | | <el-input |
| | | v-model="state.formData.contractMoney" |
| | | v-model="state.actualContract.actualContractMoney" |
| | | size="large" |
| | | type="number" |
| | | placeholder="请输入项目合同额" |
| | |
| | | </el-row> |
| | | <el-form-item label="实际合同额说明"> |
| | | <el-input |
| | | v-model="state.formData.contractIntroduction" |
| | | v-model="state.actualContract.actualContractIntroduction" |
| | | :autosize="{ minRows: 6 }" |
| | | maxlength="100" |
| | | show-word-limit |
| | |
| | | import {addRecord, editRecord, getDetail} from "@/api/projectManage/contractMng"; |
| | | import Cookies from "js-cookie"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import axios from "axios"; |
| | | import {delAccessoryFile, getAccessoryFile} from "@/api/projectManage/project"; |
| | | import {addProcessMaterial, getProcessMaterialDetail, editProcessMaterial} from "@/api/projectManage/riskAnalysis"; |
| | | |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | const state = reactive({ |
| | | formData: { |
| | | id: '', |
| | | contractSignDate: '', |
| | | contractMoney: '', |
| | | contractIntroduction: '' |
| | | |
| | | }, |
| | | uploadList: [], |
| | | actualContract: { |
| | | actualContractMoney: '', |
| | | actualContractIntroduction: '' |
| | | }, |
| | | uploadList: [ |
| | | { |
| | | name: '安全评价过程控制记录文档', |
| | | type: 1, |
| | | remark: '', |
| | | }, |
| | | { |
| | | name: '项目发票电子版', |
| | | type: 1, |
| | | remark: '', |
| | | }, |
| | | { |
| | | name: '项目转账记录/入账证明', |
| | | type: 1, |
| | | remark: '', |
| | | } |
| | | ], |
| | | rules: { |
| | | contractSignDate: [{required: true, message: '请选择合同签订日期', trigger: 'blur'}], |
| | | contractMoney: [{required: true, message: '请输入项目合同额', trigger: 'blur'}] |
| | | actualContractMoney: [{required: true, message: '请输入项目合同额', trigger: 'blur'}] |
| | | }, |
| | | fileList: [], |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/manage/accessory-file/uploadFile', |
| | | header: { |
| | | Authorization: 'Bearer ' + getToken() |
| | | } |
| | | Authorization: getToken() |
| | | }, |
| | | uploadData: { |
| | | moduleType: 9 |
| | | }, |
| | | }) |
| | | |
| | | const isAmin = ref(false) |
| | | const formRef = ref(); |
| | | onMounted(() => { |
| | | onMounted(async () => { |
| | | |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | if(userInfo.identity === 0){ |
| | | isAmin.value = true; |
| | | } |
| | | if(Cookies.get('projectId')){ |
| | | state.uploadData.projectId = Cookies.get('projectId'); |
| | | getRecord(state.uploadData.projectId); |
| | | // const res = await getAccessoryFile({projectId: val,moduleType: 9}); |
| | | // console.log('res',res) |
| | | } |
| | | |
| | | }); |
| | | |
| | | const riskOpen = async (type,val) => { |
| | | state.formData.projectId = val; |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const getRecord = async (val) =>{ |
| | | const res = await getDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | state.actualContract.actualContractMoney = res.data.actualContractMoney; |
| | | state.actualContract.actualContractIntroduction = res.data.actualContractIntroduction; |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const projectType = ref('') |
| | | const riskOpen = async (type,val) => { |
| | | projectType.value = type; |
| | | state.uploadData.projectId = val; |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getProcessMaterialDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.uploadList = res.data; |
| | | state.uploadList.forEach((item,index) => { |
| | | if(item.accessoryFile){ |
| | | item.accessoryFile.name = item.accessoryFile.originName |
| | | state.uploadList[index].fileList = [item.accessoryFile]; |
| | | } |
| | | }) |
| | | |
| | | console.log("res",state.uploadList) |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | getRecord(val); |
| | | } |
| | | if(type === 'add' || type === 'clickEdit') { |
| | | const valid = await formRef.value.validate(); |
| | |
| | | ElMessage.warning("当前用户暂无权限"); |
| | | return; |
| | | } |
| | | console.log(state.uploadList,'state.uploadList') |
| | | const file = state.uploadList.map(item => { |
| | | return{ |
| | | id: item.id ? item.id : null, |
| | | fileId: item.fileList ? item.fileList[0].response ? item.fileList[0].response.data.id : item.fileList[0].id : '', |
| | | name: item.name, |
| | | type: item.type, |
| | | remark: item.remark, |
| | | projectId: val |
| | | } |
| | | }) |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | data.actualContractMoney = state.actualContract.actualContractMoney; |
| | | data.actualContractIntroduction = state.actualContract.actualContractIntroduction; |
| | | const params = { |
| | | projectId: val, |
| | | projectMaterials: file, |
| | | contract: data |
| | | } |
| | | console.log("params",params) |
| | | if(type === 'add'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await addRecord(data); |
| | | const res = await addProcessMaterial(params); |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', state.formData.projectId); |
| | | emit('getNextStatus', val); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }else if(type === 'clickEdit'){ |
| | | const { ...data} = JSON.parse(JSON.stringify(state.formData)) |
| | | const res = await editRecord(data); |
| | | const res = await editProcessMaterial(params); |
| | | if (res.code == 200) { |
| | | ElMessage.success('变更成功') |
| | | formRef.value.clearValidate(); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | const addUpload = ()=>{ |
| | | let file = { |
| | | fileName: '', |
| | | deviceName: '', |
| | | startDate: '', |
| | | endDate: '' |
| | | name: '', |
| | | type: 1, |
| | | remark: '', |
| | | } |
| | | state.uploadList.push(file) |
| | | } |
| | |
| | | }; |
| | | |
| | | const handleAvatarSuccess = (res, uploadFile) => { |
| | | if(res.code == 200){ |
| | | // state.registerForm.agency.reportPath = res.data.path |
| | | if(res.code === 200){ |
| | | console.log("if",state.uploadList) |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件上传成功' |
| | | }) |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件上传失败' |
| | | message: res.message |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const handlePreview = (file) => { |
| | | let path = ""; |
| | | if(file.path){ |
| | | path = file.path |
| | | }else { |
| | | path = file.response.data.path |
| | | |
| | | } |
| | | const url = import.meta.env.VITE_APP_BASE_API + '/' + path |
| | | axios.get( url,{ |
| | | headers: |
| | | { |
| | | 'Content-Type': 'application/json', |
| | | 'Authorization':getToken(), |
| | | }, |
| | | responseType: 'blob' |
| | | } |
| | | ).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: res.data.type}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", file.name); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleRemove = async (file, uploadFiles) => { |
| | | const res = await delPic({path: state.registerForm.agency.reportPath}) |
| | | console.log("file",file) |
| | | let accessoryFileId = ""; |
| | | if(file.id){ |
| | | accessoryFileId = file.id |
| | | }else { |
| | | accessoryFileId = file.response.data.id |
| | | |
| | | } |
| | | const res = await delAccessoryFile(accessoryFileId) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | import {delPic} from "@/api/login" |
| | | import { getToken } from "@/utils/auth"; |
| | | import Cookies from "js-cookie" |
| | | import {delAccessoryFile} from "@/api/projectManage/project"; |
| | | import {delAccessoryFile, getAccessoryFile} from "@/api/projectManage/project"; |
| | | import axios from "axios"; |
| | | const emit = defineEmits(["getNextStatus"]); |
| | | |
| | |
| | | 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: 7}); |
| | | 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 res = await getRateDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | if(res.data){ |
| | | state.formData = res.data; |
| | | state.formData.isReviseManual = res.data.isReviseManual ? 1 : 0 |
| | | state.fileList = res.data.accessoryFiles.map(item => { |
| | |
| | | name: item.originName, |
| | | } |
| | | }) |
| | | } |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | if (res.code == 200) { |
| | | ElMessage.success('保存成功') |
| | | formRef.value.clearValidate(); |
| | | emit('getNextStatus', res.data); |
| | | emit('getNextStatus', val); |
| | | |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | |
| | | <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 riskOpen = async (type,val) => { |
| | | state.formData.projectId = val |
| | | if(type === 'detail' || type === 'edit' ){ |
| | | const res = await getRiskDetail({projectId: val}); |
| | | const getRecognition = async (val) =>{ |
| | | const res = await getRecognitionDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | 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) => { |
| | | 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); |
| | | 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', res.data) |
| | | 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) |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | process: item.reportProgress <= 4 ? 1 : item.reportProgress > 4 && item.reportProgress <= 6 ? 2 : item.reportProgress > 6 && item.reportProgress <= 9 ? 3 : item.reportProgress > 9 && item.reportProgress <= 11 ? 4 : 5, |
| | | leaderName: item.leader ? item.leader.name : '', |
| | | area: item.district ? item.province + '/' + item.city + '/' + item.district : item.city?item.province + '/' + item.city:item.province , |
| | | filingDate: item.filingDate ? item.filingDate : conversionDays(item.createTime), |
| | | filingDate: item.filingDate ? conversionDays(item.filingDate,item.createTime) : conversionDays('',item.createTime), |
| | | contractMoney: item.contract ? item.contract.contractMoney : '', |
| | | actualContractMoney: item.contract ? item.contract.actualContractMoney : '' |
| | | } |
| | |
| | | getStatistics(); |
| | | showDrawer.value = false; |
| | | } |
| | | const conversionDays = (createTime) => { |
| | | let day = Date.now() - new Date(createTime).getTime();//日期转时间戳 |
| | | const conversionDays = (time,createTime) => { |
| | | let day = ""; |
| | | if(time) { |
| | | day = new Date(time).getTime() - new Date(createTime).getTime();//日期转时间戳 |
| | | }else { |
| | | day = Date.now() - new Date(createTime).getTime();//日期转时间戳 |
| | | } |
| | | return Math.floor(day / 86400000) ;//时间戳获取天数 |
| | | } |
| | | const handleChange = (value) => { |
| | |
| | | </div> |
| | | <div style="display: flex;align-items: center;justify-content: center;margin-bottom: -20px"> |
| | | <el-button type="primary" v-if="selectedObj.id !== 1" style="width: 80px" @click="back">上一步</el-button> |
| | | <el-button type="warning" style="width: 80px" v-if="(projectStatus === 'add' && selectedObj.status === 1)||(projectStatus === 'edit' && selectedObj.status === 1) " @click="save">保存</el-button> |
| | | <el-button type="warning" style="width: 80px" v-if="(projectStatus === 'edit' && selectedObj.status !== 1) || (projectStatus === 'add' && selectedObj.status !== 1) " @click="clickEdit">变更</el-button> |
| | | <el-button type="warning" style="width: 80px" v-if="(projectStatus === 'add' && selectedObj.status === 1 && selectedObj.id !== 14)||(projectStatus === 'edit' && selectedObj.status === 1 && selectedObj.id !== 14) " @click="save">保存</el-button> |
| | | <el-button type="warning" style="width: 80px" v-if="(projectStatus === 'edit' && selectedObj.status !== 1 && selectedObj.id !== 13 && selectedObj.id !== 14) || (projectStatus === 'add' && selectedObj.status !== 1 && selectedObj.id !== 14) " @click="clickEdit">变更</el-button> |
| | | <el-button type="warning" style="width: 80px" v-if="selectedObj.id === 14 && selectedObj.status === 1" @click="confirm">确认完结</el-button> |
| | | <el-button type="primary" style="width: 80px" v-if="selectedObj.id !== 14" @click="next">下一步</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | nextObj.value = item; |
| | | } |
| | | } |
| | | if(item.id === res.data){ |
| | | if(item.id === res.data && item.id !== 14){ |
| | | item.status = 3; |
| | | selectedObj.value =item; |
| | | setTimeout(() => { |
| | |
| | | nextObj.value.status = 2; |
| | | nextObj.value = val; |
| | | Cookies.set('projectId',projectId.value); |
| | | console.log("CookiesprojectId",Cookies.get('projectId')) |
| | | //跳转 |
| | | }, 10) |
| | | } |
| | |
| | | goRouter(selectedObj.value.id,'add') |
| | | |
| | | } |
| | | const confirm = () => { |
| | | goRouter(selectedObj.value.id,'confirm') |
| | | } |
| | | |
| | | const goRouter = (val,type) => { |
| | | switch (val){ |
| | | case 1: |
| | |
| | | console.log("11") |
| | | break; |
| | | case 12: |
| | | if(type === 'add'){ |
| | | proArchRef.value.riskOpen('add',projectId.value); |
| | | }else if (type === 'clickEdit'){ |
| | | proArchRef.value.riskOpen('clickEdit',projectId.value); |
| | | }else { |
| | | if(projectStatus.value === 'view' || projectStatus.value === 'add'){ |
| | | proArchRef.value.riskOpen('detail',projectId.value); |
| | | }else if(projectStatus.value === 'edit'){ |
| | | proArchRef.value.riskOpen('edit',projectId.value); |
| | | } |
| | | } |
| | | console.log("12") |
| | | break; |
| | | case 13: |
| | | if(type === 'add'){ |
| | | signConfirmRef.value.riskOpen('add',projectId.value); |
| | | }else if (type === 'clickEdit'){ |
| | | signConfirmRef.value.riskOpen('clickEdit',projectId.value); |
| | | }else { |
| | | if(projectStatus.value === 'view' || projectStatus.value === 'add'){ |
| | | signConfirmRef.value.riskOpen('detail',projectId.value); |
| | | }else if(projectStatus.value === 'edit'){ |
| | | signConfirmRef.value.riskOpen('edit',projectId.value); |
| | | } |
| | | } |
| | | console.log("13") |
| | | break; |
| | | case 14: |
| | | if(type === 'add'){ |
| | | confirmEndRef.value.riskOpen('add',projectId.value); |
| | | }else if (type === 'clickEdit'){ |
| | | confirmEndRef.value.riskOpen('clickEdit',projectId.value); |
| | | } |
| | | else if (type === 'confirm'){ |
| | | confirmEndRef.value.riskOpen('confirm',projectId.value); |
| | | }else { |
| | | if(projectStatus.value === 'view' || projectStatus.value === 'add'){ |
| | | confirmEndRef.value.riskOpen('detail',projectId.value); |
| | | }else if(projectStatus.value === 'edit'){ |
| | | confirmEndRef.value.riskOpen('edit',projectId.value); |
| | | } |
| | | } |
| | | console.log("14") |
| | | break; |
| | | } |