@billtaofbj/questionnaire 1.0.0 → 1.2.0
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/index.cjs.js +14 -14
- package/dist/index.es.js +995 -803
- package/dist/questionnaire.css +1 -1
- package/package.json +32 -26
package/dist/index.es.js
CHANGED
|
@@ -1,32 +1,65 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, h as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, onMounted as m, onUnmounted as h, openBlock as g, reactive as _, ref as v, renderList as y, resolveComponent as b, toDisplayString as x, unref as S, watch as C, withCtx as w, withKeys as T, withModifiers as E } from "vue";
|
|
2
2
|
import { BrandWatermark as D } from "@billtaofbj/core";
|
|
3
|
-
import { useRoute as O, useRouter as
|
|
4
|
-
import { ElMessage as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import F from "
|
|
3
|
+
import { useRoute as O, useRouter as ee } from "vue-router";
|
|
4
|
+
import { ElMessage as k, ElMessageBox as te } from "element-plus";
|
|
5
|
+
import A from "axios";
|
|
6
|
+
import * as ne from "yjs";
|
|
7
|
+
import { HocuspocusProvider as re } from "@hocuspocus/provider";
|
|
8
|
+
import { Bell as ie, Clock as j, Close as M, Delete as N, Loading as P, Monitor as F, Promotion as ae } from "@element-plus/icons-vue";
|
|
9
|
+
A.create({
|
|
10
|
+
baseURL: "/api",
|
|
11
|
+
timeout: 3e4
|
|
12
|
+
});
|
|
13
|
+
function I(e = "/api") {
|
|
14
|
+
let t = A.create({
|
|
15
|
+
baseURL: e,
|
|
16
|
+
timeout: 3e4
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
list: (e) => t.get("/documents/", { params: e }),
|
|
20
|
+
get: (e) => t.get(`/documents/${e}`),
|
|
21
|
+
create: (e) => t.post("/documents/", e),
|
|
22
|
+
update: (e, n) => t.put(`/documents/${e}`, n),
|
|
23
|
+
delete: (e) => t.delete(`/documents/${e}`),
|
|
24
|
+
addAttachment: (e, n) => t.post(`/documents/${e}/attachments`, n),
|
|
25
|
+
listAttachments: (e) => t.get(`/documents/${e}/attachments`)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function oe(e = "/api") {
|
|
29
|
+
let t = A.create({
|
|
30
|
+
baseURL: e,
|
|
31
|
+
timeout: 3e4
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
get: (e) => t.get(`/questionnaires/${e}`),
|
|
35
|
+
create: (e) => t.post("/questionnaires/", e),
|
|
36
|
+
update: (e, n) => t.put(`/questionnaires/${e}`, n)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
var se = oe("/api");
|
|
40
|
+
I("/api");
|
|
41
|
+
//#endregion
|
|
9
42
|
//#region \0plugin-vue:export-helper
|
|
10
|
-
var
|
|
43
|
+
var ce = (e, t) => {
|
|
11
44
|
let n = e.__vccOpts || e;
|
|
12
45
|
for (let [e, r] of t) n[e] = r;
|
|
13
46
|
return n;
|
|
14
|
-
},
|
|
47
|
+
}, le = { class: "chat-header" }, ue = { class: "chat-header-left" }, de = { class: "chat-title" }, L = { class: "online-users-list" }, R = { class: "online-user-item" }, fe = { class: "online-user-name" }, z = { key: 1 }, pe = { class: "online-user-name" }, me = { class: "chat-header-right" }, he = {
|
|
15
48
|
key: 0,
|
|
16
49
|
class: "chat-empty"
|
|
17
|
-
},
|
|
50
|
+
}, ge = { class: "chat-empty-hint" }, _e = { key: 1 }, ve = { class: "message-content" }, ye = {
|
|
18
51
|
key: 0,
|
|
19
52
|
class: "message-meta"
|
|
20
|
-
},
|
|
53
|
+
}, B = {
|
|
21
54
|
key: 0,
|
|
22
55
|
class: "message-mention"
|
|
23
|
-
},
|
|
56
|
+
}, be = ["innerHTML"], xe = { class: "message-time" }, Se = {
|
|
24
57
|
key: 1,
|
|
25
58
|
class: "chat-message chat-message-ai"
|
|
26
|
-
},
|
|
59
|
+
}, Ce = { class: "message-avatar ai" }, we = { class: "chat-input-area" }, Te = {
|
|
27
60
|
key: 0,
|
|
28
61
|
class: "mention-popup"
|
|
29
|
-
},
|
|
62
|
+
}, Ee = ["onClick", "onMouseenter"], De = { key: 1 }, Oe = /*#__PURE__*/ ce({
|
|
30
63
|
__name: "AiChatPanel",
|
|
31
64
|
props: {
|
|
32
65
|
visible: {
|
|
@@ -77,12 +110,12 @@ var I = (e, t) => {
|
|
|
77
110
|
"clear-unread"
|
|
78
111
|
],
|
|
79
112
|
setup(c, { emit: l }) {
|
|
80
|
-
let p = c, m = l, h = v(""), _ = v(null), D = v(null), O = v(!1),
|
|
113
|
+
let p = c, m = l, h = v(""), _ = v(null), D = v(null), O = v(!1), ee = v([]), k = v(0), te = "", A = -1, ne = {
|
|
81
114
|
id: "ai-assistant",
|
|
82
115
|
name: "AI助手",
|
|
83
116
|
color: "#409EFF",
|
|
84
117
|
isAi: !0
|
|
85
|
-
},
|
|
118
|
+
}, re = t(() => {
|
|
86
119
|
let e = p.currentUser.id, t = /* @__PURE__ */ new Set();
|
|
87
120
|
return [ne, ...p.collabUsers.filter((n) => {
|
|
88
121
|
let r = n.clientId || n.id || "";
|
|
@@ -90,31 +123,31 @@ var I = (e, t) => {
|
|
|
90
123
|
let i = String(r || n.name || "");
|
|
91
124
|
return t.has(i) ? !1 : (t.add(i), !0);
|
|
92
125
|
})];
|
|
93
|
-
}),
|
|
126
|
+
}), j = t(() => re.value.length + 1), P = (e) => e.role === "ai" ? "chat-message-ai" : p.isCollab && e.user_id && e.user_id !== p.currentUser.id ? "chat-message-other" : "chat-message-user", I = (e) => e.role === "ai" ? { background: "linear-gradient(135deg, #409EFF, #337ECC)" } : { background: e.user_color || "#67C23A" }, oe = (e) => (e.user_name || "U").charAt(0), se = (e) => {
|
|
94
127
|
if (!p.isCollab) return;
|
|
95
128
|
let t = typeof e == "string" ? e : e.target?.value || h.value, n = t.length, r = t.lastIndexOf("@", n);
|
|
96
129
|
if (r !== -1 && r < n) {
|
|
97
130
|
let e = t.slice(r + 1, n);
|
|
98
131
|
if (!e.includes(" ") && !e.includes("\n")) {
|
|
99
|
-
|
|
132
|
+
te = e, A = r, ee.value = re.value.filter((t) => t.name && t.name.toLowerCase().includes(e.toLowerCase())), O.value = ee.value.length > 0, k.value = 0;
|
|
100
133
|
return;
|
|
101
134
|
}
|
|
102
135
|
}
|
|
103
136
|
O.value = !1;
|
|
104
|
-
},
|
|
105
|
-
O.value && (
|
|
137
|
+
}, ce = () => {
|
|
138
|
+
O.value && (k.value = Math.min(k.value + 1, ee.value.length - 1));
|
|
106
139
|
}, Oe = () => {
|
|
107
|
-
O.value && (
|
|
108
|
-
},
|
|
109
|
-
let t = h.value.slice(0,
|
|
140
|
+
O.value && (k.value = Math.max(k.value - 1, 0));
|
|
141
|
+
}, ke = (e) => {
|
|
142
|
+
let t = h.value.slice(0, A), n = h.value.slice(A + te.length + 1);
|
|
110
143
|
h.value = `${t}@${e.name} ${n}`, O.value = !1;
|
|
111
|
-
},
|
|
144
|
+
}, Ae = (e) => {
|
|
112
145
|
if (e) {
|
|
113
146
|
if (e.shiftKey) return;
|
|
114
147
|
if (O.value) {
|
|
115
|
-
let t =
|
|
148
|
+
let t = ee.value[k.value];
|
|
116
149
|
if (t) {
|
|
117
|
-
e.preventDefault(),
|
|
150
|
+
e.preventDefault(), ke(t);
|
|
118
151
|
return;
|
|
119
152
|
}
|
|
120
153
|
}
|
|
@@ -128,27 +161,27 @@ var I = (e, t) => {
|
|
|
128
161
|
e && (n = e[1]);
|
|
129
162
|
}
|
|
130
163
|
m("send", t, { mentionedUser: n }), h.value = "", O.value = !1;
|
|
131
|
-
},
|
|
164
|
+
}, je = () => {
|
|
132
165
|
u(() => {
|
|
133
166
|
_.value && (_.value.scrollTop = _.value.scrollHeight);
|
|
134
167
|
});
|
|
135
168
|
};
|
|
136
|
-
return C(() => p.messages.length,
|
|
137
|
-
let u = b("el-icon"), p = b("el-tag"), v = b("el-popover"), C = b("el-button"),
|
|
169
|
+
return C(() => p.messages.length, je), C(() => p.messages, je, { deep: !0 }), (t, l) => {
|
|
170
|
+
let u = b("el-icon"), p = b("el-tag"), v = b("el-popover"), C = b("el-button"), te = b("el-input");
|
|
138
171
|
return c.visible ? (g(), i("div", {
|
|
139
172
|
key: 0,
|
|
140
173
|
class: "ai-chat-panel",
|
|
141
174
|
style: f({ width: c.panelWidth + "px" })
|
|
142
175
|
}, [
|
|
143
|
-
a("div",
|
|
176
|
+
a("div", le, [a("div", ue, [
|
|
144
177
|
s(u, {
|
|
145
178
|
size: 18,
|
|
146
179
|
color: "#409EFF"
|
|
147
180
|
}, {
|
|
148
|
-
default: w(() => [s(S(
|
|
181
|
+
default: w(() => [s(S(F))]),
|
|
149
182
|
_: 1
|
|
150
183
|
}),
|
|
151
|
-
a("span",
|
|
184
|
+
a("span", de, x(c.isCollab ? "协作聊天" : "AI 助手"), 1),
|
|
152
185
|
c.isCollab ? (g(), n(v, {
|
|
153
186
|
key: 0,
|
|
154
187
|
width: 200,
|
|
@@ -161,15 +194,15 @@ var I = (e, t) => {
|
|
|
161
194
|
effect: "plain",
|
|
162
195
|
class: "online-tag"
|
|
163
196
|
}, {
|
|
164
|
-
default: w(() => [o(x(
|
|
197
|
+
default: w(() => [o(x(j.value) + "人在线 ", 1)]),
|
|
165
198
|
_: 1
|
|
166
199
|
})]),
|
|
167
|
-
default: w(() => [a("div",
|
|
200
|
+
default: w(() => [a("div", L, [a("div", R, [
|
|
168
201
|
a("div", {
|
|
169
202
|
class: "online-user-avatar",
|
|
170
203
|
style: f({ background: c.currentUser.color || "#409EFF" })
|
|
171
204
|
}, x((c.currentUser.name || "U").charAt(0)), 5),
|
|
172
|
-
a("span",
|
|
205
|
+
a("span", fe, x(c.currentUser.name || "我"), 1),
|
|
173
206
|
s(p, {
|
|
174
207
|
size: "small",
|
|
175
208
|
type: c.isOwner ? "warning" : "success",
|
|
@@ -180,7 +213,7 @@ var I = (e, t) => {
|
|
|
180
213
|
_: 1
|
|
181
214
|
}, 8, ["type"]),
|
|
182
215
|
l[4] ||= a("span", { class: "self-tag" }, "(我)", -1)
|
|
183
|
-
]), (g(!0), i(e, null, y(
|
|
216
|
+
]), (g(!0), i(e, null, y(re.value, (e) => (g(), i("div", {
|
|
184
217
|
key: e.id || e.clientId,
|
|
185
218
|
class: "online-user-item"
|
|
186
219
|
}, [
|
|
@@ -191,10 +224,10 @@ var I = (e, t) => {
|
|
|
191
224
|
key: 0,
|
|
192
225
|
size: 14
|
|
193
226
|
}, {
|
|
194
|
-
default: w(() => [s(S(
|
|
227
|
+
default: w(() => [s(S(F))]),
|
|
195
228
|
_: 1
|
|
196
|
-
})) : (g(), i("span",
|
|
197
|
-
a("span",
|
|
229
|
+
})) : (g(), i("span", z, x((e.name || "U").charAt(0)), 1))], 4),
|
|
230
|
+
a("span", pe, x(e.name || "未知用户"), 1),
|
|
198
231
|
e.isAi ? (g(), n(p, {
|
|
199
232
|
key: 0,
|
|
200
233
|
size: "small",
|
|
@@ -217,7 +250,7 @@ var I = (e, t) => {
|
|
|
217
250
|
]))), 128))])]),
|
|
218
251
|
_: 1
|
|
219
252
|
})) : r("", !0)
|
|
220
|
-
]), a("div",
|
|
253
|
+
]), a("div", me, [
|
|
221
254
|
c.isCollab && c.unreadMention ? (g(), i("div", {
|
|
222
255
|
key: 0,
|
|
223
256
|
class: "mention-bell",
|
|
@@ -227,7 +260,7 @@ var I = (e, t) => {
|
|
|
227
260
|
size: 18,
|
|
228
261
|
color: "#F56C6C"
|
|
229
262
|
}, {
|
|
230
|
-
default: w(() => [s(S(
|
|
263
|
+
default: w(() => [s(S(ie))]),
|
|
231
264
|
_: 1
|
|
232
265
|
})])) : r("", !0),
|
|
233
266
|
s(C, {
|
|
@@ -251,7 +284,7 @@ var I = (e, t) => {
|
|
|
251
284
|
title: "关闭"
|
|
252
285
|
}, {
|
|
253
286
|
default: w(() => [s(u, null, {
|
|
254
|
-
default: w(() => [s(S(
|
|
287
|
+
default: w(() => [s(S(M))]),
|
|
255
288
|
_: 1
|
|
256
289
|
})]),
|
|
257
290
|
_: 1
|
|
@@ -262,20 +295,20 @@ var I = (e, t) => {
|
|
|
262
295
|
ref_key: "messagesRef",
|
|
263
296
|
ref: _
|
|
264
297
|
}, [
|
|
265
|
-
c.messages.length === 0 ? (g(), i("div",
|
|
298
|
+
c.messages.length === 0 ? (g(), i("div", he, [
|
|
266
299
|
s(u, {
|
|
267
300
|
size: 40,
|
|
268
301
|
color: "#c0c4cc"
|
|
269
302
|
}, {
|
|
270
|
-
default: w(() => [s(S(
|
|
303
|
+
default: w(() => [s(S(F))]),
|
|
271
304
|
_: 1
|
|
272
305
|
}),
|
|
273
306
|
a("p", null, x(c.isCollab ? "协作聊天室" : "你好!我是 AI 助手"), 1),
|
|
274
|
-
a("p",
|
|
307
|
+
a("p", ge, x(c.isCollab ? "与团队成员和AI助手实时聊天" : "可以问我任何关于文档编辑的问题"), 1)
|
|
275
308
|
])) : r("", !0),
|
|
276
309
|
(g(!0), i(e, null, y(c.messages, (e) => (g(), i("div", {
|
|
277
310
|
key: e._msgId || e.time + e.content,
|
|
278
|
-
class: d(["chat-message",
|
|
311
|
+
class: d(["chat-message", P(e)])
|
|
279
312
|
}, [a("div", {
|
|
280
313
|
class: "message-avatar",
|
|
281
314
|
style: f(I(e))
|
|
@@ -283,21 +316,21 @@ var I = (e, t) => {
|
|
|
283
316
|
key: 0,
|
|
284
317
|
size: 16
|
|
285
318
|
}, {
|
|
286
|
-
default: w(() => [s(S(
|
|
319
|
+
default: w(() => [s(S(F))]),
|
|
287
320
|
_: 1
|
|
288
|
-
})) : (g(), i("span",
|
|
289
|
-
c.isCollab && e.role === "user" ? (g(), i("div",
|
|
321
|
+
})) : (g(), i("span", _e, x(oe(e)), 1))], 4), a("div", ve, [
|
|
322
|
+
c.isCollab && e.role === "user" ? (g(), i("div", ye, [a("span", {
|
|
290
323
|
class: "message-sender",
|
|
291
324
|
style: f({ color: e.user_color || "#67C23A" })
|
|
292
|
-
}, x(e.user_name || "用户"), 5), e.mentioned_user ? (g(), i("span",
|
|
325
|
+
}, x(e.user_name || "用户"), 5), e.mentioned_user ? (g(), i("span", B, "@" + x(e.mentioned_user), 1)) : r("", !0)])) : r("", !0),
|
|
293
326
|
a("div", {
|
|
294
327
|
class: "message-text",
|
|
295
328
|
innerHTML: e.content
|
|
296
|
-
}, null, 8,
|
|
297
|
-
a("div",
|
|
329
|
+
}, null, 8, be),
|
|
330
|
+
a("div", xe, x(e.time), 1)
|
|
298
331
|
])], 2))), 128)),
|
|
299
|
-
c.loading ? (g(), i("div",
|
|
300
|
-
default: w(() => [s(S(
|
|
332
|
+
c.loading ? (g(), i("div", Se, [a("div", Ce, [s(u, { size: 16 }, {
|
|
333
|
+
default: w(() => [s(S(F))]),
|
|
301
334
|
_: 1
|
|
302
335
|
})]), l[7] ||= a("div", { class: "message-content" }, [a("div", { class: "message-text typing-indicator" }, [
|
|
303
336
|
a("span"),
|
|
@@ -305,12 +338,12 @@ var I = (e, t) => {
|
|
|
305
338
|
a("span")
|
|
306
339
|
])], -1)])) : r("", !0)
|
|
307
340
|
], 512),
|
|
308
|
-
a("div",
|
|
341
|
+
a("div", we, [a("div", {
|
|
309
342
|
class: "chat-input-wrapper",
|
|
310
343
|
ref_key: "inputWrapperRef",
|
|
311
344
|
ref: D
|
|
312
345
|
}, [
|
|
313
|
-
s(
|
|
346
|
+
s(te, {
|
|
314
347
|
modelValue: h.value,
|
|
315
348
|
"onUpdate:modelValue": l[3] ||= (e) => h.value = e,
|
|
316
349
|
type: "textarea",
|
|
@@ -320,22 +353,22 @@ var I = (e, t) => {
|
|
|
320
353
|
},
|
|
321
354
|
placeholder: c.isCollab ? "输入消息... @提及成员" : "输入消息...",
|
|
322
355
|
onKeydown: [
|
|
323
|
-
T(E(
|
|
324
|
-
T(E(
|
|
356
|
+
T(E(Ae, ["exact"]), ["enter"]),
|
|
357
|
+
T(E(ce, ["prevent"]), ["down"]),
|
|
325
358
|
T(E(Oe, ["prevent"]), ["up"])
|
|
326
359
|
],
|
|
327
|
-
onInput:
|
|
360
|
+
onInput: se,
|
|
328
361
|
resize: "none"
|
|
329
362
|
}, null, 8, [
|
|
330
363
|
"modelValue",
|
|
331
364
|
"placeholder",
|
|
332
365
|
"onKeydown"
|
|
333
366
|
]),
|
|
334
|
-
O.value ? (g(), i("div",
|
|
367
|
+
O.value ? (g(), i("div", Te, [(g(!0), i(e, null, y(ee.value, (e, t) => (g(), i("div", {
|
|
335
368
|
key: e.id || e.clientId,
|
|
336
|
-
class: d(["mention-item", { active: t ===
|
|
337
|
-
onClick: (t) =>
|
|
338
|
-
onMouseenter: (e) =>
|
|
369
|
+
class: d(["mention-item", { active: t === k.value }]),
|
|
370
|
+
onClick: (t) => ke(e),
|
|
371
|
+
onMouseenter: (e) => k.value = t
|
|
339
372
|
}, [a("div", {
|
|
340
373
|
class: "mention-avatar",
|
|
341
374
|
style: f({ background: e.color || "#909399" })
|
|
@@ -343,15 +376,15 @@ var I = (e, t) => {
|
|
|
343
376
|
key: 0,
|
|
344
377
|
size: 12
|
|
345
378
|
}, {
|
|
346
|
-
default: w(() => [s(S(
|
|
379
|
+
default: w(() => [s(S(F))]),
|
|
347
380
|
_: 1
|
|
348
|
-
})) : (g(), i("span",
|
|
381
|
+
})) : (g(), i("span", De, x((e.name || "U").charAt(0)), 1))], 4), a("span", null, x(e.name), 1)], 42, Ee))), 128))])) : r("", !0),
|
|
349
382
|
s(C, {
|
|
350
383
|
class: "send-btn",
|
|
351
384
|
type: "primary",
|
|
352
385
|
circle: "",
|
|
353
386
|
disabled: !h.value.trim() || c.loading,
|
|
354
|
-
onClick:
|
|
387
|
+
onClick: Ae
|
|
355
388
|
}, {
|
|
356
389
|
default: w(() => [s(u, null, {
|
|
357
390
|
default: w(() => [s(S(ae))]),
|
|
@@ -363,7 +396,7 @@ var I = (e, t) => {
|
|
|
363
396
|
], 4)) : r("", !0);
|
|
364
397
|
};
|
|
365
398
|
}
|
|
366
|
-
}, [["__scopeId", "data-v-01960100"]]),
|
|
399
|
+
}, [["__scopeId", "data-v-01960100"]]), ke = "/api/document-versions", Ae = 5e3, je = () => {
|
|
367
400
|
let e = v([]), t = v(!1);
|
|
368
401
|
return {
|
|
369
402
|
versions: e,
|
|
@@ -371,13 +404,13 @@ var I = (e, t) => {
|
|
|
371
404
|
saveVersion: async ({ documentId: e, docType: t, content: n, userId: r, userName: i }) => {
|
|
372
405
|
if (!e || !t || !n) return null;
|
|
373
406
|
try {
|
|
374
|
-
let { data: a } = await
|
|
407
|
+
let { data: a } = await A.post(ke, {
|
|
375
408
|
document_id: e,
|
|
376
409
|
doc_type: t,
|
|
377
410
|
content: typeof n == "string" ? n : JSON.stringify(n),
|
|
378
411
|
user_id: r || null,
|
|
379
412
|
user_name: i || null
|
|
380
|
-
}, { timeout:
|
|
413
|
+
}, { timeout: Ae });
|
|
381
414
|
return a;
|
|
382
415
|
} catch (e) {
|
|
383
416
|
return console.warn("[useVersionHistory] Failed to save version:", e), null;
|
|
@@ -387,9 +420,9 @@ var I = (e, t) => {
|
|
|
387
420
|
if (!n) return [];
|
|
388
421
|
t.value = !0;
|
|
389
422
|
try {
|
|
390
|
-
let { data: t } = await
|
|
423
|
+
let { data: t } = await A.get(ke, {
|
|
391
424
|
params: { document_id: n },
|
|
392
|
-
timeout:
|
|
425
|
+
timeout: Ae
|
|
393
426
|
});
|
|
394
427
|
return e.value = t, t;
|
|
395
428
|
} catch (t) {
|
|
@@ -400,26 +433,26 @@ var I = (e, t) => {
|
|
|
400
433
|
},
|
|
401
434
|
getVersionContent: async (e) => {
|
|
402
435
|
try {
|
|
403
|
-
let { data: t } = await
|
|
436
|
+
let { data: t } = await A.get(`${ke}/${e}`, { timeout: Ae });
|
|
404
437
|
return t;
|
|
405
438
|
} catch (e) {
|
|
406
439
|
return console.warn("[useVersionHistory] Failed to get version content:", e), null;
|
|
407
440
|
}
|
|
408
441
|
}
|
|
409
442
|
};
|
|
410
|
-
},
|
|
443
|
+
}, Me = { class: "version-history-panel" }, Ne = {
|
|
411
444
|
key: 0,
|
|
412
445
|
class: "loading-state"
|
|
413
|
-
},
|
|
446
|
+
}, Pe = {
|
|
414
447
|
key: 1,
|
|
415
448
|
class: "empty-state"
|
|
416
|
-
},
|
|
449
|
+
}, Fe = {
|
|
417
450
|
key: 2,
|
|
418
451
|
class: "version-list"
|
|
419
|
-
},
|
|
452
|
+
}, V = {
|
|
420
453
|
key: 0,
|
|
421
454
|
class: "current-version"
|
|
422
|
-
},
|
|
455
|
+
}, H = { class: "current-version-header" }, U = { class: "version-number" }, Ie = ["onClick"], W = { class: "version-number" }, G = { class: "version-user" }, K = { class: "panel-footer" }, Le = /*#__PURE__*/ ce({
|
|
423
456
|
__name: "VersionHistoryPanel",
|
|
424
457
|
props: {
|
|
425
458
|
modelValue: {
|
|
@@ -433,7 +466,7 @@ var I = (e, t) => {
|
|
|
433
466
|
},
|
|
434
467
|
emits: ["update:modelValue", "apply"],
|
|
435
468
|
setup(t, { expose: c, emit: l }) {
|
|
436
|
-
let u = t, f = l, { versions: p, loading: m, loadVersions: h, getVersionContent: _ } =
|
|
469
|
+
let u = t, f = l, { versions: p, loading: m, loadVersions: h, getVersionContent: _ } = je(), T = v(!1), E = v(null), D = v(!1), O = v(null);
|
|
437
470
|
C(() => u.modelValue, (e) => {
|
|
438
471
|
T.value = e, e && u.documentId && (E.value = null, h(u.documentId).then((e) => {
|
|
439
472
|
e && e.length > 0 && (O.value = e[0]);
|
|
@@ -441,19 +474,19 @@ var I = (e, t) => {
|
|
|
441
474
|
}), C(T, (e) => {
|
|
442
475
|
f("update:modelValue", e);
|
|
443
476
|
});
|
|
444
|
-
let
|
|
477
|
+
let ee = (e) => {
|
|
445
478
|
E.value = e;
|
|
446
|
-
},
|
|
479
|
+
}, te = async () => {
|
|
447
480
|
if (E.value) {
|
|
448
481
|
D.value = !0;
|
|
449
482
|
try {
|
|
450
483
|
let e = await _(E.value.id);
|
|
451
|
-
e && e.content ? (O.value = E.value, E.value = null, f("apply", e.content),
|
|
484
|
+
e && e.content ? (O.value = E.value, E.value = null, f("apply", e.content), k.success("已切换到版本 v" + O.value.version_number)) : k.error("获取版本内容失败");
|
|
452
485
|
} finally {
|
|
453
486
|
D.value = !1;
|
|
454
487
|
}
|
|
455
488
|
}
|
|
456
|
-
},
|
|
489
|
+
}, A = () => {
|
|
457
490
|
T.value = !1;
|
|
458
491
|
}, ne = (e) => {
|
|
459
492
|
if (!e) return "";
|
|
@@ -468,33 +501,33 @@ var I = (e, t) => {
|
|
|
468
501
|
title: "更新履历",
|
|
469
502
|
direction: "rtl",
|
|
470
503
|
size: "420px",
|
|
471
|
-
"before-close":
|
|
504
|
+
"before-close": A
|
|
472
505
|
}, {
|
|
473
|
-
footer: w(() => [a("div",
|
|
506
|
+
footer: w(() => [a("div", K, [s(_, {
|
|
474
507
|
type: "primary",
|
|
475
508
|
disabled: !E.value,
|
|
476
509
|
loading: D.value,
|
|
477
|
-
onClick:
|
|
510
|
+
onClick: te
|
|
478
511
|
}, {
|
|
479
512
|
default: w(() => [...c[4] ||= [o(" 切换到此版本 ", -1)]]),
|
|
480
513
|
_: 1
|
|
481
514
|
}, 8, ["disabled", "loading"])])]),
|
|
482
|
-
default: w(() => [a("div",
|
|
483
|
-
default: w(() => [s(S(
|
|
515
|
+
default: w(() => [a("div", Me, [S(m) ? (g(), i("div", Ne, [s(l, { class: "is-loading" }, {
|
|
516
|
+
default: w(() => [s(S(P))]),
|
|
484
517
|
_: 1
|
|
485
|
-
}), c[1] ||= a("span", null, "加载中...", -1)])) : S(p).length === 0 ? (g(), i("div",
|
|
518
|
+
}), c[1] ||= a("span", null, "加载中...", -1)])) : S(p).length === 0 ? (g(), i("div", Pe, [s(l, {
|
|
486
519
|
size: 48,
|
|
487
520
|
color: "#c0c4cc"
|
|
488
521
|
}, {
|
|
489
|
-
default: w(() => [s(S(
|
|
522
|
+
default: w(() => [s(S(j))]),
|
|
490
523
|
_: 1
|
|
491
|
-
}), c[2] ||= a("p", null, "暂无历史版本", -1)])) : (g(), i("div",
|
|
524
|
+
}), c[2] ||= a("p", null, "暂无历史版本", -1)])) : (g(), i("div", Fe, [O.value ? (g(), i("div", V, [a("div", H, [s(u, {
|
|
492
525
|
type: "success",
|
|
493
526
|
size: "small"
|
|
494
527
|
}, {
|
|
495
528
|
default: w(() => [...c[3] ||= [o("当前版本", -1)]]),
|
|
496
529
|
_: 1
|
|
497
|
-
}), a("span",
|
|
530
|
+
}), a("span", U, "v" + x(O.value.version_number), 1)])])) : r("", !0), s(h, null, {
|
|
498
531
|
default: w(() => [(g(!0), i(e, null, y(S(p), (e) => (g(), n(f, {
|
|
499
532
|
key: e.id,
|
|
500
533
|
timestamp: ne(e.created_at),
|
|
@@ -504,8 +537,8 @@ var I = (e, t) => {
|
|
|
504
537
|
}, {
|
|
505
538
|
default: w(() => [a("div", {
|
|
506
539
|
class: d(["version-item", { active: E.value?.id === e.id }]),
|
|
507
|
-
onClick: (t) =>
|
|
508
|
-
}, [a("span",
|
|
540
|
+
onClick: (t) => ee(e)
|
|
541
|
+
}, [a("span", W, "版本号:v" + x(e.version_number), 1), a("span", G, "提交人:" + x(e.user_name || "未知用户"), 1)], 10, Ie)]),
|
|
509
542
|
_: 2
|
|
510
543
|
}, 1032, [
|
|
511
544
|
"timestamp",
|
|
@@ -521,7 +554,7 @@ var I = (e, t) => {
|
|
|
521
554
|
}, [["__scopeId", "data-v-87924b7c"]]);
|
|
522
555
|
//#endregion
|
|
523
556
|
//#region ../../src/composables/useChat.js
|
|
524
|
-
function
|
|
557
|
+
function Re() {
|
|
525
558
|
let e = v([]), t = v(!1), n = v(!1), r = v([]), i = v({
|
|
526
559
|
id: "",
|
|
527
560
|
name: "",
|
|
@@ -577,7 +610,7 @@ function je() {
|
|
|
577
610
|
console.warn("[useChat] Failed to push to Y.Array:", e);
|
|
578
611
|
}
|
|
579
612
|
if (r.roomId) try {
|
|
580
|
-
await
|
|
613
|
+
await A.post(u, {
|
|
581
614
|
room_id: r.roomId,
|
|
582
615
|
role: "user",
|
|
583
616
|
content: t,
|
|
@@ -603,7 +636,7 @@ function je() {
|
|
|
603
636
|
console.warn("[useChat] Failed to push AI message to Y.Array:", e);
|
|
604
637
|
}
|
|
605
638
|
if (r) try {
|
|
606
|
-
await
|
|
639
|
+
await A.post(u, {
|
|
607
640
|
room_id: r,
|
|
608
641
|
role: "ai",
|
|
609
642
|
content: t,
|
|
@@ -615,7 +648,7 @@ function je() {
|
|
|
615
648
|
}
|
|
616
649
|
}, b = async (t) => {
|
|
617
650
|
if (t) try {
|
|
618
|
-
let n = await
|
|
651
|
+
let n = await A.get(u, { params: { room_id: t } });
|
|
619
652
|
if (Array.isArray(n.data)) {
|
|
620
653
|
let t = n.data.map((e) => ({
|
|
621
654
|
_msgId: e._msgId || `hist-${e.id || Date.now()}`,
|
|
@@ -634,7 +667,7 @@ function je() {
|
|
|
634
667
|
}
|
|
635
668
|
}, x = async (t) => {
|
|
636
669
|
if (e.value = [], l.clear(), t) try {
|
|
637
|
-
await
|
|
670
|
+
await A.delete(u, { params: { room_id: t } });
|
|
638
671
|
} catch (e) {
|
|
639
672
|
console.warn("[useChat] Failed to clear messages on server:", e);
|
|
640
673
|
}
|
|
@@ -668,81 +701,231 @@ function je() {
|
|
|
668
701
|
};
|
|
669
702
|
}
|
|
670
703
|
//#endregion
|
|
704
|
+
//#region ../../src/composables/useAiApi.js
|
|
705
|
+
var q = [
|
|
706
|
+
"我可以帮您优化流程图布局、检查节点逻辑,或者提供流程设计建议。请问有什么需要帮助的?",
|
|
707
|
+
"这个流程图的节点连接看起来很清晰。建议检查一下是否有遗漏的分支或异常处理路径。",
|
|
708
|
+
"根据当前的流程结构,我建议在关键决策节点后添加明确的条件标注,使流程更易理解。",
|
|
709
|
+
"流程图中的泳道划分很合理。如果需要,我可以帮您分析各角色的职责分配是否均衡。",
|
|
710
|
+
"我可以帮您检查流程中是否存在循环依赖或死锁风险。需要我逐条分析吗?",
|
|
711
|
+
"建议在流程开始和结束节点使用统一的样式,这样可以让读者更快识别流程的起止点。",
|
|
712
|
+
"这个执行图的逻辑链路比较长,建议在中间添加一些检查点节点,便于流程监控和调试。",
|
|
713
|
+
"我可以帮您生成流程图的文字说明文档,方便团队成员理解流程细节。"
|
|
714
|
+
];
|
|
715
|
+
function J() {
|
|
716
|
+
return q[Math.floor(Math.random() * q.length)];
|
|
717
|
+
}
|
|
718
|
+
async function Y(e, t, n) {
|
|
719
|
+
let r = { "Content-Type": "application/json" };
|
|
720
|
+
e.apiKey && (r.Authorization = `Bearer ${e.apiKey}`);
|
|
721
|
+
let i = await fetch(e.url, {
|
|
722
|
+
method: "POST",
|
|
723
|
+
headers: r,
|
|
724
|
+
body: JSON.stringify({
|
|
725
|
+
model: e.model || "gpt-4o-mini",
|
|
726
|
+
messages: t,
|
|
727
|
+
temperature: e.temperature ?? .7,
|
|
728
|
+
max_tokens: e.maxTokens ?? 4096
|
|
729
|
+
}),
|
|
730
|
+
signal: n
|
|
731
|
+
});
|
|
732
|
+
if (!i.ok) {
|
|
733
|
+
let e = await i.text().catch(() => "");
|
|
734
|
+
throw Error(`AI API error ${i.status}: ${e}`);
|
|
735
|
+
}
|
|
736
|
+
return (await i.json()).choices?.[0]?.message?.content || "";
|
|
737
|
+
}
|
|
738
|
+
function ze(e) {
|
|
739
|
+
let t = v(!1), n = null, r = () => {
|
|
740
|
+
let t = typeof e == "function" ? e() : e;
|
|
741
|
+
return !!(t && t.url);
|
|
742
|
+
}, i = () => typeof e == "function" ? e() : e || {};
|
|
743
|
+
return {
|
|
744
|
+
loading: t,
|
|
745
|
+
isAvailable: r,
|
|
746
|
+
chat: async (e, r = []) => {
|
|
747
|
+
let a = i();
|
|
748
|
+
if (!a.url) return J();
|
|
749
|
+
t.value = !0, n && n.abort(), n = new AbortController();
|
|
750
|
+
try {
|
|
751
|
+
return await Y(a, [
|
|
752
|
+
{
|
|
753
|
+
role: "system",
|
|
754
|
+
content: a.chatPrompt || "你是一个有帮助的AI助手,擅长文档编辑和流程设计。请简洁回答用户问题。"
|
|
755
|
+
},
|
|
756
|
+
...r.map((e) => ({
|
|
757
|
+
role: e.role === "ai" ? "assistant" : "user",
|
|
758
|
+
content: e.content
|
|
759
|
+
})),
|
|
760
|
+
{
|
|
761
|
+
role: "user",
|
|
762
|
+
content: e
|
|
763
|
+
}
|
|
764
|
+
], n.signal);
|
|
765
|
+
} catch (e) {
|
|
766
|
+
return e.name === "AbortError" ? "" : (console.warn("[useAiApi] Chat error, falling back to mock:", e), J());
|
|
767
|
+
} finally {
|
|
768
|
+
t.value = !1;
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
generate: async (e, r) => {
|
|
772
|
+
let a = i();
|
|
773
|
+
if (!a.url) return {
|
|
774
|
+
success: !1,
|
|
775
|
+
message: "AI生成功能开发中,敬请期待..."
|
|
776
|
+
};
|
|
777
|
+
t.value = !0, n && n.abort(), n = new AbortController();
|
|
778
|
+
try {
|
|
779
|
+
let t = await Y(a, [{
|
|
780
|
+
role: "system",
|
|
781
|
+
content: a.generatePrompt || `你是一个专业的${r || "流程图"}生成助手。根据用户的描述,生成对应的JSON数据结构。只返回JSON,不要包含其他文字或markdown代码块标记。`
|
|
782
|
+
}, {
|
|
783
|
+
role: "user",
|
|
784
|
+
content: e
|
|
785
|
+
}], n.signal), i = null;
|
|
786
|
+
try {
|
|
787
|
+
let e = t.replace(/^```(?:json)?\s*/i, "").replace(/\s*```$/i, "").trim();
|
|
788
|
+
i = JSON.parse(e);
|
|
789
|
+
} catch {
|
|
790
|
+
i = null;
|
|
791
|
+
}
|
|
792
|
+
return {
|
|
793
|
+
success: !0,
|
|
794
|
+
content: t,
|
|
795
|
+
parsed: i
|
|
796
|
+
};
|
|
797
|
+
} catch (e) {
|
|
798
|
+
return e.name === "AbortError" ? {
|
|
799
|
+
success: !1,
|
|
800
|
+
message: "已取消"
|
|
801
|
+
} : (console.warn("[useAiApi] Generate error:", e), {
|
|
802
|
+
success: !1,
|
|
803
|
+
message: `AI生成失败: ${e.message}`
|
|
804
|
+
});
|
|
805
|
+
} finally {
|
|
806
|
+
t.value = !1;
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
abort: () => {
|
|
810
|
+
n &&= (n.abort(), null);
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
//#endregion
|
|
671
815
|
//#region ../../src/views/QuestionnaireEditor.vue
|
|
672
|
-
var
|
|
816
|
+
var Be = { class: "q-editor" }, Ve = { class: "editor-header" }, He = { class: "header-left" }, Ue = { class: "header-right" }, We = { class: "editor-main" }, Ge = {
|
|
673
817
|
class: "q-canvas",
|
|
674
818
|
ref: "canvasRef"
|
|
675
|
-
},
|
|
819
|
+
}, Ke = { class: "q-header-top" }, qe = { class: "q-header-settings-panel" }, Je = { class: "q-settings-section" }, Ye = { class: "q-settings-row" }, Xe = { class: "q-settings-row" }, Ze = { class: "q-settings-row" }, Qe = { class: "q-settings-row" }, $e = { class: "q-settings-row" }, et = { class: "q-settings-row" }, tt = { class: "q-settings-row" }, nt = { class: "q-settings-row" }, rt = { class: "q-settings-row" }, it = { class: "q-settings-row" }, at = { class: "q-settings-row" }, ot = { class: "q-settings-row" }, st = { class: "q-settings-row" }, ct = { class: "q-settings-row" }, lt = { class: "q-header-settings" }, ut = { class: "q-pass-score" }, dt = { class: "q-total-score" }, ft = { class: "q-show-score" }, pt = {
|
|
676
820
|
class: "q-questions",
|
|
677
821
|
ref: "questionsRef"
|
|
678
|
-
},
|
|
822
|
+
}, mt = [
|
|
679
823
|
"onClick",
|
|
680
824
|
"onDragstart",
|
|
681
825
|
"onDragover",
|
|
682
826
|
"onDrop"
|
|
683
|
-
],
|
|
827
|
+
], ht = { class: "q-card-toolbar" }, gt = { class: "q-card-header" }, _t = { class: "q-num" }, vt = { class: "q-card-actions" }, yt = { class: "q-card-body" }, bt = { class: "q-desc-row" }, xt = { class: "q-image-row" }, St = {
|
|
684
828
|
key: 0,
|
|
685
829
|
class: "q-image-preview"
|
|
686
|
-
},
|
|
830
|
+
}, Ct = ["src"], wt = {
|
|
687
831
|
key: 0,
|
|
688
832
|
class: "q-options-area"
|
|
689
|
-
},
|
|
833
|
+
}, Tt = {
|
|
690
834
|
key: 1,
|
|
691
835
|
class: "q-options-area"
|
|
692
|
-
},
|
|
836
|
+
}, Et = {
|
|
693
837
|
key: 2,
|
|
694
838
|
class: "q-options-area"
|
|
695
|
-
},
|
|
839
|
+
}, Dt = {
|
|
696
840
|
key: 3,
|
|
697
841
|
class: "q-options-area"
|
|
698
|
-
},
|
|
842
|
+
}, Ot = {
|
|
699
843
|
key: 4,
|
|
700
844
|
class: "q-options-area"
|
|
701
|
-
},
|
|
845
|
+
}, kt = { class: "rating-config" }, At = { class: "rating-preview" }, jt = ["onClick"], Mt = {
|
|
702
846
|
key: 5,
|
|
703
847
|
class: "q-options-area"
|
|
704
|
-
},
|
|
848
|
+
}, Nt = { class: "scale-config" }, Pt = { class: "scale-preview" }, Ft = { class: "label" }, It = {
|
|
705
849
|
key: 6,
|
|
706
850
|
class: "q-options-area"
|
|
707
|
-
},
|
|
851
|
+
}, Lt = { class: "matrix-config" }, Rt = { class: "matrix-rows" }, zt = { class: "matrix-cols" }, Bt = {
|
|
708
852
|
key: 0,
|
|
709
853
|
class: "matrix-preview"
|
|
710
|
-
},
|
|
854
|
+
}, Vt = { class: "matrix-table" }, Ht = {
|
|
711
855
|
key: 7,
|
|
712
856
|
class: "q-options-area"
|
|
713
|
-
},
|
|
857
|
+
}, Ut = { class: "q-skip-config" }, Wt = { class: "skip-header" }, Gt = { class: "skip-row" }, Kt = {
|
|
714
858
|
key: 0,
|
|
715
859
|
class: "skip-rules"
|
|
716
|
-
},
|
|
860
|
+
}, qt = { class: "opt-name" }, Jt = { class: "q-score-config" }, Yt = { class: "score-header" }, Xt = { class: "score-row" }, Zt = {
|
|
717
861
|
key: 0,
|
|
718
862
|
class: "score-options"
|
|
719
|
-
},
|
|
863
|
+
}, Qt = { class: "opt-name" }, $t = {
|
|
720
864
|
key: 1,
|
|
721
865
|
class: "score-row"
|
|
722
|
-
},
|
|
866
|
+
}, en = {
|
|
723
867
|
key: 2,
|
|
724
868
|
class: "score-row"
|
|
725
|
-
},
|
|
869
|
+
}, tn = { class: "q-scoring-guide" }, nn = { class: "scoring-guide-header" }, rn = { class: "scoring-guide-item" }, an = { class: "scoring-guide-item" }, on = {
|
|
726
870
|
key: 0,
|
|
727
871
|
class: "scoring-guide-error"
|
|
728
|
-
},
|
|
872
|
+
}, sn = { class: "q-add-bottom" }, cn = { class: "q-add-trigger" }, ln = { class: "ai-generate-content" }, un = { class: "ai-gen-form-item" }, dn = { class: "ai-gen-type" }, fn = { class: "ai-gen-form-item" }, pn = { class: "ai-gen-form-item" }, mn = { class: "ai-analysis-content" }, hn = {
|
|
729
873
|
key: 0,
|
|
730
874
|
class: "ai-loading"
|
|
731
|
-
},
|
|
875
|
+
}, gn = {
|
|
732
876
|
key: 1,
|
|
733
877
|
class: "ai-result"
|
|
734
|
-
},
|
|
878
|
+
}, _n = { class: "ai-result-header" }, vn = ["innerHTML"], yn = {
|
|
735
879
|
key: 2,
|
|
736
880
|
class: "ai-placeholder"
|
|
737
|
-
},
|
|
881
|
+
}, bn = { class: "distribute-content" }, xn = { class: "distribute-input" }, Sn = { class: "distribute-actions" }, Cn = {
|
|
738
882
|
key: 0,
|
|
739
883
|
class: "distribute-results"
|
|
740
|
-
},
|
|
884
|
+
}, wn = { class: "results-header" }, Tn = "questionnaire", X = /*#__PURE__*/ ce({
|
|
741
885
|
__name: "QuestionnaireEditor",
|
|
886
|
+
props: {
|
|
887
|
+
docId: {
|
|
888
|
+
type: [Number, String],
|
|
889
|
+
default: null
|
|
890
|
+
},
|
|
891
|
+
apiBase: {
|
|
892
|
+
type: String,
|
|
893
|
+
default: "/api"
|
|
894
|
+
},
|
|
895
|
+
saveApi: {
|
|
896
|
+
type: [String, Function],
|
|
897
|
+
default: null
|
|
898
|
+
},
|
|
899
|
+
loadApi: {
|
|
900
|
+
type: [String, Function],
|
|
901
|
+
default: null
|
|
902
|
+
},
|
|
903
|
+
wsUrl: {
|
|
904
|
+
type: String,
|
|
905
|
+
default: ""
|
|
906
|
+
},
|
|
907
|
+
user: {
|
|
908
|
+
type: Object,
|
|
909
|
+
default: null
|
|
910
|
+
},
|
|
911
|
+
uiConfig: {
|
|
912
|
+
type: Object,
|
|
913
|
+
default: () => ({})
|
|
914
|
+
},
|
|
915
|
+
aiApi: {
|
|
916
|
+
type: [String, Object],
|
|
917
|
+
default: null
|
|
918
|
+
}
|
|
919
|
+
},
|
|
742
920
|
setup(c) {
|
|
743
|
-
let l = O(), u =
|
|
921
|
+
let l = O(), u = ee(), h = c, T = t(() => ({
|
|
922
|
+
backButton: "show",
|
|
923
|
+
titleEditable: !0,
|
|
924
|
+
authorEditable: !0,
|
|
925
|
+
...h.uiConfig
|
|
926
|
+
})), D = t(() => h.docId ?? l.params.id), ie = t(() => h.apiBase && h.apiBase !== "/api" ? oe(h.apiBase) : se), j = v("新建问卷"), M = v(""), N = v(h.user?.name || ""), P = v("draft"), F = v(null), ae = v(null), I = v([]), ce = v(0), le = v(!1), ue = v(null), de = v(!1), L = v(null), R = v(null), fe = v(null);
|
|
744
927
|
v(!1);
|
|
745
|
-
let
|
|
928
|
+
let z = _({
|
|
746
929
|
backgroundColor: "#ffffff",
|
|
747
930
|
headerFont: "inherit",
|
|
748
931
|
headerFontSize: 14,
|
|
@@ -758,7 +941,7 @@ var Me = { class: "q-editor" }, Ne = { class: "editor-header" }, Pe = { class: "
|
|
|
758
941
|
descFontStyle: "normal",
|
|
759
942
|
descFontSize: 14,
|
|
760
943
|
descColor: "#606266"
|
|
761
|
-
}),
|
|
944
|
+
}), pe = v(!1), me = v(""), he = v([]), ge = v(!1), _e = v(!1), ve = v(""), ye = v(!1), B = Re(), be = ze(() => h.aiApi), xe = v(!1), { saveVersion: Se } = je(), Ce = v(!1), we = v(!1), Te = v(""), Ee = v([]), De = v(-1), ke = v(""), Ae = v(null), Me = (e) => ({
|
|
762
945
|
text: "文本题",
|
|
763
946
|
radio: "单选题",
|
|
764
947
|
checkbox: "多选题",
|
|
@@ -767,69 +950,69 @@ var Me = { class: "q-editor" }, Ne = { class: "editor-header" }, Pe = { class: "
|
|
|
767
950
|
scale: "量表题",
|
|
768
951
|
matrix: "矩阵题",
|
|
769
952
|
image: "图片题"
|
|
770
|
-
})[e] || e,
|
|
771
|
-
|
|
953
|
+
})[e] || e, Ne = t(() => I.value.reduce((e, t) => e + (t.score || 0), 0)), Pe = 0, Fe = () => {
|
|
954
|
+
Pe = I.value.reduce((e, t) => {
|
|
772
955
|
let n = parseInt(t.id?.replace("q-", "") || "0");
|
|
773
956
|
return n > e ? n : e;
|
|
774
957
|
}, 0);
|
|
775
|
-
},
|
|
776
|
-
title:
|
|
777
|
-
description:
|
|
778
|
-
questions:
|
|
958
|
+
}, V = v(!1), H = v(!1), U = v(!1), Ie = v([]), W = null, G = null, K = null, q = null, J = null, Y = null, X = null, Z = !1, En = !1, Q = !1, Dn = null, On = () => JSON.stringify({
|
|
959
|
+
title: j.value,
|
|
960
|
+
description: M.value,
|
|
961
|
+
questions: I.value.map((e) => {
|
|
779
962
|
let { _preview: t, ...n } = e;
|
|
780
963
|
return n;
|
|
781
964
|
}),
|
|
782
|
-
status:
|
|
783
|
-
}),
|
|
784
|
-
if (!
|
|
785
|
-
|
|
786
|
-
url: `ws://${window.location.hostname || "localhost"}:1234`,
|
|
787
|
-
name: `questionnaire-${
|
|
788
|
-
document:
|
|
965
|
+
status: P.value
|
|
966
|
+
}), kn = () => {
|
|
967
|
+
if (!R.value || G) return;
|
|
968
|
+
W = new ne.Doc(), G = new re({
|
|
969
|
+
url: h.wsUrl || `ws://${window.location.hostname || "localhost"}:1234`,
|
|
970
|
+
name: `questionnaire-${R.value}`,
|
|
971
|
+
document: W,
|
|
789
972
|
connect: !1,
|
|
790
973
|
reconnect: !1,
|
|
791
974
|
onConnect: () => {
|
|
792
|
-
|
|
975
|
+
An();
|
|
793
976
|
},
|
|
794
977
|
onClose: () => {},
|
|
795
978
|
onSynced: ({ state: e }) => {
|
|
796
|
-
|
|
979
|
+
Z = !0, !K?.toString() && !q?.toString() && (!J?.toArray() || J.length === 0) ? Ln() : Rn(), X = On();
|
|
797
980
|
}
|
|
798
|
-
}),
|
|
799
|
-
let e =
|
|
981
|
+
}), K = W.getText("title"), q = W.getText("description"), J = W.getArray("questions"), Y = W.getMap("meta");
|
|
982
|
+
let e = W.getMap("_meta");
|
|
800
983
|
e.observe((t) => {
|
|
801
|
-
t.keysChanged.has("_closed") && (
|
|
802
|
-
}), G.observe(() => {
|
|
803
|
-
X && !Z && !Q && kn();
|
|
984
|
+
t.keysChanged.has("_closed") && (U.value = e.get("_closed") === !0, U.value && (V.value = !1, G?.disconnect(), k.warning("协作已被创建者关闭")));
|
|
804
985
|
}), K.observe(() => {
|
|
805
|
-
|
|
986
|
+
Z && !En && !Q && Rn();
|
|
806
987
|
}), q.observe(() => {
|
|
807
|
-
|
|
988
|
+
Z && !En && !Q && Rn();
|
|
808
989
|
}), J.observe(() => {
|
|
809
|
-
|
|
810
|
-
}),
|
|
811
|
-
|
|
990
|
+
Z && !En && !Q && Rn();
|
|
991
|
+
}), Y.observe(() => {
|
|
992
|
+
Z && !En && !Q && Rn();
|
|
993
|
+
}), G.awareness.on("change", () => {
|
|
994
|
+
Ie.value = Array.from(G.awareness.getStates().entries()).filter(([e, t]) => t.user).map(([e, t]) => ({
|
|
812
995
|
clientId: e,
|
|
813
996
|
...t.user
|
|
814
997
|
}));
|
|
815
998
|
});
|
|
816
|
-
},
|
|
817
|
-
|
|
818
|
-
if (
|
|
819
|
-
|
|
999
|
+
}, An = () => {
|
|
1000
|
+
jn(), Dn = setInterval(() => {
|
|
1001
|
+
if (G?.connection?.ws?.readyState === WebSocket.CLOSED) try {
|
|
1002
|
+
G.connect();
|
|
820
1003
|
} catch {}
|
|
821
1004
|
}, 3e4);
|
|
822
|
-
},
|
|
823
|
-
|
|
824
|
-
},
|
|
825
|
-
if (!
|
|
826
|
-
|
|
1005
|
+
}, jn = () => {
|
|
1006
|
+
Dn &&= (clearInterval(Dn), null);
|
|
1007
|
+
}, Mn = async () => {
|
|
1008
|
+
if (!R.value && (await Er(), !R.value)) {
|
|
1009
|
+
k.warning("请先保存问卷后再开启协作");
|
|
827
1010
|
return;
|
|
828
1011
|
}
|
|
829
|
-
if (
|
|
830
|
-
|
|
1012
|
+
if (G || kn(), G) {
|
|
1013
|
+
U.value = !1, V.value = !0;
|
|
831
1014
|
try {
|
|
832
|
-
await fetch(`/api/questionnaires/${
|
|
1015
|
+
await fetch(`/api/questionnaires/${R.value}`, {
|
|
833
1016
|
method: "PUT",
|
|
834
1017
|
headers: { "Content-Type": "application/json" },
|
|
835
1018
|
body: JSON.stringify({ collab_closed: !1 })
|
|
@@ -838,30 +1021,30 @@ var Me = { class: "q-editor" }, Ne = { class: "editor-header" }, Pe = { class: "
|
|
|
838
1021
|
console.warn("Failed to reset collab_closed:", e);
|
|
839
1022
|
}
|
|
840
1023
|
let e = `用户${Math.floor(Math.random() * 1e3)}`, t = `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`;
|
|
841
|
-
|
|
1024
|
+
G.awareness.setLocalStateField("user", {
|
|
842
1025
|
name: e,
|
|
843
1026
|
color: t
|
|
844
|
-
}),
|
|
845
|
-
ydoc:
|
|
846
|
-
provider:
|
|
847
|
-
onlineUsers:
|
|
848
|
-
}),
|
|
849
|
-
id:
|
|
1027
|
+
}), B.setCollabContext({
|
|
1028
|
+
ydoc: W,
|
|
1029
|
+
provider: G,
|
|
1030
|
+
onlineUsers: Ie
|
|
1031
|
+
}), B.setCurrentUser({
|
|
1032
|
+
id: G.awareness.clientID,
|
|
850
1033
|
name: e,
|
|
851
1034
|
color: t
|
|
852
|
-
}),
|
|
853
|
-
|
|
854
|
-
}, 1e3),
|
|
1035
|
+
}), G.connect(), setTimeout(() => {
|
|
1036
|
+
Z && !K?.toString() && !q?.toString() && (!J?.toArray() || J.length === 0) && (Ln(), X = On());
|
|
1037
|
+
}, 1e3), k.success("协作已开启");
|
|
855
1038
|
}
|
|
856
|
-
},
|
|
857
|
-
|
|
858
|
-
},
|
|
859
|
-
|
|
860
|
-
let e =
|
|
861
|
-
if (e &&
|
|
1039
|
+
}, Nn = () => {
|
|
1040
|
+
G && (G.disconnect(), V.value = !1, k.info("协作已关闭"));
|
|
1041
|
+
}, Pn = async () => {
|
|
1042
|
+
U.value = !0;
|
|
1043
|
+
let e = W?.getMap("_meta");
|
|
1044
|
+
if (e && W.transact(() => {
|
|
862
1045
|
e.set("_closed", !0);
|
|
863
|
-
}),
|
|
864
|
-
await fetch(`/api/questionnaires/${
|
|
1046
|
+
}), R.value) try {
|
|
1047
|
+
await fetch(`/api/questionnaires/${R.value}`, {
|
|
865
1048
|
method: "PUT",
|
|
866
1049
|
headers: { "Content-Type": "application/json" },
|
|
867
1050
|
body: JSON.stringify({ collab_closed: !0 })
|
|
@@ -869,79 +1052,79 @@ var Me = { class: "q-editor" }, Ne = { class: "editor-header" }, Pe = { class: "
|
|
|
869
1052
|
} catch (e) {
|
|
870
1053
|
console.warn("Failed to persist collab_closed:", e);
|
|
871
1054
|
}
|
|
872
|
-
|
|
873
|
-
},
|
|
874
|
-
|
|
875
|
-
},
|
|
876
|
-
if (
|
|
877
|
-
|
|
1055
|
+
Nn();
|
|
1056
|
+
}, Fn = () => {
|
|
1057
|
+
V.value ? Pn() : Mn();
|
|
1058
|
+
}, In = async () => {
|
|
1059
|
+
if (R.value && !H.value && (G || kn(), G)) {
|
|
1060
|
+
U.value = !1, V.value = !0, H.value = !0;
|
|
878
1061
|
try {
|
|
879
|
-
await fetch(`/api/questionnaires/${
|
|
1062
|
+
await fetch(`/api/questionnaires/${R.value}`, {
|
|
880
1063
|
method: "PUT",
|
|
881
1064
|
headers: { "Content-Type": "application/json" },
|
|
882
1065
|
body: JSON.stringify({ collab_closed: !1 })
|
|
883
1066
|
});
|
|
884
1067
|
} catch {}
|
|
885
1068
|
let e = `协作人${Math.floor(Math.random() * 1e3)}`, t = `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`;
|
|
886
|
-
|
|
1069
|
+
G.awareness.setLocalStateField("user", {
|
|
887
1070
|
name: e,
|
|
888
1071
|
color: t
|
|
889
|
-
}),
|
|
890
|
-
ydoc:
|
|
891
|
-
provider:
|
|
892
|
-
onlineUsers:
|
|
893
|
-
}),
|
|
894
|
-
id:
|
|
1072
|
+
}), B.setCollabContext({
|
|
1073
|
+
ydoc: W,
|
|
1074
|
+
provider: G,
|
|
1075
|
+
onlineUsers: Ie
|
|
1076
|
+
}), B.setCurrentUser({
|
|
1077
|
+
id: G.awareness.clientID,
|
|
895
1078
|
name: e,
|
|
896
1079
|
color: t
|
|
897
|
-
}),
|
|
898
|
-
|
|
1080
|
+
}), G.connect(), setTimeout(() => {
|
|
1081
|
+
Z && (!K?.toString() && !q?.toString() && (!J?.toArray() || J.length === 0) || (Rn(), X = On()));
|
|
899
1082
|
}, 1e3);
|
|
900
1083
|
}
|
|
901
|
-
},
|
|
902
|
-
!
|
|
903
|
-
|
|
904
|
-
let e =
|
|
1084
|
+
}, Ln = () => {
|
|
1085
|
+
!W || !Z || (Q = !0, W.transact(() => {
|
|
1086
|
+
K.toString() !== j.value && (K.delete(0, K.length), K.insert(0, j.value)), q.toString() !== M.value && (q.delete(0, q.length), q.insert(0, M.value));
|
|
1087
|
+
let e = I.value.map((e) => {
|
|
905
1088
|
let { _preview: t, ...n } = e;
|
|
906
1089
|
return n;
|
|
907
1090
|
});
|
|
908
|
-
JSON.stringify(e) !== JSON.stringify(
|
|
1091
|
+
JSON.stringify(e) !== JSON.stringify(J.toArray()) && (J.delete(0, J.length), J.push(e)), Y.set("status", P.value), Y.set("updatedAt", (/* @__PURE__ */ new Date()).toISOString());
|
|
909
1092
|
}), Q = !1);
|
|
910
1093
|
}, $ = () => {
|
|
911
|
-
if (!
|
|
912
|
-
let e =
|
|
913
|
-
e !==
|
|
914
|
-
},
|
|
915
|
-
if (!
|
|
1094
|
+
if (!V.value) return;
|
|
1095
|
+
let e = On();
|
|
1096
|
+
e !== X && (X = e, Ln());
|
|
1097
|
+
}, Rn = () => {
|
|
1098
|
+
if (!W || !Z || !K?.toString() && !q?.toString() && (!J?.toArray() || J.length === 0)) return;
|
|
916
1099
|
let e = JSON.stringify({
|
|
917
|
-
title:
|
|
918
|
-
description:
|
|
919
|
-
questions:
|
|
920
|
-
status:
|
|
1100
|
+
title: K?.toString() || "",
|
|
1101
|
+
description: q?.toString() || "",
|
|
1102
|
+
questions: J?.toArray() || [],
|
|
1103
|
+
status: Y?.get("status") || "draft"
|
|
921
1104
|
});
|
|
922
|
-
if (e ===
|
|
923
|
-
|
|
924
|
-
let t =
|
|
925
|
-
t !== void 0 && (
|
|
926
|
-
let n =
|
|
927
|
-
n !== void 0 && (
|
|
928
|
-
let r =
|
|
929
|
-
r && (
|
|
1105
|
+
if (e === X) return;
|
|
1106
|
+
X = e, En = !0;
|
|
1107
|
+
let t = K?.toString();
|
|
1108
|
+
t !== void 0 && (j.value = t);
|
|
1109
|
+
let n = q?.toString();
|
|
1110
|
+
n !== void 0 && (M.value = n);
|
|
1111
|
+
let r = J?.toArray();
|
|
1112
|
+
r && (I.value = r.map((e) => ({
|
|
930
1113
|
...e,
|
|
931
1114
|
_preview: 0
|
|
932
|
-
})),
|
|
933
|
-
let i =
|
|
934
|
-
i && (
|
|
935
|
-
},
|
|
936
|
-
|
|
1115
|
+
})), Fe());
|
|
1116
|
+
let i = Y?.get("status");
|
|
1117
|
+
i && (P.value = i), En = !1;
|
|
1118
|
+
}, zn = null, Bn = () => {
|
|
1119
|
+
En || (zn && clearTimeout(zn), zn = setTimeout(() => {
|
|
937
1120
|
$();
|
|
938
1121
|
}, 100));
|
|
939
1122
|
};
|
|
940
|
-
C(
|
|
941
|
-
let
|
|
942
|
-
|
|
1123
|
+
C(j, Bn), C(M, Bn), C(I, Bn, { deep: !0 });
|
|
1124
|
+
let Vn = (e) => {
|
|
1125
|
+
Pe++;
|
|
943
1126
|
let t = {
|
|
944
|
-
id: `q-${
|
|
1127
|
+
id: `q-${Pe}`,
|
|
945
1128
|
type: e,
|
|
946
1129
|
title: "",
|
|
947
1130
|
description: "",
|
|
@@ -993,19 +1176,19 @@ var Me = { class: "q-editor" }, Ne = { class: "editor-header" }, Pe = { class: "
|
|
|
993
1176
|
...t,
|
|
994
1177
|
imageQuestionText: ""
|
|
995
1178
|
} : t;
|
|
996
|
-
},
|
|
997
|
-
|
|
998
|
-
},
|
|
999
|
-
|
|
1000
|
-
|
|
1179
|
+
}, Hn = (e) => {
|
|
1180
|
+
I.value.push(Vn(e)), de.value = !1, V.value && $();
|
|
1181
|
+
}, Un = (e) => {
|
|
1182
|
+
te.confirm("确定删除该题目?", "提示", { type: "warning" }).then(() => {
|
|
1183
|
+
I.value.splice(e, 1), V.value && $();
|
|
1001
1184
|
}).catch(() => {});
|
|
1002
|
-
},
|
|
1003
|
-
let n =
|
|
1004
|
-
r < 0 || r >= n.length || ([n[e], n[r]] = [n[r], n[e]],
|
|
1005
|
-
},
|
|
1185
|
+
}, Wn = (e, t) => {
|
|
1186
|
+
let n = I.value, r = e + t;
|
|
1187
|
+
r < 0 || r >= n.length || ([n[e], n[r]] = [n[r], n[e]], V.value && $());
|
|
1188
|
+
}, Gn = (e) => {
|
|
1006
1189
|
let t = e.options.length;
|
|
1007
|
-
e.options.push(`选项${t + 1}`), e.optionSkipTo ||= {}, e.optionSkipTo[t] = "", e.optionScore ||= {}, e.optionScore[t] = 0,
|
|
1008
|
-
},
|
|
1190
|
+
e.options.push(`选项${t + 1}`), e.optionSkipTo ||= {}, e.optionSkipTo[t] = "", e.optionScore ||= {}, e.optionScore[t] = 0, V.value && $();
|
|
1191
|
+
}, Kn = (e, t) => {
|
|
1009
1192
|
e.options.splice(t, 1);
|
|
1010
1193
|
let n = {}, r = {};
|
|
1011
1194
|
Object.entries(e.optionSkipTo || {}).forEach(([e, r]) => {
|
|
@@ -1014,78 +1197,78 @@ var Me = { class: "q-editor" }, Ne = { class: "editor-header" }, Pe = { class: "
|
|
|
1014
1197
|
}), Object.entries(e.optionScore || {}).forEach(([e, n]) => {
|
|
1015
1198
|
let i = parseInt(e);
|
|
1016
1199
|
i < t ? r[i] = n : i > t && (r[i - 1] = n);
|
|
1017
|
-
}), e.optionSkipTo = n, e.optionScore = r,
|
|
1018
|
-
},
|
|
1200
|
+
}), e.optionSkipTo = n, e.optionScore = r, V.value && $();
|
|
1201
|
+
}, qn = (e, t) => {
|
|
1019
1202
|
let n = new FileReader();
|
|
1020
1203
|
return n.onload = (t) => {
|
|
1021
|
-
e.image = t.target.result,
|
|
1204
|
+
e.image = t.target.result, V.value && $();
|
|
1022
1205
|
}, n.readAsDataURL(t), !1;
|
|
1023
|
-
},
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1206
|
+
}, Jn = (e, t) => {
|
|
1207
|
+
L.value = e, t.dataTransfer.effectAllowed = "move";
|
|
1208
|
+
}, Yn = (e, t) => {
|
|
1026
1209
|
t.dataTransfer.dropEffect = "move";
|
|
1027
|
-
},
|
|
1028
|
-
if (t?.preventDefault(),
|
|
1029
|
-
let n =
|
|
1030
|
-
n.splice(e, 0, r),
|
|
1031
|
-
},
|
|
1032
|
-
title:
|
|
1033
|
-
description:
|
|
1034
|
-
author:
|
|
1035
|
-
status:
|
|
1036
|
-
beginTime:
|
|
1037
|
-
endTime:
|
|
1038
|
-
passScore:
|
|
1039
|
-
showScore:
|
|
1040
|
-
totalScore:
|
|
1041
|
-
questions:
|
|
1210
|
+
}, Xn = (e, t) => {
|
|
1211
|
+
if (t?.preventDefault(), L.value === null || L.value === e) return;
|
|
1212
|
+
let n = I.value, r = n.splice(L.value, 1)[0];
|
|
1213
|
+
n.splice(e, 0, r), L.value = null, V.value && $();
|
|
1214
|
+
}, Zn = () => JSON.stringify({
|
|
1215
|
+
title: j.value,
|
|
1216
|
+
description: M.value,
|
|
1217
|
+
author: N.value,
|
|
1218
|
+
status: P.value,
|
|
1219
|
+
beginTime: F.value,
|
|
1220
|
+
endTime: ae.value,
|
|
1221
|
+
passScore: ce.value,
|
|
1222
|
+
showScore: le.value,
|
|
1223
|
+
totalScore: Ne.value,
|
|
1224
|
+
questions: I.value.map((e) => {
|
|
1042
1225
|
let { _preview: t, ...n } = e;
|
|
1043
1226
|
return n;
|
|
1044
1227
|
})
|
|
1045
|
-
}),
|
|
1228
|
+
}), Qn = (e) => {
|
|
1046
1229
|
try {
|
|
1047
1230
|
let t = JSON.parse(e);
|
|
1048
|
-
|
|
1231
|
+
j.value = t.title || "新建问卷", M.value = t.description || "", P.value = t.status || "draft", F.value = t.beginTime ? new Date(t.beginTime) : null, ae.value = t.endTime ? new Date(t.endTime) : null, ce.value = t.passScore || 0, le.value = t.showScore !== !1, I.value = (t.questions || []).map((e) => (e._preview = 0, e)), Fe();
|
|
1049
1232
|
} catch (e) {
|
|
1050
1233
|
console.error("Failed to parse questionnaire config", e);
|
|
1051
1234
|
}
|
|
1052
|
-
},
|
|
1053
|
-
let e =
|
|
1054
|
-
r.href = n, r.download = `${
|
|
1055
|
-
},
|
|
1056
|
-
|
|
1057
|
-
},
|
|
1235
|
+
}, $n = () => {
|
|
1236
|
+
let e = Zn(), t = new Blob([e], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1237
|
+
r.href = n, r.download = `${j.value || "问卷"}.json`, r.click(), URL.revokeObjectURL(n), k.success("JSON已导出");
|
|
1238
|
+
}, er = () => {
|
|
1239
|
+
fe.value?.click();
|
|
1240
|
+
}, tr = (e) => {
|
|
1058
1241
|
let t = e.target.files?.[0];
|
|
1059
1242
|
if (!t) return;
|
|
1060
1243
|
let n = new FileReader();
|
|
1061
1244
|
n.onload = (e) => {
|
|
1062
1245
|
try {
|
|
1063
|
-
|
|
1246
|
+
Qn(e.target.result), k.success("JSON导入成功"), V.value && $();
|
|
1064
1247
|
} catch {
|
|
1065
|
-
|
|
1248
|
+
k.error("JSON格式错误");
|
|
1066
1249
|
}
|
|
1067
1250
|
}, n.readAsText(t), e.target.value = "";
|
|
1068
|
-
},
|
|
1069
|
-
if (!
|
|
1070
|
-
|
|
1251
|
+
}, nr = async (e) => {
|
|
1252
|
+
if (!R.value) {
|
|
1253
|
+
k.warning("请先保存问卷");
|
|
1071
1254
|
return;
|
|
1072
1255
|
}
|
|
1073
1256
|
if (e === "standalone") {
|
|
1074
|
-
|
|
1257
|
+
rr();
|
|
1075
1258
|
return;
|
|
1076
1259
|
}
|
|
1077
1260
|
try {
|
|
1078
|
-
let t = await fetch(`/api/questionnaires/export/${
|
|
1261
|
+
let t = await fetch(`/api/questionnaires/export/${R.value}/${e}`, { method: "POST" });
|
|
1079
1262
|
if (!t.ok) throw Error("导出失败");
|
|
1080
1263
|
let n = await t.blob(), r = e === "word" ? "docx" : e, i = URL.createObjectURL(n), a = document.createElement("a");
|
|
1081
|
-
a.href = i, a.download = `${
|
|
1264
|
+
a.href = i, a.download = `${j.value}.${r}`, a.click(), URL.revokeObjectURL(i), k.success("导出成功");
|
|
1082
1265
|
} catch (e) {
|
|
1083
|
-
|
|
1266
|
+
k.error("导出失败: " + e.message);
|
|
1084
1267
|
}
|
|
1085
|
-
},
|
|
1086
|
-
let e = JSON.parse(
|
|
1087
|
-
i.href = r, i.download = `${e.title || "问卷"}.html`, i.click(), URL.revokeObjectURL(r),
|
|
1088
|
-
},
|
|
1268
|
+
}, rr = () => {
|
|
1269
|
+
let e = JSON.parse(Zn()), t = ir(e), n = new Blob([t], { type: "text/html" }), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
1270
|
+
i.href = r, i.download = `${e.title || "问卷"}.html`, i.click(), URL.revokeObjectURL(r), k.success("独立HTML表单已导出");
|
|
1271
|
+
}, ir = (e) => {
|
|
1089
1272
|
let t = `<div class="question" style="background:#f0f9ff; border-radius:6px; padding:16px; margin-bottom:16px;">
|
|
1090
1273
|
<p class="q-title" style="color:#409eff;">您的邮箱 <span style="color:red">*</span></p>
|
|
1091
1274
|
<p class="desc">请填写您的邮箱地址,用于追踪反馈来源</p>
|
|
@@ -1213,25 +1396,25 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1213
1396
|
<\/script>
|
|
1214
1397
|
</body>
|
|
1215
1398
|
</html>`;
|
|
1216
|
-
},
|
|
1217
|
-
if (!
|
|
1218
|
-
let e = `${window.location.origin}/questionnaire-editor/${
|
|
1399
|
+
}, ar = async () => {
|
|
1400
|
+
if (!R.value) return;
|
|
1401
|
+
let e = `${window.location.origin}/questionnaire-editor/${R.value}?collab=1`;
|
|
1219
1402
|
try {
|
|
1220
|
-
await navigator.clipboard.writeText(e),
|
|
1403
|
+
await navigator.clipboard.writeText(e), k.success("协作编辑链接已复制到剪贴板,发送给他人即可共同编辑");
|
|
1221
1404
|
} catch {
|
|
1222
|
-
|
|
1405
|
+
k.info(`协作编辑链接: ${e}`);
|
|
1223
1406
|
}
|
|
1224
|
-
},
|
|
1225
|
-
if (!
|
|
1407
|
+
}, or = async () => {
|
|
1408
|
+
if (!R.value) return;
|
|
1226
1409
|
let e = prompt("请输入填写者邮箱(用于追踪反馈来源):");
|
|
1227
1410
|
if (e === null) return;
|
|
1228
|
-
let t = e ? `?uid=${encodeURIComponent(e)}` : "", n = `${window.location.origin}/questionnaire-view/${
|
|
1411
|
+
let t = e ? `?uid=${encodeURIComponent(e)}` : "", n = `${window.location.origin}/questionnaire-view/${R.value}${t}`;
|
|
1229
1412
|
try {
|
|
1230
|
-
await navigator.clipboard.writeText(n),
|
|
1413
|
+
await navigator.clipboard.writeText(n), k.success("填写链接已复制到剪贴板");
|
|
1231
1414
|
} catch {
|
|
1232
|
-
|
|
1415
|
+
k.info(`填写链接: ${n}`);
|
|
1233
1416
|
}
|
|
1234
|
-
},
|
|
1417
|
+
}, sr = (e) => e.split(/[\n,;,;\s]+/).map((e) => e.trim().toLowerCase()).filter((e) => e && e.includes("@") && e.includes(".")), cr = (e) => {
|
|
1235
1418
|
let t = new FileReader();
|
|
1236
1419
|
return t.onload = (e) => {
|
|
1237
1420
|
try {
|
|
@@ -1241,65 +1424,65 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1241
1424
|
let r = (e.split(/[,\t]/)[0] || "").trim().toLowerCase();
|
|
1242
1425
|
r && r.includes("@") && r.includes(".") && n.push(r);
|
|
1243
1426
|
}), n.length > 0) {
|
|
1244
|
-
let e =
|
|
1245
|
-
|
|
1246
|
-
} else
|
|
1427
|
+
let e = sr(me.value);
|
|
1428
|
+
me.value = [.../* @__PURE__ */ new Set([...e, ...n])].join("\n"), k.success(`导入了 ${n.length} 个邮箱`);
|
|
1429
|
+
} else k.warning("未找到有效邮箱");
|
|
1247
1430
|
} catch {
|
|
1248
|
-
|
|
1431
|
+
k.error("文件解析失败");
|
|
1249
1432
|
}
|
|
1250
1433
|
}, t.readAsText(e), !1;
|
|
1251
|
-
},
|
|
1252
|
-
let e =
|
|
1434
|
+
}, lr = () => {
|
|
1435
|
+
let e = sr(me.value);
|
|
1253
1436
|
if (e.length === 0) {
|
|
1254
|
-
|
|
1437
|
+
k.warning("请先输入至少一个邮箱");
|
|
1255
1438
|
return;
|
|
1256
1439
|
}
|
|
1257
|
-
if (!
|
|
1258
|
-
|
|
1440
|
+
if (!R.value) {
|
|
1441
|
+
k.warning("请先保存问卷");
|
|
1259
1442
|
return;
|
|
1260
1443
|
}
|
|
1261
|
-
|
|
1444
|
+
he.value = e.map((e) => {
|
|
1262
1445
|
let t = crypto.randomUUID().replace(/-/g, "").slice(0, 16);
|
|
1263
1446
|
return {
|
|
1264
1447
|
email: e,
|
|
1265
|
-
url: `${window.location.origin}/questionnaire-view/${
|
|
1448
|
+
url: `${window.location.origin}/questionnaire-view/${R.value}?uid=${encodeURIComponent(e)}&t=${t}`,
|
|
1266
1449
|
token: t
|
|
1267
1450
|
};
|
|
1268
|
-
}),
|
|
1269
|
-
},
|
|
1451
|
+
}), k.success(`已生成 ${e.length} 条唯一链接`);
|
|
1452
|
+
}, ur = async (e) => {
|
|
1270
1453
|
try {
|
|
1271
|
-
await navigator.clipboard.writeText(e),
|
|
1454
|
+
await navigator.clipboard.writeText(e), k.success("已复制");
|
|
1272
1455
|
} catch {
|
|
1273
|
-
|
|
1456
|
+
k.info(e);
|
|
1274
1457
|
}
|
|
1275
|
-
},
|
|
1276
|
-
if (
|
|
1277
|
-
let e = "邮箱,问卷链接,Token\n" +
|
|
1278
|
-
r.href = n, r.download = `${
|
|
1279
|
-
},
|
|
1280
|
-
|
|
1281
|
-
},
|
|
1282
|
-
|
|
1283
|
-
},
|
|
1284
|
-
|
|
1285
|
-
},
|
|
1286
|
-
|
|
1287
|
-
},
|
|
1288
|
-
if (!
|
|
1289
|
-
|
|
1458
|
+
}, dr = () => {
|
|
1459
|
+
if (he.value.length === 0) return;
|
|
1460
|
+
let e = "邮箱,问卷链接,Token\n" + he.value.map((e) => `${e.email},${e.url},${e.token}`).join("\n"), t = new Blob([e], { type: "text/csv;charset=utf-8" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1461
|
+
r.href = n, r.download = `${j.value || "问卷"}_分发列表.csv`, r.click(), URL.revokeObjectURL(n), k.success("已下载分发列表");
|
|
1462
|
+
}, fr = () => {
|
|
1463
|
+
R.value && u.push(`/questionnaire-stats/${R.value}`);
|
|
1464
|
+
}, pr = () => {
|
|
1465
|
+
R.value && u.push(`/questionnaire-responses/${R.value}`);
|
|
1466
|
+
}, mr = (e) => {
|
|
1467
|
+
De.value = e, ke.value = I.value[e].type, Te.value = "", Ee.value = [], Ce.value = !0;
|
|
1468
|
+
}, hr = (e, t) => {
|
|
1469
|
+
Ee.value = t;
|
|
1470
|
+
}, gr = async () => {
|
|
1471
|
+
if (!Te.value.trim()) {
|
|
1472
|
+
k.warning("请输入生成要求");
|
|
1290
1473
|
return;
|
|
1291
1474
|
}
|
|
1292
|
-
|
|
1475
|
+
we.value = !0;
|
|
1293
1476
|
try {
|
|
1294
1477
|
await new Promise((e) => setTimeout(e, 1500));
|
|
1295
|
-
let e =
|
|
1296
|
-
r && (r.title = n.title, r.referenceAnswer = n.referenceAnswer, r.scoringCriteria = n.scoringCriteria, n.options && r.options && (r.options = n.options), n.placeholder !== void 0 && (r.placeholder = n.placeholder), n.description && (r.description = n.description)),
|
|
1478
|
+
let e = ke.value, t = Te.value, n = _r(e, t), r = I.value[De.value];
|
|
1479
|
+
r && (r.title = n.title, r.referenceAnswer = n.referenceAnswer, r.scoringCriteria = n.scoringCriteria, n.options && r.options && (r.options = n.options), n.placeholder !== void 0 && (r.placeholder = n.placeholder), n.description && (r.description = n.description)), Ce.value = !1, k.success("题目已生成");
|
|
1297
1480
|
} catch (e) {
|
|
1298
|
-
|
|
1481
|
+
k.error("生成失败: " + e.message);
|
|
1299
1482
|
} finally {
|
|
1300
|
-
|
|
1483
|
+
we.value = !1;
|
|
1301
1484
|
}
|
|
1302
|
-
},
|
|
1485
|
+
}, _r = (e, t) => {
|
|
1303
1486
|
let n = {
|
|
1304
1487
|
text: {
|
|
1305
1488
|
title: "请简述JavaScript中let和const的区别",
|
|
@@ -1370,19 +1553,19 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1370
1553
|
}
|
|
1371
1554
|
};
|
|
1372
1555
|
return n[e] || n.text;
|
|
1373
|
-
},
|
|
1374
|
-
|
|
1375
|
-
},
|
|
1376
|
-
|
|
1556
|
+
}, vr = () => {
|
|
1557
|
+
ge.value = !0, ve.value = "";
|
|
1558
|
+
}, yr = async () => {
|
|
1559
|
+
_e.value = !0, ve.value = "";
|
|
1377
1560
|
try {
|
|
1378
|
-
let e = await fetch(`/api/questionnaires/responses/${
|
|
1561
|
+
let e = await fetch(`/api/questionnaires/responses/${R.value}`);
|
|
1379
1562
|
if (!e.ok) throw Error("获取回答数据失败");
|
|
1380
1563
|
let t = await e.json(), n = {
|
|
1381
1564
|
questionnaire: {
|
|
1382
|
-
id:
|
|
1383
|
-
title:
|
|
1384
|
-
description:
|
|
1385
|
-
questions:
|
|
1565
|
+
id: R.value,
|
|
1566
|
+
title: j.value,
|
|
1567
|
+
description: M.value,
|
|
1568
|
+
questions: I.value.map((e) => ({
|
|
1386
1569
|
id: e.id,
|
|
1387
1570
|
title: e.title,
|
|
1388
1571
|
type: e.type,
|
|
@@ -1393,13 +1576,13 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1393
1576
|
responses: t.responses || [],
|
|
1394
1577
|
totalResponses: t.total || 0
|
|
1395
1578
|
};
|
|
1396
|
-
await new Promise((e) => setTimeout(e, 2e3)),
|
|
1579
|
+
await new Promise((e) => setTimeout(e, 2e3)), ve.value = br(n);
|
|
1397
1580
|
} catch (e) {
|
|
1398
|
-
|
|
1581
|
+
k.error("分析失败: " + e.message);
|
|
1399
1582
|
} finally {
|
|
1400
|
-
|
|
1583
|
+
_e.value = !1;
|
|
1401
1584
|
}
|
|
1402
|
-
},
|
|
1585
|
+
}, br = (e) => {
|
|
1403
1586
|
let { questionnaire: t, responses: n, totalResponses: r } = e, i = t.questions.map((e) => {
|
|
1404
1587
|
let t = n.map((t) => {
|
|
1405
1588
|
try {
|
|
@@ -1467,7 +1650,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1467
1650
|
if (a += `
|
|
1468
1651
|
<div style="background: #fff; border: 1px solid #ebeef5; border-radius: 8px; padding: 15px; margin: 10px 0;">
|
|
1469
1652
|
<h4 style="color: #303133; margin-bottom: 10px;">${t + 1}. ${n.title || "未命名题目"}</h4>
|
|
1470
|
-
<p style="color: #909399; font-size: 12px; margin-bottom: 10px;">类型:${
|
|
1653
|
+
<p style="color: #909399; font-size: 12px; margin-bottom: 10px;">类型:${xr(n.type)} | 回答数:${r.total}</p>
|
|
1471
1654
|
`, n.type === "radio" || n.type === "select" || n.type === "checkbox") {
|
|
1472
1655
|
if (r.options) {
|
|
1473
1656
|
a += "<div style=\"margin-top: 10px;\">";
|
|
@@ -1508,7 +1691,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1508
1691
|
</div>
|
|
1509
1692
|
</div>
|
|
1510
1693
|
`, a;
|
|
1511
|
-
},
|
|
1694
|
+
}, xr = (e) => ({
|
|
1512
1695
|
text: "文本题",
|
|
1513
1696
|
radio: "单选题",
|
|
1514
1697
|
checkbox: "多选题",
|
|
@@ -1517,14 +1700,14 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1517
1700
|
scale: "量表题",
|
|
1518
1701
|
matrix: "矩阵题",
|
|
1519
1702
|
image: "图片题"
|
|
1520
|
-
})[e] || e,
|
|
1521
|
-
if (!
|
|
1703
|
+
})[e] || e, Sr = () => {
|
|
1704
|
+
if (!ve.value) return;
|
|
1522
1705
|
let e = `<!DOCTYPE html>
|
|
1523
1706
|
<html lang="zh-CN">
|
|
1524
1707
|
<head>
|
|
1525
1708
|
<meta charset="UTF-8">
|
|
1526
1709
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1527
|
-
<title>${
|
|
1710
|
+
<title>${j.value} - AI分析报告</title>
|
|
1528
1711
|
<style>
|
|
1529
1712
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
1530
1713
|
body { font-family: 'Microsoft YaHei', sans-serif; background: #f5f7fa; padding: 20px; }
|
|
@@ -1539,254 +1722,247 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1539
1722
|
</head>
|
|
1540
1723
|
<body>
|
|
1541
1724
|
<div class="container">
|
|
1542
|
-
${
|
|
1725
|
+
${ve.value}
|
|
1543
1726
|
</div>
|
|
1544
1727
|
</body>
|
|
1545
1728
|
</html>`, t = new Blob([e], { type: "text/html;charset=utf-8" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1546
|
-
r.href = n, r.download = `${
|
|
1547
|
-
},
|
|
1548
|
-
if (
|
|
1549
|
-
|
|
1729
|
+
r.href = n, r.download = `${j.value || "问卷"}_AI分析报告.html`, r.click(), URL.revokeObjectURL(n), k.success("AI分析报告已下载");
|
|
1730
|
+
}, Cr = async () => {
|
|
1731
|
+
if (D.value) {
|
|
1732
|
+
R.value = Number(D.value);
|
|
1550
1733
|
try {
|
|
1551
|
-
let e
|
|
1552
|
-
|
|
1553
|
-
let t = await e.json();
|
|
1554
|
-
h.value = t.title, T.value = t.description || "", D.value = t.author || "", j.value = t.status || "draft", M.value = t.begin_time ? new Date(t.begin_time) : null, re.value = t.end_time ? new Date(t.end_time) : null, t.collab_closed && (H.value = !0), t.config && Un(t.config);
|
|
1734
|
+
let e;
|
|
1735
|
+
e = typeof h.loadApi == "function" ? (await h.loadApi(D.value)).data : h.loadApi ? (await A.get(`${h.loadApi}/${D.value}`)).data : (await ie.value.get(D.value)).data, j.value = e.title, M.value = e.description || "", N.value = e.author || h.user?.name || "", P.value = e.status || "draft", F.value = e.begin_time ? new Date(e.begin_time) : null, ae.value = e.end_time ? new Date(e.end_time) : null, e.collab_closed && (U.value = !0), e.config && Qn(e.config);
|
|
1555
1736
|
} catch (e) {
|
|
1556
|
-
|
|
1737
|
+
k.error("加载问卷失败: " + e.message);
|
|
1557
1738
|
}
|
|
1558
1739
|
}
|
|
1559
|
-
},
|
|
1560
|
-
if (!
|
|
1561
|
-
|
|
1740
|
+
}, wr = () => {
|
|
1741
|
+
if (!R.value) {
|
|
1742
|
+
k.warning("请先保存问卷");
|
|
1562
1743
|
return;
|
|
1563
1744
|
}
|
|
1564
|
-
|
|
1565
|
-
},
|
|
1745
|
+
xe.value = !0;
|
|
1746
|
+
}, Tr = (e) => {
|
|
1566
1747
|
try {
|
|
1567
1748
|
let t = JSON.parse(e);
|
|
1568
|
-
t.title && (
|
|
1749
|
+
t.title && (j.value = t.title), t.description && (M.value = t.description), t.author && (N.value = t.author), t.questions && (I.value = t.questions), t.settings && t.settings.showScore !== void 0 && (le.value = t.settings.showScore);
|
|
1569
1750
|
} catch (e) {
|
|
1570
1751
|
console.error("Version apply error:", e);
|
|
1571
1752
|
}
|
|
1572
|
-
},
|
|
1573
|
-
if (
|
|
1574
|
-
let e =
|
|
1575
|
-
if (
|
|
1576
|
-
|
|
1753
|
+
}, Er = async () => {
|
|
1754
|
+
if (H.value) {
|
|
1755
|
+
let e = W?.getMap("_meta");
|
|
1756
|
+
if (U.value || e?.get("_closed") === !0) {
|
|
1757
|
+
U.value = !0, k.error("协作已关闭,无法保存更新");
|
|
1577
1758
|
return;
|
|
1578
1759
|
}
|
|
1579
1760
|
}
|
|
1580
|
-
if (
|
|
1581
|
-
|
|
1761
|
+
if (I.value.length > 0 && I.value.find((e) => !e.referenceAnswer || e.referenceAnswer.trim() === "" || !e.scoringCriteria || e.scoringCriteria.trim() === "")) {
|
|
1762
|
+
k.error("请为所有题目填写参考答案和评分标准说明");
|
|
1582
1763
|
return;
|
|
1583
1764
|
}
|
|
1584
1765
|
let e = {
|
|
1585
|
-
title:
|
|
1586
|
-
description:
|
|
1587
|
-
author:
|
|
1588
|
-
config:
|
|
1589
|
-
status:
|
|
1590
|
-
begin_time:
|
|
1591
|
-
end_time:
|
|
1592
|
-
...
|
|
1766
|
+
title: j.value,
|
|
1767
|
+
description: M.value,
|
|
1768
|
+
author: N.value || h.user?.name || "user",
|
|
1769
|
+
config: Zn(),
|
|
1770
|
+
status: P.value,
|
|
1771
|
+
begin_time: F.value,
|
|
1772
|
+
end_time: ae.value,
|
|
1773
|
+
...H.value ? { is_collab_user: !0 } : {}
|
|
1593
1774
|
};
|
|
1594
1775
|
try {
|
|
1595
|
-
let t
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1776
|
+
let t = D.value, n = typeof h.saveApi == "function" ? h.saveApi : h.saveApi ? (e) => {
|
|
1777
|
+
let n = t ? `${h.saveApi}/${t}` : h.saveApi;
|
|
1778
|
+
return t ? A.put(n, e) : A.post(n, e);
|
|
1779
|
+
} : null;
|
|
1780
|
+
if (n) {
|
|
1781
|
+
let r = await n(e, t);
|
|
1782
|
+
R.value || (R.value = r.data?.id, h.docId || u.replace(`/questionnaire-editor/${r.data?.id}`));
|
|
1783
|
+
} else if (t) {
|
|
1784
|
+
let n = await ie.value.update(t, e);
|
|
1785
|
+
R.value || (R.value = n.data?.id || t, h.docId || u.replace(`/questionnaire-editor/${R.value}`));
|
|
1786
|
+
} else {
|
|
1787
|
+
let t = await ie.value.create(e);
|
|
1788
|
+
R.value = t.data.id, h.docId || u.replace(`/questionnaire-editor/${t.data.id}`);
|
|
1607
1789
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
L.value || (L.value = n.id, u.replace(`/questionnaire-editor/${n.id}`)), A.success("保存成功"), he({
|
|
1611
|
-
documentId: L.value,
|
|
1790
|
+
k.success("保存成功"), Se({
|
|
1791
|
+
documentId: R.value,
|
|
1612
1792
|
docType: "questionnaire",
|
|
1613
1793
|
content: JSON.stringify({
|
|
1614
|
-
title:
|
|
1615
|
-
description:
|
|
1616
|
-
author:
|
|
1617
|
-
questions:
|
|
1618
|
-
settings: { showScore:
|
|
1794
|
+
title: j.value,
|
|
1795
|
+
description: M.value,
|
|
1796
|
+
author: N.value || h.user?.name || "user",
|
|
1797
|
+
questions: I.value,
|
|
1798
|
+
settings: { showScore: le.value }
|
|
1619
1799
|
}),
|
|
1620
|
-
userId: String(
|
|
1621
|
-
userName:
|
|
1800
|
+
userId: String(B.currentUser.value?.id || ""),
|
|
1801
|
+
userName: B.currentUser.value?.name || N.value || "未知"
|
|
1622
1802
|
});
|
|
1623
1803
|
} catch (e) {
|
|
1624
|
-
|
|
1804
|
+
k.error("保存失败: " + (e.message || e));
|
|
1625
1805
|
}
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
"根据问卷主题,我建议添加一些开放式问题,收集更详细的用户反馈。",
|
|
1630
|
-
"我可以帮您检查问卷中是否存在引导性问题或歧义表述。需要我逐题分析吗?",
|
|
1631
|
-
"建议为每个题目添加选项\"其他\"和\"不确定\",提高数据的完整性。",
|
|
1632
|
-
"问卷的题量适中。如果题目较多,建议分页展示,减少受访者的疲劳感。",
|
|
1633
|
-
"我可以帮您分析问卷的逻辑跳转设置是否合理,确保不同分支的题目正确显示。",
|
|
1634
|
-
"建议在问卷开头添加简短的说明文字,告知受访者问卷的目的和预计填写时间。"
|
|
1635
|
-
], br = async (e, t = {}) => {
|
|
1636
|
-
let n = L.value ? `${_n}-${L.value}` : null;
|
|
1637
|
-
await z.sendMessage(e, {
|
|
1806
|
+
}, Dr = () => u.push("/"), Or = async (e, t = {}) => {
|
|
1807
|
+
let n = R.value ? `${Tn}-${R.value}` : null;
|
|
1808
|
+
await B.sendMessage(e, {
|
|
1638
1809
|
...t,
|
|
1639
1810
|
roomId: n
|
|
1640
1811
|
});
|
|
1641
|
-
let r = t.mentionedUser, i = r && r.toLowerCase().includes("ai"), a =
|
|
1642
|
-
(!r || i || a.length === 0)
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1812
|
+
let r = t.mentionedUser, i = r && r.toLowerCase().includes("ai"), a = B.collabUsers.value.filter((e) => e.name !== B.currentUser.value.name);
|
|
1813
|
+
if (!r || i || a.length === 0) {
|
|
1814
|
+
B.loading.value = !0;
|
|
1815
|
+
let t = await be.chat(e, B.messages.value);
|
|
1816
|
+
B.sendAiMessage(t, n), B.loading.value = !1;
|
|
1817
|
+
}
|
|
1818
|
+
}, kr = () => {
|
|
1819
|
+
let e = R.value ? `${Tn}-${R.value}` : null;
|
|
1820
|
+
B.clearMessages(e);
|
|
1648
1821
|
};
|
|
1649
1822
|
return m(() => {
|
|
1650
|
-
|
|
1651
|
-
if (
|
|
1652
|
-
|
|
1823
|
+
Cr().then(() => {
|
|
1824
|
+
if (R.value) {
|
|
1825
|
+
kn();
|
|
1653
1826
|
let e = new URLSearchParams(window.location.search);
|
|
1654
|
-
e.get("collab") === "1" &&
|
|
1827
|
+
e.get("collab") === "1" && In(), e.get("ai") === "1" && (ge.value = !0);
|
|
1655
1828
|
}
|
|
1656
1829
|
});
|
|
1657
1830
|
}), p(() => {
|
|
1658
|
-
|
|
1831
|
+
jn(), G && (G.disconnect(), G.destroy()), W && W.destroy();
|
|
1659
1832
|
}), (t, c) => {
|
|
1660
|
-
let l = b("ArrowLeft"), u = b("el-icon"), p = b("el-button"), m = b("el-input"),
|
|
1833
|
+
let l = b("ArrowLeft"), u = b("el-icon"), p = b("el-button"), m = b("el-input"), h = b("el-option"), _ = b("el-select"), v = b("el-date-picker"), C = b("el-divider"), D = b("Download"), O = b("Upload"), ee = b("Printer"), k = b("ArrowDown"), te = b("el-dropdown-item"), A = b("el-dropdown-menu"), ne = b("el-dropdown"), re = b("Share"), ie = b("Link"), oe = b("Promotion"), se = b("Message"), L = b("Cpu"), be = b("DataAnalysis"), Se = b("List"), De = b("Monitor"), je = b("Check"), Pe = b("Clock"), Fe = b("Setting"), U = b("el-color-picker"), Ie = b("el-slider"), W = b("el-radio-button"), G = b("el-radio-group"), K = b("el-popover"), Re = b("el-input-number"), q = b("el-switch"), J = b("Delete"), Y = b("Top"), ze = b("Bottom"), Tn = b("PictureFilled"), X = b("el-upload"), Z = b("Close"), En = b("el-radio"), Q = b("Plus"), Dn = b("el-checkbox"), On = b("el-tag"), kn = b("StarFilled"), An = b("Switch"), jn = b("ArrowRight"), Mn = b("Trophy"), Nn = b("Document"), Pn = b("Edit"), In = b("Select"), Ln = b("Finished"), $ = b("Histogram"), Rn = b("Grid"), zn = b("el-dialog"), Bn = b("Loading"), Vn = b("el-table-column"), Zn = b("el-link"), Qn = b("el-table");
|
|
1661
1834
|
return g(), i(e, null, [
|
|
1662
|
-
a("div",
|
|
1663
|
-
|
|
1664
|
-
|
|
1835
|
+
a("div", Be, [a("div", Ve, [a("div", He, [
|
|
1836
|
+
T.value.backButton === "hide" ? r("", !0) : (g(), n(p, {
|
|
1837
|
+
key: 0,
|
|
1838
|
+
onClick: Dr,
|
|
1665
1839
|
size: "small",
|
|
1666
|
-
circle: ""
|
|
1840
|
+
circle: "",
|
|
1841
|
+
disabled: T.value.backButton === "disable"
|
|
1667
1842
|
}, {
|
|
1668
1843
|
default: w(() => [s(u, null, {
|
|
1669
1844
|
default: w(() => [s(l)]),
|
|
1670
1845
|
_: 1
|
|
1671
1846
|
})]),
|
|
1672
1847
|
_: 1
|
|
1673
|
-
}),
|
|
1848
|
+
}, 8, ["disabled"])),
|
|
1674
1849
|
s(m, {
|
|
1675
|
-
modelValue:
|
|
1676
|
-
"onUpdate:modelValue": c[0] ||= (e) =>
|
|
1850
|
+
modelValue: j.value,
|
|
1851
|
+
"onUpdate:modelValue": c[0] ||= (e) => j.value = e,
|
|
1677
1852
|
class: "title-input",
|
|
1678
1853
|
placeholder: "问卷标题 *",
|
|
1679
1854
|
size: "small",
|
|
1680
1855
|
style: { width: "200px" },
|
|
1681
|
-
disabled:
|
|
1856
|
+
disabled: H.value || !T.value.titleEditable
|
|
1682
1857
|
}, null, 8, ["modelValue", "disabled"]),
|
|
1683
1858
|
s(m, {
|
|
1684
|
-
modelValue:
|
|
1685
|
-
"onUpdate:modelValue": c[1] ||= (e) =>
|
|
1859
|
+
modelValue: N.value,
|
|
1860
|
+
"onUpdate:modelValue": c[1] ||= (e) => N.value = e,
|
|
1686
1861
|
class: "author-input",
|
|
1687
1862
|
placeholder: "作者 *",
|
|
1688
1863
|
size: "small",
|
|
1689
|
-
style: { width: "140px" }
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1864
|
+
style: { width: "140px" },
|
|
1865
|
+
disabled: !T.value.authorEditable
|
|
1866
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
1867
|
+
]), a("div", Ue, [
|
|
1868
|
+
H.value ? r("", !0) : (g(), n(_, {
|
|
1693
1869
|
key: 0,
|
|
1694
|
-
modelValue:
|
|
1695
|
-
"onUpdate:modelValue": c[2] ||= (e) =>
|
|
1870
|
+
modelValue: P.value,
|
|
1871
|
+
"onUpdate:modelValue": c[2] ||= (e) => P.value = e,
|
|
1696
1872
|
size: "small",
|
|
1697
1873
|
style: { width: "90px" }
|
|
1698
1874
|
}, {
|
|
1699
1875
|
default: w(() => [
|
|
1700
|
-
s(
|
|
1876
|
+
s(h, {
|
|
1701
1877
|
label: "草稿",
|
|
1702
1878
|
value: "draft"
|
|
1703
1879
|
}),
|
|
1704
|
-
s(
|
|
1880
|
+
s(h, {
|
|
1705
1881
|
label: "已发布",
|
|
1706
1882
|
value: "published"
|
|
1707
1883
|
}),
|
|
1708
|
-
s(
|
|
1884
|
+
s(h, {
|
|
1709
1885
|
label: "已关闭",
|
|
1710
1886
|
value: "closed"
|
|
1711
1887
|
})
|
|
1712
1888
|
]),
|
|
1713
1889
|
_: 1
|
|
1714
1890
|
}, 8, ["modelValue"])),
|
|
1715
|
-
|
|
1891
|
+
H.value ? r("", !0) : (g(), n(v, {
|
|
1716
1892
|
key: 1,
|
|
1717
|
-
modelValue:
|
|
1718
|
-
"onUpdate:modelValue": c[3] ||= (e) =>
|
|
1893
|
+
modelValue: F.value,
|
|
1894
|
+
"onUpdate:modelValue": c[3] ||= (e) => F.value = e,
|
|
1719
1895
|
type: "datetime",
|
|
1720
1896
|
size: "small",
|
|
1721
1897
|
placeholder: "开始时间",
|
|
1722
1898
|
style: { width: "170px" }
|
|
1723
1899
|
}, null, 8, ["modelValue"])),
|
|
1724
|
-
|
|
1900
|
+
H.value ? r("", !0) : (g(), n(v, {
|
|
1725
1901
|
key: 2,
|
|
1726
|
-
modelValue:
|
|
1727
|
-
"onUpdate:modelValue": c[4] ||= (e) =>
|
|
1902
|
+
modelValue: ae.value,
|
|
1903
|
+
"onUpdate:modelValue": c[4] ||= (e) => ae.value = e,
|
|
1728
1904
|
type: "datetime",
|
|
1729
1905
|
size: "small",
|
|
1730
1906
|
placeholder: "结束时间",
|
|
1731
1907
|
style: { width: "170px" }
|
|
1732
1908
|
}, null, 8, ["modelValue"])),
|
|
1733
|
-
s(
|
|
1734
|
-
|
|
1909
|
+
s(C, { direction: "vertical" }),
|
|
1910
|
+
H.value ? r("", !0) : (g(), n(p, {
|
|
1735
1911
|
key: 3,
|
|
1736
1912
|
size: "small",
|
|
1737
|
-
onClick:
|
|
1913
|
+
onClick: $n,
|
|
1738
1914
|
title: "导出JSON"
|
|
1739
1915
|
}, {
|
|
1740
1916
|
default: w(() => [s(u, null, {
|
|
1741
|
-
default: w(() => [s(
|
|
1917
|
+
default: w(() => [s(D)]),
|
|
1742
1918
|
_: 1
|
|
1743
1919
|
})]),
|
|
1744
1920
|
_: 1
|
|
1745
1921
|
})),
|
|
1746
|
-
|
|
1922
|
+
H.value ? r("", !0) : (g(), n(p, {
|
|
1747
1923
|
key: 4,
|
|
1748
1924
|
size: "small",
|
|
1749
|
-
onClick:
|
|
1925
|
+
onClick: er,
|
|
1750
1926
|
title: "导入JSON"
|
|
1751
1927
|
}, {
|
|
1752
1928
|
default: w(() => [s(u, null, {
|
|
1753
|
-
default: w(() => [s(
|
|
1929
|
+
default: w(() => [s(O)]),
|
|
1754
1930
|
_: 1
|
|
1755
1931
|
})]),
|
|
1756
1932
|
_: 1
|
|
1757
1933
|
})),
|
|
1758
1934
|
a("input", {
|
|
1759
1935
|
ref_key: "importInputRef",
|
|
1760
|
-
ref:
|
|
1936
|
+
ref: fe,
|
|
1761
1937
|
type: "file",
|
|
1762
1938
|
accept: ".json",
|
|
1763
1939
|
style: { display: "none" },
|
|
1764
|
-
onChange:
|
|
1940
|
+
onChange: tr
|
|
1765
1941
|
}, null, 544),
|
|
1766
|
-
|
|
1942
|
+
H.value ? r("", !0) : (g(), n(C, {
|
|
1767
1943
|
key: 5,
|
|
1768
1944
|
direction: "vertical"
|
|
1769
1945
|
})),
|
|
1770
|
-
|
|
1946
|
+
H.value ? r("", !0) : (g(), n(ne, {
|
|
1771
1947
|
key: 6,
|
|
1772
1948
|
trigger: "click",
|
|
1773
|
-
onCommand:
|
|
1949
|
+
onCommand: nr
|
|
1774
1950
|
}, {
|
|
1775
|
-
dropdown: w(() => [s(
|
|
1951
|
+
dropdown: w(() => [s(A, null, {
|
|
1776
1952
|
default: w(() => [
|
|
1777
|
-
s(
|
|
1953
|
+
s(te, { command: "pdf" }, {
|
|
1778
1954
|
default: w(() => [...c[47] ||= [o("导出 PDF", -1)]]),
|
|
1779
1955
|
_: 1
|
|
1780
1956
|
}),
|
|
1781
|
-
s(
|
|
1957
|
+
s(te, { command: "word" }, {
|
|
1782
1958
|
default: w(() => [...c[48] ||= [o("导出 Word", -1)]]),
|
|
1783
1959
|
_: 1
|
|
1784
1960
|
}),
|
|
1785
|
-
s(
|
|
1961
|
+
s(te, { command: "html" }, {
|
|
1786
1962
|
default: w(() => [...c[49] ||= [o("导出 HTML", -1)]]),
|
|
1787
1963
|
_: 1
|
|
1788
1964
|
}),
|
|
1789
|
-
s(
|
|
1965
|
+
s(te, { command: "standalone" }, {
|
|
1790
1966
|
default: w(() => [...c[50] ||= [o("独立 HTML 表单", -1)]]),
|
|
1791
1967
|
_: 1
|
|
1792
1968
|
})
|
|
@@ -1801,7 +1977,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1801
1977
|
}),
|
|
1802
1978
|
c[46] ||= o(" 导出 ", -1),
|
|
1803
1979
|
s(u, { class: "el-icon--right" }, {
|
|
1804
|
-
default: w(() => [s(
|
|
1980
|
+
default: w(() => [s(k)]),
|
|
1805
1981
|
_: 1
|
|
1806
1982
|
})
|
|
1807
1983
|
]),
|
|
@@ -1809,93 +1985,93 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1809
1985
|
})]),
|
|
1810
1986
|
_: 1
|
|
1811
1987
|
})),
|
|
1812
|
-
|
|
1988
|
+
H.value ? r("", !0) : (g(), n(C, {
|
|
1813
1989
|
key: 7,
|
|
1814
1990
|
direction: "vertical"
|
|
1815
1991
|
})),
|
|
1816
|
-
|
|
1992
|
+
H.value ? r("", !0) : (g(), n(p, {
|
|
1817
1993
|
key: 8,
|
|
1818
1994
|
size: "small",
|
|
1819
|
-
type:
|
|
1820
|
-
onClick:
|
|
1995
|
+
type: V.value ? "success" : "default",
|
|
1996
|
+
onClick: Fn
|
|
1821
1997
|
}, {
|
|
1822
1998
|
default: w(() => [s(u, null, {
|
|
1823
|
-
default: w(() => [s(
|
|
1999
|
+
default: w(() => [s(re)]),
|
|
1824
2000
|
_: 1
|
|
1825
|
-
}), a("span", null, x(
|
|
2001
|
+
}), a("span", null, x(V.value ? "协作中" : "协作"), 1)]),
|
|
1826
2002
|
_: 1
|
|
1827
2003
|
}, 8, ["type"])),
|
|
1828
|
-
|
|
2004
|
+
R.value && V.value && !H.value ? (g(), n(p, {
|
|
1829
2005
|
key: 9,
|
|
1830
2006
|
size: "small",
|
|
1831
2007
|
circle: "",
|
|
1832
|
-
onClick:
|
|
2008
|
+
onClick: ar,
|
|
1833
2009
|
title: "分享协作编辑链接"
|
|
1834
2010
|
}, {
|
|
1835
2011
|
default: w(() => [s(u, null, {
|
|
1836
|
-
default: w(() => [s(
|
|
2012
|
+
default: w(() => [s(ie)]),
|
|
1837
2013
|
_: 1
|
|
1838
2014
|
})]),
|
|
1839
2015
|
_: 1
|
|
1840
2016
|
})) : r("", !0),
|
|
1841
|
-
|
|
2017
|
+
R.value && !H.value ? (g(), n(p, {
|
|
1842
2018
|
key: 10,
|
|
1843
2019
|
size: "small",
|
|
1844
2020
|
circle: "",
|
|
1845
|
-
onClick:
|
|
2021
|
+
onClick: or,
|
|
1846
2022
|
title: "分享填写链接"
|
|
1847
2023
|
}, {
|
|
1848
2024
|
default: w(() => [s(u, null, {
|
|
1849
|
-
default: w(() => [s(
|
|
2025
|
+
default: w(() => [s(oe)]),
|
|
1850
2026
|
_: 1
|
|
1851
2027
|
})]),
|
|
1852
2028
|
_: 1
|
|
1853
2029
|
})) : r("", !0),
|
|
1854
|
-
|
|
2030
|
+
R.value && !H.value ? (g(), n(p, {
|
|
1855
2031
|
key: 11,
|
|
1856
2032
|
size: "small",
|
|
1857
2033
|
type: "warning",
|
|
1858
|
-
onClick: c[5] ||= (e) =>
|
|
2034
|
+
onClick: c[5] ||= (e) => pe.value = !0,
|
|
1859
2035
|
title: "问卷分发"
|
|
1860
2036
|
}, {
|
|
1861
2037
|
default: w(() => [s(u, null, {
|
|
1862
|
-
default: w(() => [s(
|
|
2038
|
+
default: w(() => [s(se)]),
|
|
1863
2039
|
_: 1
|
|
1864
2040
|
}), c[51] ||= o(" 分发 ", -1)]),
|
|
1865
2041
|
_: 1
|
|
1866
2042
|
})) : r("", !0),
|
|
1867
|
-
|
|
2043
|
+
R.value && !H.value ? (g(), n(p, {
|
|
1868
2044
|
key: 12,
|
|
1869
2045
|
size: "small",
|
|
1870
|
-
onClick:
|
|
2046
|
+
onClick: vr,
|
|
1871
2047
|
title: "AI分析"
|
|
1872
2048
|
}, {
|
|
1873
2049
|
default: w(() => [s(u, null, {
|
|
1874
|
-
default: w(() => [s(
|
|
2050
|
+
default: w(() => [s(L)]),
|
|
1875
2051
|
_: 1
|
|
1876
2052
|
}), c[52] ||= a("span", null, "AI", -1)]),
|
|
1877
2053
|
_: 1
|
|
1878
2054
|
})) : r("", !0),
|
|
1879
|
-
|
|
2055
|
+
R.value && !H.value ? (g(), n(p, {
|
|
1880
2056
|
key: 13,
|
|
1881
2057
|
size: "small",
|
|
1882
|
-
onClick:
|
|
2058
|
+
onClick: fr,
|
|
1883
2059
|
title: "查看统计"
|
|
1884
2060
|
}, {
|
|
1885
2061
|
default: w(() => [s(u, null, {
|
|
1886
|
-
default: w(() => [s(
|
|
2062
|
+
default: w(() => [s(be)]),
|
|
1887
2063
|
_: 1
|
|
1888
2064
|
})]),
|
|
1889
2065
|
_: 1
|
|
1890
2066
|
})) : r("", !0),
|
|
1891
|
-
|
|
2067
|
+
R.value && !H.value ? (g(), n(p, {
|
|
1892
2068
|
key: 14,
|
|
1893
2069
|
size: "small",
|
|
1894
|
-
onClick:
|
|
2070
|
+
onClick: pr,
|
|
1895
2071
|
title: "反馈列表"
|
|
1896
2072
|
}, {
|
|
1897
2073
|
default: w(() => [s(u, null, {
|
|
1898
|
-
default: w(() => [s(
|
|
2074
|
+
default: w(() => [s(Se)]),
|
|
1899
2075
|
_: 1
|
|
1900
2076
|
})]),
|
|
1901
2077
|
_: 1
|
|
@@ -1903,12 +2079,12 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1903
2079
|
s(p, {
|
|
1904
2080
|
size: "small",
|
|
1905
2081
|
circle: "",
|
|
1906
|
-
type:
|
|
1907
|
-
onClick: c[6] ||= (e) =>
|
|
2082
|
+
type: ye.value ? "primary" : "default",
|
|
2083
|
+
onClick: c[6] ||= (e) => ye.value = !ye.value,
|
|
1908
2084
|
title: "AI助手"
|
|
1909
2085
|
}, {
|
|
1910
2086
|
default: w(() => [s(u, null, {
|
|
1911
|
-
default: w(() => [s(
|
|
2087
|
+
default: w(() => [s(De)]),
|
|
1912
2088
|
_: 1
|
|
1913
2089
|
})]),
|
|
1914
2090
|
_: 1
|
|
@@ -1916,54 +2092,54 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1916
2092
|
s(p, {
|
|
1917
2093
|
size: "small",
|
|
1918
2094
|
type: "primary",
|
|
1919
|
-
onClick:
|
|
2095
|
+
onClick: Er
|
|
1920
2096
|
}, {
|
|
1921
2097
|
default: w(() => [s(u, null, {
|
|
1922
|
-
default: w(() => [s(
|
|
2098
|
+
default: w(() => [s(je)]),
|
|
1923
2099
|
_: 1
|
|
1924
2100
|
}), c[53] ||= o(" 保存", -1)]),
|
|
1925
2101
|
_: 1
|
|
1926
2102
|
}),
|
|
1927
|
-
|
|
2103
|
+
R.value ? (g(), n(p, {
|
|
1928
2104
|
key: 15,
|
|
1929
2105
|
size: "small",
|
|
1930
2106
|
circle: "",
|
|
1931
2107
|
title: "更新履历",
|
|
1932
|
-
onClick:
|
|
2108
|
+
onClick: wr
|
|
1933
2109
|
}, {
|
|
1934
2110
|
default: w(() => [s(u, null, {
|
|
1935
|
-
default: w(() => [s(
|
|
2111
|
+
default: w(() => [s(Pe)]),
|
|
1936
2112
|
_: 1
|
|
1937
2113
|
})]),
|
|
1938
2114
|
_: 1
|
|
1939
2115
|
})) : r("", !0)
|
|
1940
|
-
])]), a("div",
|
|
2116
|
+
])]), a("div", We, [a("div", Ge, [
|
|
1941
2117
|
a("div", {
|
|
1942
2118
|
class: "q-header-card",
|
|
1943
2119
|
style: f({
|
|
1944
|
-
background:
|
|
1945
|
-
"--header-font":
|
|
1946
|
-
"--header-font-size":
|
|
1947
|
-
"--header-font-style":
|
|
1948
|
-
"--header-color":
|
|
1949
|
-
"--title-align":
|
|
1950
|
-
"--title-font":
|
|
1951
|
-
"--title-font-style":
|
|
1952
|
-
"--title-font-size":
|
|
1953
|
-
"--title-color":
|
|
1954
|
-
"--desc-align":
|
|
1955
|
-
"--desc-font":
|
|
1956
|
-
"--desc-font-style":
|
|
1957
|
-
"--desc-font-size":
|
|
1958
|
-
"--desc-color":
|
|
2120
|
+
background: z.backgroundColor,
|
|
2121
|
+
"--header-font": z.headerFont,
|
|
2122
|
+
"--header-font-size": z.headerFontSize + "px",
|
|
2123
|
+
"--header-font-style": z.headerFontStyle,
|
|
2124
|
+
"--header-color": z.headerColor,
|
|
2125
|
+
"--title-align": z.titleAlign,
|
|
2126
|
+
"--title-font": z.titleFont,
|
|
2127
|
+
"--title-font-style": z.titleFontStyle,
|
|
2128
|
+
"--title-font-size": z.titleFontSize + "px",
|
|
2129
|
+
"--title-color": z.titleColor,
|
|
2130
|
+
"--desc-align": z.descAlign,
|
|
2131
|
+
"--desc-font": z.descFont,
|
|
2132
|
+
"--desc-font-style": z.descFontStyle,
|
|
2133
|
+
"--desc-font-size": z.descFontSize + "px",
|
|
2134
|
+
"--desc-color": z.descColor
|
|
1959
2135
|
})
|
|
1960
2136
|
}, [
|
|
1961
|
-
a("div",
|
|
1962
|
-
modelValue:
|
|
1963
|
-
"onUpdate:modelValue": c[7] ||= (e) =>
|
|
2137
|
+
a("div", Ke, [s(m, {
|
|
2138
|
+
modelValue: j.value,
|
|
2139
|
+
"onUpdate:modelValue": c[7] ||= (e) => j.value = e,
|
|
1964
2140
|
placeholder: "请输入问卷标题",
|
|
1965
2141
|
class: "q-title-input"
|
|
1966
|
-
}, null, 8, ["modelValue"]), s(
|
|
2142
|
+
}, null, 8, ["modelValue"]), s(K, {
|
|
1967
2143
|
placement: "right",
|
|
1968
2144
|
width: 320,
|
|
1969
2145
|
trigger: "click"
|
|
@@ -1974,286 +2150,286 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
1974
2150
|
class: "q-header-setting-btn"
|
|
1975
2151
|
}, {
|
|
1976
2152
|
default: w(() => [s(u, null, {
|
|
1977
|
-
default: w(() => [s(
|
|
2153
|
+
default: w(() => [s(Fe)]),
|
|
1978
2154
|
_: 1
|
|
1979
2155
|
})]),
|
|
1980
2156
|
_: 1
|
|
1981
2157
|
})]),
|
|
1982
|
-
default: w(() => [a("div",
|
|
1983
|
-
a("div",
|
|
1984
|
-
modelValue:
|
|
1985
|
-
"onUpdate:modelValue": c[8] ||= (e) =>
|
|
2158
|
+
default: w(() => [a("div", qe, [
|
|
2159
|
+
a("div", Je, [c[54] ||= a("span", { class: "q-settings-label" }, "背景颜色", -1), s(U, {
|
|
2160
|
+
modelValue: z.backgroundColor,
|
|
2161
|
+
"onUpdate:modelValue": c[8] ||= (e) => z.backgroundColor = e,
|
|
1986
2162
|
size: "small"
|
|
1987
2163
|
}, null, 8, ["modelValue"])]),
|
|
1988
|
-
a("div",
|
|
1989
|
-
modelValue:
|
|
1990
|
-
"onUpdate:modelValue": c[9] ||= (e) =>
|
|
2164
|
+
a("div", Ye, [c[55] ||= a("span", { class: "q-settings-label" }, "字体", -1), s(_, {
|
|
2165
|
+
modelValue: z.headerFont,
|
|
2166
|
+
"onUpdate:modelValue": c[9] ||= (e) => z.headerFont = e,
|
|
1991
2167
|
size: "small",
|
|
1992
2168
|
style: { width: "120px" }
|
|
1993
2169
|
}, {
|
|
1994
2170
|
default: w(() => [
|
|
1995
|
-
s(
|
|
2171
|
+
s(h, {
|
|
1996
2172
|
label: "默认",
|
|
1997
2173
|
value: "inherit"
|
|
1998
2174
|
}),
|
|
1999
|
-
s(
|
|
2175
|
+
s(h, {
|
|
2000
2176
|
label: "宋体",
|
|
2001
2177
|
value: "SimSun, serif"
|
|
2002
2178
|
}),
|
|
2003
|
-
s(
|
|
2179
|
+
s(h, {
|
|
2004
2180
|
label: "黑体",
|
|
2005
2181
|
value: "SimHei, sans-serif"
|
|
2006
2182
|
}),
|
|
2007
|
-
s(
|
|
2183
|
+
s(h, {
|
|
2008
2184
|
label: "微软雅黑",
|
|
2009
2185
|
value: "Microsoft YaHei, sans-serif"
|
|
2010
2186
|
}),
|
|
2011
|
-
s(
|
|
2187
|
+
s(h, {
|
|
2012
2188
|
label: "楷体",
|
|
2013
2189
|
value: "KaiTi, serif"
|
|
2014
2190
|
}),
|
|
2015
|
-
s(
|
|
2191
|
+
s(h, {
|
|
2016
2192
|
label: "Arial",
|
|
2017
2193
|
value: "Arial, sans-serif"
|
|
2018
2194
|
}),
|
|
2019
|
-
s(
|
|
2195
|
+
s(h, {
|
|
2020
2196
|
label: "Times New Roman",
|
|
2021
2197
|
value: "Times New Roman, serif"
|
|
2022
2198
|
})
|
|
2023
2199
|
]),
|
|
2024
2200
|
_: 1
|
|
2025
2201
|
}, 8, ["modelValue"])]),
|
|
2026
|
-
a("div",
|
|
2027
|
-
modelValue:
|
|
2028
|
-
"onUpdate:modelValue": c[10] ||= (e) =>
|
|
2202
|
+
a("div", Xe, [c[56] ||= a("span", { class: "q-settings-label" }, "字号", -1), s(Ie, {
|
|
2203
|
+
modelValue: z.headerFontSize,
|
|
2204
|
+
"onUpdate:modelValue": c[10] ||= (e) => z.headerFontSize = e,
|
|
2029
2205
|
min: 10,
|
|
2030
2206
|
max: 24,
|
|
2031
2207
|
step: 1,
|
|
2032
2208
|
"show-input": "",
|
|
2033
2209
|
size: "small"
|
|
2034
2210
|
}, null, 8, ["modelValue"])]),
|
|
2035
|
-
a("div",
|
|
2036
|
-
modelValue:
|
|
2037
|
-
"onUpdate:modelValue": c[11] ||= (e) =>
|
|
2211
|
+
a("div", Ze, [c[59] ||= a("span", { class: "q-settings-label" }, "样式", -1), s(G, {
|
|
2212
|
+
modelValue: z.headerFontStyle,
|
|
2213
|
+
"onUpdate:modelValue": c[11] ||= (e) => z.headerFontStyle = e,
|
|
2038
2214
|
size: "small"
|
|
2039
2215
|
}, {
|
|
2040
|
-
default: w(() => [s(
|
|
2216
|
+
default: w(() => [s(W, { value: "normal" }, {
|
|
2041
2217
|
default: w(() => [...c[57] ||= [o("常规", -1)]]),
|
|
2042
2218
|
_: 1
|
|
2043
|
-
}), s(
|
|
2219
|
+
}), s(W, { value: "italic" }, {
|
|
2044
2220
|
default: w(() => [...c[58] ||= [o("斜体", -1)]]),
|
|
2045
2221
|
_: 1
|
|
2046
2222
|
})]),
|
|
2047
2223
|
_: 1
|
|
2048
2224
|
}, 8, ["modelValue"])]),
|
|
2049
|
-
a("div",
|
|
2050
|
-
modelValue:
|
|
2051
|
-
"onUpdate:modelValue": c[12] ||= (e) =>
|
|
2225
|
+
a("div", Qe, [c[60] ||= a("span", { class: "q-settings-label" }, "颜色", -1), s(U, {
|
|
2226
|
+
modelValue: z.headerColor,
|
|
2227
|
+
"onUpdate:modelValue": c[12] ||= (e) => z.headerColor = e,
|
|
2052
2228
|
size: "small"
|
|
2053
2229
|
}, null, 8, ["modelValue"])]),
|
|
2054
|
-
s(
|
|
2230
|
+
s(C),
|
|
2055
2231
|
c[81] ||= a("div", { class: "q-settings-section-title" }, "标题样式", -1),
|
|
2056
|
-
a("div",
|
|
2057
|
-
modelValue:
|
|
2058
|
-
"onUpdate:modelValue": c[13] ||= (e) =>
|
|
2232
|
+
a("div", $e, [c[64] ||= a("span", { class: "q-settings-label" }, "对齐", -1), s(G, {
|
|
2233
|
+
modelValue: z.titleAlign,
|
|
2234
|
+
"onUpdate:modelValue": c[13] ||= (e) => z.titleAlign = e,
|
|
2059
2235
|
size: "small"
|
|
2060
2236
|
}, {
|
|
2061
2237
|
default: w(() => [
|
|
2062
|
-
s(
|
|
2238
|
+
s(W, { value: "left" }, {
|
|
2063
2239
|
default: w(() => [...c[61] ||= [o("左", -1)]]),
|
|
2064
2240
|
_: 1
|
|
2065
2241
|
}),
|
|
2066
|
-
s(
|
|
2242
|
+
s(W, { value: "center" }, {
|
|
2067
2243
|
default: w(() => [...c[62] ||= [o("中", -1)]]),
|
|
2068
2244
|
_: 1
|
|
2069
2245
|
}),
|
|
2070
|
-
s(
|
|
2246
|
+
s(W, { value: "right" }, {
|
|
2071
2247
|
default: w(() => [...c[63] ||= [o("右", -1)]]),
|
|
2072
2248
|
_: 1
|
|
2073
2249
|
})
|
|
2074
2250
|
]),
|
|
2075
2251
|
_: 1
|
|
2076
2252
|
}, 8, ["modelValue"])]),
|
|
2077
|
-
a("div",
|
|
2078
|
-
modelValue:
|
|
2079
|
-
"onUpdate:modelValue": c[14] ||= (e) =>
|
|
2253
|
+
a("div", et, [c[65] ||= a("span", { class: "q-settings-label" }, "字体", -1), s(_, {
|
|
2254
|
+
modelValue: z.titleFont,
|
|
2255
|
+
"onUpdate:modelValue": c[14] ||= (e) => z.titleFont = e,
|
|
2080
2256
|
size: "small",
|
|
2081
2257
|
style: { width: "120px" }
|
|
2082
2258
|
}, {
|
|
2083
2259
|
default: w(() => [
|
|
2084
|
-
s(
|
|
2260
|
+
s(h, {
|
|
2085
2261
|
label: "默认",
|
|
2086
2262
|
value: "inherit"
|
|
2087
2263
|
}),
|
|
2088
|
-
s(
|
|
2264
|
+
s(h, {
|
|
2089
2265
|
label: "宋体",
|
|
2090
2266
|
value: "SimSun, serif"
|
|
2091
2267
|
}),
|
|
2092
|
-
s(
|
|
2268
|
+
s(h, {
|
|
2093
2269
|
label: "黑体",
|
|
2094
2270
|
value: "SimHei, sans-serif"
|
|
2095
2271
|
}),
|
|
2096
|
-
s(
|
|
2272
|
+
s(h, {
|
|
2097
2273
|
label: "微软雅黑",
|
|
2098
2274
|
value: "Microsoft YaHei, sans-serif"
|
|
2099
2275
|
}),
|
|
2100
|
-
s(
|
|
2276
|
+
s(h, {
|
|
2101
2277
|
label: "楷体",
|
|
2102
2278
|
value: "KaiTi, serif"
|
|
2103
2279
|
}),
|
|
2104
|
-
s(
|
|
2280
|
+
s(h, {
|
|
2105
2281
|
label: "Arial",
|
|
2106
2282
|
value: "Arial, sans-serif"
|
|
2107
2283
|
}),
|
|
2108
|
-
s(
|
|
2284
|
+
s(h, {
|
|
2109
2285
|
label: "Times New Roman",
|
|
2110
2286
|
value: "Times New Roman, serif"
|
|
2111
2287
|
})
|
|
2112
2288
|
]),
|
|
2113
2289
|
_: 1
|
|
2114
2290
|
}, 8, ["modelValue"])]),
|
|
2115
|
-
a("div",
|
|
2116
|
-
modelValue:
|
|
2117
|
-
"onUpdate:modelValue": c[15] ||= (e) =>
|
|
2291
|
+
a("div", tt, [c[68] ||= a("span", { class: "q-settings-label" }, "样式", -1), s(G, {
|
|
2292
|
+
modelValue: z.titleFontStyle,
|
|
2293
|
+
"onUpdate:modelValue": c[15] ||= (e) => z.titleFontStyle = e,
|
|
2118
2294
|
size: "small"
|
|
2119
2295
|
}, {
|
|
2120
|
-
default: w(() => [s(
|
|
2296
|
+
default: w(() => [s(W, { value: "normal" }, {
|
|
2121
2297
|
default: w(() => [...c[66] ||= [o("常规", -1)]]),
|
|
2122
2298
|
_: 1
|
|
2123
|
-
}), s(
|
|
2299
|
+
}), s(W, { value: "italic" }, {
|
|
2124
2300
|
default: w(() => [...c[67] ||= [o("斜体", -1)]]),
|
|
2125
2301
|
_: 1
|
|
2126
2302
|
})]),
|
|
2127
2303
|
_: 1
|
|
2128
2304
|
}, 8, ["modelValue"])]),
|
|
2129
|
-
a("div",
|
|
2130
|
-
modelValue:
|
|
2131
|
-
"onUpdate:modelValue": c[16] ||= (e) =>
|
|
2305
|
+
a("div", nt, [c[69] ||= a("span", { class: "q-settings-label" }, "字号", -1), s(Ie, {
|
|
2306
|
+
modelValue: z.titleFontSize,
|
|
2307
|
+
"onUpdate:modelValue": c[16] ||= (e) => z.titleFontSize = e,
|
|
2132
2308
|
min: 12,
|
|
2133
2309
|
max: 40,
|
|
2134
2310
|
step: 1,
|
|
2135
2311
|
"show-input": "",
|
|
2136
2312
|
size: "small"
|
|
2137
2313
|
}, null, 8, ["modelValue"])]),
|
|
2138
|
-
a("div",
|
|
2139
|
-
modelValue:
|
|
2140
|
-
"onUpdate:modelValue": c[17] ||= (e) =>
|
|
2314
|
+
a("div", rt, [c[70] ||= a("span", { class: "q-settings-label" }, "颜色", -1), s(U, {
|
|
2315
|
+
modelValue: z.titleColor,
|
|
2316
|
+
"onUpdate:modelValue": c[17] ||= (e) => z.titleColor = e,
|
|
2141
2317
|
size: "small"
|
|
2142
2318
|
}, null, 8, ["modelValue"])]),
|
|
2143
|
-
s(
|
|
2319
|
+
s(C),
|
|
2144
2320
|
c[82] ||= a("div", { class: "q-settings-section-title" }, "说明样式", -1),
|
|
2145
|
-
a("div",
|
|
2146
|
-
modelValue:
|
|
2147
|
-
"onUpdate:modelValue": c[18] ||= (e) =>
|
|
2321
|
+
a("div", it, [c[74] ||= a("span", { class: "q-settings-label" }, "对齐", -1), s(G, {
|
|
2322
|
+
modelValue: z.descAlign,
|
|
2323
|
+
"onUpdate:modelValue": c[18] ||= (e) => z.descAlign = e,
|
|
2148
2324
|
size: "small"
|
|
2149
2325
|
}, {
|
|
2150
2326
|
default: w(() => [
|
|
2151
|
-
s(
|
|
2327
|
+
s(W, { value: "left" }, {
|
|
2152
2328
|
default: w(() => [...c[71] ||= [o("左", -1)]]),
|
|
2153
2329
|
_: 1
|
|
2154
2330
|
}),
|
|
2155
|
-
s(
|
|
2331
|
+
s(W, { value: "center" }, {
|
|
2156
2332
|
default: w(() => [...c[72] ||= [o("中", -1)]]),
|
|
2157
2333
|
_: 1
|
|
2158
2334
|
}),
|
|
2159
|
-
s(
|
|
2335
|
+
s(W, { value: "right" }, {
|
|
2160
2336
|
default: w(() => [...c[73] ||= [o("右", -1)]]),
|
|
2161
2337
|
_: 1
|
|
2162
2338
|
})
|
|
2163
2339
|
]),
|
|
2164
2340
|
_: 1
|
|
2165
2341
|
}, 8, ["modelValue"])]),
|
|
2166
|
-
a("div",
|
|
2167
|
-
modelValue:
|
|
2168
|
-
"onUpdate:modelValue": c[19] ||= (e) =>
|
|
2342
|
+
a("div", at, [c[75] ||= a("span", { class: "q-settings-label" }, "字体", -1), s(_, {
|
|
2343
|
+
modelValue: z.descFont,
|
|
2344
|
+
"onUpdate:modelValue": c[19] ||= (e) => z.descFont = e,
|
|
2169
2345
|
size: "small",
|
|
2170
2346
|
style: { width: "120px" }
|
|
2171
2347
|
}, {
|
|
2172
2348
|
default: w(() => [
|
|
2173
|
-
s(
|
|
2349
|
+
s(h, {
|
|
2174
2350
|
label: "默认",
|
|
2175
2351
|
value: "inherit"
|
|
2176
2352
|
}),
|
|
2177
|
-
s(
|
|
2353
|
+
s(h, {
|
|
2178
2354
|
label: "宋体",
|
|
2179
2355
|
value: "SimSun, serif"
|
|
2180
2356
|
}),
|
|
2181
|
-
s(
|
|
2357
|
+
s(h, {
|
|
2182
2358
|
label: "黑体",
|
|
2183
2359
|
value: "SimHei, sans-serif"
|
|
2184
2360
|
}),
|
|
2185
|
-
s(
|
|
2361
|
+
s(h, {
|
|
2186
2362
|
label: "微软雅黑",
|
|
2187
2363
|
value: "Microsoft YaHei, sans-serif"
|
|
2188
2364
|
}),
|
|
2189
|
-
s(
|
|
2365
|
+
s(h, {
|
|
2190
2366
|
label: "楷体",
|
|
2191
2367
|
value: "KaiTi, serif"
|
|
2192
2368
|
}),
|
|
2193
|
-
s(
|
|
2369
|
+
s(h, {
|
|
2194
2370
|
label: "Arial",
|
|
2195
2371
|
value: "Arial, sans-serif"
|
|
2196
2372
|
}),
|
|
2197
|
-
s(
|
|
2373
|
+
s(h, {
|
|
2198
2374
|
label: "Times New Roman",
|
|
2199
2375
|
value: "Times New Roman, serif"
|
|
2200
2376
|
})
|
|
2201
2377
|
]),
|
|
2202
2378
|
_: 1
|
|
2203
2379
|
}, 8, ["modelValue"])]),
|
|
2204
|
-
a("div",
|
|
2205
|
-
modelValue:
|
|
2206
|
-
"onUpdate:modelValue": c[20] ||= (e) =>
|
|
2380
|
+
a("div", ot, [c[78] ||= a("span", { class: "q-settings-label" }, "样式", -1), s(G, {
|
|
2381
|
+
modelValue: z.descFontStyle,
|
|
2382
|
+
"onUpdate:modelValue": c[20] ||= (e) => z.descFontStyle = e,
|
|
2207
2383
|
size: "small"
|
|
2208
2384
|
}, {
|
|
2209
|
-
default: w(() => [s(
|
|
2385
|
+
default: w(() => [s(W, { value: "normal" }, {
|
|
2210
2386
|
default: w(() => [...c[76] ||= [o("常规", -1)]]),
|
|
2211
2387
|
_: 1
|
|
2212
|
-
}), s(
|
|
2388
|
+
}), s(W, { value: "italic" }, {
|
|
2213
2389
|
default: w(() => [...c[77] ||= [o("斜体", -1)]]),
|
|
2214
2390
|
_: 1
|
|
2215
2391
|
})]),
|
|
2216
2392
|
_: 1
|
|
2217
2393
|
}, 8, ["modelValue"])]),
|
|
2218
|
-
a("div",
|
|
2219
|
-
modelValue:
|
|
2220
|
-
"onUpdate:modelValue": c[21] ||= (e) =>
|
|
2394
|
+
a("div", st, [c[79] ||= a("span", { class: "q-settings-label" }, "字号", -1), s(Ie, {
|
|
2395
|
+
modelValue: z.descFontSize,
|
|
2396
|
+
"onUpdate:modelValue": c[21] ||= (e) => z.descFontSize = e,
|
|
2221
2397
|
min: 10,
|
|
2222
2398
|
max: 24,
|
|
2223
2399
|
step: 1,
|
|
2224
2400
|
"show-input": "",
|
|
2225
2401
|
size: "small"
|
|
2226
2402
|
}, null, 8, ["modelValue"])]),
|
|
2227
|
-
a("div",
|
|
2228
|
-
modelValue:
|
|
2229
|
-
"onUpdate:modelValue": c[22] ||= (e) =>
|
|
2403
|
+
a("div", ct, [c[80] ||= a("span", { class: "q-settings-label" }, "颜色", -1), s(U, {
|
|
2404
|
+
modelValue: z.descColor,
|
|
2405
|
+
"onUpdate:modelValue": c[22] ||= (e) => z.descColor = e,
|
|
2230
2406
|
size: "small"
|
|
2231
2407
|
}, null, 8, ["modelValue"])])
|
|
2232
2408
|
])]),
|
|
2233
2409
|
_: 1
|
|
2234
2410
|
})]),
|
|
2235
2411
|
s(m, {
|
|
2236
|
-
modelValue:
|
|
2237
|
-
"onUpdate:modelValue": c[23] ||= (e) =>
|
|
2412
|
+
modelValue: M.value,
|
|
2413
|
+
"onUpdate:modelValue": c[23] ||= (e) => M.value = e,
|
|
2238
2414
|
type: "textarea",
|
|
2239
2415
|
rows: 2,
|
|
2240
2416
|
placeholder: "问卷说明(选填)",
|
|
2241
2417
|
class: "q-desc-input"
|
|
2242
2418
|
}, null, 8, ["modelValue"]),
|
|
2243
|
-
a("div",
|
|
2419
|
+
a("div", lt, [a("div", ut, [
|
|
2244
2420
|
c[83] ||= a("span", null, "及格分:", -1),
|
|
2245
|
-
s(
|
|
2246
|
-
modelValue:
|
|
2247
|
-
"onUpdate:modelValue": c[24] ||= (e) =>
|
|
2421
|
+
s(Re, {
|
|
2422
|
+
modelValue: ce.value,
|
|
2423
|
+
"onUpdate:modelValue": c[24] ||= (e) => ce.value = e,
|
|
2248
2424
|
min: 0,
|
|
2249
2425
|
size: "small"
|
|
2250
2426
|
}, null, 8, ["modelValue"]),
|
|
2251
|
-
a("span",
|
|
2252
|
-
]), a("div",
|
|
2427
|
+
a("span", dt, "总分:" + x(Ne.value) + "分", 1)
|
|
2428
|
+
]), a("div", ft, [
|
|
2253
2429
|
c[84] ||= a("span", null, "立刻给出评分:", -1),
|
|
2254
|
-
s(
|
|
2255
|
-
modelValue:
|
|
2256
|
-
"onUpdate:modelValue": c[25] ||= (e) =>
|
|
2430
|
+
s(q, {
|
|
2431
|
+
modelValue: le.value,
|
|
2432
|
+
"onUpdate:modelValue": c[25] ||= (e) => le.value = e,
|
|
2257
2433
|
size: "small",
|
|
2258
2434
|
"active-text": "是",
|
|
2259
2435
|
"inactive-text": "否"
|
|
@@ -2261,24 +2437,24 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2261
2437
|
c[85] ||= a("span", { class: "q-show-score-tip" }, "(选\"否\"则提交时不显示得分)", -1)
|
|
2262
2438
|
])])
|
|
2263
2439
|
], 4),
|
|
2264
|
-
a("div",
|
|
2440
|
+
a("div", pt, [(g(!0), i(e, null, y(I.value, (t, l) => (g(), i("div", {
|
|
2265
2441
|
key: t.id,
|
|
2266
|
-
class: d(["q-card", { active:
|
|
2267
|
-
onClick: (e) =>
|
|
2442
|
+
class: d(["q-card", { active: ue.value === t.id }]),
|
|
2443
|
+
onClick: (e) => ue.value = t.id,
|
|
2268
2444
|
draggable: "true",
|
|
2269
|
-
onDragstart: (e) =>
|
|
2270
|
-
onDragover: E((e) =>
|
|
2271
|
-
onDrop: (e) =>
|
|
2445
|
+
onDragstart: (e) => Jn(l, e),
|
|
2446
|
+
onDragover: E((e) => Yn(l, e), ["prevent"]),
|
|
2447
|
+
onDrop: (e) => Xn(l, e)
|
|
2272
2448
|
}, [
|
|
2273
|
-
a("div",
|
|
2449
|
+
a("div", ht, [s(p, {
|
|
2274
2450
|
size: "small",
|
|
2275
2451
|
circle: "",
|
|
2276
|
-
onClick: E((e) =>
|
|
2452
|
+
onClick: E((e) => mr(l), ["stop"]),
|
|
2277
2453
|
title: "AI生成题目",
|
|
2278
2454
|
class: "ai-gen-btn"
|
|
2279
2455
|
}, {
|
|
2280
2456
|
default: w(() => [s(u, null, {
|
|
2281
|
-
default: w(() => [s(
|
|
2457
|
+
default: w(() => [s(L)]),
|
|
2282
2458
|
_: 1
|
|
2283
2459
|
})]),
|
|
2284
2460
|
_: 1
|
|
@@ -2286,17 +2462,17 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2286
2462
|
size: "small",
|
|
2287
2463
|
circle: "",
|
|
2288
2464
|
type: "danger",
|
|
2289
|
-
onClick: E((e) =>
|
|
2465
|
+
onClick: E((e) => Un(l), ["stop"]),
|
|
2290
2466
|
title: "删除"
|
|
2291
2467
|
}, {
|
|
2292
2468
|
default: w(() => [s(u, null, {
|
|
2293
|
-
default: w(() => [s(
|
|
2469
|
+
default: w(() => [s(J)]),
|
|
2294
2470
|
_: 1
|
|
2295
2471
|
})]),
|
|
2296
2472
|
_: 1
|
|
2297
2473
|
}, 8, ["onClick"])]),
|
|
2298
|
-
a("div",
|
|
2299
|
-
a("span",
|
|
2474
|
+
a("div", gt, [
|
|
2475
|
+
a("span", _t, x(l + 1) + ".", 1),
|
|
2300
2476
|
s(m, {
|
|
2301
2477
|
modelValue: t.title,
|
|
2302
2478
|
"onUpdate:modelValue": (e) => t.title = e,
|
|
@@ -2304,16 +2480,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2304
2480
|
size: "small",
|
|
2305
2481
|
class: "q-title"
|
|
2306
2482
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2307
|
-
a("div",
|
|
2483
|
+
a("div", vt, [
|
|
2308
2484
|
s(p, {
|
|
2309
2485
|
size: "small",
|
|
2310
2486
|
circle: "",
|
|
2311
|
-
onClick: E((e) =>
|
|
2487
|
+
onClick: E((e) => Wn(l, -1), ["stop"]),
|
|
2312
2488
|
disabled: l === 0,
|
|
2313
2489
|
title: "上移"
|
|
2314
2490
|
}, {
|
|
2315
2491
|
default: w(() => [s(u, null, {
|
|
2316
|
-
default: w(() => [s(
|
|
2492
|
+
default: w(() => [s(Y)]),
|
|
2317
2493
|
_: 1
|
|
2318
2494
|
})]),
|
|
2319
2495
|
_: 1
|
|
@@ -2321,17 +2497,17 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2321
2497
|
s(p, {
|
|
2322
2498
|
size: "small",
|
|
2323
2499
|
circle: "",
|
|
2324
|
-
onClick: E((e) =>
|
|
2325
|
-
disabled: l ===
|
|
2500
|
+
onClick: E((e) => Wn(l, 1), ["stop"]),
|
|
2501
|
+
disabled: l === I.value.length - 1,
|
|
2326
2502
|
title: "下移"
|
|
2327
2503
|
}, {
|
|
2328
2504
|
default: w(() => [s(u, null, {
|
|
2329
|
-
default: w(() => [s(
|
|
2505
|
+
default: w(() => [s(ze)]),
|
|
2330
2506
|
_: 1
|
|
2331
2507
|
})]),
|
|
2332
2508
|
_: 1
|
|
2333
2509
|
}, 8, ["onClick", "disabled"]),
|
|
2334
|
-
s(
|
|
2510
|
+
s(q, {
|
|
2335
2511
|
modelValue: t.required,
|
|
2336
2512
|
"onUpdate:modelValue": (e) => t.required = e,
|
|
2337
2513
|
size: "small",
|
|
@@ -2341,16 +2517,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2341
2517
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2342
2518
|
])
|
|
2343
2519
|
]),
|
|
2344
|
-
a("div",
|
|
2345
|
-
a("div",
|
|
2520
|
+
a("div", yt, [
|
|
2521
|
+
a("div", bt, [s(m, {
|
|
2346
2522
|
modelValue: t.description,
|
|
2347
2523
|
"onUpdate:modelValue": (e) => t.description = e,
|
|
2348
2524
|
placeholder: "题目说明(选填)",
|
|
2349
2525
|
size: "small"
|
|
2350
2526
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])]),
|
|
2351
|
-
a("div",
|
|
2527
|
+
a("div", xt, [s(X, {
|
|
2352
2528
|
"show-file-list": !1,
|
|
2353
|
-
"before-upload": (e) =>
|
|
2529
|
+
"before-upload": (e) => qn(t, e),
|
|
2354
2530
|
accept: "image/*",
|
|
2355
2531
|
class: "q-img-upload"
|
|
2356
2532
|
}, {
|
|
@@ -2359,13 +2535,13 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2359
2535
|
circle: ""
|
|
2360
2536
|
}, {
|
|
2361
2537
|
default: w(() => [s(u, null, {
|
|
2362
|
-
default: w(() => [s(
|
|
2538
|
+
default: w(() => [s(Tn)]),
|
|
2363
2539
|
_: 1
|
|
2364
2540
|
})]),
|
|
2365
2541
|
_: 1
|
|
2366
2542
|
})]),
|
|
2367
2543
|
_: 1
|
|
2368
|
-
}, 8, ["before-upload"]), t.image ? (g(), i("div",
|
|
2544
|
+
}, 8, ["before-upload"]), t.image ? (g(), i("div", St, [a("img", { src: t.image }, null, 8, Ct), s(p, {
|
|
2369
2545
|
size: "small",
|
|
2370
2546
|
circle: "",
|
|
2371
2547
|
type: "danger",
|
|
@@ -2373,17 +2549,17 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2373
2549
|
onClick: (e) => t.image = ""
|
|
2374
2550
|
}, {
|
|
2375
2551
|
default: w(() => [s(u, null, {
|
|
2376
|
-
default: w(() => [s(
|
|
2552
|
+
default: w(() => [s(Z)]),
|
|
2377
2553
|
_: 1
|
|
2378
2554
|
})]),
|
|
2379
2555
|
_: 1
|
|
2380
2556
|
}, 8, ["onClick"])])) : r("", !0)]),
|
|
2381
|
-
t.type === "text" ? (g(), i("div",
|
|
2557
|
+
t.type === "text" ? (g(), i("div", wt, [s(m, {
|
|
2382
2558
|
modelValue: t.placeholder,
|
|
2383
2559
|
"onUpdate:modelValue": (e) => t.placeholder = e,
|
|
2384
2560
|
placeholder: "回答提示文字",
|
|
2385
2561
|
size: "small"
|
|
2386
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]), s(
|
|
2562
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]), s(_, {
|
|
2387
2563
|
modelValue: t.textType,
|
|
2388
2564
|
"onUpdate:modelValue": (e) => t.textType = e,
|
|
2389
2565
|
size: "small",
|
|
@@ -2392,20 +2568,20 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2392
2568
|
"margin-left": "8px"
|
|
2393
2569
|
}
|
|
2394
2570
|
}, {
|
|
2395
|
-
default: w(() => [s(
|
|
2571
|
+
default: w(() => [s(h, {
|
|
2396
2572
|
label: "单行文本",
|
|
2397
2573
|
value: "single"
|
|
2398
|
-
}), s(
|
|
2574
|
+
}), s(h, {
|
|
2399
2575
|
label: "多行文本",
|
|
2400
2576
|
value: "multi"
|
|
2401
2577
|
})]),
|
|
2402
2578
|
_: 1
|
|
2403
2579
|
}, 8, ["modelValue", "onUpdate:modelValue"])])) : r("", !0),
|
|
2404
|
-
t.type === "radio" ? (g(), i("div",
|
|
2580
|
+
t.type === "radio" ? (g(), i("div", Tt, [(g(!0), i(e, null, y(t.options, (e, n) => (g(), i("div", {
|
|
2405
2581
|
key: n,
|
|
2406
2582
|
class: "q-option-item"
|
|
2407
2583
|
}, [
|
|
2408
|
-
s(
|
|
2584
|
+
s(En, {
|
|
2409
2585
|
"model-value": 0,
|
|
2410
2586
|
disabled: ""
|
|
2411
2587
|
}),
|
|
@@ -2420,25 +2596,25 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2420
2596
|
size: "small",
|
|
2421
2597
|
circle: "",
|
|
2422
2598
|
type: "danger",
|
|
2423
|
-
onClick: (e) =>
|
|
2599
|
+
onClick: (e) => Kn(t, n)
|
|
2424
2600
|
}, {
|
|
2425
2601
|
default: w(() => [s(u, null, {
|
|
2426
|
-
default: w(() => [s(
|
|
2602
|
+
default: w(() => [s(Z)]),
|
|
2427
2603
|
_: 1
|
|
2428
2604
|
})]),
|
|
2429
2605
|
_: 1
|
|
2430
2606
|
}, 8, ["onClick"])
|
|
2431
2607
|
]))), 128)), s(p, {
|
|
2432
2608
|
size: "small",
|
|
2433
|
-
onClick: (e) =>
|
|
2609
|
+
onClick: (e) => Gn(t)
|
|
2434
2610
|
}, {
|
|
2435
2611
|
default: w(() => [s(u, null, {
|
|
2436
|
-
default: w(() => [s(
|
|
2612
|
+
default: w(() => [s(Q)]),
|
|
2437
2613
|
_: 1
|
|
2438
2614
|
}), c[86] ||= o(" 添加选项", -1)]),
|
|
2439
2615
|
_: 1
|
|
2440
2616
|
}, 8, ["onClick"])])) : r("", !0),
|
|
2441
|
-
t.type === "checkbox" ? (g(), i("div",
|
|
2617
|
+
t.type === "checkbox" ? (g(), i("div", Et, [(g(!0), i(e, null, y(t.options, (e, n) => (g(), i("div", {
|
|
2442
2618
|
key: n,
|
|
2443
2619
|
class: "q-option-item"
|
|
2444
2620
|
}, [
|
|
@@ -2454,25 +2630,25 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2454
2630
|
size: "small",
|
|
2455
2631
|
circle: "",
|
|
2456
2632
|
type: "danger",
|
|
2457
|
-
onClick: (e) =>
|
|
2633
|
+
onClick: (e) => Kn(t, n)
|
|
2458
2634
|
}, {
|
|
2459
2635
|
default: w(() => [s(u, null, {
|
|
2460
|
-
default: w(() => [s(
|
|
2636
|
+
default: w(() => [s(Z)]),
|
|
2461
2637
|
_: 1
|
|
2462
2638
|
})]),
|
|
2463
2639
|
_: 1
|
|
2464
2640
|
}, 8, ["onClick"])
|
|
2465
2641
|
]))), 128)), s(p, {
|
|
2466
2642
|
size: "small",
|
|
2467
|
-
onClick: (e) =>
|
|
2643
|
+
onClick: (e) => Gn(t)
|
|
2468
2644
|
}, {
|
|
2469
2645
|
default: w(() => [s(u, null, {
|
|
2470
|
-
default: w(() => [s(
|
|
2646
|
+
default: w(() => [s(Q)]),
|
|
2471
2647
|
_: 1
|
|
2472
2648
|
}), c[87] ||= o(" 添加选项", -1)]),
|
|
2473
2649
|
_: 1
|
|
2474
2650
|
}, 8, ["onClick"])])) : r("", !0),
|
|
2475
|
-
t.type === "select" ? (g(), i("div",
|
|
2651
|
+
t.type === "select" ? (g(), i("div", Dt, [(g(!0), i(e, null, y(t.options, (e, n) => (g(), i("div", {
|
|
2476
2652
|
key: n,
|
|
2477
2653
|
class: "q-option-item"
|
|
2478
2654
|
}, [
|
|
@@ -2494,27 +2670,27 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2494
2670
|
size: "small",
|
|
2495
2671
|
circle: "",
|
|
2496
2672
|
type: "danger",
|
|
2497
|
-
onClick: (e) =>
|
|
2673
|
+
onClick: (e) => Kn(t, n)
|
|
2498
2674
|
}, {
|
|
2499
2675
|
default: w(() => [s(u, null, {
|
|
2500
|
-
default: w(() => [s(
|
|
2676
|
+
default: w(() => [s(Z)]),
|
|
2501
2677
|
_: 1
|
|
2502
2678
|
})]),
|
|
2503
2679
|
_: 1
|
|
2504
2680
|
}, 8, ["onClick"])
|
|
2505
2681
|
]))), 128)), s(p, {
|
|
2506
2682
|
size: "small",
|
|
2507
|
-
onClick: (e) =>
|
|
2683
|
+
onClick: (e) => Gn(t)
|
|
2508
2684
|
}, {
|
|
2509
2685
|
default: w(() => [s(u, null, {
|
|
2510
|
-
default: w(() => [s(
|
|
2686
|
+
default: w(() => [s(Q)]),
|
|
2511
2687
|
_: 1
|
|
2512
2688
|
}), c[88] ||= o(" 添加选项", -1)]),
|
|
2513
2689
|
_: 1
|
|
2514
2690
|
}, 8, ["onClick"])])) : r("", !0),
|
|
2515
|
-
t.type === "rating" ? (g(), i("div",
|
|
2691
|
+
t.type === "rating" ? (g(), i("div", Ot, [a("div", kt, [
|
|
2516
2692
|
c[91] ||= a("span", null, "最大分值:", -1),
|
|
2517
|
-
s(
|
|
2693
|
+
s(Re, {
|
|
2518
2694
|
modelValue: t.maxRating,
|
|
2519
2695
|
"onUpdate:modelValue": (e) => t.maxRating = e,
|
|
2520
2696
|
min: 3,
|
|
@@ -2522,21 +2698,21 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2522
2698
|
size: "small"
|
|
2523
2699
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2524
2700
|
c[92] ||= a("span", { style: { "margin-left": "16px" } }, "图标:", -1),
|
|
2525
|
-
s(
|
|
2701
|
+
s(G, {
|
|
2526
2702
|
modelValue: t.ratingIcon,
|
|
2527
2703
|
"onUpdate:modelValue": (e) => t.ratingIcon = e,
|
|
2528
2704
|
size: "small"
|
|
2529
2705
|
}, {
|
|
2530
|
-
default: w(() => [s(
|
|
2706
|
+
default: w(() => [s(W, { label: "star" }, {
|
|
2531
2707
|
default: w(() => [...c[89] ||= [o("星形", -1)]]),
|
|
2532
2708
|
_: 1
|
|
2533
|
-
}), s(
|
|
2709
|
+
}), s(W, { label: "heart" }, {
|
|
2534
2710
|
default: w(() => [...c[90] ||= [o("心形", -1)]]),
|
|
2535
2711
|
_: 1
|
|
2536
2712
|
})]),
|
|
2537
2713
|
_: 1
|
|
2538
2714
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2539
|
-
]), a("div",
|
|
2715
|
+
]), a("div", At, [(g(!0), i(e, null, y(t.maxRating || 5, (e) => (g(), i("span", {
|
|
2540
2716
|
key: e,
|
|
2541
2717
|
class: "rating-icon",
|
|
2542
2718
|
onClick: (n) => t._preview = e
|
|
@@ -2544,10 +2720,10 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2544
2720
|
size: 20,
|
|
2545
2721
|
class: d({ active: e <= (t._preview || 0) })
|
|
2546
2722
|
}, {
|
|
2547
|
-
default: w(() => [s(
|
|
2723
|
+
default: w(() => [s(kn)]),
|
|
2548
2724
|
_: 1
|
|
2549
|
-
}, 8, ["class"])], 8,
|
|
2550
|
-
t.type === "scale" ? (g(), i("div",
|
|
2725
|
+
}, 8, ["class"])], 8, jt))), 128))])])) : r("", !0),
|
|
2726
|
+
t.type === "scale" ? (g(), i("div", Mt, [a("div", Nt, [
|
|
2551
2727
|
s(m, {
|
|
2552
2728
|
modelValue: t.scaleMinLabel,
|
|
2553
2729
|
"onUpdate:modelValue": (e) => t.scaleMinLabel = e,
|
|
@@ -2564,18 +2740,18 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2564
2740
|
style: { width: "120px" }
|
|
2565
2741
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2566
2742
|
c[94] ||= a("span", { style: { "margin-left": "12px" } }, "刻度数:", -1),
|
|
2567
|
-
s(
|
|
2743
|
+
s(Re, {
|
|
2568
2744
|
modelValue: t.scaleCount,
|
|
2569
2745
|
"onUpdate:modelValue": (e) => t.scaleCount = e,
|
|
2570
2746
|
min: 5,
|
|
2571
2747
|
max: 10,
|
|
2572
2748
|
size: "small"
|
|
2573
2749
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2574
|
-
]), a("div",
|
|
2750
|
+
]), a("div", Pt, [(g(!0), i(e, null, y(t.scaleCount || 7, (e) => (g(), i("div", {
|
|
2575
2751
|
key: e,
|
|
2576
2752
|
class: "scale-dot"
|
|
2577
|
-
}, [c[95] ||= a("div", { class: "dot" }, null, -1), a("span",
|
|
2578
|
-
t.type === "matrix" ? (g(), i("div",
|
|
2753
|
+
}, [c[95] ||= a("div", { class: "dot" }, null, -1), a("span", Ft, x(e), 1)]))), 128))])])) : r("", !0),
|
|
2754
|
+
t.type === "matrix" ? (g(), i("div", It, [a("div", Lt, [a("div", Rt, [
|
|
2579
2755
|
c[97] ||= a("span", { class: "label" }, "行标题:", -1),
|
|
2580
2756
|
(g(!0), i(e, null, y(t.matrixRows, (e, n) => (g(), i("div", {
|
|
2581
2757
|
key: n,
|
|
@@ -2593,7 +2769,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2593
2769
|
onClick: (e) => t.matrixRows.splice(n, 1)
|
|
2594
2770
|
}, {
|
|
2595
2771
|
default: w(() => [s(u, null, {
|
|
2596
|
-
default: w(() => [s(
|
|
2772
|
+
default: w(() => [s(Z)]),
|
|
2597
2773
|
_: 1
|
|
2598
2774
|
})]),
|
|
2599
2775
|
_: 1
|
|
@@ -2603,12 +2779,12 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2603
2779
|
onClick: (e) => t.matrixRows.push("")
|
|
2604
2780
|
}, {
|
|
2605
2781
|
default: w(() => [s(u, null, {
|
|
2606
|
-
default: w(() => [s(
|
|
2782
|
+
default: w(() => [s(Q)]),
|
|
2607
2783
|
_: 1
|
|
2608
2784
|
}), c[96] ||= o(" 添加行", -1)]),
|
|
2609
2785
|
_: 1
|
|
2610
2786
|
}, 8, ["onClick"])
|
|
2611
|
-
]), a("div",
|
|
2787
|
+
]), a("div", zt, [
|
|
2612
2788
|
c[99] ||= a("span", { class: "label" }, "列标题:", -1),
|
|
2613
2789
|
(g(!0), i(e, null, y(t.matrixCols, (e, n) => (g(), i("div", {
|
|
2614
2790
|
key: n,
|
|
@@ -2626,7 +2802,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2626
2802
|
onClick: (e) => t.matrixCols.splice(n, 1)
|
|
2627
2803
|
}, {
|
|
2628
2804
|
default: w(() => [s(u, null, {
|
|
2629
|
-
default: w(() => [s(
|
|
2805
|
+
default: w(() => [s(Z)]),
|
|
2630
2806
|
_: 1
|
|
2631
2807
|
})]),
|
|
2632
2808
|
_: 1
|
|
@@ -2636,24 +2812,24 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2636
2812
|
onClick: (e) => t.matrixCols.push("")
|
|
2637
2813
|
}, {
|
|
2638
2814
|
default: w(() => [s(u, null, {
|
|
2639
|
-
default: w(() => [s(
|
|
2815
|
+
default: w(() => [s(Q)]),
|
|
2640
2816
|
_: 1
|
|
2641
2817
|
}), c[98] ||= o(" 添加列", -1)]),
|
|
2642
2818
|
_: 1
|
|
2643
2819
|
}, 8, ["onClick"])
|
|
2644
|
-
])]), t.matrixRows.length && t.matrixCols.length ? (g(), i("div",
|
|
2645
|
-
t.type === "image" ? (g(), i("div",
|
|
2820
|
+
])]), t.matrixRows.length && t.matrixCols.length ? (g(), i("div", Bt, [a("table", Vt, [a("thead", null, [a("tr", null, [c[100] ||= a("th", null, null, -1), (g(!0), i(e, null, y(t.matrixCols, (e, t) => (g(), i("th", { key: t }, x(e || `列${t + 1}`), 1))), 128))])]), a("tbody", null, [(g(!0), i(e, null, y(t.matrixRows, (n, r) => (g(), i("tr", { key: r }, [a("td", null, x(n || `行${r + 1}`), 1), (g(!0), i(e, null, y(t.matrixCols, (e, t) => (g(), i("td", { key: t }, [s(En, { disabled: "" })]))), 128))]))), 128))])])])) : r("", !0)])) : r("", !0),
|
|
2821
|
+
t.type === "image" ? (g(), i("div", Ht, [s(m, {
|
|
2646
2822
|
modelValue: t.imageQuestionText,
|
|
2647
2823
|
"onUpdate:modelValue": (e) => t.imageQuestionText = e,
|
|
2648
2824
|
placeholder: "请输入图片相关说明文字",
|
|
2649
2825
|
size: "small"
|
|
2650
2826
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])])) : r("", !0),
|
|
2651
|
-
a("div",
|
|
2652
|
-
a("div",
|
|
2653
|
-
default: w(() => [s(
|
|
2827
|
+
a("div", Ut, [
|
|
2828
|
+
a("div", Wt, [s(u, null, {
|
|
2829
|
+
default: w(() => [s(An)]),
|
|
2654
2830
|
_: 1
|
|
2655
2831
|
}), c[101] ||= a("span", null, "跳转逻辑", -1)]),
|
|
2656
|
-
a("div",
|
|
2832
|
+
a("div", Gt, [c[102] ||= a("span", { class: "skip-label" }, "默认跳转:", -1), s(_, {
|
|
2657
2833
|
modelValue: t.skipTo,
|
|
2658
2834
|
"onUpdate:modelValue": (e) => t.skipTo = e,
|
|
2659
2835
|
size: "small",
|
|
@@ -2662,16 +2838,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2662
2838
|
style: { width: "200px" }
|
|
2663
2839
|
}, {
|
|
2664
2840
|
default: w(() => [
|
|
2665
|
-
s(
|
|
2841
|
+
s(h, {
|
|
2666
2842
|
label: "下一题(默认)",
|
|
2667
2843
|
value: ""
|
|
2668
2844
|
}),
|
|
2669
|
-
(g(!0), i(e, null, y(
|
|
2845
|
+
(g(!0), i(e, null, y(I.value, (e, t) => (g(), n(h, {
|
|
2670
2846
|
key: e.id,
|
|
2671
2847
|
label: `${t + 1}. ${e.title || "未命名"}`,
|
|
2672
2848
|
value: e.id
|
|
2673
2849
|
}, null, 8, ["label", "value"]))), 128)),
|
|
2674
|
-
s(
|
|
2850
|
+
s(h, {
|
|
2675
2851
|
label: "结束问卷",
|
|
2676
2852
|
value: "__END__"
|
|
2677
2853
|
})
|
|
@@ -2682,16 +2858,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2682
2858
|
"radio",
|
|
2683
2859
|
"checkbox",
|
|
2684
2860
|
"select"
|
|
2685
|
-
].includes(t.type) ? (g(), i("div",
|
|
2861
|
+
].includes(t.type) ? (g(), i("div", Kt, [c[103] ||= a("div", { class: "skip-rules-title" }, "按选项跳转:", -1), (g(!0), i(e, null, y(t.options || [], (r, o) => (g(), i("div", {
|
|
2686
2862
|
key: o,
|
|
2687
2863
|
class: "skip-rule-row"
|
|
2688
2864
|
}, [
|
|
2689
|
-
a("span",
|
|
2865
|
+
a("span", qt, x(r), 1),
|
|
2690
2866
|
s(u, null, {
|
|
2691
|
-
default: w(() => [s(
|
|
2867
|
+
default: w(() => [s(jn)]),
|
|
2692
2868
|
_: 1
|
|
2693
2869
|
}),
|
|
2694
|
-
s(
|
|
2870
|
+
s(_, {
|
|
2695
2871
|
modelValue: t.optionSkipTo[o],
|
|
2696
2872
|
"onUpdate:modelValue": (e) => t.optionSkipTo[o] = e,
|
|
2697
2873
|
size: "small",
|
|
@@ -2700,16 +2876,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2700
2876
|
style: { width: "180px" }
|
|
2701
2877
|
}, {
|
|
2702
2878
|
default: w(() => [
|
|
2703
|
-
s(
|
|
2879
|
+
s(h, {
|
|
2704
2880
|
label: "默认(下一题)",
|
|
2705
2881
|
value: ""
|
|
2706
2882
|
}),
|
|
2707
|
-
(g(!0), i(e, null, y(
|
|
2883
|
+
(g(!0), i(e, null, y(I.value, (e, t) => (g(), n(h, {
|
|
2708
2884
|
key: e.id,
|
|
2709
2885
|
label: `${t + 1}. ${e.title || "未命名"}`,
|
|
2710
2886
|
value: e.id
|
|
2711
2887
|
}, null, 8, ["label", "value"]))), 128)),
|
|
2712
|
-
s(
|
|
2888
|
+
s(h, {
|
|
2713
2889
|
label: "结束问卷",
|
|
2714
2890
|
value: "__END__"
|
|
2715
2891
|
})
|
|
@@ -2718,12 +2894,12 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2718
2894
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2719
2895
|
]))), 128))])) : r("", !0)
|
|
2720
2896
|
]),
|
|
2721
|
-
a("div",
|
|
2722
|
-
a("div",
|
|
2723
|
-
default: w(() => [s(
|
|
2897
|
+
a("div", Jt, [
|
|
2898
|
+
a("div", Yt, [s(u, null, {
|
|
2899
|
+
default: w(() => [s(Mn)]),
|
|
2724
2900
|
_: 1
|
|
2725
2901
|
}), c[104] ||= a("span", null, "计分设置", -1)]),
|
|
2726
|
-
a("div",
|
|
2902
|
+
a("div", Xt, [c[105] ||= a("span", { class: "score-label" }, "本题分值:", -1), s(Re, {
|
|
2727
2903
|
modelValue: t.score,
|
|
2728
2904
|
"onUpdate:modelValue": (e) => t.score = e,
|
|
2729
2905
|
min: 0,
|
|
@@ -2734,10 +2910,10 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2734
2910
|
"radio",
|
|
2735
2911
|
"checkbox",
|
|
2736
2912
|
"select"
|
|
2737
|
-
].includes(t.type) ? (g(), i("div",
|
|
2913
|
+
].includes(t.type) ? (g(), i("div", Zt, [c[106] ||= a("div", { class: "score-options-title" }, "各选项分值(-1表示不计分):", -1), (g(!0), i(e, null, y(t.options || [], (e, n) => (g(), i("div", {
|
|
2738
2914
|
key: n,
|
|
2739
2915
|
class: "score-option-row"
|
|
2740
|
-
}, [a("span",
|
|
2916
|
+
}, [a("span", Qt, x(e), 1), s(Re, {
|
|
2741
2917
|
modelValue: t.optionScore[n],
|
|
2742
2918
|
"onUpdate:modelValue": (e) => t.optionScore[n] = e,
|
|
2743
2919
|
min: -1,
|
|
@@ -2745,14 +2921,14 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2745
2921
|
size: "small",
|
|
2746
2922
|
style: { width: "120px" }
|
|
2747
2923
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])]))), 128))])) : r("", !0),
|
|
2748
|
-
t.type === "rating" ? (g(), i("div",
|
|
2924
|
+
t.type === "rating" ? (g(), i("div", $t, [c[107] ||= a("span", { class: "score-label" }, "评分即得分:", -1), s(q, {
|
|
2749
2925
|
modelValue: t.ratingAsScore,
|
|
2750
2926
|
"onUpdate:modelValue": (e) => t.ratingAsScore = e,
|
|
2751
2927
|
size: "small",
|
|
2752
2928
|
"active-text": "是",
|
|
2753
2929
|
"inactive-text": "否"
|
|
2754
2930
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])])) : r("", !0),
|
|
2755
|
-
t.type === "scale" ? (g(), i("div",
|
|
2931
|
+
t.type === "scale" ? (g(), i("div", en, [c[108] ||= a("span", { class: "score-label" }, "量表即得分:", -1), s(q, {
|
|
2756
2932
|
modelValue: t.scaleAsScore,
|
|
2757
2933
|
"onUpdate:modelValue": (e) => t.scaleAsScore = e,
|
|
2758
2934
|
size: "small",
|
|
@@ -2760,16 +2936,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2760
2936
|
"inactive-text": "否"
|
|
2761
2937
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])])) : r("", !0)
|
|
2762
2938
|
]),
|
|
2763
|
-
a("div",
|
|
2764
|
-
a("div",
|
|
2939
|
+
a("div", tn, [
|
|
2940
|
+
a("div", nn, [
|
|
2765
2941
|
s(u, null, {
|
|
2766
|
-
default: w(() => [s(
|
|
2942
|
+
default: w(() => [s(Nn)]),
|
|
2767
2943
|
_: 1
|
|
2768
2944
|
}),
|
|
2769
2945
|
c[109] ||= a("span", null, "评分说明", -1),
|
|
2770
2946
|
c[110] ||= a("span", { class: "required-mark" }, "*", -1)
|
|
2771
2947
|
]),
|
|
2772
|
-
a("div",
|
|
2948
|
+
a("div", rn, [c[111] ||= a("label", { class: "scoring-guide-label" }, "参考答案", -1), s(m, {
|
|
2773
2949
|
modelValue: t.referenceAnswer,
|
|
2774
2950
|
"onUpdate:modelValue": (e) => t.referenceAnswer = e,
|
|
2775
2951
|
type: "textarea",
|
|
@@ -2781,7 +2957,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2781
2957
|
"onUpdate:modelValue",
|
|
2782
2958
|
"class"
|
|
2783
2959
|
])]),
|
|
2784
|
-
a("div",
|
|
2960
|
+
a("div", an, [c[112] ||= a("label", { class: "scoring-guide-label" }, "评分标准说明", -1), s(m, {
|
|
2785
2961
|
modelValue: t.scoringCriteria,
|
|
2786
2962
|
"onUpdate:modelValue": (e) => t.scoringCriteria = e,
|
|
2787
2963
|
type: "textarea",
|
|
@@ -2793,119 +2969,119 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2793
2969
|
"onUpdate:modelValue",
|
|
2794
2970
|
"class"
|
|
2795
2971
|
])]),
|
|
2796
|
-
!t.referenceAnswer || !t.scoringCriteria ? (g(), i("div",
|
|
2972
|
+
!t.referenceAnswer || !t.scoringCriteria ? (g(), i("div", on, "参考答案和评分标准说明均为必填项")) : r("", !0)
|
|
2797
2973
|
])
|
|
2798
2974
|
])
|
|
2799
|
-
], 42,
|
|
2800
|
-
a("div",
|
|
2975
|
+
], 42, mt))), 128))], 512),
|
|
2976
|
+
a("div", sn, [a("div", cn, [
|
|
2801
2977
|
s(p, {
|
|
2802
2978
|
type: "primary",
|
|
2803
2979
|
plain: "",
|
|
2804
|
-
onClick: c[27] ||= (e) =>
|
|
2980
|
+
onClick: c[27] ||= (e) => de.value = !de.value
|
|
2805
2981
|
}, {
|
|
2806
2982
|
default: w(() => [s(u, null, {
|
|
2807
|
-
default: w(() => [s(
|
|
2983
|
+
default: w(() => [s(Q)]),
|
|
2808
2984
|
_: 1
|
|
2809
2985
|
}), c[113] ||= o(" 添加题目 ", -1)]),
|
|
2810
2986
|
_: 1
|
|
2811
2987
|
}),
|
|
2812
|
-
|
|
2988
|
+
de.value ? (g(), i("div", {
|
|
2813
2989
|
key: 0,
|
|
2814
2990
|
class: "q-add-overlay",
|
|
2815
|
-
onClick: c[28] ||= (e) =>
|
|
2991
|
+
onClick: c[28] ||= (e) => de.value = !1
|
|
2816
2992
|
})) : r("", !0),
|
|
2817
|
-
|
|
2993
|
+
de.value ? (g(), i("div", {
|
|
2818
2994
|
key: 1,
|
|
2819
|
-
class: d(["q-add-menu",
|
|
2995
|
+
class: d(["q-add-menu", I.value.length === 0 ? "menu-right" : "menu-top"])
|
|
2820
2996
|
}, [
|
|
2821
2997
|
a("div", {
|
|
2822
2998
|
class: "menu-item",
|
|
2823
|
-
onClick: c[29] ||= (e) =>
|
|
2999
|
+
onClick: c[29] ||= (e) => Hn("text")
|
|
2824
3000
|
}, [s(u, null, {
|
|
2825
|
-
default: w(() => [s(
|
|
3001
|
+
default: w(() => [s(Pn)]),
|
|
2826
3002
|
_: 1
|
|
2827
3003
|
}), c[114] ||= o(" 文本题", -1)]),
|
|
2828
3004
|
a("div", {
|
|
2829
3005
|
class: "menu-item",
|
|
2830
|
-
onClick: c[30] ||= (e) =>
|
|
3006
|
+
onClick: c[30] ||= (e) => Hn("radio")
|
|
2831
3007
|
}, [s(u, null, {
|
|
2832
|
-
default: w(() => [s(
|
|
3008
|
+
default: w(() => [s(In)]),
|
|
2833
3009
|
_: 1
|
|
2834
3010
|
}), c[115] ||= o(" 单选题", -1)]),
|
|
2835
3011
|
a("div", {
|
|
2836
3012
|
class: "menu-item",
|
|
2837
|
-
onClick: c[31] ||= (e) =>
|
|
3013
|
+
onClick: c[31] ||= (e) => Hn("checkbox")
|
|
2838
3014
|
}, [s(u, null, {
|
|
2839
|
-
default: w(() => [s(
|
|
3015
|
+
default: w(() => [s(Ln)]),
|
|
2840
3016
|
_: 1
|
|
2841
3017
|
}), c[116] ||= o(" 多选题", -1)]),
|
|
2842
3018
|
a("div", {
|
|
2843
3019
|
class: "menu-item",
|
|
2844
|
-
onClick: c[32] ||= (e) =>
|
|
3020
|
+
onClick: c[32] ||= (e) => Hn("select")
|
|
2845
3021
|
}, [s(u, null, {
|
|
2846
|
-
default: w(() => [s(
|
|
3022
|
+
default: w(() => [s(k)]),
|
|
2847
3023
|
_: 1
|
|
2848
3024
|
}), c[117] ||= o(" 下拉题", -1)]),
|
|
2849
3025
|
a("div", {
|
|
2850
3026
|
class: "menu-item",
|
|
2851
|
-
onClick: c[33] ||= (e) =>
|
|
3027
|
+
onClick: c[33] ||= (e) => Hn("rating")
|
|
2852
3028
|
}, [s(u, null, {
|
|
2853
|
-
default: w(() => [s(
|
|
3029
|
+
default: w(() => [s(kn)]),
|
|
2854
3030
|
_: 1
|
|
2855
3031
|
}), c[118] ||= o(" 评分题", -1)]),
|
|
2856
3032
|
a("div", {
|
|
2857
3033
|
class: "menu-item",
|
|
2858
|
-
onClick: c[34] ||= (e) =>
|
|
3034
|
+
onClick: c[34] ||= (e) => Hn("scale")
|
|
2859
3035
|
}, [s(u, null, {
|
|
2860
|
-
default: w(() => [s(
|
|
3036
|
+
default: w(() => [s($)]),
|
|
2861
3037
|
_: 1
|
|
2862
3038
|
}), c[119] ||= o(" 量表题", -1)]),
|
|
2863
3039
|
a("div", {
|
|
2864
3040
|
class: "menu-item",
|
|
2865
|
-
onClick: c[35] ||= (e) =>
|
|
3041
|
+
onClick: c[35] ||= (e) => Hn("matrix")
|
|
2866
3042
|
}, [s(u, null, {
|
|
2867
|
-
default: w(() => [s(
|
|
3043
|
+
default: w(() => [s(Rn)]),
|
|
2868
3044
|
_: 1
|
|
2869
3045
|
}), c[120] ||= o(" 矩阵题", -1)])
|
|
2870
3046
|
], 2)) : r("", !0)
|
|
2871
3047
|
])])
|
|
2872
3048
|
], 512)])]),
|
|
2873
|
-
s(
|
|
2874
|
-
modelValue:
|
|
2875
|
-
"onUpdate:modelValue": c[38] ||= (e) =>
|
|
3049
|
+
s(zn, {
|
|
3050
|
+
modelValue: Ce.value,
|
|
3051
|
+
"onUpdate:modelValue": c[38] ||= (e) => Ce.value = e,
|
|
2876
3052
|
title: "AI生成题目",
|
|
2877
3053
|
width: "600px",
|
|
2878
3054
|
top: "10vh"
|
|
2879
3055
|
}, {
|
|
2880
|
-
footer: w(() => [s(p, { onClick: c[37] ||= (e) =>
|
|
3056
|
+
footer: w(() => [s(p, { onClick: c[37] ||= (e) => Ce.value = !1 }, {
|
|
2881
3057
|
default: w(() => [...c[126] ||= [o("取消", -1)]]),
|
|
2882
3058
|
_: 1
|
|
2883
3059
|
}), s(p, {
|
|
2884
3060
|
type: "primary",
|
|
2885
|
-
onClick:
|
|
2886
|
-
loading:
|
|
3061
|
+
onClick: gr,
|
|
3062
|
+
loading: we.value
|
|
2887
3063
|
}, {
|
|
2888
3064
|
default: w(() => [s(u, null, {
|
|
2889
|
-
default: w(() => [s(
|
|
3065
|
+
default: w(() => [s(L)]),
|
|
2890
3066
|
_: 1
|
|
2891
3067
|
}), c[127] ||= o(" 生成题目 ", -1)]),
|
|
2892
3068
|
_: 1
|
|
2893
3069
|
}, 8, ["loading"])]),
|
|
2894
|
-
default: w(() => [a("div",
|
|
2895
|
-
a("div",
|
|
2896
|
-
a("div",
|
|
2897
|
-
modelValue:
|
|
2898
|
-
"onUpdate:modelValue": c[36] ||= (e) =>
|
|
3070
|
+
default: w(() => [a("div", ln, [
|
|
3071
|
+
a("div", un, [a("label", null, [c[121] ||= o("当前题型:", -1), a("span", dn, x(Me(ke.value)), 1)])]),
|
|
3072
|
+
a("div", fn, [c[122] ||= a("label", null, "请输入生成要求:", -1), s(m, {
|
|
3073
|
+
modelValue: Te.value,
|
|
3074
|
+
"onUpdate:modelValue": c[36] ||= (e) => Te.value = e,
|
|
2899
3075
|
type: "textarea",
|
|
2900
3076
|
rows: 4,
|
|
2901
3077
|
placeholder: "例如:请生成一道关于JavaScript基础的单选题,考察变量声明的概念"
|
|
2902
3078
|
}, null, 8, ["modelValue"])]),
|
|
2903
|
-
a("div",
|
|
3079
|
+
a("div", pn, [c[125] ||= a("label", null, "上传参考附件(可选):", -1), s(X, {
|
|
2904
3080
|
ref_key: "aiGenUploadRef",
|
|
2905
|
-
ref:
|
|
3081
|
+
ref: Ae,
|
|
2906
3082
|
"auto-upload": !1,
|
|
2907
|
-
"on-change":
|
|
2908
|
-
"file-list":
|
|
3083
|
+
"on-change": hr,
|
|
3084
|
+
"file-list": Ee.value,
|
|
2909
3085
|
accept: ".txt,.pdf,.doc,.docx,.md",
|
|
2910
3086
|
limit: 5
|
|
2911
3087
|
}, {
|
|
@@ -2915,7 +3091,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2915
3091
|
type: "primary"
|
|
2916
3092
|
}, {
|
|
2917
3093
|
default: w(() => [s(u, null, {
|
|
2918
|
-
default: w(() => [s(
|
|
3094
|
+
default: w(() => [s(O)]),
|
|
2919
3095
|
_: 1
|
|
2920
3096
|
}), c[123] ||= o(" 选择文件 ", -1)]),
|
|
2921
3097
|
_: 1
|
|
@@ -2925,73 +3101,73 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
2925
3101
|
])]),
|
|
2926
3102
|
_: 1
|
|
2927
3103
|
}, 8, ["modelValue"]),
|
|
2928
|
-
s(
|
|
2929
|
-
modelValue:
|
|
2930
|
-
"onUpdate:modelValue": c[40] ||= (e) =>
|
|
3104
|
+
s(zn, {
|
|
3105
|
+
modelValue: ge.value,
|
|
3106
|
+
"onUpdate:modelValue": c[40] ||= (e) => ge.value = e,
|
|
2931
3107
|
title: "AI智能分析",
|
|
2932
3108
|
width: "800px",
|
|
2933
3109
|
top: "5vh"
|
|
2934
3110
|
}, {
|
|
2935
|
-
footer: w(() => [s(p, { onClick: c[39] ||= (e) =>
|
|
3111
|
+
footer: w(() => [s(p, { onClick: c[39] ||= (e) => ge.value = !1 }, {
|
|
2936
3112
|
default: w(() => [...c[132] ||= [o("关闭", -1)]]),
|
|
2937
3113
|
_: 1
|
|
2938
3114
|
}), s(p, {
|
|
2939
3115
|
type: "primary",
|
|
2940
|
-
onClick:
|
|
2941
|
-
loading:
|
|
3116
|
+
onClick: yr,
|
|
3117
|
+
loading: _e.value
|
|
2942
3118
|
}, {
|
|
2943
3119
|
default: w(() => [s(u, null, {
|
|
2944
|
-
default: w(() => [s(
|
|
3120
|
+
default: w(() => [s(L)]),
|
|
2945
3121
|
_: 1
|
|
2946
3122
|
}), c[133] ||= o(" 开始分析 ", -1)]),
|
|
2947
3123
|
_: 1
|
|
2948
3124
|
}, 8, ["loading"])]),
|
|
2949
|
-
default: w(() => [a("div",
|
|
3125
|
+
default: w(() => [a("div", mn, [_e.value ? (g(), i("div", hn, [s(u, {
|
|
2950
3126
|
class: "is-loading",
|
|
2951
3127
|
size: 40
|
|
2952
3128
|
}, {
|
|
2953
|
-
default: w(() => [s(
|
|
3129
|
+
default: w(() => [s(Bn)]),
|
|
2954
3130
|
_: 1
|
|
2955
|
-
}), c[128] ||= a("p", null, "正在分析问卷数据...", -1)])) :
|
|
3131
|
+
}), c[128] ||= a("p", null, "正在分析问卷数据...", -1)])) : ve.value ? (g(), i("div", gn, [a("div", _n, [c[130] ||= a("h3", null, "分析结果", -1), s(p, {
|
|
2956
3132
|
size: "small",
|
|
2957
3133
|
type: "primary",
|
|
2958
|
-
onClick:
|
|
3134
|
+
onClick: Sr
|
|
2959
3135
|
}, {
|
|
2960
3136
|
default: w(() => [s(u, null, {
|
|
2961
|
-
default: w(() => [s(
|
|
3137
|
+
default: w(() => [s(D)]),
|
|
2962
3138
|
_: 1
|
|
2963
3139
|
}), c[129] ||= o(" 下载HTML报告 ", -1)]),
|
|
2964
3140
|
_: 1
|
|
2965
3141
|
})]), a("div", {
|
|
2966
3142
|
class: "ai-result-content",
|
|
2967
|
-
innerHTML:
|
|
2968
|
-
}, null, 8,
|
|
3143
|
+
innerHTML: ve.value
|
|
3144
|
+
}, null, 8, vn)])) : (g(), i("div", yn, [...c[131] ||= [a("p", null, "点击\"开始分析\"按钮,AI将对问卷数据进行智能分析", -1)]]))])]),
|
|
2969
3145
|
_: 1
|
|
2970
3146
|
}, 8, ["modelValue"]),
|
|
2971
|
-
s(
|
|
2972
|
-
modelValue:
|
|
2973
|
-
"onUpdate:modelValue": c[42] ||= (e) =>
|
|
3147
|
+
s(zn, {
|
|
3148
|
+
modelValue: pe.value,
|
|
3149
|
+
"onUpdate:modelValue": c[42] ||= (e) => pe.value = e,
|
|
2974
3150
|
title: "问卷分发",
|
|
2975
3151
|
width: "680px",
|
|
2976
3152
|
top: "5vh"
|
|
2977
3153
|
}, {
|
|
2978
|
-
default: w(() => [a("div",
|
|
3154
|
+
default: w(() => [a("div", bn, [
|
|
2979
3155
|
c[138] ||= a("p", { class: "distribute-desc" }, "输入邮箱地址,系统将为每个邮箱生成唯一填写链接。支持手动输入或导入Excel。", -1),
|
|
2980
|
-
a("div",
|
|
2981
|
-
modelValue:
|
|
2982
|
-
"onUpdate:modelValue": c[41] ||= (e) =>
|
|
3156
|
+
a("div", xn, [s(m, {
|
|
3157
|
+
modelValue: me.value,
|
|
3158
|
+
"onUpdate:modelValue": c[41] ||= (e) => me.value = e,
|
|
2983
3159
|
type: "textarea",
|
|
2984
3160
|
rows: 6,
|
|
2985
3161
|
placeholder: "请输入邮箱地址,每行一个,支持逗号分隔\n例:\nuser1@example.com\nuser2@example.com"
|
|
2986
3162
|
}, null, 8, ["modelValue"])]),
|
|
2987
|
-
a("div",
|
|
3163
|
+
a("div", Sn, [s(X, {
|
|
2988
3164
|
"show-file-list": !1,
|
|
2989
|
-
"before-upload":
|
|
3165
|
+
"before-upload": cr,
|
|
2990
3166
|
accept: ".xlsx,.xls,.csv"
|
|
2991
3167
|
}, {
|
|
2992
3168
|
default: w(() => [s(p, { size: "small" }, {
|
|
2993
3169
|
default: w(() => [s(u, null, {
|
|
2994
|
-
default: w(() => [s(
|
|
3170
|
+
default: w(() => [s(O)]),
|
|
2995
3171
|
_: 1
|
|
2996
3172
|
}), c[134] ||= o(" 导入Excel/CSV", -1)]),
|
|
2997
3173
|
_: 1
|
|
@@ -3000,51 +3176,51 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3000
3176
|
}), s(p, {
|
|
3001
3177
|
size: "small",
|
|
3002
3178
|
type: "primary",
|
|
3003
|
-
onClick:
|
|
3179
|
+
onClick: lr
|
|
3004
3180
|
}, {
|
|
3005
3181
|
default: w(() => [s(u, null, {
|
|
3006
|
-
default: w(() => [s(
|
|
3182
|
+
default: w(() => [s(ie)]),
|
|
3007
3183
|
_: 1
|
|
3008
3184
|
}), c[135] ||= o(" 生成链接 ", -1)]),
|
|
3009
3185
|
_: 1
|
|
3010
3186
|
})]),
|
|
3011
|
-
|
|
3187
|
+
he.value.length > 0 ? (g(), i("div", Cn, [a("div", wn, [a("span", null, "已生成 " + x(he.value.length) + " 条链接", 1), s(p, {
|
|
3012
3188
|
size: "small",
|
|
3013
3189
|
type: "success",
|
|
3014
|
-
onClick:
|
|
3190
|
+
onClick: dr
|
|
3015
3191
|
}, {
|
|
3016
3192
|
default: w(() => [s(u, null, {
|
|
3017
|
-
default: w(() => [s(
|
|
3193
|
+
default: w(() => [s(D)]),
|
|
3018
3194
|
_: 1
|
|
3019
3195
|
}), c[136] ||= o(" 下载Excel ", -1)]),
|
|
3020
3196
|
_: 1
|
|
3021
|
-
})]), s(
|
|
3022
|
-
data:
|
|
3197
|
+
})]), s(Qn, {
|
|
3198
|
+
data: he.value,
|
|
3023
3199
|
size: "small",
|
|
3024
3200
|
"max-height": "300",
|
|
3025
3201
|
stripe: ""
|
|
3026
3202
|
}, {
|
|
3027
3203
|
default: w(() => [
|
|
3028
|
-
s(
|
|
3204
|
+
s(Vn, {
|
|
3029
3205
|
prop: "email",
|
|
3030
3206
|
label: "邮箱",
|
|
3031
3207
|
"min-width": "200"
|
|
3032
3208
|
}),
|
|
3033
|
-
s(
|
|
3209
|
+
s(Vn, {
|
|
3034
3210
|
label: "填写链接",
|
|
3035
3211
|
"min-width": "300"
|
|
3036
3212
|
}, {
|
|
3037
|
-
default: w(({ row: e }) => [s(
|
|
3213
|
+
default: w(({ row: e }) => [s(Zn, {
|
|
3038
3214
|
type: "primary",
|
|
3039
3215
|
underline: !1,
|
|
3040
|
-
onClick: (t) =>
|
|
3216
|
+
onClick: (t) => ur(e.url)
|
|
3041
3217
|
}, {
|
|
3042
3218
|
default: w(() => [o(x(e.url), 1)]),
|
|
3043
3219
|
_: 2
|
|
3044
3220
|
}, 1032, ["onClick"])]),
|
|
3045
3221
|
_: 1
|
|
3046
3222
|
}),
|
|
3047
|
-
s(
|
|
3223
|
+
s(Vn, {
|
|
3048
3224
|
label: "操作",
|
|
3049
3225
|
width: "70",
|
|
3050
3226
|
align: "center"
|
|
@@ -3053,7 +3229,7 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3053
3229
|
size: "small",
|
|
3054
3230
|
type: "primary",
|
|
3055
3231
|
link: "",
|
|
3056
|
-
onClick: (t) =>
|
|
3232
|
+
onClick: (t) => ur(e.url)
|
|
3057
3233
|
}, {
|
|
3058
3234
|
default: w(() => [...c[137] ||= [o("复制", -1)]]),
|
|
3059
3235
|
_: 1
|
|
@@ -3066,19 +3242,19 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3066
3242
|
])]),
|
|
3067
3243
|
_: 1
|
|
3068
3244
|
}, 8, ["modelValue"]),
|
|
3069
|
-
s(
|
|
3070
|
-
visible:
|
|
3071
|
-
messages: S(
|
|
3072
|
-
loading: S(
|
|
3073
|
-
"is-collab": S(
|
|
3074
|
-
"collab-users": S(
|
|
3075
|
-
"current-user": S(
|
|
3076
|
-
"is-owner": !
|
|
3077
|
-
onSend:
|
|
3078
|
-
onClose: c[43] ||= (e) =>
|
|
3079
|
-
"unread-mention": S(
|
|
3080
|
-
onClearUnread: c[44] ||= (e) => S(
|
|
3081
|
-
onClear:
|
|
3245
|
+
s(Oe, {
|
|
3246
|
+
visible: ye.value,
|
|
3247
|
+
messages: S(B).messages.value,
|
|
3248
|
+
loading: S(B).loading.value,
|
|
3249
|
+
"is-collab": S(B).isCollabMode.value,
|
|
3250
|
+
"collab-users": S(B).collabUsers.value,
|
|
3251
|
+
"current-user": S(B).currentUser.value,
|
|
3252
|
+
"is-owner": !H.value,
|
|
3253
|
+
onSend: Or,
|
|
3254
|
+
onClose: c[43] ||= (e) => ye.value = !1,
|
|
3255
|
+
"unread-mention": S(B).unreadMention.value,
|
|
3256
|
+
onClearUnread: c[44] ||= (e) => S(B).clearUnreadMention(),
|
|
3257
|
+
onClear: kr
|
|
3082
3258
|
}, null, 8, [
|
|
3083
3259
|
"visible",
|
|
3084
3260
|
"messages",
|
|
@@ -3089,16 +3265,16 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3089
3265
|
"is-owner",
|
|
3090
3266
|
"unread-mention"
|
|
3091
3267
|
]),
|
|
3092
|
-
s(
|
|
3093
|
-
modelValue:
|
|
3094
|
-
"onUpdate:modelValue": c[45] ||= (e) =>
|
|
3095
|
-
"document-id":
|
|
3096
|
-
onApply:
|
|
3268
|
+
s(Le, {
|
|
3269
|
+
modelValue: xe.value,
|
|
3270
|
+
"onUpdate:modelValue": c[45] ||= (e) => xe.value = e,
|
|
3271
|
+
"document-id": R.value,
|
|
3272
|
+
onApply: Tr
|
|
3097
3273
|
}, null, 8, ["modelValue", "document-id"])
|
|
3098
3274
|
], 64);
|
|
3099
3275
|
};
|
|
3100
3276
|
}
|
|
3101
|
-
}, [["__scopeId", "data-v-
|
|
3277
|
+
}, [["__scopeId", "data-v-927591ce"]]), Z = c({
|
|
3102
3278
|
name: "YourCompanyQuestionnaire",
|
|
3103
3279
|
props: {
|
|
3104
3280
|
docId: {
|
|
@@ -3109,6 +3285,14 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3109
3285
|
type: String,
|
|
3110
3286
|
default: "/api"
|
|
3111
3287
|
},
|
|
3288
|
+
saveApi: {
|
|
3289
|
+
type: [String, Function],
|
|
3290
|
+
default: null
|
|
3291
|
+
},
|
|
3292
|
+
loadApi: {
|
|
3293
|
+
type: [String, Function],
|
|
3294
|
+
default: null
|
|
3295
|
+
},
|
|
3112
3296
|
wsUrl: {
|
|
3113
3297
|
type: String,
|
|
3114
3298
|
default: ""
|
|
@@ -3121,6 +3305,14 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3121
3305
|
color: ""
|
|
3122
3306
|
})
|
|
3123
3307
|
},
|
|
3308
|
+
uiConfig: {
|
|
3309
|
+
type: Object,
|
|
3310
|
+
default: () => ({})
|
|
3311
|
+
},
|
|
3312
|
+
aiApi: {
|
|
3313
|
+
type: [String, Object],
|
|
3314
|
+
default: null
|
|
3315
|
+
},
|
|
3124
3316
|
roomId: {
|
|
3125
3317
|
type: String,
|
|
3126
3318
|
default: ""
|
|
@@ -3130,8 +3322,8 @@ document.getElementById('qform').addEventListener('submit', function(e) {
|
|
|
3130
3322
|
return () => l("div", {
|
|
3131
3323
|
class: "yourcompany-questionnaire-wrapper",
|
|
3132
3324
|
style: "position:relative"
|
|
3133
|
-
}, [l(
|
|
3325
|
+
}, [l(X, { ...e }), l(D)]);
|
|
3134
3326
|
}
|
|
3135
3327
|
});
|
|
3136
3328
|
//#endregion
|
|
3137
|
-
export {
|
|
3329
|
+
export { Z as default };
|