Quellcode durchsuchen

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CRM

ZYZ vor 1 Jahr
Ursprung
Commit
834478e31a

+ 2 - 1
zkqy-ui/src/views/tableMange/index.vue

@@ -1419,7 +1419,7 @@ export default {
         } else {
           // tempFieldName = temp.fieldName;
           tempFieldName = temp.tableName + "_" + temp.fieldName;
-          exportFieldName = temp.fieldName;
+          exportFieldName = temp.tableName + "_" + temp.fieldName;
         }
         if (temp.isShow) {
           let tempObj = {};
@@ -1924,6 +1924,7 @@ export default {
 
     // 获取按钮组数据
     async getBtnList() {
+      console.log("aaaaaaa");
       let res = await listBtn({ isEnablePaging: false, btnParentId: 0 });
       // this.btnGroupOption=res.rows
       // this.btnGroupOptions = res.rows.filter((item) => !item.whetherBind);

+ 11 - 1
zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -120,9 +120,10 @@
       v-loading="loading"
       :data="tableList"
       @selection-change="handleSelectionChange"
-      row-key="id"
       ref="tableRef"
       :cell-style="cellStyle"
+      :reserve-selection="true"
+      :row-key="getRowKey"
     >
       <el-table-column
         type="selection"
@@ -445,6 +446,12 @@ export default {
     },
   },
   methods: {
+    // 获取row-key
+    getRowKey(row) {
+      return camelCase(
+        this.tableName + "_" + this.templateInfo.template?.primaryKey
+      );
+    },
     /** 查询列表 */
     getList(queryParams) {
       this.loading = true;
@@ -960,6 +967,9 @@ export default {
             })
           );
         });
+      } else {
+        this.$message.warning("请至少勾选一条导出数据");
+        return;
       }
       this.queryParams.execlMap = JSON.stringify(this.queryParams.execlMap);
       this.download(