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