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

异步处理

上级 44502b44
...@@ -632,7 +632,7 @@ import moment from 'moment'; ...@@ -632,7 +632,7 @@ import moment from 'moment';
if (Object.is(view.placement, 'POPUPMODAL')) { if (Object.is(view.placement, 'POPUPMODAL')) {
container = await this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams))); container = await this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (view.placement.startsWith('DRAWER')) { } else if (view.placement.startsWith('DRAWER')) {
container = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams))); container = await this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} }
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
openPopupModal(view, data); openPopupModal(view, data);
<#elseif dataview.getOpenMode()?index_of('DRAWER') == 0> <#elseif dataview.getOpenMode()?index_of('DRAWER') == 0>
const openDrawer = (view: any, data: any) => { const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, data, deResParameters, parameters, _args, data); let container: Subject<any> = await actionContext.$appdrawer.openDrawer(view, data, deResParameters, parameters, _args, data);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
width: ${frontview.getWidth()?c}, width: ${frontview.getWidth()?c},
placement: '${frontview.getOpenMode()}' placement: '${frontview.getOpenMode()}'
}; };
const appdrawer = actionContext.$appdrawer.openDrawer(view, data); const appdrawer = await actionContext.$appdrawer.openDrawer(view, data);
appdrawer.subscribe((result: any) => { appdrawer.subscribe((result: any) => {
if (result && Object.is(result.ret, 'OK')) { if (result && Object.is(result.ret, 'OK')) {
Object.assign(data, { srfactionparam: result.datas }); Object.assign(data, { srfactionparam: result.datas });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册