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

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

上级 3f0cac03
...@@ -191,10 +191,11 @@ export default class GridViewLoadUILogicBase { ...@@ -191,10 +191,11 @@ export default class GridViewLoadUILogicBase {
*/ */
protected async execute_begin_node(actionContext: UIActionContext) { protected async execute_begin_node(actionContext: UIActionContext) {
// 自定义表格数据加载 // 自定义表格数据加载
actionContext.setResult(actionContext.defaultParam.getReal()); actionContext.setResult(actionContext.defaultParam.getReal());
console.log('已完成执行 开始 节点'); console.log('已完成执行 开始 节点');
await this.execute_bindparam1_node(actionContext); await this.execute_bindparam1_node(actionContext);
} }
/** /**
* 绑定当前搜索表单 * 绑定当前搜索表单
* *
...@@ -202,25 +203,26 @@ export default class GridViewLoadUILogicBase { ...@@ -202,25 +203,26 @@ export default class GridViewLoadUILogicBase {
*/ */
protected async execute_bindparam1_node(actionContext: UIActionContext) { protected async execute_bindparam1_node(actionContext: UIActionContext) {
// 自定义表格数据加载 // 自定义表格数据加载
try { try {
// 源数据 // 源数据
const srcParam = actionContext.getParam('view'); const srcParam = actionContext.getParam('view');
// 目标数据 // 目标数据
const dstParam = actionContext.getParam('searchForm'); const dstParam = actionContext.getParam('searchForm');
// 源属性 // 源属性
const srcFieldName: string = 'searchform'; const srcFieldName: string = 'searchform';
if (srcFieldName) { if (srcFieldName) {
dstParam.bind(srcParam.get(srcFieldName)); dstParam.bind(srcParam.get(srcFieldName));
} else { } else {
dstParam.bind(srcParam.getReal()); dstParam.bind(srcParam.getReal());
}
actionContext.bindLastReturnParam(null);
} catch (error: any) {
throw new Error(`逻辑参数当前搜索表单 ${error && error.message ? error.message : '发生未知错误!'}`);
} }
actionContext.bindLastReturnParam(null); console.log('已完成执行 绑定当前搜索表单 节点');
} catch (error: any) { await this.execute_viewctrlinvoke1_node(actionContext);
throw new Error('逻辑参数当前搜索表单 ${error && error.message ? error.message : '发生未知错误!'}');
}
console.log('已完成执行 绑定当前搜索表单 节点');
await this.execute_viewctrlinvoke1_node(actionContext);
} }
/** /**
* 视图部件调用 * 视图部件调用
* *
...@@ -228,29 +230,30 @@ export default class GridViewLoadUILogicBase { ...@@ -228,29 +230,30 @@ export default class GridViewLoadUILogicBase {
*/ */
protected async execute_viewctrlinvoke1_node(actionContext: UIActionContext) { protected async execute_viewctrlinvoke1_node(actionContext: UIActionContext) {
// 自定义表格数据加载 // 自定义表格数据加载
const invokeCtrl = 'searchForm'; const invokeCtrl = 'searchForm';
const invokeMethod = 'loadDraft'; const invokeMethod = 'loadDraft';
const invokeParam = 'viewParam'; const invokeParam = 'viewParam';
if (!invokeCtrl || !invokeMethod) { if (!invokeCtrl || !invokeMethod) {
throw new Error(`界面对象或者调用方法缺失`); throw new Error(`界面对象或者调用方法缺失`);
} }
const invokeUICtrl = actionContext.getParam(invokeCtrl).getReal(); const invokeUICtrl = actionContext.getParam(invokeCtrl).getReal();
if (invokeUICtrl[invokeMethod] && invokeUICtrl[invokeMethod] instanceof Function) { if (invokeUICtrl[invokeMethod] && invokeUICtrl[invokeMethod] instanceof Function) {
try { try {
const result = await invokeUICtrl[invokeMethod](); const result = await invokeUICtrl[invokeMethod]();
if (invokeParam) { if (invokeParam) {
actionContext.getParam(invokeParam).bind(result); actionContext.getParam(invokeParam).bind(result);
}
actionContext.bindLastReturnParam(result);
} catch (error:any) {
throw new Error(`${invokeCtrl}界面对象调用${invokeMethod}方法发生异常`);
} }
actionContext.bindLastReturnParam(result); } else {
} catch (error:any) { throw new Error(`${invokeCtrl}界面对象不存在${invokeMethod}方法`);
throw new Error(`${invokeCtrl}界面对象调用${invokeMethod}方法发生异常`);
} }
} else { console.log('已完成执行 视图部件调用 节点');
throw new Error(`${invokeCtrl}界面对象不存在${invokeMethod}方法`); await this.execute_viewctrlinvoke2_node(actionContext);
}
console.log('已完成执行 视图部件调用 节点');
await this.execute_viewctrlinvoke2_node(actionContext);
} }
/** /**
* 结束 * 结束
* *
...@@ -258,9 +261,10 @@ export default class GridViewLoadUILogicBase { ...@@ -258,9 +261,10 @@ export default class GridViewLoadUILogicBase {
*/ */
protected async execute_end1_node(actionContext: UIActionContext) { protected async execute_end1_node(actionContext: UIActionContext) {
// 自定义表格数据加载 // 自定义表格数据加载
// TODO 等待补充 // TODO 等待补充
console.log('已完成执行 结束 节点'); console.log('已完成执行 结束 节点');
} }
/** /**
* 视图部件调用 * 视图部件调用
* *
...@@ -268,28 +272,29 @@ export default class GridViewLoadUILogicBase { ...@@ -268,28 +272,29 @@ export default class GridViewLoadUILogicBase {
*/ */
protected async execute_viewctrlinvoke2_node(actionContext: UIActionContext) { protected async execute_viewctrlinvoke2_node(actionContext: UIActionContext) {
// 自定义表格数据加载 // 自定义表格数据加载
const invokeCtrl = 'grid'; const invokeCtrl = 'grid';
const invokeMethod = 'load'; const invokeMethod = 'load';
const invokeParam = 'viewParam'; const invokeParam = 'viewParam';
if (!invokeCtrl || !invokeMethod) { if (!invokeCtrl || !invokeMethod) {
throw new Error(`界面对象或者调用方法缺失`); throw new Error(`界面对象或者调用方法缺失`);
} }
const invokeUICtrl = actionContext.getParam(invokeCtrl).getReal(); const invokeUICtrl = actionContext.getParam(invokeCtrl).getReal();
if (invokeUICtrl[invokeMethod] && invokeUICtrl[invokeMethod] instanceof Function) { if (invokeUICtrl[invokeMethod] && invokeUICtrl[invokeMethod] instanceof Function) {
try { try {
const result = await invokeUICtrl[invokeMethod](); const result = await invokeUICtrl[invokeMethod]();
if (invokeParam) { if (invokeParam) {
actionContext.getParam(invokeParam).bind(result); actionContext.getParam(invokeParam).bind(result);
}
actionContext.bindLastReturnParam(result);
} catch (error:any) {
throw new Error(`${invokeCtrl}界面对象调用${invokeMethod}方法发生异常`);
} }
actionContext.bindLastReturnParam(result); } else {
} catch (error:any) { throw new Error(`${invokeCtrl}界面对象不存在${invokeMethod}方法`);
throw new Error(`${invokeCtrl}界面对象调用${invokeMethod}方法发生异常`);
} }
} else { console.log('已完成执行 视图部件调用 节点');
throw new Error(`${invokeCtrl}界面对象不存在${invokeMethod}方法`); await this.execute_end1_node(actionContext);
}
console.log('已完成执行 视图部件调用 节点');
await this.execute_end1_node(actionContext);
} }
} }
\ No newline at end of file
...@@ -103,10 +103,11 @@ export default class OpenYuQueUILogicBase { ...@@ -103,10 +103,11 @@ export default class OpenYuQueUILogicBase {
*/ */
protected async execute_begin_node(actionContext: UIActionContext) { protected async execute_begin_node(actionContext: UIActionContext) {
// 打开语雀文档 // 打开语雀文档
actionContext.setResult(actionContext.defaultParam.getReal()); actionContext.setResult(actionContext.defaultParam.getReal());
console.log('已完成执行 开始 节点'); console.log('已完成执行 开始 节点');
await this.execute_deuiaction1_node(actionContext); await this.execute_deuiaction1_node(actionContext);
} }
/** /**
* 结束 * 结束
* *
...@@ -114,9 +115,10 @@ export default class OpenYuQueUILogicBase { ...@@ -114,9 +115,10 @@ export default class OpenYuQueUILogicBase {
*/ */
protected async execute_end1_node(actionContext: UIActionContext) { protected async execute_end1_node(actionContext: UIActionContext) {
// 打开语雀文档 // 打开语雀文档
// TODO 等待补充 // TODO 等待补充
console.log('已完成执行 结束 节点'); console.log('已完成执行 结束 节点');
} }
/** /**
* 界面行为 * 界面行为
* *
...@@ -124,9 +126,10 @@ export default class OpenYuQueUILogicBase { ...@@ -124,9 +126,10 @@ export default class OpenYuQueUILogicBase {
*/ */
protected async execute_deuiaction1_node(actionContext: UIActionContext) { protected async execute_deuiaction1_node(actionContext: UIActionContext) {
// 打开语雀文档 // 打开语雀文档
// TODO 等待补充 // TODO 等待补充
console.log('已完成执行 界面行为 节点'); console.log('已完成执行 界面行为 节点');
await this.execute_end1_node(actionContext); await this.execute_end1_node(actionContext);
} }
} }
\ No newline at end of file
...@@ -649,7 +649,7 @@ export default class Usr4Base extends Vue implements ControlInterface { ...@@ -649,7 +649,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, isReset: boolean = false): void { public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){ 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; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -728,7 +728,7 @@ export default class Usr4Base extends Vue implements ControlInterface { ...@@ -728,7 +728,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ 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; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -837,7 +837,7 @@ export default class Usr4Base extends Vue implements ControlInterface { ...@@ -837,7 +837,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ 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{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -845,7 +845,7 @@ export default class Usr4Base extends Vue implements ControlInterface { ...@@ -845,7 +845,7 @@ export default class Usr4Base extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ 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{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.ibizbook){ if(item.ibizbook){
......
...@@ -69,11 +69,6 @@ export default class Usr4Model { ...@@ -69,11 +69,6 @@ export default class Usr4Model {
prop: 'n_ibizbookname_like', prop: 'n_ibizbookname_like',
dataType: 'QUERYPARAM' dataType: 'QUERYPARAM'
}, },
{
name: 'n_price_gtandeq',
prop: 'n_price_gtandeq',
dataType: 'QUERYPARAM'
},
{ {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册