- ExprEvalModal:内置变量条 submitterId 改显真实 id(原用 submitterName 冒充,用户照抄进
样例 JSON 会填错类型);可用变量 chips 区分内置变量(灰底,对齐原型 .chip.bt)并让手动模式
同样提供内置键(原型 S5「内置变量同款可插」);chips 去重,避免 formData 键与内置键同名重复。
- Defs:分组视图空 flowGuid 行不再被整体丢弃,各自单列一行;openMap 改用合成 key(__noguid__{id})
防止与其他行共用 "" 键互相牵连;GUID 列空值显示「—」。
- 验证:npm run build 通过(1m16s,产物含 Defs / ExprEvalModal chunk);
npx tsc --noEmit 48 条与既有基线完全一致、本次改动文件 0 条。
来源:流程中心改造-验收审计报告-B2-B6-20261012.md §三.3c / §三.5
This commit is contained in:
@@ -121,30 +121,45 @@ async function loadInflight() {
|
||||
}
|
||||
}
|
||||
|
||||
/** 分组行(议题二②):同 flowGuid 折叠一行,代表行=已发布中最高版;无已发布取最高版并标「无生效版」 */
|
||||
/** 分组行(议题二②):同 flowGuid 折叠一行,代表行=已发布中最高版;无已发布取最高版并标「无生效版」。
|
||||
* 空 flowGuid(历史脏数据)无流程线可折叠,各自单列为一行,避免被整体丢弃。 */
|
||||
const groups = computed(() => {
|
||||
const bucket: Record<string, any[]> = {};
|
||||
const order: string[] = [];
|
||||
const noGuid: any[] = [];
|
||||
rows.value.forEach((r: any) => {
|
||||
const g = r.flowGuid || "";
|
||||
if (!g) return;
|
||||
if (!g) {
|
||||
noGuid.push(r);
|
||||
return;
|
||||
}
|
||||
if (!bucket[g]) {
|
||||
bucket[g] = [];
|
||||
order.push(g);
|
||||
}
|
||||
bucket[g].push(r);
|
||||
});
|
||||
return order.map((g) => {
|
||||
const out = order.map((g) => {
|
||||
const vs = bucket[g].slice().sort((a: any, b: any) => b.version - a.version);
|
||||
const published = vs.filter((v: any) => v.status === 1);
|
||||
const cur = published[0] || vs[0];
|
||||
return {
|
||||
flowGuid: g, id: cur.id, name: cur.name, code: cur.code, appKey: cur.appKey,
|
||||
_key: g, flowGuid: g, id: cur.id, name: cur.name, code: cur.code, appKey: cur.appKey,
|
||||
version: cur.version, status: cur.status, publishTime: cur.publishTime,
|
||||
total: vs.length, hasPublished: published.length > 0,
|
||||
versions: vs, _expanded: !!openMap.value[g],
|
||||
};
|
||||
});
|
||||
// 空 flowGuid 兜底:openMap 用合成 key,避免与其他行共用 "" 键互相牵连
|
||||
noGuid.forEach((r: any) => {
|
||||
const k = `__noguid__${r.id}`;
|
||||
out.push({
|
||||
_key: k, flowGuid: "", id: r.id, name: r.name, code: r.code, appKey: r.appKey,
|
||||
version: r.version, status: r.status, publishTime: r.publishTime,
|
||||
total: 1, hasPublished: r.status === 1, versions: [r], _expanded: !!openMap.value[k],
|
||||
});
|
||||
});
|
||||
return out;
|
||||
});
|
||||
|
||||
/** 展开行:该流程线全部版本明细(行对象即 FlwDef,操作复用 rowActions)。
|
||||
@@ -178,7 +193,9 @@ const groupColumns = [
|
||||
{ title: "应用", key: "appKey", width: 130, align: "center", render: renderApp },
|
||||
{ title: "版本", width: 120, render: (h: any, p: any) => h("span", `v${p.row.version} · 共 ${p.row.total} 版`) },
|
||||
{ title: "状态", width: 90, align: "center", render: renderStatus },
|
||||
{ title: "GUID", width: 130, render: (h: any, p: any) => h("span", { title: p.row.flowGuid }, `${String(p.row.flowGuid).slice(0, 8)}…`) },
|
||||
{ title: "GUID", width: 130, render: (h: any, p: any) => (p.row.flowGuid
|
||||
? h("span", { title: p.row.flowGuid }, `${String(p.row.flowGuid).slice(0, 8)}…`)
|
||||
: h("span", { style: "color:#999" }, "—")) },
|
||||
{ title: "发布时间", width: 160, render: (h: any, p: any) => h("span", fmtTime(p.row.publishTime)) },
|
||||
actionColumn(
|
||||
[
|
||||
@@ -191,8 +208,8 @@ const groupColumns = [
|
||||
|
||||
/** 分组态点行展开/收起(展开箭头同一路径:箭头内部态会被下一帧的 _expanded 重新校准) */
|
||||
function onGroupRowClick(row: any) {
|
||||
if (row && row.flowGuid) {
|
||||
openMap.value[row.flowGuid] = !openMap.value[row.flowGuid];
|
||||
if (row && row._key) {
|
||||
openMap.value[row._key] = !openMap.value[row._key];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user