@yuku123/z-cognition-component 2.0.0 → 2.0.1
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-lib/ApartmentOutlined-M6qSurnE.js +12 -0
- package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
- package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
- package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
- package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
- package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
- package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
- package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
- package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
- package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
- package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
- package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
- package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
- package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
- package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
- package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
- package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
- package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
- package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
- package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
- package/dist-lib/Skeleton-DXcERb5r.js +557 -0
- package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
- package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
- package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
- package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
- package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
- package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
- package/dist-lib/{agents-DS0rPJGV.js → agents-mAJW3cEN.js} +46 -46
- package/dist-lib/{ai-CQ67aRC4.js → ai-BcYmZiRo.js} +30 -30
- package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DO7GXjG4.js} +14 -13
- package/dist-lib/{approval-LLVR3fMa.js → approval-RPDUKg9-.js} +26 -25
- package/dist-lib/{approvals-D1DSA-Mw.js → approvals-CNjxJUpR.js} +43 -42
- package/dist-lib/{assistant-DpabpWKV.js → assistant-FIQQziCn.js} +50 -49
- package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-DsEGBJnq.js} +5 -5
- package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-B-f3k55y.js} +1 -1
- package/dist-lib/{audit-DeU1XEgQ.js → audit-NwnH1hm5.js} +1 -1
- package/dist-lib/{bios-Bk36bVhw.js → bios-CRwKtcit.js} +130 -125
- package/dist-lib/callSuper-DZEfdkXG.js +7 -0
- package/dist-lib/{changelog-CCMDMI4R.js → changelog-Dj_Pv2nc.js} +1 -1
- package/dist-lib/{changelog-xEt2qnho.js → changelog-DlL5u9o4.js} +2 -2
- package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
- package/dist-lib/colors-sdAcAcU3.js +24 -0
- package/dist-lib/context-Buz0ggsK.js +710 -0
- package/dist-lib/context-DpmyNOn3.js +21 -0
- package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
- package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
- package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
- package/dist-lib/{detail-Xtof0GoK.js → detail-Cfb-zdr9.js} +50 -49
- package/dist-lib/{detail-BW6dD_YP.js → detail-Dcfg3W8B.js} +89 -88
- package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
- package/dist-lib/{downloads-Dj4DgBSS.js → downloads-MkyxiHxi.js} +4 -3
- package/dist-lib/{edit-nZ7siGuW.js → edit-DLGAM-Vo.js} +265 -259
- package/dist-lib/{editor-BuhZwEsv.js → editor-BtiheUpe.js} +21 -20
- package/dist-lib/embed-DwLg9RDW.js +31148 -0
- package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-Dz9bUuhS.js} +15 -14
- package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
- package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
- package/dist-lib/index-9aQ4BzIK.js +500 -0
- package/dist-lib/index-B57Fj7Y0.js +1169 -0
- package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
- package/dist-lib/{index-BJ2Gpcbi.js → index-BGB6NawZ.js} +2 -2
- package/dist-lib/index-Bc-Vin3j.js +256 -0
- package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
- package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
- package/dist-lib/{index-SAPKyv8e.js → index-CJSTTgTM.js} +10 -10
- package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
- package/dist-lib/index-Cfu1W1H6.js +535 -0
- package/dist-lib/index-CrMcNEAZ.js +9656 -0
- package/dist-lib/index-Cy9i4Kx7.js +699 -0
- package/dist-lib/index-CyKWCYMK.js +218 -0
- package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
- package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
- package/dist-lib/index-DBtGE89a.js +168 -0
- package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
- package/dist-lib/{index-rtSfQuYs.js → index-D_Qey9G8.js} +12 -12
- package/dist-lib/index-DjFPRXl5.js +1484 -0
- package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
- package/dist-lib/{index-B5jr3A7f.js → index-DuI4K5e1.js} +19 -19
- package/dist-lib/index-DvWHYX81.js +450 -0
- package/dist-lib/{index-D5V4bZ4e.js → index-HieOUSwH.js} +8 -8
- package/dist-lib/index-Vu6sPBci.js +1884 -0
- package/dist-lib/index-bOY1cBol.js +4890 -0
- package/dist-lib/{index-DzrH4RQ7.js → index-c2HokEFp.js} +11 -10
- package/dist-lib/{index-BFRg0cn3.js → index-g16g7A4k.js} +6 -6
- package/dist-lib/index-nQSVLWfW.js +356 -0
- package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
- package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
- package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
- package/dist-lib/index.js +3 -1
- package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
- package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-BNoIhw6B.js} +71 -71
- package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-EgcbWseM.js} +3 -3
- package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-C023dnJ-.js} +104 -103
- package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-B4fGCn8m.js} +52 -51
- package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-EvJ9Fw7X.js} +181 -177
- package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
- package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
- package/dist-lib/{member-B5WF3FCj.js → member-BUg2QYlE.js} +1 -1
- package/dist-lib/{message-kHyjuooj.js → message-Cwj8dO78.js} +25 -24
- package/dist-lib/{message-D2MSaOMq.js → message-GF-w8HuR.js} +1 -1
- package/dist-lib/{messages-D_VDuKK7.js → messages-JID13L8-.js} +16 -15
- package/dist-lib/{meta-CEf_DYcU.js → meta-DPp5L3Uc.js} +1 -1
- package/dist-lib/{metrics-hONGW0KG.js → metrics-CT4eLzrq.js} +2 -2
- package/dist-lib/{monitor-DFmEu6rH.js → monitor-Bs9BfJOj.js} +4 -4
- package/dist-lib/{monitor-DF3WVsVV.js → monitor-CmS65YSu.js} +8 -8
- package/dist-lib/{my-access-j53lA6T6.js → my-access-1Yj7UloI.js} +3 -3
- package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-yQDHPLYI.js} +23 -22
- package/dist-lib/{new-DfZ61nMQ.js → new-BgkoBnZV.js} +14 -12
- package/dist-lib/{ontology-CUH5qslO.js → ontology-BPrbXPor.js} +145 -142
- package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-Cbqnm-po.js} +88 -84
- package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-6k-m8fzr.js} +2125 -2117
- package/dist-lib/ontology-modeling-BT-EuDCs.js +1039 -0
- package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-D3xy6IZL.js} +703 -712
- package/dist-lib/ontology-scenarios-DWYC2yxd.js +660 -0
- package/dist-lib/pages-CsexFuEz.js +73 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-CklDU2kO.js → permission-fTfxpEhV.js} +31 -31
- package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
- package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
- package/dist-lib/{quota-DLe9so2b.js → quota-BlHnhkAT.js} +4 -4
- package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
- package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-B-pzX8eT.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DByQXh0y.js} +48 -46
- package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-Bw-6n9Kh.js} +425 -423
- package/dist-lib/{schedule-B_ujtL3h.js → schedule-H4_9KnRj.js} +8 -8
- package/dist-lib/{settings-BIkKTQjc.js → settings-C3PI8KYa.js} +147 -146
- package/dist-lib/{shared-Dfz1X4Mq.js → shared-DqeN-Wbb.js} +1 -1
- package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-DN3zT9P-.js} +2 -2
- package/dist-lib/{skills-BzpcX5fN.js → skills-eGlCExr0.js} +40 -39
- package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-BCvClzc-.js} +16 -16
- package/dist-lib/{task-config-D0a7TOYt.js → task-config-DEJVJ7zK.js} +4 -4
- package/dist-lib/{tech-CH01ekZ5.js → tech-C-4uM9bS.js} +4 -3
- package/dist-lib/{tools-YnTN61uE.js → tools-le6miafZ.js} +14 -14
- package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-B3pDp3s5.js} +13 -13
- package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
- package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-Dmp7uMHO.js} +50 -48
- package/dist-lib/useClosable-BY7FgWKy.js +59 -0
- package/dist-lib/useForm-Byp1LopG.js +145 -0
- package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-WT1PobuV.js} +27 -26
- package/dist-lib/{version-management-C_v8w1E4.js → version-management-DC0k1DRg.js} +7 -6
- package/dist-lib/{welcome-ChEcA4Ej.js → welcome-VyWLrbth.js} +4 -3
- package/package.json +2 -3
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
- package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
- package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
- package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
- package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
- package/dist-lib/Skeleton-CxFsInYI.js +0 -671
- package/dist-lib/Table-Civ838nE.js +0 -20514
- package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
- package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist-lib/callSuper-CwIeyYoc.js +0 -7
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
- package/dist-lib/context-T27uno74.js +0 -54
- package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
- package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
- package/dist-lib/index-0TvzCTD7.js +0 -2336
- package/dist-lib/index-4tbtbcAt.js +0 -550
- package/dist-lib/index-B1wh6i1C.js +0 -1308
- package/dist-lib/index-BVgdmf6r.js +0 -2487
- package/dist-lib/index-CSnvcFg-.js +0 -543
- package/dist-lib/index-D35Ry0PG.js +0 -1162
- package/dist-lib/index-DC57_dnh.js +0 -604
- package/dist-lib/index-DQ16Zb7x.js +0 -546
- package/dist-lib/index-DRcTwC17.js +0 -418
- package/dist-lib/index-Dd9pPAT3.js +0 -2192
- package/dist-lib/index-DxzorPvG.js +0 -13960
- package/dist-lib/index-If4xc1-H.js +0 -559
- package/dist-lib/index-R71k3nB_.js +0 -710
- package/dist-lib/index-mUlorJxp.js +0 -3279
- package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
- package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
- package/dist-lib/pages-CticGC6S.js +0 -512
- package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a, Fragment as S } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l, useEffect as _, useMemo as le } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { T as
|
|
5
|
-
import { f as
|
|
6
|
-
import { T as
|
|
3
|
+
import { f as ce, I as p, e as re, p as ie, g as oe, h as de, t as he, m as me } from "./embed-DwLg9RDW.js";
|
|
4
|
+
import { T as pe } from "./index-BGB6NawZ.js";
|
|
5
|
+
import { f as ue } from "./format-UGmYKemG.js";
|
|
6
|
+
import { T as be, t as ge } from "./index-D_Qey9G8.js";
|
|
7
|
+
import { u as Ne, b as fe } from "./chunk-YDNE64FV-DGyyfCo0.js";
|
|
7
8
|
const I = 20, q = (d) => d instanceof Error ? d.message : "请稍后重试", z = (d) => d.status === "PENDING" && d.canApprove;
|
|
8
|
-
function
|
|
9
|
-
const d =
|
|
9
|
+
function xe() {
|
|
10
|
+
const d = Ne(), [k, U] = fe(), b = k.get("ticketId"), $ = (e) => {
|
|
10
11
|
const n = e ? Number(e) : NaN;
|
|
11
12
|
return Number.isFinite(n) && n > 0 ? n : null;
|
|
12
13
|
}, [o, Z] = l("todo"), [w, N] = l(1), [H, J] = l(0), [h, E] = l({
|
|
@@ -14,7 +15,7 @@ function Te() {
|
|
|
14
15
|
total: 0,
|
|
15
16
|
current: 1,
|
|
16
17
|
size: I
|
|
17
|
-
}), [D, M] = l(!0), [
|
|
18
|
+
}), [D, M] = l(!0), [B, F] = l(""), [j, f] = l(
|
|
18
19
|
() => $(b)
|
|
19
20
|
), [K, O] = l(b);
|
|
20
21
|
if (K !== b) {
|
|
@@ -25,7 +26,7 @@ function Te() {
|
|
|
25
26
|
const [G, Q] = l({}), [m, g] = l([]), [T, L] = l(!1), [x, A] = l([]);
|
|
26
27
|
_(() => {
|
|
27
28
|
let e = !0;
|
|
28
|
-
return
|
|
29
|
+
return ce().then((n) => {
|
|
29
30
|
if (!e || !n)
|
|
30
31
|
return;
|
|
31
32
|
const s = {};
|
|
@@ -38,9 +39,9 @@ function Te() {
|
|
|
38
39
|
}, []), _(() => {
|
|
39
40
|
let e = !0;
|
|
40
41
|
return (async () => {
|
|
41
|
-
M(!0),
|
|
42
|
+
M(!0), F("");
|
|
42
43
|
try {
|
|
43
|
-
const s = await
|
|
44
|
+
const s = await ie({
|
|
44
45
|
view: o,
|
|
45
46
|
current: w,
|
|
46
47
|
size: I
|
|
@@ -51,7 +52,7 @@ function Te() {
|
|
|
51
52
|
)
|
|
52
53
|
));
|
|
53
54
|
} catch (s) {
|
|
54
|
-
e && (
|
|
55
|
+
e && (F(q(s)), E({ records: [], total: 0, current: 1, size: I }));
|
|
55
56
|
} finally {
|
|
56
57
|
e && M(!1);
|
|
57
58
|
}
|
|
@@ -77,7 +78,7 @@ function Te() {
|
|
|
77
78
|
if (!m.length || T)
|
|
78
79
|
return;
|
|
79
80
|
const e = [...m];
|
|
80
|
-
if (!await
|
|
81
|
+
if (!await oe({
|
|
81
82
|
title: `批量通过 ${e.length} 个审批单?`,
|
|
82
83
|
sub: "通过后申请权限立即放行;单个失败不影响其他单据,失败项会在完成后列出。",
|
|
83
84
|
confirmText: "批量通过",
|
|
@@ -90,7 +91,7 @@ function Te() {
|
|
|
90
91
|
for (const r of e) {
|
|
91
92
|
const i = h.records.find((P) => P.id === r);
|
|
92
93
|
try {
|
|
93
|
-
await
|
|
94
|
+
await de(r), c += 1;
|
|
94
95
|
} catch (P) {
|
|
95
96
|
s.push({
|
|
96
97
|
code: (i == null ? void 0 : i.code) || `#${r}`,
|
|
@@ -99,7 +100,7 @@ function Te() {
|
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
L(!1), g([]), c &&
|
|
103
|
+
L(!1), g([]), c && he(
|
|
103
104
|
s.length ? "批量审批部分完成" : "批量审批完成",
|
|
104
105
|
s.length ? `已通过 ${c} 个,失败 ${s.length} 个` : `已通过 ${c} 个审批单`,
|
|
105
106
|
s.length ? "warn" : "success"
|
|
@@ -110,15 +111,15 @@ function Te() {
|
|
|
110
111
|
e.delete("ticketId"), U(e, { replace: !0 });
|
|
111
112
|
}
|
|
112
113
|
}, C = Math.max(1, Math.ceil(h.total / I)), u = Math.min(w, C), se = (e) => e.resourceCodes.map(
|
|
113
|
-
(n) => G[n] ||
|
|
114
|
+
(n) => G[n] || me(n)
|
|
114
115
|
), ne = () => D && !h.records.length ? /* @__PURE__ */ t("div", { className: "empty", role: "status", children: [
|
|
115
116
|
/* @__PURE__ */ a("span", { className: "empty-icon", children: /* @__PURE__ */ a("span", { className: "spinner" }) }),
|
|
116
117
|
/* @__PURE__ */ a("b", { children: "正在读取审批单…" })
|
|
117
|
-
] }) :
|
|
118
|
+
] }) : B ? /* @__PURE__ */ t("div", { className: "callout danger", style: { margin: "20px" }, children: [
|
|
118
119
|
/* @__PURE__ */ a(p, { name: "alert-triangle", size: 15 }),
|
|
119
120
|
/* @__PURE__ */ t("div", { className: "ct", children: [
|
|
120
121
|
/* @__PURE__ */ a("b", { children: "审批单加载失败" }),
|
|
121
|
-
/* @__PURE__ */ a("p", { children:
|
|
122
|
+
/* @__PURE__ */ a("p", { children: B }),
|
|
122
123
|
/* @__PURE__ */ t(
|
|
123
124
|
"button",
|
|
124
125
|
{
|
|
@@ -159,7 +160,7 @@ function Te() {
|
|
|
159
160
|
/* @__PURE__ */ a("th", { style: { width: 76 } })
|
|
160
161
|
] }) }),
|
|
161
162
|
/* @__PURE__ */ a("tbody", { children: h.records.map((e) => {
|
|
162
|
-
const n =
|
|
163
|
+
const n = ge(e.status), s = se(e), c = z(e);
|
|
163
164
|
return /* @__PURE__ */ t("tr", { onClick: () => f(e.id), children: [
|
|
164
165
|
o === "todo" ? /* @__PURE__ */ a(
|
|
165
166
|
"td",
|
|
@@ -214,7 +215,7 @@ function Te() {
|
|
|
214
215
|
/* @__PURE__ */ a("span", { children: e.currentApproverName || "—" })
|
|
215
216
|
] }) : /* @__PURE__ */ a("span", { className: "muted", children: "—" }) }),
|
|
216
217
|
/* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("span", { className: `tag ${n.tone}`, children: n.label }) }),
|
|
217
|
-
/* @__PURE__ */ a("td", { className: "mono-sm", children:
|
|
218
|
+
/* @__PURE__ */ a("td", { className: "mono-sm", children: ue(e.createTime) }),
|
|
218
219
|
/* @__PURE__ */ a("td", { onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ a(
|
|
219
220
|
"button",
|
|
220
221
|
{
|
|
@@ -290,7 +291,7 @@ function Te() {
|
|
|
290
291
|
] });
|
|
291
292
|
return /* @__PURE__ */ t("div", { className: "view approval-page pc-page", children: [
|
|
292
293
|
/* @__PURE__ */ a(
|
|
293
|
-
|
|
294
|
+
pe,
|
|
294
295
|
{
|
|
295
296
|
ariaLabel: "审批视图",
|
|
296
297
|
items: V,
|
|
@@ -331,17 +332,17 @@ function Te() {
|
|
|
331
332
|
] })
|
|
332
333
|
] }),
|
|
333
334
|
/* @__PURE__ */ a("section", { className: "panel approval-panel", children: ne() }),
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
j ? /* @__PURE__ */ a(
|
|
336
|
+
be,
|
|
336
337
|
{
|
|
337
|
-
ticketId:
|
|
338
|
+
ticketId: j,
|
|
338
339
|
resourceNames: G,
|
|
339
340
|
onClose: te,
|
|
340
341
|
onChanged: y
|
|
341
342
|
}
|
|
342
343
|
) : null,
|
|
343
344
|
x.length ? /* @__PURE__ */ a(
|
|
344
|
-
|
|
345
|
+
re,
|
|
345
346
|
{
|
|
346
347
|
icon: "alert-triangle",
|
|
347
348
|
title: `${x.length} 个审批单未通过`,
|
|
@@ -367,5 +368,5 @@ function Te() {
|
|
|
367
368
|
] });
|
|
368
369
|
}
|
|
369
370
|
export {
|
|
370
|
-
|
|
371
|
+
xe as default
|
|
371
372
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as e, jsxs as a, Fragment as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { I as c, e as le, w as se, x as ne, t as q, y as re, u as Q, s as te, f as ie, p as ce, m as oe } from "./embed-DwLg9RDW.js";
|
|
3
|
+
import { b as X } from "./chunk-YDNE64FV-DGyyfCo0.js";
|
|
3
4
|
import { useState as o, useEffect as O, useMemo as J, useCallback as de } from "react";
|
|
4
|
-
import { f as ee } from "./format-
|
|
5
|
-
import { T as pe, t as me } from "./index-
|
|
5
|
+
import { f as ee } from "./format-UGmYKemG.js";
|
|
6
|
+
import { T as pe, t as me } from "./index-D_Qey9G8.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
const he = [
|
|
8
9
|
{ key: "template", label: "审批模板", icon: "workflow" },
|
|
9
10
|
{ key: "ticket", label: "审批工单", icon: "check-square" }
|
|
10
11
|
];
|
|
11
12
|
function Y() {
|
|
12
|
-
const [s, d] =
|
|
13
|
+
const [s, d] = X(), b = s.get("tab") === "ticket" ? "ticket" : "template", f = (p) => {
|
|
13
14
|
const u = new URLSearchParams(s);
|
|
14
15
|
p === "template" ? u.delete("tab") : u.set("tab", p), d(u, { replace: !0 });
|
|
15
16
|
};
|
|
@@ -60,12 +61,12 @@ function ue({
|
|
|
60
61
|
approverRoleName: r.approverRoleName
|
|
61
62
|
})) : Z((s == null ? void 0 : s.bizType) || "SYSTEM_PERMISSION");
|
|
62
63
|
}
|
|
63
|
-
), [M,
|
|
64
|
+
), [M, E] = o([]), [v, R] = o([]), [P, i] = o(!0), [N, y] = o(!1), [D, _] = o(!1), h = u === "KB_ACCESS";
|
|
64
65
|
O(() => {
|
|
65
66
|
let l = !0;
|
|
66
67
|
return (async () => {
|
|
67
68
|
if (h) {
|
|
68
|
-
i(!1), y(!1),
|
|
69
|
+
i(!1), y(!1), E([]), R([]);
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
72
|
i(!0), y(!1);
|
|
@@ -77,14 +78,14 @@ function ue({
|
|
|
77
78
|
if (!l)
|
|
78
79
|
return;
|
|
79
80
|
const L = t || [];
|
|
80
|
-
|
|
81
|
+
E(L), R(S || []), w(
|
|
81
82
|
(B) => B.map((A) => {
|
|
82
|
-
const $ = L.find((
|
|
83
|
+
const $ = L.find((F) => Number(F.staffId) === A.approverId);
|
|
83
84
|
return $ && $.name ? { ...A, approverName: $.name } : A;
|
|
84
85
|
})
|
|
85
86
|
);
|
|
86
87
|
} catch {
|
|
87
|
-
l && (y(!0),
|
|
88
|
+
l && (y(!0), E([]), R([]));
|
|
88
89
|
} finally {
|
|
89
90
|
l && i(!1);
|
|
90
91
|
}
|
|
@@ -101,7 +102,7 @@ function ue({
|
|
|
101
102
|
roleCodes: []
|
|
102
103
|
});
|
|
103
104
|
}), l;
|
|
104
|
-
}, [M, m]),
|
|
105
|
+
}, [M, m]), k = J(() => {
|
|
105
106
|
const l = [...v];
|
|
106
107
|
return m.forEach((r) => {
|
|
107
108
|
r.approverRoleCode && !l.some((t) => t.roleCode === r.approverRoleCode) && l.push({
|
|
@@ -109,7 +110,7 @@ function ue({
|
|
|
109
110
|
roleName: r.approverRoleName
|
|
110
111
|
});
|
|
111
112
|
}), l;
|
|
112
|
-
}, [v, m]), K = (l) => l.approverType === "ROLE" ? l.approverRoleCode ? `role:${l.approverRoleCode}` : "" : l.approverId ? `user:${l.approverId}` : "",
|
|
113
|
+
}, [v, m]), K = (l) => l.approverType === "ROLE" ? l.approverRoleCode ? `role:${l.approverRoleCode}` : "" : l.approverId ? `user:${l.approverId}` : "", j = (l) => {
|
|
113
114
|
s || (z(l), w(Z(l)));
|
|
114
115
|
}, n = () => {
|
|
115
116
|
w(
|
|
@@ -123,7 +124,7 @@ function ue({
|
|
|
123
124
|
);
|
|
124
125
|
}, C = !P && !D && !!f.trim() && m.length > 0 && m.every(
|
|
125
126
|
(l) => !!l.name.trim() && (h || (l.approverType === "ROLE" ? !!l.approverRoleCode : !!l.approverId))
|
|
126
|
-
),
|
|
127
|
+
), x = async () => {
|
|
127
128
|
if (!C) {
|
|
128
129
|
q(
|
|
129
130
|
"无法保存模板",
|
|
@@ -197,7 +198,7 @@ function ue({
|
|
|
197
198
|
{
|
|
198
199
|
className: "select",
|
|
199
200
|
value: u,
|
|
200
|
-
onChange: (l) =>
|
|
201
|
+
onChange: (l) => j(l.target.value),
|
|
201
202
|
children: [
|
|
202
203
|
/* @__PURE__ */ e("option", { value: "SYSTEM_PERMISSION", children: "系统权限申请 · 菜单权限,指定成员或角色" }),
|
|
203
204
|
/* @__PURE__ */ e("option", { value: "KB_ACCESS", children: "知识库权限申请 · 库管理员任一通过" })
|
|
@@ -221,7 +222,7 @@ function ue({
|
|
|
221
222
|
/* @__PURE__ */ e("b", { children: "审批人与角色读取失败" }),
|
|
222
223
|
/* @__PURE__ */ e("p", { children: "关闭后重新打开可重试。" })
|
|
223
224
|
] })
|
|
224
|
-
] }) : !T.length && !
|
|
225
|
+
] }) : !T.length && !k.length ? /* @__PURE__ */ a("div", { className: "callout warn", children: [
|
|
225
226
|
/* @__PURE__ */ e(c, { name: "alert-triangle", size: 14 }),
|
|
226
227
|
/* @__PURE__ */ a("div", { className: "ct", children: [
|
|
227
228
|
/* @__PURE__ */ e("b", { children: "没有可选审批人" }),
|
|
@@ -268,7 +269,7 @@ function ue({
|
|
|
268
269
|
onChange: (t) => {
|
|
269
270
|
const S = t.target.value;
|
|
270
271
|
if (S.startsWith("role:")) {
|
|
271
|
-
const A = S.slice(5), $ =
|
|
272
|
+
const A = S.slice(5), $ = k.find((F) => F.roleCode === A);
|
|
272
273
|
g(l.key, {
|
|
273
274
|
approverType: "ROLE",
|
|
274
275
|
approverRoleCode: A,
|
|
@@ -302,7 +303,7 @@ function ue({
|
|
|
302
303
|
},
|
|
303
304
|
t.staffId
|
|
304
305
|
)) }) : null,
|
|
305
|
-
|
|
306
|
+
k.length ? /* @__PURE__ */ e("optgroup", { label: "角色(任一成员通过)", children: k.map((t) => /* @__PURE__ */ e("option", { value: `role:${t.roleCode}`, children: t.roleName || t.roleCode }, t.roleCode)) }) : null
|
|
306
307
|
]
|
|
307
308
|
}
|
|
308
309
|
)
|
|
@@ -325,9 +326,9 @@ function ue({
|
|
|
325
326
|
] })
|
|
326
327
|
] }),
|
|
327
328
|
footLeft: s ? /* @__PURE__ */ e("span", { className: "mono", children: s.code }) : "保存后生成 v 版本",
|
|
328
|
-
footRight: /* @__PURE__ */ a(
|
|
329
|
+
footRight: /* @__PURE__ */ a(U, { children: [
|
|
329
330
|
/* @__PURE__ */ e("button", { className: "btn", type: "button", onClick: d, children: "取消" }),
|
|
330
|
-
/* @__PURE__ */ a("button", { className: "btn primary", type: "button", disabled: !C, onClick:
|
|
331
|
+
/* @__PURE__ */ a("button", { className: "btn primary", type: "button", disabled: !C, onClick: x, children: [
|
|
331
332
|
D ? /* @__PURE__ */ e("span", { className: "spinner" }) : /* @__PURE__ */ e(c, { name: "check", size: 12 }),
|
|
332
333
|
s ? "发布新版本" : "保存并发布"
|
|
333
334
|
] })
|
|
@@ -337,7 +338,7 @@ function ue({
|
|
|
337
338
|
}
|
|
338
339
|
const ve = (s) => s instanceof Error ? s.message : "请稍后重试";
|
|
339
340
|
function Ne() {
|
|
340
|
-
const { can: s } =
|
|
341
|
+
const { can: s } = Q(), d = s("approval.template.manage"), [b, f] = o([]), [p, u] = o(!0), [z, m] = o(""), [w, M] = o(0), [E, v] = o(null);
|
|
341
342
|
O(() => {
|
|
342
343
|
let i = !0;
|
|
343
344
|
return (async () => {
|
|
@@ -355,7 +356,7 @@ function Ne() {
|
|
|
355
356
|
};
|
|
356
357
|
}, [w]);
|
|
357
358
|
const R = () => M((i) => i + 1);
|
|
358
|
-
return /* @__PURE__ */ a(
|
|
359
|
+
return /* @__PURE__ */ a(U, { children: [
|
|
359
360
|
/* @__PURE__ */ a("div", { className: "view-bar admin-list-bar", children: [
|
|
360
361
|
/* @__PURE__ */ e(Y, {}),
|
|
361
362
|
/* @__PURE__ */ a("div", { className: "admin-list-bar-tools", children: [
|
|
@@ -431,10 +432,10 @@ function Ne() {
|
|
|
431
432
|
"新建模板"
|
|
432
433
|
] }) : null
|
|
433
434
|
] }) }),
|
|
434
|
-
|
|
435
|
+
E ? /* @__PURE__ */ e(
|
|
435
436
|
ue,
|
|
436
437
|
{
|
|
437
|
-
template:
|
|
438
|
+
template: E.template,
|
|
438
439
|
onClose: () => v(null),
|
|
439
440
|
onSaved: () => {
|
|
440
441
|
v(null), R();
|
|
@@ -455,7 +456,7 @@ const V = 20, be = [
|
|
|
455
456
|
size: V
|
|
456
457
|
});
|
|
457
458
|
function ye() {
|
|
458
|
-
const [s, d] = o(H), [b, f] = o(!0), [p, u] = o(""), [z, m] = o(""), [w, M] = o(""), [
|
|
459
|
+
const [s, d] = o(H), [b, f] = o(!0), [p, u] = o(""), [z, m] = o(""), [w, M] = o(""), [E, v] = o(1), [R, P] = o(0), [i, N] = o(null), [y, D] = o({});
|
|
459
460
|
O(() => {
|
|
460
461
|
let n = !0;
|
|
461
462
|
return ie().then((I) => {
|
|
@@ -472,20 +473,20 @@ function ye() {
|
|
|
472
473
|
const _ = de(() => {
|
|
473
474
|
f(!0), u(""), ce({
|
|
474
475
|
view: "all",
|
|
475
|
-
current:
|
|
476
|
+
current: E,
|
|
476
477
|
size: V,
|
|
477
478
|
status: w || void 0,
|
|
478
479
|
keyword: z.trim() || void 0
|
|
479
480
|
}).then((n) => d(n)).catch((n) => {
|
|
480
481
|
u(fe(n)), d(H());
|
|
481
482
|
}).finally(() => f(!1));
|
|
482
|
-
}, [
|
|
483
|
+
}, [E, w, z]);
|
|
483
484
|
O(() => {
|
|
484
485
|
(async () => await _())();
|
|
485
486
|
}, [_, R]);
|
|
486
|
-
const h = () => P((n) => n + 1), T = Math.max(1, Math.ceil(s.total / V)),
|
|
487
|
+
const h = () => P((n) => n + 1), T = Math.max(1, Math.ceil(s.total / V)), k = Math.min(E, T), K = () => {
|
|
487
488
|
v(1), h();
|
|
488
|
-
},
|
|
489
|
+
}, j = () => b && !s.records.length ? /* @__PURE__ */ a("div", { className: "empty", role: "status", children: [
|
|
489
490
|
/* @__PURE__ */ e("span", { className: "empty-icon", children: /* @__PURE__ */ e("span", { className: "spinner" }) }),
|
|
490
491
|
/* @__PURE__ */ e("b", { children: "正在读取审批单…" })
|
|
491
492
|
] }) : p ? /* @__PURE__ */ a("div", { className: "callout danger", style: { margin: 20 }, children: [
|
|
@@ -519,14 +520,14 @@ function ye() {
|
|
|
519
520
|
] }) }),
|
|
520
521
|
/* @__PURE__ */ e("td", { children: n.applicantName || "—" }),
|
|
521
522
|
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ a("div", { className: "tag-list", children: [
|
|
522
|
-
g.slice(0, 2).map((C,
|
|
523
|
+
g.slice(0, 2).map((C, x) => /* @__PURE__ */ e(
|
|
523
524
|
"span",
|
|
524
525
|
{
|
|
525
526
|
className: "tag gray sm",
|
|
526
527
|
title: g.join("、"),
|
|
527
528
|
children: C
|
|
528
529
|
},
|
|
529
|
-
`${n.id}-${n.resourceCodes[
|
|
530
|
+
`${n.id}-${n.resourceCodes[x]}`
|
|
530
531
|
)),
|
|
531
532
|
g.length > 2 ? /* @__PURE__ */ a("span", { className: "tag gray sm", title: g.join("、"), children: [
|
|
532
533
|
"+",
|
|
@@ -550,7 +551,7 @@ function ye() {
|
|
|
550
551
|
/* @__PURE__ */ e("b", { children: "没有匹配的审批单" }),
|
|
551
552
|
/* @__PURE__ */ e("p", { children: "换个状态或关键字再试。" })
|
|
552
553
|
] });
|
|
553
|
-
return /* @__PURE__ */ a(
|
|
554
|
+
return /* @__PURE__ */ a(U, { children: [
|
|
554
555
|
/* @__PURE__ */ a("div", { className: "view-bar admin-list-bar", children: [
|
|
555
556
|
/* @__PURE__ */ e(Y, {}),
|
|
556
557
|
/* @__PURE__ */ a("div", { className: "admin-list-bar-tools", children: [
|
|
@@ -590,13 +591,13 @@ function ye() {
|
|
|
590
591
|
] })
|
|
591
592
|
] }),
|
|
592
593
|
/* @__PURE__ */ a("section", { className: "panel admin-list-panel", children: [
|
|
593
|
-
|
|
594
|
+
j(),
|
|
594
595
|
/* @__PURE__ */ a("div", { className: "admin-list-pager", children: [
|
|
595
596
|
/* @__PURE__ */ a("span", { className: "note", children: [
|
|
596
597
|
"共 ",
|
|
597
598
|
s.total,
|
|
598
599
|
" 条 · 第 ",
|
|
599
|
-
|
|
600
|
+
k,
|
|
600
601
|
" / ",
|
|
601
602
|
T,
|
|
602
603
|
" 页"
|
|
@@ -608,8 +609,8 @@ function ye() {
|
|
|
608
609
|
type: "button",
|
|
609
610
|
title: "上一页",
|
|
610
611
|
"aria-label": "上一页",
|
|
611
|
-
disabled:
|
|
612
|
-
onClick: () => v(
|
|
612
|
+
disabled: k <= 1,
|
|
613
|
+
onClick: () => v(k - 1),
|
|
613
614
|
children: /* @__PURE__ */ e(c, { name: "chevron-left", size: 12 })
|
|
614
615
|
}
|
|
615
616
|
),
|
|
@@ -617,7 +618,7 @@ function ye() {
|
|
|
617
618
|
"button",
|
|
618
619
|
{
|
|
619
620
|
type: "button",
|
|
620
|
-
className: n ===
|
|
621
|
+
className: n === k ? "active" : "",
|
|
621
622
|
onClick: () => v(n),
|
|
622
623
|
children: n
|
|
623
624
|
},
|
|
@@ -629,8 +630,8 @@ function ye() {
|
|
|
629
630
|
type: "button",
|
|
630
631
|
title: "下一页",
|
|
631
632
|
"aria-label": "下一页",
|
|
632
|
-
disabled:
|
|
633
|
-
onClick: () => v(
|
|
633
|
+
disabled: k >= T,
|
|
634
|
+
onClick: () => v(k + 1),
|
|
634
635
|
children: /* @__PURE__ */ e(c, { name: "chevron-right", size: 12 })
|
|
635
636
|
}
|
|
636
637
|
)
|
|
@@ -648,9 +649,9 @@ function ye() {
|
|
|
648
649
|
) : null
|
|
649
650
|
] });
|
|
650
651
|
}
|
|
651
|
-
function
|
|
652
|
-
const { can: s } =
|
|
653
|
-
return /* @__PURE__ */ e("div", { className: "view admin-list-page", children: b === "template" ? /* @__PURE__ */ e(Ne, {}) : f ? /* @__PURE__ */ e(ye, {}) : /* @__PURE__ */ a(
|
|
652
|
+
function Ie() {
|
|
653
|
+
const { can: s } = Q(), [d] = X(), b = d.get("tab") === "ticket" ? "ticket" : "template", f = s("approval.view");
|
|
654
|
+
return /* @__PURE__ */ e("div", { className: "view admin-list-page", children: b === "template" ? /* @__PURE__ */ e(Ne, {}) : f ? /* @__PURE__ */ e(ye, {}) : /* @__PURE__ */ a(U, { children: [
|
|
654
655
|
/* @__PURE__ */ e("div", { className: "view-bar admin-list-bar", children: /* @__PURE__ */ e(Y, {}) }),
|
|
655
656
|
/* @__PURE__ */ e("section", { className: "panel admin-list-panel", children: /* @__PURE__ */ a("div", { className: "empty", children: [
|
|
656
657
|
/* @__PURE__ */ e("span", { className: "empty-icon", children: /* @__PURE__ */ e(c, { name: "shield", size: 20 }) }),
|
|
@@ -660,5 +661,5 @@ function Te() {
|
|
|
660
661
|
] }) });
|
|
661
662
|
}
|
|
662
663
|
export {
|
|
663
|
-
|
|
664
|
+
Ie as default
|
|
664
665
|
};
|