@huyooo/ui 1.0.7 → 2.0.1
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/AuthkitAppSetting-DCQH9IpU.js +2678 -0
- package/dist/{Contact-BWuVR9ho.js → Contact-C7ROEqe-.js} +9 -9
- package/dist/{CustomTable-BzGfaAVH.js → CustomTable-GgvDEidl.js} +1 -1
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-C1hPqnNT.js +1531 -0
- package/dist/{LegalDocViewer-DM8FYBpf.js → LegalDocViewer-D_QUh0uf.js} +747 -748
- package/dist/MessageHandle-DKoySsCG.js +1233 -0
- package/dist/{MessageList-Ce-_LNTk.js → MessageList-HSiKkUoD.js} +4 -4
- package/dist/PaySubscriptions-NcATVJGm.js +1331 -0
- package/dist/{PricingPlans-CV97ck9p.js → PricingPlans-CZn6eJby.js} +99 -105
- package/dist/{ReferrerReferees-DgygiIiE.js → ReferrerReferees-BoOQIssE.js} +47 -46
- package/dist/Upload.vue_vue_type_script_setup_true_lang-CkS2S9Xc.js +83 -0
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-0Td42Nb3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BrNx6JWe.js} +64 -65
- package/dist/WidthContainer-BJLdZfzF.js +717 -0
- package/dist/api/billingSubscriptionApi.d.ts +4 -1
- package/dist/apiClients-CR-hEwog.js +245 -0
- package/dist/authkit.js +10 -10
- package/dist/common/globalConfig.d.ts +36 -18
- package/dist/common.js +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +0 -5
- package/dist/components/Feedback/FeedbackDetails.vue.d.ts +11 -0
- package/dist/components/Upload/Upload.vue.d.ts +7 -6
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -0
- package/dist/composables/Billing/usePaymentReturn.d.ts +1 -0
- package/dist/composables/uploadFeedbackAttachment.d.ts +8 -1
- package/dist/composables/useMessageList.d.ts +2 -1
- package/dist/composables.d.ts +2 -2
- package/dist/composables.js +46 -46
- package/dist/feedback.js +2 -2
- package/dist/{fetchAuthPageAboutUs-dzTSwRsB.js → fetchAuthPageAboutUs-BnKWq_TL.js} +4 -4
- package/dist/{index-BkLvw1PU.js → index-BhVwozr0.js} +1 -1
- package/dist/legalDocs/resolveAppId.d.ts +1 -1
- package/dist/main.d.ts +4 -3
- package/dist/main.js +464 -469
- package/dist/message.js +53 -52
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{useUploadCos-C8BqFPkx.js → runtime-DMCyhVcI.js} +2305 -2185
- package/dist/runtime.d.ts +22 -0
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +0 -10
- package/dist/upload/browserCosTransport.d.ts +22 -0
- package/dist/upload/browserUploadService.d.ts +21 -0
- package/dist/upload.d.ts +2 -1
- package/dist/upload.js +5 -4
- package/dist/{useAuthkitAppsAuthPageInfo-CNudJd04.js → useAuthkitAppsAuthPageInfo-Byu0yvrx.js} +18 -21
- package/dist/useAuthkitAuth-M2vTpEcb.js +272 -0
- package/dist/{useAuthkitCreateAndUpdate-BsINsI-E.js → useAuthkitCreateAndUpdate-D2_Bdazi.js} +1 -1
- package/dist/useAuthkitUsersProfile-DdUAENic.js +39 -0
- package/dist/useBillingStatusOptions-Jq6Wqfxb.js +61 -0
- package/dist/{useEnsureAuthenticated-DNkCCy_Y.js → useEnsureAuthenticated-Hel8hWLJ.js} +2 -2
- package/dist/{useLegalDocs-DQP_Yq6B.js → useLegalDocs-BOjqYRyQ.js} +25 -25
- package/dist/useMessageNotifications-AznFeFMD.js +80 -0
- package/dist/{useRoutePermission-CEiya9AM.js → useRoutePermission-BmUXTwQc.js} +2 -2
- package/dist/{useSEO-CDWxbk8B.js → useSEO-Chz4Zxuu.js} +89 -86
- package/dist/useSubscriptionCheckout-3ivcOcgC.js +353 -0
- package/dist/user.js +1 -1
- package/dist/utils/apiClients.d.ts +20 -12
- package/dist/utils/apiMiddlewares.d.ts +9 -23
- package/package.json +1 -1
- package/dist/AuthkitAppSetting-BN8-xgNq.js +0 -2674
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DrL_XBqf.js +0 -1481
- package/dist/MessageHandle-mEkCsv9e.js +0 -1173
- package/dist/PaySubscriptions-CXkEjqr2.js +0 -1326
- package/dist/Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js +0 -76
- package/dist/WidthContainer-CFMQRsCy.js +0 -721
- package/dist/apiClients-BcXOLuYu.js +0 -272
- package/dist/composables/Upload/useUploadCos.d.ts +0 -12
- package/dist/useAuthkitAuth-3m0yW6uP.js +0 -267
- package/dist/useAuthkitUsersProfile-DJlMsftY.js +0 -40
- package/dist/useBillingStatusOptions-CfHQOFNw.js +0 -71
- package/dist/useMessageNotifications-CAphguOm.js +0 -75
- package/dist/useSubscriptionCheckout-d_M_rKRa.js +0 -368
- package/dist/utils/billingFetch.d.ts +0 -1
|
@@ -1,1481 +0,0 @@
|
|
|
1
|
-
/* empty css */
|
|
2
|
-
/* empty css */
|
|
3
|
-
import { U as Je } from "./userMenuModal-D-nDaYqM.js";
|
|
4
|
-
import { defineComponent as q, useModel as Ze, openBlock as s, createBlock as B, Teleport as Qe, createElementBlock as u, withKeys as et, createElementVNode as y, toDisplayString as F, withModifiers as G, createCommentVNode as R, mergeModels as tt, ref as g, computed as P, Fragment as L, renderList as N, createVNode as f, unref as a, normalizeStyle as ee, withCtx as v, createTextVNode as V, normalizeClass as re, onBeforeUnmount as at, onUnmounted as st, watch as ve, readonly as nt, nextTick as ae } from "vue";
|
|
5
|
-
import { ImagePreviewGroup as be, Avatar as oe, Space as ue, Descriptions as lt, DescriptionsItem as se, Tag as Z, Spin as it, Empty as rt, Button as me, Message as ce, Form as ot, FormItem as Y, Input as ut, Select as Ue, Option as xe, Textarea as ct, Breadcrumb as dt, BreadcrumbItem as Se, Modal as ft } from "@arco-design/web-vue";
|
|
6
|
-
import { M as vt } from "./Menu-uCexrsKP.js";
|
|
7
|
-
/* empty css */
|
|
8
|
-
import { C as de } from "./index-BkLvw1PU.js";
|
|
9
|
-
/* empty css */
|
|
10
|
-
/* empty css */
|
|
11
|
-
import { o as z, g as Ie } from "./apiClients-BcXOLuYu.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { g as pt, u as mt } from "./useUploadCos-C8BqFPkx.js";
|
|
14
|
-
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
-
import { r as gt, m as $e, a as bt, M as kt } from "./MessageList-Ce-_LNTk.js";
|
|
16
|
-
import { f as Q } from "./index-D56hUMeD.js";
|
|
17
|
-
import { Bubble as Ae, Sender as yt } from "ant-design-x-vue";
|
|
18
|
-
import { u as _t } from "./useAuthkitUsersProfile-DJlMsftY.js";
|
|
19
|
-
import { u as ht } from "./useUserMenu-ClPBlvaM.js";
|
|
20
|
-
/* empty css */
|
|
21
|
-
import { Icon as wt } from "@iconify/vue";
|
|
22
|
-
import { _ as Ct, g as Ut, i as xt } from "./plugin-vue_export-helper-LjDO2Zua.js";
|
|
23
|
-
const St = {
|
|
24
|
-
class: "video-preview__header"
|
|
25
|
-
}, $t = {
|
|
26
|
-
class: "video-preview__title"
|
|
27
|
-
}, Ft = {
|
|
28
|
-
class: "video-preview__stage"
|
|
29
|
-
}, It = ["src"], At = /* @__PURE__ */ q({
|
|
30
|
-
__name: "VideoPreview",
|
|
31
|
-
props: /* @__PURE__ */ tt({
|
|
32
|
-
src: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
title: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: ""
|
|
39
|
-
}
|
|
40
|
-
}, {
|
|
41
|
-
visible: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: !1
|
|
44
|
-
},
|
|
45
|
-
visibleModifiers: {}
|
|
46
|
-
}),
|
|
47
|
-
emits: ["update:visible"],
|
|
48
|
-
setup(e) {
|
|
49
|
-
const t = Ze(e, "visible"), i = e;
|
|
50
|
-
function o() {
|
|
51
|
-
t.value = !1;
|
|
52
|
-
}
|
|
53
|
-
return (m, l) => (s(), B(Qe, {
|
|
54
|
-
to: "body"
|
|
55
|
-
}, [t.value ? (s(), u("div", {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "video-preview",
|
|
58
|
-
tabindex: "0",
|
|
59
|
-
onClick: o,
|
|
60
|
-
onKeydown: et(o, ["esc"])
|
|
61
|
-
}, [y("div", St, [y("div", $t, F(i.title), 1), y("button", {
|
|
62
|
-
type: "button",
|
|
63
|
-
class: "video-preview__close",
|
|
64
|
-
onClick: G(o, ["stop"])
|
|
65
|
-
}, " × ")]), y("div", Ft, [i.src ? (s(), u("video", {
|
|
66
|
-
key: 0,
|
|
67
|
-
class: "video-preview__video",
|
|
68
|
-
src: i.src,
|
|
69
|
-
controls: "",
|
|
70
|
-
autoplay: "",
|
|
71
|
-
onClick: l[0] || (l[0] = G(() => {
|
|
72
|
-
}, ["stop"]))
|
|
73
|
-
}, null, 8, It)) : R("", !0)])], 32)) : R("", !0)]));
|
|
74
|
-
}
|
|
75
|
-
}), ke = /* @__PURE__ */ W(At, [["__scopeId", "data-v-3f517bc8"]]), Pt = {
|
|
76
|
-
key: 0,
|
|
77
|
-
class: "message-attachments"
|
|
78
|
-
}, Rt = ["title", "onClick"], Bt = ["src", "alt"], Tt = ["title", "onClick"], Mt = ["src"], Lt = ["href", "title"], Vt = {
|
|
79
|
-
class: "message-attachment-main"
|
|
80
|
-
}, Et = {
|
|
81
|
-
class: "message-attachment-name"
|
|
82
|
-
}, Dt = {
|
|
83
|
-
class: "message-attachment-meta"
|
|
84
|
-
}, qt = /* @__PURE__ */ q({
|
|
85
|
-
__name: "FeedbackMessageAttachments",
|
|
86
|
-
props: {
|
|
87
|
-
attachments: {
|
|
88
|
-
type: Array,
|
|
89
|
-
default: () => []
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
setup(e) {
|
|
93
|
-
const t = e, i = g(!1), o = g(0), m = g(!1), l = g(""), k = g(""), x = P(() => t.attachments.filter((p) => p.kind === "image")), _ = P(() => t.attachments.filter((p) => p.kind === "video")), S = P(() => t.attachments.filter((p) => p.kind === "file")), M = P(() => x.value.map((p) => p.url || ""));
|
|
94
|
-
function w(p) {
|
|
95
|
-
o.value = p, i.value = !0;
|
|
96
|
-
}
|
|
97
|
-
function $(p) {
|
|
98
|
-
l.value = p.url || "", k.value = p.name, m.value = !0;
|
|
99
|
-
}
|
|
100
|
-
function D(p) {
|
|
101
|
-
return p < 1024 ? `${p} B` : p < 1024 * 1024 ? `${(p / 1024).toFixed(1)} KB` : p < 1024 * 1024 * 1024 ? `${(p / 1024 / 1024).toFixed(1)} MB` : `${(p / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
102
|
-
}
|
|
103
|
-
return (p, I) => (s(), u(L, null, [t.attachments.length > 0 ? (s(), u("div", Pt, [(s(!0), u(L, null, N(x.value, (c, A) => (s(), u("button", {
|
|
104
|
-
key: c.key,
|
|
105
|
-
type: "button",
|
|
106
|
-
class: "message-media message-media--image",
|
|
107
|
-
title: c.name,
|
|
108
|
-
onClick: (U) => w(A)
|
|
109
|
-
}, [y("img", {
|
|
110
|
-
src: c.url,
|
|
111
|
-
alt: c.name,
|
|
112
|
-
class: "message-media__content"
|
|
113
|
-
}, null, 8, Bt)], 8, Rt))), 128)), (s(!0), u(L, null, N(_.value, (c) => (s(), u("button", {
|
|
114
|
-
key: c.key,
|
|
115
|
-
type: "button",
|
|
116
|
-
class: "message-media message-media--video",
|
|
117
|
-
title: c.name,
|
|
118
|
-
onClick: (A) => $(c)
|
|
119
|
-
}, [y("video", {
|
|
120
|
-
class: "message-media__content",
|
|
121
|
-
src: c.url,
|
|
122
|
-
muted: "",
|
|
123
|
-
preload: "metadata"
|
|
124
|
-
}, null, 8, Mt), I[3] || (I[3] = y("span", {
|
|
125
|
-
class: "message-video-play"
|
|
126
|
-
}, "播放", -1))], 8, Tt))), 128)), (s(!0), u(L, null, N(S.value, (c) => (s(), u("a", {
|
|
127
|
-
key: c.key,
|
|
128
|
-
class: "message-file",
|
|
129
|
-
href: c.url,
|
|
130
|
-
target: "_blank",
|
|
131
|
-
rel: "noopener noreferrer",
|
|
132
|
-
title: c.name
|
|
133
|
-
}, [I[4] || (I[4] = y("span", {
|
|
134
|
-
class: "message-file-icon"
|
|
135
|
-
}, "FILE", -1)), y("span", Vt, [y("span", Et, F(c.name), 1), y("span", Dt, F(D(c.size)), 1)])], 8, Lt))), 128))])) : R("", !0), f(a(be), {
|
|
136
|
-
"src-list": M.value,
|
|
137
|
-
visible: i.value,
|
|
138
|
-
"onUpdate:visible": I[0] || (I[0] = (c) => i.value = c),
|
|
139
|
-
current: o.value,
|
|
140
|
-
"onUpdate:current": I[1] || (I[1] = (c) => o.value = c)
|
|
141
|
-
}, null, 8, ["src-list", "visible", "current"]), f(ke, {
|
|
142
|
-
visible: m.value,
|
|
143
|
-
"onUpdate:visible": I[2] || (I[2] = (c) => m.value = c),
|
|
144
|
-
title: k.value,
|
|
145
|
-
src: l.value
|
|
146
|
-
}, null, 8, ["visible", "title", "src"])], 64));
|
|
147
|
-
}
|
|
148
|
-
}), Pe = /* @__PURE__ */ W(qt, [["__scopeId", "data-v-49a094a3"]]), Ot = /* @__PURE__ */ q({
|
|
149
|
-
__name: "FeedbackRefresh",
|
|
150
|
-
setup(e) {
|
|
151
|
-
return (t, i) => (s(), B(a(wt), {
|
|
152
|
-
class: "icon",
|
|
153
|
-
icon: "mingcute:refresh-2-line"
|
|
154
|
-
}));
|
|
155
|
-
}
|
|
156
|
-
}), Fe = /* @__PURE__ */ W(Ot, [["__scopeId", "data-v-64bb6fc2"]]), zt = ["src"], Nt = {
|
|
157
|
-
key: 1
|
|
158
|
-
}, jt = {
|
|
159
|
-
class: "feedback-message-body"
|
|
160
|
-
}, Kt = {
|
|
161
|
-
key: 0,
|
|
162
|
-
class: "feedback-text-bubble"
|
|
163
|
-
}, Wt = {
|
|
164
|
-
key: 1,
|
|
165
|
-
class: "feedback-bubble-stack feedback-bubble-stack--end"
|
|
166
|
-
}, Ht = ["src"], Gt = {
|
|
167
|
-
key: 1
|
|
168
|
-
}, Xt = /* @__PURE__ */ q({
|
|
169
|
-
__name: "FeedbackBubbleEnd",
|
|
170
|
-
props: {
|
|
171
|
-
text: {
|
|
172
|
-
type: String,
|
|
173
|
-
default: ""
|
|
174
|
-
},
|
|
175
|
-
attachments: {
|
|
176
|
-
type: Array,
|
|
177
|
-
default: () => []
|
|
178
|
-
},
|
|
179
|
-
avatarUrl: {
|
|
180
|
-
type: String,
|
|
181
|
-
default: ""
|
|
182
|
-
},
|
|
183
|
-
avatarText: {
|
|
184
|
-
type: String,
|
|
185
|
-
default: "U"
|
|
186
|
-
},
|
|
187
|
-
bubbleStyle: {
|
|
188
|
-
type: Object,
|
|
189
|
-
default: () => ({
|
|
190
|
-
paddingLeft: "52px"
|
|
191
|
-
})
|
|
192
|
-
},
|
|
193
|
-
showRefresh: {
|
|
194
|
-
type: Boolean,
|
|
195
|
-
default: !1
|
|
196
|
-
},
|
|
197
|
-
showClipboard: {
|
|
198
|
-
type: Boolean,
|
|
199
|
-
default: !1
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
emits: ["refresh"],
|
|
203
|
-
setup(e, {
|
|
204
|
-
emit: t
|
|
205
|
-
}) {
|
|
206
|
-
const i = e, o = t;
|
|
207
|
-
function m(_) {
|
|
208
|
-
return _.startsWith("http://") || _.startsWith("https://") || _.startsWith("data:");
|
|
209
|
-
}
|
|
210
|
-
const l = P(() => {
|
|
211
|
-
const _ = i.avatarUrl.trim();
|
|
212
|
-
return m(_) ? _ : "";
|
|
213
|
-
}), k = P(() => i.attachments.length > 0);
|
|
214
|
-
function x() {
|
|
215
|
-
o("refresh");
|
|
216
|
-
}
|
|
217
|
-
return (_, S) => k.value ? (s(), u("div", {
|
|
218
|
-
key: 0,
|
|
219
|
-
class: "feedback-message-group feedback-message-group--end",
|
|
220
|
-
style: ee(i.bubbleStyle)
|
|
221
|
-
}, [f(a(oe), {
|
|
222
|
-
class: "feedback-message-avatar"
|
|
223
|
-
}, {
|
|
224
|
-
default: v(() => [l.value ? (s(), u("img", {
|
|
225
|
-
key: 0,
|
|
226
|
-
alt: "avatar",
|
|
227
|
-
src: l.value
|
|
228
|
-
}, null, 8, zt)) : (s(), u("span", Nt, F(i.avatarText), 1))]),
|
|
229
|
-
_: 1
|
|
230
|
-
}), y("div", jt, [i.text ? (s(), u("div", Kt, F(i.text), 1)) : R("", !0), i.showClipboard || i.showRefresh ? (s(), B(a(ue), {
|
|
231
|
-
key: 1,
|
|
232
|
-
class: "feedback-message-footer"
|
|
233
|
-
}, {
|
|
234
|
-
default: v(() => [i.showClipboard ? (s(), B(de, {
|
|
235
|
-
key: 0,
|
|
236
|
-
value: i.text
|
|
237
|
-
}, null, 8, ["value"])) : R("", !0), i.showRefresh ? (s(), B(Fe, {
|
|
238
|
-
key: 1,
|
|
239
|
-
onClick: x
|
|
240
|
-
})) : R("", !0)]),
|
|
241
|
-
_: 1
|
|
242
|
-
})) : R("", !0), f(Pe, {
|
|
243
|
-
attachments: i.attachments
|
|
244
|
-
}, null, 8, ["attachments"])])], 4)) : (s(), u("div", Wt, [f(a(Ae), {
|
|
245
|
-
placement: "end",
|
|
246
|
-
style: ee(i.bubbleStyle)
|
|
247
|
-
}, {
|
|
248
|
-
avatar: v(() => [f(a(oe), null, {
|
|
249
|
-
default: v(() => [l.value ? (s(), u("img", {
|
|
250
|
-
key: 0,
|
|
251
|
-
alt: "avatar",
|
|
252
|
-
src: l.value
|
|
253
|
-
}, null, 8, Ht)) : (s(), u("span", Gt, F(i.avatarText), 1))]),
|
|
254
|
-
_: 1
|
|
255
|
-
})]),
|
|
256
|
-
message: v(() => [i.text ? (s(), u(L, {
|
|
257
|
-
key: 0
|
|
258
|
-
}, [V(F(i.text), 1)], 64)) : R("", !0)]),
|
|
259
|
-
footer: v(() => [f(a(ue), null, {
|
|
260
|
-
default: v(() => [i.showClipboard && i.text ? (s(), B(de, {
|
|
261
|
-
key: 0,
|
|
262
|
-
value: i.text
|
|
263
|
-
}, null, 8, ["value"])) : R("", !0), i.showRefresh ? (s(), B(Fe, {
|
|
264
|
-
key: 1,
|
|
265
|
-
onClick: x
|
|
266
|
-
})) : R("", !0)]),
|
|
267
|
-
_: 1
|
|
268
|
-
})]),
|
|
269
|
-
_: 1
|
|
270
|
-
}, 8, ["style"])]));
|
|
271
|
-
}
|
|
272
|
-
}), Yt = /* @__PURE__ */ W(Xt, [["__scopeId", "data-v-ed8f32cc"]]), Jt = ["src"], Zt = {
|
|
273
|
-
key: 1
|
|
274
|
-
}, Qt = {
|
|
275
|
-
class: "feedback-message-body"
|
|
276
|
-
}, ea = {
|
|
277
|
-
key: 0,
|
|
278
|
-
class: "feedback-text-bubble"
|
|
279
|
-
}, ta = {
|
|
280
|
-
key: 1,
|
|
281
|
-
class: "feedback-bubble-stack feedback-bubble-stack--start"
|
|
282
|
-
}, aa = ["src"], sa = {
|
|
283
|
-
key: 1
|
|
284
|
-
}, na = /* @__PURE__ */ q({
|
|
285
|
-
__name: "FeedbackBubbleStart",
|
|
286
|
-
props: {
|
|
287
|
-
text: {
|
|
288
|
-
type: String,
|
|
289
|
-
default: ""
|
|
290
|
-
},
|
|
291
|
-
attachments: {
|
|
292
|
-
type: Array,
|
|
293
|
-
default: () => []
|
|
294
|
-
},
|
|
295
|
-
avatarUrl: {
|
|
296
|
-
type: String,
|
|
297
|
-
default: ""
|
|
298
|
-
},
|
|
299
|
-
avatarText: {
|
|
300
|
-
type: String,
|
|
301
|
-
default: "U"
|
|
302
|
-
},
|
|
303
|
-
bubbleStyle: {
|
|
304
|
-
type: Object,
|
|
305
|
-
default: () => ({
|
|
306
|
-
paddingRight: "52px"
|
|
307
|
-
})
|
|
308
|
-
},
|
|
309
|
-
showClipboard: {
|
|
310
|
-
type: Boolean,
|
|
311
|
-
default: !1
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
setup(e) {
|
|
315
|
-
const t = e;
|
|
316
|
-
function i(l) {
|
|
317
|
-
return l.startsWith("http://") || l.startsWith("https://") || l.startsWith("data:");
|
|
318
|
-
}
|
|
319
|
-
const o = P(() => {
|
|
320
|
-
const l = t.avatarUrl.trim();
|
|
321
|
-
return i(l) ? l : "";
|
|
322
|
-
}), m = P(() => t.attachments.length > 0);
|
|
323
|
-
return (l, k) => m.value ? (s(), u("div", {
|
|
324
|
-
key: 0,
|
|
325
|
-
class: "feedback-message-group feedback-message-group--start",
|
|
326
|
-
style: ee(t.bubbleStyle)
|
|
327
|
-
}, [f(a(oe), {
|
|
328
|
-
class: "feedback-message-avatar"
|
|
329
|
-
}, {
|
|
330
|
-
default: v(() => [o.value ? (s(), u("img", {
|
|
331
|
-
key: 0,
|
|
332
|
-
alt: "avatar",
|
|
333
|
-
src: o.value
|
|
334
|
-
}, null, 8, Jt)) : (s(), u("span", Zt, F(t.avatarText), 1))]),
|
|
335
|
-
_: 1
|
|
336
|
-
}), y("div", Qt, [t.text ? (s(), u("div", ea, F(t.text), 1)) : R("", !0), t.showClipboard ? (s(), B(a(ue), {
|
|
337
|
-
key: 1,
|
|
338
|
-
class: "feedback-message-footer"
|
|
339
|
-
}, {
|
|
340
|
-
default: v(() => [f(de, {
|
|
341
|
-
value: t.text
|
|
342
|
-
}, null, 8, ["value"])]),
|
|
343
|
-
_: 1
|
|
344
|
-
})) : R("", !0), f(Pe, {
|
|
345
|
-
attachments: t.attachments
|
|
346
|
-
}, null, 8, ["attachments"])])], 4)) : (s(), u("div", ta, [f(a(Ae), {
|
|
347
|
-
placement: "start",
|
|
348
|
-
style: ee(t.bubbleStyle)
|
|
349
|
-
}, {
|
|
350
|
-
avatar: v(() => [f(a(oe), null, {
|
|
351
|
-
default: v(() => [o.value ? (s(), u("img", {
|
|
352
|
-
key: 0,
|
|
353
|
-
alt: "avatar",
|
|
354
|
-
src: o.value
|
|
355
|
-
}, null, 8, aa)) : (s(), u("span", sa, F(t.avatarText), 1))]),
|
|
356
|
-
_: 1
|
|
357
|
-
})]),
|
|
358
|
-
message: v(() => [t.text ? (s(), u(L, {
|
|
359
|
-
key: 0
|
|
360
|
-
}, [V(F(t.text), 1)], 64)) : R("", !0)]),
|
|
361
|
-
footer: v(() => [f(a(ue), null, {
|
|
362
|
-
default: v(() => [t.showClipboard && t.text ? (s(), B(de, {
|
|
363
|
-
key: 0,
|
|
364
|
-
value: t.text
|
|
365
|
-
}, null, 8, ["value"])) : R("", !0)]),
|
|
366
|
-
_: 1
|
|
367
|
-
})]),
|
|
368
|
-
_: 1
|
|
369
|
-
}, 8, ["style"])]));
|
|
370
|
-
}
|
|
371
|
-
}), la = /* @__PURE__ */ W(na, [["__scopeId", "data-v-a88b5650"]]), ia = q({
|
|
372
|
-
name: "IconLink",
|
|
373
|
-
props: {
|
|
374
|
-
size: {
|
|
375
|
-
type: [Number, String]
|
|
376
|
-
},
|
|
377
|
-
strokeWidth: {
|
|
378
|
-
type: Number,
|
|
379
|
-
default: 4
|
|
380
|
-
},
|
|
381
|
-
strokeLinecap: {
|
|
382
|
-
type: String,
|
|
383
|
-
default: "butt",
|
|
384
|
-
validator: (e) => ["butt", "round", "square"].includes(e)
|
|
385
|
-
},
|
|
386
|
-
strokeLinejoin: {
|
|
387
|
-
type: String,
|
|
388
|
-
default: "miter",
|
|
389
|
-
validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
|
|
390
|
-
},
|
|
391
|
-
rotate: Number,
|
|
392
|
-
spin: Boolean
|
|
393
|
-
},
|
|
394
|
-
emits: {
|
|
395
|
-
click: (e) => !0
|
|
396
|
-
},
|
|
397
|
-
setup(e, {
|
|
398
|
-
emit: t
|
|
399
|
-
}) {
|
|
400
|
-
const i = Ut("icon"), o = P(() => [i, `${i}-link`, {
|
|
401
|
-
[`${i}-spin`]: e.spin
|
|
402
|
-
}]), m = P(() => {
|
|
403
|
-
const k = {};
|
|
404
|
-
return e.size && (k.fontSize = xt(e.size) ? `${e.size}px` : e.size), e.rotate && (k.transform = `rotate(${e.rotate}deg)`), k;
|
|
405
|
-
});
|
|
406
|
-
return {
|
|
407
|
-
cls: o,
|
|
408
|
-
innerStyle: m,
|
|
409
|
-
onClick: (k) => {
|
|
410
|
-
t("click", k);
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
}), ra = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
415
|
-
function oa(e, t, i, o, m, l) {
|
|
416
|
-
return s(), u("svg", {
|
|
417
|
-
viewBox: "0 0 48 48",
|
|
418
|
-
fill: "none",
|
|
419
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
420
|
-
stroke: "currentColor",
|
|
421
|
-
class: re(e.cls),
|
|
422
|
-
style: ee(e.innerStyle),
|
|
423
|
-
"stroke-width": e.strokeWidth,
|
|
424
|
-
"stroke-linecap": e.strokeLinecap,
|
|
425
|
-
"stroke-linejoin": e.strokeLinejoin,
|
|
426
|
-
onClick: t[0] || (t[0] = (...k) => e.onClick && e.onClick(...k))
|
|
427
|
-
}, t[1] || (t[1] = [y("path", {
|
|
428
|
-
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"
|
|
429
|
-
}, null, -1)]), 14, ra);
|
|
430
|
-
}
|
|
431
|
-
var pe = /* @__PURE__ */ Ct(ia, [["render", oa]]);
|
|
432
|
-
const ua = Object.assign(pe, {
|
|
433
|
-
install: (e, t) => {
|
|
434
|
-
var i;
|
|
435
|
-
const o = (i = t == null ? void 0 : t.iconPrefix) != null ? i : "";
|
|
436
|
-
e.component(o + pe.name, pe);
|
|
437
|
-
}
|
|
438
|
-
}), Re = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".mp4", ".webm", ".mov", ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".txt", ".md", ".csv", ".json", ".zip"], Be = Re.join(","), ca = /* @__PURE__ */ new Set(["image/jpeg", "image/png", "image/gif", "image/webp"]), da = /* @__PURE__ */ new Set(["video/mp4", "video/webm", "video/quicktime"]);
|
|
439
|
-
function fa(e) {
|
|
440
|
-
const t = e.lastIndexOf(".");
|
|
441
|
-
return t < 0 ? "" : e.slice(t).toLowerCase();
|
|
442
|
-
}
|
|
443
|
-
function va(e) {
|
|
444
|
-
return Re.includes(fa(e.name));
|
|
445
|
-
}
|
|
446
|
-
function Te(e, t = e.type) {
|
|
447
|
-
return ca.has(t) ? "image" : da.has(t) ? "video" : "file";
|
|
448
|
-
}
|
|
449
|
-
const ne = 9;
|
|
450
|
-
function pa(e) {
|
|
451
|
-
const t = Te(e);
|
|
452
|
-
return {
|
|
453
|
-
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
454
|
-
file: e,
|
|
455
|
-
kind: t,
|
|
456
|
-
previewUrl: t === "image" || t === "video" ? URL.createObjectURL(e) : void 0
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
function Me(e) {
|
|
460
|
-
const t = g([]), i = P(() => t.value.length > 0), o = P(() => t.value.filter((w) => w.kind === "image" && !!w.previewUrl)), m = P(() => t.value.filter((w) => w.kind === "video" && !!w.previewUrl)), l = P(() => t.value.filter((w) => w.kind === "file"));
|
|
461
|
-
function k(w) {
|
|
462
|
-
e == null || e(w);
|
|
463
|
-
}
|
|
464
|
-
function x(w) {
|
|
465
|
-
w.previewUrl && URL.revokeObjectURL(w.previewUrl);
|
|
466
|
-
}
|
|
467
|
-
function _(w) {
|
|
468
|
-
if (w.length === 0) return;
|
|
469
|
-
const $ = w.filter(va);
|
|
470
|
-
if (w.length - $.length > 0 && k("仅支持常见图片、浏览器可预览视频、文档、文本、CSV、JSON 和 ZIP 文件"), $.length === 0) return;
|
|
471
|
-
const p = ne - t.value.length;
|
|
472
|
-
if (p <= 0) {
|
|
473
|
-
k(`最多只能添加 ${ne} 个附件`);
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
476
|
-
const I = $.slice(0, p);
|
|
477
|
-
$.length > p && k(`最多只能添加 ${ne} 个附件,已跳过多余文件`), t.value.push(...I.map(pa));
|
|
478
|
-
}
|
|
479
|
-
function S(w) {
|
|
480
|
-
const $ = t.value[w];
|
|
481
|
-
$ && (x($), t.value.splice(w, 1));
|
|
482
|
-
}
|
|
483
|
-
function M() {
|
|
484
|
-
t.value.forEach(x), t.value = [];
|
|
485
|
-
}
|
|
486
|
-
return at(() => {
|
|
487
|
-
M();
|
|
488
|
-
}), {
|
|
489
|
-
items: t,
|
|
490
|
-
imageItems: o,
|
|
491
|
-
videoItems: m,
|
|
492
|
-
fileItems: l,
|
|
493
|
-
hasAttachments: i,
|
|
494
|
-
addFiles: _,
|
|
495
|
-
removeAt: S,
|
|
496
|
-
clear: M,
|
|
497
|
-
maxAttachments: ne
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
function ma(e, t) {
|
|
501
|
-
const {
|
|
502
|
-
uploadFile: i
|
|
503
|
-
} = mt();
|
|
504
|
-
return new Promise((o, m) => {
|
|
505
|
-
i({
|
|
506
|
-
file: e,
|
|
507
|
-
bucketId: t,
|
|
508
|
-
onFileFinish(l, k, x) {
|
|
509
|
-
if (l) {
|
|
510
|
-
m(l);
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
o(x.Key);
|
|
514
|
-
},
|
|
515
|
-
onError(l) {
|
|
516
|
-
m(l);
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
async function Le(e, t) {
|
|
522
|
-
const i = [];
|
|
523
|
-
for (const o of e) {
|
|
524
|
-
const m = await ma(o, t), l = pt(o);
|
|
525
|
-
i.push({
|
|
526
|
-
key: m,
|
|
527
|
-
name: o.name,
|
|
528
|
-
size: o.size,
|
|
529
|
-
mimeType: l,
|
|
530
|
-
kind: Te(o, l)
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
return i;
|
|
534
|
-
}
|
|
535
|
-
function ga(e, t = {}) {
|
|
536
|
-
const {
|
|
537
|
-
interval: i = 2e3,
|
|
538
|
-
immediate: o = !1,
|
|
539
|
-
autoStart: m = !1
|
|
540
|
-
} = t, l = g(!1);
|
|
541
|
-
let k = null;
|
|
542
|
-
async function x() {
|
|
543
|
-
try {
|
|
544
|
-
await e();
|
|
545
|
-
} catch (w) {
|
|
546
|
-
console.error("轮询回调执行失败:", w);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
function _() {
|
|
550
|
-
if (l.value) {
|
|
551
|
-
console.warn("轮询已在运行中");
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
l.value = !0, o && x(), k = setInterval(x, i);
|
|
555
|
-
}
|
|
556
|
-
function S() {
|
|
557
|
-
k && (clearInterval(k), k = null), l.value = !1;
|
|
558
|
-
}
|
|
559
|
-
function M() {
|
|
560
|
-
S(), _();
|
|
561
|
-
}
|
|
562
|
-
return m && _(), st(() => {
|
|
563
|
-
S();
|
|
564
|
-
}), {
|
|
565
|
-
isPolling: l,
|
|
566
|
-
start: _,
|
|
567
|
-
stop: S,
|
|
568
|
-
restart: M
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
const fe = g(0);
|
|
572
|
-
let J = null, ie = null, ge = !1;
|
|
573
|
-
function ba() {
|
|
574
|
-
fe.value = 0;
|
|
575
|
-
}
|
|
576
|
-
async function ka() {
|
|
577
|
-
const {
|
|
578
|
-
data: e,
|
|
579
|
-
error: t
|
|
580
|
-
} = await z.feedbackCenter.unreadReplyCount.post({});
|
|
581
|
-
return t ? null : typeof (e == null ? void 0 : e.count) == "number" ? e.count : 0;
|
|
582
|
-
}
|
|
583
|
-
async function H() {
|
|
584
|
-
return J || (J = (async () => {
|
|
585
|
-
await bt();
|
|
586
|
-
const e = await ka();
|
|
587
|
-
e !== null && (fe.value = e);
|
|
588
|
-
})().finally(() => {
|
|
589
|
-
J = null;
|
|
590
|
-
}), J);
|
|
591
|
-
}
|
|
592
|
-
function ya() {
|
|
593
|
-
ge || (ge = !0, ie = setInterval(() => {
|
|
594
|
-
H();
|
|
595
|
-
}, 6e4));
|
|
596
|
-
}
|
|
597
|
-
function _a() {
|
|
598
|
-
ie && (clearInterval(ie), ie = null), ge = !1;
|
|
599
|
-
}
|
|
600
|
-
function Cs() {
|
|
601
|
-
const {
|
|
602
|
-
isLoggedIn: e
|
|
603
|
-
} = _t(), {
|
|
604
|
-
isOpen: t,
|
|
605
|
-
messagesTrigger: i,
|
|
606
|
-
feedbackTrigger: o
|
|
607
|
-
} = ht();
|
|
608
|
-
return ve(e, (m) => {
|
|
609
|
-
if (m) {
|
|
610
|
-
H(), ya();
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
gt(), ba(), _a();
|
|
614
|
-
}, {
|
|
615
|
-
immediate: !0
|
|
616
|
-
}), ve(t, (m) => {
|
|
617
|
-
m && e.value && H();
|
|
618
|
-
}), ve([i, o], () => {
|
|
619
|
-
e.value && window.setTimeout(() => {
|
|
620
|
-
H();
|
|
621
|
-
}, 1500);
|
|
622
|
-
}), {
|
|
623
|
-
messageUnreadCount: $e,
|
|
624
|
-
feedbackUnreadCount: nt(fe),
|
|
625
|
-
hasMessageBadge: P(() => $e.value > 0),
|
|
626
|
-
hasFeedbackBadge: P(() => fe.value > 0),
|
|
627
|
-
refreshUserMenuBadgeCounts: H
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
const ye = [{
|
|
631
|
-
key: "bugReports",
|
|
632
|
-
label: "问题报告"
|
|
633
|
-
}, {
|
|
634
|
-
key: "featureSuggestions",
|
|
635
|
-
label: "功能建议"
|
|
636
|
-
}, {
|
|
637
|
-
key: "technicalSupportRequests",
|
|
638
|
-
label: "技术支持请求"
|
|
639
|
-
}, {
|
|
640
|
-
key: "generalOpinions",
|
|
641
|
-
label: "一般意见"
|
|
642
|
-
}], Ve = [{
|
|
643
|
-
key: "urgent",
|
|
644
|
-
label: "紧急"
|
|
645
|
-
}, {
|
|
646
|
-
key: "high",
|
|
647
|
-
label: "高"
|
|
648
|
-
}, {
|
|
649
|
-
key: "normal",
|
|
650
|
-
label: "普通"
|
|
651
|
-
}, {
|
|
652
|
-
key: "low",
|
|
653
|
-
label: "低"
|
|
654
|
-
}], Ee = [{
|
|
655
|
-
key: "newFeedback",
|
|
656
|
-
label: "新反馈"
|
|
657
|
-
}, {
|
|
658
|
-
key: "inProgress",
|
|
659
|
-
label: "处理中"
|
|
660
|
-
}, {
|
|
661
|
-
key: "pending",
|
|
662
|
-
label: "待处理"
|
|
663
|
-
}, {
|
|
664
|
-
key: "resolved",
|
|
665
|
-
label: "已解决"
|
|
666
|
-
}, {
|
|
667
|
-
key: "closed",
|
|
668
|
-
label: "已关闭"
|
|
669
|
-
}];
|
|
670
|
-
function ha(e) {
|
|
671
|
-
return e ? e.startsWith("http://") || e.startsWith("https://") || e.startsWith("data:") : !1;
|
|
672
|
-
}
|
|
673
|
-
function le(e) {
|
|
674
|
-
const t = (e.attachments ?? []).filter((i) => ha(i.url));
|
|
675
|
-
return {
|
|
676
|
-
text: e.content ?? "",
|
|
677
|
-
attachments: t
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
const wa = {
|
|
681
|
-
class: "FeedBackDetails"
|
|
682
|
-
}, Ca = {
|
|
683
|
-
class: "scrollable-content__inner"
|
|
684
|
-
}, Ua = {
|
|
685
|
-
class: "content"
|
|
686
|
-
}, xa = {
|
|
687
|
-
class: "empty-title"
|
|
688
|
-
}, Sa = {
|
|
689
|
-
class: "empty-tips"
|
|
690
|
-
}, $a = {
|
|
691
|
-
key: 1,
|
|
692
|
-
class: "Bubbles"
|
|
693
|
-
}, Fa = {
|
|
694
|
-
class: "sender-container"
|
|
695
|
-
}, Ia = {
|
|
696
|
-
key: 0,
|
|
697
|
-
class: "attachments-preview"
|
|
698
|
-
}, Aa = ["onClick"], Pa = ["src"], Ra = ["src"], Ba = {
|
|
699
|
-
class: "attachment-file-name"
|
|
700
|
-
}, Ta = ["onClick"], Ma = ["accept"], La = /* @__PURE__ */ q({
|
|
701
|
-
__name: "FeedbackDetails",
|
|
702
|
-
props: {
|
|
703
|
-
id: {
|
|
704
|
-
type: String,
|
|
705
|
-
required: !0,
|
|
706
|
-
default: () => ""
|
|
707
|
-
},
|
|
708
|
-
senderRole: {
|
|
709
|
-
type: String,
|
|
710
|
-
required: !0,
|
|
711
|
-
validator: (e) => ["user", "support"].includes(e)
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
setup(e) {
|
|
715
|
-
const t = yt;
|
|
716
|
-
function i(r) {
|
|
717
|
-
return r === "inProgress" ? "orangered" : r === "pending" ? "gold" : r === "resolved" ? "green" : r === "closed" ? "gray" : "arcoblue";
|
|
718
|
-
}
|
|
719
|
-
const o = g(""), m = g(!1), l = g(null), k = g(null), x = g(null), _ = g(!1), S = g(!1), M = g(0), w = g(!1), $ = g(""), D = g(""), p = Me((r) => {
|
|
720
|
-
ce.warning(r);
|
|
721
|
-
}), I = P(() => p.imageItems.value.map((r) => r.previewUrl || "")), c = P(() => o.value.trim().length > 0 || p.hasAttachments.value), A = () => {
|
|
722
|
-
var r;
|
|
723
|
-
(r = l.value) == null || r.focus({
|
|
724
|
-
cursor: "end"
|
|
725
|
-
}), ae(() => {
|
|
726
|
-
k.value && (k.value.scrollTop = k.value.scrollHeight);
|
|
727
|
-
});
|
|
728
|
-
}, U = e, C = P(() => U.senderRole === "support" ? "暂无沟通记录" : "还没有消息"), h = P(() => U.senderRole === "support" ? ["可在下方输入框回复用户", "支持发送文字、图片和文件附件"] : ["请尽量详细描述问题或需求", "可上传多张图片或文件附件,支持与文字一起发送"]), b = P(() => U.senderRole === "support" ? "输入回复内容,Enter 发送" : "补充问题描述或追问,Enter 发送"), E = g(!1), O = g([]), te = g(void 0);
|
|
729
|
-
function De(r, d) {
|
|
730
|
-
const n = "seq" in r && typeof r.seq == "number" ? r.seq : d;
|
|
731
|
-
return `${r.senderRole}-${n}-${d}`;
|
|
732
|
-
}
|
|
733
|
-
function _e(r) {
|
|
734
|
-
var d;
|
|
735
|
-
return String(((d = r.senderInfo) == null ? void 0 : d.avatarUrl) || "");
|
|
736
|
-
}
|
|
737
|
-
function he(r) {
|
|
738
|
-
var n;
|
|
739
|
-
const d = String(((n = r.senderInfo) == null ? void 0 : n.nickname) || "").trim();
|
|
740
|
-
return d ? d.slice(0, 1).toUpperCase() : r.senderRole === "support" ? "S" : "U";
|
|
741
|
-
}
|
|
742
|
-
const K = g({
|
|
743
|
-
id: void 0,
|
|
744
|
-
title: "",
|
|
745
|
-
description: "",
|
|
746
|
-
type: "bugReports",
|
|
747
|
-
status: "newFeedback",
|
|
748
|
-
reply: "",
|
|
749
|
-
createAt: ""
|
|
750
|
-
});
|
|
751
|
-
function qe() {
|
|
752
|
-
var r;
|
|
753
|
-
(r = x.value) == null || r.click();
|
|
754
|
-
}
|
|
755
|
-
function Oe(r) {
|
|
756
|
-
const d = r.target, n = d.files;
|
|
757
|
-
n != null && n.length && p.addFiles(Array.from(n)), d.value = "";
|
|
758
|
-
}
|
|
759
|
-
function ze(r) {
|
|
760
|
-
if (r.kind === "image" && r.previewUrl) {
|
|
761
|
-
const d = p.imageItems.value.findIndex((n) => n.id === r.id);
|
|
762
|
-
if (d < 0) return;
|
|
763
|
-
M.value = d, S.value = !0;
|
|
764
|
-
return;
|
|
765
|
-
}
|
|
766
|
-
r.kind === "video" && r.previewUrl && ($.value = r.previewUrl, D.value = r.file.name, w.value = !0);
|
|
767
|
-
}
|
|
768
|
-
function Ne(r) {
|
|
769
|
-
var T;
|
|
770
|
-
const d = (T = r.clipboardData) == null ? void 0 : T.items;
|
|
771
|
-
if (!d) return;
|
|
772
|
-
const n = [];
|
|
773
|
-
for (const j of d)
|
|
774
|
-
if (j.type.startsWith("image/")) {
|
|
775
|
-
const X = j.getAsFile();
|
|
776
|
-
X && n.push(X);
|
|
777
|
-
}
|
|
778
|
-
n.length > 0 && (r.preventDefault(), p.addFiles(n));
|
|
779
|
-
}
|
|
780
|
-
function je(r) {
|
|
781
|
-
var d;
|
|
782
|
-
(d = r.dataTransfer) != null && d.types.includes("Files") && (_.value = !0);
|
|
783
|
-
}
|
|
784
|
-
function Ke() {
|
|
785
|
-
_.value = !1;
|
|
786
|
-
}
|
|
787
|
-
function We(r) {
|
|
788
|
-
var n;
|
|
789
|
-
_.value = !1;
|
|
790
|
-
const d = (n = r.dataTransfer) == null ? void 0 : n.files;
|
|
791
|
-
d && p.addFiles(Array.from(d));
|
|
792
|
-
}
|
|
793
|
-
async function He() {
|
|
794
|
-
U.senderRole === "support" && K.value.status === "newFeedback" && await we();
|
|
795
|
-
}
|
|
796
|
-
async function Ge() {
|
|
797
|
-
const r = o.value, d = p.items.value.map((n) => n.file);
|
|
798
|
-
if (!(!r.trim() && d.length === 0)) {
|
|
799
|
-
m.value = !0;
|
|
800
|
-
try {
|
|
801
|
-
const n = d.length > 0 ? await Le(d, Ie.feedbackBucketId) : [], T = r.trim(), {
|
|
802
|
-
data: j
|
|
803
|
-
} = await z.feedbackCenter.update.messages.post({
|
|
804
|
-
id: U.id,
|
|
805
|
-
message: {
|
|
806
|
-
type: "text",
|
|
807
|
-
content: T,
|
|
808
|
-
attachments: n,
|
|
809
|
-
senderRole: U.senderRole
|
|
810
|
-
}
|
|
811
|
-
});
|
|
812
|
-
if (j) {
|
|
813
|
-
O.value.push(j.message);
|
|
814
|
-
const X = j.message.seq;
|
|
815
|
-
typeof X == "number" && (te.value = X), o.value = "", p.clear(), ae(() => {
|
|
816
|
-
A();
|
|
817
|
-
}), await He();
|
|
818
|
-
}
|
|
819
|
-
} catch {
|
|
820
|
-
ce.error("发送失败,请稍后重试");
|
|
821
|
-
} finally {
|
|
822
|
-
m.value = !1;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
async function we() {
|
|
827
|
-
E.value = !0;
|
|
828
|
-
const {
|
|
829
|
-
data: r
|
|
830
|
-
} = await z.feedbackCenter.findOne.post({
|
|
831
|
-
id: U.id
|
|
832
|
-
});
|
|
833
|
-
E.value = !1, r && (K.value = r);
|
|
834
|
-
}
|
|
835
|
-
async function Ce() {
|
|
836
|
-
U.senderRole === "user" && (await z.feedbackCenter.markRead.post({
|
|
837
|
-
id: U.id
|
|
838
|
-
}), H());
|
|
839
|
-
}
|
|
840
|
-
async function Xe() {
|
|
841
|
-
var d;
|
|
842
|
-
const {
|
|
843
|
-
data: r
|
|
844
|
-
} = await z.messages.list.incremental.post({
|
|
845
|
-
id: U.id,
|
|
846
|
-
lastSeq: te.value
|
|
847
|
-
});
|
|
848
|
-
if (r && ((d = r.messages) != null && d.length)) {
|
|
849
|
-
const n = r.messages;
|
|
850
|
-
O.value.push(...n);
|
|
851
|
-
const T = n.at(-1);
|
|
852
|
-
T && "seq" in T && typeof T.seq == "number" && (te.value = T.seq), ae(() => {
|
|
853
|
-
A();
|
|
854
|
-
}), await Ce();
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
async function Ye() {
|
|
858
|
-
var d;
|
|
859
|
-
E.value = !0;
|
|
860
|
-
const {
|
|
861
|
-
data: r
|
|
862
|
-
} = await z.messages.list.post({
|
|
863
|
-
id: U.id
|
|
864
|
-
});
|
|
865
|
-
if (E.value = !1, r && ((d = r.messages) != null && d.length)) {
|
|
866
|
-
const n = r.messages;
|
|
867
|
-
O.value = n;
|
|
868
|
-
const T = n.at(-1);
|
|
869
|
-
T && "seq" in T && typeof T.seq == "number" && (te.value = T.seq), ae(() => {
|
|
870
|
-
A();
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
await Ce();
|
|
874
|
-
}
|
|
875
|
-
return ga(Xe, {
|
|
876
|
-
interval: 2e3,
|
|
877
|
-
autoStart: !0
|
|
878
|
-
}), we(), Ye(), (r, d) => (s(), u("div", wa, [y("div", {
|
|
879
|
-
ref_key: "scrollableContentRef",
|
|
880
|
-
ref: k,
|
|
881
|
-
class: "scrollable-content"
|
|
882
|
-
}, [y("div", Ca, [f(a(lt), {
|
|
883
|
-
title: "基本信息"
|
|
884
|
-
}, {
|
|
885
|
-
title: v(() => [...d[4] || (d[4] = [y("div", {
|
|
886
|
-
class: "title"
|
|
887
|
-
}, "基本信息", -1)])]),
|
|
888
|
-
default: v(() => [f(a(se), {
|
|
889
|
-
label: "标题:",
|
|
890
|
-
span: 3
|
|
891
|
-
}, {
|
|
892
|
-
default: v(() => [V(F(K.value.title), 1)]),
|
|
893
|
-
_: 1
|
|
894
|
-
}), f(a(se), {
|
|
895
|
-
label: "问题描述:",
|
|
896
|
-
span: 3
|
|
897
|
-
}, {
|
|
898
|
-
default: v(() => [V(F(K.value.description || "-"), 1)]),
|
|
899
|
-
_: 1
|
|
900
|
-
}), f(a(se), {
|
|
901
|
-
label: "反馈类型:",
|
|
902
|
-
span: 1
|
|
903
|
-
}, {
|
|
904
|
-
default: v(() => [f(a(Z), {
|
|
905
|
-
color: "arcoblue"
|
|
906
|
-
}, {
|
|
907
|
-
default: v(() => {
|
|
908
|
-
var n;
|
|
909
|
-
return [V(F((n = a(Q)(a(ye), K.value.type)) == null ? void 0 : n.label), 1)];
|
|
910
|
-
}),
|
|
911
|
-
_: 1
|
|
912
|
-
})]),
|
|
913
|
-
_: 1
|
|
914
|
-
}), f(a(se), {
|
|
915
|
-
label: "状态:",
|
|
916
|
-
span: 1
|
|
917
|
-
}, {
|
|
918
|
-
default: v(() => [f(a(Z), {
|
|
919
|
-
color: i(K.value.status)
|
|
920
|
-
}, {
|
|
921
|
-
default: v(() => {
|
|
922
|
-
var n;
|
|
923
|
-
return [V(F((n = a(Q)(a(Ee), K.value.status)) == null ? void 0 : n.label), 1)];
|
|
924
|
-
}),
|
|
925
|
-
_: 1
|
|
926
|
-
}, 8, ["color"])]),
|
|
927
|
-
_: 1
|
|
928
|
-
})]),
|
|
929
|
-
_: 1
|
|
930
|
-
}), y("div", Ua, [d[5] || (d[5] = y("div", {
|
|
931
|
-
class: "title"
|
|
932
|
-
}, "沟通记录", -1)), f(a(it), {
|
|
933
|
-
class: "messageContent",
|
|
934
|
-
loading: E.value
|
|
935
|
-
}, {
|
|
936
|
-
default: v(() => [O.value.length === 0 ? (s(), B(a(rt), {
|
|
937
|
-
key: 0,
|
|
938
|
-
class: "message-empty"
|
|
939
|
-
}, {
|
|
940
|
-
description: v(() => [y("div", xa, F(C.value), 1), y("ul", Sa, [(s(!0), u(L, null, N(h.value, (n) => (s(), u("li", {
|
|
941
|
-
key: n
|
|
942
|
-
}, F(n), 1))), 128))])]),
|
|
943
|
-
_: 1
|
|
944
|
-
})) : (s(), u("div", $a, [(s(!0), u(L, null, N(O.value, (n, T) => (s(), u(L, {
|
|
945
|
-
key: De(n, T)
|
|
946
|
-
}, [n.senderRole !== U.senderRole ? (s(), B(la, {
|
|
947
|
-
key: 0,
|
|
948
|
-
text: a(le)(n).text,
|
|
949
|
-
attachments: a(le)(n).attachments,
|
|
950
|
-
"avatar-url": _e(n),
|
|
951
|
-
"avatar-text": he(n)
|
|
952
|
-
}, null, 8, ["text", "attachments", "avatar-url", "avatar-text"])) : (s(), B(Yt, {
|
|
953
|
-
key: 1,
|
|
954
|
-
text: a(le)(n).text,
|
|
955
|
-
attachments: a(le)(n).attachments,
|
|
956
|
-
"avatar-url": _e(n),
|
|
957
|
-
"avatar-text": he(n)
|
|
958
|
-
}, null, 8, ["text", "attachments", "avatar-url", "avatar-text"]))], 64))), 128))]))]),
|
|
959
|
-
_: 1
|
|
960
|
-
}, 8, ["loading"])])])], 512), y("div", Fa, [y("div", {
|
|
961
|
-
class: re(["sender-panel", {
|
|
962
|
-
"is-drag-over": _.value
|
|
963
|
-
}]),
|
|
964
|
-
onDragover: G(je, ["prevent"]),
|
|
965
|
-
onDragleave: Ke,
|
|
966
|
-
onDrop: G(We, ["prevent"]),
|
|
967
|
-
onPaste: Ne
|
|
968
|
-
}, [a(p).hasAttachments.value ? (s(), u("div", Ia, [(s(!0), u(L, null, N(a(p).items.value, (n, T) => (s(), u("div", {
|
|
969
|
-
key: n.id,
|
|
970
|
-
class: re(["attachment-preview-item", {
|
|
971
|
-
"is-image": n.kind === "image",
|
|
972
|
-
"is-video": n.kind === "video"
|
|
973
|
-
}]),
|
|
974
|
-
onClick: (j) => ze(n)
|
|
975
|
-
}, [n.kind === "image" && n.previewUrl ? (s(), u("img", {
|
|
976
|
-
key: 0,
|
|
977
|
-
src: n.previewUrl,
|
|
978
|
-
alt: "预览",
|
|
979
|
-
class: "attachment-thumbnail"
|
|
980
|
-
}, null, 8, Pa)) : n.kind === "video" && n.previewUrl ? (s(), u(L, {
|
|
981
|
-
key: 1
|
|
982
|
-
}, [y("video", {
|
|
983
|
-
class: "attachment-thumbnail",
|
|
984
|
-
src: n.previewUrl,
|
|
985
|
-
muted: "",
|
|
986
|
-
preload: "metadata"
|
|
987
|
-
}, null, 8, Ra), d[6] || (d[6] = y("span", {
|
|
988
|
-
class: "attachment-video-play"
|
|
989
|
-
}, "播放", -1))], 64)) : (s(), u(L, {
|
|
990
|
-
key: 2
|
|
991
|
-
}, [d[7] || (d[7] = y("span", {
|
|
992
|
-
class: "attachment-file-icon"
|
|
993
|
-
}, "FILE", -1)), y("span", Ba, F(n.file.name), 1)], 64)), y("button", {
|
|
994
|
-
type: "button",
|
|
995
|
-
class: "attachment-remove-btn",
|
|
996
|
-
title: "移除附件",
|
|
997
|
-
onClick: G((j) => a(p).removeAt(T), ["stop"])
|
|
998
|
-
}, " × ", 8, Ta)], 10, Aa))), 128))])) : R("", !0), f(a(be), {
|
|
999
|
-
"src-list": I.value,
|
|
1000
|
-
visible: S.value,
|
|
1001
|
-
"onUpdate:visible": d[0] || (d[0] = (n) => S.value = n),
|
|
1002
|
-
current: M.value,
|
|
1003
|
-
"onUpdate:current": d[1] || (d[1] = (n) => M.value = n)
|
|
1004
|
-
}, null, 8, ["src-list", "visible", "current"]), f(ke, {
|
|
1005
|
-
visible: w.value,
|
|
1006
|
-
"onUpdate:visible": d[2] || (d[2] = (n) => w.value = n),
|
|
1007
|
-
title: D.value,
|
|
1008
|
-
src: $.value
|
|
1009
|
-
}, null, 8, ["visible", "title", "src"]), f(a(t), {
|
|
1010
|
-
ref_key: "senderRef",
|
|
1011
|
-
ref: l,
|
|
1012
|
-
value: o.value,
|
|
1013
|
-
"onUpdate:value": d[3] || (d[3] = (n) => o.value = n),
|
|
1014
|
-
placeholder: b.value,
|
|
1015
|
-
loading: m.value,
|
|
1016
|
-
"allow-speech": !1,
|
|
1017
|
-
"read-only": m.value,
|
|
1018
|
-
"send-disabled": !c.value,
|
|
1019
|
-
onSubmit: Ge
|
|
1020
|
-
}, {
|
|
1021
|
-
prefix: v(() => [f(a(me), {
|
|
1022
|
-
type: "text",
|
|
1023
|
-
class: "IconLink",
|
|
1024
|
-
disabled: m.value,
|
|
1025
|
-
onClick: qe
|
|
1026
|
-
}, {
|
|
1027
|
-
icon: v(() => [f(a(ua))]),
|
|
1028
|
-
_: 1
|
|
1029
|
-
}, 8, ["disabled"])]),
|
|
1030
|
-
_: 1
|
|
1031
|
-
}, 8, ["value", "placeholder", "loading", "read-only", "send-disabled"]), y("input", {
|
|
1032
|
-
ref_key: "fileInputRef",
|
|
1033
|
-
ref: x,
|
|
1034
|
-
type: "file",
|
|
1035
|
-
accept: a(Be),
|
|
1036
|
-
multiple: "",
|
|
1037
|
-
class: "hidden-file-input",
|
|
1038
|
-
onChange: Oe
|
|
1039
|
-
}, null, 40, Ma)], 34)])]));
|
|
1040
|
-
}
|
|
1041
|
-
}), Va = /* @__PURE__ */ W(La, [["__scopeId", "data-v-9f65b533"]]), Ea = {
|
|
1042
|
-
class: "FeedBackFrom"
|
|
1043
|
-
}, Da = {
|
|
1044
|
-
class: "feedback-attachments-field"
|
|
1045
|
-
}, qa = {
|
|
1046
|
-
key: 0,
|
|
1047
|
-
class: "attachments-preview"
|
|
1048
|
-
}, Oa = ["onClick"], za = ["src"], Na = ["src"], ja = {
|
|
1049
|
-
class: "attachment-file-name"
|
|
1050
|
-
}, Ka = ["onClick"], Wa = ["accept"], Ha = /* @__PURE__ */ q({
|
|
1051
|
-
__name: "FeedbackForm",
|
|
1052
|
-
emits: ["confirm"],
|
|
1053
|
-
setup(e, {
|
|
1054
|
-
emit: t
|
|
1055
|
-
}) {
|
|
1056
|
-
const i = t, o = g(), m = g(!1), l = g({
|
|
1057
|
-
id: void 0,
|
|
1058
|
-
title: "",
|
|
1059
|
-
type: "bugReports",
|
|
1060
|
-
priority: "normal",
|
|
1061
|
-
description: ""
|
|
1062
|
-
}), k = g(null), x = g(!1), _ = g(0), S = g(!1), M = g(""), w = g(""), $ = Me((C) => {
|
|
1063
|
-
ce.warning(C);
|
|
1064
|
-
}), D = P(() => $.imageItems.value.map((C) => C.previewUrl || ""));
|
|
1065
|
-
function p() {
|
|
1066
|
-
var C;
|
|
1067
|
-
(C = k.value) == null || C.click();
|
|
1068
|
-
}
|
|
1069
|
-
function I(C) {
|
|
1070
|
-
const h = C.target, b = h.files;
|
|
1071
|
-
b != null && b.length && $.addFiles(Array.from(b)), h.value = "";
|
|
1072
|
-
}
|
|
1073
|
-
function c(C) {
|
|
1074
|
-
if (C.kind === "image" && C.previewUrl) {
|
|
1075
|
-
const h = $.imageItems.value.findIndex((b) => b.id === C.id);
|
|
1076
|
-
if (h < 0) return;
|
|
1077
|
-
_.value = h, x.value = !0;
|
|
1078
|
-
return;
|
|
1079
|
-
}
|
|
1080
|
-
C.kind === "video" && C.previewUrl && (M.value = C.previewUrl, w.value = C.file.name, S.value = !0);
|
|
1081
|
-
}
|
|
1082
|
-
function A() {
|
|
1083
|
-
var C, h;
|
|
1084
|
-
l.value = {
|
|
1085
|
-
id: void 0,
|
|
1086
|
-
title: "",
|
|
1087
|
-
type: "bugReports",
|
|
1088
|
-
priority: "normal",
|
|
1089
|
-
description: ""
|
|
1090
|
-
}, $.clear(), (h = (C = o.value) == null ? void 0 : C.resetFields) == null || h.call(C);
|
|
1091
|
-
}
|
|
1092
|
-
async function U() {
|
|
1093
|
-
if (!await o.value.validate()) {
|
|
1094
|
-
m.value = !0;
|
|
1095
|
-
try {
|
|
1096
|
-
const h = $.items.value.map((O) => O.file), b = h.length > 0 ? await Le(h, Ie.feedbackBucketId) : [], {
|
|
1097
|
-
error: E
|
|
1098
|
-
} = await z.feedbackCenter.create.post({
|
|
1099
|
-
title: l.value.title,
|
|
1100
|
-
type: l.value.type,
|
|
1101
|
-
priority: l.value.priority,
|
|
1102
|
-
description: l.value.description,
|
|
1103
|
-
attachments: b
|
|
1104
|
-
});
|
|
1105
|
-
E || (ce.success("新建反馈成功"), A(), i("confirm"));
|
|
1106
|
-
} finally {
|
|
1107
|
-
m.value = !1;
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
return (C, h) => (s(), u("div", Ea, [f(a(ot), {
|
|
1112
|
-
ref_key: "formRef",
|
|
1113
|
-
ref: o,
|
|
1114
|
-
model: l.value,
|
|
1115
|
-
"auto-label-width": "",
|
|
1116
|
-
layout: "vertical"
|
|
1117
|
-
}, {
|
|
1118
|
-
default: v(() => [f(a(Y), {
|
|
1119
|
-
field: "title",
|
|
1120
|
-
label: "标题",
|
|
1121
|
-
rules: [{
|
|
1122
|
-
required: !0,
|
|
1123
|
-
message: "请输入标题"
|
|
1124
|
-
}]
|
|
1125
|
-
}, {
|
|
1126
|
-
default: v(() => [f(a(ut), {
|
|
1127
|
-
modelValue: l.value.title,
|
|
1128
|
-
"onUpdate:modelValue": h[0] || (h[0] = (b) => l.value.title = b),
|
|
1129
|
-
placeholder: "请输入标题"
|
|
1130
|
-
}, null, 8, ["modelValue"])]),
|
|
1131
|
-
_: 1
|
|
1132
|
-
}), f(a(Y), {
|
|
1133
|
-
field: "type",
|
|
1134
|
-
label: "反馈类型",
|
|
1135
|
-
rules: [{
|
|
1136
|
-
required: !0,
|
|
1137
|
-
message: "请选择反馈类型"
|
|
1138
|
-
}]
|
|
1139
|
-
}, {
|
|
1140
|
-
default: v(() => [f(a(Ue), {
|
|
1141
|
-
modelValue: l.value.type,
|
|
1142
|
-
"onUpdate:modelValue": h[1] || (h[1] = (b) => l.value.type = b),
|
|
1143
|
-
placeholder: "请选择反馈类型"
|
|
1144
|
-
}, {
|
|
1145
|
-
default: v(() => [(s(!0), u(L, null, N(a(ye), (b, E) => (s(), B(a(xe), {
|
|
1146
|
-
key: E,
|
|
1147
|
-
value: b.key
|
|
1148
|
-
}, {
|
|
1149
|
-
default: v(() => [V(F(b.label), 1)]),
|
|
1150
|
-
_: 2
|
|
1151
|
-
}, 1032, ["value"]))), 128))]),
|
|
1152
|
-
_: 1
|
|
1153
|
-
}, 8, ["modelValue"])]),
|
|
1154
|
-
_: 1
|
|
1155
|
-
}), f(a(Y), {
|
|
1156
|
-
field: "priority",
|
|
1157
|
-
label: "优先级",
|
|
1158
|
-
rules: [{
|
|
1159
|
-
required: !0,
|
|
1160
|
-
message: "请选择优先级"
|
|
1161
|
-
}]
|
|
1162
|
-
}, {
|
|
1163
|
-
default: v(() => [f(a(Ue), {
|
|
1164
|
-
modelValue: l.value.priority,
|
|
1165
|
-
"onUpdate:modelValue": h[2] || (h[2] = (b) => l.value.priority = b),
|
|
1166
|
-
placeholder: "请选择优先级"
|
|
1167
|
-
}, {
|
|
1168
|
-
default: v(() => [(s(!0), u(L, null, N(a(Ve), (b, E) => (s(), B(a(xe), {
|
|
1169
|
-
key: E,
|
|
1170
|
-
value: b.key
|
|
1171
|
-
}, {
|
|
1172
|
-
default: v(() => [V(F(b.label), 1)]),
|
|
1173
|
-
_: 2
|
|
1174
|
-
}, 1032, ["value"]))), 128))]),
|
|
1175
|
-
_: 1
|
|
1176
|
-
}, 8, ["modelValue"])]),
|
|
1177
|
-
_: 1
|
|
1178
|
-
}), f(a(Y), {
|
|
1179
|
-
field: "description",
|
|
1180
|
-
label: "问题描述",
|
|
1181
|
-
rules: [{
|
|
1182
|
-
required: !0,
|
|
1183
|
-
message: "请输入问题描述"
|
|
1184
|
-
}]
|
|
1185
|
-
}, {
|
|
1186
|
-
default: v(() => [f(a(ct), {
|
|
1187
|
-
modelValue: l.value.description,
|
|
1188
|
-
"onUpdate:modelValue": h[3] || (h[3] = (b) => l.value.description = b),
|
|
1189
|
-
placeholder: "请输入问题描述",
|
|
1190
|
-
"allow-clear": "",
|
|
1191
|
-
"auto-size": {
|
|
1192
|
-
minRows: 5
|
|
1193
|
-
}
|
|
1194
|
-
}, null, 8, ["modelValue"])]),
|
|
1195
|
-
_: 1
|
|
1196
|
-
}), f(a(Y), {
|
|
1197
|
-
field: "attachments",
|
|
1198
|
-
label: "附件"
|
|
1199
|
-
}, {
|
|
1200
|
-
default: v(() => [y("div", Da, [f(a(me), {
|
|
1201
|
-
type: "outline",
|
|
1202
|
-
disabled: m.value,
|
|
1203
|
-
onClick: p
|
|
1204
|
-
}, {
|
|
1205
|
-
default: v(() => [...h[7] || (h[7] = [V(" 添加图片、视频或文件 ", -1)])]),
|
|
1206
|
-
_: 1
|
|
1207
|
-
}, 8, ["disabled"]), a($).hasAttachments.value ? (s(), u("div", qa, [(s(!0), u(L, null, N(a($).items.value, (b, E) => (s(), u("div", {
|
|
1208
|
-
key: b.id,
|
|
1209
|
-
class: re(["attachment-preview-item", {
|
|
1210
|
-
"is-image": b.kind === "image",
|
|
1211
|
-
"is-video": b.kind === "video"
|
|
1212
|
-
}]),
|
|
1213
|
-
onClick: (O) => c(b)
|
|
1214
|
-
}, [b.kind === "image" && b.previewUrl ? (s(), u("img", {
|
|
1215
|
-
key: 0,
|
|
1216
|
-
src: b.previewUrl,
|
|
1217
|
-
alt: "预览",
|
|
1218
|
-
class: "attachment-thumbnail"
|
|
1219
|
-
}, null, 8, za)) : b.kind === "video" && b.previewUrl ? (s(), u(L, {
|
|
1220
|
-
key: 1
|
|
1221
|
-
}, [y("video", {
|
|
1222
|
-
class: "attachment-thumbnail",
|
|
1223
|
-
src: b.previewUrl,
|
|
1224
|
-
muted: "",
|
|
1225
|
-
preload: "metadata"
|
|
1226
|
-
}, null, 8, Na), h[8] || (h[8] = y("span", {
|
|
1227
|
-
class: "attachment-video-play"
|
|
1228
|
-
}, "播放", -1))], 64)) : (s(), u(L, {
|
|
1229
|
-
key: 2
|
|
1230
|
-
}, [h[9] || (h[9] = y("span", {
|
|
1231
|
-
class: "attachment-file-icon"
|
|
1232
|
-
}, "FILE", -1)), y("span", ja, F(b.file.name), 1)], 64)), y("button", {
|
|
1233
|
-
type: "button",
|
|
1234
|
-
class: "attachment-remove-btn",
|
|
1235
|
-
title: "移除附件",
|
|
1236
|
-
onClick: G((O) => a($).removeAt(E), ["stop"])
|
|
1237
|
-
}, " × ", 8, Ka)], 10, Oa))), 128))])) : R("", !0), f(a(be), {
|
|
1238
|
-
"src-list": D.value,
|
|
1239
|
-
visible: x.value,
|
|
1240
|
-
"onUpdate:visible": h[4] || (h[4] = (b) => x.value = b),
|
|
1241
|
-
current: _.value,
|
|
1242
|
-
"onUpdate:current": h[5] || (h[5] = (b) => _.value = b)
|
|
1243
|
-
}, null, 8, ["src-list", "visible", "current"]), f(ke, {
|
|
1244
|
-
visible: S.value,
|
|
1245
|
-
"onUpdate:visible": h[6] || (h[6] = (b) => S.value = b),
|
|
1246
|
-
title: w.value,
|
|
1247
|
-
src: M.value
|
|
1248
|
-
}, null, 8, ["visible", "title", "src"]), y("input", {
|
|
1249
|
-
ref_key: "fileInputRef",
|
|
1250
|
-
ref: k,
|
|
1251
|
-
type: "file",
|
|
1252
|
-
accept: a(Be),
|
|
1253
|
-
multiple: "",
|
|
1254
|
-
class: "hidden-file-input",
|
|
1255
|
-
onChange: I
|
|
1256
|
-
}, null, 40, Wa)])]),
|
|
1257
|
-
_: 1
|
|
1258
|
-
}), f(a(me), {
|
|
1259
|
-
loading: m.value,
|
|
1260
|
-
type: "primary",
|
|
1261
|
-
onClick: U
|
|
1262
|
-
}, {
|
|
1263
|
-
default: v(() => [...h[10] || (h[10] = [V(" 提交 ", -1)])]),
|
|
1264
|
-
_: 1
|
|
1265
|
-
}, 8, ["loading"])]),
|
|
1266
|
-
_: 1
|
|
1267
|
-
}, 8, ["model"])]));
|
|
1268
|
-
}
|
|
1269
|
-
}), Ga = /* @__PURE__ */ W(Ha, [["__scopeId", "data-v-a63b0678"]]), Xa = {
|
|
1270
|
-
class: "message-panel"
|
|
1271
|
-
}, Ya = {
|
|
1272
|
-
key: 2,
|
|
1273
|
-
class: "message-panel__detail"
|
|
1274
|
-
}, Ja = /* @__PURE__ */ q({
|
|
1275
|
-
__name: "FeedbackList",
|
|
1276
|
-
emits: ["toDetail"],
|
|
1277
|
-
setup(e, {
|
|
1278
|
-
expose: t,
|
|
1279
|
-
emit: i
|
|
1280
|
-
}) {
|
|
1281
|
-
const o = g(!0), m = g([]), l = g(!1), k = g(!1), x = g(""), _ = g({
|
|
1282
|
-
total: 0,
|
|
1283
|
-
current: 1,
|
|
1284
|
-
pageSize: 10
|
|
1285
|
-
});
|
|
1286
|
-
function S() {
|
|
1287
|
-
o.value = !0, _.value.current = 1, p();
|
|
1288
|
-
}
|
|
1289
|
-
function M(c) {
|
|
1290
|
-
x.value = c.id, o.value = !1;
|
|
1291
|
-
}
|
|
1292
|
-
function w(c) {
|
|
1293
|
-
return c === "inProgress" ? "orangered" : c === "pending" ? "gold" : c === "resolved" ? "green" : c === "closed" ? "gray" : "arcoblue";
|
|
1294
|
-
}
|
|
1295
|
-
function $(c) {
|
|
1296
|
-
return c === "urgent" ? "red" : c === "high" ? "orangered" : c === "low" ? "gray" : "blue";
|
|
1297
|
-
}
|
|
1298
|
-
function D(c) {
|
|
1299
|
-
return c.map((A) => ({
|
|
1300
|
-
...A,
|
|
1301
|
-
read: A.read ?? !0
|
|
1302
|
-
}));
|
|
1303
|
-
}
|
|
1304
|
-
async function p() {
|
|
1305
|
-
l.value = !0;
|
|
1306
|
-
const {
|
|
1307
|
-
data: c
|
|
1308
|
-
} = await z.feedbackCenter.own.post({
|
|
1309
|
-
current: _.value.current,
|
|
1310
|
-
pageSize: _.value.pageSize
|
|
1311
|
-
});
|
|
1312
|
-
if (l.value = !1, c) {
|
|
1313
|
-
const A = c, U = D(A.items || []);
|
|
1314
|
-
m.value = U, _.value.total = A.count || 0, k.value = U.length < _.value.pageSize;
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
async function I() {
|
|
1318
|
-
if (l.value || k.value) return;
|
|
1319
|
-
_.value.current += 1, l.value = !0;
|
|
1320
|
-
const {
|
|
1321
|
-
data: c
|
|
1322
|
-
} = await z.feedbackCenter.own.post({
|
|
1323
|
-
current: _.value.current,
|
|
1324
|
-
pageSize: _.value.pageSize
|
|
1325
|
-
});
|
|
1326
|
-
if (l.value = !1, c) {
|
|
1327
|
-
const U = D(c.items || []);
|
|
1328
|
-
m.value = [...m.value, ...U], k.value = U.length < _.value.pageSize;
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
return p(), t({
|
|
1332
|
-
refresh: p
|
|
1333
|
-
}), (c, A) => (s(), u("div", Xa, [o.value ? R("", !0) : (s(), B(a(dt), {
|
|
1334
|
-
key: 0,
|
|
1335
|
-
class: "message-panel__breadcrumb"
|
|
1336
|
-
}, {
|
|
1337
|
-
default: v(() => [f(a(Se), {
|
|
1338
|
-
onClick: S
|
|
1339
|
-
}, {
|
|
1340
|
-
default: v(() => [...A[0] || (A[0] = [V("我的反馈", -1)])]),
|
|
1341
|
-
_: 1
|
|
1342
|
-
}), f(a(Se), null, {
|
|
1343
|
-
default: v(() => [...A[1] || (A[1] = [V("反馈详情", -1)])]),
|
|
1344
|
-
_: 1
|
|
1345
|
-
})]),
|
|
1346
|
-
_: 1
|
|
1347
|
-
})), o.value ? (s(), B(kt, {
|
|
1348
|
-
key: 1,
|
|
1349
|
-
"message-list": m.value,
|
|
1350
|
-
loading: l.value,
|
|
1351
|
-
finished: k.value,
|
|
1352
|
-
"show-read-status": !0,
|
|
1353
|
-
"show-view-button": !1,
|
|
1354
|
-
"empty-description": "暂无反馈",
|
|
1355
|
-
onItemClick: M,
|
|
1356
|
-
onLoadMore: I
|
|
1357
|
-
}, {
|
|
1358
|
-
tags: v(({
|
|
1359
|
-
item: U
|
|
1360
|
-
}) => [f(a(Z), {
|
|
1361
|
-
color: "arcoblue",
|
|
1362
|
-
size: "small"
|
|
1363
|
-
}, {
|
|
1364
|
-
default: v(() => {
|
|
1365
|
-
var C;
|
|
1366
|
-
return [V(F((C = a(Q)(a(ye), U.type)) == null ? void 0 : C.label), 1)];
|
|
1367
|
-
}),
|
|
1368
|
-
_: 2
|
|
1369
|
-
}, 1024), f(a(Z), {
|
|
1370
|
-
color: $(U.priority),
|
|
1371
|
-
size: "small"
|
|
1372
|
-
}, {
|
|
1373
|
-
default: v(() => {
|
|
1374
|
-
var C;
|
|
1375
|
-
return [V(F(((C = a(Q)(a(Ve), U.priority)) == null ? void 0 : C.label) || "普通"), 1)];
|
|
1376
|
-
}),
|
|
1377
|
-
_: 2
|
|
1378
|
-
}, 1032, ["color"]), f(a(Z), {
|
|
1379
|
-
color: w(U.status),
|
|
1380
|
-
size: "small"
|
|
1381
|
-
}, {
|
|
1382
|
-
default: v(() => {
|
|
1383
|
-
var C;
|
|
1384
|
-
return [V(F((C = a(Q)(a(Ee), U.status)) == null ? void 0 : C.label), 1)];
|
|
1385
|
-
}),
|
|
1386
|
-
_: 2
|
|
1387
|
-
}, 1032, ["color"])]),
|
|
1388
|
-
description: v(({
|
|
1389
|
-
item: U
|
|
1390
|
-
}) => [V(F(U.description || "暂无描述"), 1)]),
|
|
1391
|
-
_: 1
|
|
1392
|
-
}, 8, ["message-list", "loading", "finished"])) : (s(), u("div", Ya, [f(Va, {
|
|
1393
|
-
id: x.value,
|
|
1394
|
-
"sender-role": "user",
|
|
1395
|
-
class: "feedback-details-panel"
|
|
1396
|
-
}, null, 8, ["id"])]))]));
|
|
1397
|
-
}
|
|
1398
|
-
}), Za = {
|
|
1399
|
-
key: 0,
|
|
1400
|
-
class: "user-menu-modal-content"
|
|
1401
|
-
}, Qa = {
|
|
1402
|
-
class: "left"
|
|
1403
|
-
}, es = {
|
|
1404
|
-
key: 1,
|
|
1405
|
-
class: "user-menu-modal-form"
|
|
1406
|
-
}, Us = /* @__PURE__ */ q({
|
|
1407
|
-
__name: "FeedbackModal",
|
|
1408
|
-
emits: ["confirm", "cancel"],
|
|
1409
|
-
setup(e, {
|
|
1410
|
-
expose: t,
|
|
1411
|
-
emit: i
|
|
1412
|
-
}) {
|
|
1413
|
-
const o = g(!1), m = g(Symbol("feedback-list")), l = g(Symbol("feedback-form")), k = i;
|
|
1414
|
-
function x() {
|
|
1415
|
-
S.value = ["FeedbackList"], m.value = Symbol("feedback-list"), l.value = Symbol("feedback-form");
|
|
1416
|
-
}
|
|
1417
|
-
function _() {
|
|
1418
|
-
x(), k("cancel");
|
|
1419
|
-
}
|
|
1420
|
-
const S = g(["FeedbackList"]), M = g([{
|
|
1421
|
-
name: "我的反馈",
|
|
1422
|
-
path: "FeedbackList",
|
|
1423
|
-
meta: {
|
|
1424
|
-
icon: "mingcute:cube-3d-fill"
|
|
1425
|
-
}
|
|
1426
|
-
}, {
|
|
1427
|
-
name: "新建反馈",
|
|
1428
|
-
path: "CreateFeedback",
|
|
1429
|
-
meta: {
|
|
1430
|
-
icon: "mingcute:cube-3d-fill"
|
|
1431
|
-
}
|
|
1432
|
-
}]), w = P(() => S.value.length !== 0 ? S.value[0] : "");
|
|
1433
|
-
function $() {
|
|
1434
|
-
S.value = ["FeedbackList"], m.value = Symbol("feedback-list");
|
|
1435
|
-
}
|
|
1436
|
-
function D(I) {
|
|
1437
|
-
S.value = [I.path];
|
|
1438
|
-
}
|
|
1439
|
-
function p(I) {
|
|
1440
|
-
o.value = I, I && x();
|
|
1441
|
-
}
|
|
1442
|
-
return t({
|
|
1443
|
-
setData: p
|
|
1444
|
-
}), (I, c) => (s(), B(a(ft), {
|
|
1445
|
-
visible: o.value,
|
|
1446
|
-
"onUpdate:visible": c[1] || (c[1] = (A) => o.value = A),
|
|
1447
|
-
loading: !1,
|
|
1448
|
-
"body-class": "AppMessagebodyClass",
|
|
1449
|
-
"mask-closable": !1,
|
|
1450
|
-
footer: !1,
|
|
1451
|
-
width: a(Je),
|
|
1452
|
-
title: "系统反馈",
|
|
1453
|
-
"hide-title": !1,
|
|
1454
|
-
onCancel: _
|
|
1455
|
-
}, {
|
|
1456
|
-
default: v(() => [o.value ? (s(), u("div", Za, [y("div", Qa, [f(vt, {
|
|
1457
|
-
"selected-keys": S.value,
|
|
1458
|
-
"onUpdate:selectedKeys": c[0] || (c[0] = (A) => S.value = A),
|
|
1459
|
-
menus: M.value,
|
|
1460
|
-
onChange: D
|
|
1461
|
-
}, null, 8, ["selected-keys", "menus"])]), w.value === "FeedbackList" ? (s(), B(Ja, {
|
|
1462
|
-
key: m.value
|
|
1463
|
-
})) : R("", !0), w.value === "CreateFeedback" ? (s(), u("div", es, [(s(), B(Ga, {
|
|
1464
|
-
key: l.value,
|
|
1465
|
-
onConfirm: $
|
|
1466
|
-
}))])) : R("", !0)])) : R("", !0)]),
|
|
1467
|
-
_: 1
|
|
1468
|
-
}, 8, ["visible", "width"]));
|
|
1469
|
-
}
|
|
1470
|
-
});
|
|
1471
|
-
export {
|
|
1472
|
-
Yt as B,
|
|
1473
|
-
Va as F,
|
|
1474
|
-
Fe as R,
|
|
1475
|
-
ke as V,
|
|
1476
|
-
Ja as _,
|
|
1477
|
-
la as a,
|
|
1478
|
-
Ga as b,
|
|
1479
|
-
Us as c,
|
|
1480
|
-
Cs as u
|
|
1481
|
-
};
|