weaver-work-cli 0.1.33 → 0.1.36
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/chunks/{archive-FVFY6GZN.js → archive-XBVH7JU7.js} +2 -2
- package/dist/chunks/{archive-oa-NW3OD4UV.js → archive-oa-MZM3EKFQ.js} +2 -2
- package/dist/chunks/{asset-7QJKMIDV.js → asset-4XO7UOUW.js} +2 -2
- package/dist/chunks/{attachment-content-OSAVA6K3.js → attachment-content-VXSWANAC.js} +3 -3
- package/dist/chunks/{blog-I7SDPNW4.js → blog-PGZKOPSC.js} +2 -2
- package/dist/chunks/{caizhilian-O37ZIQNY.js → caizhilian-BH4ZVGUN.js} +2 -2
- package/dist/chunks/{calendar-7KXE4ED3.js → calendar-MXEMTIO4.js} +2 -2
- package/dist/chunks/{chunk-VBCFFFGT.js → chunk-5DQEEGCC.js} +4 -1
- package/dist/chunks/{chunk-KAS45KNR.js → chunk-6LLJFKJE.js} +1 -1
- package/dist/chunks/{chunk-HEL5XTYI.js → chunk-BPE37FPB.js} +26 -4
- package/dist/chunks/{chunk-IHUYP6LO.js → chunk-F746NKNF.js} +1 -1
- package/dist/chunks/{chunk-MQ2I5AA3.js → chunk-HXJQI5NM.js} +2 -2
- package/dist/chunks/{chunk-ILMBNVSG.js → chunk-I6QGIBDM.js} +2 -2
- package/dist/chunks/{chunk-EEWPQE3O.js → chunk-JCSN3JGM.js} +2 -2
- package/dist/chunks/{chunk-D223PTXU.js → chunk-JNG42JKG.js} +29 -1
- package/dist/chunks/{chunk-6ATGWRZM.js → chunk-JUXVYKII.js} +4 -1
- package/dist/chunks/{chunk-GFPXQIY2.js → chunk-JYKABYCV.js} +2 -2
- package/dist/chunks/{chunk-Q6LWB5HX.js → chunk-NCOVUAZK.js} +2 -2
- package/dist/chunks/{chunk-WY74UBJ6.js → chunk-QHFANTX7.js} +900 -204
- package/dist/chunks/{chunk-WRRJ4GG2.js → chunk-QYGO5EE2.js} +2 -2
- package/dist/chunks/{chunk-RBGOMK4Y.js → chunk-T72N74ZT.js} +2 -2
- package/dist/chunks/{chunk-MEEFGWTM.js → chunk-TC6MZAO3.js} +84 -9
- package/dist/chunks/{chunk-OCU4RLHC.js → chunk-VPUTVEMC.js} +98 -34
- package/dist/chunks/{chunk-PRHJGPMA.js → chunk-VPXOPQJI.js} +2 -2
- package/dist/chunks/{chunk-NHA62QD7.js → chunk-WXFPWCXG.js} +3 -3
- package/dist/chunks/{chunk-2FLWXFVS.js → chunk-XMGSYD6S.js} +4 -4
- package/dist/chunks/{conflict-SFNEVJY5.js → conflict-JAB2LJEZ.js} +2 -2
- package/dist/chunks/contract-XI2EEIZU.js +9110 -0
- package/dist/chunks/{cowork-CKWYHXYB.js → cowork-SCPGLBA4.js} +44 -25
- package/dist/chunks/{ebuilder-form-KOLJRVZD.js → ebuilder-form-EYLHNOTA.js} +3 -3
- package/dist/chunks/{ehr-WFOC3B4D.js → ehr-EAP77IMT.js} +172 -9
- package/dist/chunks/{esb-LJZTN663.js → esb-2TGGXEE7.js} +4 -4
- package/dist/chunks/{fna-F7QRIIZC.js → fna-2X7ZE7BU.js} +13 -8
- package/dist/chunks/{host-VQ6JJXGQ.js → host-C6EL2RKL.js} +3 -3
- package/dist/chunks/{host-BCGUVEWX.js → host-I4NRK4MX.js} +3 -3
- package/dist/chunks/{host-DGE2TZD4.js → host-Q4LZGCRU.js} +3 -3
- package/dist/chunks/{host-BQBRHVR3.js → host-UEI5FGDM.js} +3 -3
- package/dist/chunks/{host-KXPTEWFS.js → host-XCLDDXKQ.js} +3 -3
- package/dist/chunks/{hrm-NI6XAKW5.js → hrm-YXERJM76.js} +3 -3
- package/dist/chunks/{im-7TRTF3KT.js → im-A4VZN2TQ.js} +3 -3
- package/dist/chunks/{invoice-AOXWJKYT.js → invoice-2Z6YPMIS.js} +3 -3
- package/dist/chunks/{jiuchuanhui-7NQWEZAW.js → jiuchuanhui-AR5GMKZB.js} +2 -2
- package/dist/chunks/{lazy-dispatch-RNS4EE4S.js → lazy-dispatch-QXW7P4X3.js} +4 -4
- package/dist/chunks/{mail-VDHJAB4O.js → mail-7GZ6CPBJ.js} +44 -23
- package/dist/chunks/{meeting-GA7XCNNP.js → meeting-3NMGA3MB.js} +74 -10
- package/dist/chunks/{okr-TQIRERPQ.js → okr-BZ6XUOAG.js} +2 -2
- package/dist/chunks/{plan-4RY4LN2P.js → plan-DR5CMUYP.js} +2 -2
- package/dist/chunks/{project-D6XT2OC5.js → project-6J63MK33.js} +2 -2
- package/dist/chunks/{registry-JHRIDQ3A.js → registry-KDD7DHNK.js} +4 -4
- package/dist/chunks/{registry-VOGKFFTR.js → registry-TKX2E7C7.js} +2 -2
- package/dist/chunks/{registry-QKMI43Q6.js → registry-VRTNC6UR.js} +8 -8
- package/dist/chunks/{room-recommend-D4EUOOWY.js → room-recommend-XCWRMB5P.js} +4 -4
- package/dist/chunks/{schedule-XPFBHPCV.js → schedule-IVBICP32.js} +4 -4
- package/dist/chunks/{workflow-HLBZRWIY.js → workflow-D74NFK3C.js} +11 -4
- package/dist/index.js +31 -26
- package/dist/internal/e10/fetch-timing.js +31 -0
- package/dist/internal/e10/request-runtime.js +5 -0
- package/dist/shortcuts/cowork/host.js +8 -0
- package/dist/shortcuts/cowork/operations/types.js +17 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +35 -0
- package/dist/shortcuts/ehr/operations/recruit.js +147 -0
- package/dist/shortcuts/fna/operations/expense-chart.js +19 -7
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/mail/host.js +8 -0
- package/dist/shortcuts/mail/operations/types.js +17 -2
- package/dist/shortcuts/meeting/index.js +79 -1
- package/dist/shortcuts/meeting/manifest.js +10 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -0
- package/dist/shortcuts/meeting/operations/eb/conflict.js +6 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +1047 -134
- package/dist/shortcuts/meeting/operations/eb/factory.js +101 -7
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +36 -2
- package/dist/shortcuts/meeting/operations/eb-fallback.js +4 -0
- package/dist/shortcuts/meeting/operations/env.js +6 -0
- package/dist/shortcuts/meeting/operations/invitation.js +79 -20
- package/dist/shortcuts/workflow/endpoints.js +8 -3
- package/dist/shortcuts/workflow/operations/form.js +181 -34
- package/dist/shortcuts/workflow/operations.js +23 -1
- package/docs/ehr.md +1 -1
- package/docs/fna.md +2 -1
- package/package.json +1 -1
- package/skill-template/business-info.json +18 -0
- package/skill-template/domains/cowork.md +14 -0
- package/skills/weaver-e10-cowork/SKILL.md +101 -0
- package/skills/weaver-e10-cowork/references/cowork-read.md +90 -0
- package/skills/weaver-e10-cowork/references/cowork-write.md +131 -0
- package/skills/weaver-e10-cowork/references/safety-boundaries.md +45 -0
- package/skills/weaver-e10-jucailin/SKILL.md +21 -3
- package/skills/weaver-e10-jucailin/references/recruit-read.md +25 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +13 -0
- package/skills/weaver-e10-jucailin/references/salary.md +15 -11
- package/skills/weaver-e10-mail/SKILL.md +12 -9
- package/skills/weaver-e10-meeting/SKILL.md +284 -34
- package/skills/weaver-e10-meeting/references/meeting-eb.md +131 -0
- package/skills/weaver-e10-meeting/references/meeting-invitation.md +28 -2
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +5 -2
- package/skills/weaver-e10-qiyecheng/references/catalog.md +2 -2
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +15 -1
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +22 -21
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
createE10RequestRuntime,
|
|
11
11
|
requireE10Session
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JUXVYKII.js";
|
|
13
13
|
import {
|
|
14
14
|
getActiveProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JNG42JKG.js";
|
|
16
16
|
|
|
17
17
|
// src/shortcuts/ebuilder-form/host.ts
|
|
18
18
|
import { randomUUID } from "node:crypto";
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
E10ApiError,
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
requireE10Session
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JUXVYKII.js";
|
|
14
14
|
import {
|
|
15
15
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
16
16
|
getActiveProfile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JNG42JKG.js";
|
|
18
18
|
|
|
19
19
|
// src/shortcuts/im/host.ts
|
|
20
20
|
import { createHash } from "node:crypto";
|
|
@@ -774,6 +774,11 @@ var EB_ENDPOINTS = [
|
|
|
774
774
|
interfacePk: "query_meeting_room_list",
|
|
775
775
|
countPk: "query_meeting_room_count",
|
|
776
776
|
queryParams: ["manager", "departmentId", "mr_type", "room_attr"],
|
|
777
|
+
// 按 e-builder openApi 文档:这些是 `mainTable` 节点的传入字段,服务端据此过滤。
|
|
778
|
+
// ⚠️ 2026-10-30 实测(用户刚在后端把「会议室名称」配成传入字段后):
|
|
779
|
+
// 服务端是**精确匹配** —— room_name=测试会议室1 → 1 条;room_name=测试 / 重庆 → 0 条
|
|
780
|
+
// (全量里明明有「重庆会议室一/二」)。模糊由 factory 的 fallback 在本地兜底。
|
|
781
|
+
mainTableParams: ["room_name", "status", "place", "org_id", "hrm_ids"],
|
|
777
782
|
summarizeRows: summarizeRoomRows,
|
|
778
783
|
summary: "EB \u7248\u4F1A\u8BAE\u5BA4\u5217\u8868\uFF08query_meeting_room_list + count\uFF09\uFF1A\u81EA\u5E26 statusText \u4E0E\u72B6\u6001\u5B57\u5178",
|
|
779
784
|
emptyHint: 'EB \u4F1A\u8BAE\u5BA4\u8868\uFF08`uf_mt_room_base`\uFF09\u67E5\u4E0D\u5230\u4EFB\u4F55\u8BB0\u5F55\u3002\u53EF\u80FD\u662F\uFF1A\u2460 \u8BE5\u73AF\u5883\u786E\u5B9E\u8FD8\u6CA1\u5EFA\u8FC7\u4F1A\u8BAE\u5BA4\uFF1B\u2461 \u4F1A\u8BAE\u5E94\u7528\u7684\u300C\u4F1A\u8BAE\u5BA4\u5217\u8868\u300D\u63A5\u53E3/\u89C6\u56FE\u672A\u914D\u7F6E\u597D\uFF08`query_meeting_room_list` \u8BFB\u4E0D\u5230\u6570\u636E\uFF0C\u4F46\u8868\u91CC\u6709\u6570\u636E\uFF09\u3002**\u8FD9\u4E0D\u4EE3\u8868"\u73AF\u5883\u662F\u6807\u51C6\u7248"\u2014\u2014\u7EDD\u5BF9\u4E0D\u8981\u6539\u7528 `meeting.room.list`**\uFF1A\u90A3\u662F\u6807\u51C6\u7248\u4F1A\u8BAE\u5E94\u7528\u7684\u4F1A\u8BAE\u5BA4\uFF0C\u4E0E EB \u5B8C\u5168\u662F\u4E24\u5957\u6570\u636E\uFF0C\u62FF\u7ED9\u7528\u6237\u5C31\u662F\u51ED\u7A7A\u634F\u9020\u623F\u95F4\u3002\u8BF7\u5982\u5B9E\u544A\u8BC9\u7528\u6237"EB \u4F1A\u8BAE\u5BA4\u67E5\u4E0D\u5230"\uFF0C\u5E76\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u4F1A\u8BAE\u5E94\u7528\u7684\u4F1A\u8BAE\u5BA4\u914D\u7F6E\u3002',
|
|
@@ -1562,10 +1567,12 @@ async function verifyLease(args, action, env) {
|
|
|
1562
1567
|
function isNetworkError(error) {
|
|
1563
1568
|
return error instanceof Error && error.type === "network";
|
|
1564
1569
|
}
|
|
1565
|
-
function queryBody(userId, page) {
|
|
1570
|
+
function queryBody(userId, page, mainTable) {
|
|
1566
1571
|
return {
|
|
1567
1572
|
datajson: {
|
|
1568
|
-
mainTable
|
|
1573
|
+
// 传入字段即过滤条件(e-builder openApi 文档:getFormDataList 的传入字段挂 mainTable 节点)。
|
|
1574
|
+
// 空对象 = 不过滤。
|
|
1575
|
+
mainTable: mainTable ?? {},
|
|
1569
1576
|
// ⚠️ 分页必须放在 body 的 pageInfo 里(值为字符串):只放 URL query 时 EB 会忽略,
|
|
1570
1577
|
// 恒定返回首页 10 条(2026-09-21 真机暴露:pageSize=60 仍只回 10 条)。
|
|
1571
1578
|
...page ? { pageInfo: { pageNo: String(page.pageNo), pageSize: String(page.pageSize) } } : {},
|
|
@@ -1573,6 +1580,20 @@ function queryBody(userId, page) {
|
|
|
1573
1580
|
}
|
|
1574
1581
|
};
|
|
1575
1582
|
}
|
|
1583
|
+
function readFallbackMaxPages() {
|
|
1584
|
+
const raw = Number(process.env.WEAVER_MEETING_EB_FALLBACK_MAX_PAGES ?? "");
|
|
1585
|
+
if (Number.isFinite(raw) && raw >= 1) return Math.min(Math.floor(raw), 100);
|
|
1586
|
+
return 30;
|
|
1587
|
+
}
|
|
1588
|
+
function pickMainTableFilters(args, names) {
|
|
1589
|
+
const out = {};
|
|
1590
|
+
for (const name of names ?? []) {
|
|
1591
|
+
const value = args[name];
|
|
1592
|
+
if (value === void 0 || value === null || value === "") continue;
|
|
1593
|
+
out[name] = typeof value === "string" ? value : String(value);
|
|
1594
|
+
}
|
|
1595
|
+
return out;
|
|
1596
|
+
}
|
|
1576
1597
|
function detailBody(userId, id) {
|
|
1577
1598
|
return { datajson: { mainTable: { id }, header: { operator: userId } } };
|
|
1578
1599
|
}
|
|
@@ -1618,11 +1639,23 @@ function buildReadInputSchema(endpoint) {
|
|
|
1618
1639
|
for (const param of endpoint.queryParams ?? []) {
|
|
1619
1640
|
properties[param] = { type: "string", description: `EB \u7B5B\u9009\u53C2\u6570\uFF08URL \u5360\u4F4D\u7B26\u540D ${param}\uFF09` };
|
|
1620
1641
|
}
|
|
1642
|
+
for (const param of endpoint.mainTableParams ?? []) {
|
|
1643
|
+
properties[param] = {
|
|
1644
|
+
type: "string",
|
|
1645
|
+
description: `\u6309 ${param} \u8FC7\u6EE4\uFF08\u8D70 body datajson.mainTable\uFF0C\u670D\u52A1\u7AEF**\u7CBE\u786E\u5339\u914D**\uFF1B\u4F20\u90E8\u5206\u8BCD\u65F6\u670D\u52A1\u7AEF\u4F1A\u8FD4\u56DE 0 \u6761\uFF0CCLI \u4F1A\u81EA\u52A8\u7FFB\u9875\u626B\u5168\u91CF\u5E76\u6309\u300C\u5305\u542B\u300D\u91CD\u65B0\u7B5B\uFF0C\u7ED3\u679C\u4E00\u6837\u662F\u6A21\u7CCA\u7684\uFF09`
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1621
1648
|
properties.pageNo = { type: "integer", minimum: 1, description: "\u9875\u7801\uFF0C\u9ED8\u8BA4 1" };
|
|
1622
1649
|
properties.pageSize = { type: "integer", minimum: 1, maximum: 200, description: "\u6BCF\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 20" };
|
|
1623
1650
|
if (endpoint.countPk) {
|
|
1624
1651
|
properties.withCount = { type: "boolean", description: "\u662F\u5426\u5148\u67E5\u603B\u6570\uFF08\u9ED8\u8BA4 true\uFF0C\u6761\u4EF6\u4E0E\u5217\u8868\u4E00\u81F4\uFF09" };
|
|
1625
1652
|
}
|
|
1653
|
+
if ((endpoint.mainTableParams ?? []).length > 0) {
|
|
1654
|
+
properties.noFallback = {
|
|
1655
|
+
type: "boolean",
|
|
1656
|
+
description: "\u8DF3\u8FC7\u300C\u6A21\u7CCA\u515C\u5E95\u300D\uFF1A\u670D\u52A1\u7AEF\u7CBE\u786E\u5339\u914D\u4E0D\u5230\u65F6\uFF0C\u4E0D\u518D\u7FFB\u9875\u626B\u5168\u91CF\uFF08\u9ED8\u8BA4 false=\u4F1A\u626B\uFF0C\u4FDD\u8BC1\u90E8\u5206\u8BCD\u4E5F\u80FD\u67E5\u5230\uFF09"
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1626
1659
|
}
|
|
1627
1660
|
return {
|
|
1628
1661
|
type: "object",
|
|
@@ -1697,6 +1730,7 @@ function buildReadOperation(endpoint) {
|
|
|
1697
1730
|
}
|
|
1698
1731
|
const pageNo = typeof args.pageNo === "number" ? args.pageNo : 1;
|
|
1699
1732
|
const pageSize = typeof args.pageSize === "number" ? args.pageSize : 20;
|
|
1733
|
+
const mainTableFilters = pickMainTableFilters(args, endpoint.mainTableParams);
|
|
1700
1734
|
let total;
|
|
1701
1735
|
if (endpoint.countPk && args.withCount !== false) {
|
|
1702
1736
|
const countResponse = await env.host.request({
|
|
@@ -1704,7 +1738,7 @@ function buildReadOperation(endpoint) {
|
|
|
1704
1738
|
path: `${EB_BASE}/getFormDataCount/${endpoint.countPk}`,
|
|
1705
1739
|
operation: endpoint.operation,
|
|
1706
1740
|
query,
|
|
1707
|
-
body: queryBody(session.userId),
|
|
1741
|
+
body: queryBody(session.userId, void 0, mainTableFilters),
|
|
1708
1742
|
acceptBusiness
|
|
1709
1743
|
});
|
|
1710
1744
|
total = extractEbCount(countResponse);
|
|
@@ -1715,16 +1749,52 @@ function buildReadOperation(endpoint) {
|
|
|
1715
1749
|
operation: endpoint.operation,
|
|
1716
1750
|
query: { ...query, pageNo, pageSize },
|
|
1717
1751
|
// 分页同时进 body.pageInfo:EB 只认 body 里的 pageInfo,仅放 URL query 会被忽略。
|
|
1718
|
-
body: queryBody(session.userId, { pageNo, pageSize }),
|
|
1752
|
+
body: queryBody(session.userId, { pageNo, pageSize }, mainTableFilters),
|
|
1719
1753
|
acceptBusiness
|
|
1720
1754
|
});
|
|
1721
|
-
const { rows, total: listTotal } = extractEbRows(response);
|
|
1722
|
-
const
|
|
1755
|
+
const { rows: rawRows, total: listTotal } = extractEbRows(response);
|
|
1756
|
+
const filterKeys = Object.keys(mainTableFilters);
|
|
1757
|
+
const matchesFilters = (row) => {
|
|
1758
|
+
const main = row?.mainTable ?? row ?? {};
|
|
1759
|
+
return filterKeys.every((key) => {
|
|
1760
|
+
const cell = main[key];
|
|
1761
|
+
if (cell === void 0 || cell === null) return false;
|
|
1762
|
+
return String(cell).includes(String(mainTableFilters[key]));
|
|
1763
|
+
});
|
|
1764
|
+
};
|
|
1765
|
+
let rows = filterKeys.length === 0 ? rawRows : rawRows.filter(matchesFilters);
|
|
1766
|
+
let fallback;
|
|
1767
|
+
if (filterKeys.length > 0 && rows.length === 0 && args.noFallback !== true) {
|
|
1768
|
+
const maxPages = readFallbackMaxPages();
|
|
1769
|
+
const collected = [];
|
|
1770
|
+
let pages = 0;
|
|
1771
|
+
for (let p = 1; p <= maxPages; p += 1) {
|
|
1772
|
+
const pageResponse = await env.host.request({
|
|
1773
|
+
method: "POST",
|
|
1774
|
+
path,
|
|
1775
|
+
operation: endpoint.operation,
|
|
1776
|
+
query: { ...query, pageNo: p, pageSize },
|
|
1777
|
+
// 不带 mainTableFilters:服务端只会做精确匹配,带上就又变成 0 条了
|
|
1778
|
+
body: queryBody(session.userId, { pageNo: p, pageSize }),
|
|
1779
|
+
acceptBusiness
|
|
1780
|
+
});
|
|
1781
|
+
const { rows: pageRows } = extractEbRows(pageResponse);
|
|
1782
|
+
pages = p;
|
|
1783
|
+
if (pageRows.length === 0) break;
|
|
1784
|
+
collected.push(...pageRows);
|
|
1785
|
+
if (p >= maxPages) break;
|
|
1786
|
+
}
|
|
1787
|
+
fallback = { pages, scanned: collected.length };
|
|
1788
|
+
rows = collected.filter(matchesFilters);
|
|
1789
|
+
}
|
|
1790
|
+
const resolvedTotal = filterKeys.length > 0 ? rows.length : total ?? listTotal ?? rawRows.length;
|
|
1723
1791
|
const pageMeta = {
|
|
1724
1792
|
pageNo,
|
|
1725
1793
|
pageSize,
|
|
1726
1794
|
pageCount: rows.length,
|
|
1727
|
-
total: Math.max(resolvedTotal, rows.length)
|
|
1795
|
+
total: Math.max(resolvedTotal, rows.length),
|
|
1796
|
+
// 模糊回退时告知调用方:结果是客户端筛出来的,扫了多少条
|
|
1797
|
+
...fallback ? { fallback } : {}
|
|
1728
1798
|
};
|
|
1729
1799
|
const summarized = endpoint.summarizeRows ? endpoint.summarizeRows(rows, {
|
|
1730
1800
|
pageCount: rows.length,
|
|
@@ -1744,6 +1814,11 @@ function buildReadOperation(endpoint) {
|
|
|
1744
1814
|
`\u672C\u9875\u8FD4\u56DE ${rows.length} \u6761\uFF0C\u5171 ${effectiveTotal} \u6761\uFF1A\u8FD8\u6709 ${missing} \u6761\u672A\u53D6\u5230\u3002\u9700\u8981\u5168\u91CF\u8BF7\u7FFB\u9875\uFF08pageNo=${pageNo + 1} \u8D77\uFF09\u6216\u52A0\u5927 pageSize\uFF0C\u6216\u6536\u7A84\u7B5B\u9009\u6761\u4EF6`
|
|
1745
1815
|
);
|
|
1746
1816
|
}
|
|
1817
|
+
if (fallback) {
|
|
1818
|
+
pageWarnings.push(
|
|
1819
|
+
`\u670D\u52A1\u7AEF\u53EA\u652F\u6301\u300C\u7CBE\u786E\u5339\u914D\u300D\uFF0C\u6309 ${filterKeys.join("/")} \u8FC7\u6EE4\u540E 0 \u6761\uFF1B\u5DF2\u7FFB\u9875\u626B\u63CF\u5168\u91CF ${fallback.scanned} \u6761\uFF08${fallback.pages} \u9875\uFF09\u5728\u5BA2\u6237\u7AEF\u6309\u300C\u5305\u542B\u300D\u91CD\u65B0\u7B5B\u9009\uFF0C\u547D\u4E2D ${rows.length} \u6761\u3002\u4F20 noFallback:true \u53EF\u8DF3\u8FC7\u8FD9\u6B21\u626B\u63CF`
|
|
1820
|
+
);
|
|
1821
|
+
}
|
|
1747
1822
|
return meetingSuccess(
|
|
1748
1823
|
endpoint.operation,
|
|
1749
1824
|
{
|
|
@@ -1753,7 +1828,7 @@ function buildReadOperation(endpoint) {
|
|
|
1753
1828
|
count: rows.length,
|
|
1754
1829
|
...progress ? { progress } : {},
|
|
1755
1830
|
rows,
|
|
1756
|
-
filters: query
|
|
1831
|
+
filters: { ...query, ...mainTableFilters }
|
|
1757
1832
|
},
|
|
1758
1833
|
{
|
|
1759
1834
|
...endpoint.notes ? { meta: { notes: endpoint.notes } } : {},
|
|
@@ -2126,7 +2201,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
|
|
|
2126
2201
|
);
|
|
2127
2202
|
}
|
|
2128
2203
|
if (endpoint.interfacePk === "create_meeting") {
|
|
2129
|
-
const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-
|
|
2204
|
+
const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-JAB2LJEZ.js");
|
|
2130
2205
|
assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
|
|
2131
2206
|
}
|
|
2132
2207
|
const pkQuery = writePkQuery(endpoint, payload);
|
|
@@ -21,8 +21,10 @@ import {
|
|
|
21
21
|
} from "./chunk-AJ62BGAW.js";
|
|
22
22
|
import {
|
|
23
23
|
E10_REAUTH_GUIDANCE,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
createFetchTimingSink,
|
|
25
|
+
hasXiaoEEnv,
|
|
26
|
+
runWithFetchTiming
|
|
27
|
+
} from "./chunk-JNG42JKG.js";
|
|
26
28
|
|
|
27
29
|
// src/shortcuts/workflow/operations/form.ts
|
|
28
30
|
import { randomUUID } from "node:crypto";
|
|
@@ -341,9 +343,9 @@ var FORM_ENDPOINTS = {
|
|
|
341
343
|
tenantSetting: "/api/file/tenant/setting"
|
|
342
344
|
};
|
|
343
345
|
var AJAX_QUERY = { sf_request_type: "ajax" };
|
|
344
|
-
function formApiUrl(path, relateType) {
|
|
346
|
+
function formApiUrl(path, relateType, ebPrefix = "/api/ebuilder/flow/") {
|
|
345
347
|
if (String(relateType || "").trim() === "WEA_EBUILDER") {
|
|
346
|
-
return path.replace("/api/workflow/core/",
|
|
348
|
+
return path.replace("/api/workflow/core/", ebPrefix);
|
|
347
349
|
}
|
|
348
350
|
return path;
|
|
349
351
|
}
|
|
@@ -6037,7 +6039,20 @@ async function resolveCreateWorkflow(rawWorkflow, env) {
|
|
|
6037
6039
|
throw workflowClarificationError(
|
|
6038
6040
|
"workflow",
|
|
6039
6041
|
"",
|
|
6040
|
-
"\u8981\u53D1\u8D77\u54EA\u4E2A\u6D41\u7A0B\uFF1F\u8BF7\u63D0\u4F9B\u8BE5\u6D41\u7A0B\u7684\u5B8C\u6574\u540D\u79F0\uFF08\u6216\u5176\u5B83\u53EF\u7528\u4E8E\u68C0\u7D22\u7684\u5173\u952E\u8BCD\uFF09\u540E\u518D\u7EE7\u7EED\u3002"
|
|
6042
|
+
"\u8981\u53D1\u8D77\u54EA\u4E2A\u6D41\u7A0B\uFF1F\u8BF7\u63D0\u4F9B\u8BE5\u6D41\u7A0B\u7684\u5B8C\u6574\u540D\u79F0\uFF08\u6216\u5176\u5B83\u53EF\u7528\u4E8E\u68C0\u7D22\u7684\u5173\u952E\u8BCD\uFF09\u540E\u518D\u7EE7\u7EED\u3002",
|
|
6043
|
+
[],
|
|
6044
|
+
{
|
|
6045
|
+
clarificationReason: "workflow_required",
|
|
6046
|
+
missingInput: ["workflow"],
|
|
6047
|
+
requiredInput: {
|
|
6048
|
+
workflow: {
|
|
6049
|
+
required: true,
|
|
6050
|
+
type: "string | string[]",
|
|
6051
|
+
description: "\u8981\u53D1\u8D77\u7684\u5DE5\u4F5C\u6D41\uFF1A\u5B8C\u6574\u540D\u79F0\u3001\u540D\u79F0\u5173\u952E\u8BCD\uFF0C\u6216\u300C\u540D\u79F0(ID)\u300D\uFF1B\u7EAF\u6570\u5B57\u6309\u5DE5\u4F5C\u6D41 ID \u5904\u7406\u3002",
|
|
6052
|
+
example: ["\u8D39\u7528\u62A5\u9500"]
|
|
6053
|
+
}
|
|
6054
|
+
}
|
|
6055
|
+
}
|
|
6041
6056
|
);
|
|
6042
6057
|
}
|
|
6043
6058
|
const explicitIds = /* @__PURE__ */ new Set();
|
|
@@ -6207,15 +6222,15 @@ function singleExplicitWorkflowId(rawWorkflow) {
|
|
|
6207
6222
|
const parsed = parseNameWithId(terms[0]);
|
|
6208
6223
|
return parsed.id ?? (/^[0-9]+$/.test(terms[0]) ? terms[0] : "");
|
|
6209
6224
|
}
|
|
6210
|
-
async function loadCreateFormPack(workflowId, env) {
|
|
6225
|
+
async function loadCreateFormPack(workflowId, env, options = {}) {
|
|
6211
6226
|
const [{ data }, workflowMemory] = await Promise.all([
|
|
6212
|
-
buildCreateFormData(workflowId, env),
|
|
6227
|
+
buildCreateFormData(workflowId, env, options),
|
|
6213
6228
|
// 记忆读取是 best-effort(内部全 catch),不会把表单载入的错误顶掉。
|
|
6214
6229
|
fetchWorkflowMemory(workflowId, env)
|
|
6215
6230
|
]);
|
|
6216
6231
|
return { data, workflowMemory };
|
|
6217
6232
|
}
|
|
6218
|
-
async function prepareCreateFormPayload(args, env) {
|
|
6233
|
+
async function prepareCreateFormPayload(args, env, options = {}) {
|
|
6219
6234
|
const authStartedAt = Date.now();
|
|
6220
6235
|
await env.host.getSession();
|
|
6221
6236
|
const authMs = Date.now() - authStartedAt;
|
|
@@ -6224,10 +6239,10 @@ async function prepareCreateFormPayload(args, env) {
|
|
|
6224
6239
|
const explicitId = singleExplicitWorkflowId(args.workflow);
|
|
6225
6240
|
if (explicitId) {
|
|
6226
6241
|
target = { id: explicitId, name: "", source: "workflowId" };
|
|
6227
|
-
pack = await loadCreateFormPack(explicitId, env);
|
|
6242
|
+
pack = await loadCreateFormPack(explicitId, env, options);
|
|
6228
6243
|
} else {
|
|
6229
6244
|
target = await resolveCreateWorkflow(args.workflow, env);
|
|
6230
|
-
pack = await loadCreateFormPack(target.id, env);
|
|
6245
|
+
pack = await loadCreateFormPack(target.id, env, options);
|
|
6231
6246
|
}
|
|
6232
6247
|
const fullPayload = {
|
|
6233
6248
|
...pack.data,
|
|
@@ -6277,11 +6292,13 @@ async function commandCreateForm(args, env) {
|
|
|
6277
6292
|
};
|
|
6278
6293
|
return workflowSuccess("workflow.createForm", result);
|
|
6279
6294
|
}
|
|
6280
|
-
async function buildCreateFormData(workflowId, env) {
|
|
6295
|
+
async function buildCreateFormData(workflowId, env, options = {}) {
|
|
6296
|
+
const detailMark = options.detailMark === "isDetail" ? "isDetail" : "subFormId";
|
|
6297
|
+
const getHistory = options.getHistory !== false;
|
|
6281
6298
|
const query = { workflowId, isCreate: 1, ...AJAX_QUERY };
|
|
6282
6299
|
const body = { workflowId, isCreate: 1, isMobile: 0 };
|
|
6283
|
-
const historyListSnapshot = fetchHistoryListSnapshot(env, { workflowId }).catch(() => null);
|
|
6284
|
-
const historyDetails = historyListSnapshot.then(async (snapshot) => snapshot && snapshot.requestIds.length ? prefetchHistoryDetails(env, snapshot) : null);
|
|
6300
|
+
const historyListSnapshot = getHistory ? fetchHistoryListSnapshot(env, { workflowId }).catch(() => null) : Promise.resolve(null);
|
|
6301
|
+
const historyDetails = getHistory ? historyListSnapshot.then(async (snapshot) => snapshot && snapshot.requestIds.length ? prefetchHistoryDetails(env, snapshot) : null) : Promise.resolve(null);
|
|
6285
6302
|
historyDetails.catch(() => {
|
|
6286
6303
|
});
|
|
6287
6304
|
const isXiaoE = hasXiaoEEnv(env.ctx.env, env.ctx.getGlobalOptions?.());
|
|
@@ -6457,7 +6474,11 @@ async function buildCreateFormData(workflowId, env) {
|
|
|
6457
6474
|
if (!modelFieldIds.has(String(field.id ?? ""))) continue;
|
|
6458
6475
|
const slimSubFormId = String(field.subFormId ?? "");
|
|
6459
6476
|
const item = { id: field.id, name: field.name };
|
|
6460
|
-
if (
|
|
6477
|
+
if (detailMark === "isDetail") {
|
|
6478
|
+
if (slimSubFormId) item.isDetail = true;
|
|
6479
|
+
} else if (slimSubFormId) {
|
|
6480
|
+
item.subFormId = slimSubFormId;
|
|
6481
|
+
}
|
|
6461
6482
|
item.componentKey = field.componentKey;
|
|
6462
6483
|
const initialValue = initialValueByFieldId.get(String(field.id ?? ""));
|
|
6463
6484
|
if (initialValue !== void 0) item.initialValue = initialValue;
|
|
@@ -6492,8 +6513,8 @@ async function buildCreateFormData(workflowId, env) {
|
|
|
6492
6513
|
}
|
|
6493
6514
|
if (String(field.componentKey ?? "").toLowerCase() === "textarea" && field.richEditor) item.componentKey = "RichText";
|
|
6494
6515
|
if (String(field.format ?? "").trim()) item.format = String(field.format).trim();
|
|
6495
|
-
const
|
|
6496
|
-
if (
|
|
6516
|
+
const options2 = field.options || [];
|
|
6517
|
+
if (options2.length) item.options = options2;
|
|
6497
6518
|
slimFields.push(item);
|
|
6498
6519
|
}
|
|
6499
6520
|
const fieldsById = /* @__PURE__ */ new Map();
|
|
@@ -6502,7 +6523,7 @@ async function buildCreateFormData(workflowId, env) {
|
|
|
6502
6523
|
...requiredFieldsList.map((f) => String(f?.id ?? "")),
|
|
6503
6524
|
...Object.values(subFormRequired).flatMap((list) => list.map((f) => String(f?.id ?? "")))
|
|
6504
6525
|
].filter(Boolean))];
|
|
6505
|
-
const historyCache = fields.length ? await buildHistoryRequestData(
|
|
6526
|
+
const historyCache = getHistory && fields.length ? await buildHistoryRequestData(
|
|
6506
6527
|
env,
|
|
6507
6528
|
fields,
|
|
6508
6529
|
historyRequiredFieldIds.map((id) => ({ id, name: String((fieldsById.get(id) || {}).name ?? id) })),
|
|
@@ -6580,7 +6601,9 @@ async function buildCreateFormData(workflowId, env) {
|
|
|
6580
6601
|
// 历史参考值(近一年、非草稿、最近 5 条「我发起的」)——填值前先看它,能直接照用的字段就别去
|
|
6581
6602
|
// 问用户。字段范围与 `fields` **同一口径**(见 modelFieldIds 注释);完整结果(本表单全部字段)
|
|
6582
6603
|
// 仍随句柄留给 `createRequest` 用(条件必填要到那边才现身)。
|
|
6583
|
-
|
|
6604
|
+
// `getHistory:false`(隐藏入参)时整段历史取数没做 ⇒ 这里给 `null`(不是空数组:空数组表示
|
|
6605
|
+
// "查了但没数据",两者含义不同)。
|
|
6606
|
+
historyRequestData: getHistory ? filterHistoryRequestData(historyCache, modelFieldIds) : null,
|
|
6584
6607
|
systemFields: {
|
|
6585
6608
|
permissions: minorInfo.permissions || {},
|
|
6586
6609
|
defaults: context.systemFields.defaults,
|
|
@@ -7630,9 +7653,10 @@ async function runFieldLinkage(env, ctx, entries, actionTypes, allDetails, isEdi
|
|
|
7630
7653
|
}
|
|
7631
7654
|
}
|
|
7632
7655
|
if (!dataList.length && !runDataList.length) return [];
|
|
7656
|
+
const linkageModule = formModuleName(ctx.frame && ctx.frame.relate_type, "ebuilderform");
|
|
7633
7657
|
const executeParam = {
|
|
7634
7658
|
formId: ctx.layout.form_id,
|
|
7635
|
-
module:
|
|
7659
|
+
module: linkageModule,
|
|
7636
7660
|
dataList,
|
|
7637
7661
|
runDataList,
|
|
7638
7662
|
moduleDataList: []
|
|
@@ -7673,9 +7697,9 @@ async function runFieldLinkage(env, ctx, entries, actionTypes, allDetails, isEdi
|
|
|
7673
7697
|
const frame = ctx.frame || {};
|
|
7674
7698
|
if (frame.layout_multi_id) executeParam.layoutId = frame.layout_multi_id;
|
|
7675
7699
|
}
|
|
7676
|
-
const payload = { formId: ctx.layout.form_id, module:
|
|
7700
|
+
const payload = { formId: ctx.layout.form_id, module: linkageModule, executeParam };
|
|
7677
7701
|
const relateType = ctx.frame && ctx.frame.relate_type || "";
|
|
7678
|
-
const endpoint = formApiUrl(FORM_ENDPOINTS.fdLinkage, relateType);
|
|
7702
|
+
const endpoint = formApiUrl(FORM_ENDPOINTS.fdLinkage, relateType, "/api/ebuilder/form/");
|
|
7679
7703
|
const response = await requestJson(env, "POST", endpoint, AJAX_QUERY, payload);
|
|
7680
7704
|
const data = response && typeof response === "object" ? response : null;
|
|
7681
7705
|
const linkageList = data && typeof data === "object" ? data.linkageDataList : null;
|
|
@@ -8282,6 +8306,15 @@ function xiaoECustomParams(preview) {
|
|
|
8282
8306
|
}
|
|
8283
8307
|
return { values, keys: ordered };
|
|
8284
8308
|
}
|
|
8309
|
+
function xiaoESrcFieldQuery(params) {
|
|
8310
|
+
let query = "";
|
|
8311
|
+
for (const fieldId of params.keys) {
|
|
8312
|
+
const text = params.values[fieldId];
|
|
8313
|
+
if (!text) continue;
|
|
8314
|
+
query += `&${fieldId}=${text}`;
|
|
8315
|
+
}
|
|
8316
|
+
return query;
|
|
8317
|
+
}
|
|
8285
8318
|
function renderXiaoEFillFormMarkdown(params) {
|
|
8286
8319
|
const base = String(params.baseUrl ?? "").replace(/\/+$/u, "");
|
|
8287
8320
|
const workflowId = String(params.workflowId ?? "").trim();
|
|
@@ -8293,7 +8326,7 @@ function renderXiaoEFillFormMarkdown(params) {
|
|
|
8293
8326
|
arguments: {
|
|
8294
8327
|
type: "e10",
|
|
8295
8328
|
title: String(params.title ?? ""),
|
|
8296
|
-
src: `${base}/sp/workflow${createPath}?workflowId=${workflowId}&isCreate=1`,
|
|
8329
|
+
src: `${base}/sp/workflow${createPath}?workflowId=${workflowId}&isCreate=1${xiaoESrcFieldQuery(params.customParams)}`,
|
|
8297
8330
|
sdkOptions: {
|
|
8298
8331
|
compName: XIAOE_FILL_FORM_SDK_OPTIONS.compName,
|
|
8299
8332
|
routerType: XIAOE_FILL_FORM_SDK_OPTIONS.routerType,
|
|
@@ -8776,10 +8809,18 @@ function apiShortName(path) {
|
|
|
8776
8809
|
function withApiTiming(host, spans) {
|
|
8777
8810
|
const record = async (path, run) => {
|
|
8778
8811
|
const start = Date.now();
|
|
8812
|
+
const fetchTiming = createFetchTimingSink();
|
|
8779
8813
|
try {
|
|
8780
|
-
return await run
|
|
8814
|
+
return await runWithFetchTiming(fetchTiming, run);
|
|
8781
8815
|
} finally {
|
|
8782
|
-
spans.push({
|
|
8816
|
+
spans.push({
|
|
8817
|
+
name: apiShortName(path),
|
|
8818
|
+
start,
|
|
8819
|
+
end: Date.now(),
|
|
8820
|
+
fetchStart: fetchTiming.fetchStart,
|
|
8821
|
+
fetchEnd: fetchTiming.fetchEnd,
|
|
8822
|
+
fetchMs: fetchTiming.fetchMs
|
|
8823
|
+
});
|
|
8783
8824
|
}
|
|
8784
8825
|
};
|
|
8785
8826
|
return {
|
|
@@ -8818,18 +8859,33 @@ function summarizeApiSpans(spans) {
|
|
|
8818
8859
|
const items = group.map((item) => ({
|
|
8819
8860
|
name: item.name,
|
|
8820
8861
|
at: Math.max(0, Math.round(item.start - origin)),
|
|
8821
|
-
ms: Math.max(0, Math.round(item.end - item.start))
|
|
8862
|
+
ms: Math.max(0, Math.round(item.end - item.start)),
|
|
8863
|
+
fetchAt: item.fetchStart === null ? null : Math.max(0, Math.round(item.fetchStart - origin)),
|
|
8864
|
+
fetchEnd: item.fetchEnd === null ? null : Math.max(0, Math.round(item.fetchEnd - origin)),
|
|
8865
|
+
fetchCost: Math.max(0, Math.round(item.fetchMs))
|
|
8822
8866
|
})).sort((a, b) => b.ms - a.ms || a.at - b.at);
|
|
8823
8867
|
slowest.push({ batch: key, name: items[0].name, ms: items[0].ms, items });
|
|
8824
8868
|
}
|
|
8825
8869
|
}
|
|
8826
8870
|
return { durations, slowest };
|
|
8827
8871
|
}
|
|
8872
|
+
function readHiddenGetHistory(value) {
|
|
8873
|
+
if (value === false || value === 0) return false;
|
|
8874
|
+
if (typeof value === "string") {
|
|
8875
|
+
const text = value.trim().toLowerCase();
|
|
8876
|
+
if (text === "false" || text === "0") return false;
|
|
8877
|
+
}
|
|
8878
|
+
return true;
|
|
8879
|
+
}
|
|
8828
8880
|
async function commandCreateRequestDirect(args, env) {
|
|
8829
8881
|
const startedAt = Date.now();
|
|
8830
8882
|
const spans = [];
|
|
8831
8883
|
const timedEnv = { ...env, host: withApiTiming(env.host, spans) };
|
|
8832
|
-
const
|
|
8884
|
+
const getHistory = readHiddenGetHistory(args.getHistory);
|
|
8885
|
+
const { payload, authMs } = await prepareCreateFormPayload(args, timedEnv, {
|
|
8886
|
+
getHistory,
|
|
8887
|
+
detailMark: "isDetail"
|
|
8888
|
+
});
|
|
8833
8889
|
const contextId = String(payload.contextId ?? "");
|
|
8834
8890
|
if (!contextId) {
|
|
8835
8891
|
throw workflowValidationError("context_missing", "\u8868\u5355\u8F7D\u5165\u672A\u4EA7\u51FA\u53EF\u7528\u53E5\u67C4\uFF0C\u8BF7\u91CD\u8BD5");
|
|
@@ -8856,7 +8912,7 @@ async function commandCreateRequestDirect(args, env) {
|
|
|
8856
8912
|
"workflow.createRequestDirect"
|
|
8857
8913
|
) > CREATE_FORM_STDOUT_SAFE_CHARS;
|
|
8858
8914
|
if (overLine()) {
|
|
8859
|
-
data.historyRequestData = [];
|
|
8915
|
+
if (getHistory) data.historyRequestData = [];
|
|
8860
8916
|
if ("userMemory" in data && overLine()) data.userMemory = "";
|
|
8861
8917
|
}
|
|
8862
8918
|
return workflowSuccess("workflow.createRequestDirect", {
|
|
@@ -8876,10 +8932,14 @@ function formatRemark(value) {
|
|
|
8876
8932
|
if (text.startsWith("_weaverMte_")) return text;
|
|
8877
8933
|
return `_weaverMte_<p>${text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")}</p>`;
|
|
8878
8934
|
}
|
|
8935
|
+
function formModuleName(relateType, ebModule = "ebuildercard") {
|
|
8936
|
+
return String(relateType ?? "").trim() === "WEA_EBUILDER" ? ebModule : "workflow";
|
|
8937
|
+
}
|
|
8879
8938
|
function buildSaveBody(context, prepared) {
|
|
8880
8939
|
const runtime = context.runtime;
|
|
8940
|
+
const moduleName = formModuleName(context.frame?.relate_type);
|
|
8881
8941
|
return {
|
|
8882
|
-
module:
|
|
8942
|
+
module: moduleName,
|
|
8883
8943
|
customParam: {
|
|
8884
8944
|
isCreate: true,
|
|
8885
8945
|
requestId: runtime.request_id,
|
|
@@ -8897,7 +8957,7 @@ function buildSaveBody(context, prepared) {
|
|
|
8897
8957
|
},
|
|
8898
8958
|
employeeId: runtime.employee_id,
|
|
8899
8959
|
formData: {
|
|
8900
|
-
module:
|
|
8960
|
+
module: moduleName,
|
|
8901
8961
|
presetDataId: runtime.request_id,
|
|
8902
8962
|
dataDetails: prepared.dataDetails,
|
|
8903
8963
|
client: "pc",
|
|
@@ -9274,12 +9334,15 @@ async function runCreateNodeFieldVerification(env, context, switches) {
|
|
|
9274
9334
|
result.passed = !result.blocked;
|
|
9275
9335
|
return result;
|
|
9276
9336
|
}
|
|
9277
|
-
function buildEditDataLayoutRequest(requestId, workflowId, nodeId, formId, dataId, layoutMultiId, viewFormNodeId, permissionType, runtime) {
|
|
9337
|
+
function buildEditDataLayoutRequest(requestId, workflowId, nodeId, formId, dataId, layoutMultiId, viewFormNodeId, permissionType, runtime, relateType) {
|
|
9278
9338
|
return {
|
|
9279
9339
|
terminalType: "PC",
|
|
9280
9340
|
dataId,
|
|
9281
9341
|
formId,
|
|
9282
|
-
|
|
9342
|
+
// 建模表单取 `ebuilderform`(2026-10-30 真机请求体实证),**不是** `ebuildercard`:
|
|
9343
|
+
// 同为 `form/core` 下的接口,`getFormLayout` / `saveFormData` 是 `ebuildercard`,
|
|
9344
|
+
// 本接口与 `executeFdLinkage` 是 `ebuilderform` —— 建模表单内部不能按"同族"推定。
|
|
9345
|
+
module: formModuleName(relateType, "ebuilderform"),
|
|
9283
9346
|
newLayout: true,
|
|
9284
9347
|
cacheUid: null,
|
|
9285
9348
|
layoutMultiId,
|
|
@@ -9349,7 +9412,7 @@ async function commandEditLoad(args, env) {
|
|
|
9349
9412
|
tenantSetting = {};
|
|
9350
9413
|
}
|
|
9351
9414
|
const dataId = requestId;
|
|
9352
|
-
const dlResp = await requestJson(env, "POST", formApiUrl(FORM_ENDPOINTS.formDataAndLayout, frame.relate_type), { formId: frame.form_id, dataId, ...AJAX_QUERY }, buildEditDataLayoutRequest(requestId, workflowId, runtime.node_id, frame.form_id, dataId, frame.layout_multi_id, frame.view_form_node_id, frame.permission_type, runtime));
|
|
9415
|
+
const dlResp = await requestJson(env, "POST", formApiUrl(FORM_ENDPOINTS.formDataAndLayout, frame.relate_type), { formId: frame.form_id, dataId, ...AJAX_QUERY }, buildEditDataLayoutRequest(requestId, workflowId, runtime.node_id, frame.form_id, dataId, frame.layout_multi_id, frame.view_form_node_id, frame.permission_type, runtime, frame.relate_type));
|
|
9353
9416
|
const dlData = dlResp;
|
|
9354
9417
|
if (!dlData || typeof dlData !== "object") throw workflowApiError("format_error", "getFormDataAndLayout \u672A\u8FD4\u56DE\u6709\u6548 data");
|
|
9355
9418
|
const vrc = Array.isArray(dlData.viewRelateConfig) ? dlData.viewRelateConfig : [];
|
|
@@ -9595,8 +9658,9 @@ async function commandEditPrepare(args, env) {
|
|
|
9595
9658
|
}
|
|
9596
9659
|
function buildEditSaveBody(context, prepared) {
|
|
9597
9660
|
const runtime = context.runtime || {};
|
|
9661
|
+
const moduleName = formModuleName(context.frame?.relate_type);
|
|
9598
9662
|
return {
|
|
9599
|
-
module:
|
|
9663
|
+
module: moduleName,
|
|
9600
9664
|
customParam: {
|
|
9601
9665
|
isCreate: false,
|
|
9602
9666
|
requestId: context.requestId ?? context.request_id,
|
|
@@ -9616,7 +9680,7 @@ function buildEditSaveBody(context, prepared) {
|
|
|
9616
9680
|
formData: {
|
|
9617
9681
|
id: context.data_id,
|
|
9618
9682
|
updateTimeStamp: context.update_time_stamp || "",
|
|
9619
|
-
module:
|
|
9683
|
+
module: moduleName,
|
|
9620
9684
|
dataDelRows: [],
|
|
9621
9685
|
dataDetails: prepared.dataDetails || [],
|
|
9622
9686
|
client: "pc",
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
createE10RequestRuntime,
|
|
10
10
|
requireE10Session
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JUXVYKII.js";
|
|
12
12
|
import {
|
|
13
13
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
14
14
|
getActiveProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JNG42JKG.js";
|
|
16
16
|
|
|
17
17
|
// src/shortcuts/workflow/host.ts
|
|
18
18
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
meetingValidationError,
|
|
13
13
|
queryBody,
|
|
14
14
|
toIdCsv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TC6MZAO3.js";
|
|
16
16
|
|
|
17
17
|
// src/shortcuts/meeting/operations/eb/conflict.ts
|
|
18
18
|
var ACTIVE_MT_STATUS = "1,2,8,9";
|
|
@@ -296,7 +296,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
|
|
|
296
296
|
const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
|
|
297
297
|
const nameLike = items.filter((item) => !/^\d+$/u.test(item));
|
|
298
298
|
if (nameLike.length > 0) {
|
|
299
|
-
const { resolveMemberIdsByName } = await import("./schedule-
|
|
299
|
+
const { resolveMemberIdsByName } = await import("./schedule-IVBICP32.js");
|
|
300
300
|
const idsByName = await resolveMemberIdsByName(env, nameLike);
|
|
301
301
|
const resolved = items.map((item) => idsByName.get(item) ?? item);
|
|
302
302
|
payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
|
|
@@ -610,7 +610,7 @@ async function findCommonFreeSlots(env, input) {
|
|
|
610
610
|
const scheduleItems = [];
|
|
611
611
|
if (includeSchedule) {
|
|
612
612
|
try {
|
|
613
|
-
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-
|
|
613
|
+
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-IVBICP32.js");
|
|
614
614
|
const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
|
|
615
615
|
const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
|
|
616
616
|
const flow = await runScheduleConflictFlow(env, {
|
|
@@ -3,13 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
readCache,
|
|
5
5
|
writeCache
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F746NKNF.js";
|
|
7
7
|
import {
|
|
8
8
|
SCHEMA_DATETIME_MINUTE,
|
|
9
9
|
meetingSuccess,
|
|
10
10
|
meetingValidationError,
|
|
11
11
|
schemaOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TC6MZAO3.js";
|
|
13
13
|
|
|
14
14
|
// src/shortcuts/meeting/operations/eb/schedule.ts
|
|
15
15
|
var SCHEDULE_TYPE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/queryAgendaType";
|
|
@@ -110,9 +110,9 @@ async function runScheduleConflictFlow(env, input) {
|
|
|
110
110
|
if (!employeeId) {
|
|
111
111
|
throw meetingValidationError("schedule_employee_required", "\u53D6\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u7528\u6237 id\uFF0C\u65E0\u6CD5\u89E6\u53D1 ESB \u65E5\u7A0B\u67E5\u8BE2");
|
|
112
112
|
}
|
|
113
|
-
const { createEsbHost } = await import("./host-
|
|
113
|
+
const { createEsbHost } = await import("./host-I4NRK4MX.js");
|
|
114
114
|
const { createEsbContinuationSigner } = await import("./continuation-NLECEJPX.js");
|
|
115
|
-
const { getEsbOperation } = await import("./registry-
|
|
115
|
+
const { getEsbOperation } = await import("./registry-KDD7DHNK.js");
|
|
116
116
|
const esbEnv = {
|
|
117
117
|
ctx: env.ctx,
|
|
118
118
|
host: createEsbHost(env.ctx),
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
findCommonFreeSlots,
|
|
8
8
|
meetingEbConflictOperations,
|
|
9
9
|
runEbConflictCheck
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-WXFPWCXG.js";
|
|
11
|
+
import "./chunk-TC6MZAO3.js";
|
|
12
12
|
import "./chunk-LUSPKZKY.js";
|
|
13
13
|
import "./chunk-BUSC6UAE.js";
|
|
14
14
|
export {
|