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

zpc --- 修复批添加

上级 23124012
......@@ -19,7 +19,7 @@
if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey })
}
_this.newdata([{ ...data }], params, $event, xData);
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) {
......
......@@ -13,7 +13,7 @@
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }], params, $event, xData);
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
......
......@@ -33,7 +33,7 @@
const batchAddPSAppViews=[
<#list batchAddPSAppViews as batchAddPSAppView>
{view:{viewname:'${srffilepath2(batchAddPSAppView.getCodeName())}',height: ${batchAddPSAppView.getHeight()?c},width: ${batchAddPSAppView.getWidth()?c},title: '${batchAddPSAppView.title}'},
res:<@getres tempView=batchAddPSAppView />}<#if batchAddPSAppView_has_next>,</#if>
res:<@getres tempView=batchAddPSAppView /><#if batchAddPSAppView.getPSAppDataEntity()??><#assign appDataEntity= batchAddPSAppView.getPSAppDataEntity()/>,'resAppKey':'${appDataEntity.getKeyPSAppDEField().getName()?lower_case}'</#if>}<#if batchAddPSAppView_has_next>,</#if>
</#list>
];
</#if>
......@@ -44,6 +44,9 @@
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')) {
......@@ -54,8 +57,10 @@
}
let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
record[this.appEntityService.APPDEKEY] = this.context['srfparentkey'];
requestParam.push(record);
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) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册