瀏覽代碼

保存已选择的分页数据

lph 1 年之前
父節點
當前提交
9cc2040462
共有 1 個文件被更改,包括 12 次插入5 次删除
  1. 12 5
      zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

+ 12 - 5
zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -448,9 +448,16 @@ export default {
   methods: {
     // 获取row-key
     getRowKey(row) {
-      return camelCase(
-        this.tableName + "_" + this.templateInfo.template?.primaryKey
+      console.log(
+        row[
+          camelCase(
+            this.tableName + "_" + this.templateInfo.template?.primaryKey
+          )
+        ]
       );
+      return row[
+        camelCase(this.tableName + "_" + this.templateInfo.template?.primaryKey)
+      ];
     },
     /** 查询列表 */
     getList(queryParams) {
@@ -510,9 +517,9 @@ export default {
             // });
             this.tableList = await this.setFieldStyleData(tempTableList);
             this.total = res.total;
-            this.$nextTick(() => {
-              this.$refs.tableRef?.clearSelection();
-            });
+            // this.$nextTick(() => {
+            //   this.$refs.tableRef?.clearSelection();
+            // });
             this.loading = false;
           });