From 678e57afb6db8f89b7807c5bc4e927c778ffc6ca Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Tue, 23 Jul 2024 15:53:42 +0800
Subject: [PATCH] bug修改
---
src/views/safetyReview/projectManage/components/processCtrlReview.vue | 74 ++++++++++++++++++++++--------------
1 files changed, 45 insertions(+), 29 deletions(-)
diff --git a/src/views/safetyReview/projectManage/components/processCtrlReview.vue b/src/views/safetyReview/projectManage/components/processCtrlReview.vue
index bd61ef2..be8155f 100644
--- a/src/views/safetyReview/projectManage/components/processCtrlReview.vue
+++ b/src/views/safetyReview/projectManage/components/processCtrlReview.vue
@@ -42,7 +42,7 @@
<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="changeStatus(scope.row)">
<el-radio :label="1">符合</el-radio>
<el-radio :label="0">不符合</el-radio>
</el-radio-group>
@@ -71,7 +71,7 @@
<el-row :gutter="30">
<el-col :span="18">
<el-form-item label="附件上传" prop="assAccessoryFiles">
- <el-upload accept="image/*,.pdf,.doc,.docx,.xlsx,.xls" :action="state.uploadUrl" :data="{moduleType: 8,projectId: props.projectId}" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='1' v-model:file-list="state.fileList" :before-upload="picSize" :disabled="state.disabled" :on-remove="handleRemove" :before-remove="beforeRemove">
+ <el-upload accept="image/*,.pdf,.doc,.docx,.xlsx,.xls" :action="state.uploadUrl" :data="{moduleType: 8,projectId: props.projectId}" :headers="state.header" method="post" :on-success="handleAvatarSuccess" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='1' v-model:file-list="state.fileList" :before-upload="picSize" :disabled="projectType === 'view' || isEnd" :on-remove="handleRemove" >
<el-button type="primary">附件上传</el-button>
<template #tip>
<div class="el-upload__tip">上传文件尺寸小于5M,最多可上传1份</div>
@@ -99,6 +99,8 @@
import Cookies from "js-cookie"
import ExpertsList from "./expertsList";
import axios from "axios";
+import { useRoute } from 'vue-router'
+const route = useRoute()
const props = defineProps(['projectId'])
const emit = defineEmits(["getNextStatus"]);
@@ -129,7 +131,7 @@
{id: 9, content: '技术负责人审核', status: 1, key:'isTechnolgyAudit', reasonKey: 'technolgyAuditDes', reason: ''},
{id: 6, content: '评价报告外审意见', status: 1, key:'isExteriorAudit', reasonKey: 'exteriorAuditDes', reason: ''},
{id: 7, content: '评价项目网上信息公开', status: 1, key:'isOpenInformation', reasonKey: 'openInformationDes', reason: ''},
- {id: 8, content: '二维码的使用', status: 1, key:'isUseQrcode', reasonKey: 'useQrcodeDes', reason: ''},
+ // {id: 8, content: '二维码的使用', status: 1, key:'isUseQrcode', reasonKey: 'useQrcodeDes', reason: ''},
{id: 9, content: '报告归档材料完整性', status: 1, key:'isFullMaterials', reasonKey: 'fullMaterialsDes', reason: ''}
],
uploadUrl: import.meta.env.VITE_APP_BASE_API + '/manage/accessory-file/uploadFile',
@@ -148,10 +150,16 @@
isAmin.value = true;
}
getProcessFiles(props.projectId)
+ isEnd.value = Cookies.get('end')
+ projectType.value = route.query.type;
})
+const projectType = ref('');
+const isEnd = ref('')
const riskOpen = async (type,val) => {
state.formData.projectId = val
+ isEnd.value = Cookies.get('end')
+ projectType.value = route.query.type;
if(type === 'detail' || type === 'edit' ){
if(type === 'detail'){
state.disabled = true
@@ -223,6 +231,12 @@
}
}
}
+ }
+}
+const changeStatus = (val) => {
+ if(val.status == 1 && val.reason != "") {
+ const index = state.tableData.findIndex(item => item.id == val.id)
+ state.tableData[index].reason = ""
}
}
@@ -304,32 +318,34 @@
}
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({
--
Gitblit v1.9.2