st-comp 0.0.274 → 0.0.275
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/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +70 -71
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +35 -36
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -20
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +28 -29
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +49 -50
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +18 -19
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +21 -22
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +26 -27
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +76 -77
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +37 -38
- package/es/User.cjs +1 -1
- package/es/User.js +141 -142
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +27 -28
- package/es/VarietyAiHelper.cjs +4 -4
- package/es/VarietyAiHelper.js +472 -473
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +12 -13
- package/es/VarietySearch.cjs +9 -9
- package/es/VarietySearch.js +298 -298
- package/es/{VarietySelect-7da473c5.cjs → VarietySelect-610903f0.cjs} +1 -1
- package/es/{VarietySelect-b01281d3.js → VarietySelect-6a166293.js} +4 -4
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +22 -23
- package/es/VirtualTable.js +14 -14
- package/es/{_initCloneObject-6243b839.js → _initCloneObject-152b4f4e.js} +3 -3
- package/es/aiTools-0c653fa6.js +113 -0
- package/es/aiTools-336e4de3.cjs +2 -0
- package/es/aiTools.js +8 -2
- package/es/{base-29f73b05.js → base-a5af3db3.js} +2 -2
- package/es/{castArray-609a313e.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-20b05e99.js → config-provider-7a3aca55.js} +4 -4
- package/es/{debounce-a09ce9a3.js → debounce-8d53f4dd.js} +1 -1
- package/es/{dropdown-f8d9fe56.js → dropdown-01e09205.js} +19 -20
- package/es/dropdown-987c47fb.cjs +1 -0
- package/es/el-autocomplete-16f66b34.cjs +1 -0
- package/es/{el-autocomplete-3f34a1c3.js → el-autocomplete-342ae823.js} +17 -18
- package/es/{el-button-cd144ee1.js → el-button-314171a0.js} +4 -4
- package/es/{el-checkbox-d6c883f4.js → el-checkbox-5899681f.js} +4 -4
- package/es/el-checkbox-bdf64663.cjs +1 -0
- package/es/el-dialog-0ef95df6.cjs +1 -0
- package/es/{el-dialog-59a23c2b.js → el-dialog-86a3eec2.js} +6 -6
- package/es/{el-divider-523e5874.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-f5a1607a.js → el-empty-33cb66f1.js} +3 -3
- package/es/{el-form-item-3475aaad.cjs → el-form-item-77ef6784.cjs} +1 -1
- package/es/{el-form-item-a9556441.js → el-form-item-cda4d93c.js} +8 -8
- package/es/el-input-89222943.cjs +1 -0
- package/es/{el-input-1f14a6e2.js → el-input-fa1445ad.js} +14 -14
- package/es/{el-input-number-411ac93d.js → el-input-number-8f6dbf74.js} +6 -6
- package/es/el-input-number-d3338e5e.cjs +1 -0
- package/es/{el-loading-cbeb3b86.js → el-loading-9b671203.js} +2 -2
- package/es/el-menu-item-4531fd0e.cjs +1 -0
- package/es/{el-menu-item-77152904.js → el-menu-item-535fef90.js} +17 -18
- package/es/{el-message-box-a26e3ed4.js → el-message-box-621ed2f1.js} +11 -11
- package/es/el-message-box-f5717070.cjs +1 -0
- package/es/el-overlay-151708cb.cjs +1 -0
- package/es/{el-overlay-465cd11e.js → el-overlay-23de4324.js} +19 -19
- package/es/el-popconfirm-b8aa490e.cjs +1 -0
- package/es/{el-popconfirm-289b3e89.js → el-popconfirm-bcff0aa5.js} +20 -21
- package/es/el-popper-03988662.js +2094 -0
- package/es/el-popper-43ec37f4.cjs +1 -0
- package/es/el-segmented-79a1367c.cjs +1 -0
- package/es/{el-segmented-598b92b0.js → el-segmented-db3a86be.js} +4 -4
- package/es/{el-select-d47b5923.js → el-select-4bd0010d.js} +43 -44
- package/es/el-select-ec04e7ce.cjs +1 -0
- package/es/el-table-column-35e47229.cjs +14 -0
- package/es/{el-table-column-f1017e75.js → el-table-column-7af2bec7.js} +24 -25
- package/es/el-tag-5d5608e0.cjs +1 -0
- package/es/{el-tag-0a4197f5.js → el-tag-bef9e83d.js} +13 -13
- package/es/{el-text-c3ee80fe.js → el-text-f998902c.js} +2 -2
- package/es/{index-67180968.js → index-102edf6c.js} +3 -3
- package/es/{index-a76e80d9.cjs → index-2d7ac156.cjs} +2 -2
- package/es/{index-1b97095f.js → index-5c44d71a.js} +1 -1
- package/es/{index-d3e9a6f2.js → index-5ed42e9c.js} +11 -11
- package/es/{index-3301d870.js → index-6290ae0f.js} +3 -3
- package/es/{index-a17c90c5.js → index-936e7dec.js} +2 -2
- package/es/{index-8391a3df.js → index-960806da.js} +3 -3
- package/es/index-a00e0534.cjs +1 -0
- package/es/{index-33430c9f.js → index-a83ec4b7.js} +3 -3
- package/es/index-c58e90e9.cjs +1 -0
- package/es/{index-499cf989.js → index-ce21e2ce.js} +17 -17
- package/es/index-cfd00899.cjs +1 -0
- package/es/{index-afc4a1e5.js → index-d1b554ac.js} +3 -3
- package/es/{index-de24705f.js → index-d77a7336.js} +1 -1
- package/es/{index-3ed7914e.cjs → index-db846633.cjs} +1 -1
- package/es/{index-5b47cf8f.js → index-f3f6ee27.js} +11 -11
- package/es/{python-df3d529e.js → python-6cc6ec1b.js} +28 -29
- package/es/{python-b5d87b74.cjs → python-71f59893.cjs} +1 -1
- package/es/{raf-744cf95a.js → raf-80ef0c0a.js} +1 -1
- package/es/{scroll-6799bafc.js → scroll-679bd6bf.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-dd9617de.js → use-form-common-props-76a09d89.js} +28 -28
- package/es/{use-global-config-4dfc7236.js → use-global-config-0f43458b.js} +4 -4
- package/es/{validator-029bfc98.js → validator-0e037618.js} +1 -1
- package/es/{vnode-a83e6de8.js → vnode-5ddb7ed1.js} +1 -1
- package/es/{zh-cn-89e434f9.js → zh-cn-1227eb8a.js} +2 -2
- package/lib/aiTools.js +8 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +172 -172
- package/lib/{index-a854f18c.js → index-298ca804.js} +14406 -14406
- package/lib/{python-77c3b638.js → python-4b8051bd.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/images/like.png +0 -0
- package/packages/VarietyAiHelper/images/like_no.png +0 -0
- package/packages/VarietyAiHelper/index.vue +342 -410
- package/packages/VarietySearch/index.vue +1 -1
- package/public/aiTools.js +8 -2
- package/es/aiTools-4412c56c.cjs +0 -2
- package/es/aiTools-e6e4e996.js +0 -111
- package/es/dropdown-33c19e56.cjs +0 -1
- package/es/el-autocomplete-525ca867.cjs +0 -1
- package/es/el-checkbox-95325acd.cjs +0 -1
- package/es/el-dialog-4056070b.cjs +0 -1
- package/es/el-input-c7bf8e44.cjs +0 -1
- package/es/el-input-number-9d810842.cjs +0 -1
- package/es/el-menu-item-18d7d869.cjs +0 -1
- package/es/el-message-box-e4b8cc99.cjs +0 -1
- package/es/el-overlay-d26a1b98.cjs +0 -1
- package/es/el-popconfirm-12f6f35c.cjs +0 -1
- package/es/el-popper-c7648df6.cjs +0 -1
- package/es/el-popper-f96fc206.js +0 -1662
- package/es/el-segmented-f0bce6f2.cjs +0 -1
- package/es/el-select-f3cc464f.cjs +0 -1
- package/es/el-table-column-220ae131.cjs +0 -14
- package/es/el-tag-51bd491c.cjs +0 -1
- package/es/index-09ce1753.cjs +0 -1
- package/es/index-4b95bae1.cjs +0 -1
- package/es/index-68798830.cjs +0 -1
- package/es/index-8e88a0bd.js +0 -440
- package/es/index-d2cfd4a3.cjs +0 -1
package/es/VarietyAiHelper.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { b as de, p as pe, e as
|
|
2
|
-
import { E as be } from "./el-dialog-
|
|
3
|
-
import "./el-overlay-
|
|
4
|
-
import { E as
|
|
5
|
-
import { E as Te } from "./el-
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { E as
|
|
13
|
-
import {
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./
|
|
16
|
-
import "./index-
|
|
1
|
+
import { b as de, p as pe, e as ee, u as fe, c as ae, n as ye, _ as me, w as ve, x as we } from "./base-a5af3db3.js";
|
|
2
|
+
import { E as be } from "./el-dialog-86a3eec2.js";
|
|
3
|
+
import "./el-overlay-23de4324.js";
|
|
4
|
+
import { E as _e } from "./el-input-fa1445ad.js";
|
|
5
|
+
import { E as Te } from "./el-button-314171a0.js";
|
|
6
|
+
import "./el-tooltip-4ed993c7.js";
|
|
7
|
+
import { E as Se } from "./el-popper-03988662.js";
|
|
8
|
+
import { defineComponent as te, ref as k, computed as f, watch as oe, openBlock as l, createElementBlock as m, normalizeClass as w, unref as s, normalizeStyle as J, createBlock as O, withCtx as y, resolveDynamicComponent as ge, renderSlot as ne, createElementVNode as d, toDisplayString as K, createCommentVNode as Q, inject as De, reactive as Ce, nextTick as se, Fragment as X, createVNode as h, renderList as ue, createTextVNode as Z, pushScopeId as Me, popScopeId as Ee } from "vue";
|
|
9
|
+
import { d as x } from "./dayjs.min-8313b006.js";
|
|
10
|
+
import { V as Ve, U as Be } from "./index-7ed0999e.js";
|
|
11
|
+
import { s as Ue } from "./aiTools-0c653fa6.js";
|
|
12
|
+
import { E as re, w as Ie, o as Fe, p as Ne, s as Pe, c as Ye, u as ze, t as Je, v as Qe, x as He, y as Ke } from "./index-5c44d71a.js";
|
|
13
|
+
import { _ as Oe } from "./_plugin-vue_export-helper-dad06003.js";
|
|
14
|
+
import { E as W } from "./index-ce21e2ce.js";
|
|
15
|
+
import { k as Re, i as Le } from "./use-form-common-props-76a09d89.js";
|
|
16
|
+
import "./index-d77a7336.js";
|
|
17
|
+
import "./index-960806da.js";
|
|
17
18
|
import "./index-2e331d74.js";
|
|
18
|
-
import "./vnode-
|
|
19
|
-
import "./scroll-
|
|
20
|
-
import "./use-global-config-
|
|
21
|
-
import "./index-
|
|
22
|
-
import "./index-657047bb.js";
|
|
19
|
+
import "./vnode-5ddb7ed1.js";
|
|
20
|
+
import "./scroll-679bd6bf.js";
|
|
21
|
+
import "./use-global-config-0f43458b.js";
|
|
22
|
+
import "./index-a83ec4b7.js";
|
|
23
23
|
import "./typescript-7ae59c4c.js";
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./
|
|
26
|
-
|
|
24
|
+
import "./index-5ed42e9c.js";
|
|
25
|
+
import "./index-657047bb.js";
|
|
26
|
+
import "./config-provider-7a3aca55.js";
|
|
27
|
+
const $e = de({
|
|
27
28
|
size: {
|
|
28
29
|
type: [Number, String],
|
|
29
|
-
values:
|
|
30
|
+
values: Re,
|
|
30
31
|
default: "",
|
|
31
32
|
validator: (p) => pe(p)
|
|
32
33
|
},
|
|
@@ -36,7 +37,7 @@ const Ue = de({
|
|
|
36
37
|
default: "circle"
|
|
37
38
|
},
|
|
38
39
|
icon: {
|
|
39
|
-
type:
|
|
40
|
+
type: Le
|
|
40
41
|
},
|
|
41
42
|
src: {
|
|
42
43
|
type: String,
|
|
@@ -45,55 +46,55 @@ const Ue = de({
|
|
|
45
46
|
alt: String,
|
|
46
47
|
srcSet: String,
|
|
47
48
|
fit: {
|
|
48
|
-
type:
|
|
49
|
+
type: ee(String),
|
|
49
50
|
default: "cover"
|
|
50
51
|
}
|
|
51
52
|
}), je = {
|
|
52
53
|
error: (p) => p instanceof Event
|
|
53
|
-
},
|
|
54
|
+
}, xe = te({
|
|
54
55
|
name: "ElAvatar"
|
|
55
|
-
}),
|
|
56
|
-
...
|
|
57
|
-
props:
|
|
56
|
+
}), qe = /* @__PURE__ */ te({
|
|
57
|
+
...xe,
|
|
58
|
+
props: $e,
|
|
58
59
|
emits: je,
|
|
59
|
-
setup(p, { emit:
|
|
60
|
-
const D = p,
|
|
61
|
-
const { size:
|
|
62
|
-
return
|
|
63
|
-
}),
|
|
64
|
-
const { size:
|
|
65
|
-
return pe(
|
|
66
|
-
size:
|
|
60
|
+
setup(p, { emit: i }) {
|
|
61
|
+
const D = p, r = fe("avatar"), C = k(!1), M = f(() => {
|
|
62
|
+
const { size: c, icon: _, shape: E } = D, o = [r.b()];
|
|
63
|
+
return ae(c) && o.push(r.m(c)), _ && o.push(r.m("icon")), E && o.push(r.m(E)), o;
|
|
64
|
+
}), R = f(() => {
|
|
65
|
+
const { size: c } = D;
|
|
66
|
+
return pe(c) ? r.cssVarBlock({
|
|
67
|
+
size: ye(c) || ""
|
|
67
68
|
}) : void 0;
|
|
68
|
-
}),
|
|
69
|
+
}), L = f(() => ({
|
|
69
70
|
objectFit: D.fit
|
|
70
71
|
}));
|
|
71
|
-
|
|
72
|
-
function
|
|
73
|
-
|
|
72
|
+
oe(() => D.src, () => C.value = !1);
|
|
73
|
+
function A(c) {
|
|
74
|
+
C.value = !0, i("error", c);
|
|
74
75
|
}
|
|
75
|
-
return (
|
|
76
|
-
class:
|
|
77
|
-
style:
|
|
76
|
+
return (c, _) => (l(), m("span", {
|
|
77
|
+
class: w(s(M)),
|
|
78
|
+
style: J(s(R))
|
|
78
79
|
}, [
|
|
79
|
-
(
|
|
80
|
+
(c.src || c.srcSet) && !C.value ? (l(), m("img", {
|
|
80
81
|
key: 0,
|
|
81
|
-
src:
|
|
82
|
-
alt:
|
|
83
|
-
srcset:
|
|
84
|
-
style:
|
|
85
|
-
onError:
|
|
86
|
-
}, null, 44, ["src", "alt", "srcset"])) :
|
|
87
|
-
default:
|
|
88
|
-
(
|
|
82
|
+
src: c.src,
|
|
83
|
+
alt: c.alt,
|
|
84
|
+
srcset: c.srcSet,
|
|
85
|
+
style: J(s(L)),
|
|
86
|
+
onError: A
|
|
87
|
+
}, null, 44, ["src", "alt", "srcset"])) : c.icon ? (l(), O(s(re), { key: 1 }, {
|
|
88
|
+
default: y(() => [
|
|
89
|
+
(l(), O(ge(c.icon)))
|
|
89
90
|
]),
|
|
90
91
|
_: 1
|
|
91
|
-
})) :
|
|
92
|
+
})) : ne(c.$slots, "default", { key: 2 })
|
|
92
93
|
], 6));
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
|
-
var
|
|
96
|
-
const
|
|
96
|
+
var Ge = /* @__PURE__ */ me(qe, [["__file", "avatar.vue"]]);
|
|
97
|
+
const Xe = ve(Ge), Ze = de({
|
|
97
98
|
type: {
|
|
98
99
|
type: String,
|
|
99
100
|
default: "line",
|
|
@@ -119,7 +120,7 @@ const Ke = ve(qe), Ge = de({
|
|
|
119
120
|
default: 6
|
|
120
121
|
},
|
|
121
122
|
strokeLinecap: {
|
|
122
|
-
type:
|
|
123
|
+
type: ee(String),
|
|
123
124
|
default: "round"
|
|
124
125
|
},
|
|
125
126
|
textInside: Boolean,
|
|
@@ -132,7 +133,7 @@ const Ke = ve(qe), Ge = de({
|
|
|
132
133
|
default: !0
|
|
133
134
|
},
|
|
134
135
|
color: {
|
|
135
|
-
type:
|
|
136
|
+
type: ee([
|
|
136
137
|
String,
|
|
137
138
|
Array,
|
|
138
139
|
Function
|
|
@@ -142,75 +143,75 @@ const Ke = ve(qe), Ge = de({
|
|
|
142
143
|
striped: Boolean,
|
|
143
144
|
stripedFlow: Boolean,
|
|
144
145
|
format: {
|
|
145
|
-
type:
|
|
146
|
+
type: ee(Function),
|
|
146
147
|
default: (p) => `${p}%`
|
|
147
148
|
}
|
|
148
|
-
}),
|
|
149
|
+
}), We = te({
|
|
149
150
|
name: "ElProgress"
|
|
150
|
-
}),
|
|
151
|
-
...
|
|
152
|
-
props:
|
|
151
|
+
}), et = /* @__PURE__ */ te({
|
|
152
|
+
...We,
|
|
153
|
+
props: Ze,
|
|
153
154
|
setup(p) {
|
|
154
|
-
const
|
|
155
|
+
const i = p, D = {
|
|
155
156
|
success: "#13ce66",
|
|
156
157
|
exception: "#ff4949",
|
|
157
158
|
warning: "#e6a23c",
|
|
158
159
|
default: "#20a0ff"
|
|
159
|
-
},
|
|
160
|
+
}, r = fe("progress"), C = f(() => {
|
|
160
161
|
const e = {
|
|
161
|
-
width: `${
|
|
162
|
-
animationDuration: `${
|
|
163
|
-
},
|
|
164
|
-
return
|
|
165
|
-
}),
|
|
166
|
-
const e =
|
|
162
|
+
width: `${i.percentage}%`,
|
|
163
|
+
animationDuration: `${i.duration}s`
|
|
164
|
+
}, v = b(i.percentage);
|
|
165
|
+
return v.includes("gradient") ? e.background = v : e.backgroundColor = v, e;
|
|
166
|
+
}), M = f(() => (i.strokeWidth / i.width * 100).toFixed(1)), R = f(() => ["circle", "dashboard"].includes(i.type) ? Number.parseInt(`${50 - Number.parseFloat(M.value) / 2}`, 10) : 0), L = f(() => {
|
|
167
|
+
const e = R.value, v = i.type === "dashboard";
|
|
167
168
|
return `
|
|
168
169
|
M 50 50
|
|
169
|
-
m 0 ${
|
|
170
|
-
a ${e} ${e} 0 1 1 0 ${
|
|
171
|
-
a ${e} ${e} 0 1 1 0 ${
|
|
170
|
+
m 0 ${v ? "" : "-"}${e}
|
|
171
|
+
a ${e} ${e} 0 1 1 0 ${v ? "-" : ""}${e * 2}
|
|
172
|
+
a ${e} ${e} 0 1 1 0 ${v ? "" : "-"}${e * 2}
|
|
172
173
|
`;
|
|
173
|
-
}),
|
|
174
|
-
strokeDasharray: `${
|
|
175
|
-
strokeDashoffset:
|
|
176
|
-
})),
|
|
177
|
-
strokeDasharray: `${
|
|
178
|
-
strokeDashoffset:
|
|
174
|
+
}), A = f(() => 2 * Math.PI * R.value), c = f(() => i.type === "dashboard" ? 0.75 : 1), _ = f(() => `${-1 * A.value * (1 - c.value) / 2}px`), E = f(() => ({
|
|
175
|
+
strokeDasharray: `${A.value * c.value}px, ${A.value}px`,
|
|
176
|
+
strokeDashoffset: _.value
|
|
177
|
+
})), o = f(() => ({
|
|
178
|
+
strokeDasharray: `${A.value * c.value * (i.percentage / 100)}px, ${A.value}px`,
|
|
179
|
+
strokeDashoffset: _.value,
|
|
179
180
|
transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
|
|
180
|
-
})),
|
|
181
|
+
})), q = f(() => {
|
|
181
182
|
let e;
|
|
182
|
-
return
|
|
183
|
-
}), V = f(() =>
|
|
184
|
-
function
|
|
185
|
-
const
|
|
186
|
-
return e.map((
|
|
187
|
-
color:
|
|
188
|
-
percentage: (B + 1) *
|
|
189
|
-
} :
|
|
183
|
+
return i.color ? e = b(i.percentage) : e = D[i.status] || D.default, e;
|
|
184
|
+
}), V = f(() => i.status === "warning" ? Ie : i.type === "line" ? i.status === "success" ? Fe : Ne : i.status === "success" ? Pe : Ye), N = f(() => i.type === "line" ? 12 + i.strokeWidth * 0.4 : i.width * 0.111111 + 2), P = f(() => i.format(i.percentage));
|
|
185
|
+
function G(e) {
|
|
186
|
+
const v = 100 / e.length;
|
|
187
|
+
return e.map((T, B) => ae(T) ? {
|
|
188
|
+
color: T,
|
|
189
|
+
percentage: (B + 1) * v
|
|
190
|
+
} : T).sort((T, B) => T.percentage - B.percentage);
|
|
190
191
|
}
|
|
191
|
-
const
|
|
192
|
-
var
|
|
193
|
-
const { color:
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
196
|
-
if (
|
|
197
|
-
return
|
|
192
|
+
const b = (e) => {
|
|
193
|
+
var v;
|
|
194
|
+
const { color: Y } = i;
|
|
195
|
+
if (we(Y))
|
|
196
|
+
return Y(e);
|
|
197
|
+
if (ae(Y))
|
|
198
|
+
return Y;
|
|
198
199
|
{
|
|
199
|
-
const
|
|
200
|
-
for (const B of
|
|
200
|
+
const T = G(Y);
|
|
201
|
+
for (const B of T)
|
|
201
202
|
if (B.percentage > e)
|
|
202
203
|
return B.color;
|
|
203
|
-
return (
|
|
204
|
+
return (v = T[T.length - 1]) == null ? void 0 : v.color;
|
|
204
205
|
}
|
|
205
206
|
};
|
|
206
|
-
return (e,
|
|
207
|
-
class:
|
|
208
|
-
s(
|
|
209
|
-
s(
|
|
210
|
-
s(
|
|
207
|
+
return (e, v) => (l(), m("div", {
|
|
208
|
+
class: w([
|
|
209
|
+
s(r).b(),
|
|
210
|
+
s(r).m(e.type),
|
|
211
|
+
s(r).is(e.status),
|
|
211
212
|
{
|
|
212
|
-
[s(
|
|
213
|
-
[s(
|
|
213
|
+
[s(r).m("without-text")]: !e.showText,
|
|
214
|
+
[s(r).m("text-inside")]: e.textInside
|
|
214
215
|
}
|
|
215
216
|
]),
|
|
216
217
|
role: "progressbar",
|
|
@@ -218,97 +219,92 @@ const Ke = ve(qe), Ge = de({
|
|
|
218
219
|
"aria-valuemin": "0",
|
|
219
220
|
"aria-valuemax": "100"
|
|
220
221
|
}, [
|
|
221
|
-
e.type === "line" ? (
|
|
222
|
+
e.type === "line" ? (l(), m("div", {
|
|
222
223
|
key: 0,
|
|
223
|
-
class:
|
|
224
|
+
class: w(s(r).b("bar"))
|
|
224
225
|
}, [
|
|
225
|
-
|
|
226
|
-
class:
|
|
227
|
-
style:
|
|
226
|
+
d("div", {
|
|
227
|
+
class: w(s(r).be("bar", "outer")),
|
|
228
|
+
style: J({ height: `${e.strokeWidth}px` })
|
|
228
229
|
}, [
|
|
229
|
-
|
|
230
|
-
class:
|
|
231
|
-
s(
|
|
232
|
-
{ [s(
|
|
233
|
-
{ [s(
|
|
234
|
-
{ [s(
|
|
230
|
+
d("div", {
|
|
231
|
+
class: w([
|
|
232
|
+
s(r).be("bar", "inner"),
|
|
233
|
+
{ [s(r).bem("bar", "inner", "indeterminate")]: e.indeterminate },
|
|
234
|
+
{ [s(r).bem("bar", "inner", "striped")]: e.striped },
|
|
235
|
+
{ [s(r).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
|
|
235
236
|
]),
|
|
236
|
-
style:
|
|
237
|
+
style: J(s(C))
|
|
237
238
|
}, [
|
|
238
|
-
(e.showText || e.$slots.default) && e.textInside ? (
|
|
239
|
+
(e.showText || e.$slots.default) && e.textInside ? (l(), m("div", {
|
|
239
240
|
key: 0,
|
|
240
|
-
class:
|
|
241
|
+
class: w(s(r).be("bar", "innerText"))
|
|
241
242
|
}, [
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
ne(e.$slots, "default", { percentage: e.percentage }, () => [
|
|
244
|
+
d("span", null, K(s(P)), 1)
|
|
244
245
|
])
|
|
245
|
-
], 2)) :
|
|
246
|
+
], 2)) : Q("v-if", !0)
|
|
246
247
|
], 6)
|
|
247
248
|
], 6)
|
|
248
|
-
], 2)) : (
|
|
249
|
+
], 2)) : (l(), m("div", {
|
|
249
250
|
key: 1,
|
|
250
|
-
class:
|
|
251
|
-
style:
|
|
251
|
+
class: w(s(r).b("circle")),
|
|
252
|
+
style: J({ height: `${e.width}px`, width: `${e.width}px` })
|
|
252
253
|
}, [
|
|
253
|
-
(
|
|
254
|
-
|
|
255
|
-
class:
|
|
256
|
-
d: s(
|
|
257
|
-
stroke: `var(${s(
|
|
254
|
+
(l(), m("svg", { viewBox: "0 0 100 100" }, [
|
|
255
|
+
d("path", {
|
|
256
|
+
class: w(s(r).be("circle", "track")),
|
|
257
|
+
d: s(L),
|
|
258
|
+
stroke: `var(${s(r).cssVarName("fill-color-light")}, #e5e9f2)`,
|
|
258
259
|
"stroke-linecap": e.strokeLinecap,
|
|
259
|
-
"stroke-width": s(
|
|
260
|
+
"stroke-width": s(M),
|
|
260
261
|
fill: "none",
|
|
261
|
-
style:
|
|
262
|
+
style: J(s(E))
|
|
262
263
|
}, null, 14, ["d", "stroke", "stroke-linecap", "stroke-width"]),
|
|
263
|
-
|
|
264
|
-
class:
|
|
265
|
-
d: s(
|
|
266
|
-
stroke: s(
|
|
264
|
+
d("path", {
|
|
265
|
+
class: w(s(r).be("circle", "path")),
|
|
266
|
+
d: s(L),
|
|
267
|
+
stroke: s(q),
|
|
267
268
|
fill: "none",
|
|
268
269
|
opacity: e.percentage ? 1 : 0,
|
|
269
270
|
"stroke-linecap": e.strokeLinecap,
|
|
270
|
-
"stroke-width": s(
|
|
271
|
-
style:
|
|
271
|
+
"stroke-width": s(M),
|
|
272
|
+
style: J(s(o))
|
|
272
273
|
}, null, 14, ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"])
|
|
273
274
|
]))
|
|
274
275
|
], 6)),
|
|
275
|
-
(e.showText || e.$slots.default) && !e.textInside ? (
|
|
276
|
+
(e.showText || e.$slots.default) && !e.textInside ? (l(), m("div", {
|
|
276
277
|
key: 2,
|
|
277
|
-
class:
|
|
278
|
-
style:
|
|
278
|
+
class: w(s(r).e("text")),
|
|
279
|
+
style: J({ fontSize: `${s(N)}px` })
|
|
279
280
|
}, [
|
|
280
|
-
|
|
281
|
-
e.status ? (
|
|
282
|
-
default:
|
|
283
|
-
(
|
|
281
|
+
ne(e.$slots, "default", { percentage: e.percentage }, () => [
|
|
282
|
+
e.status ? (l(), O(s(re), { key: 1 }, {
|
|
283
|
+
default: y(() => [
|
|
284
|
+
(l(), O(ge(s(V))))
|
|
284
285
|
]),
|
|
285
286
|
_: 1
|
|
286
|
-
})) : (
|
|
287
|
+
})) : (l(), m("span", { key: 0 }, K(s(P)), 1))
|
|
287
288
|
])
|
|
288
|
-
], 6)) :
|
|
289
|
+
], 6)) : Q("v-if", !0)
|
|
289
290
|
], 10, ["aria-valuenow"]));
|
|
290
291
|
}
|
|
291
292
|
});
|
|
292
|
-
var
|
|
293
|
-
const
|
|
294
|
-
const
|
|
293
|
+
var tt = /* @__PURE__ */ me(et, [["__file", "progress.vue"]]);
|
|
294
|
+
const st = ve(tt);
|
|
295
|
+
const at = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMaSURBVHgB7ZhdbhMxEMf/9lLRN3oDlhMQTkB6AnqDlqdSVYgaDkD6zIdTKGqLkJreoD1BywnIDdiegPBWKYmH8e4mdZbAeqlTrcT+pJX8MV57dsee8QANDQ0NDf8zAgtA608tRJEGIeYZEjOmk1dqq4cFEFwBrQ9iSHzjV68UuhIYWlVqK0FAJAJDEDtzFm9hxcS51scrCEhwBYQUj6cVQ7tk6MTpjg2udhCQoAqk5gNqOU29l2prw7Ai0wmlfIGABFXAAG2n2p/Yu8RV97qZVvb3v9xHIIIqIKV4PSnzVz+blJVSAyyIYAroj0d28bHz4h5ugSAKvNVHa7xhO9MGtnn3uNRaz5w8w2H0E4G4sQJ28ZE0x05TwovvuDIjLDsbWwyUehrMpO74CqYmQtTmg74920O49oc04J28Whwr05Pp2mfqD4fH82cRAzMeX0qIU1+H5+WJecLz3xdexC7esKfd7v/b+AJSdNTzzd1SsTKBd/pgw2NyDhPwaN7iLRwLfUVVeE+lc5dQakKZ46GsQjhlM1Lp+0Fr3Kfz9uRvv5wDuQ47ucQ4p9Q8BIcgQuIJcjkZiXWUnGYee8DxrDTm02U7sUX+OpU2ovKMRlnRLpvP92w+0SqTr3QKLS3d/YFbhUoDv+DB3E0ZzZpZv0y+dgpEEGuTMkeyl2XytVMg38RZGXxolFArBbT+bDdt7DRdlI2plQIGo7ZT7ft441opIGW0PikbI068xqAmFG9zEqMLn3G1UaBwm0v+FJYUqY0CediQQgZn3uNQA1LzcQJGgXHPd6yHAjSNeYbD4QMsADafDafa9zUfS3kwJ0R/+nU4+nyjD9JoVEbyIUemuQxulKziZMDUfDiM3kMFyhXgvCZHh+2sQq07nF3LiuRKtfTeIWV/SwxsPjRvT7JblrF34IQgBwSTPmMuW4HliDMZVM15uXjdyN7rwy67+KAJqblkyYBOlSHeyV1tb0ci/dVx4Q0xQkC4UDvPVqsOC5KdzhK2V3YfxHlTbGN5Y29Y9hG4N9MnbJyfJ4B54XxxOVNqs4uGhoaGhoaK/AINQhvhDFaFYAAAAABJRU5ErkJggg==", ot = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMxSURBVHgB7ZhdbtNAEMdn1wmlTzUnIJyA9ASkNwgnaCMh0aKK1uIATV4R1bbQUlVCSrhBewLCCSg3CCfAPBFoM8PsxnHcVGHX7UZYwj/JytrecXb2a+a/ACUlJSUl/zMCPKBUNxzCMAwAQwEylAA1AAr586EM5Mq4zM9IhOPy+F3ShAtEPHwVbfXgFjg78Ea9bwaBXAeC+syrGvhAwFn0cvMp5MTJAfX2VAHRLiwYROrwSLTz2Fgd2FcnG1KKLjhBMU+TmD/LFw34QUwEP4if87QaJJX4F/m95AtDCII9HtVm0pwY8N6jKGrF4EjFVkEGQk+bBHEBOOroP0KABju2N2439KPdzTW4BUqpFsj7jfGaoBBhqEe67WovrTUIGmkZr1pR9OIsirb6MO3ROxFFUYwIh2mDAvEkh7mDAxmq1aXvsAC4Eb30hjtMqZNGDtt/D4/ogFdjf3Kvp6erbSEc0OAIzydlXlvrrnaFcUDCr17mtqbUcd3NriDoxXx9Gsmmi11hHNDgiD5Pyq67UaEcuLkbdUMHm+JgdqNMfEH4vWGzKZQDGkJIdyMB2LDVL5wDCNiflIUUj231C+dAoPOtKTVb/cI5wC5YF24WazZqMlAgE1Qu8ergtTrujDgVFhWxomO+KzotB0uPGvVG1Egf0DQuzMPqAMu9cw7t9eSDzaoMmlXzIlNJiDonYLVkF7nBvjrdlZIU2CCavf9oM7FOIaOQhK0nWONK+WVe+JcB5EqRDazOIged7KyJlZ4CQu6AoL/kKFpR4ersSPD0aafiR9chOpv7CcKvetommsPKnU8lFIt9MJJzcsrAgQiXVrOy0OT3UnxK/jKOdp4/AE/ceRfSCo2Hu5V5VEtkYYZhZmuk8Ojow0PwhJdtVDtBWVko5U42jzGZ5oLwFgcE/GybUwlDKs4XjjcHbojzjKrik4dcwSkPXiPxtXSY18JkrlNlOSsRB9vbz76BJ7w6MJsOX9JoQ7073RMIB2klh+iaB++5EB8PTqMnUttcUwYcAzrgEe8OSBgeTBfzNTg+0Nq8dOO2eDlen8WkFKLSTY7Vudf1kclyL8+ZZ0lJSUlJiQt/AOgzKhZAFyVoAAAAAElFTkSuQmCC";
|
|
296
|
+
const le = (p) => (Me("data-v-652408e0"), p = p(), Ee(), p), nt = { class: "ai-dialog-body" }, rt = { class: "avatar" }, lt = { class: "message-content" }, it = {
|
|
295
297
|
key: 0,
|
|
296
298
|
class: "node-progress"
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
kt,
|
|
302
|
-
_t
|
|
303
|
-
], bt = {
|
|
304
|
-
key: 1,
|
|
305
|
-
class: "message-createTime"
|
|
306
|
-
}, wt = {
|
|
299
|
+
}, ct = { class: "node-status-icon" }, ut = { class: "node-name" }, dt = { class: "progress-footer" }, pt = { class: "progress-text" }, ft = ["innerHTML"], mt = {
|
|
300
|
+
key: 3,
|
|
301
|
+
class: "message-content-footer"
|
|
302
|
+
}, vt = {
|
|
307
303
|
key: 0,
|
|
308
|
-
class: "
|
|
309
|
-
},
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
], -1)),
|
|
304
|
+
class: "feedback-box"
|
|
305
|
+
}, gt = ["onClick"], At = ["onClick"], ht = { class: "input-area" }, kt = { class: "input-actions" }, yt = /* @__PURE__ */ le(() => /* @__PURE__ */ d("div", { class: "input-hint" }, [
|
|
306
|
+
/* @__PURE__ */ d("span", null, "Enter 发送 | Ctrl + Enter 换行")
|
|
307
|
+
], -1)), wt = { class: "feedback-dialog-content" }, bt = /* @__PURE__ */ le(() => /* @__PURE__ */ d("div", { class: "feedback-emoji" }, "😟", -1)), _t = /* @__PURE__ */ le(() => /* @__PURE__ */ d("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), Tt = { class: "dialog-footer" }, St = {
|
|
312
308
|
__name: "index",
|
|
313
309
|
props: {
|
|
314
310
|
defaultMessage: {
|
|
@@ -320,218 +316,202 @@ const R = (p) => ($e("data-v-f40b6b16"), p = p(), Ee(), p), tt = { class: "ai-di
|
|
|
320
316
|
}
|
|
321
317
|
},
|
|
322
318
|
emits: ["callBack"],
|
|
323
|
-
setup(p, { expose:
|
|
324
|
-
const
|
|
319
|
+
setup(p, { expose: i, emit: D }) {
|
|
320
|
+
const r = De("stConfig"), C = Ce(Ve()), M = k(!1), R = D, L = p, A = k(!1), c = k(!1), _ = k(!1), E = k(null), o = k([
|
|
325
321
|
{
|
|
326
|
-
role: "
|
|
327
|
-
|
|
322
|
+
role: "defaultMessage",
|
|
323
|
+
// defaultMessage-组件内置, assistant-智能体, user-用户
|
|
324
|
+
content: L.defaultMessage,
|
|
328
325
|
userContent: null,
|
|
329
326
|
showFeedback: !1,
|
|
330
|
-
|
|
331
|
-
createTime: X().format("YYYY-MM-DD HH:mm:ss"),
|
|
327
|
+
createTime: x().format("YYYY-MM-DD HH:mm:ss"),
|
|
332
328
|
resTime: 0,
|
|
333
329
|
firstPackageTime: 0
|
|
334
330
|
}
|
|
335
|
-
]), V =
|
|
336
|
-
const
|
|
337
|
-
return
|
|
338
|
-
}),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
return
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
331
|
+
]), q = k(null), V = k(""), N = k(!1), P = k(""), G = k({}), b = k([]), e = f(() => b.value.length), v = f(() => b.value.filter((n) => n.status === "success").length), Y = f(() => e.value ? v.value / e.value * 100 : 0), T = f(() => {
|
|
332
|
+
const n = b.value.find((t) => t.status === "executing");
|
|
333
|
+
return n ? n.name : "处理中";
|
|
334
|
+
}), B = async () => {
|
|
335
|
+
const n = V.value.trim();
|
|
336
|
+
if (!n)
|
|
337
|
+
return W.warning("请输入消息内容");
|
|
338
|
+
if (A.value)
|
|
339
|
+
return;
|
|
340
|
+
b.value = [], _.value = !1, o.value.push({
|
|
341
|
+
role: "user",
|
|
342
|
+
content: n,
|
|
343
|
+
createTime: x().format("YYYY-MM-DD HH:mm:ss")
|
|
344
|
+
}), V.value = "", await z(), o.value.push({
|
|
345
|
+
role: "assistant",
|
|
346
|
+
content: "",
|
|
347
|
+
userContent: n,
|
|
348
|
+
showFeedback: !1,
|
|
349
|
+
createTime: x().format("YYYY-MM-DD HH:mm:ss"),
|
|
350
|
+
resTime: 0,
|
|
351
|
+
firstPackageTime: 0
|
|
352
|
+
}), await z(), A.value = !0, c.value = !0;
|
|
353
|
+
let t = "", a = (/* @__PURE__ */ new Date()).getTime(), U = !1;
|
|
350
354
|
try {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
+
await Ue({
|
|
356
|
+
baseUrl: r.env.VITE_BASE_URL,
|
|
357
|
+
token: Be(),
|
|
358
|
+
value: n,
|
|
359
|
+
sessionId: q.value,
|
|
360
|
+
callback: (I, S) => {
|
|
361
|
+
if (I === "session" && (q.value = S), I === "node") {
|
|
362
|
+
if (!U) {
|
|
363
|
+
U = !0, c.value = !1;
|
|
364
|
+
const F = o.value[o.value.length - 1];
|
|
365
|
+
F && F.role === "assistant" && F.firstPackageTime === 0 && (F.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - a);
|
|
366
|
+
}
|
|
367
|
+
const g = b.value.find((F) => F.name === S.name);
|
|
368
|
+
g ? g.status = S.status : b.value.push({ name: S.name, status: S.status }), z();
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (I === "message") {
|
|
372
|
+
t = S;
|
|
373
|
+
const g = o.value[o.value.length - 1];
|
|
374
|
+
g && g.role === "assistant" && (g.content = t, z());
|
|
375
|
+
}
|
|
376
|
+
if (I === "finish") {
|
|
377
|
+
A.value = !1, _.value = !0;
|
|
378
|
+
const g = o.value[o.value.length - 1];
|
|
379
|
+
g && g.role === "assistant" && (g.showFeedback = !0, g.resTime = (/* @__PURE__ */ new Date()).getTime() - a, $("default", o.value.length - 1));
|
|
380
|
+
}
|
|
381
|
+
if (I === "error") {
|
|
382
|
+
c.value = !1, A.value = !1, o.value.pop(), o.value.push({
|
|
383
|
+
role: "assistant",
|
|
384
|
+
userContent: n,
|
|
385
|
+
content: `❌ ${S}`,
|
|
386
|
+
showFeedback: !1,
|
|
387
|
+
createTime: x().format("YYYY-MM-DD HH:mm:ss"),
|
|
388
|
+
resTime: (/* @__PURE__ */ new Date()).getTime() - a,
|
|
389
|
+
firstPackageTime: 0
|
|
390
|
+
}), $("default", o.value.length - 1), z();
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
} catch (I) {
|
|
396
|
+
W.error(`AI响应异常: ${I}`), o.value.pop(), o.value.push({
|
|
397
|
+
role: "assistant",
|
|
398
|
+
userContent: n,
|
|
399
|
+
content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
|
|
400
|
+
showFeedback: !0,
|
|
401
|
+
createTime: x().format("YYYY-MM-DD HH:mm:ss"),
|
|
402
|
+
resTime: (/* @__PURE__ */ new Date()).getTime() - a,
|
|
403
|
+
firstPackageTime: 0
|
|
404
|
+
}), $("default", o.value.length - 1), await z(), A.value = !1, c.value = !1;
|
|
355
405
|
}
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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>`;
|
|
363
|
-
}), t += "</div>"), t;
|
|
364
|
-
}, W = async (a, t) => {
|
|
365
|
-
switch (a) {
|
|
406
|
+
}, Ae = (n) => {
|
|
407
|
+
const { parsedConditions: t, ...a } = JSON.parse(n);
|
|
408
|
+
console.log({ parsedConditions: t, webParams: a }), R("callBack", a);
|
|
409
|
+
}, $ = async (n, t) => {
|
|
410
|
+
switch (n) {
|
|
366
411
|
case "satisfied": {
|
|
367
|
-
const
|
|
368
|
-
await
|
|
369
|
-
userName:
|
|
370
|
-
userContent:
|
|
371
|
-
aiContent:
|
|
412
|
+
const a = o.value[t];
|
|
413
|
+
await r.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
414
|
+
userName: C.username,
|
|
415
|
+
userContent: a.userContent,
|
|
416
|
+
aiContent: a.content,
|
|
372
417
|
type: 1,
|
|
373
|
-
createTime:
|
|
374
|
-
resTime:
|
|
375
|
-
firstPackageTime:
|
|
418
|
+
createTime: a.createTime,
|
|
419
|
+
resTime: a.resTime,
|
|
420
|
+
firstPackageTime: a.firstPackageTime,
|
|
376
421
|
isSolved: 1,
|
|
377
422
|
logOrigin: 1
|
|
378
|
-
}),
|
|
423
|
+
}), W.success("感谢您的评价!"), o.value[t].showFeedback = !1;
|
|
379
424
|
break;
|
|
380
425
|
}
|
|
381
426
|
case "open": {
|
|
382
|
-
|
|
427
|
+
G.value = t, N.value = !0;
|
|
383
428
|
break;
|
|
384
429
|
}
|
|
385
430
|
case "unsatisfied": {
|
|
386
|
-
const
|
|
387
|
-
await
|
|
388
|
-
userName:
|
|
389
|
-
userContent:
|
|
390
|
-
userSuggestion:
|
|
391
|
-
aiContent:
|
|
431
|
+
const a = o.value[t];
|
|
432
|
+
await r.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
433
|
+
userName: C.username,
|
|
434
|
+
userContent: a.userContent,
|
|
435
|
+
userSuggestion: P.value,
|
|
436
|
+
aiContent: a.content,
|
|
392
437
|
type: 2,
|
|
393
|
-
resTime:
|
|
394
|
-
createTime:
|
|
395
|
-
firstPackageTime:
|
|
438
|
+
resTime: a.resTime,
|
|
439
|
+
createTime: a.createTime,
|
|
440
|
+
firstPackageTime: a.firstPackageTime,
|
|
396
441
|
isSolved: 0,
|
|
397
442
|
logOrigin: 1
|
|
398
|
-
}),
|
|
443
|
+
}), W.success("感谢您的反馈!我们将持续跟踪并进行优化"), N.value = !1, o.value[t].showFeedback = !1;
|
|
399
444
|
break;
|
|
400
445
|
}
|
|
401
446
|
case "default": {
|
|
402
|
-
const
|
|
403
|
-
await
|
|
404
|
-
userName:
|
|
405
|
-
userContent:
|
|
406
|
-
userSuggestion:
|
|
407
|
-
aiContent:
|
|
447
|
+
const a = o.value[t];
|
|
448
|
+
await r.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
449
|
+
userName: C.username,
|
|
450
|
+
userContent: a.userContent,
|
|
451
|
+
userSuggestion: P.value,
|
|
452
|
+
aiContent: a.content,
|
|
408
453
|
type: null,
|
|
409
|
-
resTime:
|
|
410
|
-
createTime:
|
|
411
|
-
firstPackageTime:
|
|
454
|
+
resTime: a.resTime,
|
|
455
|
+
createTime: a.createTime,
|
|
456
|
+
firstPackageTime: a.firstPackageTime,
|
|
412
457
|
isSolved: 1,
|
|
413
458
|
logOrigin: 1
|
|
414
459
|
});
|
|
415
460
|
}
|
|
416
461
|
}
|
|
417
|
-
},
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
content: a,
|
|
426
|
-
createTime: X().format("YYYY-MM-DD HH:mm:ss")
|
|
427
|
-
}), V.value = "", await I(), o.value.push({
|
|
428
|
-
role: "assistant",
|
|
429
|
-
content: "",
|
|
430
|
-
userContent: a,
|
|
431
|
-
showFeedback: !1,
|
|
432
|
-
hasFeedback: !1,
|
|
433
|
-
createTime: X().format("YYYY-MM-DD HH:mm:ss"),
|
|
434
|
-
resTime: 0,
|
|
435
|
-
firstPackageTime: 0
|
|
436
|
-
}), await I(), k.value = !0, u.value = !0;
|
|
437
|
-
let t = "", n = (/* @__PURE__ */ new Date()).getTime(), S = !1;
|
|
438
|
-
try {
|
|
439
|
-
await Fe({
|
|
440
|
-
baseUrl: l.env.VITE_BASE_URL,
|
|
441
|
-
token: De(),
|
|
442
|
-
value: a,
|
|
443
|
-
callback: (z, M) => {
|
|
444
|
-
if (z === "error") {
|
|
445
|
-
u.value = !1, k.value = !1, o.value.pop(), o.value.push({
|
|
446
|
-
role: "assistant",
|
|
447
|
-
userContent: a,
|
|
448
|
-
content: `❌ ${M}`,
|
|
449
|
-
showFeedback: !1,
|
|
450
|
-
hasFeedback: !1,
|
|
451
|
-
createTime: X().format("YYYY-MM-DD HH:mm:ss"),
|
|
452
|
-
resTime: (/* @__PURE__ */ new Date()).getTime() - n,
|
|
453
|
-
firstPackageTime: 0
|
|
454
|
-
}), W("default", o.value.length - 1), I();
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
if (z === "node") {
|
|
458
|
-
if (!S) {
|
|
459
|
-
S = !0, u.value = !1;
|
|
460
|
-
const _ = o.value[o.value.length - 1];
|
|
461
|
-
_ && _.role === "assistant" && _.firstPackageTime === 0 && (_.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - n);
|
|
462
|
-
}
|
|
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();
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
if (z === "message") {
|
|
468
|
-
t = M;
|
|
469
|
-
const h = o.value[o.value.length - 1];
|
|
470
|
-
h && h.role === "assistant" && (h.content = t, I());
|
|
471
|
-
}
|
|
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));
|
|
476
|
-
try {
|
|
477
|
-
const _ = JSON.parse(t);
|
|
478
|
-
_.parsedConditions && delete _.parsedConditions, U("callBack", _);
|
|
479
|
-
} catch {
|
|
480
|
-
U("callBack", t);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
});
|
|
485
|
-
} catch (z) {
|
|
486
|
-
ee.error(`AI响应异常: ${z}`), o.value.pop(), o.value.push({
|
|
487
|
-
role: "assistant",
|
|
488
|
-
userContent: a,
|
|
489
|
-
content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
|
|
490
|
-
showFeedback: !0,
|
|
491
|
-
hasFeedback: !1,
|
|
492
|
-
createTime: X().format("YYYY-MM-DD HH:mm:ss"),
|
|
493
|
-
resTime: (/* @__PURE__ */ new Date()).getTime() - n,
|
|
494
|
-
firstPackageTime: 0
|
|
495
|
-
}), W("default", o.value.length - 1), await I(), k.value = !1, u.value = !1;
|
|
496
|
-
}
|
|
497
|
-
}, ke = (a) => {
|
|
498
|
-
if (a.key === "Enter")
|
|
499
|
-
if (a.ctrlKey) {
|
|
500
|
-
a.preventDefault();
|
|
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(() => {
|
|
504
|
-
t.selectionStart = t.selectionEnd = n + 1;
|
|
462
|
+
}, he = (n) => {
|
|
463
|
+
if (n.key === "Enter")
|
|
464
|
+
if (n.ctrlKey) {
|
|
465
|
+
n.preventDefault();
|
|
466
|
+
const t = n.target, a = t.selectionStart, U = t.selectionEnd;
|
|
467
|
+
V.value = V.value.substring(0, a) + `
|
|
468
|
+
` + V.value.substring(U), se(() => {
|
|
469
|
+
t.selectionStart = t.selectionEnd = a + 1;
|
|
505
470
|
});
|
|
506
471
|
} else
|
|
507
|
-
|
|
508
|
-
},
|
|
509
|
-
await
|
|
472
|
+
n.preventDefault(), B();
|
|
473
|
+
}, z = async () => {
|
|
474
|
+
await se(), E.value && (E.value.scrollTop = E.value.scrollHeight);
|
|
475
|
+
}, ie = (n) => {
|
|
476
|
+
if (typeof n != "string")
|
|
477
|
+
return !1;
|
|
478
|
+
try {
|
|
479
|
+
const t = JSON.parse(n);
|
|
480
|
+
return t !== null && typeof t == "object";
|
|
481
|
+
} catch {
|
|
482
|
+
return !1;
|
|
483
|
+
}
|
|
484
|
+
}, ke = (n) => {
|
|
485
|
+
const { parsedConditions: t } = JSON.parse(n);
|
|
486
|
+
let a = "";
|
|
487
|
+
return t != null && t.length && (a += '<div class="parsed-conditions">', t.forEach((U) => {
|
|
488
|
+
a += `<div class="parsed-conditions-item">${U}</div>`;
|
|
489
|
+
}), a += "</div>"), a;
|
|
510
490
|
};
|
|
511
|
-
return
|
|
491
|
+
return oe(
|
|
512
492
|
() => o.value,
|
|
513
493
|
() => {
|
|
514
|
-
|
|
494
|
+
z();
|
|
515
495
|
},
|
|
516
496
|
{ deep: !0 }
|
|
517
|
-
),
|
|
518
|
-
() =>
|
|
519
|
-
(
|
|
520
|
-
|
|
497
|
+
), oe(
|
|
498
|
+
() => N.value,
|
|
499
|
+
(n) => {
|
|
500
|
+
n || (P.value = "");
|
|
521
501
|
}
|
|
522
|
-
),
|
|
502
|
+
), i({
|
|
523
503
|
open: () => {
|
|
524
|
-
|
|
525
|
-
|
|
504
|
+
M.value = !0, se(() => {
|
|
505
|
+
z();
|
|
526
506
|
});
|
|
527
507
|
}
|
|
528
|
-
}), (
|
|
529
|
-
const
|
|
530
|
-
return
|
|
531
|
-
|
|
508
|
+
}), (n, t) => {
|
|
509
|
+
const a = Xe, U = re, I = st, S = Se, g = Te, F = _e, ce = be;
|
|
510
|
+
return l(), m(X, null, [
|
|
511
|
+
h(ce, {
|
|
532
512
|
class: "ai-dialog",
|
|
533
|
-
modelValue:
|
|
534
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
513
|
+
modelValue: M.value,
|
|
514
|
+
"onUpdate:modelValue": t[1] || (t[1] = (u) => M.value = u),
|
|
535
515
|
title: "✨ 品种池参数解析AI助手",
|
|
536
516
|
width: "500px",
|
|
537
517
|
center: "",
|
|
@@ -540,160 +520,179 @@ const R = (p) => ($e("data-v-f40b6b16"), p = p(), Ee(), p), tt = { class: "ai-di
|
|
|
540
520
|
modal: !1,
|
|
541
521
|
"modal-penetrable": !0
|
|
542
522
|
}, {
|
|
543
|
-
default:
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
523
|
+
default: y(() => [
|
|
524
|
+
d("div", nt, [
|
|
525
|
+
d("div", {
|
|
526
|
+
ref_key: "messageListRef",
|
|
527
|
+
ref: E,
|
|
528
|
+
class: "message-list"
|
|
529
|
+
}, [
|
|
530
|
+
(l(!0), m(X, null, ue(o.value, (u, H) => (l(), m("div", {
|
|
531
|
+
key: H,
|
|
532
|
+
class: w([u.role, "message-item"])
|
|
551
533
|
}, [
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
534
|
+
u.content || H === o.value.length - 1 && u.role === "assistant" && b.value.length > 0 ? (l(), m(X, { key: 0 }, [
|
|
535
|
+
d("div", rt, [
|
|
536
|
+
h(a, {
|
|
537
|
+
size: 32,
|
|
538
|
+
icon: u.role === "user" ? s(ze) : s(Je)
|
|
539
|
+
}, null, 8, ["icon"])
|
|
540
|
+
]),
|
|
541
|
+
d("div", lt, [
|
|
542
|
+
H === o.value.length - 1 && u.role === "assistant" && b.value.length > 0 && !_.value ? (l(), m("div", it, [
|
|
543
|
+
(l(!0), m(X, null, ue(b.value, (j) => (l(), m("div", {
|
|
544
|
+
key: j.name,
|
|
545
|
+
class: "node-progress-item"
|
|
546
|
+
}, [
|
|
547
|
+
d("span", ct, [
|
|
548
|
+
j.status === "success" ? (l(), O(U, {
|
|
549
|
+
key: 0,
|
|
550
|
+
class: "node-icon done"
|
|
551
|
+
}, {
|
|
552
|
+
default: y(() => [
|
|
553
|
+
h(s(Qe))
|
|
554
|
+
]),
|
|
555
|
+
_: 1
|
|
556
|
+
})) : (l(), O(U, {
|
|
557
|
+
key: 1,
|
|
558
|
+
class: "node-icon running"
|
|
559
|
+
}, {
|
|
560
|
+
default: y(() => [
|
|
561
|
+
h(s(He))
|
|
562
|
+
]),
|
|
563
|
+
_: 1
|
|
564
|
+
}))
|
|
565
|
+
]),
|
|
566
|
+
d("span", ut, K(j.name), 1)
|
|
567
|
+
]))), 128)),
|
|
568
|
+
d("div", dt, [
|
|
569
|
+
h(I, {
|
|
570
|
+
percentage: Y.value,
|
|
571
|
+
"show-text": !1,
|
|
572
|
+
"stroke-width": 4,
|
|
573
|
+
color: "#667eea"
|
|
574
|
+
}, null, 8, ["percentage"]),
|
|
575
|
+
d("span", pt, "第 " + K(v.value) + "/" + K(e.value) + " 步 · " + K(T.value), 1)
|
|
576
|
+
])
|
|
577
|
+
])) : Q("", !0),
|
|
578
|
+
ie(u.content) ? (l(), m("div", {
|
|
579
|
+
key: 1,
|
|
580
|
+
class: w(["message-content-json", { "result-animation": H === o.value.length - 1 && _.value }]),
|
|
581
|
+
innerHTML: ke(u.content)
|
|
582
|
+
}, null, 10, ft)) : u.content ? (l(), m("div", {
|
|
583
|
+
key: 2,
|
|
584
|
+
class: w(["message-content-text", { "result-animation": H === o.value.length - 1 && _.value }])
|
|
585
|
+
}, K(u.content), 3)) : Q("", !0),
|
|
586
|
+
u.role === "assistant" ? (l(), m("div", mt, [
|
|
587
|
+
u.showFeedback ? (l(), m("div", vt, [
|
|
588
|
+
h(S, {
|
|
589
|
+
content: "满意",
|
|
590
|
+
placement: "bottom"
|
|
591
|
+
}, {
|
|
592
|
+
default: y(() => [
|
|
593
|
+
d("img", {
|
|
594
|
+
src: at,
|
|
595
|
+
alt: "满意",
|
|
596
|
+
onClick: (j) => $("satisfied", H)
|
|
597
|
+
}, null, 8, gt)
|
|
587
598
|
]),
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
_: 2
|
|
600
|
+
}, 1024),
|
|
601
|
+
h(S, {
|
|
602
|
+
content: "满意",
|
|
603
|
+
placement: "bottom"
|
|
604
|
+
}, {
|
|
605
|
+
default: y(() => [
|
|
606
|
+
d("img", {
|
|
607
|
+
src: ot,
|
|
608
|
+
alt: "不满意",
|
|
609
|
+
onClick: (j) => $("open", H)
|
|
610
|
+
}, null, 8, At)
|
|
611
|
+
]),
|
|
612
|
+
_: 2
|
|
613
|
+
}, 1024)
|
|
614
|
+
])) : Q("", !0),
|
|
615
|
+
ie(u.content) ? (l(), O(g, {
|
|
601
616
|
key: 1,
|
|
602
|
-
class:
|
|
603
|
-
|
|
604
|
-
},
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
},
|
|
641
|
-
r("div", St, [
|
|
642
|
-
Ct,
|
|
643
|
-
C(h, {
|
|
644
|
-
class: "send-btn",
|
|
645
|
-
type: "primary",
|
|
646
|
-
icon: s(ze),
|
|
647
|
-
loading: k.value,
|
|
648
|
-
onClick: ce,
|
|
649
|
-
round: ""
|
|
650
|
-
}, {
|
|
651
|
-
default: P(() => [
|
|
652
|
-
ne(" 发送 ")
|
|
653
|
-
]),
|
|
654
|
-
_: 1
|
|
655
|
-
}, 8, ["icon", "loading"])
|
|
656
|
-
])
|
|
617
|
+
class: "confirm-btn",
|
|
618
|
+
onClick: (j) => Ae(u.content)
|
|
619
|
+
}, {
|
|
620
|
+
default: y(() => [
|
|
621
|
+
Z(" 查看结果 ")
|
|
622
|
+
]),
|
|
623
|
+
_: 2
|
|
624
|
+
}, 1032, ["onClick"])) : Q("", !0)
|
|
625
|
+
])) : Q("", !0)
|
|
626
|
+
])
|
|
627
|
+
], 64)) : Q("", !0)
|
|
628
|
+
], 2))), 128))
|
|
629
|
+
], 512),
|
|
630
|
+
d("div", ht, [
|
|
631
|
+
h(F, {
|
|
632
|
+
class: "message-input",
|
|
633
|
+
modelValue: V.value,
|
|
634
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => V.value = u),
|
|
635
|
+
type: "textarea",
|
|
636
|
+
rows: 4,
|
|
637
|
+
autosize: { minRows: 2, maxRows: 4 },
|
|
638
|
+
placeholder: "输入您想查询的品种条件...",
|
|
639
|
+
onKeydown: he
|
|
640
|
+
}, null, 8, ["modelValue"]),
|
|
641
|
+
d("div", kt, [
|
|
642
|
+
yt,
|
|
643
|
+
h(g, {
|
|
644
|
+
class: "send-btn",
|
|
645
|
+
type: "primary",
|
|
646
|
+
icon: s(Ke),
|
|
647
|
+
loading: A.value,
|
|
648
|
+
onClick: B,
|
|
649
|
+
round: ""
|
|
650
|
+
}, {
|
|
651
|
+
default: y(() => [
|
|
652
|
+
Z(" 发送 ")
|
|
653
|
+
]),
|
|
654
|
+
_: 1
|
|
655
|
+
}, 8, ["icon", "loading"])
|
|
657
656
|
])
|
|
658
657
|
])
|
|
659
|
-
]
|
|
660
|
-
|
|
658
|
+
])
|
|
659
|
+
]),
|
|
661
660
|
_: 1
|
|
662
661
|
}, 8, ["modelValue"]),
|
|
663
|
-
|
|
664
|
-
modelValue:
|
|
665
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
662
|
+
h(ce, {
|
|
663
|
+
modelValue: N.value,
|
|
664
|
+
"onUpdate:modelValue": t[5] || (t[5] = (u) => N.value = u),
|
|
666
665
|
title: "📝 反馈意见",
|
|
667
666
|
width: "400px"
|
|
668
667
|
}, {
|
|
669
|
-
footer:
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
onClick: t[3] || (t[3] = (
|
|
668
|
+
footer: y(() => [
|
|
669
|
+
d("span", Tt, [
|
|
670
|
+
h(g, {
|
|
671
|
+
onClick: t[3] || (t[3] = (u) => N.value = !1)
|
|
673
672
|
}, {
|
|
674
|
-
default:
|
|
675
|
-
|
|
673
|
+
default: y(() => [
|
|
674
|
+
Z("取消")
|
|
676
675
|
]),
|
|
677
676
|
_: 1
|
|
678
677
|
}),
|
|
679
|
-
|
|
678
|
+
h(g, {
|
|
680
679
|
type: "primary",
|
|
681
|
-
onClick: t[4] || (t[4] = (
|
|
680
|
+
onClick: t[4] || (t[4] = (u) => $("unsatisfied", G.value))
|
|
682
681
|
}, {
|
|
683
|
-
default:
|
|
684
|
-
|
|
682
|
+
default: y(() => [
|
|
683
|
+
Z("提交反馈")
|
|
685
684
|
]),
|
|
686
685
|
_: 1
|
|
687
686
|
})
|
|
688
687
|
])
|
|
689
688
|
]),
|
|
690
|
-
default:
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
modelValue:
|
|
696
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
689
|
+
default: y(() => [
|
|
690
|
+
d("div", wt, [
|
|
691
|
+
bt,
|
|
692
|
+
_t,
|
|
693
|
+
h(F, {
|
|
694
|
+
modelValue: P.value,
|
|
695
|
+
"onUpdate:modelValue": t[2] || (t[2] = (u) => P.value = u),
|
|
697
696
|
type: "textarea",
|
|
698
697
|
rows: 4,
|
|
699
698
|
placeholder: "[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."
|
|
@@ -705,11 +704,11 @@ const R = (p) => ($e("data-v-f40b6b16"), p = p(), Ee(), p), tt = { class: "ai-di
|
|
|
705
704
|
], 64);
|
|
706
705
|
};
|
|
707
706
|
}
|
|
708
|
-
},
|
|
707
|
+
}, Dt = /* @__PURE__ */ Oe(St, [["__scopeId", "data-v-652408e0"]]), Wt = {
|
|
709
708
|
install(p) {
|
|
710
|
-
p.component("st-varietyAiHelper",
|
|
709
|
+
p.component("st-varietyAiHelper", Dt);
|
|
711
710
|
}
|
|
712
711
|
};
|
|
713
712
|
export {
|
|
714
|
-
|
|
713
|
+
Wt as default
|
|
715
714
|
};
|