From 6169743c8e8c1547148b04b4d773bacdf7503a47 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 05 十二月 2024 10:27:42 +0800
Subject: [PATCH] 表单、表格定义联调绑定查询模板

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
index f92c433..e54efd7 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -66,7 +66,7 @@
         </avue-crud>
       </basic-container>
     </el-main>
-    <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :editRow="editRow" :treeRadio="treeRadio"></form-dialog>
+    <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :editRow="editRow" :treeRadio="treeRadio"  @updataTable="getRightPortalVIDatas"></form-dialog>
     <table-dialog ref="tableDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio"
                   @updataTable="getRightPortalVIDatas"></table-dialog>
     <!-- 瀵煎叆 -->
@@ -204,8 +204,9 @@
         this.$refs.formDialog.getTreeList();
       } else {
         this.$refs.tableDialog.visible = true;
-        this.$refs.tableDialog.getDbList();
-        this.$refs.tableDialog.getSearchSelectList();
+        this.$refs.tableDialog.getDbList(); // 鍙屽嚮鎿嶄綔涓嬫媺鎺ュ彛
+        this.$refs.tableDialog.getSearchSelectList(); // 閫夋嫨琛ㄥ崟涓嬫媺鎺ュ彛
+        this.$refs.tableDialog.getFormSelect(); // 鏌ヨ妯℃澘涓嬫媺鎺ュ彛
       }
     },
 
@@ -264,7 +265,6 @@
 
     // 宸︿晶鏍戠偣鍑�
     nodeClick(row) {
-      console.log(row);
       this.tableRadio = null;
       this.nodeRow = row;
       this.getRightPortalVIDatas(row);
@@ -330,14 +330,19 @@
             // 鏇存柊琛ㄥ崟
             this.$refs.tableDialog.form = {
               ...prmItem,
+              itemFieldWidthList:prmItem.itemFieldWidthList.map(item => {
+                return{
+                  ...item,
+                  $cellEdit: true,
+                }
+              }),
               viName: res.data.obj.viName,
+              itemQtName:res.data.obj.prm.formQtName,
               editNodeId: row.id,
-              itemOutFieldList: (prmItem.itemOutFieldList || []).map(item => ({id: item})),
+              itemOutFieldList: (prmItem.itemOutFieldList || []),
               itemSearchFieldList: (prmItem.itemSearchFieldList || []).map(item => ({id: item})),
-              itemKeyFieldList: (prmItem.itemKeyFieldList || []).map(item => ({id: item})),
-              searchLabel: prmItem.itemSeniorQueryCols || '',
-              searchNumber: prmItem.itemSeniorQueryColsCounts || '1',
-              searchSql: prmItem.itemQuerySql || '',
+              itemKeyFieldList: (prmItem.itemKeyFieldList || []),
+              searchNumber: '1',
               itemFileWidthSelect: (prmItem.itemFieldWidthList && prmItem.itemFieldWidthList.length > 0) ? prmItem.itemFieldWidthList[0].key : '',
               itemWidth: (prmItem.itemFieldWidthList && prmItem.itemFieldWidthList.length > 0) ? prmItem.itemFieldWidthList[0].value : '250'
             };
@@ -346,9 +351,6 @@
             const [width = '0', height = '0'] = (prmItem.itemImgWH || '0,0').split(',');
             this.$refs.tableDialog.itemImgWidth = width;
             this.$refs.tableDialog.itemImgHeight = height;
-
-            // 鍙屽嚮鎿嶄綔鑾峰彇鏁版嵁鏂规硶
-            this.$refs.tableDialog.getDbList();
 
             // 鏄剧ず瀵硅瘽妗�
             this.$refs.tableDialog.visible = true;
@@ -374,6 +376,7 @@
             this.$refs.formDialog.formList = updatedData;
             this.$refs.formDialog.getTreeList();
             this.$refs.formDialog.topForm.viName = res.data.obj.viName;
+            this.$refs.formDialog.topForm.itemQtName = res.data.obj.prm.formQtName;
             this.$refs.formDialog.topForm.columnNumber = this.getValueBasedOnInput(res.data.obj.prm.showCols);
             this.$refs.formDialog.topForm.showColumn = res.data.obj.prm.showCols;
 

--
Gitblit v1.9.3