@hkyhy/marsun-components-core 0.1.142 → 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.
Files changed (20) hide show
  1. package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +2 -0
  2. package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -1
  3. package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.d.ts +7 -0
  4. package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.js +60 -45
  5. package/dist/components/Tools/Inbox/InboxBell/inboxItemActions.js.map +1 -1
  6. package/dist/components/Tools/Inbox/InboxBell/index.d.ts +1 -1
  7. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +134 -142
  8. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -1
  9. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.d.ts +6 -5
  10. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.js +233 -194
  11. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/PushRulesPanel/index.js.map +1 -1
  12. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +1 -1
  13. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +24 -3
  14. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -1
  15. package/dist/components/Tools/MessageCenter/index.d.ts +1 -1
  16. package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.d.ts +11 -5
  17. package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.js +15 -26
  18. package/dist/components/Tools/MessageCenter/utils/audienceUserSelectOptions.js.map +1 -1
  19. package/dist/components/Tools/index.d.ts +1 -1
  20. package/package.json +1 -1
@@ -1,58 +1,60 @@
1
- import { jsx as t, jsxs as F } from "react/jsx-runtime";
2
- import { message as r, Modal as se, Switch as re, Space as ie, Button as W } from "antd";
3
- import { useState as k, useCallback as J, useEffect as X, useMemo as p } from "react";
4
- import { normalizeAudienceSlots as ce, hasAudienceSelection as de, ORG_TENANT_SLOT as me, AUDIENCE_SLOT_OPTIONS as ue } from "../audienceSlots.js";
5
- import { resolveTemplateCodeAfterEventChange as pe } from "../../utils/adminGuards.js";
6
- import { buildAudienceUserSelectGroups as be } from "../../utils/audienceUserSelectOptions.js";
7
- import ye from "../style.module.scss.js";
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 fe from "../../../../Layout/PageSpin/index.js";
10
- import Y from "../../../../Empty/Empty.js";
11
- import ve from "../../../../Table/Table.js";
12
- import he from "../../../../FormInfo/FormModal.js";
13
- import Se from "../../../../FormInfo/FormInfo.js";
14
- import { Select as Ce, Input as we, InputNumber as ke } from "../../../../FormInfo/fields.js";
15
- const b = Ce, Ie = we, Z = ke, y = {
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
- }, Ke = "规则匹配 emit 时带 level 会对齐所选档;选项由业务注入(各系统档位不同)。", $e = ({
20
+ }, P = 20, ze = "规则匹配 emit 时带 level 会对齐所选档;选项由业务注入(各系统档位不同)。", qe = ({
19
21
  crud: I,
20
22
  catalog: i,
21
- templates: K,
22
- roleOptions: z,
23
- userOptions: A = [],
24
- audienceRolesError: f = "",
25
- audienceUsersError: v = "",
26
- levelOptions: D = [],
27
- defaultLevels: N = [],
28
- levelFieldTips: ee = Ke,
29
- fetchPushRules: U,
30
- savePushRule: B,
31
- setPushRuleEnabled: h,
32
- deletePushRule: _,
33
- createNonce: E = 0
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 T = I.create, c = I.update, H = I.delete, le = I.read, m = (e) => e ? T : c, [$, P] = k([]), [M, O] = k(!1), [R, j] = k(""), [l, S] = k(null), [s, G] = k(!1), u = J(async () => {
36
- O(!0), j("");
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 U();
39
- P(Array.isArray(e) ? e : []);
40
+ const e = await N();
41
+ M(Array.isArray(e) ? e : []);
40
42
  } catch (e) {
41
- j(e instanceof Error ? e.message : String(e)), P([]);
43
+ Q(e instanceof Error ? e.message : String(e)), M([]);
42
44
  } finally {
43
- O(!1);
45
+ R(!1);
44
46
  }
45
- }, [U]);
46
- X(() => {
47
- u();
48
- }, [u]), X(() => {
49
- if (!E || !T) return;
50
- const e = i[0], n = K.find((a) => a.eventKey === (e == null ? void 0 : e.eventKey));
51
- G(!0), S({
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(N) ? [...N] : [],
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
- }, [E, T, i, K]);
65
- const C = J(
66
- (e) => K.filter((n) => !e || n.eventKey === e).map((n) => ({
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
- [K]
71
- ), Q = p(
72
- () => C(l == null ? void 0 : l.eventKey),
73
- [C, l == null ? void 0 : l.eventKey]
74
- ), ne = p(() => {
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((a) => a.eventKey === e)) == null ? void 0 : n.label) || e || "当前场景";
78
- }, [i, l == null ? void 0 : l.eventKey]), g = !!l && Q.length === 0, te = p(
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
- ), ae = p(
142
+ ), ue = d(
95
143
  () => ({
96
- data: q,
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(), a = String(e.templateCode || "").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 (!a)
151
+ if (!t)
104
152
  return r.warning("请关联模板编号"), !1;
105
- if (C(n).length === 0)
153
+ if (S(n).length === 0)
106
154
  return r.warning("该场景暂无消息模板,请先到「消息模板」新建后再关联"), !1;
107
- const o = e.audienceRoles || [], d = e.audienceUserIds || [], w = ce(e.audienceSlots || []);
108
- if (!de({
109
- roles: o,
110
- slots: w,
111
- userIds: d
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 (w.includes(me) && !await new Promise((V) => {
115
- se.confirm({
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: () => V(!0),
121
- onCancel: () => V(!1)
168
+ onOk: () => Y(!0),
169
+ onCancel: () => Y(!1)
122
170
  });
123
171
  }))
124
172
  return !1;
125
173
  try {
126
- await B({
174
+ await O({
127
175
  ...l,
128
176
  label: String(e.label || l.label || "").trim() || n,
129
177
  eventKey: n,
130
- templateCode: a,
178
+ templateCode: t,
131
179
  levels: e.levels || [],
132
- audienceRoles: o,
133
- audienceUserIds: d,
134
- audienceSlots: w,
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("已保存"), S(null), await u();
140
- } catch (x) {
141
- return r.error(x instanceof Error ? x.message : String(x)), !1;
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
- [T, c, l, q, s, u, B, C]
146
- ), oe = p(
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((a) => a.eventKey === e)) == null ? void 0 : n.label) || e || "—";
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__ */ t(
172
- re,
219
+ render: (e, n) => /* @__PURE__ */ o(
220
+ Se,
173
221
  {
174
222
  size: "small",
175
223
  checked: n.enabled !== !1,
176
- disabled: !c || !h,
177
- onChange: (a) => {
224
+ disabled: !c || !y,
225
+ onChange: (t) => {
178
226
  (async () => {
179
227
  try {
180
- await (h == null ? void 0 : h(n, a)), await u();
181
- } catch (o) {
182
- r.error(o instanceof Error ? o.message : String(o));
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__ */ F(ie, { size: "small", children: [
194
- /* @__PURE__ */ t(
195
- W,
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
- G(!1), S({
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 && _ ? /* @__PURE__ */ t(
212
- W,
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 _(n), r.success("已删除"), await u();
221
- } catch (a) {
222
- r.error(a instanceof Error ? a.message : String(a));
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, _, u, h]
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__ */ F("div", { className: ye.pane, children: [
235
- R ? /* @__PURE__ */ t(L, { type: "error", showIcon: !0, message: R, style: { marginBottom: 12 } }) : null,
236
- /* @__PURE__ */ t(fe, { spinning: M, children: le ? $.length === 0 && !M ? /* @__PURE__ */ t(Y, { description: "暂无推送规则" }) : /* @__PURE__ */ t(
237
- ve,
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: oe,
244
- dataSource: $,
319
+ columns: be,
320
+ dataSource: B,
245
321
  pagination: !1,
246
322
  size: "small"
247
323
  }
248
- ) : /* @__PURE__ */ t(Y, { description: "无消息推送读取权限" }) }),
249
- /* @__PURE__ */ F(
250
- he,
324
+ ) : /* @__PURE__ */ o(ae, { description: "无消息推送读取权限" }) }),
325
+ /* @__PURE__ */ A(
326
+ xe,
251
327
  {
252
328
  title: s ? "新建推送规则" : "编辑推送规则",
253
329
  open: !!l,
254
- onCancel: () => S(null),
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: g || !m(s) },
335
+ okButtonProps: { disabled: K || !m(s) },
260
336
  autoClose: !1,
261
- formProps: ae,
337
+ formProps: ue,
262
338
  children: [
263
- g ? /* @__PURE__ */ t(
339
+ K ? /* @__PURE__ */ o(
264
340
  L,
265
341
  {
266
342
  type: "warning",
267
343
  showIcon: !0,
268
344
  style: { marginBottom: 12 },
269
- message: `「${ne}」暂无消息模板`,
345
+ message: `「${pe}」暂无消息模板`,
270
346
  description: "请先到「消息模板」Tab 为该场景新建模板,再回来关联。当前无法保存推送规则。"
271
347
  }
272
348
  ) : null,
273
- f ? /* @__PURE__ */ t(
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: `例外抄送人员加载失败:${v}`
355
+ message: `受众角色加载失败:${b}`
289
356
  }
290
357
  ) : null,
291
- /* @__PURE__ */ t(
292
- Se,
358
+ /* @__PURE__ */ o(
359
+ Ae,
293
360
  {
294
361
  column: 1,
295
362
  list: [
296
- /* @__PURE__ */ t(
297
- b,
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 || ""), a = C(n);
312
- S(
313
- (o) => {
314
- var d;
315
- return o && {
316
- ...o,
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: pe(o.templateCode, a),
319
- label: ((d = i.find((w) => w.eventKey === n)) == null ? void 0 : d.label) || o.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
- ...y
391
+ ...w
325
392
  },
326
393
  "eventKey"
327
394
  ),
328
- /* @__PURE__ */ t(
329
- Ie,
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__ */ t(
339
- b,
405
+ /* @__PURE__ */ o(
406
+ C,
340
407
  {
341
408
  name: "templateCode",
342
409
  label: "关联模板",
343
410
  rule: "REQ",
344
- disabled: !c && !s || g,
345
- options: Q,
411
+ disabled: !c && !s || K,
412
+ options: J,
346
413
  optionFilterProp: "label",
347
- placeholder: g ? "该场景暂无模板,请先新建消息模板" : "点击下拉选择本场景已有模板",
414
+ placeholder: K ? "该场景暂无模板,请先新建消息模板" : "点击下拉选择本场景已有模板",
348
415
  notFoundContent: "该场景暂无模板",
349
416
  labelTips: "选项来自「消息模板」Tab 中与当前适用场景相同的模板(按模板编号关联)。",
350
- ...y
417
+ ...w
351
418
  },
352
419
  `tpl-${(l == null ? void 0 : l.eventKey) || ""}`
353
420
  ),
354
- /* @__PURE__ */ t(
355
- b,
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: D,
362
- placeholder: D.length ? "点击下拉选择级别(可多选)" : "未配置级别选项(请业务注入 levelOptions)",
363
- notFoundContent: D.length ? "无级别选项" : "未注入 levelOptions(业务档位,勿在 core 写死)",
364
- labelTips: ee,
365
- ...y
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__ */ t(
370
- b,
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: z.map((e) => ({ value: e.code, label: e.name || e.code })),
443
+ options: _.map((e) => ({ value: e.code, label: e.name || e.code })),
377
444
  optionFilterProp: "label",
378
- placeholder: f ? "角色加载失败" : z.length ? "点击下拉选择角色(可多选)" : "暂无角色(请确认本系统已配置角色)",
379
- notFoundContent: f ? `加载失败:${f}` : "暂无角色数据",
445
+ placeholder: b ? "角色加载失败" : _.length ? "点击下拉选择角色(可多选)" : "暂无角色(请确认本系统已配置角色)",
446
+ notFoundContent: b ? `加载失败:${b}` : "暂无角色数据",
380
447
  labelTips: "主路径:本系统 SSO 角色(这类事常驻通知谁)。可与「通知范围」「例外抄送」并存;emit 时与显式 userIds **并集**(不再互相覆盖)。至少填角色/槽位/例外抄送之一。",
381
- ...y
448
+ ...w
382
449
  },
383
450
  "audienceRoles"
384
451
  ),
385
- /* @__PURE__ */ t(
386
- b,
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: ue.map((e) => ({
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
- ...y
468
+ ...w
402
469
  },
403
470
  "audienceSlots"
404
471
  ),
405
- /* @__PURE__ */ t(
406
- b,
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__ */ t(
447
- Z,
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
- $e as PushRulesPanel
506
+ qe as PushRulesPanel
468
507
  };
469
508
  //# sourceMappingURL=index.js.map