From 7b6cad3a3fc3a4dcfc7944be62220e931491c268 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 04 三月 2025 16:43:48 +0800
Subject: [PATCH] 监控计划搬迁80%

---
 src/components/Table/lims-table.vue |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 26cc8df..0a2f204 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -71,15 +71,25 @@
                 @click="o.clickFun(scope.row)" :key="key">
                 {{ o.name }}
               </el-button>
-              <el-upload
-                :action="o.url ? (javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)) : '#'"
+              <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)"
                 size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1"
                 :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
                   ? o.accept
                   : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
-                  " v-if="o.type == 'upload'" style="display: inline-block; width: 50px"
+                  " v-if="o.type == 'upload' && o.url" style="display: inline-block; width: 50px"
                 v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError"
                 :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key">
+                <el-button :size="o.size ? o.size : 'small'" type="text"
+                  :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
+              </el-upload>
+              <el-upload action="#" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList)
+                " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1"
+                :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
+                  ? o.accept
+                  : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
+                  " v-if="o.type == 'upload' && !o.url" style="display: inline-block; width: 50px"
+                v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed"
+                :show-file-list="false" :key="key">
                 <el-button :size="o.size ? o.size : 'small'" type="text"
                   :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
               </el-upload>
@@ -100,7 +110,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current"
+    <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current"
       :limit.sync="page.size" @pagination="pagination" />
   </div>
 </template>

--
Gitblit v1.9.3