ludc
2024-11-15 335c3d5f579a73aef0c2e2f480aa54748a17926b
Merge remote-tracking branch 'origin/master'
已修改12个文件
168 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/ViewDialogAction.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-custom.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-tree.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/permission.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/router/views/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/store/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/custom-ui/product.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/password/option.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 //加参数后页面刷新时会多一个选项卡
  });
}
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;
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);
    }
  }
}
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;
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);
      })
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) {
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'
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: {
    // 规程详情参数
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>
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>
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; // 切换默认展示搜索类型
              // 模板类型为表格
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
    }]
  },
]