@hkyhy/marsun-components-core 0.1.141 → 0.1.143
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/components/Tools/Inbox/InboxBell/InboxBell.d.ts +2 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.d.ts +7 -0
- package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.js +60 -45
- package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/index.d.ts +1 -1
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +80 -80
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +134 -142
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -1
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.d.ts +6 -5
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.js +233 -194
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.js.map +1 -1
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +1 -1
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +24 -3
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -1
- package/dist/components/Tools/MessageCenter/index.d.ts +1 -1
- package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.d.ts +11 -5
- package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.js +15 -26
- package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.js.map +1 -1
- package/dist/components/Tools/index.d.ts +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { message as r, Modal as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { normalizeAudienceSlots as
|
|
5
|
-
import { resolveTemplateCodeAfterEventChange as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { message as r, Modal as fe, Switch as Se, Space as ve, Button as q } from "antd";
|
|
3
|
+
import { useState as u, useCallback as ee, useEffect as D, useMemo as d } from "react";
|
|
4
|
+
import { normalizeAudienceSlots as he, hasAudienceSelection as Ce, ORG_TENANT_SLOT as we, AUDIENCE_SLOT_OPTIONS as Ie } from "../audienceSlots.js";
|
|
5
|
+
import { resolveTemplateCodeAfterEventChange as ke } from "../../utils/adminGuards.js";
|
|
6
|
+
import { buildAudienceUserSelectOptions as le } from "../../utils/audienceUserSelectOptions.js";
|
|
7
|
+
import ge from "../style.module.scss.js";
|
|
8
|
+
import { createPagedSuperSelectApi as Ke, pagedSuperSelectGetSearchProps as Te, pagedSuperSelectPagination as Ee } from "../../../../Form/createPagedSuperSelectApi.js";
|
|
9
|
+
import { SuperSelect as ne } from "../../../../Form/SuperSelect.js";
|
|
8
10
|
import L from "../../../../Alert/Alert.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Select as
|
|
15
|
-
const
|
|
11
|
+
import Ue from "../../../../Layout/PageSpin/index.js";
|
|
12
|
+
import ae from "../../../../Empty/Empty.js";
|
|
13
|
+
import Fe from "../../../../Table/Table.js";
|
|
14
|
+
import xe from "../../../../FormInfo/FormModal.js";
|
|
15
|
+
import Ae from "../../../../FormInfo/FormInfo.js";
|
|
16
|
+
import { Select as De, Input as Le, InputNumber as Pe } from "../../../../FormInfo/fields.js";
|
|
17
|
+
const C = De, _e = Le, te = Pe, w = {
|
|
16
18
|
getPopupContainer: () => document.body,
|
|
17
19
|
styles: { popup: { root: { zIndex: 2e3 } } }
|
|
18
|
-
},
|
|
20
|
+
}, P = 20, ze = "规则匹配 emit 时带 level 会对齐所选档;选项由业务注入(各系统档位不同)。", qe = ({
|
|
19
21
|
crud: I,
|
|
20
22
|
catalog: i,
|
|
21
|
-
templates:
|
|
22
|
-
roleOptions:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
levelOptions:
|
|
27
|
-
defaultLevels:
|
|
28
|
-
levelFieldTips:
|
|
29
|
-
fetchPushRules:
|
|
30
|
-
savePushRule:
|
|
31
|
-
setPushRuleEnabled:
|
|
32
|
-
deletePushRule:
|
|
33
|
-
createNonce:
|
|
23
|
+
templates: k,
|
|
24
|
+
roleOptions: _,
|
|
25
|
+
audienceRolesError: b = "",
|
|
26
|
+
fetchAudienceUsersPage: E,
|
|
27
|
+
fetchAudienceUsersByIds: U,
|
|
28
|
+
levelOptions: F = [],
|
|
29
|
+
defaultLevels: z = [],
|
|
30
|
+
levelFieldTips: oe = ze,
|
|
31
|
+
fetchPushRules: N,
|
|
32
|
+
savePushRule: O,
|
|
33
|
+
setPushRuleEnabled: y,
|
|
34
|
+
deletePushRule: x,
|
|
35
|
+
createNonce: $ = 0
|
|
34
36
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
+
const g = I.create, c = I.update, H = I.delete, se = I.read, m = (e) => e ? g : c, [B, M] = u([]), [G, R] = u(!1), [j, Q] = u(""), [l, f] = u(null), [s, V] = u(!1), [re, W] = u([]), [ie, ce] = u(0), p = ee(async () => {
|
|
38
|
+
R(!0), Q("");
|
|
37
39
|
try {
|
|
38
|
-
const e = await
|
|
39
|
-
|
|
40
|
+
const e = await N();
|
|
41
|
+
M(Array.isArray(e) ? e : []);
|
|
40
42
|
} catch (e) {
|
|
41
|
-
|
|
43
|
+
Q(e instanceof Error ? e.message : String(e)), M([]);
|
|
42
44
|
} finally {
|
|
43
|
-
|
|
45
|
+
R(!1);
|
|
44
46
|
}
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
if (
|
|
50
|
-
const e = i[0], n =
|
|
51
|
-
|
|
47
|
+
}, [N]);
|
|
48
|
+
D(() => {
|
|
49
|
+
p();
|
|
50
|
+
}, [p]), D(() => {
|
|
51
|
+
if (!$ || !g) return;
|
|
52
|
+
const e = i[0], n = k.find((t) => t.eventKey === (e == null ? void 0 : e.eventKey));
|
|
53
|
+
V(!0), f({
|
|
52
54
|
label: (e == null ? void 0 : e.label) || "新建推送规则",
|
|
53
55
|
eventKey: (e == null ? void 0 : e.eventKey) || "",
|
|
54
56
|
templateCode: (n == null ? void 0 : n.code) || "",
|
|
55
|
-
levels: Array.isArray(
|
|
57
|
+
levels: Array.isArray(z) ? [...z] : [],
|
|
56
58
|
audienceRoles: [],
|
|
57
59
|
audienceUserIds: [],
|
|
58
60
|
audienceSlots: [],
|
|
@@ -61,24 +63,70 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
61
63
|
scanLookbackDays: 7,
|
|
62
64
|
enabled: !0
|
|
63
65
|
});
|
|
64
|
-
}, [
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
}, [$, g, i, k]), D(() => {
|
|
67
|
+
if (!l) {
|
|
68
|
+
W([]);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
let e = !1;
|
|
72
|
+
const n = (l.audienceUserIds || []).filter(Boolean);
|
|
73
|
+
return (async () => {
|
|
74
|
+
let t = [];
|
|
75
|
+
if (n.length && U)
|
|
76
|
+
try {
|
|
77
|
+
t = (await U(n)).filter((a) => a == null ? void 0 : a.id);
|
|
78
|
+
} catch {
|
|
79
|
+
t = n.map((a) => ({ id: a, name: a }));
|
|
80
|
+
}
|
|
81
|
+
else n.length && (t = n.map((a) => ({ id: a, name: a })));
|
|
82
|
+
e || (W(le(t)), ce((a) => a + 1));
|
|
83
|
+
})(), () => {
|
|
84
|
+
e = !0;
|
|
85
|
+
};
|
|
86
|
+
}, [l, U]);
|
|
87
|
+
const Z = d(() => {
|
|
88
|
+
if (E)
|
|
89
|
+
return Ke({
|
|
90
|
+
pageSize: P,
|
|
91
|
+
loadPage: async (e) => {
|
|
92
|
+
const n = await E({
|
|
93
|
+
page: e.currentPage,
|
|
94
|
+
pageSize: e.pageSize,
|
|
95
|
+
keyword: e.keyword
|
|
96
|
+
}), t = le((n == null ? void 0 : n.items) || []).map((a) => ({
|
|
97
|
+
value: a.value,
|
|
98
|
+
label: a.label,
|
|
99
|
+
description: a.description
|
|
100
|
+
}));
|
|
101
|
+
return {
|
|
102
|
+
pageData: t,
|
|
103
|
+
totalCount: typeof (n == null ? void 0 : n.total) == "number" ? n.total : t.length
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
onError: (e) => {
|
|
107
|
+
r.error(e instanceof Error ? e.message : "例外抄送人员加载失败");
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}, [E]), de = d(
|
|
111
|
+
() => Te(P),
|
|
112
|
+
[]
|
|
113
|
+
), me = d(
|
|
114
|
+
() => Ee(P),
|
|
115
|
+
[]
|
|
116
|
+
), S = ee(
|
|
117
|
+
(e) => k.filter((n) => !e || n.eventKey === e).map((n) => ({
|
|
67
118
|
value: String(n.code || ""),
|
|
68
119
|
label: `${n.label || n.code || ""}(${n.code || ""})`
|
|
69
120
|
})).filter((n) => n.value),
|
|
70
|
-
[
|
|
71
|
-
),
|
|
72
|
-
() =>
|
|
73
|
-
[
|
|
74
|
-
),
|
|
121
|
+
[k]
|
|
122
|
+
), J = d(
|
|
123
|
+
() => S(l == null ? void 0 : l.eventKey),
|
|
124
|
+
[S, l == null ? void 0 : l.eventKey]
|
|
125
|
+
), pe = d(() => {
|
|
75
126
|
var n;
|
|
76
127
|
const e = l == null ? void 0 : l.eventKey;
|
|
77
|
-
return ((n = i.find((
|
|
78
|
-
}, [i, l == null ? void 0 : l.eventKey]),
|
|
79
|
-
() => be(A),
|
|
80
|
-
[A]
|
|
81
|
-
), q = p(
|
|
128
|
+
return ((n = i.find((t) => t.eventKey === e)) == null ? void 0 : n.label) || e || "当前场景";
|
|
129
|
+
}, [i, l == null ? void 0 : l.eventKey]), K = !!l && J.length === 0, X = d(
|
|
82
130
|
() => ({
|
|
83
131
|
label: l == null ? void 0 : l.label,
|
|
84
132
|
eventKey: l == null ? void 0 : l.eventKey,
|
|
@@ -91,59 +139,59 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
91
139
|
scanLookbackDays: (l == null ? void 0 : l.scanLookbackDays) ?? 0
|
|
92
140
|
}),
|
|
93
141
|
[l]
|
|
94
|
-
),
|
|
142
|
+
), ue = d(
|
|
95
143
|
() => ({
|
|
96
|
-
data:
|
|
144
|
+
data: X,
|
|
97
145
|
onSubmit: async (e) => {
|
|
98
146
|
if (!m(s) || !l)
|
|
99
147
|
return r.warning("当前为只读"), !1;
|
|
100
|
-
const n = String(l.eventKey || e.eventKey || "").trim(),
|
|
148
|
+
const n = String(l.eventKey || e.eventKey || "").trim(), t = String(e.templateCode || "").trim();
|
|
101
149
|
if (!n)
|
|
102
150
|
return r.warning("请选择事件"), !1;
|
|
103
|
-
if (!
|
|
151
|
+
if (!t)
|
|
104
152
|
return r.warning("请关联模板编号"), !1;
|
|
105
|
-
if (
|
|
153
|
+
if (S(n).length === 0)
|
|
106
154
|
return r.warning("该场景暂无消息模板,请先到「消息模板」新建后再关联"), !1;
|
|
107
|
-
const
|
|
108
|
-
if (!
|
|
109
|
-
roles:
|
|
110
|
-
slots:
|
|
111
|
-
userIds:
|
|
155
|
+
const a = e.audienceRoles || [], v = e.audienceUserIds || [], h = he(e.audienceSlots || []);
|
|
156
|
+
if (!Ce({
|
|
157
|
+
roles: a,
|
|
158
|
+
slots: h,
|
|
159
|
+
userIds: v
|
|
112
160
|
}))
|
|
113
161
|
return r.warning("请选择受众角色、通知范围或例外抄送(至少一个)"), !1;
|
|
114
|
-
if (
|
|
115
|
-
|
|
162
|
+
if (h.includes(we) && !await new Promise((Y) => {
|
|
163
|
+
fe.confirm({
|
|
116
164
|
title: "确认通知本租户全员?",
|
|
117
165
|
content: "已选「本租户(全公司)」:将向当前租户内用户展开(≠跨租户)。emit 时按页拉取,可能人数较多。确认保存?",
|
|
118
166
|
okText: "确认保存",
|
|
119
167
|
cancelText: "取消",
|
|
120
|
-
onOk: () =>
|
|
121
|
-
onCancel: () =>
|
|
168
|
+
onOk: () => Y(!0),
|
|
169
|
+
onCancel: () => Y(!1)
|
|
122
170
|
});
|
|
123
171
|
}))
|
|
124
172
|
return !1;
|
|
125
173
|
try {
|
|
126
|
-
await
|
|
174
|
+
await O({
|
|
127
175
|
...l,
|
|
128
176
|
label: String(e.label || l.label || "").trim() || n,
|
|
129
177
|
eventKey: n,
|
|
130
|
-
templateCode:
|
|
178
|
+
templateCode: t,
|
|
131
179
|
levels: e.levels || [],
|
|
132
|
-
audienceRoles:
|
|
133
|
-
audienceUserIds:
|
|
134
|
-
audienceSlots:
|
|
180
|
+
audienceRoles: a,
|
|
181
|
+
audienceUserIds: v,
|
|
182
|
+
audienceSlots: h,
|
|
135
183
|
channels: ["in_app"],
|
|
136
184
|
slaHours: Number(e.slaHours ?? 0),
|
|
137
185
|
scanLookbackDays: Number(e.scanLookbackDays ?? 0),
|
|
138
186
|
enabled: s ? !0 : l.enabled !== !1
|
|
139
|
-
}), r.success("已保存"),
|
|
140
|
-
} catch (
|
|
141
|
-
return r.error(
|
|
187
|
+
}), r.success("已保存"), f(null), await p();
|
|
188
|
+
} catch (T) {
|
|
189
|
+
return r.error(T instanceof Error ? T.message : String(T)), !1;
|
|
142
190
|
}
|
|
143
191
|
}
|
|
144
192
|
}),
|
|
145
|
-
[
|
|
146
|
-
),
|
|
193
|
+
[g, c, l, X, s, p, O, S]
|
|
194
|
+
), be = d(
|
|
147
195
|
() => [
|
|
148
196
|
{ title: "名称", dataIndex: "label", key: "label", ellipsis: !0 },
|
|
149
197
|
{
|
|
@@ -152,7 +200,7 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
152
200
|
key: "eventKey",
|
|
153
201
|
render: (e) => {
|
|
154
202
|
var n;
|
|
155
|
-
return ((n = i.find((
|
|
203
|
+
return ((n = i.find((t) => t.eventKey === e)) == null ? void 0 : n.label) || e || "—";
|
|
156
204
|
}
|
|
157
205
|
},
|
|
158
206
|
{ title: "关联模板", dataIndex: "templateCode", key: "templateCode", width: 140 },
|
|
@@ -168,18 +216,18 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
168
216
|
dataIndex: "enabled",
|
|
169
217
|
key: "enabled",
|
|
170
218
|
width: 80,
|
|
171
|
-
render: (e, n) => /* @__PURE__ */
|
|
172
|
-
|
|
219
|
+
render: (e, n) => /* @__PURE__ */ o(
|
|
220
|
+
Se,
|
|
173
221
|
{
|
|
174
222
|
size: "small",
|
|
175
223
|
checked: n.enabled !== !1,
|
|
176
|
-
disabled: !c || !
|
|
177
|
-
onChange: (
|
|
224
|
+
disabled: !c || !y,
|
|
225
|
+
onChange: (t) => {
|
|
178
226
|
(async () => {
|
|
179
227
|
try {
|
|
180
|
-
await (
|
|
181
|
-
} catch (
|
|
182
|
-
r.error(
|
|
228
|
+
await (y == null ? void 0 : y(n, t)), await p();
|
|
229
|
+
} catch (a) {
|
|
230
|
+
r.error(a instanceof Error ? a.message : String(a));
|
|
183
231
|
}
|
|
184
232
|
})();
|
|
185
233
|
}
|
|
@@ -190,15 +238,15 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
190
238
|
title: "操作",
|
|
191
239
|
key: "actions",
|
|
192
240
|
width: 140,
|
|
193
|
-
render: (e, n) => /* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
|
|
241
|
+
render: (e, n) => /* @__PURE__ */ A(ve, { size: "small", children: [
|
|
242
|
+
/* @__PURE__ */ o(
|
|
243
|
+
q,
|
|
196
244
|
{
|
|
197
245
|
type: "link",
|
|
198
246
|
size: "small",
|
|
199
247
|
disabled: !c,
|
|
200
248
|
onClick: () => {
|
|
201
|
-
|
|
249
|
+
V(!1), f({
|
|
202
250
|
...n,
|
|
203
251
|
audienceRoles: n.audienceRoles || [],
|
|
204
252
|
audienceUserIds: n.audienceUserIds || [],
|
|
@@ -208,8 +256,8 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
208
256
|
children: "编辑"
|
|
209
257
|
}
|
|
210
258
|
),
|
|
211
|
-
H &&
|
|
212
|
-
|
|
259
|
+
H && x ? /* @__PURE__ */ o(
|
|
260
|
+
q,
|
|
213
261
|
{
|
|
214
262
|
type: "link",
|
|
215
263
|
size: "small",
|
|
@@ -217,9 +265,9 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
217
265
|
onClick: () => {
|
|
218
266
|
(async () => {
|
|
219
267
|
try {
|
|
220
|
-
await
|
|
221
|
-
} catch (
|
|
222
|
-
r.error(
|
|
268
|
+
await x(n), r.success("已删除"), await p();
|
|
269
|
+
} catch (t) {
|
|
270
|
+
r.error(t instanceof Error ? t.message : String(t));
|
|
223
271
|
}
|
|
224
272
|
})();
|
|
225
273
|
},
|
|
@@ -229,72 +277,91 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
229
277
|
] })
|
|
230
278
|
}
|
|
231
279
|
],
|
|
232
|
-
[c, H, i,
|
|
280
|
+
[c, H, i, x, p, y]
|
|
281
|
+
), ye = Z ? /* @__PURE__ */ o(
|
|
282
|
+
ne,
|
|
283
|
+
{
|
|
284
|
+
name: "audienceUserIds",
|
|
285
|
+
label: "例外抄送",
|
|
286
|
+
disabled: !m(s),
|
|
287
|
+
api: Z,
|
|
288
|
+
options: re,
|
|
289
|
+
getSearchProps: de,
|
|
290
|
+
pagination: me,
|
|
291
|
+
placeholder: "选择例外抄送人(可多选,日常可留空)",
|
|
292
|
+
searchPlaceholder: "搜索姓名/工号",
|
|
293
|
+
allowClear: !0,
|
|
294
|
+
overlayStyle: { zIndex: 2e3 },
|
|
295
|
+
labelTips: "非常驻名单:仅管理员例外通知等场景。SuperSelect 滚动分页;人多时优先搜姓名/工号。与角色、通知范围并集送达;任务当事人优先用槽位 + emit.audienceContext。"
|
|
296
|
+
},
|
|
297
|
+
`audienceUserIds-${(l == null ? void 0 : l.id) || (l == null ? void 0 : l.code) || "new"}-${ie}`
|
|
298
|
+
) : /* @__PURE__ */ o(
|
|
299
|
+
ne,
|
|
300
|
+
{
|
|
301
|
+
name: "audienceUserIds",
|
|
302
|
+
label: "例外抄送",
|
|
303
|
+
disabled: !0,
|
|
304
|
+
options: [],
|
|
305
|
+
placeholder: "未配置人员分页接口",
|
|
306
|
+
labelTips: "业务须注入 fetchAudienceUsersPage。"
|
|
307
|
+
},
|
|
308
|
+
"audienceUserIds-disabled"
|
|
233
309
|
);
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
|
|
310
|
+
return /* @__PURE__ */ A("div", { className: ge.pane, children: [
|
|
311
|
+
j ? /* @__PURE__ */ o(L, { type: "error", showIcon: !0, message: j, style: { marginBottom: 12 } }) : null,
|
|
312
|
+
/* @__PURE__ */ o(Ue, { spinning: G, children: se ? B.length === 0 && !G ? /* @__PURE__ */ o(ae, { description: "暂无推送规则" }) : /* @__PURE__ */ o(
|
|
313
|
+
Fe,
|
|
238
314
|
{
|
|
239
315
|
rowKey: (e) => e.id || e.code || String(e.eventKey),
|
|
240
316
|
tableName: "msg-center-push-rules",
|
|
241
317
|
columnConfigEnabled: !1,
|
|
242
318
|
columnResizeEnabled: !1,
|
|
243
|
-
columns:
|
|
244
|
-
dataSource:
|
|
319
|
+
columns: be,
|
|
320
|
+
dataSource: B,
|
|
245
321
|
pagination: !1,
|
|
246
322
|
size: "small"
|
|
247
323
|
}
|
|
248
|
-
) : /* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
|
|
324
|
+
) : /* @__PURE__ */ o(ae, { description: "无消息推送读取权限" }) }),
|
|
325
|
+
/* @__PURE__ */ A(
|
|
326
|
+
xe,
|
|
251
327
|
{
|
|
252
328
|
title: s ? "新建推送规则" : "编辑推送规则",
|
|
253
329
|
open: !!l,
|
|
254
|
-
onCancel: () =>
|
|
330
|
+
onCancel: () => f(null),
|
|
255
331
|
width: 560,
|
|
256
332
|
size: "small",
|
|
257
333
|
className: "msg-center-form-modal",
|
|
258
334
|
okText: "保存",
|
|
259
|
-
okButtonProps: { disabled:
|
|
335
|
+
okButtonProps: { disabled: K || !m(s) },
|
|
260
336
|
autoClose: !1,
|
|
261
|
-
formProps:
|
|
337
|
+
formProps: ue,
|
|
262
338
|
children: [
|
|
263
|
-
|
|
339
|
+
K ? /* @__PURE__ */ o(
|
|
264
340
|
L,
|
|
265
341
|
{
|
|
266
342
|
type: "warning",
|
|
267
343
|
showIcon: !0,
|
|
268
344
|
style: { marginBottom: 12 },
|
|
269
|
-
message: `「${
|
|
345
|
+
message: `「${pe}」暂无消息模板`,
|
|
270
346
|
description: "请先到「消息模板」Tab 为该场景新建模板,再回来关联。当前无法保存推送规则。"
|
|
271
347
|
}
|
|
272
348
|
) : null,
|
|
273
|
-
|
|
274
|
-
L,
|
|
275
|
-
{
|
|
276
|
-
type: "warning",
|
|
277
|
-
showIcon: !0,
|
|
278
|
-
style: { marginBottom: 12 },
|
|
279
|
-
message: `受众角色加载失败:${f}`
|
|
280
|
-
}
|
|
281
|
-
) : null,
|
|
282
|
-
v ? /* @__PURE__ */ t(
|
|
349
|
+
b ? /* @__PURE__ */ o(
|
|
283
350
|
L,
|
|
284
351
|
{
|
|
285
352
|
type: "warning",
|
|
286
353
|
showIcon: !0,
|
|
287
354
|
style: { marginBottom: 12 },
|
|
288
|
-
message:
|
|
355
|
+
message: `受众角色加载失败:${b}`
|
|
289
356
|
}
|
|
290
357
|
) : null,
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
|
|
358
|
+
/* @__PURE__ */ o(
|
|
359
|
+
Ae,
|
|
293
360
|
{
|
|
294
361
|
column: 1,
|
|
295
362
|
list: [
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
|
|
363
|
+
/* @__PURE__ */ o(
|
|
364
|
+
C,
|
|
298
365
|
{
|
|
299
366
|
name: "eventKey",
|
|
300
367
|
label: "适用场景",
|
|
@@ -308,25 +375,25 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
308
375
|
placeholder: i.length ? "点击下拉选择场景" : "暂无事件目录",
|
|
309
376
|
notFoundContent: "暂无场景",
|
|
310
377
|
onChange: (e) => {
|
|
311
|
-
const n = String(e || ""),
|
|
312
|
-
|
|
313
|
-
(
|
|
314
|
-
var
|
|
315
|
-
return
|
|
316
|
-
...
|
|
378
|
+
const n = String(e || ""), t = S(n);
|
|
379
|
+
f(
|
|
380
|
+
(a) => {
|
|
381
|
+
var v;
|
|
382
|
+
return a && {
|
|
383
|
+
...a,
|
|
317
384
|
eventKey: n,
|
|
318
|
-
templateCode:
|
|
319
|
-
label: ((
|
|
385
|
+
templateCode: ke(a.templateCode, t),
|
|
386
|
+
label: ((v = i.find((h) => h.eventKey === n)) == null ? void 0 : v.label) || a.label
|
|
320
387
|
};
|
|
321
388
|
}
|
|
322
389
|
);
|
|
323
390
|
},
|
|
324
|
-
...
|
|
391
|
+
...w
|
|
325
392
|
},
|
|
326
393
|
"eventKey"
|
|
327
394
|
),
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
|
|
395
|
+
/* @__PURE__ */ o(
|
|
396
|
+
_e,
|
|
330
397
|
{
|
|
331
398
|
name: "label",
|
|
332
399
|
label: "名称",
|
|
@@ -335,61 +402,61 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
335
402
|
},
|
|
336
403
|
"label"
|
|
337
404
|
),
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
|
|
405
|
+
/* @__PURE__ */ o(
|
|
406
|
+
C,
|
|
340
407
|
{
|
|
341
408
|
name: "templateCode",
|
|
342
409
|
label: "关联模板",
|
|
343
410
|
rule: "REQ",
|
|
344
|
-
disabled: !c && !s ||
|
|
345
|
-
options:
|
|
411
|
+
disabled: !c && !s || K,
|
|
412
|
+
options: J,
|
|
346
413
|
optionFilterProp: "label",
|
|
347
|
-
placeholder:
|
|
414
|
+
placeholder: K ? "该场景暂无模板,请先新建消息模板" : "点击下拉选择本场景已有模板",
|
|
348
415
|
notFoundContent: "该场景暂无模板",
|
|
349
416
|
labelTips: "选项来自「消息模板」Tab 中与当前适用场景相同的模板(按模板编号关联)。",
|
|
350
|
-
...
|
|
417
|
+
...w
|
|
351
418
|
},
|
|
352
419
|
`tpl-${(l == null ? void 0 : l.eventKey) || ""}`
|
|
353
420
|
),
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
|
|
421
|
+
/* @__PURE__ */ o(
|
|
422
|
+
C,
|
|
356
423
|
{
|
|
357
424
|
name: "levels",
|
|
358
425
|
label: "级别",
|
|
359
426
|
mode: "multiple",
|
|
360
427
|
disabled: !c && !s,
|
|
361
|
-
options:
|
|
362
|
-
placeholder:
|
|
363
|
-
notFoundContent:
|
|
364
|
-
labelTips:
|
|
365
|
-
...
|
|
428
|
+
options: F,
|
|
429
|
+
placeholder: F.length ? "点击下拉选择级别(可多选)" : "未配置级别选项(请业务注入 levelOptions)",
|
|
430
|
+
notFoundContent: F.length ? "无级别选项" : "未注入 levelOptions(业务档位,勿在 core 写死)",
|
|
431
|
+
labelTips: oe,
|
|
432
|
+
...w
|
|
366
433
|
},
|
|
367
434
|
"levels"
|
|
368
435
|
),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
|
|
436
|
+
/* @__PURE__ */ o(
|
|
437
|
+
C,
|
|
371
438
|
{
|
|
372
439
|
name: "audienceRoles",
|
|
373
440
|
label: "受众角色",
|
|
374
441
|
mode: "multiple",
|
|
375
442
|
disabled: !m(s),
|
|
376
|
-
options:
|
|
443
|
+
options: _.map((e) => ({ value: e.code, label: e.name || e.code })),
|
|
377
444
|
optionFilterProp: "label",
|
|
378
|
-
placeholder:
|
|
379
|
-
notFoundContent:
|
|
445
|
+
placeholder: b ? "角色加载失败" : _.length ? "点击下拉选择角色(可多选)" : "暂无角色(请确认本系统已配置角色)",
|
|
446
|
+
notFoundContent: b ? `加载失败:${b}` : "暂无角色数据",
|
|
380
447
|
labelTips: "主路径:本系统 SSO 角色(这类事常驻通知谁)。可与「通知范围」「例外抄送」并存;emit 时与显式 userIds **并集**(不再互相覆盖)。至少填角色/槽位/例外抄送之一。",
|
|
381
|
-
...
|
|
448
|
+
...w
|
|
382
449
|
},
|
|
383
450
|
"audienceRoles"
|
|
384
451
|
),
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
|
|
452
|
+
/* @__PURE__ */ o(
|
|
453
|
+
C,
|
|
387
454
|
{
|
|
388
455
|
name: "audienceSlots",
|
|
389
456
|
label: "通知范围",
|
|
390
457
|
mode: "multiple",
|
|
391
458
|
disabled: !m(s),
|
|
392
|
-
options:
|
|
459
|
+
options: Ie.map((e) => ({
|
|
393
460
|
value: e.value,
|
|
394
461
|
label: e.label
|
|
395
462
|
})),
|
|
@@ -398,41 +465,13 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
398
465
|
placeholder: "可选:本人/领导/部门/分厂/租户或任务当事人",
|
|
399
466
|
notFoundContent: "暂无槽位",
|
|
400
467
|
labelTips: "相对关系与组织范围依赖业务 emit 的 audienceContext;无上下文的槽不会发出。选「本租户(全公司)」保存前会二次确认。与角色、例外抄送并集送达。",
|
|
401
|
-
...
|
|
468
|
+
...w
|
|
402
469
|
},
|
|
403
470
|
"audienceSlots"
|
|
404
471
|
),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
name: "audienceUserIds",
|
|
409
|
-
label: "例外抄送",
|
|
410
|
-
mode: "multiple",
|
|
411
|
-
disabled: !m(s),
|
|
412
|
-
options: te,
|
|
413
|
-
optionFilterProp: "searchText",
|
|
414
|
-
optionLabelProp: "label",
|
|
415
|
-
filterOption: (e, n) => {
|
|
416
|
-
const a = String(e || "").trim().toLowerCase();
|
|
417
|
-
return a ? String((n == null ? void 0 : n.searchText) || (n == null ? void 0 : n.label) || "").toLowerCase().includes(a) : !0;
|
|
418
|
-
},
|
|
419
|
-
optionRender: (e) => {
|
|
420
|
-
var o, d;
|
|
421
|
-
const n = ((o = e.data) == null ? void 0 : o.label) ?? e.label, a = (d = e.data) == null ? void 0 : d.description;
|
|
422
|
-
return /* @__PURE__ */ F("div", { style: { lineHeight: 1.35, padding: "2px 0" }, children: [
|
|
423
|
-
/* @__PURE__ */ t("div", { children: n }),
|
|
424
|
-
a ? /* @__PURE__ */ t("div", { style: { fontSize: 12, color: "rgba(0,0,0,0.45)" }, children: a }) : null
|
|
425
|
-
] });
|
|
426
|
-
},
|
|
427
|
-
placeholder: v ? "人员加载失败" : A.length ? "按部门选择例外抄送人(可多选,日常可留空)" : "暂无人员(请确认本租户有用户)",
|
|
428
|
-
notFoundContent: v ? `加载失败:${v}` : "暂无人员数据",
|
|
429
|
-
labelTips: "非常驻名单:仅管理员例外通知等场景。与角色、通知范围并集送达;任务当事人优先用槽位 + emit.audienceContext。",
|
|
430
|
-
...y
|
|
431
|
-
},
|
|
432
|
-
"audienceUserIds"
|
|
433
|
-
),
|
|
434
|
-
/* @__PURE__ */ t(
|
|
435
|
-
Z,
|
|
472
|
+
ye,
|
|
473
|
+
/* @__PURE__ */ o(
|
|
474
|
+
te,
|
|
436
475
|
{
|
|
437
476
|
name: "slaHours",
|
|
438
477
|
label: "处理时限(小时)",
|
|
@@ -443,8 +482,8 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
443
482
|
},
|
|
444
483
|
"slaHours"
|
|
445
484
|
),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
|
|
485
|
+
/* @__PURE__ */ o(
|
|
486
|
+
te,
|
|
448
487
|
{
|
|
449
488
|
name: "scanLookbackDays",
|
|
450
489
|
label: "扫描回看(天)",
|
|
@@ -464,6 +503,6 @@ const b = Ce, Ie = we, Z = ke, y = {
|
|
|
464
503
|
] });
|
|
465
504
|
};
|
|
466
505
|
export {
|
|
467
|
-
|
|
506
|
+
qe as PushRulesPanel
|
|
468
507
|
};
|
|
469
508
|
//# sourceMappingURL=index.js.map
|