From e88c8eb524bc477ec8a3cac2902c55a4e0982ce7 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 22 三月 2024 10:02:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/ProjectWeb/src/router/page/index.js                             |    2 
 Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue |   74 ++++++++++++++++++++++++
 Source/ProjectWeb/src/components/dynamic-components/index.vue          |    2 
 Source/ProjectWeb/src/views/base/uiDefineVO.js                         |   48 ++++++++++++++++
 Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue   |    3 
 5 files changed, 124 insertions(+), 5 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
index f84226e..4074c3d 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
@@ -1,6 +1,14 @@
 <template>
   <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
-
+    <div v-if="isError" style="color: #F56C6C">杩欎釜鑷畾涔夐〉闈㈢殑鍦板潃鏍煎紡涓嶆纭�傛帹鑽愪娇鐢║I:type#content?param=xxx杩欑褰㈠紡</div>
+    <component v-else :is="asyncComponent"
+               :customOptions="customOptions"
+               :inDialog="inDialog"
+               :key="areasName+'customCom-'+componentVO.oid"
+               :componentVO="componentVO"
+               :sourceData="sourceData"
+               :areasName="areasName"
+               :paramVOS="paramVOS"></component>
   </div>
 </template>
 
@@ -35,8 +43,70 @@
       default: true
     },
   },
+  components:{
+
+  },
   data() {
-    return {}
+    return {
+      customClass:this.componentVO.customClass, //UI:type#content?param=xxx鎴栬�� 缁勪欢name:type#content?param=xxx
+      isError:false, //璺緞瑙f瀽澶辫触
+      componentPath:'@/views/base/UIContentViewer' //鑷畾涔変娇鐢ㄧ殑缁勪欢璺緞
+    }
+  },
+  computed:{
+    customOptions() {
+      let componentPath='@/views/base/UIContentViewer';
+      if(this.customClass.indexOf(":") <0){
+        this.isError=true;
+        return ;
+      }
+
+      if(this.customClass.split(':')[0]!='UI' && this.customClass.split(':')[0]!='ui'){
+        componentPath='@/views/custom/'+this.customClass.split(':')[0];
+      }
+      let urlParams={};
+      let btmType=''
+      let content=''
+      if(this.customClass.split(':')[1].indexOf("?") <0){
+        btmType=this.customClass.split(':')[1].split('#')[0];
+        content=this.customClass.split(':')[1].split('#')[1];
+      }else {
+        let split1 = this.customClass.split(':')[1].split('?')[0];
+        let split2 = this.customClass.split(':')[1].split('?')[1];
+        btmType=split1.split('#')[0];
+        content=split1.split('#')[1];
+        let paramsArray = split2.split("&");
+        paramsArray.forEach(item=>{
+          var preParam =item.split("=");
+          if(preParam[0]=='btmname'){
+            urlParams['btmType']=preParam[1];
+          }else if(preParam[0]=='imagetype'){
+            urlParams['imageType']=preParam[1];
+            if(preParam[1]=='fileobject'){
+
+            }
+          }else{
+            urlParams[preParam[0]] = preParam[1];
+          }
+        })
+      }
+
+      this.componentPath=componentPath;
+      return {
+        btmType:btmType,
+        content:content,
+        urlParams: urlParams,
+        uiComponentType: this.componentVO.uiComponentType,
+        uiComponentTypeText: this.componentVO.uiComponentTypeText,
+        uiParseClass: this.componentVO.uiParseClass
+      }
+    },
+    asyncComponent() {
+      return import(this.componentPath);
+    }
+  },
+  created() {
+
   }
 }
 </script>
diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
index 31c933c..e36cab4 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
@@ -57,7 +57,8 @@
     isShow:{
       handler(newval) {
         if(newval) {
-          console.log(this.$el.clientHeight)}
+          //console.log(this.$el.clientHeight)
+        }
       }
     }
   },
diff --git a/Source/ProjectWeb/src/components/dynamic-components/index.vue b/Source/ProjectWeb/src/components/dynamic-components/index.vue
index 6e8006d..58df815 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/index.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/index.vue
@@ -28,7 +28,7 @@
                 :paramVOS="paramVOS"
                 :isShow="isShow">
   </dynamic-tree>
-  <dynamic-custom v-else-if="componentVO.uiComponentType=='custom'"  :inDialog="inDialog"
+  <dynamic-custom v-else-if="componentVO.uiComponentType=='customer'"  :inDialog="inDialog"
                   :key="areasName+'custom-'+componentVO.oid"
                   :componentVO="componentVO"
                   :sourceData="sourceData"
diff --git a/Source/ProjectWeb/src/router/page/index.js b/Source/ProjectWeb/src/router/page/index.js
index 4c511ba..1c12de2 100644
--- a/Source/ProjectWeb/src/router/page/index.js
+++ b/Source/ProjectWeb/src/router/page/index.js
@@ -84,7 +84,7 @@
     children: [
       {
         path: '',
-        component: () => import("@/views/base/UIContentVIewer"),
+        component: () => import("@/views/base/UIContentViewer"),
         props: true
       }
     ]
diff --git a/Source/ProjectWeb/src/views/base/uiDefineVO.js b/Source/ProjectWeb/src/views/base/uiDefineVO.js
index 01477f5..9571282 100644
--- a/Source/ProjectWeb/src/views/base/uiDefineVO.js
+++ b/Source/ProjectWeb/src/views/base/uiDefineVO.js
@@ -1639,6 +1639,54 @@
           "versionSeq": 0,
           "versionValue": null
         },
+        {
+          "btmname": null,
+          "buttons": [],
+          "checkInBy": null,
+          "checkInTime": null,
+          "checkOutBy": null,
+          "checkOutTime": null,
+          "copyFromVersion": null,
+          "createTime": null,
+          "creator": null,
+          "customClass": "UI:processreview#DepartmentProcessReview_web?param=xxx",
+          "data": null,
+          "description": "",
+          "extendAttr": "",
+          "firstR": null,
+          "firstV": null,
+          "formDefineVO": null,
+          "id": null,
+          "lastModifier": null,
+          "lastModifyTime": null,
+          "lastR": null,
+          "lastV": null,
+          "lcStatus": null,
+          "lcStatusText": null,
+          "lctid": null,
+          "name": "鑷畾涔夋樉绀�",
+          "nameOid": null,
+          "oid": "A05C554A-5589-F964-2004-15CB05CBEE6D",
+          "orderNum": 2,
+          "owner": null,
+          "pkLayout": "C08F5364-F23D-9602-2165-2487E3DD9E0C",
+          "revisionOid": null,
+          "revisionRule": null,
+          "revisionSeq": 0,
+          "revisionValue": null,
+          "secretGrade": null,
+          "secretGradeText": null,
+          "tableDefineVO": null,
+          "treeDefineVO": null,
+          "treeTableDefineVO": null,
+          "ts": null,
+          "uiComponentType": "customer",
+          "uiComponentTypeText": "鑷畾涔夋ā鏉�",
+          "uiParseClass": "",
+          "versionRule": null,
+          "versionSeq": 0,
+          "versionValue": null
+        }
       ],
       "copyFromVersion": null,
       "createTime": "2022-02-08 10:40:50.000",

--
Gitblit v1.9.3