wangting
2024-11-15 71cc6e74bf96e55944b0c7062b861eff3cc68508
修改action
已修改5个文件
39 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/permission.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/router/views/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js
@@ -61,16 +61,14 @@
  const params= {
    options:options,
    paramVOS:paramVOS,
    saveCallback:callback
    saveCallback:callback,
    title:paramVOS.title
  }
  store.dispatch("setViewtabparams", params);
  router.push({
    name: "查看详情",
    params:params,
    query:{
      name:paramVOS.title
    }
    params:params
  });
}
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;
        }
Source/plt-web/plt-web-ui/src/permission.js
@@ -27,13 +27,9 @@
         })
       } 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.name){
           //修改路由标题
           meta.title=to.query.name;
         }
         if (to.query.target) {
           window.open(value)
         } else if (meta.isTab !== false && !validatenull(value) && !validatenull(label)) {
Source/plt-web/plt-web-ui/src/router/views/index.js
@@ -111,8 +111,7 @@
    path: 'viewTab',
    name: '查看详情',
    meta: {
      i18n: 'viewTab',
      title:'查看详情'
      i18n: 'viewTab'
    },
    component: () =>
      import('@/views/base/ViewTab')
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>