提交 32dc6846 编写于 作者: Mosher's avatar Mosher

行编辑时合并行主键到上下文中

上级 5dbe614d
......@@ -2100,9 +2100,22 @@ import { Environment } from '@/environments/environment';
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
<#if ctrl.getAllPSDEGridColumns?? && ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as column>
<#if column.getPSAppDEField?? && column.getPSAppDEField()?? && column.getPSAppDEField().getPSDEField?? && column.getPSAppDEField().getPSDEField()?? >
<#if column.getPSAppDEField().getPSDEField().isKeyDEField() == true>
<#assign keyFieldName = column.getPSAppDEField().getPSDEField().getCodeName()?lower_case >
</#if>
</#if>
</#list>
</#if>
let tempContext: any = this.$util.deepCopy(this.context);
<#if keyFieldName??>
Object.is(tempContext, { ${keyFieldName?lower_case}: data.${keyFieldName?lower_case} });
</#if>
const arg: any = JSON.parse(JSON.stringify(data));
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(tempContext)),arg, showloading);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.gridpage.formitemFailed') as string) });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册