From 8bd81a9ff5543b40c8717b88af357250958598ef Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 21 十月 2024 15:54:21 +0800
Subject: [PATCH] 处理上周遗留bug,表单定义查询模板

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 insertions(+), 7 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 ac5f61b..e5e94e5 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
@@ -28,7 +28,8 @@
         <div v-if="!tableStatus" style="display: flex;justify-content: left;margin-top: 15px">
           <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">澧炲姞</el-button>
           <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎</el-button>
-          <el-button icon="el-icon-document-add" plain size="small" type="primary">鍏嬮殕</el-button>
+          <el-button icon="el-icon-document-add" plain size="small" type="primary" @click="copyClickHandler">鍏嬮殕
+          </el-button>
           <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
           <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
           </el-button>
@@ -71,7 +72,7 @@
         </avue-crud>
       </basic-container>
     </el-main>
-    <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio"></form-dialog>
+    <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio" :editRow="editRow"></form-dialog>
     <table-dialog ref="tableDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio"
                   @updataTable="getRightPortalVIDatas"></table-dialog>
     <!-- 瀵煎叆 -->
@@ -117,7 +118,7 @@
         addBtn: false,
         editBtn: false,
         delBtn: false,
-        calcHeight:-60,
+        calcHeight: -60,
         column: [
           {
             label: '涓氬姟鍚嶇О',
@@ -147,7 +148,8 @@
         }
       },
       dbClickList: [],
-      defaultData: [], // 鐢ㄤ簬鏌ヨ鎭㈠鍘熷鍊�
+      defaultData: [], // 鐢ㄤ簬鏌ヨ鎭㈠鍘熷鍊�,
+      editRow:{},
     }
   },
   created() {
@@ -166,11 +168,13 @@
         return;
       }
       if (this.tableRadio === "0") {
+        this.editRow.id = "";
         this.$refs.formDialog.visible = true;
         this.$refs.formDialog.getTreeList();
       } else {
         this.$refs.tableDialog.visible = true;
         this.$refs.tableDialog.getDbList();
+        this.$refs.tableDialog.getSearchSelectList();
       }
     },
 
@@ -202,6 +206,7 @@
             return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes
           });
           this.treeData = data;
+          this.treeLoading = false;
         });
       } else {
         gridLink().then(res => {
@@ -228,6 +233,7 @@
 
     // 宸︿晶鏍戠偣鍑�
     nodeClick(row) {
+      console.log(row);
       this.tableRadio = null;
       this.nodeRow = row;
       this.getRightPortalVIDatas(row);
@@ -274,6 +280,7 @@
 
     // 缂栬緫鎸夐挳
     editBtnClick(row) {
+      console.log('row',row);
       // 琛ㄦ牸
       if (row.viType === 0) {
         const params = {
@@ -321,7 +328,7 @@
           id: row.id,
           viType: row.viType
         };
-
+        this.editRow = row;
         getPortalVIById(params).then(res => {
           if (res.data.code === 200) {
             const data = res.data.obj.prm.prmItemList;
@@ -337,6 +344,7 @@
             this.$refs.formDialog.getTreeList();
             this.$refs.formDialog.topForm.viName = res.data.obj.viName;
             this.$refs.formDialog.topForm.columnNumber = this.getValueBasedOnInput(res.data.obj.prm.showCols);
+            this.$refs.formDialog.topForm.showColumn = res.data.obj.prm.showCols;
 
             this.$refs.formDialog.visible = true;
           }
@@ -398,8 +406,8 @@
       })
 
     },
-    rowDeleteHandler(row){
-      deleteByIds({ids:row.id}).then(res => {
+    rowDeleteHandler(row) {
+      deleteByIds({ids: row.id}).then(res => {
         if (res.data.code === 200) {
           this.$message.success('鍒犻櫎鎴愬姛');
           this.getRightPortalVIDatas();
@@ -447,6 +455,19 @@
     // 瀵煎叆
     upLoadClickHandler() {
       this.$refs.upload.visible = true;
+    },
+
+    // 瀵煎嚭
+    copyClickHandler() {
+      if (this.selectList.length <= 0) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+        return;
+      }
+
+      if (this.selectList.length > 1) {
+        this.$message.error('鍙兘閫夋嫨涓�鏉℃暟鎹�');
+        return;
+      }
     }
   }
 }

--
Gitblit v1.9.3