From b3fb72072f550cb6dcbdbc2e65bce5d7b0a8e3b3 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 27 九月 2024 11:37:05 +0800
Subject: [PATCH] 修改UI定义

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue |  139 +++++++++++++++++++++++-----------------------
 1 files changed, 69 insertions(+), 70 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue
index 097644e..f7de593 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue
@@ -68,9 +68,9 @@
       append-to-body="true"
       class="avue-dialog"
       title="閰嶇疆鎸夐挳"
-      width="70%"
+      width="75%"
       @close="dialogClose">
-      <el-container>
+      <el-container v-loading="dialogLoading">
         <el-header style="height: 40px !important;">
           <div style="display: flex">
             <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">娣诲姞
@@ -129,7 +129,7 @@
 
                   <el-form-item label="Action锛�" prop="Action">
                     <el-col :span="14">
-                      <el-input v-model="basicForm.actionOId" :readonly="disabledBtn"></el-input>
+                      <el-input v-model="basicForm.actionName" :readonly="disabledBtn" @focus="actionFoucus"></el-input>
                     </el-col>
                   </el-form-item>
 
@@ -190,6 +190,15 @@
         </el-container>
       </el-container>
     </el-dialog>
+    <el-dialog
+      v-dialogDrag
+      :visible.sync="btnActionVisible"
+      append-to-body="true"
+      class="avue-dialog"
+      title="閫夋嫨Action"
+      width="70%">
+      <action-dialog></action-dialog>
+    </el-dialog>
   </basic-container>
 </template>
 
@@ -197,73 +206,35 @@
 import basicOption from "@/util/basic-option";
 import func from "@/util/func";
 import {
+  getPLPageDefinations,
   getBtmDatasByPage,
   getPortalVIDatasByPage,
   getQTInfoDatasByPage,
   getTabButtons,
   addTapButton,
-  updateTapButton
-} from "@/api/UI/uiDefine/api";
+  updateTapButton, getTabByContextIdAndType
+} from "@/api/UI/uiDefine";
+import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action';
 
 export default {
   props: {
     sourceData: {
-      type: Array,
-      default: () => [
-        {
-          "controlPath": "",
-          "description": "",
-          "eventKey": "",
-          "eventMap": null,
-          "eventValue": "",
-          "expandCols": "",
-          "expandMode": "",
-          "extAttr": "",
-          "id": "ABAE25CE-867E-9C73-AC1A-B316FD91C65B",
-          "isShowImage": "",
-          "linkType": "parttodocument",
-          "name": "鎶�鏈枃浠�",
-          "navigatorType": "",
-          "orderField": "",
-          "orderMode": "",
-          "orientation": "",
-          "qryType": null,
-          "queryTemplateName": "QueryPartEngineeringTechnology",
-          "refTreeSet": "",
-          "returnRows": "",
-          "rootContent": "",
-          "searchTarger": "2",
-          "separator": "",
-          "seq": "1",
-          "showAbs": "",
-          "showContent": "",
-          "showContentRelation": "",
-          "showContentTable": "",
-          "showContentType": "",
-          "showExpression": "",
-          "showExpressionRoot": "",
-          "showLinkAbs": "",
-          "showType": "document",
-          "subUILayout": "",
-          "subUIObjType": "",
-          "tabPageOId": "98F9082F-BAF4-FB81-3230-32590B34A329",
-          "templateId": "PartEngineeringTechnology_list",
-          "templateType": "1",
-          "type": 3,
-          "uiLayout": null,
-          "uiParser": "",
-          "validity": ""
-        }
-      ]
+      type: Object,
+      default: () => {}
     },
     height: {
       type: String,
       default: () => "auto"
     }
   },
+  components: {
+    actionDialog
+  },
   name: "index",
   data() {
     return {
+      btnActionVisible: false,
+      dialogLoading: false,
       saveType: '',
       disabledBtn: true,
       paramsData: [],
@@ -299,13 +270,7 @@
       basicForm: {
         seq: 1
       },
-      treeData: [
-        {
-          label: this.sourceData[0].name,
-          oId: 'parentNode',
-          children: []
-        }
-      ],
+      treeData: [],
       treeOption: {
         menu: false,
         addBtn: false,
@@ -320,7 +285,7 @@
       btnDesignVisible: false,
       FormData: [],
       form: {},
-      data: this.sourceData,
+      data: [],
       option: {
         ...basicOption,
         height: this.height,
@@ -816,8 +781,33 @@
       formDataRow: {},
     }
   },
+  watch: {
+    sourceData:{
+      handler(val) {
+        if(val && val.plOId) {
+          this.getTableList()
+        }else{
+          this.data=[];
+        }
+      },
+      immediate: true,
+      deep:true
+    }
+  },
   computed: {},
   methods: {
+    //鑾峰彇鍒楄〃鏁版嵁
+    getTableList(){
+      const params = {
+        pageContextOId:this.sourceData.plOId
+      }
+      getPLPageDefinations( params).then(res => {
+        this.data = res.data.data;
+        this.selectList=[];
+        this.$refs.crud.clearSelection();
+        this.tableLoading = false;
+      })
+    },
     // 鏍规嵁涓嶅悓鍊煎尯鍒嗙被鍨�
     templateTypeValueHandler(val) {
       const componentMap = {
@@ -960,8 +950,8 @@
     moveUp() {
       const index = this.findIndexByEventValue(this.FormData, this.formDataRow.eventValue);
       if (index > 0) {
-        // 浣跨敤 splice 鏂规硶鏉ユā鎷熶氦鎹�
-        const temp = this.FormData.splice(index - 1, 1, this.FormData[index])[0]; // 绉婚櫎 index-1 鐨勫厓绱狅紝骞跺湪鐩稿悓浣嶇疆鎻掑叆 index 鐨勫厓绱狅紝杩斿洖琚Щ闄ょ殑鍏冪礌
+        // 浣跨敤 splice 鏉ユā鎷熶氦鎹�
+        const temp = this.FormData.splice(index - 1, 1, this.FormData[index])[0]; // 绉婚櫎 index-1 鐨勫厓绱� 骞跺湪鐩稿悓浣嶇疆鎻掑叆 index 鐨勫厓绱� 杩斿洖琚Щ闄ょ殑鍏冪礌
         this.FormData.splice(index, 1, temp); // 鍦� index 浣嶇疆鎻掑叆涔嬪墠琚Щ闄ょ殑鍏冪礌
       }
     },
@@ -983,12 +973,8 @@
 
     // 鎸夐挳璁捐
     btnDesignClickHandler() {
-      if (this.selectList.length <= 0) {
-        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
-        return;
-      }
-      if (this.selectList.length > 1) {
-        this.$message.error('鏈�澶氶�夋嫨涓�鏉℃暟鎹�');
+      if (this.selectList.length !=1) {
+        this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�');
         return;
       }
       this.btnDesignVisible = true;
@@ -1004,7 +990,11 @@
       getTabButtons(params).then(res => {
         if (res.data.code === 200) {
           const data = res.data.data;
-          this.treeData[0].children = data;
+          this.treeData=[{
+              label: this.selectList[0].name,
+              oId: 'parentNode',
+              children:data
+            }];
           this.treeLoading = false;
         } else {
           this.$message.error('璇锋鏌ユ帶鍒跺彴閿欒');
@@ -1064,7 +1054,7 @@
     // 鎸夐挳璁捐淇敼
     editClickBtnHandler() {
       if (func.isEmptyObject(this.nodeTreeRow)) {
-        this.$message.error('璇烽�夋嫨鑺傜偣杩涜娣诲姞');
+        this.$message.error('璇烽�夋嫨鑺傜偣杩涜淇敼');
         return;
       }
 
@@ -1087,6 +1077,7 @@
 
     // 鎸夐挳璁捐淇濆瓨
     saveClickBtnHandler() {
+      this.dialogLoading = true;
       const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton;
       const bottomParams = {};
       if (this.paramsData.length > 0) {
@@ -1112,7 +1103,10 @@
           this.getTabBtnTree();
           this.basicForm = {};
           this.paramsData = [];
+          this.dialogLoading = false;
         }
+      }).catch(err => {
+        this.dialogLoading = false;
       })
     },
 
@@ -1141,6 +1135,11 @@
         });
       });
     },
+
+    // 閫夋嫨action
+    actionFoucus() {
+      this.btnActionVisible = true;
+    }
   }
 }
 </script>

--
Gitblit v1.9.3