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

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

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