st-comp 0.0.269 → 0.0.270

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.
@@ -3,12 +3,12 @@ import { E as be } from "./el-dialog-59a23c2b.js";
3
3
  import "./el-overlay-465cd11e.js";
4
4
  import { E as we } from "./el-button-cd144ee1.js";
5
5
  import { E as Te } from "./el-input-1f14a6e2.js";
6
- import { defineComponent as se, ref as b, computed as f, watch as re, openBlock as i, createElementBlock as d, normalizeClass as C, unref as s, normalizeStyle as z, createBlock as q, withCtx as E, resolveDynamicComponent as ge, renderSlot as le, createElementVNode as o, toDisplayString as O, createCommentVNode as M, inject as Se, reactive as Ce, nextTick as ae, Fragment as W, createVNode as S, renderList as ue, createTextVNode as ne, pushScopeId as $e, popScopeId as Ee } from "vue";
6
+ import { defineComponent as se, ref as w, computed as f, watch as re, openBlock as i, createElementBlock as d, normalizeClass as y, unref as s, normalizeStyle as x, createBlock as K, withCtx as P, resolveDynamicComponent as ge, renderSlot as le, createElementVNode as r, toDisplayString as O, createCommentVNode as A, inject as Se, reactive as Ce, nextTick as ae, Fragment as q, createVNode as C, renderList as ue, createTextVNode as ne, pushScopeId as $e, popScopeId as Ee } from "vue";
7
7
  import { d as X } from "./dayjs.min-8313b006.js";
8
8
  import { V as Pe, U as De } from "./index-7ed0999e.js";
9
9
  import { s as Fe } from "./aiTools-9c59a74a.js";
10
- import { E as ie, w as Ne, o as Ve, p as Me, s as Ae, c as Ye, u as He, t as Le, v as Be, x as Ie, y as xe } from "./index-1b97095f.js";
11
- import { _ as ze } from "./_plugin-vue_export-helper-dad06003.js";
10
+ import { E as ie, w as Ne, o as Ve, p as Me, s as Ae, c as Ye, u as He, t as Le, v as Be, x as Ie, y as ze } from "./index-1b97095f.js";
11
+ import { _ as xe } from "./_plugin-vue_export-helper-dad06003.js";
12
12
  import { E as ee } from "./index-499cf989.js";
13
13
  import { k as Oe, i as Re } from "./use-form-common-props-dd9617de.js";
14
14
  import "./index-8e88a0bd.js";
@@ -57,35 +57,35 @@ const Ue = de({
57
57
  props: Ue,
58
58
  emits: je,
59
59
  setup(p, { emit: c }) {
60
- const P = p, r = fe("avatar"), D = b(!1), F = f(() => {
61
- const { size: u, icon: v, shape: A } = P, w = [r.b()];
62
- return oe(u) && w.push(r.m(u)), v && w.push(r.m("icon")), A && w.push(r.m(A)), w;
60
+ const D = p, l = fe("avatar"), F = w(!1), N = f(() => {
61
+ const { size: u, icon: v, shape: $ } = D, T = [l.b()];
62
+ return oe(u) && T.push(l.m(u)), v && T.push(l.m("icon")), $ && T.push(l.m($)), T;
63
63
  }), U = f(() => {
64
- const { size: u } = P;
65
- return pe(u) ? r.cssVarBlock({
64
+ const { size: u } = D;
65
+ return pe(u) ? l.cssVarBlock({
66
66
  size: _e(u) || ""
67
67
  }) : void 0;
68
- }), j = f(() => ({
69
- objectFit: P.fit
68
+ }), J = f(() => ({
69
+ objectFit: D.fit
70
70
  }));
71
- re(() => P.src, () => D.value = !1);
71
+ re(() => D.src, () => F.value = !1);
72
72
  function k(u) {
73
- D.value = !0, c("error", u);
73
+ F.value = !0, c("error", u);
74
74
  }
75
75
  return (u, v) => (i(), d("span", {
76
- class: C(s(F)),
77
- style: z(s(U))
76
+ class: y(s(N)),
77
+ style: x(s(U))
78
78
  }, [
79
- (u.src || u.srcSet) && !D.value ? (i(), d("img", {
79
+ (u.src || u.srcSet) && !F.value ? (i(), d("img", {
80
80
  key: 0,
81
81
  src: u.src,
82
82
  alt: u.alt,
83
83
  srcset: u.srcSet,
84
- style: z(s(j)),
84
+ style: x(s(J)),
85
85
  onError: k
86
- }, null, 44, ["src", "alt", "srcset"])) : u.icon ? (i(), q(s(ie), { key: 1 }, {
87
- default: E(() => [
88
- (i(), q(ge(u.icon)))
86
+ }, null, 44, ["src", "alt", "srcset"])) : u.icon ? (i(), K(s(ie), { key: 1 }, {
87
+ default: P(() => [
88
+ (i(), K(ge(u.icon)))
89
89
  ]),
90
90
  _: 1
91
91
  })) : le(u.$slots, "default", { key: 2 })
@@ -151,18 +151,18 @@ const Ke = ve(qe), Ge = de({
151
151
  ...Qe,
152
152
  props: Ge,
153
153
  setup(p) {
154
- const c = p, P = {
154
+ const c = p, D = {
155
155
  success: "#13ce66",
156
156
  exception: "#ff4949",
157
157
  warning: "#e6a23c",
158
158
  default: "#20a0ff"
159
- }, r = fe("progress"), D = f(() => {
159
+ }, l = fe("progress"), F = f(() => {
160
160
  const e = {
161
161
  width: `${c.percentage}%`,
162
162
  animationDuration: `${c.duration}s`
163
- }, g = K(c.percentage);
163
+ }, g = G(c.percentage);
164
164
  return g.includes("gradient") ? e.background = g : e.backgroundColor = g, e;
165
- }), F = f(() => (c.strokeWidth / c.width * 100).toFixed(1)), U = f(() => ["circle", "dashboard"].includes(c.type) ? Number.parseInt(`${50 - Number.parseFloat(F.value) / 2}`, 10) : 0), j = f(() => {
165
+ }), N = f(() => (c.strokeWidth / c.width * 100).toFixed(1)), U = f(() => ["circle", "dashboard"].includes(c.type) ? Number.parseInt(`${50 - Number.parseFloat(N.value) / 2}`, 10) : 0), J = f(() => {
166
166
  const e = U.value, g = c.type === "dashboard";
167
167
  return `
168
168
  M 50 50
@@ -170,25 +170,25 @@ const Ke = ve(qe), Ge = de({
170
170
  a ${e} ${e} 0 1 1 0 ${g ? "-" : ""}${e * 2}
171
171
  a ${e} ${e} 0 1 1 0 ${g ? "" : "-"}${e * 2}
172
172
  `;
173
- }), k = f(() => 2 * Math.PI * U.value), u = f(() => c.type === "dashboard" ? 0.75 : 1), v = f(() => `${-1 * k.value * (1 - u.value) / 2}px`), A = f(() => ({
173
+ }), k = f(() => 2 * Math.PI * U.value), u = f(() => c.type === "dashboard" ? 0.75 : 1), v = f(() => `${-1 * k.value * (1 - u.value) / 2}px`), $ = f(() => ({
174
174
  strokeDasharray: `${k.value * u.value}px, ${k.value}px`,
175
175
  strokeDashoffset: v.value
176
- })), w = f(() => ({
176
+ })), T = f(() => ({
177
177
  strokeDasharray: `${k.value * u.value * (c.percentage / 100)}px, ${k.value}px`,
178
178
  strokeDashoffset: v.value,
179
179
  transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
180
- })), l = f(() => {
180
+ })), o = f(() => {
181
181
  let e;
182
- return c.color ? e = K(c.percentage) : e = P[c.status] || P.default, e;
183
- }), N = f(() => c.status === "warning" ? Ne : c.type === "line" ? c.status === "success" ? Ve : Me : c.status === "success" ? Ae : Ye), Y = f(() => c.type === "line" ? 12 + c.strokeWidth * 0.4 : c.width * 0.111111 + 2), H = f(() => c.format(c.percentage));
182
+ return c.color ? e = G(c.percentage) : e = D[c.status] || D.default, e;
183
+ }), V = f(() => c.status === "warning" ? Ne : c.type === "line" ? c.status === "success" ? Ve : Me : c.status === "success" ? Ae : Ye), Y = f(() => c.type === "line" ? 12 + c.strokeWidth * 0.4 : c.width * 0.111111 + 2), H = f(() => c.format(c.percentage));
184
184
  function Z(e) {
185
185
  const g = 100 / e.length;
186
- return e.map((y, B) => oe(y) ? {
187
- color: y,
186
+ return e.map((b, B) => oe(b) ? {
187
+ color: b,
188
188
  percentage: (B + 1) * g
189
- } : y).sort((y, B) => y.percentage - B.percentage);
189
+ } : b).sort((b, B) => b.percentage - B.percentage);
190
190
  }
191
- const K = (e) => {
191
+ const G = (e) => {
192
192
  var g;
193
193
  const { color: L } = c;
194
194
  if (ye(L))
@@ -196,21 +196,21 @@ const Ke = ve(qe), Ge = de({
196
196
  if (oe(L))
197
197
  return L;
198
198
  {
199
- const y = Z(L);
200
- for (const B of y)
199
+ const b = Z(L);
200
+ for (const B of b)
201
201
  if (B.percentage > e)
202
202
  return B.color;
203
- return (g = y[y.length - 1]) == null ? void 0 : g.color;
203
+ return (g = b[b.length - 1]) == null ? void 0 : g.color;
204
204
  }
205
205
  };
206
206
  return (e, g) => (i(), d("div", {
207
- class: C([
208
- s(r).b(),
209
- s(r).m(e.type),
210
- s(r).is(e.status),
207
+ class: y([
208
+ s(l).b(),
209
+ s(l).m(e.type),
210
+ s(l).is(e.status),
211
211
  {
212
- [s(r).m("without-text")]: !e.showText,
213
- [s(r).m("text-inside")]: e.textInside
212
+ [s(l).m("without-text")]: !e.showText,
213
+ [s(l).m("text-inside")]: e.textInside
214
214
  }
215
215
  ]),
216
216
  role: "progressbar",
@@ -220,98 +220,95 @@ const Ke = ve(qe), Ge = de({
220
220
  }, [
221
221
  e.type === "line" ? (i(), d("div", {
222
222
  key: 0,
223
- class: C(s(r).b("bar"))
223
+ class: y(s(l).b("bar"))
224
224
  }, [
225
- o("div", {
226
- class: C(s(r).be("bar", "outer")),
227
- style: z({ height: `${e.strokeWidth}px` })
225
+ r("div", {
226
+ class: y(s(l).be("bar", "outer")),
227
+ style: x({ height: `${e.strokeWidth}px` })
228
228
  }, [
229
- o("div", {
230
- class: C([
231
- s(r).be("bar", "inner"),
232
- { [s(r).bem("bar", "inner", "indeterminate")]: e.indeterminate },
233
- { [s(r).bem("bar", "inner", "striped")]: e.striped },
234
- { [s(r).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
229
+ r("div", {
230
+ class: y([
231
+ s(l).be("bar", "inner"),
232
+ { [s(l).bem("bar", "inner", "indeterminate")]: e.indeterminate },
233
+ { [s(l).bem("bar", "inner", "striped")]: e.striped },
234
+ { [s(l).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
235
235
  ]),
236
- style: z(s(D))
236
+ style: x(s(F))
237
237
  }, [
238
238
  (e.showText || e.$slots.default) && e.textInside ? (i(), d("div", {
239
239
  key: 0,
240
- class: C(s(r).be("bar", "innerText"))
240
+ class: y(s(l).be("bar", "innerText"))
241
241
  }, [
242
242
  le(e.$slots, "default", { percentage: e.percentage }, () => [
243
- o("span", null, O(s(H)), 1)
243
+ r("span", null, O(s(H)), 1)
244
244
  ])
245
- ], 2)) : M("v-if", !0)
245
+ ], 2)) : A("v-if", !0)
246
246
  ], 6)
247
247
  ], 6)
248
248
  ], 2)) : (i(), d("div", {
249
249
  key: 1,
250
- class: C(s(r).b("circle")),
251
- style: z({ height: `${e.width}px`, width: `${e.width}px` })
250
+ class: y(s(l).b("circle")),
251
+ style: x({ height: `${e.width}px`, width: `${e.width}px` })
252
252
  }, [
253
253
  (i(), d("svg", { viewBox: "0 0 100 100" }, [
254
- o("path", {
255
- class: C(s(r).be("circle", "track")),
256
- d: s(j),
257
- stroke: `var(${s(r).cssVarName("fill-color-light")}, #e5e9f2)`,
254
+ r("path", {
255
+ class: y(s(l).be("circle", "track")),
256
+ d: s(J),
257
+ stroke: `var(${s(l).cssVarName("fill-color-light")}, #e5e9f2)`,
258
258
  "stroke-linecap": e.strokeLinecap,
259
- "stroke-width": s(F),
259
+ "stroke-width": s(N),
260
260
  fill: "none",
261
- style: z(s(A))
261
+ style: x(s($))
262
262
  }, null, 14, ["d", "stroke", "stroke-linecap", "stroke-width"]),
263
- o("path", {
264
- class: C(s(r).be("circle", "path")),
265
- d: s(j),
266
- stroke: s(l),
263
+ r("path", {
264
+ class: y(s(l).be("circle", "path")),
265
+ d: s(J),
266
+ stroke: s(o),
267
267
  fill: "none",
268
268
  opacity: e.percentage ? 1 : 0,
269
269
  "stroke-linecap": e.strokeLinecap,
270
- "stroke-width": s(F),
271
- style: z(s(w))
270
+ "stroke-width": s(N),
271
+ style: x(s(T))
272
272
  }, null, 14, ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"])
273
273
  ]))
274
274
  ], 6)),
275
275
  (e.showText || e.$slots.default) && !e.textInside ? (i(), d("div", {
276
276
  key: 2,
277
- class: C(s(r).e("text")),
278
- style: z({ fontSize: `${s(Y)}px` })
277
+ class: y(s(l).e("text")),
278
+ style: x({ fontSize: `${s(Y)}px` })
279
279
  }, [
280
280
  le(e.$slots, "default", { percentage: e.percentage }, () => [
281
- e.status ? (i(), q(s(ie), { key: 1 }, {
282
- default: E(() => [
283
- (i(), q(ge(s(N))))
281
+ e.status ? (i(), K(s(ie), { key: 1 }, {
282
+ default: P(() => [
283
+ (i(), K(ge(s(V))))
284
284
  ]),
285
285
  _: 1
286
286
  })) : (i(), d("span", { key: 0 }, O(s(H)), 1))
287
287
  ])
288
- ], 6)) : M("v-if", !0)
288
+ ], 6)) : A("v-if", !0)
289
289
  ], 10, ["aria-valuenow"]));
290
290
  }
291
291
  });
292
292
  var Ze = /* @__PURE__ */ me(Xe, [["__file", "progress.vue"]]);
293
293
  const et = ve(Ze);
294
- const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-dialog-body" }, st = { class: "avatar" }, at = { class: "message-content" }, nt = {
294
+ const R = (p) => ($e("data-v-8e2737b7"), p = p(), Ee(), p), tt = { class: "ai-dialog-body" }, st = { class: "avatar" }, at = { class: "message-content" }, nt = {
295
295
  key: 0,
296
296
  class: "node-progress"
297
- }, ot = { class: "node-status-icon" }, rt = { class: "node-name" }, lt = { class: "progress-footer" }, it = { class: "progress-text" }, ct = ["innerHTML"], ut = {
298
- key: 2,
299
- class: "message-text"
300
- }, dt = { class: "message-createTime" }, pt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), ft = { class: "feedback-buttons" }, mt = ["onClick"], vt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👍", -1)), gt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "满意", -1)), ht = [
301
- vt,
302
- gt
303
- ], kt = ["onClick"], _t = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", { class: "btn-emoji" }, "👎", -1)), yt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("span", { class: "btn-text" }, "不满意", -1)), bt = [
304
- _t,
305
- yt
306
- ], wt = {
297
+ }, ot = { class: "node-status-icon" }, rt = { class: "node-name" }, lt = { class: "progress-footer" }, it = { class: "progress-text" }, ct = ["innerHTML"], ut = { class: "message-createTime" }, dt = /* @__PURE__ */ R(() => /* @__PURE__ */ r("div", { class: "message-createTime" }, "请问对本轮查询结果是否满意?", -1)), pt = { class: "feedback-buttons" }, ft = ["onClick"], mt = /* @__PURE__ */ R(() => /* @__PURE__ */ r("span", { class: "btn-emoji" }, "👍", -1)), vt = /* @__PURE__ */ R(() => /* @__PURE__ */ r("span", { class: "btn-text" }, "满意", -1)), gt = [
298
+ mt,
299
+ vt
300
+ ], ht = ["onClick"], kt = /* @__PURE__ */ R(() => /* @__PURE__ */ r("span", { class: "btn-emoji" }, "👎", -1)), _t = /* @__PURE__ */ R(() => /* @__PURE__ */ r("span", { class: "btn-text" }, "不满意", -1)), yt = [
301
+ kt,
302
+ _t
303
+ ], bt = {
307
304
  key: 1,
308
305
  class: "message-createTime"
309
- }, Tt = {
306
+ }, wt = {
310
307
  key: 0,
311
308
  class: "thinking-placeholder"
312
- }, St = { class: "input-area" }, Ct = { class: "input-actions" }, $t = /* @__PURE__ */ R(() => /* @__PURE__ */ o("div", { class: "input-hint" }, [
313
- /* @__PURE__ */ o("span", null, "Enter 发送 | Ctrl + Enter 换行")
314
- ], -1)), Et = { class: "feedback-dialog-content" }, Pt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("div", { class: "feedback-emoji" }, "😟", -1)), Dt = /* @__PURE__ */ R(() => /* @__PURE__ */ o("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), Ft = { class: "dialog-footer" }, Nt = {
309
+ }, Tt = { class: "input-area" }, St = { class: "input-actions" }, Ct = /* @__PURE__ */ R(() => /* @__PURE__ */ r("div", { class: "input-hint" }, [
310
+ /* @__PURE__ */ r("span", null, "Enter 发送 | Ctrl + Enter 换行")
311
+ ], -1)), $t = { class: "feedback-dialog-content" }, Et = /* @__PURE__ */ R(() => /* @__PURE__ */ r("div", { class: "feedback-emoji" }, "😟", -1)), Pt = /* @__PURE__ */ R(() => /* @__PURE__ */ r("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), Dt = { class: "dialog-footer" }, Ft = {
315
312
  __name: "index",
316
313
  props: {
317
314
  defaultMessage: {
@@ -323,11 +320,11 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
323
320
  }
324
321
  },
325
322
  emits: ["callBack"],
326
- setup(p, { expose: c, emit: P }) {
327
- const r = Se("stConfig"), D = Ce(Pe()), F = b(!1), U = P, j = p, k = b(!1), u = b(!1), v = b([]), A = b(!1), w = b(null), l = b([
323
+ setup(p, { expose: c, emit: D }) {
324
+ const l = Se("stConfig"), F = Ce(Pe()), N = w(!1), U = D, J = p, k = w(!1), u = w(!1), v = w([]), $ = w(!1), T = w(null), o = w([
328
325
  {
329
326
  role: "assistant",
330
- content: j.defaultMessage,
327
+ content: J.defaultMessage,
331
328
  userContent: null,
332
329
  showFeedback: !1,
333
330
  hasFeedback: !1,
@@ -335,10 +332,10 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
335
332
  resTime: 0,
336
333
  firstPackageTime: 0
337
334
  }
338
- ]), N = b(""), Y = b(!1), H = b(""), Z = b({}), K = f(() => v.value.filter((a) => a.status === "success").length), e = f(() => v.value.length), g = f(() => e.value ? K.value / e.value * 100 : 0), L = f(() => {
335
+ ]), V = w(""), Y = w(!1), H = w(""), Z = w({}), G = f(() => v.value.filter((a) => a.status === "success").length), e = f(() => v.value.length), g = f(() => e.value ? G.value / e.value * 100 : 0), L = f(() => {
339
336
  const a = v.value.find((t) => t.status === "executing");
340
337
  return a ? a.name : "处理中";
341
- }), y = (a) => {
338
+ }), b = (a) => {
342
339
  if (typeof a != "string")
343
340
  return !1;
344
341
  try {
@@ -348,11 +345,11 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
348
345
  return !1;
349
346
  }
350
347
  }, B = (a) => {
351
- if (!y(a))
348
+ if (!b(a))
352
349
  return null;
353
350
  try {
354
- const t = JSON.parse(a), { parsedConditions: n, ...T } = t;
355
- return { parsedConditions: n, webParams: T };
351
+ const t = JSON.parse(a), { parsedConditions: n, ...S } = t;
352
+ return { parsedConditions: n, webParams: S };
356
353
  } catch {
357
354
  return null;
358
355
  }
@@ -361,15 +358,15 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
361
358
  if (!a)
362
359
  return "";
363
360
  let t = "";
364
- return (n = a.parsedConditions) != null && n.length && (t += '<div class="parsed-conditions">', a.parsedConditions.forEach((T) => {
365
- t += `<div class="parsed-conditions-item">${T}</div>`;
361
+ return (n = a.parsedConditions) != null && n.length && (t += '<div class="parsed-conditions">', a.parsedConditions.forEach((S) => {
362
+ t += `<div class="parsed-conditions-item">${S}</div>`;
366
363
  }), t += "</div>"), t;
367
- }, J = async (a, t) => {
364
+ }, W = async (a, t) => {
368
365
  switch (a) {
369
366
  case "satisfied": {
370
- const n = l.value[t];
371
- await r.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
372
- userName: D.username,
367
+ const n = o.value[t];
368
+ await l.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
369
+ userName: F.username,
373
370
  userContent: n.userContent,
374
371
  aiContent: n.content,
375
372
  type: 1,
@@ -378,7 +375,7 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
378
375
  firstPackageTime: n.firstPackageTime,
379
376
  isSolved: 1,
380
377
  logOrigin: 1
381
- }), ee.success("感谢您的评价!"), l.value[t].hasFeedback = !0;
378
+ }), ee.success("感谢您的评价!"), o.value[t].hasFeedback = !0;
382
379
  break;
383
380
  }
384
381
  case "open": {
@@ -386,9 +383,9 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
386
383
  break;
387
384
  }
388
385
  case "unsatisfied": {
389
- const n = l.value[t];
390
- await r.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
391
- userName: D.username,
386
+ const n = o.value[t];
387
+ await l.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
388
+ userName: F.username,
392
389
  userContent: n.userContent,
393
390
  userSuggestion: H.value,
394
391
  aiContent: n.content,
@@ -398,13 +395,13 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
398
395
  firstPackageTime: n.firstPackageTime,
399
396
  isSolved: 0,
400
397
  logOrigin: 1
401
- }), ee.success("感谢您的反馈!我们将持续跟踪并进行优化"), Y.value = !1, l.value[t].hasFeedback = !0;
398
+ }), ee.success("感谢您的反馈!我们将持续跟踪并进行优化"), Y.value = !1, o.value[t].hasFeedback = !0;
402
399
  break;
403
400
  }
404
401
  case "default": {
405
- const n = l.value[t];
406
- await r.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
407
- userName: D.username,
402
+ const n = o.value[t];
403
+ await l.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
404
+ userName: F.username,
408
405
  userContent: n.userContent,
409
406
  userSuggestion: H.value,
410
407
  aiContent: n.content,
@@ -418,16 +415,16 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
418
415
  }
419
416
  }
420
417
  }, ce = async () => {
421
- const a = N.value.trim();
418
+ const a = V.value.trim();
422
419
  if (!a)
423
420
  return ee.warning("请输入消息内容");
424
421
  if (k.value)
425
422
  return;
426
- v.value = [], A.value = !1, l.value.push({
423
+ v.value = [], $.value = !1, o.value.push({
427
424
  role: "user",
428
425
  content: a,
429
426
  createTime: X().format("YYYY-MM-DD HH:mm:ss")
430
- }), N.value = "", await I(), l.value.push({
427
+ }), V.value = "", await I(), o.value.push({
431
428
  role: "assistant",
432
429
  content: "",
433
430
  userContent: a,
@@ -437,45 +434,45 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
437
434
  resTime: 0,
438
435
  firstPackageTime: 0
439
436
  }), await I(), k.value = !0, u.value = !0;
440
- let t = "", n = (/* @__PURE__ */ new Date()).getTime(), T = !1;
437
+ let t = "", n = (/* @__PURE__ */ new Date()).getTime(), S = !1;
441
438
  try {
442
439
  await Fe({
443
- baseUrl: r.env.VITE_BASE_URL,
440
+ baseUrl: l.env.VITE_BASE_URL,
444
441
  token: De(),
445
442
  value: a,
446
- callback: (x, V) => {
447
- if (x === "error") {
448
- u.value = !1, k.value = !1, l.value.pop(), l.value.push({
443
+ callback: (z, M) => {
444
+ if (z === "error") {
445
+ u.value = !1, k.value = !1, o.value.pop(), o.value.push({
449
446
  role: "assistant",
450
447
  userContent: a,
451
- content: `❌ ${V}`,
448
+ content: `❌ ${M}`,
452
449
  showFeedback: !1,
453
450
  hasFeedback: !1,
454
451
  createTime: X().format("YYYY-MM-DD HH:mm:ss"),
455
452
  resTime: (/* @__PURE__ */ new Date()).getTime() - n,
456
453
  firstPackageTime: 0
457
- }), J("default", l.value.length - 1), I();
454
+ }), W("default", o.value.length - 1), I();
458
455
  return;
459
456
  }
460
- if (x === "node") {
461
- if (!T) {
462
- T = !0, u.value = !1;
463
- const _ = l.value[l.value.length - 1];
457
+ if (z === "node") {
458
+ if (!S) {
459
+ S = !0, u.value = !1;
460
+ const _ = o.value[o.value.length - 1];
464
461
  _ && _.role === "assistant" && _.firstPackageTime === 0 && (_.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - n);
465
462
  }
466
- const h = v.value.find((_) => _.name === V.name);
467
- h ? h.status = V.status : v.value.push({ name: V.name, status: V.status }), I();
463
+ const h = v.value.find((_) => _.name === M.name);
464
+ h ? h.status = M.status : v.value.push({ name: M.name, status: M.status }), I();
468
465
  return;
469
466
  }
470
- if (x === "message") {
471
- t = V;
472
- const h = l.value[l.value.length - 1];
467
+ if (z === "message") {
468
+ t = M;
469
+ const h = o.value[o.value.length - 1];
473
470
  h && h.role === "assistant" && (h.content = t, I());
474
471
  }
475
- if (x === "finish") {
476
- k.value = !1, A.value = !0;
477
- const h = l.value[l.value.length - 1];
478
- h && h.role === "assistant" && (h.showFeedback = !0, h.resTime = (/* @__PURE__ */ new Date()).getTime() - n, J("default", l.value.length - 1));
472
+ if (z === "finish") {
473
+ k.value = !1, $.value = !0;
474
+ const h = o.value[o.value.length - 1];
475
+ h && h.role === "assistant" && (h.showFeedback = !0, h.resTime = (/* @__PURE__ */ new Date()).getTime() - n, W("default", o.value.length - 1));
479
476
  try {
480
477
  const _ = JSON.parse(t);
481
478
  _.parsedConditions && delete _.parsedConditions, U("callBack", _);
@@ -485,8 +482,8 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
485
482
  }
486
483
  }
487
484
  });
488
- } catch (x) {
489
- ee.error(`AI响应异常: ${x}`), l.value.pop(), l.value.push({
485
+ } catch (z) {
486
+ ee.error(`AI响应异常: ${z}`), o.value.pop(), o.value.push({
490
487
  role: "assistant",
491
488
  userContent: a,
492
489
  content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
@@ -495,24 +492,24 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
495
492
  createTime: X().format("YYYY-MM-DD HH:mm:ss"),
496
493
  resTime: (/* @__PURE__ */ new Date()).getTime() - n,
497
494
  firstPackageTime: 0
498
- }), J("default", l.value.length - 1), await I(), k.value = !1, u.value = !1;
495
+ }), W("default", o.value.length - 1), await I(), k.value = !1, u.value = !1;
499
496
  }
500
497
  }, ke = (a) => {
501
498
  if (a.key === "Enter")
502
499
  if (a.ctrlKey) {
503
500
  a.preventDefault();
504
- const t = a.target, n = t.selectionStart, T = t.selectionEnd;
505
- N.value = N.value.substring(0, n) + `
506
- ` + N.value.substring(T), ae(() => {
501
+ const t = a.target, n = t.selectionStart, S = t.selectionEnd;
502
+ V.value = V.value.substring(0, n) + `
503
+ ` + V.value.substring(S), ae(() => {
507
504
  t.selectionStart = t.selectionEnd = n + 1;
508
505
  });
509
506
  } else
510
507
  a.preventDefault(), ce();
511
508
  }, I = async () => {
512
- await ae(), w.value && (w.value.scrollTop = w.value.scrollHeight);
509
+ await ae(), T.value && (T.value.scrollTop = T.value.scrollHeight);
513
510
  };
514
511
  return re(
515
- () => l.value,
512
+ () => o.value,
516
513
  () => {
517
514
  I();
518
515
  },
@@ -524,17 +521,17 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
524
521
  }
525
522
  ), c({
526
523
  open: () => {
527
- F.value = !0, ae(() => {
524
+ N.value = !0, ae(() => {
528
525
  I();
529
526
  });
530
527
  }
531
528
  }), (a, t) => {
532
- const n = Ke, T = ie, x = et, V = Te, h = we, _ = be;
533
- return i(), d(W, null, [
534
- S(_, {
529
+ const n = Ke, S = ie, z = et, M = Te, h = we, _ = be;
530
+ return i(), d(q, null, [
531
+ C(_, {
535
532
  class: "ai-dialog",
536
- modelValue: F.value,
537
- "onUpdate:modelValue": t[1] || (t[1] = ($) => F.value = $),
533
+ modelValue: N.value,
534
+ "onUpdate:modelValue": t[1] || (t[1] = (E) => N.value = E),
538
535
  title: "✨ 品种池参数解析AI助手",
539
536
  width: "500px",
540
537
  center: "",
@@ -543,112 +540,115 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
543
540
  modal: !1,
544
541
  "modal-penetrable": !0
545
542
  }, {
546
- default: E(() => {
547
- var $;
543
+ default: P(() => {
544
+ var E;
548
545
  return [
549
- o("div", tt, [
550
- o("div", {
546
+ r("div", tt, [
547
+ r("div", {
551
548
  ref_key: "messageListRef",
552
- ref: w,
549
+ ref: T,
553
550
  class: "message-list"
554
551
  }, [
555
- (i(!0), d(W, null, ue(l.value, (m, G) => (i(), d("div", {
556
- key: G,
557
- class: C([m.role, "message-item"])
552
+ (i(!0), d(q, null, ue(o.value, (m, j) => (i(), d("div", {
553
+ key: j,
554
+ class: y([m.role, "message-item"])
558
555
  }, [
559
- m.content || G === l.value.length - 1 && m.role === "assistant" && v.value.length > 0 ? (i(), d(W, { key: 0 }, [
560
- o("div", st, [
561
- S(n, {
556
+ m.content || j === o.value.length - 1 && m.role === "assistant" && v.value.length > 0 ? (i(), d(q, { key: 0 }, [
557
+ r("div", st, [
558
+ C(n, {
562
559
  size: 32,
563
560
  icon: m.role === "user" ? s(He) : s(Le)
564
561
  }, null, 8, ["icon"])
565
562
  ]),
566
- o("div", at, [
567
- G === l.value.length - 1 && m.role === "assistant" && v.value.length > 0 && !A.value ? (i(), d("div", nt, [
568
- (i(!0), d(W, null, ue(v.value, (Q) => (i(), d("div", {
563
+ r("div", at, [
564
+ j === o.value.length - 1 && m.role === "assistant" && v.value.length > 0 && !$.value ? (i(), d("div", nt, [
565
+ (i(!0), d(q, null, ue(v.value, (Q) => (i(), d("div", {
569
566
  key: Q.name,
570
567
  class: "node-progress-item"
571
568
  }, [
572
- o("span", ot, [
573
- Q.status === "success" ? (i(), q(T, {
569
+ r("span", ot, [
570
+ Q.status === "success" ? (i(), K(S, {
574
571
  key: 0,
575
572
  class: "node-icon done"
576
573
  }, {
577
- default: E(() => [
578
- S(s(Be))
574
+ default: P(() => [
575
+ C(s(Be))
579
576
  ]),
580
577
  _: 1
581
- })) : (i(), q(T, {
578
+ })) : (i(), K(S, {
582
579
  key: 1,
583
580
  class: "node-icon running"
584
581
  }, {
585
- default: E(() => [
586
- S(s(Ie))
582
+ default: P(() => [
583
+ C(s(Ie))
587
584
  ]),
588
585
  _: 1
589
586
  }))
590
587
  ]),
591
- o("span", rt, O(Q.name), 1)
588
+ r("span", rt, O(Q.name), 1)
592
589
  ]))), 128)),
593
- o("div", lt, [
594
- S(x, {
590
+ r("div", lt, [
591
+ C(z, {
595
592
  percentage: g.value,
596
593
  "show-text": !1,
597
594
  "stroke-width": 4,
598
595
  color: "#667eea"
599
596
  }, null, 8, ["percentage"]),
600
- o("span", it, "第 " + O(K.value) + "/" + O(e.value) + " 步 · " + O(L.value), 1)
597
+ r("span", it, "第 " + O(G.value) + "/" + O(e.value) + " 步 · " + O(L.value), 1)
601
598
  ])
602
- ])) : M("", !0),
603
- y(m.content) ? (i(), d("div", {
599
+ ])) : A("", !0),
600
+ b(m.content) ? (i(), d("div", {
604
601
  key: 1,
605
- class: "message-json",
602
+ class: y(["message-json", { "result-animation": j === o.value.length - 1 && $.value }]),
606
603
  innerHTML: he(B(m.content))
607
- }, null, 8, ct)) : m.content ? (i(), d("div", ut, O(m.content), 1)) : M("", !0),
608
- o("div", dt, O(m.createTime), 1),
609
- m.role === "assistant" ? (i(), d(W, { key: 3 }, [
610
- m.showFeedback && !m.hasFeedback ? (i(), d(W, { key: 0 }, [
611
- pt,
612
- o("div", ft, [
613
- o("button", {
604
+ }, null, 10, ct)) : m.content ? (i(), d("div", {
605
+ key: 2,
606
+ class: y(["message-text", { "result-animation": j === o.value.length - 1 && $.value }])
607
+ }, O(m.content), 3)) : A("", !0),
608
+ r("div", ut, O(m.createTime), 1),
609
+ m.role === "assistant" ? (i(), d(q, { key: 3 }, [
610
+ m.showFeedback && !m.hasFeedback ? (i(), d(q, { key: 0 }, [
611
+ dt,
612
+ r("div", pt, [
613
+ r("button", {
614
614
  class: "feedback-btn satisfied-btn",
615
- onClick: (Q) => J("satisfied", G)
616
- }, ht, 8, mt),
617
- o("button", {
615
+ onClick: (Q) => W("satisfied", j)
616
+ }, gt, 8, ft),
617
+ r("button", {
618
618
  class: "feedback-btn unsatisfied-btn",
619
- onClick: (Q) => J("open", G)
620
- }, bt, 8, kt)
619
+ onClick: (Q) => W("open", j)
620
+ }, yt, 8, ht)
621
621
  ])
622
- ], 64)) : M("", !0),
623
- m.showFeedback && m.hasFeedback ? (i(), d("div", wt, "感谢您进行的评价反馈")) : M("", !0)
624
- ], 64)) : M("", !0)
622
+ ], 64)) : A("", !0),
623
+ m.showFeedback && m.hasFeedback ? (i(), d("div", bt, "感谢您进行的评价反馈")) : A("", !0)
624
+ ], 64)) : A("", !0)
625
625
  ])
626
- ], 64)) : M("", !0)
626
+ ], 64)) : A("", !0)
627
627
  ], 2))), 128)),
628
- u.value && v.value.length === 0 && !(($ = l.value[l.value.length - 1]) != null && $.content) ? (i(), d("div", Tt, " 🤔 正在分析您的需求... ")) : M("", !0)
628
+ u.value && v.value.length === 0 && !((E = o.value[o.value.length - 1]) != null && E.content) ? (i(), d("div", wt, " 🤔 正在分析您的需求... ")) : A("", !0)
629
629
  ], 512),
630
- o("div", St, [
631
- S(V, {
630
+ r("div", Tt, [
631
+ C(M, {
632
632
  class: "message-input",
633
- modelValue: N.value,
634
- "onUpdate:modelValue": t[0] || (t[0] = (m) => N.value = m),
633
+ modelValue: V.value,
634
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => V.value = m),
635
635
  type: "textarea",
636
636
  rows: 4,
637
637
  autosize: { minRows: 2, maxRows: 4 },
638
638
  placeholder: "输入您想查询的品种条件...",
639
639
  onKeydown: ke
640
640
  }, null, 8, ["modelValue"]),
641
- o("div", Ct, [
642
- $t,
643
- S(h, {
641
+ r("div", St, [
642
+ Ct,
643
+ C(h, {
644
644
  class: "send-btn",
645
645
  type: "primary",
646
- icon: s(xe),
646
+ icon: s(ze),
647
647
  loading: k.value,
648
648
  onClick: ce,
649
649
  round: ""
650
650
  }, {
651
- default: E(() => [
651
+ default: P(() => [
652
652
  ne(" 发送 ")
653
653
  ]),
654
654
  _: 1
@@ -660,40 +660,40 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
660
660
  }),
661
661
  _: 1
662
662
  }, 8, ["modelValue"]),
663
- S(_, {
663
+ C(_, {
664
664
  modelValue: Y.value,
665
- "onUpdate:modelValue": t[5] || (t[5] = ($) => Y.value = $),
665
+ "onUpdate:modelValue": t[5] || (t[5] = (E) => Y.value = E),
666
666
  title: "📝 反馈意见",
667
667
  width: "400px"
668
668
  }, {
669
- footer: E(() => [
670
- o("span", Ft, [
671
- S(h, {
672
- onClick: t[3] || (t[3] = ($) => Y.value = !1)
669
+ footer: P(() => [
670
+ r("span", Dt, [
671
+ C(h, {
672
+ onClick: t[3] || (t[3] = (E) => Y.value = !1)
673
673
  }, {
674
- default: E(() => [
674
+ default: P(() => [
675
675
  ne("取消")
676
676
  ]),
677
677
  _: 1
678
678
  }),
679
- S(h, {
679
+ C(h, {
680
680
  type: "primary",
681
- onClick: t[4] || (t[4] = ($) => J("unsatisfied", Z.value))
681
+ onClick: t[4] || (t[4] = (E) => W("unsatisfied", Z.value))
682
682
  }, {
683
- default: E(() => [
683
+ default: P(() => [
684
684
  ne("提交反馈")
685
685
  ]),
686
686
  _: 1
687
687
  })
688
688
  ])
689
689
  ]),
690
- default: E(() => [
691
- o("div", Et, [
690
+ default: P(() => [
691
+ r("div", $t, [
692
+ Et,
692
693
  Pt,
693
- Dt,
694
- S(V, {
694
+ C(M, {
695
695
  modelValue: H.value,
696
- "onUpdate:modelValue": t[2] || (t[2] = ($) => H.value = $),
696
+ "onUpdate:modelValue": t[2] || (t[2] = (E) => H.value = E),
697
697
  type: "textarea",
698
698
  rows: 4,
699
699
  placeholder: "[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."
@@ -705,11 +705,11 @@ const R = (p) => ($e("data-v-6c033243"), p = p(), Ee(), p), tt = { class: "ai-di
705
705
  ], 64);
706
706
  };
707
707
  }
708
- }, Vt = /* @__PURE__ */ ze(Nt, [["__scopeId", "data-v-6c033243"]]), ns = {
708
+ }, Nt = /* @__PURE__ */ xe(Ft, [["__scopeId", "data-v-8e2737b7"]]), as = {
709
709
  install(p) {
710
- p.component("st-varietyAiHelper", Vt);
710
+ p.component("st-varietyAiHelper", Nt);
711
711
  }
712
712
  };
713
713
  export {
714
- ns as default
714
+ as as default
715
715
  };