Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
d4ed2061
提交
d4ed2061
编写于
11月 07, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete:删除脏文件
上级
1a6396d9
变更
22
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
0 行增加
和
1551 行删除
+0
-1551
appendparam-node.ts
app_Web/src/logic/ui-logic/logic-node/appendparam-node.ts
+0
-54
begin-node.ts
app_Web/src/logic/ui-logic/logic-node/begin-node.ts
+0
-19
bindparam-node.ts
app_Web/src/logic/ui-logic/logic-node/bindparam-node.ts
+0
-50
copyparam-node.ts
app_Web/src/logic/ui-logic/logic-node/copyparam-node.ts
+0
-53
deaction-node.ts
app_Web/src/logic/ui-logic/logic-node/deaction-node.ts
+0
-106
debugparam-node.ts
app_Web/src/logic/ui-logic/logic-node/debugparam-node.ts
+0
-47
dedataset-node.ts
app_Web/src/logic/ui-logic/logic-node/dedataset-node.ts
+0
-75
delogic-node.ts
app_Web/src/logic/ui-logic/logic-node/delogic-node.ts
+0
-65
deuiaction-node.ts
app_Web/src/logic/ui-logic/logic-node/deuiaction-node.ts
+0
-73
end-node.ts
app_Web/src/logic/ui-logic/logic-node/end-node.ts
+0
-63
index.ts
app_Web/src/logic/ui-logic/logic-node/index.ts
+0
-21
logic-node-base.ts
app_Web/src/logic/ui-logic/logic-node/logic-node-base.ts
+0
-90
msgbox-node.ts
app_Web/src/logic/ui-logic/logic-node/msgbox-node.ts
+0
-71
plugin-node.ts
app_Web/src/logic/ui-logic/logic-node/plugin-node.ts
+0
-26
prepareparam-node.ts
app_Web/src/logic/ui-logic/logic-node/prepareparam-node.ts
+0
-362
rawcode-node.ts
app_Web/src/logic/ui-logic/logic-node/rawcode-node.ts
+0
-50
renewparam-node.ts
app_Web/src/logic/ui-logic/logic-node/renewparam-node.ts
+0
-52
resetparam-node.ts
app_Web/src/logic/ui-logic/logic-node/resetparam-node.ts
+0
-52
sortparam-node.ts
app_Web/src/logic/ui-logic/logic-node/sortparam-node.ts
+0
-50
throw-exception-node.ts
...Web/src/logic/ui-logic/logic-node/throw-exception-node.ts
+0
-33
viewctrl-fire-event.ts
app_Web/src/logic/ui-logic/logic-node/viewctrl-fire-event.ts
+0
-77
viewctrl-invoke-node.ts
...Web/src/logic/ui-logic/logic-node/viewctrl-invoke-node.ts
+0
-62
未找到文件。
app_Web/src/logic/ui-logic/logic-node/appendparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
/**
* 附加到数组参数节点
*
* @export
* @class AppendParamNode
* @extends {LogicNodeBase}
*/
export
class
UILogicAppendParamNode
extends
UILogicNodeBase
{
/**
* 执行节点
*
* @static
* @param {IPSDEAppendParamLogic} logicNode 逻辑节点
* @param {UIActionContext} actionContext 逻辑上下文
* @memberof AppDeLogicAppendParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
onAppendParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
?.
message
?
error
?.
message
:
'发生未知错误!'
}
`);
}
}
/**
* 附加到数组
*
* @param {IPSDEAppendParamLogic} logicNode
* @param {UIActionContext} actionContext
* @memberof AppDeLogicAppendParamNode
*/
public onAppendParam(logicNode: ILogicNode, actionContext: UIActionContext) {
// 源数据
const srcParam: any = actionContext.getParam(logicNode.srcParam as string);
// 目标数据
const dstParam: any = actionContext.getParam(logicNode.dstParam as string);
// 源属性
const srcFieldName: string = (logicNode.srcFieldName as string).toLowerCase();
let objParam: any;
if (srcFieldName) {
// objParam = srcParam.get(srcFieldName);
objParam = srcParam.getReal();
} else {
objParam = srcParam.getReal();
}
dstParam.append(logicNode.dstIndex, objParam, logicNode.srcIndex, logicNode.srcSize);
actionContext.bindLastReturnParam(null);
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/begin-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic/logic-node"
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
export
class
UILogicBeginNode
extends
UILogicNodeBase
{
/**
* 执行节点
*
* @static
* @param {IPSDELogicNode} logicNode 逻辑节点
* @param {ActionContext} actionContext 逻辑上下文
* @memberof AppDeLogicBeginNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// 默认设置当前逻辑返回结果为当前默认输入参数
actionContext
.
setResult
(
actionContext
.
defaultParam
.
getReal
());
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/bindparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
UIActionContext
}
from
"../uiaction-context"
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
export
class
UILogicBindParamNode
extends
UILogicNodeBase
{
/**
* 执行节点
*
* @param {IPSDEUIBindParamLogic} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof AppUILogicBindParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
onBindParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
?.
message
?
error
?.
message
:
'发生未知错误!'
}
`);
}
}
/**
* 处理参数
*
* @param {IPSDEUIBindParamLogic} logicNode 节点模型数据
* @param {UIActionContext} actionContext 逻辑上下文
* @memberof AppUILogicBindParamNode
*/
public onBindParam(logicNode: ILogicNode, actionContext: UIActionContext) {
if (!logicNode || !logicNode.dstParam || !logicNode.srcParam) {
throw new Error(`
操作参数或者源参数缺失!
`);
}
try {
// 源数据
const srcParam: any = actionContext.getParam(logicNode.srcParam);
// 目标数据
const dstParam: any = actionContext.getParam(logicNode.dstParam);
// 源属性
const srcFieldName: string = logicNode.srcFieldName ? logicNode.srcFieldName.toLowerCase() : '';
if (srcFieldName) {
dstParam.bind(srcParam.get(srcFieldName));
} else {
dstParam.bind(srcParam.getReal());
}
actionContext.bindLastReturnParam(null);
} catch (error: any) {
throw new Error(`
逻辑参数
$
{
logicNode
.
dstParam
}
$
{
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`);
}
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/copyparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
UIActionContext
}
from
"../uiaction-context"
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
/**
* 拷贝参数节点
*
* @export
* @class UILogicCopyParamNode
* @extends {UILogicNodeBase}
*/
export
class
UILogicCopyParamNode
extends
UILogicNodeBase
{
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicCopyParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
onCopyParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
"发生未知错误!"
}
`
);
}
}
/**
* 处理参数
*
* @param {ILogicNode} logicNode 节点模型数据
* @param {UIActionContext} actionContext 逻辑上下文
* @memberof UILogicCopyParamNode
*/
public
onCopyParam
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
if
(
!
logicNode
||
!
logicNode
.
dstParam
||
!
logicNode
.
srcParam
)
{
throw
new
Error
(
`操作参数或者源参数缺失!`
);
}
try
{
// 源数据
const
srcParam
:
any
=
actionContext
.
getParam
(
logicNode
.
srcParam
);
// 目标数据
const
dstParam
:
any
=
actionContext
.
getParam
(
logicNode
.
dstParam
);
srcParam
.
copyTo
(
dstParam
);
actionContext
.
bindLastReturnParam
(
null
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑参数
${
logicNode
.
dstParam
}${
error
&&
error
.
message
?
error
.
message
:
"发生未知错误!"
}
`
);
}
}
}
app_Web/src/logic/ui-logic/logic-node/deaction-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
UIActionContext
}
from
"../uiaction-context"
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
/**
* 实体行为调用节点
*
* @export
* @class AppUILogicDeactionNode
*/
export
class
UILogicDeActionNode
extends
UILogicNodeBase
{
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof AppUILogicDeactionNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
await
this
.
handleDEAction
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理实体行为
*
* @private
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof AppUILogicDeactionNode
*/
private
async
handleDEAction
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// const dstEntity = logicNode.getDstPSAppDataEntity();
// const deAction = await getDstPSAppDEAction(logicNode);
// const dstParam = actionContext.getParam((logicNode.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// if (!Object.is(dstParam.logicParamType, UILogicParamType.entityListParam) && !Object.is(dstParam.logicParamType, UILogicParamType.entityParam)) {
// throw new Error(`实体行为操作参数只能为数据对象变量类型或者数据对象列表类型`);
// }
// const retParam = actionContext.getParam((logicNode.getRetPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// if (dstEntity && deAction && dstParam) {
// try {
// const service = await DataServiceHelp.getInstance().getService(dstEntity);
// const getTempContext = (data: any) => {
// const tempContext = Util.deepCopy(actionContext.context);
// if (data) {
// Object.assign(tempContext, data);
// }
// return tempContext;
// }
// // 数据对象变量类型
// if (Object.is(dstParam.logicParamType, UILogicParamType.entityParam)) {
// const tempContext = getTempContext(dstParam.getReal());
// const res = await service.execute(deAction.codeName, tempContext, dstParam.getReal() ? dstParam.getReal() : {});
// if (res && res.ok && res.data) {
// if (retParam) {
// retParam.bind(res.data);
// }
// actionContext.bindLastReturnParam(res.data);
// } else {
// throw new Error(`执行实体行为失败`);
// }
// } else {
// // 数据对象列表类型
// if (dstParam.getReal() && (dstParam.getReal().length > 0)) {
// if (dstParam.getReal().length > 20) {
// throw new Error(`操作数据量超过20条,建议使用后台处理逻辑`);
// }
// let promises: any[] = [];
// dstParam.getReal().forEach((item: any) => {
// const tempContext = getTempContext(item);
// promises.push(service.execute(deAction.codeName, tempContext, item ? item : {}));
// })
// const resArray = await Promise.all(promises);
// if (resArray && resArray.length > 0) {
// const resultArray: any[] = [];
// resArray.forEach((res: any) => {
// if (res && res.ok && res.data) {
// resultArray.push(res.data);
// }
// })
// if (retParam) {
// retParam.bind(resultArray);
// }
// actionContext.bindLastReturnParam(resultArray);
// } else {
// throw new Error(`执行实体行为失败`);
// }
// } else {
// if (retParam) {
// retParam.bind([]);
// }
// actionContext.bindLastReturnParam([]);
// }
// }
// } catch (error: any) {
// throw new Error(`${error.message ? error.message : error.data?.message ? error.data.message : '执行实体行为失败'}`);
// }
// } else {
// throw new Error(`执行实体行为所需参数不足`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/debugparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 调试逻辑参数节点
*
* @export
* @class UILogicDebugParamNode
*/
export
class
UILogicDebugParamNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicDebugParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
handleDebugParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
?.
message
?
error
?.
message
:
'发生未知错误!'
}
`);
}
}
/**
* 处理调试逻辑参数
*
* @private
* @param {ILogicNode} logicNode
* @param {UIActionContext} actionContext
* @memberof UILogicDebugParamNode
*/
private handleDebugParam(logicNode: ILogicNode, actionContext: UIActionContext) {
// if (logicNode.getDstPSDEUILogicParam()) {
// const dstParamValue = actionContext.getParam(logicNode.getDstPSDEUILogicParam()?.codeName as string).getReal();
// actionContext.bindLastReturnParam(null);
// console.log(`
逻辑节点
$
{
logicNode
.
name
}
操作参数值
:
`, dstParamValue);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/dedataset-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
UIActionContext
}
from
"../uiaction-context"
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
/**
* 实体数据集节点
*
* @export
* @class UILogicDataSetNode
* @extends {AppUILogicNodeBase}
*/
export
class
UILogicDataSetNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @static
* @param {ILogicNode} logicNode 逻辑节点
* @param {ActionContext} actionContext 逻辑上下文
* @memberof UILogicDataSetNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
await
this
.
handleDataSet
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
?.
message
?
error
?.
message
:
'发生未知错误!'
}
`);
}
}
/**
* 处理实体数据集
*
* @private
* @param {ILogicNode} logicNode
* @param {ActionContext} actionContext
* @memberof UILogicDataSetNode
*/
private async handleDataSet(logicNode: ILogicNode, actionContext: UIActionContext) {
// const dstEntity = logicNode.getDstPSAppDataEntity();
// await dstEntity?.fill();
// const dstDataSet = logicNode.getDstPSAppDEDataSet();
// // 过滤器
// const dstParamModel = logicNode.getDstPSDEUILogicParam();
// const dstParam = actionContext.getParam(dstParamModel?.codeName as string);
// if (!dstParamModel || !Object.is(dstParam.logicParamType, UILogicParamType.filterParam)) {
// throw new Error(`
传入参数
$
{
dstParamModel
?.
codeName
}
类型不正确,必须为过滤器对象
`);
// }
// if (dstEntity && dstDataSet) {
// try {
// const service = await DataServiceHelp.getInstance().getService(dstEntity);
// const res = await service.execute(dstDataSet.codeName, actionContext.context, dstParam.getReal() ? dstParam.getReal() : {});
// if (res && res.ok && res.data) {
// // 返回值绑定逻辑参数对象
// if (logicNode.getRetPSDEUILogicParam()) {
// const retParam = actionContext.getParam(logicNode.getRetPSDEUILogicParam()?.codeName as string);
// retParam.bind(res.data);
// }
// actionContext.bindLastReturnParam(res.data);
// } else {
// throw new Error(`
查询实体数据集失败
`);
// }
// } catch (error: any) {
// throw new Error(`
$
{
error
.
message
?
error
.
message
:
error
.
data
?.
message
?
error
.
data
.
message
:
'查询实体数据集失败'
}
`);
// }
// } else {
// throw new Error(`
查询实体数据集参数不足
`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/delogic-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 实体处理逻辑节点
*
* @export
* @class UILogicNodeBase
*/
export
class
UILogicDeLogicNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicDeLogicNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
await
this
.
handleDELogic
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
?.
message
?
error
?.
message
:
'发生未知错误!'
}
`);
}
}
/**
* 处理实体处理逻辑
*
* @private
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicDeLogicNode
*/
private async handleDELogic(logicNode: ILogicNode, actionContext: UIActionContext) {
// const dstEntity = logicNode.getDstPSAppDataEntity();
// const deLogicCodeName = logicNode.getDstPSAppDELogic()?.codeName;
// const dstParam = actionContext.getParam((logicNode.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// const retParam = actionContext.getParam((logicNode.getRetPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// if (dstEntity && dstParam && deLogicCodeName) {
// try {
// const service = await DataServiceHelp.getInstance().getService(dstEntity);
// const result = await service['executeAppDELogic'](deLogicCodeName, actionContext.context, dstParam.getReal() ? dstParam.getReal() : {});
// if (result) {
// if(retParam){
// retParam.bind(result);
// }
// actionContext.bindLastReturnParam(result);
// return retParam;
// } else {
// throw new Error(`
调用实体处理逻辑异常
`);
// }
// } catch (error: any) {
// throw new Error(`
调用实体处理逻辑异常
$
{
error
?.
message
?
error
.
message
:
''
}
`);
// }
// } else {
// throw new Error(`
调用实体处理逻辑参数不足
`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/deuiaction-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 实体界面行为调用节点
*
* @export
* @class AppUILogicDeUIActionNode
*/
export
class
UILogicDeUIActionNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof AppUILogicDeUIActionNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
await
this
.
handleDEUIAction
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
)
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理界面行为
*
* @private
* @param {ILogicNode} logicNode
* @param {UIActionContext} actionContext
* @memberof AppUILogicDeUIActionNode
*/
private
async
handleDEUIAction
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// const data = actionContext.defaultParam.getReal();
// const { context, viewparams } = actionContext;
// const additionalParam = actionContext.additionalParam;
// const dstEntity = logicNode.getDstPSAppDataEntity();
// const dstUIAction = await getDstPSAppDEUIAction(logicNode);
// if (dstEntity && dstUIAction) {
// try {
// const targetUIService = await UIServiceHelp.getInstance().getService(dstEntity,{context});
// await targetUIService.loaded();
// const result = await targetUIService.excuteAction(
// dstUIAction.uIActionTag,
// [data],
// context,
// viewparams,
// additionalParam?.$event,
// actionContext.getParam(actionContext.activeCtrlParamName).getReal(),
// actionContext.getParam(actionContext.activeContainerParamName).getReal(),
// additionalParam?.parentDeName,
// );
// const dstParam = actionContext.getParam((logicNode.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// if (result && result.ok && result.result) {
// dstParam.bind(Array.isArray(result?.result) ? result.result[0] : result.result);
// actionContext.bindLastReturnParam(Array.isArray(result?.result) ? result.result[0] : result.result);
// }
// return dstParam;
// } catch (error: any) {
// throw new Error(`调用实体行为异常${error?.message ? error.message : ''}`);
// }
// } else {
// throw new Error(`调用界面行为参数不足`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/end-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
LogicReturnType
}
from
"@/logic/const/logic-return-type"
;
import
{
UIActionContext
}
from
"../uiaction-context"
;
import
{
UILogicNodeBase
}
from
"./logic-node-base"
;
/**
* 结束节点
*
* @export
* @class EndNode
*/
export
class
UILogicEndNode
extends
UILogicNodeBase
{
/**
* 执行节点
*
* @param {ILogicNode} logicNode
* @param {UIActionContext} actionContext
* @return {*}
* @memberof EndNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
handleEndNode
(
logicNode
,
actionContext
);
console
.
log
(
`已完成执行
${
logicNode
?.
name
}
节点,操作参数数据如下
:
`);
if (actionContext.paramsMap && (actionContext.paramsMap.size > 0)) {
for (let [key, value] of actionContext.paramsMap) {
console.log(`
$
{
key
}
:`
,
value
.
getReal
());
}
}
return
{
nextNodes
:
[],
actionContext
};
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理结束节点
*
* @private
* @param {IPSDEEndLogic} logicNode
* @param {UIActionContext} actionContext
* @memberof EndNode
*/
private
handleEndNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
const
strReturnType
:
string
=
logicNode
.
returnType
as
string
;
if
(
Object
.
is
(
strReturnType
,
LogicReturnType
.
NONEVALUE
)
||
Object
.
is
(
strReturnType
,
LogicReturnType
.
NULLVALUE
))
{
actionContext
.
setResult
(
null
);
}
else
if
(
Object
.
is
(
strReturnType
,
LogicReturnType
.
SRCVALUE
))
{
actionContext
.
setResult
(
logicNode
.
returnRawValue
);
}
else
if
(
Object
.
is
(
strReturnType
,
LogicReturnType
.
BREAK
))
{
actionContext
.
setResult
(
LogicReturnType
.
BREAK
);
}
else
if
(
Object
.
is
(
strReturnType
,
LogicReturnType
.
LOGICPARAM
)
||
Object
.
is
(
strReturnType
,
LogicReturnType
.
LOGICPARAMFIELD
))
{
const
returnParam
=
actionContext
.
getParam
(
logicNode
.
returnParam
as
string
);
if
(
Object
.
is
(
strReturnType
,
LogicReturnType
.
LOGICPARAM
))
{
actionContext
.
setResult
(
returnParam
.
getReal
());
}
else
{
actionContext
.
setResult
(
returnParam
.
get
(
logicNode
.
dstFieldName
));
}
}
else
{
throw
new
Error
(
`无法识别的返回值类型
${
strReturnType
}
`
);
}
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/index.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
export
{
UILogicAppendParamNode
}
from
'./appendparam-node'
;
export
{
UILogicBeginNode
}
from
'./begin-node'
;
export
{
UILogicBindParamNode
}
from
'./bindparam-node'
;
export
{
UILogicCopyParamNode
}
from
'./copyparam-node'
;
export
{
UILogicDeActionNode
}
from
'./deaction-node'
;
export
{
UILogicDebugParamNode
}
from
'./debugparam-node'
;
export
{
UILogicDataSetNode
}
from
'./dedataset-node'
;
export
{
UILogicDeLogicNode
}
from
'./delogic-node'
;
export
{
UILogicDeUIActionNode
}
from
'./deuiaction-node'
;
export
{
UILogicEndNode
}
from
'./end-node'
;
export
{
UILogicNodeBase
}
from
'./logic-node-base'
;
export
{
UILogicMsgboxNode
}
from
'./msgbox-node'
;
export
{
UILogicPluginNode
}
from
'./plugin-node'
;
export
{
UILogicPrepareParamNode
}
from
'./prepareparam-node'
;
export
{
UILogicRawCodeNode
}
from
'./rawcode-node'
;
export
{
UILogicReNewParamNode
}
from
'./renewparam-node'
;
export
{
UILogicResetParamNode
}
from
'./resetparam-node'
;
export
{
UILogicSortParamNode
}
from
'./sortparam-node'
;
export
{
UILogicThrowExceptionNode
}
from
'./throw-exception-node'
;
export
{
UILogicViewctrlFireEventNode
}
from
'./viewctrl-fire-event'
;
export
{
UILogicViewctrlInvokeNode
}
from
'./viewctrl-invoke-node'
;
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/logic-node-base.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
"@/interface/logic"
;
import
{
Util
,
Verify
}
from
"@/utils"
;
import
{
UIActionContext
}
from
"../uiaction-context"
;
/**
* 处理逻辑节点基类
*
* @export
* @class UILogicNodeBase
*/
export
class
UILogicNodeBase
{
constructor
()
{}
/**
* 根据处理链接计算后续逻辑节点
*
* @param {*} logicNode
* @param {UIActionContext} actionContext
* @return {*}
* @memberof LogicNodeBase
*/
public
computeNextNodes
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
console
.
log
(
`已完成执行
${
logicNode
?.
name
}
节点,操作参数数据如下
:
`)
if (actionContext.paramsMap && (actionContext.paramsMap.size > 0)) {
for (let [key, value] of actionContext.paramsMap) {
console.log(`
$
{
key
}
:`
,
Util
.
deepCopy
(
value
.
getReal
()));
}
}
let
result
:
any
=
{
nextNodes
:
[],
actionContext
};
if
(
logicNode
&&
logicNode
.
logicLinks
&&
logicNode
.
logicLinks
.
length
>
0
)
{
for
(
let
logicLink
of
logicNode
.
logicLinks
)
{
let
nextNode
=
logicLink
.
dstLogicNode
;
// 没有连接条件组或有条件组且满足条件组时执行下一个节点
if
(
!
logicLink
.
dstLogicNode
||
this
.
computeCond
(
logicLink
.
linkGroupCond
||
[],
actionContext
))
{
// console.log(`即将执行${nextNode?}节点`);
console
.
log
(
'执行下一节点'
);
result
.
nextNodes
.
push
(
nextNode
);
}
}
}
return
result
;
}
/**
* 计算是否通过逻辑连接
*
* @param {} logicLinkCond
* @return {*}
* @memberof UILogicNodeBase
*/
public
computeCond
(
logicLinkCond
:
any
,
actionContext
:
UIActionContext
):
any
{
if
(
logicLinkCond
.
logicType
==
'GROUP'
)
{
const
logicLinkGroupCond
=
logicLinkCond
const
childConds
:
any
=
logicLinkGroupCond
.
getPSDELogicLinkConds
();
if
(
childConds
?.
length
>
0
)
{
// return Verify.logicForEach(
// childConds,
// (item: any) => {
// return this.computeCond(item, actionContext);
// },
// logicLinkGroupCond.groupOP,
// !!logicLinkGroupCond.notMode,
// );
}
}
else
{
if
(
logicLinkCond
.
logicType
==
'SINGLE'
)
{
const
logicLinkSingleCond
=
logicLinkCond
let
dstValue
=
actionContext
.
getParam
(
logicLinkSingleCond
?.
getDstLogicParam
?.()?.
codeName
as
string
);
if
(
logicLinkSingleCond
.
dstFieldName
)
{
dstValue
=
dstValue
.
get
(
logicLinkSingleCond
.
dstFieldName
.
toLowerCase
());
}
let
targetValue
;
if
(
logicLinkSingleCond
.
paramType
)
{
switch
(
logicLinkSingleCond
.
paramType
)
{
case
'CURTIME'
:
targetValue
=
Util
.
dateFormat
(
new
Date
(),
'YYYY-MM-DD'
);
break
;
default
:
targetValue
=
logicLinkSingleCond
.
paramValue
;
}
}
else
{
targetValue
=
logicLinkSingleCond
.
paramValue
;
}
return
Verify
.
testCond
(
dstValue
,
logicLinkSingleCond
.
condOP
,
targetValue
)
}
}
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/msgbox-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
Subject
}
from
'rxjs'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 消息弹窗节点
*
* @export
* @class UILogicMsgboxNode
*/
export
class
UILogicMsgboxNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicMsgboxNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
// return new Promise<void>((resolve) => {
// let msgBoxParam: any = actionContext.getParam((logicNode.getMsgBoxParam() as IPSDEUILogicParam)?.codeName);
// const data = msgBoxParam?.getReal();
// const options = {
// type: logicNode.msgBoxType?.toLowerCase(),
// title: data?.title ? data.title : logicNode.title ? eval('`' + logicNode.title + '`') : '消息',
// content: data?.message ? data.message : logicNode.message ? eval('`' + logicNode.message + '`') : '',
// buttonType: logicNode.buttonsType?.toLowerCase(),
// showMode: logicNode.showMode?.toLowerCase(),
// showClose: false,
// mask: true,
// maskClosable: true
// };
// const subject: Subject<any> | null = AppMessageBoxService.getInstance().open(options);
// const subscription = subject?.subscribe((result: any) => {
// resolve(this.handleResponse(logicNode, actionContext, options, result));
// subscription!.unsubscribe();
// subject.complete();
// })
// });
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理响应
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @param {string} result 响应结果
* @memberof UILogicMsgboxNode
*/
public
handleResponse
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
,
options
:
any
,
result
:
string
)
{
// const { buttonsType } = logicNode;
// if (!Object.is(buttonsType, 'YESNO') && !Object.is(buttonsType, 'YESNOCANCEL') && !Object.is(buttonsType, 'OK') && !Object.is(buttonsType, 'OKCANCEL')) {
// throw new Error(`${buttonsType}未实现`);
// }
// let msgBoxParam: any = actionContext.getParam((logicNode.getMsgBoxParam() as IPSDEUILogicParam)?.codeName);
// if (msgBoxParam){
// msgBoxParam.bind(result);
// }
// actionContext.bindLastReturnParam(result);
// return this.computeNextNodes(logicNode, actionContext);
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/plugin-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 前端扩展插件调用节点
*
* @export
* @class UILogicPluginNode
*/
export
class
UILogicPluginNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicPluginNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}
前端扩展插件类型暂未实现!`
);
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/prepareparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
此差异已折叠。
点击以展开。
app_Web/src/logic/ui-logic/logic-node/rawcode-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 直接前台代码节点
*
* @export
* @class UILogicRawCodeNode
*/
export
class
UILogicRawCodeNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicRawCodeNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
handleRawCode
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处置直接执行代码
*
* @private
* @param {ILogicNode} logicNode
* @param {UIActionContext} actionContext
* @memberof UILogicRawCodeNode
*/
private
handleRawCode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// let data: any = actionContext.defaultParam.getReal();
// let { context } = actionContext;
// if (logicNode && logicNode.code) {
// eval(logicNode?.code);
// } else {
// throw new Error('无代码片段');
// }
// actionContext.bindLastReturnParam(null);
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/renewparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 重新建立参数节点
*
* @export
* @class UILogicReNewParamNode
*/
export
class
UILogicReNewParamNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicReNewParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
onRenewParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理参数
*
* @param {ILogicNode} logicNode 节点模型数据
* @param {UIActionContext} actionContext 逻辑上下文
* @memberof UILogicReNewParamNode
*/
public
onRenewParam
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// if (!logicNode || !logicNode.getDstPSDEUILogicParam()) {
// throw new Error(`操作参数缺失!`);
// }
// try {
// // 目标数据
// const dstParam: any = actionContext.getParam((logicNode.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// dstParam.renew();
// actionContext.bindLastReturnParam(null);
// } catch (error: any) {
// throw new Error(`逻辑参数${logicNode.getDstPSDEUILogicParam()?.name}${error && error.message ? error.message : '发生未知错误!'}`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/resetparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 重置参数节点
*
* @export
* @class UILogicResetParamNode
*/
export
class
UILogicResetParamNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicResetParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
onResetParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理参数
*
* @param {IPSDELogicNode} logicNode 节点模型数据
* @param {ActionContext} actionContext 逻辑上下文
* @memberof UILogicResetParamNode
*/
public
onResetParam
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// if (!logicNode || !logicNode.getDstPSDEUILogicParam()) {
// throw new Error(`操作参数缺失!`);
// }
// try {
// // 目标数据
// const dstParam: any = actionContext.getParam((logicNode.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// dstParam.resetAll();
// actionContext.bindLastReturnParam(null);
// } catch (error: any) {
// throw new Error(`逻辑参数${logicNode.getDstPSDEUILogicParam()?.name}${error && error.message ? error.message : '发生未知错误!'}`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/sortparam-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 排序数组参数节点
*
* @export
* @class UILogicSortParamNode
*/
export
class
UILogicSortParamNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicSortParamNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
this
.
onSortParam
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 排序数组变量
*
* @param {ILogicNode} logicNodeParam
* @param {UIActionContext} actionContext
* @memberof UILogicPrepareParamNode
*/
public
onSortParam
(
logicNodeParam
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// // 目标数据
// const dstParam: any = actionContext.getParam((logicNodeParam.getDstPSDEUILogicParam() as IPSDEUILogicParam)?.codeName);
// // 目标属性
// const dstFieldName: string = logicNodeParam.dstFieldName?.toLowerCase?.();
// if (!dstFieldName) {
// throw new Error(`逻辑参数${logicNodeParam.name}未指定设置排序属性`);
// }
// dstParam.sort(dstFieldName, logicNodeParam.dstSortDir);
// actionContext.bindLastReturnParam(null);
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/throw-exception-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 抛出异常节点
*
* @export
* @class UILogicThrowExceptionNode
*/
export
class
UILogicThrowExceptionNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicThrowExceptionNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// actionContext.actionContainer.$throw(logicNode.errorInfo);
// actionContext.bindLastReturnParam(null);
// console.log(`已完成执行${logicNode?.name}节点,操作参数数据如下:`);
// if (actionContext.paramsMap && (actionContext.paramsMap.size > 0)) {
// for (let [key, value] of actionContext.paramsMap) {
// console.log(`${key}:`, value.getReal());
// }
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/viewctrl-fire-event.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 视图部件事件触发节点
*
* @export
* @class UILogicViewctrlFireEventNode
*/
export
class
UILogicViewctrlFireEventNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicViewctrlFireEventNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
await
this
.
handleViewCtrFireEvent
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理视图部件触发事件
*
* @private
* @param {ILogicNode} logicNode
* @param {UIActionContext} actionContext
* @memberof UILogicViewctrlFireEventNode
*/
private
async
handleViewCtrFireEvent
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// // 事件名称
// const eventName = logicNode.eventName;
// // 事件参数
// const eventParam = logicNode.getEventParam();
// // 触发对象
// const fireCtrl = logicNode.getFireCtrl();
// if (!eventName || !eventParam || !fireCtrl) {
// throw new Error(`触发对象、事件名称或者事件参数缺失`);
// }
// // 触发UI对象
// const fireUICtrl = actionContext.getParam(fireCtrl.codeName).getReal();
// // 事件参数
// const eventArgs = actionContext.getParam(eventParam.codeName).getReal();
// if (!fireUICtrl) {
// throw new Error(`获取触发对象异常`);
// }
// try {
// // 自身触发
// fireUICtrl.$emit(eventName, eventArgs);
// // 如果是部件,需向视图抛出
// if (fireUICtrl.controlInstance) {
// fireUICtrl.ctrlEvent({
// controlname: fireUICtrl.controlInstance.name,
// action: eventName,
// data: eventArgs
// })
// }
// // 如果是视图,需向外抛出
// if (fireUICtrl.viewInstance) {
// fireUICtrl.$emit('view-event', { viewName: fireUICtrl.viewCodeName, action: eventName, data: eventArgs });
// }
// actionContext.bindLastReturnParam(null);
// } catch (error:any) {
// throw new Error(`视图部件事件触发未执行成功!`);
// }
}
}
\ No newline at end of file
app_Web/src/logic/ui-logic/logic-node/viewctrl-invoke-node.ts
已删除
100644 → 0
浏览文件 @
1a6396d9
import
{
ILogicNode
}
from
'@/interface/logic'
;
import
{
UIActionContext
}
from
'../uiaction-context'
;
import
{
UILogicNodeBase
}
from
'./logic-node-base'
;
/**
* 视图部件调用节点
*
* @export
* @class UILogicViewctrlInvokeNode
*/
export
class
UILogicViewctrlInvokeNode
extends
UILogicNodeBase
{
constructor
()
{
super
();
}
/**
* 执行节点
*
* @param {ILogicNode} logicNode 逻辑节点模型数据
* @param {UIActionContext} actionContext 界面逻辑上下文
* @memberof UILogicViewctrlInvokeNode
*/
public
async
executeNode
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
try
{
await
this
.
handleViewCtrlInvoke
(
logicNode
,
actionContext
);
return
this
.
computeNextNodes
(
logicNode
,
actionContext
);
}
catch
(
error
:
any
)
{
throw
new
Error
(
`逻辑节点
${
logicNode
.
name
}${
error
&&
error
.
message
?
error
.
message
:
'发生未知错误!'
}
`
);
}
}
/**
* 处理视图部件调用
*
* @private
* @param {ILogicNode} logicNode
* @param {UIActionContext} actionContext
* @memberof UILogicViewctrlInvokeNode
*/
private
async
handleViewCtrlInvoke
(
logicNode
:
ILogicNode
,
actionContext
:
UIActionContext
)
{
// const invokeCtrl = logicNode.getInvokeCtrl()?.codeName;
// const invokeMethod = logicNode.invokeMethod;
// const invokeParam = logicNode.getInvokeParam()?.codeName;
// 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}方法发生异常`);
// }
// } else {
// throw new Error(`${invokeCtrl}界面对象不存在${invokeMethod}方法`);
// }
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录