From 2666dd64611a6f190c12896e507f175fae3aef19 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 13 三月 2025 14:26:47 +0800
Subject: [PATCH] 修改人员

---
 src/components/Table/lims-table.vue |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 3f88767..b844daf 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -72,16 +72,13 @@
                 @click="o.clickFun(scope.row)" :key="key">
                 {{ o.name }}
               </el-button>
-              <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"
+              <el-upload :action="javaApi + o.url" size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false"
                 :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" :headers="uploadHeader" :on-error="onError"
+                :data="o.data ? o.data(scope.row) : {}" :before-upload="o.beforeUpload ? o.beforeUpload(scope.row) : () => true
+                  " 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>
@@ -278,8 +275,13 @@
   data() {
     return {
       spanList: [],
-      btnWidth: '120px'
+      btnWidth: "120px",
     };
+  },
+  watch: {
+    column(val) {
+      this.doLayout();
+    },
   },
   mounted() {
     this.calculateSpanInfo();
@@ -287,7 +289,6 @@
   methods: {
     getWidth(row, row0) {
       let count = 0;
-      console.log(2222, row)
       row.forEach((a) => {
         if (a.showHide !== undefined && a.showHide(row0)) {
           count += a.name.length;
@@ -295,7 +296,7 @@
           count += a.name.length;
         }
       });
-      this.btnWidth = count * 15 + 70 + "px"
+      this.btnWidth = count * 15 + 70 + "px";
       return count * 15 + 70 + "px";
     },
     iconFn(row) {
@@ -335,6 +336,7 @@
           this.$message.success("涓婁紶鎴愬姛");
         }
       }
+      this.$refs.upload.clearFiles();
     },
     onError(err, file, fileList) {
       this.$message.error("涓婁紶澶辫触");

--
Gitblit v1.9.3