提交 29287033 编写于 作者: KK's avatar KK

update 逻辑调整

上级 ca34dbab
...@@ -1060,11 +1060,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1060,11 +1060,11 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any, linkItem: any,datas: any): Promise<any> {
const _this: any = this; const _this: any = this;
const arg: any = { ...data }; const arg: any = { ...data };
Object.assign(arg, this.viewparams); Object.assign(arg, this.viewparams,linkItem);
const response: any = this.service.wfsubmit(this.WFSubmitAction, { ...this.context }, arg, this.showBusyIndicator); const response: any = await this.service.wfsubmit(this.currentAction,JSON.parse(JSON.stringify(this.context)), datas,this.showBusyIndicator, arg);
if (response && response.status === 200) { if (response && response.status === 200) {
this.$notice.success('工作流提交成功'); this.$notice.success('工作流提交成功');
} else if (response && response.status !== 401) { } else if (response && response.status !== 401) {
......
...@@ -41,24 +41,26 @@ ...@@ -41,24 +41,26 @@
* @memberof ${srfclassname('${view.codeName}')}Base * @memberof ${srfclassname('${view.codeName}')}Base
*/ */
public dynamic_toolbar_click(linkItem: any, $event: any) { public dynamic_toolbar_click(linkItem: any, $event: any) {
let datas: any[] = []; let datas: any;
let xData: any = this.$refs.form; let xData: any = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) { if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()]; datas = xData.getDatas()[0];
}
let res = await xData.save();
if (!res || res.status !== 200) {
return;
}
let response = await xData.wfsubmit(this.context,linkItem,datas);
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (this.viewparams) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
} }
xData.wfsubmit(datas, linkItem).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (this.viewparams) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
} }
</#assign> </#assign>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册