From e358d69fc18870584dd2d9f531910b7838ea27d9 Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期四, 02 一月 2025 09:58:53 +0800
Subject: [PATCH] 调整行点击后的回调

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue |   47 ++++++++++++++++++++++++++++-------------------
 1 files changed, 28 insertions(+), 19 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 e08b4b6..d15ee7b 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
@@ -12,7 +12,7 @@
             </div>
             <avue-tree v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
-           <span style="font-size: 15px">
+           <span>
               <i class="el-icon-s-promotion"></i>
                 {{ (node || {}).label }}
             </span>
@@ -26,12 +26,12 @@
     <el-main>
       <basic-container>
         <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" @click="copyClickHandler">鍏嬮殕
+          <el-button v-if="permissionList.addBtn" icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">澧炲姞</el-button>
+          <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎</el-button>
+          <el-button v-if="permissionList.cloneBtn" 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 v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
+          <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
           </el-button>
         </div>
         <avue-crud
@@ -58,15 +58,16 @@
             </div>
           </template>
           <template slot="menu" slot-scope="scope">
-            <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
+            <el-button v-if="permissionList.editBtn" icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫
             </el-button>
-            <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
+            <el-button v-if="permissionList.delBtn" icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎
             </el-button>
           </template>
         </avue-crud>
       </basic-container>
     </el-main>
-    <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :editRow="editRow" :treeRadio="treeRadio"  @updataTable="getRightPortalVIDatas"></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>
     <!-- 瀵煎叆 -->
@@ -90,7 +91,7 @@
             <avue-tree ref="cloneTree" v-loading="cloneTreeLoading" :data="cloneTreeData" :option="treeOption"
                        @node-click="cloneTreeNodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
-           <span style="font-size: 15px">
+           <span>
               <i class="el-icon-s-promotion"></i>
                 {{ (node || {}).label }}
             </span>
@@ -115,6 +116,7 @@
 import {getBizTypes} from "@/api/modeling/businessType/api";
 import {gridLink} from "@/api/modeling/linkType/api";
 import func from "@/util/func";
+import {mapGetters} from "vuex";
 
 export default {
   name: "index",
@@ -187,6 +189,17 @@
     this.getTreeList();
   },
   computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
+        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+        importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
+        cloneBtn: this.vaildData(this.permission[this.$route.query.id].clone, false),
+      };
+    },
     tableStatus() {
       return func.isEmptyObject(this.nodeRow);
     }
@@ -311,7 +324,6 @@
 
     // 缂栬緫鎸夐挳
     editBtnClick(row) {
-      console.log('row', row);
       // 琛ㄦ牸
       if (row.viType === 0) {
         const params = {
@@ -330,13 +342,14 @@
             // 鏇存柊琛ㄥ崟
             this.$refs.tableDialog.form = {
               ...prmItem,
-              itemFieldWidthList:prmItem.itemFieldWidthList.map(item => {
-                return{
+              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 || []),
               itemSearchFieldList: (prmItem.itemSearchFieldList || []).map(item => ({id: item})),
@@ -375,9 +388,9 @@
             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;
-
             this.$refs.formDialog.visible = true;
           }
         })
@@ -462,7 +475,7 @@
           this.lastIndex = newIndex;
         },
         () => {
-          this.selectList = [];
+          this.selectList = [row];
         }
       );
     },
@@ -480,8 +493,6 @@
       exportExcel(params).then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
-      }).catch(err => {
-        this.$message.error(err);
       });
     },
 
@@ -519,7 +530,6 @@
 
     // 鍏嬮殕鏍戠偣鍑�
     cloneTreeNodeClick(row) {
-      console.log(row);
       this.cloneTreeNode = row;
     },
 
@@ -575,7 +585,6 @@
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
       }).then(({value}) => {
-        console.log(obj);
         const params = {
           clonePortalVIDTOList: [
             {

--
Gitblit v1.9.3