From 335c3d5f579a73aef0c2e2f480aa54748a17926b Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 15 十一月 2024 17:53:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js                            |   14 +++-
 Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue                                           |   21 ++++---
 Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue                   |    1 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue |    1 
 Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue                                      |   28 +++++++--
 Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-custom.vue                 |   77 ++++++++++++++-----------
 Source/plt-web/plt-web-ui/src/store/index.js                                                   |    2 
 Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue                  |    7 +-
 Source/plt-web/plt-web-ui/src/components/actions/base/ViewDialogAction.js                      |    5 -
 Source/plt-web/plt-web-ui/src/permission.js                                                    |    2 
 Source/plt-web/plt-web-ui/src/router/views/index.js                                            |    6 +-
 Source/plt-web/plt-web-ui/src/views/system/password/option.js                                  |    4 
 12 files changed, 100 insertions(+), 68 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js b/Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js
index 344364c..6c39ceb 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js
@@ -53,21 +53,25 @@
     }
   }
   paramVOS.component=component;
-  let name="鏌ョ湅璇︽儏"
   if(paramVOS.showname){
-    name="鏌ョ湅銆�"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"銆�"
+    const name="鏌ョ湅銆�"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"銆�";
+    paramVOS.title=name;
   }
-  paramVOS.title=name;
+
   const params= {
     options:options,
     paramVOS:paramVOS,
-    saveCallback:callback
+    saveCallback:callback,
+    title:paramVOS.title
   }
 
   store.dispatch("setViewtabparams", params);
   router.push({
     name: "鏌ョ湅璇︽儏",
-    params:params,
+    query:{
+      name:params.title
+    }
+    //params:params //鍔犲弬鏁板悗椤甸潰鍒锋柊鏃朵細澶氫竴涓�夐」鍗�
   });
 }
 
diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/ViewDialogAction.js b/Source/plt-web/plt-web-ui/src/components/actions/base/ViewDialogAction.js
index d63fb9d..49e066a 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/ViewDialogAction.js
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/ViewDialogAction.js
@@ -51,11 +51,10 @@
     }
   }
   paramVOS.component=component;
-  let name="鏌ョ湅璇︽儏"
   if(paramVOS.showname){
-    name="鏌ョ湅銆�"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"銆�"
+    const name="鏌ョ湅銆�"+replaceFreeMarker(paramVOS.showname,options.dataStore,options.sourceData)+"銆�"
+    paramVOS.title=name;
   }
-  paramVOS.title=name;
   const dialogConstructor = Vue.extend(ViewDialog);
   let instance = new dialogConstructor();
   instance.sourceData = options.sourceData;
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-custom.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-custom.vue
index 360191b..213bcff 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-custom.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-custom.vue
@@ -18,7 +18,9 @@
                :sourceData="sourceData"
                :dataStore="dataStore"
                :areasName="areasName"
-               :paramVOS="urlParams"></component>
+               :paramVOS="urlParams"
+               @setData="setData"
+               @setDataStore="setDataStore"></component>
   </div>
 </template>
 
@@ -86,11 +88,10 @@
     }
   },
   watch: {
-    sourceData: {
+    sourceData:{
       handler(newval) {
         //婧愭暟鎹湁鍙樺寲鏃跺彉鏇村綋鍓嶅尯鍩熸暟鎹�
-        console.log(this.areasName);
-        console.log(newval);
+        this.sourceDataMap();
       },
       deep: true,
       immediate: true
@@ -98,40 +99,43 @@
   },
   computed: {},
   created() {
-    this.customClass=this.componentVO.customClass;
-    this.componentVO.customClass.split(';').forEach(item=>{
-      if(item.indexOf('web=')==0){
-        this.customClass=item.split('web=')[1];
-      }
-    })
-    let urlParams = {};
-    // 濡傛灉璺緞涓瓨鍦� '?'锛屽垯鍙栭棶鍙峰墠闈㈤儴鍒嗙粰 parts
-    if (this.customClass.includes('?')) {
-      this.ComponentUrl = this.customClass.split("?")[0];
-      urlParams = queryStringToObject(this.customClass);
-    } else {
-      this.ComponentUrl = this.customClass; // 涓嶅瓨鍦� '?' 鏁存潯璺緞灏辨槸 parts
-    }
-    if(validatenull(this.ComponentUrl) || ['ui', 'UI', 'base','bs'].includes(this.ComponentUrl)){
-      this.ComponentUrl='views/base/UIContentViewerInDialog';
-    }else if(this.ComponentUrl.indexOf('views/')===-1){
-      this.ComponentUrl='views/custom-ui/'+this.ComponentUrl;
-    }
-
-    if (this.ComponentUrl=='base/UIContentViewerInDialog' && (!urlParams.type || !urlParams.context)) {
-      this.isError = true;
-      return;
-    }
-
-    this.btmType = urlParams.type;
-    this.context = urlParams.context;
-    this.urlParams = Object.assign({},this.paramVOS, urlParams)
-    this.loadCompoent();
+    this.sourceDataMap();
   },
   mounted() {
     //this.getHeight(this.$parent);
   },
   methods: {
+    sourceDataMap: function () {
+      this.customClass=this.componentVO.customClass;
+      this.componentVO.customClass.split(';').forEach(item=>{
+        if(item.indexOf('web=')==0){
+          this.customClass=item.split('web=')[1];
+        }
+      })
+      let urlParams = {};
+      // 濡傛灉璺緞涓瓨鍦� '?'锛屽垯鍙栭棶鍙峰墠闈㈤儴鍒嗙粰 parts
+      if (this.customClass.includes('?')) {
+        this.ComponentUrl = this.customClass.split("?")[0];
+        urlParams = queryStringToObject(this.customClass);
+      } else {
+        this.ComponentUrl = this.customClass; // 涓嶅瓨鍦� '?' 鏁存潯璺緞灏辨槸 parts
+      }
+      if(validatenull(this.ComponentUrl) || ['ui', 'UI', 'base','bs'].includes(this.ComponentUrl)){
+        this.ComponentUrl='views/base/UIContentViewerInDialog';
+      }else if(this.ComponentUrl.indexOf('views/')===-1){
+        this.ComponentUrl='views/custom-ui/'+this.ComponentUrl;
+      }
+
+      if (this.ComponentUrl=='base/UIContentViewerInDialog' && (!urlParams.type || !urlParams.context)) {
+        this.isError = true;
+        return;
+      }
+
+      this.btmType = urlParams.type;
+      this.context = urlParams.context;
+      this.urlParams = Object.assign({},this.paramVOS, urlParams)
+      this.loadCompoent();
+    },
     loadCompoent(){
       // 鍔ㄦ�佸鍏ョ粍浠�
       import(`@/${this.ComponentUrl}.vue`).then((module) => {
@@ -148,6 +152,13 @@
       } else {
         this.getHeight(el.$parent);
       }
+    },
+    setDataStore(value) {
+      this.$emit("setDataStore", value);
+      this.dataStore = value.dataStore;
+    },
+    setData(value) {
+      this.$emit("setData", value);
     }
   }
 }
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue
index 3f07b29..9f80fae 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue
@@ -202,7 +202,6 @@
     },
     isShow: {
       handler(newval) {
-        debugger;
         if (newval && this.$el.clientHeight > 50) {
           this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5;
         }
@@ -227,10 +226,10 @@
     },
     'sourceData':{
       handler(newval) {
-        if(newval) {
+        if(newval && Object.keys(newval).length>0) {
           this.sourceDataMapParams=this.sourceDataMap();
           this.getParams();
-          // this.handleRefresh();
+          this.handleRefresh();
         }
       },
       deep: true,
@@ -354,7 +353,7 @@
       this.$refs.dataTable.rowView(row,index)
     },
     rowClickChange(row){
-      this.$refs.dataTable.toggleRowSelection(row);
+      this.$refs.dataTable.toggleRowSelection(row,true);
     },
     selectChange(row) {
       this.selectList = row;
diff --git a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue
index 4802752..58fe016 100644
--- a/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue
+++ b/Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue
@@ -252,7 +252,6 @@
             this.isRefresh=false;
           }
         })
-
       }).catch(error => {
         this.$message.error(error);
       })
diff --git a/Source/plt-web/plt-web-ui/src/permission.js b/Source/plt-web/plt-web-ui/src/permission.js
index 3af463c..0d56c1f 100644
--- a/Source/plt-web/plt-web-ui/src/permission.js
+++ b/Source/plt-web/plt-web-ui/src/permission.js
@@ -27,7 +27,7 @@
          })
        } else {
          const value = to.query.src || to.fullPath;
-         const label = to.query.name || to.name;
+         const label = to.query.name ||to.params.title|| to.name;
          const meta = to.meta || router.$avueRouter.meta || {};
          const i18n = to.query.i18n;
          if (to.query.target) {
diff --git a/Source/plt-web/plt-web-ui/src/router/views/index.js b/Source/plt-web/plt-web-ui/src/router/views/index.js
index 92e7775..2826e0e 100644
--- a/Source/plt-web/plt-web-ui/src/router/views/index.js
+++ b/Source/plt-web/plt-web-ui/src/router/views/index.js
@@ -104,11 +104,11 @@
       import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
   }]
 },{
-  path: '/viewTab',
+  path: '/base',
   component: Layout,
-  redirect: '/viewTab/index',
+  redirect: '/viewTab',
   children: [{
-    path: 'index',
+    path: 'viewTab',
     name: '鏌ョ湅璇︽儏',
     meta: {
       i18n: 'viewTab'
diff --git a/Source/plt-web/plt-web-ui/src/store/index.js b/Source/plt-web/plt-web-ui/src/store/index.js
index cbeb5d1..1e2a682 100644
--- a/Source/plt-web/plt-web-ui/src/store/index.js
+++ b/Source/plt-web/plt-web-ui/src/store/index.js
@@ -21,7 +21,7 @@
   },
   getters,
   state: {
-    viewtabparams:undefined, //鏌ョ湅tab Action鍙傛暟
+    viewtabparams:undefined, //tab娴忚 Action鍙傛暟
   },
   mutations: {
     // 瑙勭▼璇︽儏鍙傛暟
diff --git a/Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue b/Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue
index b948b58..3bc6a78 100644
--- a/Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue
+++ b/Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue
@@ -15,7 +15,7 @@
 
 <script>
 import {validatenull} from "@/util/validate";
-import { getStore } from "@/util/store.js";
+import { getStore ,removeStore} from "@/util/store.js";
 
 export default {
   name: "ViewTab",
@@ -29,23 +29,25 @@
     }
   },
   computed:{
-    title(){
-      return this.paramVOS.title || "鏌ョ湅璇︽儏"
-    }
   },
   created() {
     let config = {};
     if (!validatenull(this.$store.state.viewtabparams)) {
       config = this.$store.state.viewtabparams;
     } else {
-      config = getStore('viewtabparams');
+      config = getStore({ name:'viewtabparams'});
     }
-    this.sourceData = config.options.sourceData;
-    this.dataStore = config.options.dataStore;
-    this.paramVOS = config.paramVOS;
+    if(config){
+      this.sourceData = config.options.sourceData;
+      this.dataStore = config.options.dataStore;
+      this.paramVOS = config.paramVOS;
+    }
   },
   mounted() {
     this.loadCompoent();
+  },
+  beforeDestroy() {
+    //removeStore({ name:'viewtabparams',  type:'session'});
   },
   methods: {
     loadCompoent(){
@@ -58,7 +60,8 @@
         console.log('缁勪欢鍔犺浇澶辫触:', error);
       });
     }
-  }
+  },
+
 }
 </script>
 
diff --git a/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue b/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue
index 5107974..108ce6e 100644
--- a/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue
+++ b/Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue
@@ -1,6 +1,14 @@
 <template>
-  <avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick">
-  </avue-tree>
+  <div style="height: 720px">
+    <avue-tree ref="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">
+                  <i class="el-icon-s-promotion"></i>
+                    {{ (node || {}).label }}
+                </span>
+              </span>
+    </avue-tree>
+  </div>
 </template>
 
 <script>
@@ -58,11 +66,19 @@
     }
   },
   created() {
-    // console.log(this.sourceData);
-    console.log(this.dataStore);
-    // console.log(this.paramVOS);
+    console.log('this.dataStore',this.dataStore);
   },
-  methods: {}
+  methods: {
+    nodeClick(row) {
+      console.log(row);
+      this.$emit("setDataStore", {
+        area: 'westAreaInDialog',
+        type: 'tree',
+        btmType: 'workcontext',
+        dataStore: [row]
+      });
+    }
+  }
 }
 </script>
 
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 e3152b4..87fbb81 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
@@ -444,6 +444,7 @@
               // list.forEach(item => {
               //   this.form[item] = "";
               // })
+              this.form.searchTarger = '1'
               const searchTarger = this.option.column.find(item => item.prop === 'searchTarger');  // 鑾峰彇鎼滅储绫诲瀷閰嶇疆椤�
               searchTarger.display = true; // 鍒囨崲榛樿灞曠ず鎼滅储绫诲瀷
               // 妯℃澘绫诲瀷涓鸿〃鏍�
diff --git a/Source/plt-web/plt-web-ui/src/views/system/password/option.js b/Source/plt-web/plt-web-ui/src/views/system/password/option.js
index be04f8c..5af477d 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/password/option.js
+++ b/Source/plt-web/plt-web-ui/src/views/system/password/option.js
@@ -240,10 +240,10 @@
     labelWidth: "30%",
     dicData: [{
       label: '鍚�',
-      value: 0
+      value: false
     }, {
       label: '鏄�',
-      value: 1
+      value: true
     }]
   },
 ]

--
Gitblit v1.9.3