提交 23a94ed0 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm---修复视图非路由方式打开后,内部路由跳转无效无提示的bug

上级 0b5285e9
......@@ -129,13 +129,17 @@ ${front_block}
delete data.srfparentdata;
}
const openIndexViewTab = (viewpath: string, data: any) => {
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
if(this.isModal){
this.$Notice.error({ title: '错误', desc: '父视图是非路由方式打开,子视图无法进行路由跳转' });
}else{
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
}
resolve();
}
<#-- 打开模态 -->
......@@ -302,13 +306,17 @@ ${front_block}
delete data.srfparentdata;
}
const openIndexViewTab = (viewpath: string, data: any) => {
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
if(this.isModal){
this.$Notice.error({ title: '错误', desc: '父视图是非路由方式打开,子视图无法进行路由跳转' });
}else{
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
}
resolve();
}
openIndexViewTab('${frontview.getPSAppModule().codeName?lower_case}_${frontview.codeName?lower_case}', data);
......
......@@ -64,14 +64,18 @@
Object.assign(data, _this.srfparentdata);
}
const openIndexViewTab = (viewpath: string, data: any) => {
Object.assign(data, { w: (new Date().getTime()) });
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
if(this.isModal){
this.$Notice.error({ title: '错误', desc: '父视图是非路由方式打开,子视图无法进行路由跳转' });
}else{
Object.assign(data, { w: (new Date().getTime()) });
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
}
}
openIndexViewTab('${dataview.getPSAppModule().codeName?lower_case}_${dataview.codeName?lower_case}', data);
<#elseif dataview.getOpenMode() = 'POPUPMODAL'>
......
......@@ -17,13 +17,17 @@
<#-- 打开顶级分页视图 -->
// 打开顶级分页视图
const openIndexViewTab = (viewpath: string, data: any) => {
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
if(this.isModal){
this.$Notice.error({ title: '错误', desc: '父视图是非路由方式打开,子视图无法进行路由跳转' });
}else{
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
}
}
<#-- 打开模态 -->
// 打开模态
......@@ -152,13 +156,17 @@
Object.assign(data, _this.srfparentdata);
}
const openIndexViewTab = (viewpath: string, data: any) => {
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
if(this.isModal){
this.$Notice.error({ title: '错误', desc: '父视图是非路由方式打开,子视图无法进行路由跳转' });
}else{
const _params = this.$util.prepareRouteParmas({
route: this.$route,
sourceNode: this.$route.name,
targetNode: viewpath,
data: data,
});
this.$router.push({ name: viewpath, params: _params });
}
}
openIndexViewTab('${dataview.getPSAppModule().codeName?lower_case}_${dataview.codeName?lower_case}', data);
<#elseif dataview.getOpenMode() = 'POPUPMODAL'>
......
......@@ -62,6 +62,14 @@ export default class ${srfclassname('${view.name}')} extends Vue {
*/
@Prop() public viewdata!: string;
/**
* 该视图是否为模态方式打开
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}
*/
@Prop({default:false}) public isModal?:boolean;
/**
* 视图标识
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册