提交 a3d8607a 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 af5ca2d2
......@@ -1076,11 +1076,63 @@ export default class WFMemberGridViewBase extends Vue {
this.Help(datas, contextJO,paramJO, $event, xData,this,"WFMember");
}
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: #if appDeRs.getMinorPSAppDataEntity()... [in template "TEMPLCODE_zh_CN" in macro "getreskey" at line 22, column 5]
- Reached through: @getreskey appEntity=appDataEntity cu... [in template "TEMPLCODE_zh_CN" at line 52, column 26]
----
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof WFMemberGridView
*/
protected newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
const batchAddPSAppViews=[
{view:{viewname:'wfgroup-mpickup-view',height: 0,width: 0,title: '角色/用户组数据多项选择视图'},
res:['WFGroup'],
'resAppKey':'groupid'},
{view:{viewname:'wfuser-mpickup-view',height: 0,width: 0,title: '用户数据多项选择视图'},
res:['WFUser'],
'resAppKey':'userid'}
];
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
return;
}
let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] !== this.context.srfparentdename));
})
let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if(result.datas && result.datas.length == 0){
return;
}
let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
let tempParam:any = {};
tempParam[otherViewModel.resAppKey] = this.context['srfparentkey'];
tempParam[openViewModel.resAppKey] = record.srfkey;
requestParam.push(tempParam);
});
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
}
/**
* 打开编辑数据视图
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册