提交 4ec6ac89 编写于 作者: tony001's avatar tony001

视图注册全局导航服务

上级 e5fde84d
......@@ -116,6 +116,8 @@
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
</#if>
this.handleCustomViewData();
//初始化导航数据
this.initNavData();
}
/**
......@@ -196,6 +198,17 @@
}
}
}
/**
* 初始化导航数据
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public initNavData(){
if(this.viewDefaultUsage){
this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',title:this.$t(this.model.srfCaption),data:null,context:this.context,viewparams:this.viewparams});
}
}
<#if view.getPSDER1N?? && view.getPSDER1N()??>
/**
......
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
<#if view.getPSAppCounterRefs()??>
<#list view.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
......@@ -131,6 +132,14 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
*/
public viewtag: string = '${view.getId()}';
/**
* 导航数据服务
*
* @type {NavDataService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public navDataService = new NavDataService();
/**
* 自定义视图导航上下文集合
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册