提交 23ad1679 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 发布系统代码

上级 9cbc00aa
...@@ -145,6 +145,7 @@ export default class AccountUIServiceBase extends UIService { ...@@ -145,6 +145,7 @@ export default class AccountUIServiceBase extends UIService {
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'accounts', parameterName: 'account' }, { pathName: 'accounts', parameterName: 'account' },
]; ];
actionContext.closeView(null);
const openDrawer = (view: any, data: any) => { const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data); let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => { container.subscribe((result: any) => {
...@@ -152,6 +153,12 @@ export default class AccountUIServiceBase extends UIService { ...@@ -152,6 +153,12 @@ export default class AccountUIServiceBase extends UIService {
return; return;
} }
const _this: any = actionContext; const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (this.Account_OpenInfoView && this.Account_OpenInfoView instanceof Function) {
this.Account_OpenInfoView(result.datas,context,params, $event, xData,actionContext);
}
if(window.opener){ if(window.opener){
window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress); window.opener.postMessage({status:'OK',identification:'WF'},Environment.uniteAddress);
window.close(); window.close();
...@@ -430,6 +437,54 @@ export default class AccountUIServiceBase extends UIService { ...@@ -430,6 +437,54 @@ export default class AccountUIServiceBase extends UIService {
openDrawer(view, data); openDrawer(view, data);
} }
/**
* 打开主信息界面
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async Account_OpenInfoView(args: any[], context:any = {} ,params: any={}, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let data: any = {};
let parentContext:any = {};
let parentViewParam:any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
Object.assign(context, { account: '%account%' });
Object.assign(params, { accountid: '%account%' });
Object.assign(params, { accountname: '%accountname%' });
if(_this.context){
parentContext = _this.context;
}
if(_this.viewparams){
parentViewParam = _this.viewparams;
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
Object.assign(context,parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'accounts', parameterName: 'account' },
{ pathName: 'info', parameterName: 'info' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
return null;
}
openIndexViewTab(data);
}
/** /**
* 停用 * 停用
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册