Sfoglia il codice sorgente

拖拽表格绑定的按钮组回显问题

ZYZ 1 anno fa
parent
commit
68aad4070e
1 ha cambiato i file con 9 aggiunte e 3 eliminazioni
  1. 9 3
      zkqy-ui/src/views/tableMange/index.vue

+ 9 - 3
zkqy-ui/src/views/tableMange/index.vue

@@ -1925,19 +1925,25 @@ export default {
     // 获取按钮组数据
     async getBtnList() {
       let res = await listBtn({ isEnablePaging: false, btnParentId: 0 });
-      this.btnGroupOptions = res.rows.filter((item) => !item.whetherBind);
+      // this.btnGroupOption=res.rows
+      // this.btnGroupOptions = res.rows.filter((item) => !item.whetherBind);
+      this.btnGroupOptions = res.rows.filter((item) => {
+        let isMyBtn=this.formData.btnGroupList.some((val)=>item.btnKey==val)
+        return !item.whetherBind ||isMyBtn
+      });
+      
     },
   },
   created() {},
   async mounted() {
     this.getAllTable();
     this.initDragTable();
-    this.getBtnList();
     await this.getMenuList();
     if (this.$route.query.tId) {
       this.tId = this.$route.query.tId;
-      this.initTableData(this.tId);
+      await this.initTableData(this.tId);
     }
+    this.getBtnList();
   },
 };
 </script>