@yuku123/z-team-component 0.2.80 → 0.2.83
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/ChangeLogView-_bRZ55Yi.js +542 -0
- package/dist/ComponentDoc-BFoF51we.js +3998 -0
- package/dist/InvitationManagementPage-CTPCZXHu.js +495 -0
- package/dist/OnboardingPage-DwtuTL61.js +393 -0
- package/dist/ScheduledTasks-yeTm2bOY.js +9407 -0
- package/dist/SystemShell-D9OzKxL-.js +689 -0
- package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
- package/dist/api-CIhVblfa.js +2155 -0
- package/dist/api-DXLNhtCX.js +20 -0
- package/dist/browser-jb_PFvU3.js +1538 -0
- package/dist/createWorkspaceWsHandler-BWP5S5X3.js +12951 -0
- package/dist/ctc-sso-DtJHC-2M.js +117 -0
- package/dist/echarts-B1OU1xr4.js +16 -0
- package/dist/history-BlrA1eaW.js +41 -0
- package/dist/index-BCp5EtqR.js +914 -0
- package/dist/index-BHrMl3Jq.js +9585 -0
- package/dist/index-BP7WTzVH.js +137 -0
- package/dist/index-B_LJRFsK.js +339 -0
- package/dist/index-BgIheStI.js +133 -0
- package/dist/index-BohoJQPr.js +7631 -0
- package/dist/index-BydWNuk5.js +1229 -0
- package/dist/index-C815hPWS.js +430 -0
- package/dist/index-CBQMS6rx.js +178 -0
- package/dist/index-CESmMALI.js +242 -0
- package/dist/index-CUVdeb8y.js +638 -0
- package/dist/index-CijskN6t.js +316 -0
- package/dist/index-CoBZZQBy.js +112 -0
- package/dist/index-Co_0idJY.js +2936 -0
- package/dist/index-Cvx6rrxD.js +956 -0
- package/dist/index-Cwr5Slv1.js +480 -0
- package/dist/index-CxFAICql.js +42050 -0
- package/dist/index-DK70mOTz.js +143 -0
- package/dist/index-DT80Pwa_.js +5893 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-DhDdFRHC.js +279 -0
- package/dist/index-Dm3wmB0K.js +435 -0
- package/dist/index-DzS6-D3M.js +1640 -0
- package/dist/index-PKkV63Sw.js +1143 -0
- package/dist/index-SbMjh8t4.js +574 -0
- package/dist/index-cdB5K3gx.js +814 -0
- package/dist/index-mnWs_wA3.js +93 -0
- package/dist/index-nU-V276i.js +170 -0
- package/dist/index-nW0ikV2R.js +2700 -0
- package/dist/index-uF04Ucsi.js +8 -0
- package/dist/index-x_7Rmav9.js +118 -0
- package/dist/index.js +10 -0
- package/dist/index.module-CAa-2T7m.js +72 -0
- package/dist/index.module-UI0iz8K0.js +42 -0
- package/dist/{menuPermission-D9NGpBZP.js → menuPermission-DHUqvHfu.js} +1 -1
- package/dist/pages.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as c, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { i as $, t as x, p as O, c as b, b as v } from "./api-CIhVblfa.js";
|
|
3
|
+
import { CheckCircleFilled as F } from "@ant-design/icons";
|
|
4
|
+
import { Result as D, Button as R, Spin as U } from "antd";
|
|
5
|
+
import B from "query-string";
|
|
6
|
+
import { useMemo as j, useState as f, useRef as q, useCallback as A, useEffect as J } from "react";
|
|
7
|
+
import { useLocation as W } from "react-router-dom";
|
|
8
|
+
import { h as y } from "./history-BlrA1eaW.js";
|
|
9
|
+
import { l as Z, j as z, f as H, b as L, p as M } from "./instance-CDmueqyu.js";
|
|
10
|
+
import { u as w } from "./useAppStore-BBr_Fwsz.js";
|
|
11
|
+
import { b as N } from "./mobile-client-O3yr9h6t.js";
|
|
12
|
+
function ct() {
|
|
13
|
+
const m = W(), p = B.parse(m.search), o = String(
|
|
14
|
+
p.projectId ?? p.project_id ?? ""
|
|
15
|
+
).trim(), a = String(p.ticketId ?? p.ticket_id ?? "").trim(), e = j(() => {
|
|
16
|
+
if (!o)
|
|
17
|
+
return null;
|
|
18
|
+
const t = x(o);
|
|
19
|
+
return $(t) ? t : null;
|
|
20
|
+
}, [o]), u = w((t) => t.token), T = w((t) => t.expandProject), [h, l] = f(""), [P, n] = f("正在启动…"), [k, C] = f([]), g = q(!1), i = A((t, r) => {
|
|
21
|
+
C((s) => [...s, t]), n(r);
|
|
22
|
+
}, []), I = async (t) => {
|
|
23
|
+
i("协作区已就绪", "正在同步工程列表…"), await T(t), i("工作区已准备", "即将进入工作台…"), y.replace(
|
|
24
|
+
N({
|
|
25
|
+
projectId: t.id,
|
|
26
|
+
search: m.search
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
}, d = async (t) => {
|
|
30
|
+
n("正在确认工程信息…");
|
|
31
|
+
const r = await Z(t, u);
|
|
32
|
+
if (r.status === "NOT_FOUND" || !r.scenarioInstance)
|
|
33
|
+
throw new Error("PROJECT_NOT_FOUND");
|
|
34
|
+
n("正在加入协作区…");
|
|
35
|
+
const s = await z(t, u);
|
|
36
|
+
i("已加入协作区", "正在打开协作区…"), await I(s);
|
|
37
|
+
}, E = async () => {
|
|
38
|
+
n("正在检查工单信息…");
|
|
39
|
+
const t = await H(a);
|
|
40
|
+
i("工单信息已获取", "正在解析工程绑定…");
|
|
41
|
+
const r = O(t);
|
|
42
|
+
if (r != null) {
|
|
43
|
+
i("已定位协作区", `正在打开协作区 ${r}…`), await d(r);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
n("正在初始化工程…");
|
|
47
|
+
const s = await b(
|
|
48
|
+
L(t, a),
|
|
49
|
+
u
|
|
50
|
+
);
|
|
51
|
+
n("正在关联工单…");
|
|
52
|
+
try {
|
|
53
|
+
await v(
|
|
54
|
+
a,
|
|
55
|
+
s.id,
|
|
56
|
+
M(t)
|
|
57
|
+
);
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
n("正在初始化工作区…"), await I(s);
|
|
61
|
+
};
|
|
62
|
+
J(() => {
|
|
63
|
+
if (!g.current) {
|
|
64
|
+
if (g.current = !0, o && e == null) {
|
|
65
|
+
l("projectId 无效,请传入正整数");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (e == null && !a) {
|
|
69
|
+
l("缺少参数:请提供 projectId 和/或 ticketId");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (e != null && !a) {
|
|
73
|
+
(async () => {
|
|
74
|
+
try {
|
|
75
|
+
n(`正在打开协作区 ${e}…`), await d(e);
|
|
76
|
+
} catch (t) {
|
|
77
|
+
const r = t instanceof Error ? t.message : String(t);
|
|
78
|
+
l(r || "打开工程失败");
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (!a) {
|
|
84
|
+
l("缺少 ticketId");
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
(async () => {
|
|
88
|
+
try {
|
|
89
|
+
if (e != null)
|
|
90
|
+
try {
|
|
91
|
+
n(`正在打开指定协作区 ${e}…`), await d(e);
|
|
92
|
+
return;
|
|
93
|
+
} catch (t) {
|
|
94
|
+
if (!(t instanceof Error && t.message === "PROJECT_NOT_FOUND"))
|
|
95
|
+
throw t;
|
|
96
|
+
n("正在按工单重新查找…");
|
|
97
|
+
}
|
|
98
|
+
await E();
|
|
99
|
+
} catch (t) {
|
|
100
|
+
const r = t instanceof Error ? t.message : String(t);
|
|
101
|
+
l(r || "打开工程失败");
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
104
|
+
}
|
|
105
|
+
}, [i, e, o, a, u]);
|
|
106
|
+
const S = j(() => e != null && a ? `工单 ${a} · 工程 ${e}` : e != null ? `工程 ${e}` : a ? `工单 ${a}` : "", [e, a]);
|
|
107
|
+
return h ? /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ c(
|
|
108
|
+
D,
|
|
109
|
+
{
|
|
110
|
+
status: "error",
|
|
111
|
+
title: "无法打开工程",
|
|
112
|
+
subTitle: h,
|
|
113
|
+
extra: /* @__PURE__ */ c(
|
|
114
|
+
R,
|
|
115
|
+
{
|
|
116
|
+
type: "primary",
|
|
117
|
+
onClick: () => y.replace(
|
|
118
|
+
N({ search: m.search })
|
|
119
|
+
),
|
|
120
|
+
children: "返回工作台"
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
) }) : /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ _("div", { className: "from-ticket-page__panel", children: [
|
|
125
|
+
/* @__PURE__ */ c(U, { size: "large" }),
|
|
126
|
+
/* @__PURE__ */ c("p", { className: "from-ticket-page__step", children: P }),
|
|
127
|
+
S ? /* @__PURE__ */ c("p", { className: "from-ticket-page__hint", children: S }) : null,
|
|
128
|
+
k.length > 0 ? /* @__PURE__ */ c("ul", { className: "from-ticket-page__done-list", children: k.filter((t) => t.trim().length > 0).map((t, r) => /* @__PURE__ */ _(
|
|
129
|
+
"li",
|
|
130
|
+
{
|
|
131
|
+
className: "from-ticket-page__done-item",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ c(F, { className: "from-ticket-page__done-icon" }),
|
|
134
|
+
/* @__PURE__ */ c("span", { children: t })
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
`${r}-${t}`
|
|
138
|
+
)) }) : null
|
|
139
|
+
] }) });
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
ct as default
|
|
143
|
+
};
|