@huyooo/ui 0.6.1 → 0.6.4

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,1103 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ import { defineComponent as V, createElementBlock as _, openBlock as o, normalizeStyle as W, normalizeClass as de, createElementVNode as $, computed as O, createBlock as y, unref as a, withCtx as r, createVNode as u, createCommentVNode as L, Fragment as B, createTextVNode as F, toDisplayString as z, ref as v, onUnmounted as $e, h as te, renderList as J, nextTick as N } from "vue";
5
+ import { Space as pe, Image as fe, Avatar as me, Descriptions as Fe, DescriptionsItem as H, Tag as M, Spin as Ue, Button as Q, Form as Re, FormItem as j, Input as Le, Select as le, Option as ae, Textarea as Be, Message as ze, Breadcrumb as Ve, BreadcrumbItem as ne, Modal as qe, Drawer as Ae } from "@arco-design/web-vue";
6
+ import { M as De } from "./Menu-BjWB9hre.js";
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ import { c as D, g as q } from "./auth-bwwc2iT8.js";
12
+ /* empty css */
13
+ /* empty css */
14
+ import { u as Ne } from "./useUploadCos-EWMNJjRf.js";
15
+ import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
+ /* empty css */
17
+ import { f as T } from "./index-Bb-d5pBq.js";
18
+ import { C as Oe } from "./CustomTable-BCOwLyRJ.js";
19
+ import { Bubble as ve, Prompts as Pe, Sender as Ee } from "ant-design-x-vue";
20
+ import { C as ye } from "./Clipboard-BAn3vQlX.js";
21
+ import { Icon as je } from "@iconify/vue";
22
+ import { _ as ge, g as be, i as ke } from "./plugin-vue_export-helper-LjDO2Zua.js";
23
+ const Me = V({
24
+ name: "IconExclamationCircle",
25
+ props: {
26
+ size: {
27
+ type: [Number, String]
28
+ },
29
+ strokeWidth: {
30
+ type: Number,
31
+ default: 4
32
+ },
33
+ strokeLinecap: {
34
+ type: String,
35
+ default: "butt",
36
+ validator: (e) => ["butt", "round", "square"].includes(e)
37
+ },
38
+ strokeLinejoin: {
39
+ type: String,
40
+ default: "miter",
41
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
42
+ },
43
+ rotate: Number,
44
+ spin: Boolean
45
+ },
46
+ emits: {
47
+ click: (e) => !0
48
+ },
49
+ setup(e, {
50
+ emit: l
51
+ }) {
52
+ const t = be("icon"), n = O(() => [t, `${t}-exclamation-circle`, {
53
+ [`${t}-spin`]: e.spin
54
+ }]), p = O(() => {
55
+ const s = {};
56
+ return e.size && (s.fontSize = ke(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
57
+ });
58
+ return {
59
+ cls: n,
60
+ innerStyle: p,
61
+ onClick: (s) => {
62
+ l("click", s);
63
+ }
64
+ };
65
+ }
66
+ }), Te = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
67
+ function We(e, l, t, n, p, i) {
68
+ return o(), _("svg", {
69
+ viewBox: "0 0 48 48",
70
+ fill: "none",
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ stroke: "currentColor",
73
+ class: de(e.cls),
74
+ style: W(e.innerStyle),
75
+ "stroke-width": e.strokeWidth,
76
+ "stroke-linecap": e.strokeLinecap,
77
+ "stroke-linejoin": e.strokeLinejoin,
78
+ onClick: l[0] || (l[0] = (...s) => e.onClick && e.onClick(...s))
79
+ }, l[1] || (l[1] = [$("path", {
80
+ d: "M24 28V14m0 16v4M6 24c0-9.941 8.059-18 18-18s18 8.059 18 18-8.059 18-18 18S6 33.941 6 24Z"
81
+ }, null, -1)]), 14, Te);
82
+ }
83
+ var Y = /* @__PURE__ */ ge(Me, [["render", We]]);
84
+ const se = Object.assign(Y, {
85
+ install: (e, l) => {
86
+ var t;
87
+ const n = (t = l == null ? void 0 : l.iconPrefix) != null ? t : "";
88
+ e.component(n + Y.name, Y);
89
+ }
90
+ }), Ke = V({
91
+ name: "IconLink",
92
+ props: {
93
+ size: {
94
+ type: [Number, String]
95
+ },
96
+ strokeWidth: {
97
+ type: Number,
98
+ default: 4
99
+ },
100
+ strokeLinecap: {
101
+ type: String,
102
+ default: "butt",
103
+ validator: (e) => ["butt", "round", "square"].includes(e)
104
+ },
105
+ strokeLinejoin: {
106
+ type: String,
107
+ default: "miter",
108
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
109
+ },
110
+ rotate: Number,
111
+ spin: Boolean
112
+ },
113
+ emits: {
114
+ click: (e) => !0
115
+ },
116
+ setup(e, {
117
+ emit: l
118
+ }) {
119
+ const t = be("icon"), n = O(() => [t, `${t}-link`, {
120
+ [`${t}-spin`]: e.spin
121
+ }]), p = O(() => {
122
+ const s = {};
123
+ return e.size && (s.fontSize = ke(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
124
+ });
125
+ return {
126
+ cls: n,
127
+ innerStyle: p,
128
+ onClick: (s) => {
129
+ l("click", s);
130
+ }
131
+ };
132
+ }
133
+ }), He = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
134
+ function Ye(e, l, t, n, p, i) {
135
+ return o(), _("svg", {
136
+ viewBox: "0 0 48 48",
137
+ fill: "none",
138
+ xmlns: "http://www.w3.org/2000/svg",
139
+ stroke: "currentColor",
140
+ class: de(e.cls),
141
+ style: W(e.innerStyle),
142
+ "stroke-width": e.strokeWidth,
143
+ "stroke-linecap": e.strokeLinecap,
144
+ "stroke-linejoin": e.strokeLinejoin,
145
+ onClick: l[0] || (l[0] = (...s) => e.onClick && e.onClick(...s))
146
+ }, l[1] || (l[1] = [$("path", {
147
+ d: "m14.1 25.414-4.95 4.95a6 6 0 0 0 8.486 8.485l8.485-8.485a6 6 0 0 0 0-8.485m7.779.707 4.95-4.95a6 6 0 1 0-8.486-8.485l-8.485 8.485a6 6 0 0 0 0 8.485"
148
+ }, null, -1)]), 14, He);
149
+ }
150
+ var Z = /* @__PURE__ */ ge(Ke, [["render", Ye]]);
151
+ const Ze = Object.assign(Z, {
152
+ install: (e, l) => {
153
+ var t;
154
+ const n = (t = l == null ? void 0 : l.iconPrefix) != null ? t : "";
155
+ e.component(n + Z.name, Z);
156
+ }
157
+ }), Ge = /* @__PURE__ */ V({
158
+ __name: "FeedbackRefresh",
159
+ setup(e) {
160
+ return (l, t) => (o(), y(a(je), {
161
+ class: "icon",
162
+ icon: "mingcute:refresh-2-line"
163
+ }));
164
+ }
165
+ }), Je = /* @__PURE__ */ P(Ge, [["__scopeId", "data-v-33249ffb"]]), Qe = ["src"], re = /* @__PURE__ */ V({
166
+ __name: "FeedbackBubbleEnd",
167
+ props: {
168
+ value: {
169
+ type: String,
170
+ required: !1,
171
+ default: ""
172
+ },
173
+ type: {
174
+ type: String,
175
+ default: "text",
176
+ validator: (e) => ["text", "image"].includes(e)
177
+ },
178
+ avatarUrl: {
179
+ type: String,
180
+ default: "A"
181
+ },
182
+ bubbleStyle: {
183
+ type: Object,
184
+ default: () => ({
185
+ paddingLeft: "52px"
186
+ })
187
+ },
188
+ showRefresh: {
189
+ type: Boolean,
190
+ default: !1
191
+ },
192
+ showClipboard: {
193
+ type: Boolean,
194
+ default: !1
195
+ }
196
+ },
197
+ emits: ["refresh"],
198
+ setup(e, {
199
+ emit: l
200
+ }) {
201
+ const t = e, n = l;
202
+ function p() {
203
+ n("refresh");
204
+ }
205
+ return (i, s) => (o(), y(a(ve), {
206
+ placement: "end",
207
+ style: W(t.bubbleStyle),
208
+ styles: {
209
+ content: {
210
+ padding: t.type === "image" ? "0px" : void 0
211
+ }
212
+ }
213
+ }, {
214
+ avatar: r(() => [u(a(me), null, {
215
+ default: r(() => [$("img", {
216
+ alt: "avatar",
217
+ src: t.avatarUrl
218
+ }, null, 8, Qe)]),
219
+ _: 1
220
+ })]),
221
+ message: r(() => [t.type === "text" ? (o(), _(B, {
222
+ key: 0
223
+ }, [F(z(t.value), 1)], 64)) : t.type === "image" ? (o(), y(a(fe), {
224
+ key: 1,
225
+ width: "100",
226
+ src: t.value,
227
+ "show-loader": ""
228
+ }, null, 8, ["src"])) : L("", !0)]),
229
+ footer: r(() => [u(a(pe), null, {
230
+ default: r(() => [t.showClipboard && t.type === "text" ? (o(), y(ye, {
231
+ key: 0,
232
+ value: e.value
233
+ }, null, 8, ["value"])) : L("", !0), t.showRefresh ? (o(), y(Je, {
234
+ key: 1,
235
+ onClick: p
236
+ })) : L("", !0)]),
237
+ _: 1
238
+ })]),
239
+ _: 1
240
+ }, 8, ["style", "styles"]));
241
+ }
242
+ }), Xe = ["src"], oe = /* @__PURE__ */ V({
243
+ __name: "FeedbackBubbleStart",
244
+ props: {
245
+ value: {
246
+ type: String,
247
+ required: !1,
248
+ default: ""
249
+ },
250
+ type: {
251
+ type: String,
252
+ default: "text",
253
+ validator: (e) => ["text", "image"].includes(e)
254
+ },
255
+ avatarUrl: {
256
+ type: String,
257
+ default: "A"
258
+ },
259
+ bubbleStyle: {
260
+ type: Object,
261
+ default: () => ({
262
+ paddingRight: "52px"
263
+ })
264
+ },
265
+ showClipboard: {
266
+ type: Boolean,
267
+ default: !1
268
+ }
269
+ },
270
+ emits: ["footer-click"],
271
+ setup(e, {
272
+ emit: l
273
+ }) {
274
+ const t = e;
275
+ return (n, p) => (o(), y(a(ve), {
276
+ placement: "start",
277
+ style: W(t.bubbleStyle),
278
+ styles: {
279
+ content: {
280
+ padding: t.type === "image" ? "0px" : void 0
281
+ }
282
+ }
283
+ }, {
284
+ avatar: r(() => [u(a(me), null, {
285
+ default: r(() => [$("img", {
286
+ alt: "avatar",
287
+ src: t.avatarUrl
288
+ }, null, 8, Xe)]),
289
+ _: 1
290
+ })]),
291
+ message: r(() => [t.type === "text" ? (o(), _(B, {
292
+ key: 0
293
+ }, [F(z(t.value), 1)], 64)) : t.type === "image" ? (o(), y(a(fe), {
294
+ key: 1,
295
+ width: "100",
296
+ src: t.value,
297
+ "show-loader": ""
298
+ }, null, 8, ["src"])) : L("", !0)]),
299
+ footer: r(() => [u(a(pe), null, {
300
+ default: r(() => [t.showClipboard && t.type === "text" ? (o(), y(ye, {
301
+ key: 0,
302
+ value: t.value
303
+ }, null, 8, ["value"])) : L("", !0)]),
304
+ _: 1
305
+ })]),
306
+ _: 1
307
+ }, 8, ["style", "styles"]));
308
+ }
309
+ }), b = [];
310
+ for (let e = 0; e < 256; ++e)
311
+ b.push((e + 256).toString(16).slice(1));
312
+ function et(e, l = 0) {
313
+ return (b[e[l + 0]] + b[e[l + 1]] + b[e[l + 2]] + b[e[l + 3]] + "-" + b[e[l + 4]] + b[e[l + 5]] + "-" + b[e[l + 6]] + b[e[l + 7]] + "-" + b[e[l + 8]] + b[e[l + 9]] + "-" + b[e[l + 10]] + b[e[l + 11]] + b[e[l + 12]] + b[e[l + 13]] + b[e[l + 14]] + b[e[l + 15]]).toLowerCase();
314
+ }
315
+ let G;
316
+ const tt = new Uint8Array(16);
317
+ function lt() {
318
+ if (!G) {
319
+ if (typeof crypto > "u" || !crypto.getRandomValues)
320
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
321
+ G = crypto.getRandomValues.bind(crypto);
322
+ }
323
+ return G(tt);
324
+ }
325
+ const at = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ie = {
326
+ randomUUID: at
327
+ };
328
+ function ue(e, l, t) {
329
+ var p;
330
+ if (ie.randomUUID && !e)
331
+ return ie.randomUUID();
332
+ e = e || {};
333
+ const n = e.random ?? ((p = e.rng) == null ? void 0 : p.call(e)) ?? lt();
334
+ if (n.length < 16)
335
+ throw new Error("Random bytes length must be >= 16");
336
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, et(n);
337
+ }
338
+ function nt(e, l = {}) {
339
+ const {
340
+ interval: t = 2e3,
341
+ immediate: n = !1,
342
+ autoStart: p = !1
343
+ } = l, i = v(!1);
344
+ let s = null;
345
+ async function h() {
346
+ try {
347
+ await e();
348
+ } catch (C) {
349
+ console.error("轮询回调执行失败:", C);
350
+ }
351
+ }
352
+ function c() {
353
+ if (i.value) {
354
+ console.warn("轮询已在运行中");
355
+ return;
356
+ }
357
+ i.value = !0, n && h(), s = setInterval(h, t);
358
+ }
359
+ function m() {
360
+ s && (clearInterval(s), s = null), i.value = !1;
361
+ }
362
+ function g() {
363
+ m(), c();
364
+ }
365
+ return p && c(), $e(() => {
366
+ m();
367
+ }), {
368
+ isPolling: i,
369
+ start: c,
370
+ stop: m,
371
+ restart: g
372
+ };
373
+ }
374
+ function st(e) {
375
+ return D({
376
+ url: `${q.prefixUrl}/restfulApi/feedbackCenter/create`,
377
+ method: "post",
378
+ data: e
379
+ });
380
+ }
381
+ function rt(e) {
382
+ return D({
383
+ url: `${q.prefixUrl}/restfulApi/feedbackCenter/findOne`,
384
+ method: "post",
385
+ data: e
386
+ });
387
+ }
388
+ function ot(e) {
389
+ return D({
390
+ url: `${q.prefixUrl}/restfulApi/feedbackCenter/own`,
391
+ method: "post",
392
+ data: e
393
+ });
394
+ }
395
+ function ce(e) {
396
+ return D({
397
+ url: `${q.prefixUrl}/restfulApi/feedbackCenter/update/messages`,
398
+ method: "post",
399
+ data: e
400
+ });
401
+ }
402
+ function it(e) {
403
+ return D({
404
+ url: `${q.prefixUrl}/restfulApi/messages/list/incremental`,
405
+ method: "post",
406
+ data: e
407
+ });
408
+ }
409
+ function ut(e) {
410
+ return D({
411
+ url: `${q.prefixUrl}/restfulApi/messages/list`,
412
+ method: "post",
413
+ data: e
414
+ });
415
+ }
416
+ const X = [{
417
+ key: "bugReports",
418
+ label: "问题报告"
419
+ }, {
420
+ key: "featureSuggestions",
421
+ label: "功能建议"
422
+ }, {
423
+ key: "technicalSupportRequests",
424
+ label: "技术支持请求"
425
+ }, {
426
+ key: "generalOpinions",
427
+ label: "一般意见"
428
+ }], ct = [{
429
+ key: "urgent",
430
+ label: "紧急"
431
+ }, {
432
+ key: "high",
433
+ label: "高"
434
+ }, {
435
+ key: "normal",
436
+ label: "普通"
437
+ }, {
438
+ key: "low",
439
+ label: "低"
440
+ }], _e = [{
441
+ key: "newFeedback",
442
+ label: "新建反馈"
443
+ }, {
444
+ key: "inProgress",
445
+ label: "正在处理"
446
+ }, {
447
+ key: "done",
448
+ label: "已解决"
449
+ }], dt = {
450
+ class: "FeedBackDetails"
451
+ }, pt = {
452
+ class: "content"
453
+ }, ft = {
454
+ key: 1,
455
+ class: "Bubbles"
456
+ }, mt = {
457
+ class: "sender-container"
458
+ }, vt = /* @__PURE__ */ V({
459
+ __name: "FeedbackDetails",
460
+ props: {
461
+ id: {
462
+ type: String,
463
+ required: !0,
464
+ default: () => ""
465
+ },
466
+ senderRole: {
467
+ type: String,
468
+ required: !0,
469
+ validator: (e) => ["user", "support"].includes(e)
470
+ }
471
+ },
472
+ setup(e) {
473
+ function l(d) {
474
+ return d === "inProgress" ? "orangered" : d === "done" ? "green" : "arcoblue";
475
+ }
476
+ const t = v(""), n = v(!1), p = [{
477
+ key: "1",
478
+ label: "如何补充更多信息",
479
+ description: "请详细描述您的问题或需求,以便我们更好地为您服务。",
480
+ disabled: !0,
481
+ icon: te(se, {
482
+ style: {
483
+ color: "#722ED1"
484
+ }
485
+ })
486
+ }, {
487
+ key: "3",
488
+ label: "如何补充附件",
489
+ description: "如有相关附件(如日志、截图等),请一并上传以便加快处理速度。",
490
+ disabled: !0,
491
+ icon: te(se, {
492
+ style: {
493
+ color: "#722ED1"
494
+ }
495
+ })
496
+ }], i = v(null), s = v(null), h = () => {
497
+ var d;
498
+ (d = i.value) == null || d.focus({
499
+ cursor: "end"
500
+ }), N(() => {
501
+ s.value && (s.value.scrollTop = s.value.scrollHeight);
502
+ });
503
+ }, c = e;
504
+ function m() {
505
+ }
506
+ const g = v(!1), C = v([]), R = v(void 0), U = v({
507
+ id: void 0,
508
+ title: "",
509
+ description: "",
510
+ type: "bugReports",
511
+ status: "done",
512
+ reply: "",
513
+ createAt: ""
514
+ }), k = () => {
515
+ const {
516
+ uploadFile: d
517
+ } = Ne(), w = document.createElement("input");
518
+ w.type = "file", w.accept = "image/*", w.style.display = "none", document.body.append(w), w.addEventListener("change", async (f) => {
519
+ var ee;
520
+ const A = (ee = f.target.files) == null ? void 0 : ee[0];
521
+ if (A) {
522
+ n.value = !0;
523
+ try {
524
+ d({
525
+ bucketId: q.feedbackBucketId,
526
+ file: A,
527
+ onFileFinish(xe, Ft, we) {
528
+ const Se = {
529
+ messageId: ue(),
530
+ senderRole: c.senderRole,
531
+ type: "image",
532
+ key: we.Key
533
+ }, Ie = {
534
+ id: c.id,
535
+ message: Se
536
+ };
537
+ ce(Ie).then(({
538
+ data: K
539
+ }) => {
540
+ C.value.push(K.message), typeof K.message.seq == "number" && (R.value = K.message.seq), N(() => {
541
+ h();
542
+ }), n.value = !1, c.senderRole === "support" && U.value.status === "newFeedback" && I();
543
+ }).catch(() => {
544
+ n.value = !1;
545
+ });
546
+ },
547
+ onError(xe) {
548
+ n.value = !1;
549
+ }
550
+ });
551
+ } catch {
552
+ n.value = !1;
553
+ }
554
+ }
555
+ w.remove();
556
+ }), w.click();
557
+ };
558
+ function S(d) {
559
+ n.value = !0;
560
+ const f = {
561
+ messageId: ue(),
562
+ senderRole: c.senderRole,
563
+ type: "text",
564
+ content: d
565
+ }, E = {
566
+ id: c.id,
567
+ message: f
568
+ };
569
+ ce(E).then(({
570
+ data: A
571
+ }) => {
572
+ n.value = !1, C.value.push(A.message), typeof A.message.seq == "number" && (R.value = A.message.seq), N(() => {
573
+ h();
574
+ }), t.value = "", c.senderRole === "support" && U.value.status === "newFeedback" && I();
575
+ }).catch(() => {
576
+ n.value = !1;
577
+ });
578
+ }
579
+ function x() {
580
+ S(t.value);
581
+ }
582
+ function I() {
583
+ g.value = !0, rt({
584
+ id: c.id
585
+ }).then(async ({
586
+ data: d
587
+ }) => {
588
+ g.value = !1, U.value = d, d.messages && d.messages.length > 0 && (C.value = d.messages, R.value = d.messages.at(-1).seq);
589
+ }).catch(() => {
590
+ g.value = !1;
591
+ });
592
+ }
593
+ function he() {
594
+ it({
595
+ id: c.id,
596
+ lastSeq: R.value
597
+ }).then(async ({
598
+ data: d
599
+ }) => {
600
+ d && d.messages && d.messages.length > 0 && (C.value.push(...d.messages), R.value = d.messages.at(-1).seq, N(() => {
601
+ h();
602
+ }));
603
+ }).catch(() => {
604
+ });
605
+ }
606
+ function Ce() {
607
+ g.value = !0, ut({
608
+ id: c.id
609
+ }).then(async ({
610
+ data: d
611
+ }) => {
612
+ g.value = !1, d && d.messages && d.messages.length > 0 && (C.value.push(...d.messages), R.value = d.messages.at(-1).seq, N(() => {
613
+ h();
614
+ }));
615
+ }).catch(() => {
616
+ g.value = !1;
617
+ });
618
+ }
619
+ return nt(he, {
620
+ interval: 2e3,
621
+ autoStart: !0
622
+ }), I(), Ce(), (d, w) => (o(), _("div", dt, [$("div", {
623
+ ref_key: "scrollableContentRef",
624
+ ref: s,
625
+ class: "scrollable-content"
626
+ }, [u(a(Fe), {
627
+ title: "基本信息"
628
+ }, {
629
+ title: r(() => [...w[1] || (w[1] = [$("div", {
630
+ class: "title"
631
+ }, "基本信息", -1)])]),
632
+ default: r(() => [u(a(H), {
633
+ label: "标题:",
634
+ span: 3
635
+ }, {
636
+ default: r(() => [F(z(U.value.title), 1)]),
637
+ _: 1
638
+ }), u(a(H), {
639
+ label: "反馈类型:",
640
+ span: 1
641
+ }, {
642
+ default: r(() => [u(a(M), {
643
+ color: "arcoblue"
644
+ }, {
645
+ default: r(() => {
646
+ var f;
647
+ return [F(z((f = a(T)(a(X), U.value.type)) == null ? void 0 : f.label), 1)];
648
+ }),
649
+ _: 1
650
+ })]),
651
+ _: 1
652
+ }), u(a(H), {
653
+ label: "状态:",
654
+ span: 1
655
+ }, {
656
+ default: r(() => [u(a(M), {
657
+ color: l(U.value.status)
658
+ }, {
659
+ default: r(() => {
660
+ var f;
661
+ return [F(z((f = a(T)(a(_e), U.value.status)) == null ? void 0 : f.label), 1)];
662
+ }),
663
+ _: 1
664
+ }, 8, ["color"])]),
665
+ _: 1
666
+ })]),
667
+ _: 1
668
+ }), $("div", pt, [w[2] || (w[2] = $("div", {
669
+ class: "title"
670
+ }, "沟通记录", -1)), u(a(Ue), {
671
+ class: "messageContent",
672
+ loading: g.value
673
+ }, {
674
+ default: r(() => [C.value.length == 0 ? (o(), y(a(Pe), {
675
+ key: 0,
676
+ title: "☕️ 温馨提示!",
677
+ items: p,
678
+ wrap: "",
679
+ vertical: !1,
680
+ onOnItemClick: m
681
+ })) : (o(), _("div", ft, [(o(!0), _(B, null, J(C.value, (f, E) => (o(), _(B, {
682
+ key: E
683
+ }, [f.type === "text" ? (o(), _(B, {
684
+ key: 0
685
+ }, [f.senderRole !== c.senderRole ? (o(), y(oe, {
686
+ key: 0,
687
+ value: f.content,
688
+ type: f.type,
689
+ "avatar-url": f.senderInfo.avatarUrl
690
+ }, null, 8, ["value", "type", "avatar-url"])) : (o(), y(re, {
691
+ key: 1,
692
+ value: f.content,
693
+ "avatar-url": f.senderInfo.avatarUrl,
694
+ type: f.type
695
+ }, null, 8, ["value", "avatar-url", "type"]))], 64)) : (o(), _(B, {
696
+ key: 1
697
+ }, [f.senderRole !== c.senderRole ? (o(), y(oe, {
698
+ key: 0,
699
+ type: f.type,
700
+ value: f.url,
701
+ "avatar-text": "S",
702
+ "avatar-url": f.senderInfo.avatarUrl
703
+ }, null, 8, ["type", "value", "avatar-url"])) : (o(), y(re, {
704
+ key: 1,
705
+ type: f.type,
706
+ value: f.url,
707
+ "avatar-url": f.senderInfo.avatarUrl
708
+ }, null, 8, ["type", "value", "avatar-url"]))], 64))], 64))), 128))]))]),
709
+ _: 1
710
+ }, 8, ["loading"])])], 512), $("div", mt, [u(a(Ee), {
711
+ ref_key: "senderRef",
712
+ ref: i,
713
+ value: t.value,
714
+ "onUpdate:value": w[0] || (w[0] = (f) => t.value = f),
715
+ placeholder: "请输入你要咨询的问题?",
716
+ loading: n.value,
717
+ "allow-speech": !1,
718
+ "read-only": n.value,
719
+ onSubmit: x
720
+ }, {
721
+ prefix: r(() => [u(a(Q), {
722
+ type: "text",
723
+ class: "IconLink",
724
+ onClick: k
725
+ }, {
726
+ icon: r(() => [u(a(Ze))]),
727
+ _: 1
728
+ })]),
729
+ _: 1
730
+ }, 8, ["value", "loading", "read-only"])])]));
731
+ }
732
+ }), yt = /* @__PURE__ */ P(vt, [["__scopeId", "data-v-c946a3a1"]]), gt = {
733
+ class: "FeedBackFrom"
734
+ }, bt = /* @__PURE__ */ V({
735
+ __name: "FeedbackForm",
736
+ emits: ["confirm"],
737
+ setup(e, {
738
+ emit: l
739
+ }) {
740
+ const t = l, n = v(), p = v(!1), i = v({
741
+ id: void 0,
742
+ title: "",
743
+ type: "bugReports",
744
+ priority: "normal",
745
+ description: "",
746
+ screenshots: []
747
+ });
748
+ v([]);
749
+ function s() {
750
+ n.value.validate().then((h) => {
751
+ h || (p.value = !0, st({
752
+ title: i.value.title,
753
+ type: i.value.type,
754
+ priority: i.value.priority,
755
+ description: i.value.description,
756
+ screenshots: i.value.screenshots
757
+ }).then(() => {
758
+ p.value = !1, ze.success("新建反馈成功"), t("confirm");
759
+ }).catch(() => {
760
+ p.value = !1;
761
+ }));
762
+ });
763
+ }
764
+ return (h, c) => (o(), _("div", gt, [u(a(Re), {
765
+ ref_key: "formRef",
766
+ ref: n,
767
+ model: i.value,
768
+ "auto-label-width": "",
769
+ layout: "vertical"
770
+ }, {
771
+ default: r(() => [u(a(j), {
772
+ field: "title",
773
+ label: "标题",
774
+ rules: [{
775
+ required: !0,
776
+ message: "请输入标题"
777
+ }]
778
+ }, {
779
+ default: r(() => [u(a(Le), {
780
+ modelValue: i.value.title,
781
+ "onUpdate:modelValue": c[0] || (c[0] = (m) => i.value.title = m),
782
+ placeholder: "请输入标题"
783
+ }, null, 8, ["modelValue"])]),
784
+ _: 1
785
+ }), u(a(j), {
786
+ field: "type",
787
+ label: "反馈类型",
788
+ rules: [{
789
+ required: !0,
790
+ message: "请选择反馈类型"
791
+ }]
792
+ }, {
793
+ default: r(() => [u(a(le), {
794
+ modelValue: i.value.type,
795
+ "onUpdate:modelValue": c[1] || (c[1] = (m) => i.value.type = m),
796
+ placeholder: "请选择反馈类型"
797
+ }, {
798
+ default: r(() => [(o(!0), _(B, null, J(a(X), (m, g) => (o(), y(a(ae), {
799
+ key: g,
800
+ value: m.key
801
+ }, {
802
+ default: r(() => [F(z(m.label), 1)]),
803
+ _: 2
804
+ }, 1032, ["value"]))), 128))]),
805
+ _: 1
806
+ }, 8, ["modelValue"])]),
807
+ _: 1
808
+ }), u(a(j), {
809
+ field: "priority",
810
+ label: "优先级",
811
+ rules: [{
812
+ required: !0,
813
+ message: "请选择优先级"
814
+ }]
815
+ }, {
816
+ default: r(() => [u(a(le), {
817
+ modelValue: i.value.priority,
818
+ "onUpdate:modelValue": c[2] || (c[2] = (m) => i.value.priority = m),
819
+ placeholder: "请选择优先级"
820
+ }, {
821
+ default: r(() => [(o(!0), _(B, null, J(a(ct), (m, g) => (o(), y(a(ae), {
822
+ key: g,
823
+ value: m.key
824
+ }, {
825
+ default: r(() => [F(z(m.label), 1)]),
826
+ _: 2
827
+ }, 1032, ["value"]))), 128))]),
828
+ _: 1
829
+ }, 8, ["modelValue"])]),
830
+ _: 1
831
+ }), u(a(j), {
832
+ field: "description",
833
+ label: "问题描述",
834
+ rules: [{
835
+ required: !0,
836
+ message: "请输入问题描述"
837
+ }]
838
+ }, {
839
+ default: r(() => [u(a(Be), {
840
+ modelValue: i.value.description,
841
+ "onUpdate:modelValue": c[3] || (c[3] = (m) => i.value.description = m),
842
+ placeholder: "请输入问题描述",
843
+ "allow-clear": "",
844
+ "auto-size": {
845
+ minRows: 5
846
+ }
847
+ }, null, 8, ["modelValue"])]),
848
+ _: 1
849
+ }), L("", !0), u(a(Q), {
850
+ loading: p.value,
851
+ type: "primary",
852
+ onClick: s
853
+ }, {
854
+ default: r(() => [...c[4] || (c[4] = [F(" 提交 ", -1)])]),
855
+ _: 1
856
+ }, 8, ["loading"])]),
857
+ _: 1
858
+ }, 8, ["model"])]));
859
+ }
860
+ }), kt = /* @__PURE__ */ P(bt, [["__scopeId", "data-v-2f79c0a9"]]), _t = {
861
+ class: "messages"
862
+ }, ht = {
863
+ key: 1,
864
+ class: "list"
865
+ }, Ct = /* @__PURE__ */ V({
866
+ __name: "FeedbackList",
867
+ emits: ["toDetail"],
868
+ setup(e, {
869
+ emit: l
870
+ }) {
871
+ const t = v(!0), n = v([]), p = v(!1), i = v(""), s = v({
872
+ total: 0,
873
+ current: 1,
874
+ pageSize: 10
875
+ });
876
+ function h() {
877
+ t.value = !0;
878
+ }
879
+ function c(k) {
880
+ i.value = k.id, t.value = !1;
881
+ }
882
+ const m = [{
883
+ dataIndex: "id",
884
+ slotName: "id",
885
+ title: "ID",
886
+ minWidth: 100,
887
+ ellipsis: !0,
888
+ tooltip: !0
889
+ }, {
890
+ dataIndex: "title",
891
+ slotName: "title",
892
+ title: "标题",
893
+ minWidth: 100,
894
+ ellipsis: !0,
895
+ tooltip: !0
896
+ }, {
897
+ dataIndex: "type",
898
+ slotName: "type",
899
+ title: "反馈类型",
900
+ minWidth: 100,
901
+ ellipsis: !0,
902
+ tooltip: !0
903
+ }, {
904
+ dataIndex: "status",
905
+ slotName: "status",
906
+ title: "状态",
907
+ minWidth: 100,
908
+ ellipsis: !0,
909
+ tooltip: !0
910
+ }, {
911
+ dataIndex: "createAt",
912
+ slotName: "createAt",
913
+ title: "创建日期",
914
+ minWidth: 180
915
+ }, {
916
+ dataIndex: "actions",
917
+ slotName: "actions",
918
+ title: "操作",
919
+ fixed: "right",
920
+ minWidth: 80
921
+ }];
922
+ function g(k) {
923
+ return k === "inProgress" ? "orangered" : k === "done" ? "green" : "arcoblue";
924
+ }
925
+ function C() {
926
+ p.value = !0, ot({
927
+ current: s.value.current,
928
+ pageSize: s.value.pageSize
929
+ }).then(async ({
930
+ data: k
931
+ }) => {
932
+ p.value = !1, n.value = k.items, s.value.total = k.count;
933
+ }).catch(() => {
934
+ p.value = !1;
935
+ });
936
+ }
937
+ const R = (k) => {
938
+ s.value.current = k, C();
939
+ }, U = (k) => {
940
+ s.value.current = 1, s.value.pageSize = k, C();
941
+ };
942
+ return C(), (k, S) => (o(), _("div", _t, [t.value ? L("", !0) : (o(), y(a(Ve), {
943
+ key: 0,
944
+ style: {
945
+ "margin-bottom": "10px",
946
+ cursor: "pointer"
947
+ }
948
+ }, {
949
+ default: r(() => [u(a(ne), {
950
+ style: {
951
+ padding: "0px"
952
+ },
953
+ onClick: h
954
+ }, {
955
+ default: r(() => [...S[0] || (S[0] = [F("我的反馈", -1)])]),
956
+ _: 1
957
+ }), u(a(ne), {
958
+ style: {
959
+ padding: "0px"
960
+ }
961
+ }, {
962
+ default: r(() => [...S[1] || (S[1] = [F("反馈详情", -1)])]),
963
+ _: 1
964
+ })]),
965
+ _: 1
966
+ })), t.value ? (o(), _("div", ht, [u(Oe, {
967
+ columns: m,
968
+ data: n.value,
969
+ loading: p.value,
970
+ pagination: s.value,
971
+ onPageChange: R,
972
+ onPageSizeChange: U
973
+ }, {
974
+ type: r(({
975
+ record: x
976
+ }) => [u(a(M), {
977
+ color: "arcoblue"
978
+ }, {
979
+ default: r(() => {
980
+ var I;
981
+ return [F(z((I = a(T)(a(X), x.type)) == null ? void 0 : I.label), 1)];
982
+ }),
983
+ _: 2
984
+ }, 1024)]),
985
+ status: r(({
986
+ record: x
987
+ }) => [u(a(M), {
988
+ color: g(x.status)
989
+ }, {
990
+ default: r(() => {
991
+ var I;
992
+ return [F(z((I = a(T)(a(_e), x.status)) == null ? void 0 : I.label), 1)];
993
+ }),
994
+ _: 2
995
+ }, 1032, ["color"])]),
996
+ actions: r(({
997
+ record: x
998
+ }) => [u(a(Q), {
999
+ type: "text",
1000
+ onClick: (I) => c(x)
1001
+ }, {
1002
+ default: r(() => [...S[2] || (S[2] = [F("查看", -1)])]),
1003
+ _: 1
1004
+ }, 8, ["onClick"])]),
1005
+ _: 1
1006
+ }, 8, ["data", "loading", "pagination"])])) : (o(), y(yt, {
1007
+ key: 2,
1008
+ id: i.value,
1009
+ "sender-role": "user"
1010
+ }, null, 8, ["id"]))]));
1011
+ }
1012
+ }), xt = /* @__PURE__ */ P(Ct, [["__scopeId", "data-v-08318fc7"]]), wt = {
1013
+ class: "content"
1014
+ }, St = {
1015
+ class: "left"
1016
+ }, It = {
1017
+ class: "right"
1018
+ }, $t = /* @__PURE__ */ V({
1019
+ __name: "FeedbackModal",
1020
+ emits: ["confirm", "cancel"],
1021
+ setup(e, {
1022
+ expose: l,
1023
+ emit: t
1024
+ }) {
1025
+ const n = v(!1), p = t;
1026
+ function i() {
1027
+ p("cancel");
1028
+ }
1029
+ const s = v(["FeedbackList"]), h = v("功能变更"), c = v([{
1030
+ name: "我的反馈",
1031
+ path: "FeedbackList",
1032
+ meta: {
1033
+ icon: "mingcute:cube-3d-fill"
1034
+ }
1035
+ }, {
1036
+ name: "新建反馈",
1037
+ path: "CreateFeedback",
1038
+ meta: {
1039
+ icon: "mingcute:cube-3d-fill"
1040
+ }
1041
+ }]), m = v(!1), g = O(() => s.value.length !== 0 ? s.value[0] : "");
1042
+ function C() {
1043
+ s.value = ["FeedbackList"];
1044
+ }
1045
+ function R() {
1046
+ m.value = !1;
1047
+ }
1048
+ function U(S) {
1049
+ s.value = [S.path], h.value = S.name;
1050
+ }
1051
+ function k(S) {
1052
+ n.value = S;
1053
+ }
1054
+ return l({
1055
+ setData: k
1056
+ }), (S, x) => (o(), y(a(qe), {
1057
+ visible: n.value,
1058
+ "onUpdate:visible": x[1] || (x[1] = (I) => n.value = I),
1059
+ loading: !1,
1060
+ "body-class": "AppMessagebodyClass",
1061
+ "mask-closable": !1,
1062
+ footer: !1,
1063
+ width: "auto",
1064
+ title: "用户反馈",
1065
+ "hide-title": !1,
1066
+ onCancel: i
1067
+ }, {
1068
+ default: r(() => [n.value ? (o(), _(B, {
1069
+ key: 0
1070
+ }, [$("div", wt, [$("div", St, [u(De, {
1071
+ "selected-keys": s.value,
1072
+ "onUpdate:selectedKeys": x[0] || (x[0] = (I) => s.value = I),
1073
+ menus: c.value,
1074
+ onChange: U
1075
+ }, null, 8, ["selected-keys", "menus"])]), $("div", It, [g.value === "FeedbackList" ? (o(), y(xt, {
1076
+ key: 0
1077
+ })) : L("", !0), g.value === "CreateFeedback" ? (o(), y(kt, {
1078
+ key: 1,
1079
+ onConfirm: C
1080
+ })) : L("", !0)])]), u(a(Ae), {
1081
+ width: 400,
1082
+ visible: m.value,
1083
+ "unmount-on-close": "",
1084
+ footer: !1,
1085
+ title: `${h.value}详情`,
1086
+ onCancel: R
1087
+ }, {
1088
+ default: r(() => [...x[2] || (x[2] = [$("div", null, " You can customize modal body text by the current situation. This modal will be closed immediately once you press the OK button. ", -1)])]),
1089
+ _: 1
1090
+ }, 8, ["visible", "title"])], 64)) : L("", !0)]),
1091
+ _: 1
1092
+ }, 8, ["visible"]));
1093
+ }
1094
+ }), Qt = /* @__PURE__ */ P($t, [["__scopeId", "data-v-fac2fc97"]]);
1095
+ export {
1096
+ yt as F,
1097
+ Je as R,
1098
+ re as _,
1099
+ oe as a,
1100
+ kt as b,
1101
+ xt as c,
1102
+ Qt as d
1103
+ };