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

调整界面行为

上级 940b50d8
......@@ -10,5 +10,29 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
if(args.length === 0 || !args[0].srfkey){
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
for(let i=0;i<allNavData.data.length;i++){
if(allNavData.data[i].srfkey === args[0].srfkey){
computedIndex = i-1;
break;
}
}
if(computedIndex >= 0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[computedIndex].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '当前数据已经是第一条数据' });
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
......@@ -10,5 +10,29 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
if(args.length === 0 || !args[0].srfkey){
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
for(let i=0;i<allNavData.data.length;i++){
if(allNavData.data[i].srfkey === args[0].srfkey){
computedIndex = i+1;
break;
}
}
if(computedIndex < allNavData.data.length){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[computedIndex].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '当前数据已经是最后一条数据' });
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
......@@ -10,5 +10,15 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[allNavData.data.length - 1].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
\ No newline at end of file
......@@ -10,5 +10,15 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '暂不支持此项操作' });
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
_this.parseViewParam(allNavData.data[0].srfkey);
_this.engine.load();
}
}else{
this.$Notice.warning({ title: '警告', desc: '请确认操作路径是否正确' });
}
}
\ No newline at end of file
......@@ -44,17 +44,17 @@
*/
public contextMenuDragVisiable: boolean = false;
<#if view.getViewStyle() == "DEFAULT">
/**
* 初始化之前
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public beforeCreate(){
if(!Object.is(this.navModel,"route")){
let navDataService = NavDataService.getInstance(this.$store)
navDataService.removeAllNavData();
}
let navDataService = NavDataService.getInstance(this.$store)
navDataService.removeAllNavData();
}
</#if>
/**
* 当前主题
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册