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

实体工作流动态导航表格视图批提交逻辑调整

上级 fcea460c
......@@ -151,16 +151,37 @@
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
xData.submitbatch(datas,linkItem).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
this.engine.load();
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
}
});
const submitBatchData:Function = (submitdata:any,linkItem:any) =>{
xData.submitbatch(submitdata,linkItem).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
this.engine.load();
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
}
});
}
if(linkItem && linkItem.sequenceflowview && this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]){
let tempContext:any = Util.deepCopy(this.context);
Object.assign(tempContext,{${appde.getCodeName()?lower_case}:datas && datas[0].srfkey});
let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform};
<#noparse>let targetView:any = this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`];</#noparse>
const appmodal = this.$appmodal.openModal({viewname:targetView.viewname,title:(this.$t(targetView.title) as string)}, tempContext,tempViewParam);
appmodal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
let tempSubmitData:any = Util.deepCopy(datas);
tempSubmitData.forEach((element:any) => {
element.viewparams = result.datas && result.datas[0];
});
submitBatchData(tempSubmitData,linkItem);
});
}else{
submitBatchData(datas,linkItem);
}
}
/**
......
......@@ -2,7 +2,7 @@
if(this.viewparams && this.viewparams.actionForm){
this.computeActivedForm(this.viewparams.actionForm);
}else{
this.computeActivedForm();
this.computeActivedForm(null);
}
</#assign>
<#assign mounted_block>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册