| | |
| | | } |
| | | |
| | | const handleRemove = async (file, uploadFiles,type) => { |
| | | if(file && file.status == 'success'){ |
| | | |
| | | |
| | | let path = ''; |
| | | if(type === '上报表'){ |
| | | path = state.registerForm.agency.reportPath; |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | function handleRegister() { |
| | |
| | | } |
| | | |
| | | const handleRemove = (file, uploadFiles,type) => { |
| | | ElMessageBox.confirm( |
| | | '该操作将永久删除此文件内容,是否继续?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(async() => { |
| | | let path = '' |
| | | if(type == '证件照'){ |
| | | path = state.form.electronicPhoto |
| | | }else{ |
| | | path = file.name |
| | | } |
| | | const res = await delPic({path: path}) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | state.hasDeleteFile = true |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | if(file && file.status == 'success') { |
| | | ElMessageBox.confirm( |
| | | '该操作将永久删除此文件内容,是否继续?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(async () => { |
| | | let path = '' |
| | | if (type == '证件照') { |
| | | path = state.form.electronicPhoto |
| | | } else { |
| | | path = file.name |
| | | } |
| | | const res = await delPic({path: path}) |
| | | if (res.code == 200) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | state.hasDeleteFile = true |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const onSubmit = async (formEl)=> { |
| | |
| | | } |
| | | |
| | | const handleRemove = (file, uploadFiles,type) => { |
| | | ElMessageBox.confirm( |
| | | '该操作将永久删除此文件内容,是否继续?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(async() => { |
| | | let path = '' |
| | | if(type == '证件照'){ |
| | | path = state.form.electronicPhoto |
| | | }else{ |
| | | path = file.name |
| | | } |
| | | const res = await delPic({path: path}) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | if(file && file.status == 'success') { |
| | | ElMessageBox.confirm( |
| | | '该操作将永久删除此文件内容,是否继续?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(async () => { |
| | | let path = '' |
| | | if (type == '证件照') { |
| | | path = state.form.electronicPhoto |
| | | } else { |
| | | path = file.name |
| | | } |
| | | const res = await delPic({path: path}) |
| | | if (res.code == 200) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const onSubmit = async (formEl)=> { |
| | |
| | | } |
| | | } |
| | | const handleRemove = async (file, uploadFiles) => { |
| | | console.log("file",file) |
| | | let accessoryFileId = ""; |
| | | if(file.id){ |
| | | accessoryFileId = file.id |
| | | }else { |
| | | accessoryFileId = file.response.data.id |
| | | if(file && file.status == 'success') { |
| | | |
| | | } |
| | | const res = await delAccessoryFile(accessoryFileId) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | |
| | | 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 handleRemove = async (file, uploadFile) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除该附件?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delFile(file.id) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | await getProcessFiles() |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(()=>{ |
| | | getProcessFiles() |
| | | }) |
| | | if(file && file.status == 'success') { |
| | | ElMessageBox.confirm( |
| | | '确定删除该附件?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(async () => { |
| | | const res = await delFile(file.id) |
| | | if (res.code == 200) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | await getProcessFiles() |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | getProcessFiles() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | defineExpose({ |
| | |
| | | } |
| | | |
| | | const handleRemove = async (file, uploadFiles) => { |
| | | console.log("file",file) |
| | | if (file && file.status == 'success') { |
| | | console.log("file", file) |
| | | let accessoryFileId = ""; |
| | | if(file.id){ |
| | | if (file.id) { |
| | | accessoryFileId = file.id |
| | | }else { |
| | | } else { |
| | | accessoryFileId = file.response.data.id |
| | | |
| | | } |
| | | const res = await delAccessoryFile(accessoryFileId) |
| | | if(res.code == 200){ |
| | | if (res.code == 200) { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | }else{ |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | defineExpose({ |
| | | riskOpen |
| | |
| | | } |
| | | |
| | | const handleRemove = async (file, uploadFiles,type) => { |
| | | |
| | | if(file && file.status == 'success') { |
| | | ElMessageBox.confirm( |
| | | '确定删除该附件?', |
| | | '提示', |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | .then(async () => { |
| | | const res = await delFile(file.id) |
| | | if(res.code == 200){ |
| | | if (res.code == 200) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | if(type == 1){ |
| | | if (type == 1) { |
| | | const index = state.formData.deviceImages.findIndex(v => v.id === file.id) |
| | | state.formData.deviceImages.splice(index,1); |
| | | state.formData.deviceImages.splice(index, 1); |
| | | |
| | | } |
| | | if(type == 2){ |
| | | if (type == 2) { |
| | | const index = state.formData.investingationImages.findIndex(v => v.id === file.id) |
| | | state.formData.investingationImages.splice(index,1); |
| | | state.formData.investingationImages.splice(index, 1); |
| | | |
| | | } |
| | | if(type == 3){ |
| | | if (type == 3) { |
| | | const index = state.formData.companyImages.findIndex(v => v.id === file.id) |
| | | state.formData.companyImages.splice(index,1); |
| | | state.formData.companyImages.splice(index, 1); |
| | | } |
| | | if(type == 5){ |
| | | if (type == 5) { |
| | | const index = state.formData.assAccessoryFiles.findIndex(v => v.id === file.id) |
| | | state.formData.assAccessoryFiles.splice(index,1); |
| | | state.formData.assAccessoryFiles.splice(index, 1); |
| | | } |
| | | }else{ |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(()=>{ |
| | | .catch(() => { |
| | | // if(type == 1){ |
| | | // getBeforeFiles() |
| | | // } |
| | |
| | | // getSafetyFiles() |
| | | // } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | <el-upload :disabled="projectType === 'view' || isEnd" accept="image/*,.pdf,.doc,.docx" :action="state.uploadUrl" :data="{moduleType: 6,projectId: props.projectId}" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="handleRemove"> |
| | | <el-button type="primary">上传评审记录</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip">上传文件尺寸尺寸小于2M</div> |
| | | <div class="el-upload__tip">上传文件尺寸尺寸小于5M</div> |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | } |
| | | |
| | | const handleRemove = async (file, uploadFiles) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除该附件?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delFile(file.id) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | await getReviewFiles() |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(()=>{ |
| | | getReviewFiles() |
| | | }) |
| | | if(file && file.status == 'success'){ |
| | | ElMessageBox.confirm( |
| | | '确定删除该附件?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delFile(file.id) |
| | | if(res.code == 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '文件已删除' |
| | | }) |
| | | await getReviewFiles() |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(()=>{ |
| | | getReviewFiles() |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | const checkFile = async (file)=>{ |
| | |
| | | } |
| | | |
| | | const handlePhotoRemove = async (file) => { |
| | | if (file && file.status == 'success') { |
| | | // state.form.idPhoto = '' |
| | | |
| | | let path = "" |
| | | if(file.response && file.response.data){ |
| | | if (file.response && file.response.data) { |
| | | path = file.response.data.path |
| | | }else { |
| | | } else { |
| | | const base = import.meta.env.VITE_APP_BASE_API |
| | | path = file.url.substring(base.length+1,file.url.length ) |
| | | path = file.url.substring(base.length + 1, file.url.length) |
| | | } |
| | | await delPic({path: path}).then(res => { |
| | | if(res.code == 200){ |
| | | if (res.code == 200) { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | state.form.idPhoto = '' |
| | | }else{ |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | |
| | | }).catch(() => { |
| | | state.form.idPhoto = '' |
| | | }); |
| | | } |
| | | |
| | | |
| | | // const res = await delPic({path: path}) |
| | |
| | | |
| | | |
| | | const handleRemove = async (file, uploadFiles,type) => { |
| | | if(file && file.status == 'success') { |
| | | |
| | | let path = "" |
| | | if(state.title === '编辑') { |
| | | const base = import.meta.env.VITE_APP_BASE_API |
| | | path = file.url.substring(base.length+1,file.url.length ) |
| | | }else { |
| | | path = file.response.data.path |
| | | if (state.title === '编辑') { |
| | | const base = import.meta.env.VITE_APP_BASE_API |
| | | path = file.url.substring(base.length + 1, file.url.length) |
| | | } else { |
| | | path = file.response.data.path |
| | | } |
| | | |
| | | await delPic({path: path}).then(res => { |
| | | if(res.code == 200){ |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | await delPic({path: path}).then(res => { |
| | | if (res.code == 200) { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '文件已删除' |
| | | // }) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | if(type === 1){ |
| | | state.form.socialAttach = state.form.socialAttach.filter(item => item.path !== path) |
| | | }else if(type === 2){ |
| | | state.form.medicalAttach = state.form.medicalAttach.filter(item => item.path !== path) |
| | | }else { |
| | | state.form.salaryAttach = state.form.salaryAttach.filter(item => item.path !== path) |
| | | } |
| | | if (type === 1) { |
| | | state.form.socialAttach = state.form.socialAttach.filter(item => item.path !== path) |
| | | } else if (type === 2) { |
| | | state.form.medicalAttach = state.form.medicalAttach.filter(item => item.path !== path) |
| | | } else { |
| | | state.form.salaryAttach = state.form.salaryAttach.filter(item => item.path !== path) |
| | | } |
| | | }); |
| | | |
| | | if(type === 1){ |
| | | state.form.socialAttach = state.form.socialAttach.filter(item => item.path !== path) |
| | | }else if(type === 2){ |
| | | state.form.medicalAttach = state.form.medicalAttach.filter(item => item.path !== path) |
| | | }else { |
| | | state.form.salaryAttach = state.form.salaryAttach.filter(item => item.path !== path) |
| | | if (type === 1) { |
| | | state.form.socialAttach = state.form.socialAttach.filter(item => item.path !== path) |
| | | } else if (type === 2) { |
| | | state.form.medicalAttach = state.form.medicalAttach.filter(item => item.path !== path) |
| | | } else { |
| | | state.form.salaryAttach = state.form.salaryAttach.filter(item => item.path !== path) |
| | | } |
| | | } |
| | | } |
| | | const finshed = ref(false) |
| | | const getAgency = async (type) => { |