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

首页导航模式

上级 0a74d7d8
......@@ -124,6 +124,7 @@
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment';
import NavDataService from '@/service/app/navdata-service';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -157,6 +158,14 @@ import { Environment } from '@/environments/environment';
*/
@Prop({default:'tab'}) public navModel?:string;
/**
* 视图标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public viewtag!:string;
/**
* 菜单模型
*
......@@ -475,6 +484,10 @@ import { Environment } from '@/environments/environment';
*/
public click(item: any) {
if (item) {
if(Object.is(this.navModel,"route")){
let navDataService = NavDataService.getInstance();
navDataService.removeNavData(this.viewtag);
}
switch (item.appfunctag) {
<#if ctrl.getPSAppFuncs()??>
<#assign appFuncs = ctrl.getPSAppFuncs()>
......
......@@ -5,6 +5,7 @@
v-model="collapseChange"
:mode="mode"
navModel="route"
viewtag="${srffilepath2(view.getCodeName())}"
:selectTheme="selectTheme"
:isDefaultPage="isDefaultPage"
:defPSAppView="defPSAppView"
......
......@@ -207,7 +207,7 @@
public initNavData(){
if(this.viewDefaultUsage){
let navDataService = NavDataService.getInstance();
navDataService.addNavData({id:'${view.getId()}',title:this.$t(this.model.srfCaption),data:null,context:this.context,viewparams:this.viewparams});
navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',title:this.$t(this.model.srfCaption),data:null,context:this.context,viewparams:this.viewparams});
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册