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

tony001 发布系统代码 [后台服务,演示应用]

上级 62306a23
......@@ -112,6 +112,95 @@ export default class IBIZAPPCTRLUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* MORE
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPCTRLUIService
*/
public async IBIZAPPCTRL_MORE(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizappctrls', parameterName: 'ibizappctrl' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPCTRLUIService
*/
public async IBIZAPPCTRL_openDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['documentaddress']) {
Object.assign(tempContext, { ibizappctrl: '%documentaddress%' });
} else {
Object.assign(tempContext, { ibizappctrl: '%documentaddress%' });
}
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `${data.documentaddress}`;
return openPopupApp(url);
}
/**
* 获取指定数据的重定向页面
......
......@@ -112,6 +112,95 @@ export default class IBIZAPPEDITORUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* MORE
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPEDITORUIService
*/
public async IBIZAPPEDITOR_MORE(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizappeditors', parameterName: 'ibizappeditor' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPEDITORUIService
*/
public async IBIZAPPEDITOR_openDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['documentaddress']) {
Object.assign(tempContext, { ibizappeditor: '%documentaddress%' });
} else {
Object.assign(tempContext, { ibizappeditor: '%documentaddress%' });
}
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `${data.documentaddress}`;
return openPopupApp(url);
}
/**
* 获取指定数据的重定向页面
......
......@@ -112,6 +112,95 @@ export default class IBIZAPPEXTENDEDITORUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* MORE
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORUIService
*/
public async IBIZAPPEXTENDEDITOR_MORE(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizappextendeditors', parameterName: 'ibizappextendeditor' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPEXTENDEDITORUIService
*/
public async IBIZAPPEXTENDEDITOR_openDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['documentaddress']) {
Object.assign(tempContext, { ibizappextendeditor: '%documentaddress%' });
} else {
Object.assign(tempContext, { ibizappextendeditor: '%documentaddress%' });
}
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `${data.documentaddress}`;
return openPopupApp(url);
}
/**
* 获取指定数据的重定向页面
......
......@@ -112,6 +112,140 @@ export default class IBIZAPPVIEWUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* MORE
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPVIEWUIService
*/
public async IBIZAPPVIEW_MORE(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizappviews', parameterName: 'ibizappview' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPVIEWUIService
*/
public async IBIZAPPVIEW_openDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['documentaddress']) {
Object.assign(tempContext, { ibizappview: '%documentaddress%' });
} else {
Object.assign(tempContext, { ibizappview: '%documentaddress%' });
}
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
Object.assign(tempViewParam, { documentaddress: '%documentaddress%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `${data.documentaddress}`;
return openPopupApp(url);
}
/**
* 打开示例
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZAPPVIEWUIService
*/
public async IBIZAPPVIEW_openInstance(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['instanceaddress']) {
Object.assign(tempContext, { ibizappview: '%instanceaddress%' });
} else {
Object.assign(tempContext, { ibizappview: '%instanceaddress%' });
}
Object.assign(tempViewParam, { instanceaddress: '%instanceaddress%' });
Object.assign(tempViewParam, { instanceaddress: '%instanceaddress%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `${data.instanceaddress}`;
return openPopupApp(url);
}
/**
* 获取指定数据的重定向页面
......
......@@ -218,6 +218,827 @@ export default class IBIZBOOKUIServiceBase extends UIService {
this.allDeMainStateOPPrivsMap.set('武侠',Object.assign({'CREATE':1,'DELETE':1,'EDIT':1,'OPEN_DOCUMENT':1,'READ':1,'UPDATE':1},{'OPEN_DOCUMENT':0,}));
}
/**
* 导出测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_DataExportTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return;
}
xData.exportExcel({ maxRowCount: 1000 });
}
/**
* 导入测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_DataImportTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const view: any = {
viewname: 'app-data-upload',
title: actionContext.$t("app.utilview.importview"),
width: 544,
height: 368,
customClass: 'app-data-upload-modal view-default'
}
if (actionContext.context && actionContext.context.srfparentdename && actionContext.context.srfparentkey) {
Object.assign(context, { srfparentdename: actionContext.context.srfparentdename });
Object.assign(context, { srfparentkey: actionContext.context.srfparentkey });
} else {
if (context.srfparentdename) {
delete context.srfparentdename;
}
if (context.srfparentkey) {
delete context.srfparentkey;
}
}
const container: Subject<any> = actionContext.$appmodal.openModal(view, context, Object.assign({
importId: 'DataImport',
serviceName: 'IBIZBOOK',
appDeLogicName: '图书',
ignoreError: false,
importData: {
'AUTHOR': {
headername: '图书作者',
isuniqueitem: false,
name: "author",
order: 1000
},
'BOOKNUMBER': {
headername: '图书数量',
isuniqueitem: false,
name: "booknumber",
order: 1000
},
'BORROWWAY': {
codeList: { tag: 'CodeList25', type: 'STATIC' },
headername: '借阅方式',
isuniqueitem: false,
name: "borrowway",
order: 1000
},
'IBIZBOOKID': {
headername: '图书标识',
isuniqueitem: false,
name: "ibizbookid",
order: 1000
},
'IBIZBOOKNAME': {
headername: '图书名称',
isuniqueitem: false,
name: "ibizbookname",
order: 1000
},
'PRESS': {
headername: '图书出版社',
isuniqueitem: false,
name: "press",
order: 1000
},
'PRICE': {
headername: '图书价格',
isuniqueitem: false,
name: "price",
order: 1000
},
'SAILSTATE': {
codeList: { tag: 'BookSailState', type: 'STATIC' },
headername: '图书销售状态',
isuniqueitem: false,
name: "sailstate",
order: 1000
},
'SUBTEXT': {
headername: '图书描述',
isuniqueitem: false,
name: "subtext",
order: 1000
},
'TAG': {
headername: '标签',
isuniqueitem: false,
name: "tag",
order: 1000
},
'TYPE': {
codeList: { tag: 'BookType', type: 'STATIC' },
headername: '图书类型',
isuniqueitem: false,
name: "type",
order: 1000
}
}
}, tempViewParam));
container.subscribe((result: any) => {
if (Object.is(result.ret, 'OK')) {
actionContext.refresh(result.datas);
}
});
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_Delete(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
if (Object.is(actionTarget, "MULTIKEY")) {
let tempDataArray:Array<any> = [];
if ((_args.length > 1) && (Object.keys(data).length > 0)) {
for(let i =0; i < _args.length; i++){
let tempObject: any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
})
tempDataArray.push(tempObject);
}
} else {
tempDataArray.push(data);
}
data = tempDataArray;
}
Object.assign(context, tempContext);
let parentObj: any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
if(!Object.is(actionTarget,"MULTIKEY")){
Object.assign(data, parentObj);
}
Object.assign(context, parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
if (xData && xData.formValidateStatus instanceof Function) {
if (!xData.formValidateStatus()) {
actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
return;
}
}
const curService: IBIZBOOKService = new IBIZBOOKService();
let promise: any = curService['Remove'](context, data);
promise.then(async (response: any) => {
if ((!response || response.status !== 200) && !Array.isArray(response)) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
let { data } = response;
if (Array.isArray(response) && response.length > 0) {
data = [];
response.forEach((item: any) => {
data.push(item.data);
})
}
actionContext.$Notice.success({ title: '成功', desc: '删除成功!' });
}).catch((response: any) => {
if (response && response.status && response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
return;
}
return response;
});
};
backend();
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_Edit(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'usr3editview', parameterName: 'usr3editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打印测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_PrintTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
console.log('暂未支持打印');
}
/**
* 自定义测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_TestCustom(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const executeScriptCode = () => {
const data = args;
eval(`console.log(data);`);
}
return executeScriptCode();
}
/**
* 多项数据(主键)测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_multiDataKeyTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'MULTIKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 多项数据测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_mutliDataTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'MULTIDATA';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 无数据测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_noDataTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开自定义编辑视图
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_openCustomEditView(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'formloadcustomview', parameterName: 'formloadcustomview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_openDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `https://www.yuque.com/ibiz/wuf19n`;
return openPopupApp(url);
}
/**
* 打开实体看板文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_openKanbanDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `https://www.yuque.com/ibiz/wuf19n/tqi7p6`;
return openPopupApp(url);
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_panel_Usr1109586119_button_calluilogic2_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
const _context: any = Object.assign(context, actionContext.context);
const _params: any = Object.assign(params, actionContext.viewparams);
return this.executeUILogic('CustomEdit', args, _context, _params, $event, xData, actionContext, srfParentDeName);
}
/**
* 单项数据测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_singleDataTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEDATA';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempData = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(data, tempData);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 单项数据(主键)测试
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_singleKeyTest(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizbookid']) {
Object.assign(tempContext, { ibizbook: '%ibizbookid%' });
} else {
Object.assign(tempContext, { ibizbook: '%ibizbook%' });
}
Object.assign(tempViewParam, { ibizbookid: '%ibizbook%' });
Object.assign(tempViewParam, { ibizbookname: '%ibizbookname%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'editview', parameterName: 'editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 加载
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZBOOKUIService
*/
public async IBIZBOOK_toolbar_CustomView_layouttoolbar_deuiaction1_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
const _context: any = Object.assign(context, actionContext.context);
const _params: any = Object.assign(params, actionContext.viewparams);
return this.executeUILogic('GridLoad', args, _context, _params, $event, xData, actionContext, srfParentDeName);
}
/**
* 获取指定数据的重定向页面
......
......@@ -128,6 +128,179 @@ export default class IBIZCustomerUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* 应用视图
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZCustomerUIService
*/
public async IBIZCustomer_panel_A424afda77415fcfb6f_button_calluilogic18_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEDATA';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempData = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(data, tempData);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizappviews', parameterName: 'ibizappview' },
{ pathName: 'listview', parameterName: 'listview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 图书
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZCustomerUIService
*/
public async IBIZCustomer_panel_A424afda77415fcfb6f_button_calluilogic19_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEDATA';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempData = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(data, tempData);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizbooks', parameterName: 'ibizbook' },
{ pathName: 'treeview', parameterName: 'treeview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 应用流程跟踪视图
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZCustomerUIService
*/
public async IBIZCustomer_panel_A424afda77415fcfb6f_button_calluilogic20_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEDATA';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempData = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(data, tempData);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'appwfsteptraceview', parameterName: 'appwfsteptraceview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 打开链接
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZCustomerUIService
*/
public async IBIZCustomer_panel_A424afda77415fcfb6f_button_calluilogic21_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEDATA';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempData = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(data, tempData);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `https://www.baidu.com/`;
return openPopupApp(url);
}
/**
* 自定义代码
*
......
......@@ -199,6 +199,575 @@ export default class IBIZOrderUIServiceBase extends UIService {
this.allDeMainStateOPPrivsMap.set('40',Object.assign({'CREATE':1,'DELETE':1,'READ':1,'UPDATE':1},{}));
}
/**
* 界面行为插件示例
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_ActionPluginEx(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizorderid']) {
Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
} else {
Object.assign(tempContext, { ibizorder: '%ibizorder%' });
}
Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `https://www.yuque.com/ibiz/zmg893`;
return openPopupApp(url);
}
/**
* 单数据主键保存
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_BUIAction1(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizorderid']) {
Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
} else {
Object.assign(tempContext, { ibizorder: '%ibizorder%' });
}
Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
Object.assign(tempContext, {CONTEXTPARAM1:"%ibizorderid%"});
Object.assign(tempViewParam, {param2:"%ibizorderid%"});
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
if (Object.is(actionTarget, "MULTIKEY")) {
let tempDataArray:Array<any> = [];
if ((_args.length > 1) && (Object.keys(data).length > 0)) {
for(let i =0; i < _args.length; i++){
let tempObject: any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
})
tempDataArray.push(tempObject);
}
} else {
tempDataArray.push(data);
}
data = tempDataArray;
}
Object.assign(context, tempContext);
let parentObj: any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
if(!Object.is(actionTarget,"MULTIKEY")){
Object.assign(data, parentObj);
}
Object.assign(context, parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
if (xData && xData.formValidateStatus instanceof Function) {
if (!xData.formValidateStatus()) {
actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
return;
}
}
const curService: IBIZOrderService = new IBIZOrderService();
let promise: any = curService['Update'](context, data);
promise.then(async (response: any) => {
if ((!response || response.status !== 200) && !Array.isArray(response)) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
let { data } = response;
if (Array.isArray(response) && response.length > 0) {
data = [];
response.forEach((item: any) => {
data.push(item.data);
})
}
actionContext.$Notice.success({ title: '成功', desc: '后台界面行为(保存)执行成功' });
}).catch((response: any) => {
if (response && response.status && response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
return;
}
return response;
});
};
backend();
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_Delete(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizorderid']) {
Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
} else {
Object.assign(tempContext, { ibizorder: '%ibizorder%' });
}
Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
if (Object.is(actionTarget, "MULTIKEY")) {
let tempDataArray:Array<any> = [];
if ((_args.length > 1) && (Object.keys(data).length > 0)) {
for(let i =0; i < _args.length; i++){
let tempObject: any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
})
tempDataArray.push(tempObject);
}
} else {
tempDataArray.push(data);
}
data = tempDataArray;
}
Object.assign(context, tempContext);
let parentObj: any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
if(!Object.is(actionTarget,"MULTIKEY")){
Object.assign(data, parentObj);
}
Object.assign(context, parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
if (xData && xData.formValidateStatus instanceof Function) {
if (!xData.formValidateStatus()) {
actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
return;
}
}
const curService: IBIZOrderService = new IBIZOrderService();
let promise: any = curService['Remove'](context, data);
promise.then(async (response: any) => {
if ((!response || response.status !== 200) && !Array.isArray(response)) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
let { data } = response;
if (Array.isArray(response) && response.length > 0) {
data = [];
response.forEach((item: any) => {
data.push(item.data);
})
}
actionContext.$Notice.success({ title: '成功', desc: '成功删除数据!' });
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
if (xData && xData.getControlType instanceof Function && xData.getControlType() == 'FORM') {
AppCenterService.notifyMessage({ name: "IBIZOrder", action: 'appRefresh', data: args });
}
}).catch((response: any) => {
if (response && response.status && response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
return;
}
return response;
});
};
backend();
}
/**
* 前台界面行为(编辑)
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_FUIAction1(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
Object.assign(tempContext, {IBIZORDERID:"15c8e85a50dae2893c26945df5b58e4e",CONTEXTPARAM1:"%ibizorderid%",IBIZORDER:"15c8e85a50dae2893c26945df5b58e4e"});
Object.assign(tempViewParam, {param2:"%ibizorderid%"});
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
let deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'ibizorders', parameterName: 'ibizorder' },
{ pathName: 'editview', parameterName: 'editview' },
];
const openIndexViewTab = (data: any) => {
const routePath = actionContext.$viewTool.buildUpRoutePath(actionContext.$route, context, deResParameters, parameters, _args, data);
actionContext.$router.push(routePath);
// 后续界面行为
return { ok: true, result: args };
}
return openIndexViewTab(data);
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_ZDYUpdate(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'SINGLEKEY';
if (_args && args[0] && args[0]['ibizorderid']) {
Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
} else {
Object.assign(tempContext, { ibizorder: '%ibizorder%' });
}
Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
if (Object.is(actionTarget, "MULTIKEY")) {
let tempDataArray:Array<any> = [];
if ((_args.length > 1) && (Object.keys(data).length > 0)) {
for(let i =0; i < _args.length; i++){
let tempObject: any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
})
tempDataArray.push(tempObject);
}
} else {
tempDataArray.push(data);
}
data = tempDataArray;
}
Object.assign(context, tempContext);
let parentObj: any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
if(!Object.is(actionTarget,"MULTIKEY")){
Object.assign(data, parentObj);
}
Object.assign(context, parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
if (xData && xData.formValidateStatus instanceof Function) {
if (!xData.formValidateStatus()) {
actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
return;
}
}
const curService: IBIZOrderService = new IBIZOrderService();
let promise: any = curService['Remove'](context, data);
promise.then(async (response: any) => {
if ((!response || response.status !== 200) && !Array.isArray(response)) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
let { data } = response;
if (Array.isArray(response) && response.length > 0) {
data = [];
response.forEach((item: any) => {
data.push(item.data);
})
}
actionContext.$Notice.success({ title: '成功', desc: '删除成功!' });
}).catch((response: any) => {
if (response && response.status && response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
return;
}
return response;
});
};
backend();
}
/**
* 多项数据主键保存
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_mulUpdate(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'MULTIKEY';
if (_args && args[0] && args[0]['ibizorderid']) {
Object.assign(tempContext, { ibizorder: '%ibizorderid%' });
} else {
Object.assign(tempContext, { ibizorder: '%ibizorder%' });
}
Object.assign(tempViewParam, { ibizorderid: '%ibizorder%' });
Object.assign(tempViewParam, { ibizordername: '%ibizordername%' });
Object.assign(tempViewParam, {ordertype:"%ordertype%",orderstate:"%orderstate%"});
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
data = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
if (Object.is(actionTarget, "MULTIKEY")) {
let tempDataArray:Array<any> = [];
if ((_args.length > 1) && (Object.keys(data).length > 0)) {
for(let i =0; i < _args.length; i++){
let tempObject: any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{ [key]: data[key].split(',')[i] });
})
tempDataArray.push(tempObject);
}
} else {
tempDataArray.push(data);
}
data = tempDataArray;
}
Object.assign(context, tempContext);
let parentObj: any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
if(!Object.is(actionTarget,"MULTIKEY")){
Object.assign(data, parentObj);
}
Object.assign(context, parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
const backend = () => {
if (xData && xData.formValidateStatus instanceof Function) {
if (!xData.formValidateStatus()) {
actionContext.$Notice.error({ title: '错误', desc: actionContext.$t('app.searchform.globalerrortip') as string });
return;
}
}
const curService: IBIZOrderService = new IBIZOrderService();
const promiseArray: any[] = [];
if (data && data.length > 0) {
const srfkeys = context['ibizorder'] ? context['ibizorder'].split(',') : [];
data.forEach((ele: any, index: number) => {
const tempContext = Util.deepCopy(context);
Object.assign(tempContext, { ibizorder: srfkeys[index] });
promiseArray.push(curService['MulUpdate'](tempContext, ele));
})
}
let promise: any = Promise.all(promiseArray);
promise.then(async (response: any) => {
if ((!response || response.status !== 200) && !Array.isArray(response)) {
actionContext.$Notice.error({ title: '错误', desc: response.message });
return;
}
let { data } = response;
if (Array.isArray(response) && response.length > 0) {
data = [];
response.forEach((item: any) => {
data.push(item.data);
})
}
actionContext.$Notice.success({ title: '成功', desc: '批量修改成功' });
}).catch((response: any) => {
if (response && response.status && response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
return;
}
return response;
});
};
backend();
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_open_document(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `https://www.yuque.com/ibiz/wuf19n/cwqg10`;
return openPopupApp(url);
}
/**
* 界面逻辑
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_panel_A424afda77415fcfb6f_button_calluilogic16_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
const _context: any = Object.assign(context, actionContext.context);
const _params: any = Object.assign(params, actionContext.viewparams);
return this.executeUILogic('OpenYuQue', args, _context, _params, $event, xData, actionContext, srfParentDeName);
}
/**
* 语雀文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZOrderUIService
*/
public async IBIZOrder_panel_Usr1102678360_open_yuque_click(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
const _context: any = Object.assign(context, actionContext.context);
const _params: any = Object.assign(params, actionContext.viewparams);
return this.executeUILogic('OpenYuQue', args, _context, _params, $event, xData, actionContext, srfParentDeName);
}
/**
* 获取指定数据的重定向页面
......
......@@ -120,6 +120,44 @@ export default class IBIZSample0001UIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){
}
/**
* 打开文档
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
* @memberof IBIZSample0001UIService
*/
public async IBIZSample0001_openDocument(args: any[], context:any = {}, params: any={}, $event?: any, xData?: any, actionContext?: any, srfParentDeName?:string) {
let data: any = {};
let tempData: any = {};
let tempContext: any = {};
let tempViewParam: any = {};
const _this: any = actionContext;
const _args: any[] = Util.deepCopy(args);
const actionTarget: string | null = 'NONE';
tempContext = UIActionTool.handleContextParam(actionTarget, _args, context, params, tempContext);
tempViewParam = UIActionTool.handleActionParam(actionTarget, _args, context, params, tempViewParam);
Object.assign(context, tempContext);
Object.assign(params, data);
let parentObj:any = {
srfparentdename: srfParentDeName ? srfParentDeName : null,
srfparentkey: srfParentDeName ? context[srfParentDeName.toLowerCase()] : null
};
Object.assign(context, parentObj);
const openPopupApp = (url: string) => {
window.open(url, '_blank');
return { ok: true, result: _args };
}
const url = `https://www.yuque.com/ibiz/wuf19n`;
return openPopupApp(url);
}
/**
* 获取指定数据的重定向页面
......
......@@ -639,7 +639,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -675,7 +675,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZAPPEDITORListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -712,7 +712,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr5GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -748,7 +748,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr5GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -1378,7 +1378,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1429,7 +1429,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1499,7 +1499,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1607,7 +1607,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -1799,7 +1799,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -1344,7 +1344,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1395,7 +1395,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1465,7 +1465,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1573,7 +1573,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -1765,7 +1765,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -1447,7 +1447,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -1499,7 +1499,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/
public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return;
}
const arg: any = { ...opt } ;
......@@ -1569,7 +1569,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1677,7 +1677,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.actionname') as string) });
return;
}
Object.assign(arg, { viewparams: this.viewparams });
......@@ -1869,7 +1869,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsrWizardView_plugin' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return;
}
const arg: any = opt[0];
......
......@@ -670,7 +670,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public load(opt: any = {}): void {
if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return;
}
const arg: any = { ...opt };
......@@ -706,7 +706,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/
public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return;
}
const arg: any = { ...opt } ;
......
......@@ -48,18 +48,18 @@
<div v-show="flag" class="batch-toolbar">
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="usr2dataviewdataview_batchtoolbarModels.deuiaction1.visabled" :disabled="usr2dataviewdataview_batchtoolbarModels.deuiaction1.disabled" class='' v-button-loading:i-button @click="dataview_batchtoolbar_click({ tag: 'deuiaction1' }, $event)">
<i-button v-show="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction1.visabled" :disabled="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction1.disabled" class='' v-button-loading:i-button @click="dataviewexpbar_dataview_batchtoolbar_click({ tag: 'deuiaction1' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction1.caption')}}</span>
<span class='caption'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction1.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction1.tip')}}</div>
<div slot='content'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction1.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="usr2dataviewdataview_batchtoolbarModels.deuiaction2.visabled" :disabled="usr2dataviewdataview_batchtoolbarModels.deuiaction2.disabled" class='' v-button-loading:i-button @click="dataview_batchtoolbar_click({ tag: 'deuiaction2' }, $event)">
<i-button v-show="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction2.visabled" :disabled="dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels.deuiaction2.disabled" class='' v-button-loading:i-button @click="dataviewexpbar_dataview_batchtoolbar_click({ tag: 'deuiaction2' }, $event)">
<i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction2.caption')}}</span>
<span class='caption'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction2.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.ibizbook.usr2dataviewdataview_batchtoolbar_toolbar.deuiaction2.tip')}}</div>
<div slot='content'>{{$t('entities.ibizbook.dataviewexpviewdataviewexpbar_dataview_batchtoolbar_toolbar.deuiaction2.tip')}}</div>
</tooltip>
</div>
</div>
......@@ -202,18 +202,18 @@ export default class Usr2Base extends Vue implements ControlInterface {
public appEntityService: IBIZBOOKEntityService = new IBIZBOOKEntityService({ $store: this.$store });
/**
* dataview_batchtoolbar 部件 click 事件
* dataviewexpbar_dataview_batchtoolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof Usr2Base
*/
public dataview_batchtoolbar_click($event: any, $event2?: any) {
public dataviewexpbar_dataview_batchtoolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.dataview_batchtoolbar_deuiaction1_click(null, 'dataview_batchtoolbar', $event2);
this.dataviewexpbar_dataview_batchtoolbar_deuiaction1_click(null, 'dataviewexpbar_dataview_batchtoolbar', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.dataview_batchtoolbar_deuiaction2_click(null, 'dataview_batchtoolbar', $event2);
this.dataviewexpbar_dataview_batchtoolbar_deuiaction2_click(null, 'dataviewexpbar_dataview_batchtoolbar', $event2);
}
}
......@@ -226,7 +226,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public dataview_batchtoolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
public dataviewexpbar_dataview_batchtoolbar_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -254,7 +254,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public dataview_batchtoolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
public dataviewexpbar_dataview_batchtoolbar_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
......@@ -282,7 +282,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public dataview_memo1_u37f11a8_click(params: any = {}, tag?: any, $event?: any) {
public dataviewexpbar_dataview_memo1_u37f11a8_click(params: any = {}, tag?: any, $event?: any) {
// 取数
let datas: any[] = [];
let xData: any = null;
......@@ -309,7 +309,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event]
* @memberof
*/
public dataview_memo1_uc365542_click(params: any = {}, tag?: any, $event?: any) {
public dataviewexpbar_dataview_memo1_uc365542_click(params: any = {}, tag?: any, $event?: any) {
// 取数
let datas: any[] = [];
let xData: any = null;
......@@ -337,7 +337,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKUsr2DataViewBase
* @memberof IBIZBOOKDataViewExpViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
......@@ -363,7 +363,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof IBIZBOOKUsr2DataViewBase
* @memberof IBIZBOOKDataViewExpViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
......@@ -427,6 +427,12 @@ export default class Usr2Base extends Vue implements ControlInterface {
}
let result: boolean = true;
Object.assign(actionData, args);
if ('selectionchange'.indexOf(eventName) !== -1) {
result = await this.execute_dataviewexpbar_selectionchange_ctrl_logic(actionData) && result;
}
if ('load'.indexOf(eventName) !== -1) {
result = await this.execute_dataviewexpbar_load_ctrl_logic(actionData) && result;
}
if (!result) {
return false;
}
......@@ -434,6 +440,30 @@ export default class Usr2Base extends Vue implements ControlInterface {
return true;
}
/**
* 部件逻辑 -- dataviewexpbar_selectionchange
*
* @param {string} eventName 部件事件名称
* @param {any[]} data 数据
* @param {*} event 源事件对象
* @memberof Usr2Base
*/
public async execute_dataviewexpbar_selectionchange_ctrl_logic(actionData: any): Promise<boolean> {
console.log('暂未支持 CUSTOM 类型');
return true;
}
/**
* 部件逻辑 -- dataviewexpbar_load
*
* @param {string} eventName 部件事件名称
* @param {any[]} data 数据
* @param {*} event 源事件对象
* @memberof Usr2Base
*/
public async execute_dataviewexpbar_load_ctrl_logic(actionData: any): Promise<boolean> {
console.log('暂未支持 CUSTOM 类型');
return true;
}
......@@ -678,9 +708,9 @@ export default class Usr2Base extends Vue implements ControlInterface {
* 工具栏模型
*
* @type {*}
* @memberof IBIZBOOKUsr2DataView
* @memberof IBIZBOOKDataViewExpView
*/
public usr2dataviewdataview_batchtoolbarModels: any = {
public dataviewexpviewdataviewexpbar_dataview_batchtoolbarModels: any = {
deuiaction1: { name: 'deuiaction1', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
deuiaction2: { name: 'deuiaction2', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
......@@ -1005,7 +1035,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/
public async load(opt: any = {}, isReset: boolean = false): Promise<any> {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.list.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -1100,7 +1130,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -1217,7 +1247,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.list.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -1225,7 +1255,7 @@ export default class Usr2Base extends Vue implements ControlInterface {
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr2DataView' + (this.$t('app.list.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKDataViewExpView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizbook){
......@@ -1327,16 +1357,16 @@ export default class Usr2Base extends Vue implements ControlInterface {
public uiAction(data: any, tag: any, $event: any) {
$event.stopPropagation();
if(Object.is('Edit', tag)) {
this.dataview_batchtoolbar_deuiaction1_click(data, tag, $event);
this.dataviewexpbar_dataview_batchtoolbar_deuiaction1_click(data, tag, $event);
}
if(Object.is('Remove', tag)) {
this.dataview_batchtoolbar_deuiaction2_click(data, tag, $event);
this.dataviewexpbar_dataview_batchtoolbar_deuiaction2_click(data, tag, $event);
}
if(Object.is('Edit', tag)) {
this.dataview_memo1_u37f11a8_click(data, tag, $event);
this.dataviewexpbar_dataview_memo1_u37f11a8_click(data, tag, $event);
}
if(Object.is('Remove', tag)) {
this.dataview_memo1_uc365542_click(data, tag, $event);
this.dataviewexpbar_dataview_memo1_uc365542_click(data, tag, $event);
}
}
......
......@@ -11,7 +11,7 @@ export default class Usr2Model {
* 获取数据项集合
*
* @returns {any[]}
* @memberof Usr2DataViewMode
* @memberof Usr2Dataviewexpbar_dataviewMode
*/
public getDataItems(): any[] {
return [
......@@ -40,17 +40,6 @@ export default class Usr2Model {
dataType: 'FONTKEY',
},
{
name: 'n_ibizbookname_like',
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{
name:'size',
......
......@@ -698,7 +698,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
*/
public async load(opt: any = {}, isReset: boolean = false): Promise<any> {
if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.list.notConfig.fetchAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.list.notConfig.fetchAction') as string) });
return;
}
const arg: any = {...opt};
......@@ -792,7 +792,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
}
let _datas:any[] = [];
......@@ -908,7 +908,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.list.notConfig.createAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.list.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -916,7 +916,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr4DataView' + (this.$t('app.list.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKTestCLDataView' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.ibizbook){
......@@ -1037,4 +1037,4 @@ export default class Usr4Base extends Vue implements ControlInterface {
<style lang='less'>
@import './usr4-dataview.less';
</style></style>
\ No newline at end of file
</style>
\ No newline at end of file
......@@ -70,11 +70,6 @@ export default class Usr4Model {
prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM'
},
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册