From bcc1ce55aa699450905c68f957198428ed251c48 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期三, 12 六月 2024 17:17:35 +0800
Subject: [PATCH] 项目补录

---
 src/views/safetyReview/projectManage/components/rateConclusion.vue |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/views/safetyReview/projectManage/components/rateConclusion.vue b/src/views/safetyReview/projectManage/components/rateConclusion.vue
index 0496c97..2cbc955 100644
--- a/src/views/safetyReview/projectManage/components/rateConclusion.vue
+++ b/src/views/safetyReview/projectManage/components/rateConclusion.vue
@@ -27,20 +27,21 @@
                 v-if="state.formData.isReviseManual === 1"
                 accept="image/*,.pdf,.doc,.docx,.xlsx,.xls"
                  :action="state.uploadUrl"
-                 :disabled="state.disabled"
+                :disabled="projectType === 'view' || isEnd"
                  :headers="state.header"
                  method="post"
-                 :on-success="handleAvatarSuccess"
+                :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)"
                  :on-exceed="showTip"
                  v-model:file-list="state.fileList"
                  :on-remove="handleRemove"
                  :data="state.uploadData"
                  :on-preview="handlePreview"
-                 :limit='1'
+                 :limit='15'
+                 :before-upload="picSize"
             >
-              <el-button type="primary">附件上传</el-button>
+              <el-button type="primary">评价报告上传</el-button>
               <template #tip>
-                <div class="el-upload__tip">上传文件尺寸小于5M,最多可上传1份</div>
+                <div class="el-upload__tip">上传文件尺寸小于15M,最多可上传15份,多张图片建议合并为PDF文件规范上传。</div>
               </template>
             </el-upload>
           </el-form-item>
@@ -61,6 +62,8 @@
 import {delAccessoryFile, getAccessoryFile} from "@/api/projectManage/project";
 import axios from "axios";
 import {delFile, getFiles} from "@/api/projectManage/siteCheckRcd";
+import { useRoute } from 'vue-router'
+const route = useRoute()
 const emit = defineEmits(["getNextStatus"]);
 const prop = defineProps(['projectId'])
 const state = reactive({
@@ -98,10 +101,16 @@
     state.uploadData.projectId = val;
     getProcessFiles(val);
   }
+  isEnd.value = Cookies.get('end')
+  projectType.value = route.query.type;
 })
 
+const projectType = ref('');
+const isEnd = ref('')
 const riskOpen = async (type,val) => {
   state.uploadData.projectId = val;
+  projectType.value = route.query.type;
+  isEnd.value = Cookies.get('end')
   if(type === 'detail' || type === 'edit' ){
     if(type === 'detail'){
       state.disabled = true
@@ -165,16 +174,16 @@
 }
 
 const picSize = async (rawFile) => {
-  if(rawFile.size / 1024 / 1024 > 2){
+  if(rawFile.size / 1024 / 1024 > 15){
     ElMessage({
       type: 'warning',
-      message: '文件大小不能超过2M'
+      message: '文件大小不能超过15M'
     });
     return false
   }
 };
 
-const handleAvatarSuccess = (res) => {
+const handleAvatarSuccess = (res,uploadFile) => {
   if(res.code === 200){
     getProcessFiles()
     ElMessage({

--
Gitblit v1.9.2