提交 03a9391e 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务应用

上级 8f8b45ee
......@@ -278,6 +278,14 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "Edit",
tip: "Edit {0}",
......
......@@ -277,6 +277,14 @@ export default {
},
},
gridviewtoolbar_toolbar: {
tbitem12_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem14: {
caption: "-",
tip: "",
},
tbitem2: {
caption: "编辑",
tip: "编辑",
......
......@@ -103,6 +103,9 @@ export class EAMWorkOrderGridViewBase extends GridViewBase {
* @memberof EAMWorkOrderGridView
*/
public toolBarModels: any = {
tbitem12_openquickcreateview: { name: 'tbitem12_openquickcreateview', caption: '新建', 'isShowCaption': true, 'isShowIcon': true, tooltip: '新建', iconcls: 'fa fa-file-text-o', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'OpenQuickCreateView', target: 'NONE', class: '' } },
tbitem14: { name: 'tbitem14', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem2: { name: 'tbitem2', caption: '编辑', 'isShowCaption': true, 'isShowIcon': true, tooltip: '编辑', iconcls: 'fa fa-edit', icon: '', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY', class: '' } },
seperator2: { name: 'seperator2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......@@ -171,6 +174,9 @@ export class EAMWorkOrderGridViewBase extends GridViewBase {
* @memberof EAMWorkOrderGridViewBase
*/
public toolbar_click($event: any, $event2?: any): void {
if (Object.is($event.tag, 'tbitem12_openquickcreateview')) {
this.toolbar_tbitem12_openquickcreateview_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem2')) {
this.toolbar_tbitem2_click(null, '', $event2);
}
......@@ -279,6 +285,35 @@ export class EAMWorkOrderGridViewBase extends GridViewBase {
this.engine.onCtrlEvent('searchform', 'load', $event);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem12_openquickcreateview_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:EAMWorkOrderUIService = new EAMWorkOrderUIService();
curUIService.EAMWorkOrder_OpenQuickCreateView(datas,contextJO, paramJO, $event, xData,this,"EAMWorkOrder");
}
/**
* 逻辑事件
*
......
......@@ -115,6 +115,127 @@ export default class EAMWorkOrderUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async EAMWorkOrder_OpenQuickCreateView(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 = 'NONE';
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[] = [];
if(context.eamapply && true){
deResParameters = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
]
}
const parameters: any[] = [
{ pathName: 'eamworkorders', parameterName: 'eamworkorder' },
];
actionContext.closeView(null);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = actionContext.$appdrawer.openDrawer(view, context,data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (this.EAMWorkOrder_OpenInfo_MainView && this.EAMWorkOrder_OpenInfo_MainView instanceof Function) {
this.EAMWorkOrder_OpenInfo_MainView(result.datas[0],context,params, $event, xData,actionContext);
}
return result.datas;
});
}
const view: any = {
viewname: 'eamwork-order-quick-create-view',
height: 0,
width: 0,
title: actionContext.$t('entities.eamworkorder.views.quickcreateview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
/**
* 打开主信息界面
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async EAMWorkOrder_OpenInfo_MainView(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, { eamworkorder: '%eamworkorder%' });
Object.assign(params, { workorderid: '%eamworkorder%' });
Object.assign(params, { workordername: '%workordername%' });
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[] = [];
if(context.eamapply && true){
deResParameters = [
{ pathName: 'eamapplies', parameterName: 'eamapply' },
]
}
const parameters: any[] = [
{ pathName: 'eamworkorders', parameterName: 'eamworkorder' },
{ pathName: 'infoview', parameterName: 'infoview' },
];
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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册