@huyooo/ui 0.4.16 → 0.4.18

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.
@@ -0,0 +1,885 @@
1
+ import { defineComponent as x, mergeModels as q, useModel as K, createBlock as g, openBlock as o, unref as c, isRef as B, withCtx as y, createElementVNode as C, renderSlot as A, createVNode as _, ref as d, createCommentVNode as h, createElementBlock as v, Fragment as T, renderList as w, toDisplayString as D, createTextVNode as k, withModifiers as R, normalizeClass as z, watch as H, computed as j } from "vue";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ import { Modal as G, Spin as E, Empty as F, Button as J, Divider as P, Breadcrumb as I, BreadcrumbItem as S } from "@arco-design/web-vue";
6
+ import { u as Q } from "./useAuthkitCreateAndUpdate-BpPW409v.js";
7
+ import { M as W } from "./Menu-MZJINp6f.js";
8
+ import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ /* empty css */
10
+ import { api as U } from "@huyooo/api";
11
+ import { TiptapEditor as X, TiptapTitle as Y } from "@huyooo/vue-tiptap";
12
+ /* empty css */
13
+ import { useIntersectionObserver as Z } from "@vueuse/core";
14
+ import { u as ee } from "./useMessageNotifications-lmP0vJDM.js";
15
+ import { Icon as te } from "@iconify/vue";
16
+ const ne = {
17
+ class: "content"
18
+ }, ie = {
19
+ class: "left"
20
+ }, se = /* @__PURE__ */ x({
21
+ __name: "MessageAppMessage",
22
+ props: /* @__PURE__ */ q({
23
+ prefixUrl: {
24
+ type: String,
25
+ required: !0
26
+ },
27
+ menus: {
28
+ type: Array,
29
+ required: !0
30
+ }
31
+ }, {
32
+ selectedKeys: {
33
+ default: ["ChangelogNotifications"]
34
+ },
35
+ selectedKeysModifiers: {}
36
+ }),
37
+ emits: /* @__PURE__ */ q(["cancel", "change"], ["update:selectedKeys"]),
38
+ setup(n, {
39
+ expose: t,
40
+ emit: i
41
+ }) {
42
+ const a = n, l = i, e = K(n, "selectedKeys");
43
+ function s() {
44
+ l("cancel");
45
+ }
46
+ function r(p, f) {
47
+ const $ = p.path;
48
+ e.value = [$], l("change", p, f);
49
+ }
50
+ const {
51
+ changeType: u,
52
+ show: m
53
+ } = Q(l);
54
+ function b(p) {
55
+ m.value = p, u.value = "编辑";
56
+ }
57
+ return t({
58
+ setData: b
59
+ }), (p, f) => (o(), g(c(G), {
60
+ visible: c(m),
61
+ "onUpdate:visible": f[1] || (f[1] = ($) => B(m) ? m.value = $ : null),
62
+ loading: !1,
63
+ "body-class": "AppMessagebodyClass",
64
+ "mask-closable": !1,
65
+ footer: !1,
66
+ "hide-title": !1,
67
+ width: "880px",
68
+ onCancel: s
69
+ }, {
70
+ default: y(() => [C("div", ne, [C("div", ie, [_(W, {
71
+ "selected-keys": e.value,
72
+ "onUpdate:selectedKeys": f[0] || (f[0] = ($) => e.value = $),
73
+ menus: a.menus,
74
+ onChange: r
75
+ }, null, 8, ["selected-keys", "menus"])]), A(p.$slots, "default", {}, void 0, !0)])]),
76
+ _: 3
77
+ }, 8, ["visible"]));
78
+ }
79
+ }), ae = /* @__PURE__ */ N(se, [["__scopeId", "data-v-944d5a11"]]);
80
+ function oe(n, t) {
81
+ return U({
82
+ url: `${n}/restfulApi/messageCenter/changelogNotifications/find`,
83
+ method: "post",
84
+ data: t
85
+ });
86
+ }
87
+ function le(n, t) {
88
+ return U({
89
+ url: `${n}/restfulApi/messageCenter/changelogNotifications/findOne`,
90
+ method: "post",
91
+ data: t
92
+ });
93
+ }
94
+ const re = /* @__PURE__ */ x({
95
+ __name: "MessageDetails",
96
+ props: {
97
+ content: {
98
+ type: Object,
99
+ default: null
100
+ },
101
+ title: {
102
+ type: String,
103
+ required: !0
104
+ },
105
+ loading: {
106
+ type: Boolean,
107
+ default: !1
108
+ }
109
+ },
110
+ emits: ["itemClick", "tableOfContentsUpdate", "update:title", "update:content"],
111
+ setup(n, {
112
+ emit: t
113
+ }) {
114
+ const i = d([]), a = n, l = d(!1), e = t, s = d();
115
+ function r(u) {
116
+ i.value = u, e("tableOfContentsUpdate", u);
117
+ }
118
+ return (u, m) => (o(), g(c(E), {
119
+ loading: a.loading,
120
+ tip: "文档加载中...",
121
+ class: "Spin",
122
+ dot: ""
123
+ }, {
124
+ default: y(() => [_(c(X), {
125
+ ref_key: "TiptapEditorRef",
126
+ ref: s,
127
+ "model-value": a.content,
128
+ editable: l.value,
129
+ "tiptap-editor-content-class": "tiptapEditorContentClass",
130
+ onTableOfContentsUpdate: r
131
+ }, {
132
+ title: y(() => [_(c(Y), {
133
+ "model-value": a.title,
134
+ editable: l.value
135
+ }, null, 8, ["model-value", "editable"])]),
136
+ _: 1
137
+ }, 8, ["model-value", "editable"]), h("", !0)]),
138
+ _: 1
139
+ }, 8, ["loading"]));
140
+ }
141
+ }), O = /* @__PURE__ */ N(re, [["__scopeId", "data-v-8eec0226"]]), ue = /* @__PURE__ */ x({
142
+ __name: "MessageChangelogNotificationsDetails",
143
+ props: {
144
+ prefixUrl: {
145
+ type: String,
146
+ required: !0
147
+ },
148
+ id: {
149
+ type: String,
150
+ required: !0
151
+ }
152
+ },
153
+ setup(n) {
154
+ const t = d(!1), i = d(null), a = d(""), l = n;
155
+ function e() {
156
+ t.value = !0, le(l.prefixUrl, {
157
+ id: l.id
158
+ }).then(({
159
+ data: s
160
+ }) => {
161
+ i.value = s.content, a.value = s.title, t.value = !1;
162
+ }).catch((s) => {
163
+ console.error("获取变更日志详情失败:", s), t.value = !1;
164
+ });
165
+ }
166
+ return e(), (s, r) => (o(), g(O, {
167
+ content: i.value,
168
+ title: a.value,
169
+ loading: t.value
170
+ }, null, 8, ["content", "title", "loading"]));
171
+ }
172
+ }), ce = {
173
+ key: 0,
174
+ class: "loading"
175
+ }, de = {
176
+ key: 1,
177
+ class: "none"
178
+ }, pe = /* @__PURE__ */ x({
179
+ __name: "InfiniteLoading",
180
+ props: {
181
+ loading: {
182
+ type: Boolean,
183
+ default: !1
184
+ },
185
+ finished: {
186
+ type: Boolean,
187
+ default: !1
188
+ },
189
+ loadingText: {
190
+ type: String,
191
+ default: "数据加载中..."
192
+ },
193
+ finishedText: {
194
+ type: String,
195
+ default: "亲,没有更多了!"
196
+ },
197
+ showFinishedText: {
198
+ type: Boolean,
199
+ default: !0
200
+ },
201
+ threshold: {
202
+ type: Number,
203
+ default: 0
204
+ }
205
+ },
206
+ emits: ["infinite"],
207
+ setup(n, {
208
+ emit: t
209
+ }) {
210
+ const i = n, a = t, l = d(null);
211
+ return Z(l, ([{
212
+ isIntersecting: e
213
+ }]) => {
214
+ e && // 当loading和finished的值都为false时,就通知父组件调用方法继续向后台请求数据
215
+ !i.loading && !i.finished && a("infinite");
216
+ }, {
217
+ threshold: i.threshold
218
+ }), (e, s) => (o(), v("div", {
219
+ ref_key: "container",
220
+ ref: l,
221
+ class: "infinite-loading"
222
+ }, [n.loading ? (o(), v("div", ce, [_(c(E), {
223
+ tip: n.loadingText
224
+ }, null, 8, ["tip"])])) : h("", !0), n.finished && n.showFinishedText ? (o(), v("div", de, [_(c(F), {
225
+ description: n.finishedText
226
+ }, null, 8, ["description"])])) : h("", !0)], 512));
227
+ }
228
+ }), fe = /* @__PURE__ */ N(pe, [["__scopeId", "data-v-b513f798"]]), ge = {
229
+ class: "message-list-container"
230
+ }, me = {
231
+ key: 0,
232
+ class: "empty-wrapper"
233
+ }, ve = {
234
+ class: "messsageItemBody"
235
+ }, _e = {
236
+ class: "messageBody"
237
+ }, ye = {
238
+ class: "messageHeader"
239
+ }, he = {
240
+ key: 1,
241
+ class: "title"
242
+ }, xe = {
243
+ class: "description"
244
+ }, be = {
245
+ class: "createAt"
246
+ }, ke = {
247
+ class: "messageHandle"
248
+ }, Ne = /* @__PURE__ */ x({
249
+ __name: "MessageList",
250
+ props: {
251
+ messageList: {
252
+ type: Array,
253
+ required: !0
254
+ },
255
+ loading: {
256
+ type: Boolean,
257
+ default: !1
258
+ },
259
+ finished: {
260
+ type: Boolean,
261
+ default: !1
262
+ },
263
+ showButton: {
264
+ type: Boolean,
265
+ default: !0
266
+ }
267
+ },
268
+ emits: ["openDetails", "infinite"],
269
+ setup(n, {
270
+ emit: t
271
+ }) {
272
+ const i = n, a = t;
273
+ function l(e, s) {
274
+ a("openDetails", e, s);
275
+ }
276
+ return (e, s) => (o(), v("div", ge, [i.messageList.length === 0 ? (o(), v("div", me, [_(c(F), {
277
+ description: "暂无消息"
278
+ })])) : (o(), v(T, {
279
+ key: 1
280
+ }, [(o(!0), v(T, null, w(i.messageList, (r, u) => (o(), v("div", {
281
+ key: u,
282
+ class: "messageItem"
283
+ }, [C("span", ve, [C("span", _e, [C("span", ye, [e.$slots.title ? A(e.$slots, "title", {
284
+ key: 0,
285
+ item: r,
286
+ index: u
287
+ }, void 0, !0) : (o(), v("span", he, D(r.title), 1))]), C("span", xe, [e.$slots.description ? A(e.$slots, "description", {
288
+ key: 0,
289
+ item: r,
290
+ index: u
291
+ }, void 0, !0) : (o(), v(T, {
292
+ key: 1
293
+ }, [k(D(r.description), 1)], 64))]), C("span", be, [e.$slots.createAt ? A(e.$slots, "createAt", {
294
+ key: 0,
295
+ item: r,
296
+ index: u
297
+ }, void 0, !0) : (o(), v(T, {
298
+ key: 1
299
+ }, [k(D(r.createAt), 1)], 64))])]), C("span", ke, [e.$slots.handle ? A(e.$slots, "handle", {
300
+ key: 0,
301
+ item: r,
302
+ index: u
303
+ }, void 0, !0) : i.showButton ? (o(), g(c(J), {
304
+ key: 1,
305
+ type: "text",
306
+ onClick: R((m) => l(r, u), ["stop"])
307
+ }, {
308
+ default: y(() => s[1] || (s[1] = [k("查看")])),
309
+ _: 2,
310
+ __: [1]
311
+ }, 1032, ["onClick"])) : h("", !0)])]), _(c(P), {
312
+ style: {
313
+ margin: "0px"
314
+ }
315
+ })]))), 128)), _(fe, {
316
+ loading: i.loading,
317
+ finished: i.finished,
318
+ onInfinite: s[0] || (s[0] = (r) => e.$emit("infinite"))
319
+ }, null, 8, ["loading", "finished"])], 64))]));
320
+ }
321
+ }), L = /* @__PURE__ */ N(Ne, [["__scopeId", "data-v-7b39af6e"]]), Ce = {
322
+ class: "right"
323
+ }, $e = /* @__PURE__ */ x({
324
+ __name: "MessageChangelogNotifications",
325
+ props: {
326
+ prefixUrl: {
327
+ type: String,
328
+ required: !0
329
+ }
330
+ },
331
+ setup(n) {
332
+ const t = d(!0), i = n, a = d();
333
+ function l() {
334
+ t.value = !0;
335
+ }
336
+ const e = d(!1), s = d(!1), r = d([]), u = d({
337
+ total: 0,
338
+ current: 1,
339
+ pageSize: 10
340
+ });
341
+ function m() {
342
+ e.value = !0, oe(i.prefixUrl, {
343
+ current: u.value.current,
344
+ pageSize: u.value.pageSize,
345
+ where: {}
346
+ }).then(({
347
+ data: p
348
+ }) => {
349
+ e.value = !1, r.value = p.items, u.value.total = p.count, s.value = p.items.length < u.value.pageSize;
350
+ }).catch(() => {
351
+ e.value = !1;
352
+ });
353
+ }
354
+ function b(p) {
355
+ console.log(p, "itemitem"), a.value = p.id, t.value = !1;
356
+ }
357
+ return m(), (p, f) => (o(), v("div", Ce, [t.value ? h("", !0) : (o(), g(c(I), {
358
+ key: 0,
359
+ style: {
360
+ "margin-bottom": "10px",
361
+ cursor: "pointer"
362
+ }
363
+ }, {
364
+ default: y(() => [_(c(S), {
365
+ style: {
366
+ padding: "0px"
367
+ },
368
+ onClick: l
369
+ }, {
370
+ default: y(() => f[0] || (f[0] = [k("功能变更")])),
371
+ _: 1,
372
+ __: [0]
373
+ }), _(c(S), {
374
+ style: {
375
+ padding: "0px"
376
+ }
377
+ }, {
378
+ default: y(() => f[1] || (f[1] = [k("详情")])),
379
+ _: 1,
380
+ __: [1]
381
+ })]),
382
+ _: 1
383
+ })), t.value ? (o(), g(L, {
384
+ key: 1,
385
+ "message-list": r.value,
386
+ loading: e.value,
387
+ finished: s.value,
388
+ onOpenDetails: b,
389
+ onInfinite: m
390
+ }, null, 8, ["message-list", "loading", "finished"])) : (o(), g(ue, {
391
+ key: 2,
392
+ id: a.value,
393
+ "prefix-url": i.prefixUrl
394
+ }, null, 8, ["id", "prefix-url"]))]));
395
+ }
396
+ }), Se = /* @__PURE__ */ N($e, [["__scopeId", "data-v-bdfbbd9d"]]), Me = {
397
+ style: {
398
+ display: "flex",
399
+ gap: "16px"
400
+ }
401
+ }, Ue = ["onClick"], Ae = /* @__PURE__ */ x({
402
+ __name: "MessageCustomTabs",
403
+ props: {
404
+ modelValue: {
405
+ type: String,
406
+ default: "1"
407
+ },
408
+ tabs: {
409
+ type: Array,
410
+ default: () => [{
411
+ label: "未读消息",
412
+ key: "1"
413
+ }, {
414
+ label: "已读消息",
415
+ key: "2"
416
+ }]
417
+ }
418
+ },
419
+ emits: ["update:modelValue", "change"],
420
+ setup(n, {
421
+ emit: t
422
+ }) {
423
+ const i = n, a = t;
424
+ function l(e) {
425
+ e !== i.modelValue && (a("update:modelValue", e), a("change", e));
426
+ }
427
+ return (e, s) => (o(), v("div", Me, [(o(!0), v(T, null, w(n.tabs, (r) => (o(), v("span", {
428
+ key: r.key,
429
+ class: z(["custom-tab", [{
430
+ active: n.modelValue === r.key
431
+ }]]),
432
+ onClick: (u) => l(r.key)
433
+ }, D(r.label), 11, Ue))), 128))]));
434
+ }
435
+ }), Te = /* @__PURE__ */ N(Ae, [["__scopeId", "data-v-fafcc3ad"]]);
436
+ function De(n, t) {
437
+ return U({
438
+ url: `${n}/restfulApi/messageCenter/eventNotifications/find`,
439
+ method: "post",
440
+ data: t
441
+ });
442
+ }
443
+ function Ie(n, t) {
444
+ return U({
445
+ url: `${n}/restfulApi/messageCenter/eventNotifications/findOne`,
446
+ method: "post",
447
+ data: t
448
+ });
449
+ }
450
+ const Le = /* @__PURE__ */ x({
451
+ __name: "MessageEventNotificationsDetails",
452
+ props: {
453
+ prefixUrl: {
454
+ type: String,
455
+ required: !0
456
+ },
457
+ id: {
458
+ type: String,
459
+ required: !0
460
+ }
461
+ },
462
+ setup(n) {
463
+ const t = d(!1), i = d(null), a = d(""), l = n;
464
+ function e() {
465
+ t.value = !0, Ie(l.prefixUrl, {
466
+ id: l.id
467
+ }).then(({
468
+ data: s
469
+ }) => {
470
+ i.value = s.content, a.value = s.title, t.value = !1;
471
+ }).catch((s) => {
472
+ console.error("获取事件通知详情失败:", s), t.value = !1;
473
+ });
474
+ }
475
+ return e(), (s, r) => (o(), g(O, {
476
+ content: i.value,
477
+ title: a.value,
478
+ loading: t.value
479
+ }, null, 8, ["content", "title", "loading"]));
480
+ }
481
+ }), Oe = {
482
+ class: "right"
483
+ }, qe = /* @__PURE__ */ x({
484
+ __name: "MessageEventNotifications",
485
+ props: {
486
+ prefixUrl: {
487
+ type: String,
488
+ required: !0
489
+ }
490
+ },
491
+ setup(n) {
492
+ const t = n, i = d(!0), a = d();
493
+ function l() {
494
+ i.value = !0;
495
+ }
496
+ const e = d(!1), s = d(!1), r = d([]), u = d({
497
+ total: 0,
498
+ current: 1,
499
+ pageSize: 10
500
+ });
501
+ function m() {
502
+ e.value = !0, De(t.prefixUrl, {
503
+ current: u.value.current,
504
+ pageSize: u.value.pageSize,
505
+ where: {}
506
+ }).then(({
507
+ data: p
508
+ }) => {
509
+ e.value = !1, r.value = p.items, u.value.total = p.count, s.value = p.items.length < u.value.pageSize;
510
+ }).catch(() => {
511
+ e.value = !1;
512
+ });
513
+ }
514
+ function b(p) {
515
+ a.value = p.id, i.value = !1;
516
+ }
517
+ return m(), (p, f) => (o(), v("div", Oe, [i.value ? h("", !0) : (o(), g(c(I), {
518
+ key: 0,
519
+ style: {
520
+ "margin-bottom": "10px",
521
+ cursor: "pointer"
522
+ }
523
+ }, {
524
+ default: y(() => [_(c(S), {
525
+ style: {
526
+ padding: "0px"
527
+ },
528
+ onClick: l
529
+ }, {
530
+ default: y(() => f[0] || (f[0] = [k("活动通知")])),
531
+ _: 1,
532
+ __: [0]
533
+ }), _(c(S), {
534
+ style: {
535
+ padding: "0px"
536
+ }
537
+ }, {
538
+ default: y(() => f[1] || (f[1] = [k("详情")])),
539
+ _: 1,
540
+ __: [1]
541
+ })]),
542
+ _: 1
543
+ })), i.value ? (o(), g(L, {
544
+ key: 1,
545
+ "message-list": r.value,
546
+ loading: e.value,
547
+ finished: s.value,
548
+ onOpenDetails: b,
549
+ onInfinite: m
550
+ }, null, 8, ["message-list", "loading", "finished"])) : (o(), g(Le, {
551
+ key: 2,
552
+ id: a.value,
553
+ "prefix-url": t.prefixUrl
554
+ }, null, 8, ["id", "prefix-url"]))]));
555
+ }
556
+ }), Be = /* @__PURE__ */ N(qe, [["__scopeId", "data-v-aac8ca02"]]), we = {
557
+ class: "tabs"
558
+ }, ze = /* @__PURE__ */ x({
559
+ __name: "MessageTabs",
560
+ props: {
561
+ tabs: {
562
+ type: Array,
563
+ required: !0
564
+ },
565
+ messageList: {
566
+ type: Array,
567
+ required: !0
568
+ },
569
+ activeTab: {
570
+ type: String,
571
+ required: !0
572
+ }
573
+ },
574
+ emits: ["update:activeTab", "change", "readAll"],
575
+ setup(n, {
576
+ emit: t
577
+ }) {
578
+ const i = n, a = t, l = d(i.activeTab);
579
+ H(() => i.activeTab, (r) => {
580
+ l.value = r;
581
+ });
582
+ function e(r) {
583
+ l.value = r, a("update:activeTab", r), a("change", r);
584
+ }
585
+ function s() {
586
+ i.messageList.length !== 0 && a("readAll");
587
+ }
588
+ return (r, u) => (o(), v("div", we, [_(Te, {
589
+ modelValue: l.value,
590
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => l.value = m),
591
+ tabs: n.tabs,
592
+ onChange: e
593
+ }, null, 8, ["modelValue", "tabs"]), l.value === "unread" ? (o(), v("div", {
594
+ key: 0,
595
+ class: z(["readAll", {
596
+ disabled: n.messageList.length === 0
597
+ }]),
598
+ onClick: s
599
+ }, [_(c(te), {
600
+ class: "icon",
601
+ icon: "icon-park-outline:clear"
602
+ }), u[1] || (u[1] = C("span", null, " 全部已读", -1))], 2)) : h("", !0)]));
603
+ }
604
+ }), Ee = /* @__PURE__ */ N(ze, [["__scopeId", "data-v-91277265"]]), Fe = {
605
+ class: "right"
606
+ }, Ve = /* @__PURE__ */ x({
607
+ __name: "MessageNotifications",
608
+ props: {
609
+ prefixUrl: {
610
+ type: String,
611
+ required: !0
612
+ }
613
+ },
614
+ setup(n) {
615
+ const t = n, {
616
+ isList: i,
617
+ loading: a,
618
+ finished: l,
619
+ messageList: e,
620
+ activeTab: s,
621
+ tabs: r,
622
+ toList: u,
623
+ onTabChange: m,
624
+ readAll: b,
625
+ getData: p,
626
+ openDetails: f
627
+ } = ee(t.prefixUrl, "system");
628
+ return ($, M) => (o(), v("div", Fe, [c(i) ? h("", !0) : (o(), g(c(I), {
629
+ key: 0,
630
+ style: {
631
+ "margin-bottom": "10px",
632
+ cursor: "pointer"
633
+ }
634
+ }, {
635
+ default: y(() => [_(c(S), {
636
+ style: {
637
+ padding: "0px"
638
+ },
639
+ onClick: c(u)
640
+ }, {
641
+ default: y(() => M[1] || (M[1] = [k("消息通知")])),
642
+ _: 1,
643
+ __: [1]
644
+ }, 8, ["onClick"]), _(c(S), {
645
+ style: {
646
+ padding: "0px"
647
+ }
648
+ }, {
649
+ default: y(() => M[2] || (M[2] = [k("详情")])),
650
+ _: 1,
651
+ __: [2]
652
+ })]),
653
+ _: 1
654
+ })), c(i) ? (o(), g(Ee, {
655
+ key: 1,
656
+ "active-tab": c(s),
657
+ "onUpdate:activeTab": M[0] || (M[0] = (V) => B(s) ? s.value = V : null),
658
+ tabs: c(r),
659
+ "message-list": c(e),
660
+ onChange: c(m),
661
+ onReadAll: c(b)
662
+ }, null, 8, ["active-tab", "tabs", "message-list", "onChange", "onReadAll"])) : h("", !0), c(i) ? (o(), g(L, {
663
+ key: 2,
664
+ "message-list": c(e),
665
+ loading: c(a),
666
+ finished: c(l),
667
+ "show-button": !1,
668
+ onOpenDetails: c(f),
669
+ onInfinite: c(p)
670
+ }, null, 8, ["message-list", "loading", "finished", "onOpenDetails", "onInfinite"])) : h("", !0)]));
671
+ }
672
+ }), Ke = /* @__PURE__ */ N(Ve, [["__scopeId", "data-v-8c964808"]]);
673
+ function Re(n, t) {
674
+ return U({
675
+ url: `${n}/restfulApi/messageCenter/noticeNotifications/find`,
676
+ method: "post",
677
+ data: t
678
+ });
679
+ }
680
+ function He(n, t) {
681
+ return U({
682
+ url: `${n}/restfulApi/messageCenter/noticeNotifications/findOne`,
683
+ method: "post",
684
+ data: t
685
+ });
686
+ }
687
+ const je = /* @__PURE__ */ x({
688
+ __name: "MessageNoticeNotificationsDetails",
689
+ props: {
690
+ prefixUrl: {
691
+ type: String,
692
+ required: !0
693
+ },
694
+ id: {
695
+ type: String,
696
+ required: !0
697
+ }
698
+ },
699
+ setup(n) {
700
+ const t = d(!1), i = d(null), a = d(""), l = n;
701
+ function e() {
702
+ t.value = !0, He(l.prefixUrl, {
703
+ id: l.id
704
+ }).then(({
705
+ data: s
706
+ }) => {
707
+ i.value = s.content, a.value = s.title, t.value = !1;
708
+ }).catch((s) => {
709
+ console.error("获取通知详情失败:", s), t.value = !1;
710
+ });
711
+ }
712
+ return e(), (s, r) => (o(), g(O, {
713
+ content: i.value,
714
+ title: a.value,
715
+ loading: t.value
716
+ }, null, 8, ["content", "title", "loading"]));
717
+ }
718
+ }), Ge = {
719
+ class: "right"
720
+ }, Je = /* @__PURE__ */ x({
721
+ __name: "MessageNoticeNotifications",
722
+ props: {
723
+ prefixUrl: {
724
+ type: String,
725
+ required: !0
726
+ }
727
+ },
728
+ setup(n) {
729
+ const t = n, i = d(), a = d(!0);
730
+ function l() {
731
+ a.value = !0;
732
+ }
733
+ const e = d(!1), s = d(!1), r = d([]), u = d({
734
+ total: 0,
735
+ current: 1,
736
+ pageSize: 10
737
+ });
738
+ function m() {
739
+ e.value = !0, Re(t.prefixUrl, {
740
+ current: u.value.current,
741
+ pageSize: u.value.pageSize,
742
+ where: {}
743
+ }).then(({
744
+ data: p
745
+ }) => {
746
+ e.value = !1, r.value = p.items, u.value.total = p.count, s.value = p.items.length < u.value.pageSize;
747
+ }).catch(() => {
748
+ e.value = !1;
749
+ });
750
+ }
751
+ function b(p) {
752
+ i.value = p.id, a.value = !1;
753
+ }
754
+ return m(), (p, f) => (o(), v("div", Ge, [a.value ? h("", !0) : (o(), g(c(I), {
755
+ key: 0,
756
+ style: {
757
+ "margin-bottom": "10px",
758
+ cursor: "pointer"
759
+ }
760
+ }, {
761
+ default: y(() => [_(c(S), {
762
+ style: {
763
+ padding: "0px"
764
+ },
765
+ onClick: l
766
+ }, {
767
+ default: y(() => f[0] || (f[0] = [k("公告")])),
768
+ _: 1,
769
+ __: [0]
770
+ }), _(c(S), {
771
+ style: {
772
+ padding: "0px"
773
+ }
774
+ }, {
775
+ default: y(() => f[1] || (f[1] = [k("详情")])),
776
+ _: 1,
777
+ __: [1]
778
+ })]),
779
+ _: 1
780
+ })), a.value ? (o(), g(L, {
781
+ key: 1,
782
+ "message-list": r.value,
783
+ loading: e.value,
784
+ finished: s.value,
785
+ onOpenDetails: b,
786
+ onInfinite: m
787
+ }, null, 8, ["message-list", "loading", "finished"])) : (o(), g(je, {
788
+ key: 2,
789
+ id: i.value,
790
+ "prefix-url": t.prefixUrl
791
+ }, null, 8, ["id", "prefix-url"]))]));
792
+ }
793
+ }), Pe = /* @__PURE__ */ N(Je, [["__scopeId", "data-v-21f62e2c"]]), Qe = /* @__PURE__ */ x({
794
+ __name: "MessageHandle",
795
+ props: {
796
+ prefixUrl: {
797
+ type: String,
798
+ required: !0
799
+ }
800
+ },
801
+ setup(n, {
802
+ expose: t
803
+ }) {
804
+ const i = n, a = d(["ChangelogNotifications"]), l = j(() => a.value.length !== 0 ? a.value[0] : ""), e = d(), s = d(Symbol("key"));
805
+ function r() {
806
+ e.value.setData(!0);
807
+ }
808
+ function u() {
809
+ s.value = Symbol("key");
810
+ }
811
+ function m() {
812
+ s.value = Symbol("key");
813
+ }
814
+ const b = d([{
815
+ name: "功能变更",
816
+ path: "ChangelogNotifications",
817
+ meta: {
818
+ icon: "mingcute:cube-3d-fill"
819
+ }
820
+ }, {
821
+ name: "活动通知",
822
+ path: "EventNotifications",
823
+ meta: {
824
+ icon: "mingcute:receive-money-fill"
825
+ }
826
+ }, {
827
+ name: "消息通知",
828
+ path: "MessageNotifications",
829
+ meta: {
830
+ icon: "mingcute:message-1-fill"
831
+ }
832
+ }, {
833
+ name: "公告",
834
+ path: "NoticeNotifications",
835
+ meta: {
836
+ icon: "mingcute:announcement-fill"
837
+ }
838
+ }]);
839
+ return t({
840
+ openNotification: r
841
+ }), (p, f) => (o(), g(ae, {
842
+ ref_key: "MessageNotificationsRef",
843
+ ref: e,
844
+ key: s.value,
845
+ "selected-keys": a.value,
846
+ "onUpdate:selectedKeys": f[0] || (f[0] = ($) => a.value = $),
847
+ menus: b.value,
848
+ "prefix-url": i.prefixUrl,
849
+ title: "消息中心",
850
+ onConfirm: m,
851
+ onCancel: u
852
+ }, {
853
+ default: y(() => [l.value === "ChangelogNotifications" ? (o(), g(Se, {
854
+ key: 0,
855
+ "prefix-url": i.prefixUrl
856
+ }, null, 8, ["prefix-url"])) : h("", !0), l.value === "EventNotifications" ? (o(), g(Be, {
857
+ key: 1,
858
+ "prefix-url": i.prefixUrl
859
+ }, null, 8, ["prefix-url"])) : h("", !0), l.value === "MessageNotifications" ? (o(), g(Ke, {
860
+ key: 2,
861
+ "prefix-url": i.prefixUrl
862
+ }, null, 8, ["prefix-url"])) : h("", !0), l.value === "NoticeNotifications" ? (o(), g(Pe, {
863
+ key: 3,
864
+ "prefix-url": i.prefixUrl
865
+ }, null, 8, ["prefix-url"])) : h("", !0)]),
866
+ _: 1
867
+ }, 8, ["selected-keys", "menus", "prefix-url"]));
868
+ }
869
+ }), dt = /* @__PURE__ */ N(Qe, [["__scopeId", "data-v-791afd23"]]);
870
+ export {
871
+ ae as A,
872
+ Se as C,
873
+ O as D,
874
+ Be as E,
875
+ fe as I,
876
+ dt as M,
877
+ Pe as N,
878
+ ue as _,
879
+ Te as a,
880
+ Le as b,
881
+ L as c,
882
+ Ke as d,
883
+ Ee as e,
884
+ je as f
885
+ };