Jelajahi Sumber

修改自定义列

caojunjie 4 tahun lalu
induk
melakukan
4de7cf627d

+ 4 - 3
src/combination/listComponent.vue

@@ -163,6 +163,7 @@
         <el-button type="primary" @click="save">确 定</el-button>
       </span>
     </el-dialog>
+    {{listStyle}}
   </div>
 </template>
 
@@ -260,7 +261,7 @@ export default {
       let data = {
         tableName: this.queryList.tableName,
         userId: Cookies.get("userName"),
-        sysTableSetList: this.queryList.columnList,
+        sysTableSetList: this.setRowList,
       };
       addSet(data).then((res) => {
         if (res.code == 200) {
@@ -278,8 +279,8 @@ export default {
       resetModule(this.data).then((res) => {
         if (res.code == 200) {
           this.showSetting = false;
-          this.setRowList.forEach(item=>item.checked = 0)
-          this.queryList.columnList = this.setRowList = this.listStyle;
+          this.$set(this.queryList,'columnList',this.listStyle)
+          this.setRowList = this.listStyle;
         }
       });
     },

+ 4 - 0
src/views/warehouse/inStock/index.vue

@@ -1032,6 +1032,7 @@ export default {
         userId: Cookies.get("userName"),
       };
       select(data).then((res) => {
+        console.log(res)
         if (data.tableName === '仓库入库详情') {
           if (res.data.length != 0) {
             this.detailList.columnList = res.data.filter((e) => e.checked == 0);
@@ -1048,15 +1049,18 @@ export default {
           this.inDex = this.detailOption.length
         }else {
           if (res.data.length != 0) {
+            console.log('大爷在此')
             this.queryList.columnList = res.data.filter((e) => e.checked == 0);
             this.queryList.columnList = res.data;
             this.setRowList = res.data
             this.queryList.columnList = this.queryList.columnList.filter((e) => e.checked == 0);
             this.waitFor = true
           }else {
+            console.log('大爷在此1')
             this.waitFor = true
             this.$set(this.queryList,'columnList',this.$options.data().listStyle)
             this.setRowList = this.$options.data().listStyle
+            console.log(this.$options.data().listStyle)
           }
           this.isItHidden = true
           this.inDex = 4