From c880739ec4cd5ede33b31eb98ad5f7628ea288e5 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 11 十二月 2023 17:41:40 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/common/ztt-table.vue |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/src/views/common/ztt-table.vue b/src/views/common/ztt-table.vue
index a64ec16..37f0ef7 100644
--- a/src/views/common/ztt-table.vue
+++ b/src/views/common/ztt-table.vue
@@ -149,11 +149,7 @@
         v-bind="$attrs"
         v-on="$listeners"
         :highlight-current-row="true"
-        :row-key="
-          (row) => {
-            return row.id
-          }
-        "
+        :row-key="rowKey"
         @row-dblclick="dbClickRow"
         @row-contextmenu="contextMenu"
         @header-click="headClick"
@@ -327,7 +323,12 @@
               <template v-else>
                 <template v-if="!item.render">
                   <template v-if="item.formatter">
-                    <span
+                    <span v-if="item.isTag" style="text-align: center;">
+                      <el-tag style="width:50px;margin: 3px;" :type="scope.row[item.prop] == 0 ? 'success' : 'info'">
+                        <span v-html="item.formatter(scope.row, item, scope.row[item.prop])"></span>
+                      </el-tag>
+                    </span>
+                    <span v-else
                       v-html="
                         item.formatter(scope.row, item, scope.row[item.prop])
                       "
@@ -502,11 +503,11 @@
             >
               <i class="el-icon-upload"></i>
               <div class="el-upload__text"><em>鐐瑰嚮瀵煎叆鏁版嵁</em></div>
-              <div class="el-upload__tip" slot="tip">
+              <div class="el-upload__tip" slot="tip" >
                 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button
                   type="text"
                   style="font-size:12px;"
-                  @click="downDataTemplate"
+                  @click="downDataTemplate"   v-if="uploadInfo.Download"
                   >涓嬭浇妯℃澘</el-button
                 >
               </div>
@@ -558,6 +559,12 @@
   name: 'TTable',
   components: { exSlot, advancedSearchDialog, zttdraggable },
   props: {
+    rowKey: {
+      type: String,
+      default: ()=>{
+        return 'id'
+      }
+    },
     // 琛ㄦ牸鍨嬪彿锛歮ini,medium,small
     tableSize: { type: String, default: 'small' },
     // 鏁版嵁璇锋眰鏂规硶
@@ -814,6 +821,7 @@
             this.isCleanInfo = true
           }
         }
+        this.$emit("queryParam",this.queryParam)
       },
       deep: true
     },
@@ -931,7 +939,8 @@
       }
     },
     getDataList(selectedId) {
-      this.dataListLoading = true
+      // this.dataListLoading = true
+      this.dataListLoading = false
       var criteria = {}
       criteria.dateTimeFilters = this.dateTimeFilters
       criteria.multiSearchFilter = this.multiSearchFilter
@@ -954,7 +963,6 @@
           arr.push(this.paramArr[i])
         }
       }
-
       return this.doCallback(this.ajaxFun, arr, selectedId)
     },
     doCallback(fn, args, selectedId) {
@@ -962,7 +970,12 @@
         .apply(this, args)
         .then((response) => {
           var _this = this
-          _this.tableData = response.data.data.records
+          var resultData = response.data.data.records
+          if(resultData == undefined){
+            _this.tableData = response.data.data
+          }else{
+            _this.tableData = response.data.data.records
+          }
           _this.pagination.total = response.data.data.total
           // 缃┖閫変腑
           this.$refs.lmesTable.setCurrentRow()
@@ -990,6 +1003,7 @@
               this.clickTable(selectObj)
             }
           }
+        this.$emit('change',resultData);
         })
         .catch((error) => {
           this.dataListLoading = false
@@ -1387,7 +1401,6 @@
             }
           }
         }
-        console.log(this.multipleSelection)
         this.$emit('handleSelectionChange', this.multipleSelection)
       } else {
         this.multipleSelection = val

--
Gitblit v1.9.3