@mldong/jeeflow 1.8.6 → 1.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.d.ts +4 -0
- package/dist/engine.js +8 -2
- package/dist/facade.js +3 -3
- package/package.json +1 -1
package/dist/engine.d.ts
CHANGED
|
@@ -55,3 +55,7 @@ export declare class EngineImpl implements Engine {
|
|
|
55
55
|
private addUserInfo;
|
|
56
56
|
private nextId;
|
|
57
57
|
}
|
|
58
|
+
/** 会签判定(issue 42,对齐 Java ProcessTaskPerformTypeEnum.codeOf):
|
|
59
|
+
* '1' / 'ALL' / 'COUNTERSIGN'(大小写不敏感)→ 会签。
|
|
60
|
+
* 设计器属性面板保存 'ALL' 字符串符合 Java 契约,引擎必须兼容 */
|
|
61
|
+
export declare function isCountersign(v: any): boolean;
|
package/dist/engine.js
CHANGED
|
@@ -356,11 +356,10 @@ export class EngineImpl {
|
|
|
356
356
|
const actors = await this.resolveActors(node, inst, operator, vars);
|
|
357
357
|
if (!actors.length)
|
|
358
358
|
return;
|
|
359
|
-
const performType = parseInt(String(node.properties?.performType ?? '0'));
|
|
360
359
|
const ct = node.properties?.countersignType;
|
|
361
360
|
const now = new Date();
|
|
362
361
|
const form = node.properties?.form ?? '';
|
|
363
|
-
if (performType
|
|
362
|
+
if (isCountersign(node.properties?.performType) && ct) {
|
|
364
363
|
switch (ct) {
|
|
365
364
|
case 'PARALLEL':
|
|
366
365
|
for (const actor of actors)
|
|
@@ -513,6 +512,13 @@ function isTruthy(v) {
|
|
|
513
512
|
return v !== 0;
|
|
514
513
|
return v != null;
|
|
515
514
|
}
|
|
515
|
+
/** 会签判定(issue 42,对齐 Java ProcessTaskPerformTypeEnum.codeOf):
|
|
516
|
+
* '1' / 'ALL' / 'COUNTERSIGN'(大小写不敏感)→ 会签。
|
|
517
|
+
* 设计器属性面板保存 'ALL' 字符串符合 Java 契约,引擎必须兼容 */
|
|
518
|
+
export function isCountersign(v) {
|
|
519
|
+
const s = String(v ?? '').trim().toUpperCase();
|
|
520
|
+
return s === '1' || s === 'ALL' || s === 'COUNTERSIGN';
|
|
521
|
+
}
|
|
516
522
|
/** 办理提交的 f_ 字段按任务节点 field 权限过滤(issues/26)——
|
|
517
523
|
* 任务节点 properties.field 声明 PERMISSION_f_{全名}(前端约定,优先)或
|
|
518
524
|
* PERMISSION_{去前缀名}(兼容)的字段,值非 EDIT(2)(只读 1/隐藏 3 等)→ 剔除不入变量。
|
package/dist/facade.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// action(boot2/boot3 端点短名)路由。返回统一结构 {code, msg, data}
|
|
5
5
|
// (code=0 成功 / 99999999 失败)。操作人约定:args.operator 显式传入。
|
|
6
6
|
import { TaskState, } from './model.js';
|
|
7
|
-
import { KeyNextNodeOperator, KeyProcessStartNextNodeOperator } from './engine.js';
|
|
7
|
+
import { KeyNextNodeOperator, KeyProcessStartNextNodeOperator, isCountersign } from './engine.js';
|
|
8
8
|
// submitType 枚举(对齐 boot3)
|
|
9
9
|
const SUBMIT_APPLY = 0;
|
|
10
10
|
const SUBMIT_AGREE = 1;
|
|
@@ -640,7 +640,7 @@ export class JeeflowFacade {
|
|
|
640
640
|
const node = (flow.nodes ?? []).find((n) => n.id === name);
|
|
641
641
|
// 会签判定:定义节点属性(引擎创建任务时 performType 未落任务表,取模型为准)
|
|
642
642
|
const nodeProps = node?.properties ?? {};
|
|
643
|
-
const
|
|
643
|
+
const isCs = isCountersign(nodeProps.performType) || nodeProps.countersignType != null;
|
|
644
644
|
const item = {
|
|
645
645
|
members: members.map((id) => {
|
|
646
646
|
const m = { id, name: '' };
|
|
@@ -651,7 +651,7 @@ export class JeeflowFacade {
|
|
|
651
651
|
return m;
|
|
652
652
|
}),
|
|
653
653
|
};
|
|
654
|
-
if (
|
|
654
|
+
if (isCs && nodeProps.countersignType) {
|
|
655
655
|
item.type = nodeProps.countersignType;
|
|
656
656
|
}
|
|
657
657
|
progress[name] = item;
|