From 71cc6e74bf96e55944b0c7062b861eff3cc68508 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 15 十一月 2024 15:51:54 +0800
Subject: [PATCH] 修改action
---
Source/plt-web/plt-web-ui/src/components/actions/base/ViewAction.js | 8 +++-----
Source/plt-web/plt-web-ui/src/views/base/ViewTab.vue | 21 ++++++++++++---------
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-table.vue | 1 -
Source/plt-web/plt-web-ui/src/permission.js | 6 +-----
Source/plt-web/plt-web-ui/src/router/views/index.js | 3 +--
5 files changed, 17 insertions(+), 22 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 d08e4c9..a94b7dd 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
@@ -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
});
}
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 8a7ccc6..9314cbc 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;
}
diff --git a/Source/plt-web/plt-web-ui/src/permission.js b/Source/plt-web/plt-web-ui/src/permission.js
index fd61203..0d56c1f 100644
--- a/Source/plt-web/plt-web-ui/src/permission.js
+++ b/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)) {
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 7b9f113..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
@@ -111,8 +111,7 @@
path: 'viewTab',
name: '鏌ョ湅璇︽儏',
meta: {
- i18n: 'viewTab',
- title:'鏌ョ湅璇︽儏'
+ i18n: 'viewTab'
},
component: () =>
import('@/views/base/ViewTab')
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>
--
Gitblit v1.9.3