From 71030e1f80635b7332136a488bc2cc8bd36fc04c Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 19 十一月 2024 11:40:37 +0800
Subject: [PATCH] Merge branch 'hc-dataproduct-v1112' into lsf-dataproduct-1024

---
 src/views/fysp/check/components/ComChangeEdit.vue |   35 ++++++++++++++++++++++-------------
 1 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/src/views/fysp/check/components/ComChangeEdit.vue b/src/views/fysp/check/components/ComChangeEdit.vue
index c297afb..d456860 100644
--- a/src/views/fysp/check/components/ComChangeEdit.vue
+++ b/src/views/fysp/check/components/ComChangeEdit.vue
@@ -3,9 +3,7 @@
     <div class="t-card_item">
       鏁存敼鍥剧墖&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       <div>
-        <!-- <el-button @click="chosePicFromAnyPic">浠庝换鎰忓浘鐗囬�夊彇</el-button> -->
-        <!-- <el-button type="primary" @click="chosePicFromLedgerPic">浠庡彴璐﹂�夊彇</el-button> -->
-        <el-button @click="choseChangePic">浠庢枃浠跺す閫夊彇</el-button>
+        <el-button @click="choseChangePic" :disabled="fileList.length >= 3">浠庢枃浠跺す閫夊彇</el-button>
       </div>
     </div>
     <el-upload
@@ -21,24 +19,30 @@
       :disabled="readonly"
       accept="image/*"
     >
-      <el-button
-        type="primary"
-        id="uploadBtnId"
-        style="display: none"
-      ></el-button>
-      <el-icon>
-        <Plus />
-      </el-icon>
+      <template #trigger v-if="fileList.length < 3 && !readonly">
+        <el-button
+          v-if="fileList.length < 3"
+          type="primary"
+          id="uploadBtnId"
+          style="display: none"
+        ></el-button>
+        <el-icon>
+          <Plus />
+        </el-icon>
+      </template>
+      <template #tip>
+        <div style="color: #f56c6c">鏈�灏戜笂浼犱竴寮犲浘鐗囷紝鏈�澶氶�夋嫨涓夊紶鍥剧墖</div>
+      </template>
     </el-upload>
     <div class="flex-div">
       <el-button type="primary" @click="onSubmit">淇濆瓨</el-button>
       <el-button @click="this.$emit('submited', false)">鍙栨秷</el-button>
     </div>
     <ArbitraryPhoto
-      :max-select="3"
+      :max-select="maxSelectImgCount - fileList.length"
       v-if="anyPhotoDialog"
       v-model:dialog-visible="anyPhotoDialog"
-      @selectByAnyPhonoEvent="handleSelectedAnyPhono"
+      @submit="handleSelectedAnyPhono"
       :subtask="subtask"
       :defaultFile="fileList"
       ref="arbitraryPhotoRef"
@@ -108,6 +112,8 @@
   },
   data() {
     return {
+      // 鍥剧墖閫夋嫨鏈�澶ф暟閲�
+      maxSelectImgCount: 3,
       previewDialogImageUrl: '',
       previewDialogVisible: false,
       fileList: [],
@@ -316,4 +322,7 @@
   width: 100%;
   height: 100%;
 }
+::v-deep .el-upload--picture-card {
+  border: 0 !important;
+}
 </style>

--
Gitblit v1.9.3