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

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue |  103 +++++++++++++++++++--------------------------------
 1 files changed, 38 insertions(+), 65 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 8638262..27f89a3 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
@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <div>
     <avue-crud
       ref="crud"
       v-model="form"
@@ -190,71 +190,27 @@
         </el-container>
       </el-container>
     </el-dialog>
-  </basic-container>
+  </div>
 </template>
 
 <script>
 import basicOption from "@/util/basic-option";
 import func from "@/util/func";
 import {
+  getPLPageDefinations,
   getBtmDatasByPage,
   getPortalVIDatasByPage,
   getQTInfoDatasByPage,
   getTabButtons,
   addTapButton,
-  updateTapButton
+  updateTapButton, getTabByContextIdAndType
 } from "@/api/UI/uiDefine";
 
 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,
@@ -299,13 +255,7 @@
       basicForm: {
         seq: 1
       },
-      treeData: [
-        {
-          label: this.sourceData[0].name,
-          oId: 'parentNode',
-          children: []
-        }
-      ],
+      treeData: [],
       treeOption: {
         menu: false,
         addBtn: false,
@@ -320,7 +270,7 @@
       btnDesignVisible: false,
       FormData: [],
       form: {},
-      data: this.sourceData,
+      data: [],
       option: {
         ...basicOption,
         height: this.height,
@@ -816,8 +766,31 @@
       formDataRow: {},
     }
   },
+  watch: {
+    sourceData:{
+      handler(val) {
+        if(val && val.plOId) {
+          this.getTableList()
+        }
+      },
+      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 = {
@@ -983,12 +956,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 +973,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('璇锋鏌ユ帶鍒跺彴閿欒');

--
Gitblit v1.9.3