st-comp 0.0.280 → 0.0.282
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/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +512 -306
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +25 -25
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +10 -10
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +418 -416
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +16 -16
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +9 -9
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +11 -11
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +17 -17
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +13 -13
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +2 -2
- package/es/Table.cjs +1 -1
- package/es/Table.js +22 -22
- package/es/User.cjs +1 -1
- package/es/User.js +18 -18
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +19 -19
- package/es/VarietyAiHelper.cjs +7 -7
- package/es/VarietyAiHelper.js +426 -437
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +7 -7
- package/es/VarietySearch.cjs +8 -8
- package/es/VarietySearch.js +385 -372
- package/es/{VarietySelect-c402bade.js → VarietySelect-3fc0f0ce.js} +3 -3
- package/es/{VarietySelect-aa082a9c.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +9 -9
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +94 -94
- package/es/{_baseClone-10bdb989.cjs → _baseClone-f8e5d3ba.cjs} +1 -1
- package/es/{_baseClone-98af8b33.js → _baseClone-fb6a3947.js} +2 -2
- package/es/{config-provider-563023c9.js → config-provider-06d8207f.js} +3 -3
- package/es/{config-provider-33a127c4.cjs → config-provider-bb61bd3e.cjs} +1 -1
- package/es/{dropdown-ce7496c7.cjs → dropdown-8fa21bfd.cjs} +1 -1
- package/es/{dropdown-feea8702.js → dropdown-bcf8d198.js} +2 -2
- package/es/{el-autocomplete-d9253bba.cjs → el-autocomplete-13b9e372.cjs} +1 -1
- package/es/{el-autocomplete-eac54f9f.js → el-autocomplete-419bfbcf.js} +5 -5
- package/es/{el-button-8a9721f8.js → el-button-ee9fe159.js} +3 -3
- package/es/{el-button-8259594b.cjs → el-button-fac5e058.cjs} +1 -1
- package/es/{el-checkbox-6303fc92.cjs → el-checkbox-6cf1a71c.cjs} +1 -1
- package/es/{el-checkbox-c328b097.js → el-checkbox-b5ac7f04.js} +4 -4
- package/es/{el-dialog-67536fac.js → el-dialog-060b3735.js} +4 -4
- package/es/{el-dialog-8788bcc1.cjs → el-dialog-54aebacd.cjs} +1 -1
- package/es/{el-form-item-8efcf2c3.js → el-form-item-2be6b683.js} +3 -3
- package/es/{el-form-item-95e68669.cjs → el-form-item-758dfefa.cjs} +1 -1
- package/es/{el-input-c8a9bb71.cjs → el-input-7fe53030.cjs} +1 -1
- package/es/{el-input-e66500b7.js → el-input-d23f5442.js} +60 -60
- package/es/{el-input-number-68ee0d65.js → el-input-number-484fb184.js} +15 -15
- package/es/{el-input-number-d7a81922.cjs → el-input-number-f0f4eedb.cjs} +1 -1
- package/es/{el-loading-db4c6d13.js → el-loading-9d3e405c.js} +1 -1
- package/es/{el-loading-62132db2.cjs → el-loading-fafaaa7b.cjs} +1 -1
- package/es/{el-menu-item-c2523d82.js → el-menu-item-0ac22681.js} +4 -4
- package/es/{el-menu-item-4b8e7794.cjs → el-menu-item-c91ae430.cjs} +1 -1
- package/es/{el-message-box-7c13546c.js → el-message-box-568a0aa6.js} +9 -9
- package/es/{el-message-box-fed174f0.cjs → el-message-box-ceacb54e.cjs} +1 -1
- package/es/{el-overlay-17299785.cjs → el-overlay-9f36e73c.cjs} +1 -1
- package/es/{el-overlay-36f223e9.js → el-overlay-cb5c85aa.js} +3 -3
- package/es/{el-popconfirm-520b2928.cjs → el-popconfirm-4a8cd35c.cjs} +1 -1
- package/es/{el-popconfirm-a857c54a.js → el-popconfirm-6f8e65c8.js} +4 -4
- package/es/{el-popper-852446fd.js → el-popper-0454c8e8.js} +1 -1
- package/es/{el-popper-f824c63b.cjs → el-popper-acd0ff35.cjs} +1 -1
- package/es/{el-segmented-bf08279f.js → el-segmented-64dc7258.js} +2 -2
- package/es/{el-segmented-45dcc036.cjs → el-segmented-eb3c8e65.cjs} +1 -1
- package/es/{el-select-a34348e1.js → el-select-a573c78b.js} +8 -8
- package/es/{el-select-d2958ae8.cjs → el-select-c317294a.cjs} +1 -1
- package/es/{el-table-column-e2be313e.js → el-table-column-1c443963.js} +9 -9
- package/es/{el-table-column-ad70ee0e.cjs → el-table-column-f555115d.cjs} +1 -1
- package/es/{el-tag-9bcfae32.js → el-tag-2d8a3fe7.js} +2 -2
- package/es/{el-tag-527f06f0.cjs → el-tag-dca1292c.cjs} +1 -1
- package/es/{el-text-fc345ffd.cjs → el-text-649c986a.cjs} +1 -1
- package/es/{el-text-f9379288.js → el-text-761e6717.js} +1 -1
- package/es/{index-7711aa69.cjs → index-11181b5f.cjs} +1 -1
- package/es/{index-5e76a22d.cjs → index-21a3dc89.cjs} +1 -1
- package/es/{index-99bb359f.cjs → index-33e039e3.cjs} +1 -1
- package/es/{index-bb0bc131.cjs → index-4614e8e9.cjs} +2 -2
- package/es/{index-dfb34e00.js → index-53beef02.js} +1 -1
- package/es/index-5cada1ed.cjs +1 -0
- package/es/{index-3ed0c678.cjs → index-6a36e1fc.cjs} +1 -1
- package/es/{index-60900c6c.js → index-6a52dc7c.js} +112 -82
- package/es/{index-b9a26e7f.js → index-78dab605.js} +3 -3
- package/es/{index-99d4335d.cjs → index-798fec2d.cjs} +1 -1
- package/es/{index-47d30a52.js → index-9573f74b.js} +1 -1
- package/es/{index-69d2353a.js → index-ab0ad219.js} +9 -9
- package/es/{index-3a0a7c36.cjs → index-beb5cb7d.cjs} +1 -1
- package/es/{index-86678b72.js → index-c09fc6f5.js} +2 -2
- package/es/{index-5dec535a.cjs → index-ceae4c47.cjs} +1 -1
- package/es/{index-a0522466.js → index-d9379af4.js} +2 -2
- package/es/{index-7c4d8f5d.js → index-dddacf80.js} +1 -1
- package/es/{index-2419d69a.js → index-e2e58ea9.js} +5 -5
- package/es/{python-922eca89.cjs → python-60e79979.cjs} +1 -1
- package/es/{python-6eafa04b.js → python-673bf8b8.js} +17 -17
- package/es/style.css +1 -1
- package/es/{use-form-item-0a831287.cjs → use-form-item-76516e50.cjs} +1 -1
- package/es/{use-form-item-187cd7db.js → use-form-item-784142b4.js} +16 -16
- package/es/{use-global-config-c90c91f7.cjs → use-global-config-7ff9a1c2.cjs} +1 -1
- package/es/{use-global-config-17dafd40.js → use-global-config-9a4ccf33.js} +2 -2
- package/es/{validator-ee5bc3eb.cjs → validator-1926345b.cjs} +1 -1
- package/es/{validator-800ed2ba.js → validator-a66ec4f8.js} +1 -1
- package/es/{zh-cn-26cc7233.js → zh-cn-51c2e528.js} +1 -1
- package/es/{zh-cn-a22a6792.cjs → zh-cn-ad12d9f5.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +207 -207
- package/lib/{index-74ed48c6.js → index-2b2824f6.js} +23900 -23662
- package/lib/{python-7aaa84e4.js → python-b8d31c7a.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/index-3e7d5ffb.cjs +0 -1
package/es/CustomFunction.js
CHANGED
|
@@ -1,44 +1,54 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { E as
|
|
3
|
-
import { E as
|
|
4
|
-
import { E as
|
|
5
|
-
import { E as
|
|
1
|
+
import { c as ne, d as pe, a as me, b as $e, m as De, e as Ie, l as Fe, E as ve, f as Oe } from "./index-6a52dc7c.js";
|
|
2
|
+
import { E as _e } from "./el-button-ee9fe159.js";
|
|
3
|
+
import { E as Ae, a as ze } from "./el-select-a573c78b.js";
|
|
4
|
+
import { E as ge } from "./el-popconfirm-6f8e65c8.js";
|
|
5
|
+
import { E as V } from "./index-e2e58ea9.js";
|
|
6
6
|
import "./base-dd156b8e.js";
|
|
7
7
|
import "./el-scrollbar-0a42c1d0.js";
|
|
8
|
-
import "./el-popper-
|
|
9
|
-
import "./el-tag-
|
|
8
|
+
import "./el-popper-0454c8e8.js";
|
|
9
|
+
import "./el-tag-2d8a3fe7.js";
|
|
10
10
|
import "./el-popover-4ed993c7.js";
|
|
11
|
-
import { inject as
|
|
12
|
-
import { E as
|
|
13
|
-
import { E as
|
|
14
|
-
import { E as
|
|
15
|
-
import { E as
|
|
16
|
-
import { E as
|
|
17
|
-
import { E as
|
|
18
|
-
import { E as
|
|
19
|
-
import "./el-overlay-
|
|
20
|
-
import { j as
|
|
11
|
+
import { inject as ye, ref as p, reactive as Q, computed as Be, watch as Re, nextTick as ue, resolveComponent as ce, openBlock as f, createBlock as F, withCtx as l, createElementVNode as s, normalizeClass as W, createVNode as o, unref as g, createTextVNode as x, createElementBlock as E, Fragment as Y, renderList as Z, toDisplayString as O, withModifiers as ee, createCommentVNode as X, h as H, onMounted as Me, normalizeStyle as Ue } from "vue";
|
|
12
|
+
import { E as je, a as Te } from "./el-form-item-2be6b683.js";
|
|
13
|
+
import { E as de } from "./el-input-d23f5442.js";
|
|
14
|
+
import { E as qe } from "./index-d9379af4.js";
|
|
15
|
+
import { E as Le } from "./el-dialog-060b3735.js";
|
|
16
|
+
import { E as Pe } from "./el-divider-c5d72961.js";
|
|
17
|
+
import { E as We } from "./el-empty-552baf04.js";
|
|
18
|
+
import { E as fe } from "./el-message-box-568a0aa6.js";
|
|
19
|
+
import "./el-overlay-cb5c85aa.js";
|
|
20
|
+
import { j as He, R as Je } from "./index-53cc4e43.js";
|
|
21
|
+
import { s as Ke } from "./aiTools-ce2f9281.js";
|
|
21
22
|
import "./el-message-4ed993c7.js";
|
|
22
|
-
import { _ as
|
|
23
|
-
import "./use-form-item-
|
|
23
|
+
import { _ as xe } from "./_plugin-vue_export-helper-dad06003.js";
|
|
24
|
+
import "./use-form-item-784142b4.js";
|
|
24
25
|
import "./index-a181f161.js";
|
|
25
26
|
import "./index-de9ad85c.js";
|
|
26
|
-
import "./use-global-config-
|
|
27
|
-
import "./index-
|
|
27
|
+
import "./use-global-config-9a4ccf33.js";
|
|
28
|
+
import "./index-9573f74b.js";
|
|
28
29
|
import "./index-3806160e.js";
|
|
29
30
|
import "./castArray-18eb6a41.js";
|
|
30
31
|
import "./vnode-8ee9bf4e.js";
|
|
31
|
-
import "./index-
|
|
32
|
+
import "./index-c09fc6f5.js";
|
|
32
33
|
import "./scroll-70271cb1.js";
|
|
33
|
-
import "./index-
|
|
34
|
+
import "./index-dddacf80.js";
|
|
34
35
|
import "./toNumber-f077c66a.js";
|
|
35
36
|
import "./clamp-c7512966.js";
|
|
36
|
-
import "./config-provider-
|
|
37
|
+
import "./config-provider-06d8207f.js";
|
|
37
38
|
import "./typescript-7ae59c4c.js";
|
|
38
|
-
import "./_baseClone-
|
|
39
|
+
import "./_baseClone-fb6a3947.js";
|
|
39
40
|
import "./raf-b4fd1e12.js";
|
|
40
|
-
import "./validator-
|
|
41
|
-
const
|
|
41
|
+
import "./validator-a66ec4f8.js";
|
|
42
|
+
const Ge = { class: "custom-header" }, Qe = { class: "left" }, Xe = ["id"], Ye = { class: "right" }, Ze = { class: "manage-dialog-body" }, et = { class: "func-list" }, tt = { class: "search" }, ot = ["onClick"], lt = { class: "icon-box" }, nt = { class: "rule-form" }, st = { class: "header" }, at = { class: "right" }, it = { class: "custom-header" }, rt = { class: "left" }, ut = ["id"], ct = { class: "right" }, dt = { class: "ai-dialog-body" }, ft = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "node-progress"
|
|
45
|
+
}, pt = {
|
|
46
|
+
key: 1,
|
|
47
|
+
class: "ai-error"
|
|
48
|
+
}, mt = {
|
|
49
|
+
key: 2,
|
|
50
|
+
class: "ai-result"
|
|
51
|
+
}, vt = { class: "factor-expr" }, _t = { class: "dialog-footer" }, gt = { class: "custom-header" }, yt = { class: "left" }, xt = ["id"], Et = { class: "right" }, kt = { class: "content" }, ht = { class: "dialog-footer" }, Ct = {
|
|
42
52
|
__name: "ManageDialog",
|
|
43
53
|
props: {
|
|
44
54
|
data: {
|
|
@@ -47,93 +57,93 @@ const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me =
|
|
|
47
57
|
}
|
|
48
58
|
},
|
|
49
59
|
emits: ["refreshData"],
|
|
50
|
-
setup(
|
|
51
|
-
const { request:
|
|
60
|
+
setup(D, { expose: te, emit: J }) {
|
|
61
|
+
const S = ye("stConfig"), { request: R } = S, m = p(null), k = p(null), w = J, M = D, A = p(!1), N = Q({
|
|
52
62
|
save: !1,
|
|
53
63
|
test: !1
|
|
54
|
-
}),
|
|
64
|
+
}), h = p(null), _ = Be(() => h.value ? M.data.filter((n) => n.funcName.includes(h.value)) : M.data), t = Q({
|
|
55
65
|
id: null,
|
|
56
66
|
funcName: "",
|
|
57
67
|
funcExpression: ""
|
|
58
|
-
}),
|
|
68
|
+
}), c = Q({
|
|
59
69
|
result: null,
|
|
60
70
|
detail: "",
|
|
61
71
|
code: ""
|
|
62
|
-
}),
|
|
72
|
+
}), $ = p(!1), q = () => {
|
|
63
73
|
var n;
|
|
64
|
-
Object.assign(
|
|
74
|
+
Object.assign(t, {
|
|
65
75
|
id: null,
|
|
66
76
|
funcName: "",
|
|
67
77
|
funcExpression: ""
|
|
68
|
-
}), (n =
|
|
69
|
-
},
|
|
78
|
+
}), (n = m.value) == null || n.setValue(t.funcExpression);
|
|
79
|
+
}, L = (n) => {
|
|
70
80
|
var e;
|
|
71
|
-
Object.assign(
|
|
81
|
+
Object.assign(t, {
|
|
72
82
|
id: n.id,
|
|
73
83
|
funcName: n.funcName,
|
|
74
84
|
funcExpression: n.funcExpression
|
|
75
|
-
}), (e =
|
|
76
|
-
},
|
|
85
|
+
}), (e = m.value) == null || e.setValue(t.funcExpression);
|
|
86
|
+
}, K = (n) => {
|
|
77
87
|
var e;
|
|
78
|
-
Object.assign(
|
|
88
|
+
Object.assign(t, {
|
|
79
89
|
id: null,
|
|
80
90
|
funcName: `${n.funcName}-复制`,
|
|
81
91
|
funcExpression: n.funcExpression
|
|
82
|
-
}), (e =
|
|
83
|
-
},
|
|
92
|
+
}), (e = m.value) == null || e.setValue(t.funcExpression);
|
|
93
|
+
}, y = async (n) => {
|
|
84
94
|
var e;
|
|
85
|
-
n.id ===
|
|
95
|
+
n.id === t.id && (Object.assign(t, {
|
|
86
96
|
id: null,
|
|
87
97
|
funcName: "",
|
|
88
98
|
funcExpression: ""
|
|
89
|
-
}), (e =
|
|
90
|
-
},
|
|
99
|
+
}), (e = m.value) == null || e.setValue(t.funcExpression)), await R.post("/common/qt/deleteSearchFunctionById", { id: n.id }), w("refreshData");
|
|
100
|
+
}, G = He(async () => {
|
|
91
101
|
try {
|
|
92
|
-
if (
|
|
93
|
-
return
|
|
94
|
-
if (!
|
|
95
|
-
return
|
|
96
|
-
await
|
|
102
|
+
if (N.save = !0, t.funcExpression = m.value.getValue(), !t.funcName)
|
|
103
|
+
return V.error("函数名称不可为空");
|
|
104
|
+
if (!t.funcExpression)
|
|
105
|
+
return V.error("函数内容不可为空");
|
|
106
|
+
await R.post("/common/qt/saveOrUpdateSearchFunction", t), V.success("操作成功"), w("refreshData"), t.id || q();
|
|
97
107
|
} finally {
|
|
98
|
-
|
|
108
|
+
N.save = !1;
|
|
99
109
|
}
|
|
100
|
-
}),
|
|
101
|
-
const
|
|
102
|
-
n.reduce((
|
|
103
|
-
),
|
|
104
|
-
let
|
|
105
|
-
const
|
|
106
|
-
return n.forEach((
|
|
107
|
-
var
|
|
108
|
-
(
|
|
109
|
-
}),
|
|
110
|
+
}), Ee = (n) => new Promise((e) => {
|
|
111
|
+
const i = p(
|
|
112
|
+
n.reduce((r, v) => (r[v] = "", r), {})
|
|
113
|
+
), u = p({}), d = () => {
|
|
114
|
+
let r = !0;
|
|
115
|
+
const v = {};
|
|
116
|
+
return n.forEach((I) => {
|
|
117
|
+
var T;
|
|
118
|
+
(T = i.value[I]) != null && T.trim() || (v[I] = `请输入${I}的值`, r = !1);
|
|
119
|
+
}), u.value = v, r;
|
|
110
120
|
};
|
|
111
|
-
|
|
121
|
+
fe({
|
|
112
122
|
title: "填写变量值用于接口测试",
|
|
113
|
-
message:
|
|
123
|
+
message: H({
|
|
114
124
|
setup() {
|
|
115
|
-
return () =>
|
|
116
|
-
|
|
117
|
-
|
|
125
|
+
return () => H("div", [
|
|
126
|
+
H(
|
|
127
|
+
je,
|
|
118
128
|
{
|
|
119
|
-
model:
|
|
129
|
+
model: i.value
|
|
120
130
|
},
|
|
121
131
|
() => n.map(
|
|
122
|
-
(
|
|
123
|
-
|
|
132
|
+
(r) => H(
|
|
133
|
+
Te,
|
|
124
134
|
{
|
|
125
|
-
label: `${
|
|
126
|
-
prop:
|
|
127
|
-
error:
|
|
135
|
+
label: `${r}: `,
|
|
136
|
+
prop: r,
|
|
137
|
+
error: u.value[r],
|
|
128
138
|
"label-width": "90px"
|
|
129
139
|
},
|
|
130
|
-
() =>
|
|
131
|
-
modelValue:
|
|
132
|
-
"onUpdate:modelValue": (
|
|
133
|
-
|
|
140
|
+
() => H(de, {
|
|
141
|
+
modelValue: i.value[r],
|
|
142
|
+
"onUpdate:modelValue": (v) => {
|
|
143
|
+
i.value[r] = v, u.value[r] && delete u.value[r];
|
|
134
144
|
},
|
|
135
|
-
placeholder: `请输入 ${
|
|
136
|
-
status:
|
|
145
|
+
placeholder: `请输入 ${r} 的值`,
|
|
146
|
+
status: u.value[r] ? "error" : ""
|
|
137
147
|
})
|
|
138
148
|
)
|
|
139
149
|
)
|
|
@@ -145,77 +155,148 @@ const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me =
|
|
|
145
155
|
confirmButtonText: "确定",
|
|
146
156
|
cancelButtonText: "取消",
|
|
147
157
|
customClass: "variable-input-dialog",
|
|
148
|
-
beforeClose: async (
|
|
149
|
-
|
|
158
|
+
beforeClose: async (r, v, I) => {
|
|
159
|
+
r !== "confirm" && (e(!1), I()), await ue(), d() && (e({ ...i.value }), I());
|
|
150
160
|
}
|
|
151
161
|
}).catch(() => e(!1));
|
|
152
|
-
}),
|
|
153
|
-
const e = /\$\{([^}]*)\}/g,
|
|
154
|
-
let
|
|
155
|
-
for (; (
|
|
156
|
-
|
|
157
|
-
return [...new Set(
|
|
158
|
-
},
|
|
162
|
+
}), ke = (n) => {
|
|
163
|
+
const e = /\$\{([^}]*)\}/g, i = [];
|
|
164
|
+
let u;
|
|
165
|
+
for (; (u = e.exec(n)) !== null; )
|
|
166
|
+
i.push(u[1]);
|
|
167
|
+
return [...new Set(i)];
|
|
168
|
+
}, he = (n, e) => n.replace(/\$\{([^}]*)\}/g, (i, u) => e[u] !== void 0 ? e[u] : i), se = async (n) => {
|
|
159
169
|
switch (n) {
|
|
160
170
|
case "submit": {
|
|
161
|
-
let e =
|
|
171
|
+
let e = m.value.getValue();
|
|
162
172
|
if (!e)
|
|
163
|
-
return
|
|
173
|
+
return V.error("函数内容不可为空");
|
|
164
174
|
if (/\$\{[^}]*\}/.test(e)) {
|
|
165
|
-
const
|
|
166
|
-
if (!
|
|
175
|
+
const i = ke(e), u = await Ee(i);
|
|
176
|
+
if (!u)
|
|
167
177
|
return;
|
|
168
|
-
e =
|
|
178
|
+
e = he(e, u);
|
|
169
179
|
}
|
|
170
180
|
try {
|
|
171
|
-
|
|
172
|
-
const { body:
|
|
173
|
-
Object.assign(
|
|
181
|
+
N.test = !0;
|
|
182
|
+
const { body: i } = await R.post("/common/qt/testFactorSelect", { factorSelectExpr: e }), { result: u, detail: d } = i;
|
|
183
|
+
Object.assign(c, { result: u, detail: d, code: e }), u === 1 ? V.success("测试通过") : (V.error("测试未能通过"), $.value = !0);
|
|
174
184
|
} finally {
|
|
175
|
-
|
|
185
|
+
N.test = !1;
|
|
176
186
|
}
|
|
177
187
|
break;
|
|
178
188
|
}
|
|
179
189
|
case "log": {
|
|
180
|
-
if (
|
|
181
|
-
return
|
|
182
|
-
|
|
190
|
+
if (c.result === null)
|
|
191
|
+
return V.warning("请先进行测试, 等待测试完成后可查看日志");
|
|
192
|
+
$.value = !0;
|
|
183
193
|
break;
|
|
184
194
|
}
|
|
185
195
|
}
|
|
186
|
-
},
|
|
187
|
-
|
|
196
|
+
}, U = p(!1), oe = p(""), z = p(!1), B = p(""), le = p(""), ae = p(null), j = p([]), C = Q({
|
|
197
|
+
parsedConditions: [],
|
|
198
|
+
factorSelectExpr: ""
|
|
199
|
+
}), Ce = () => {
|
|
200
|
+
U.value = !0, B.value = "";
|
|
201
|
+
}, be = () => {
|
|
202
|
+
le.value = "", B.value = "", j.value = [], Object.assign(C, {
|
|
203
|
+
parsedConditions: [],
|
|
204
|
+
factorSelectExpr: ""
|
|
205
|
+
});
|
|
206
|
+
}, ie = async () => {
|
|
207
|
+
var e, i;
|
|
208
|
+
const n = (e = oe.value) == null ? void 0 : e.trim();
|
|
209
|
+
if (!n)
|
|
210
|
+
return V.error("请输入脚本描述");
|
|
211
|
+
z.value || (be(), z.value = !0, await Ke({
|
|
212
|
+
baseUrl: (i = S == null ? void 0 : S.env) == null ? void 0 : i.VITE_BASE_URL,
|
|
213
|
+
token: Je(),
|
|
214
|
+
value: n,
|
|
215
|
+
sessionId: ae.value,
|
|
216
|
+
callback: (u, d) => {
|
|
217
|
+
var P;
|
|
218
|
+
switch (u) {
|
|
219
|
+
case "session": {
|
|
220
|
+
ae.value = d;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
case "node": {
|
|
224
|
+
const r = j.value.findIndex((v) => v.name === d.name);
|
|
225
|
+
r === -1 ? j.value.push(d) : j.value[r] = d;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
case "message": {
|
|
229
|
+
le.value = d;
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
case "finish": {
|
|
233
|
+
z.value = !1;
|
|
234
|
+
try {
|
|
235
|
+
const r = JSON.parse(le.value), v = (P = r == null ? void 0 : r.factorScreen) == null ? void 0 : P.factorSelectExpr;
|
|
236
|
+
v ? Object.assign(C, {
|
|
237
|
+
parsedConditions: r.parsedConditions ?? [],
|
|
238
|
+
factorSelectExpr: v
|
|
239
|
+
}) : B.value = "AI 未能生成有效的因子脚本, 请调整描述后重试";
|
|
240
|
+
} catch {
|
|
241
|
+
B.value = "AI 返回结果解析失败, 请重试";
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
case "error": {
|
|
246
|
+
z.value = !1, B.value = typeof d == "string" ? d : "AI 生成失败, 请重试";
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}));
|
|
252
|
+
}, Ve = async () => {
|
|
253
|
+
var e, i;
|
|
254
|
+
if (!C.factorSelectExpr)
|
|
255
|
+
return;
|
|
256
|
+
if ((e = m.value) == null ? void 0 : e.getValue())
|
|
257
|
+
try {
|
|
258
|
+
await fe.confirm("当前编辑器已有内容, 将被 AI 生成结果覆盖, 是否继续?", "提示", {
|
|
259
|
+
confirmButtonText: "覆盖",
|
|
260
|
+
cancelButtonText: "取消",
|
|
261
|
+
type: "warning"
|
|
262
|
+
});
|
|
263
|
+
} catch {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
(i = m.value) == null || i.setValue(C.factorSelectExpr), t.funcExpression = C.factorSelectExpr, U.value = !1, V.success("已插入到编辑器");
|
|
267
|
+
}, Se = () => {
|
|
268
|
+
k.value.open(m.value);
|
|
188
269
|
};
|
|
189
|
-
return
|
|
190
|
-
() =>
|
|
270
|
+
return Re(
|
|
271
|
+
() => A.value,
|
|
191
272
|
(n) => {
|
|
192
|
-
n || (
|
|
273
|
+
n || (k.value.close(), $.value = !1, U.value = !1);
|
|
193
274
|
}
|
|
194
|
-
),
|
|
275
|
+
), te({
|
|
195
276
|
open: (n) => {
|
|
196
|
-
|
|
277
|
+
A.value = !0, ue(() => {
|
|
197
278
|
var e;
|
|
198
|
-
if ((e =
|
|
279
|
+
if ((e = m.value) == null || e.resize(), h.value = null, Object.assign(c, {
|
|
199
280
|
result: null,
|
|
200
281
|
detail: "",
|
|
201
282
|
code: ""
|
|
202
283
|
}), n) {
|
|
203
|
-
const
|
|
284
|
+
const i = {
|
|
204
285
|
id: n.id,
|
|
205
286
|
funcName: n.funcName,
|
|
206
287
|
funcExpression: n.funcExpression
|
|
207
288
|
};
|
|
208
|
-
|
|
289
|
+
L(i);
|
|
209
290
|
} else
|
|
210
|
-
|
|
291
|
+
_.value.length ? L(_.value[0]) : q();
|
|
211
292
|
});
|
|
212
293
|
}
|
|
213
294
|
}), (n, e) => {
|
|
214
|
-
const
|
|
215
|
-
return
|
|
295
|
+
const i = ve, u = de, d = _e, P = ge, r = We, v = qe, I = ce("st-monacoEditor"), T = Le, we = ce("st-varSelectDialog"), Ne = Pe;
|
|
296
|
+
return f(), F(T, {
|
|
216
297
|
"modal-class": "manage-dialog",
|
|
217
|
-
modelValue:
|
|
218
|
-
"onUpdate:modelValue": e[
|
|
298
|
+
modelValue: A.value,
|
|
299
|
+
"onUpdate:modelValue": e[11] || (e[11] = (a) => A.value = a),
|
|
219
300
|
width: "1600",
|
|
220
301
|
"align-center": "",
|
|
221
302
|
"append-to-body": "",
|
|
@@ -224,78 +305,78 @@ const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me =
|
|
|
224
305
|
"modal-penetrable": !0,
|
|
225
306
|
"show-close": !1
|
|
226
307
|
}, {
|
|
227
|
-
header:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
id:
|
|
232
|
-
class:
|
|
233
|
-
}, " 自定义函数管理面板 ", 10,
|
|
308
|
+
header: l(({ titleId: a, titleClass: b }) => [
|
|
309
|
+
s("div", Ge, [
|
|
310
|
+
s("div", Qe, [
|
|
311
|
+
s("span", {
|
|
312
|
+
id: a,
|
|
313
|
+
class: W(b)
|
|
314
|
+
}, " 自定义函数管理面板 ", 10, Xe)
|
|
234
315
|
]),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
onClick: e[0] || (e[0] = (
|
|
316
|
+
s("div", Ye, [
|
|
317
|
+
o(i, {
|
|
318
|
+
onClick: e[0] || (e[0] = (re) => A.value = !1)
|
|
238
319
|
}, {
|
|
239
|
-
default:
|
|
240
|
-
|
|
320
|
+
default: l(() => [
|
|
321
|
+
o(g(ne))
|
|
241
322
|
]),
|
|
242
323
|
_: 1
|
|
243
324
|
})
|
|
244
325
|
])
|
|
245
326
|
])
|
|
246
327
|
]),
|
|
247
|
-
default:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
e[
|
|
252
|
-
|
|
253
|
-
modelValue:
|
|
254
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
328
|
+
default: l(() => [
|
|
329
|
+
s("div", Ze, [
|
|
330
|
+
s("div", et, [
|
|
331
|
+
s("div", tt, [
|
|
332
|
+
e[13] || (e[13] = s("span", null, "输入函数关键字", -1)),
|
|
333
|
+
o(u, {
|
|
334
|
+
modelValue: h.value,
|
|
335
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => h.value = a),
|
|
255
336
|
clearable: ""
|
|
256
337
|
}, null, 8, ["modelValue"]),
|
|
257
|
-
|
|
338
|
+
o(d, {
|
|
258
339
|
type: "primary",
|
|
259
|
-
onClick:
|
|
340
|
+
onClick: q
|
|
260
341
|
}, {
|
|
261
|
-
default:
|
|
262
|
-
|
|
342
|
+
default: l(() => [...e[12] || (e[12] = [
|
|
343
|
+
x("新建", -1)
|
|
263
344
|
])]),
|
|
264
345
|
_: 1
|
|
265
346
|
})
|
|
266
347
|
]),
|
|
267
|
-
|
|
268
|
-
default:
|
|
269
|
-
|
|
270
|
-
key:
|
|
271
|
-
class:
|
|
348
|
+
o(v, { class: "list" }, {
|
|
349
|
+
default: l(() => [
|
|
350
|
+
_.value.length ? (f(!0), E(Y, { key: 0 }, Z(_.value, (a) => (f(), E("div", {
|
|
351
|
+
key: a.id,
|
|
352
|
+
class: W([{ "active-list-item": t.id === a.id }, "list-item"])
|
|
272
353
|
}, [
|
|
273
|
-
|
|
354
|
+
s("span", {
|
|
274
355
|
class: "func-name",
|
|
275
|
-
onClick: (
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
default:
|
|
280
|
-
|
|
281
|
-
onClick: (
|
|
356
|
+
onClick: (b) => L(a)
|
|
357
|
+
}, O(a.funcName), 9, ot),
|
|
358
|
+
s("div", lt, [
|
|
359
|
+
o(i, null, {
|
|
360
|
+
default: l(() => [
|
|
361
|
+
o(g(pe), {
|
|
362
|
+
onClick: (b) => K(a)
|
|
282
363
|
}, null, 8, ["onClick"])
|
|
283
364
|
]),
|
|
284
365
|
_: 2
|
|
285
366
|
}, 1024),
|
|
286
|
-
|
|
367
|
+
o(P, {
|
|
287
368
|
title: "确认是否删除?",
|
|
288
369
|
"confirm-button-text": "确认",
|
|
289
370
|
"cancel-button-text": "取消",
|
|
290
|
-
onConfirm: (
|
|
371
|
+
onConfirm: (b) => y(a)
|
|
291
372
|
}, {
|
|
292
|
-
reference:
|
|
293
|
-
|
|
294
|
-
onClick:
|
|
373
|
+
reference: l(() => [
|
|
374
|
+
o(i, {
|
|
375
|
+
onClick: ee(() => {
|
|
295
376
|
}, ["stop"])
|
|
296
377
|
}, {
|
|
297
|
-
default:
|
|
298
|
-
|
|
378
|
+
default: l(() => [
|
|
379
|
+
o(g(me))
|
|
299
380
|
]),
|
|
300
381
|
_: 1
|
|
301
382
|
})
|
|
@@ -303,7 +384,7 @@ const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me =
|
|
|
303
384
|
_: 1
|
|
304
385
|
}, 8, ["onConfirm"])
|
|
305
386
|
])
|
|
306
|
-
], 2))), 128)) : (
|
|
387
|
+
], 2))), 128)) : (f(), F(r, {
|
|
307
388
|
key: 1,
|
|
308
389
|
description: "暂无数据"
|
|
309
390
|
}))
|
|
@@ -311,70 +392,195 @@ const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me =
|
|
|
311
392
|
_: 1
|
|
312
393
|
})
|
|
313
394
|
]),
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
e[
|
|
317
|
-
|
|
318
|
-
modelValue:
|
|
319
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
395
|
+
s("div", nt, [
|
|
396
|
+
s("div", st, [
|
|
397
|
+
e[19] || (e[19] = s("span", null, "函数名称:", -1)),
|
|
398
|
+
o(u, {
|
|
399
|
+
modelValue: t.funcName,
|
|
400
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => t.funcName = a)
|
|
320
401
|
}, null, 8, ["modelValue"]),
|
|
321
|
-
|
|
322
|
-
|
|
402
|
+
s("div", at, [
|
|
403
|
+
o(d, {
|
|
323
404
|
type: "primary",
|
|
324
|
-
onClick:
|
|
325
|
-
loading:
|
|
405
|
+
onClick: g(G),
|
|
406
|
+
loading: N.save
|
|
326
407
|
}, {
|
|
327
|
-
default:
|
|
328
|
-
|
|
408
|
+
default: l(() => [...e[14] || (e[14] = [
|
|
409
|
+
x(" 保存 ", -1)
|
|
329
410
|
])]),
|
|
330
411
|
_: 1
|
|
331
412
|
}, 8, ["onClick", "loading"]),
|
|
332
|
-
|
|
333
|
-
loading:
|
|
334
|
-
onClick: e[3] || (e[3] = (
|
|
413
|
+
o(d, {
|
|
414
|
+
loading: N.test,
|
|
415
|
+
onClick: e[3] || (e[3] = (a) => se("submit"))
|
|
335
416
|
}, {
|
|
336
|
-
default:
|
|
337
|
-
|
|
417
|
+
default: l(() => [...e[15] || (e[15] = [
|
|
418
|
+
x(" 测试 ", -1)
|
|
338
419
|
])]),
|
|
339
420
|
_: 1
|
|
340
421
|
}, 8, ["loading"]),
|
|
341
|
-
|
|
342
|
-
icon:
|
|
343
|
-
onClick: e[4] || (e[4] = (
|
|
422
|
+
o(d, {
|
|
423
|
+
icon: g($e),
|
|
424
|
+
onClick: e[4] || (e[4] = (a) => se("log"))
|
|
425
|
+
}, {
|
|
426
|
+
default: l(() => [...e[16] || (e[16] = [
|
|
427
|
+
x(" 日志明细 ", -1)
|
|
428
|
+
])]),
|
|
429
|
+
_: 1
|
|
430
|
+
}, 8, ["icon"]),
|
|
431
|
+
o(d, {
|
|
432
|
+
type: "primary",
|
|
433
|
+
icon: g(De),
|
|
434
|
+
onClick: Ce
|
|
344
435
|
}, {
|
|
345
|
-
default:
|
|
346
|
-
|
|
436
|
+
default: l(() => [...e[17] || (e[17] = [
|
|
437
|
+
x(" AI 生成 ", -1)
|
|
347
438
|
])]),
|
|
348
439
|
_: 1
|
|
349
440
|
}, 8, ["icon"]),
|
|
350
|
-
|
|
441
|
+
o(d, {
|
|
351
442
|
type: "primary",
|
|
352
|
-
onClick:
|
|
443
|
+
onClick: Se
|
|
353
444
|
}, {
|
|
354
|
-
default:
|
|
355
|
-
|
|
445
|
+
default: l(() => [...e[18] || (e[18] = [
|
|
446
|
+
x(" 变量选择器 ", -1)
|
|
356
447
|
])]),
|
|
357
448
|
_: 1
|
|
358
449
|
})
|
|
359
450
|
])
|
|
360
451
|
]),
|
|
361
|
-
e[
|
|
362
|
-
|
|
452
|
+
e[20] || (e[20] = s("div", { class: "tip-box" }, "说明: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)),
|
|
453
|
+
o(I, {
|
|
363
454
|
ref_key: "stMonacoEditorRef",
|
|
364
|
-
ref:
|
|
455
|
+
ref: m,
|
|
365
456
|
language: "lua",
|
|
366
457
|
style: { width: "100%", height: "calc(80vh - 75px)" }
|
|
367
458
|
}, null, 512)
|
|
368
459
|
])
|
|
369
460
|
]),
|
|
370
|
-
|
|
461
|
+
o(T, {
|
|
462
|
+
"modal-class": "ai-dialog",
|
|
463
|
+
modelValue: U.value,
|
|
464
|
+
"onUpdate:modelValue": e[7] || (e[7] = (a) => U.value = a),
|
|
465
|
+
width: "600",
|
|
466
|
+
"align-center": "",
|
|
467
|
+
"append-to-body": "",
|
|
468
|
+
draggable: "",
|
|
469
|
+
overflow: "",
|
|
470
|
+
modal: !1,
|
|
471
|
+
"modal-penetrable": !0,
|
|
472
|
+
"show-close": !1,
|
|
473
|
+
"close-on-click-modal": !1
|
|
474
|
+
}, {
|
|
475
|
+
header: l(({ titleId: a, titleClass: b }) => [
|
|
476
|
+
s("div", it, [
|
|
477
|
+
s("div", rt, [
|
|
478
|
+
s("span", {
|
|
479
|
+
id: a,
|
|
480
|
+
class: W(b)
|
|
481
|
+
}, " AI 生成脚本 ", 10, ut)
|
|
482
|
+
]),
|
|
483
|
+
s("div", ct, [
|
|
484
|
+
o(i, {
|
|
485
|
+
onClick: e[5] || (e[5] = (re) => U.value = !1)
|
|
486
|
+
}, {
|
|
487
|
+
default: l(() => [
|
|
488
|
+
o(g(ne))
|
|
489
|
+
]),
|
|
490
|
+
_: 1
|
|
491
|
+
})
|
|
492
|
+
])
|
|
493
|
+
])
|
|
494
|
+
]),
|
|
495
|
+
footer: l(() => [
|
|
496
|
+
s("div", _t, [
|
|
497
|
+
C.factorSelectExpr ? (f(), F(d, {
|
|
498
|
+
key: 0,
|
|
499
|
+
onClick: ie,
|
|
500
|
+
disabled: z.value
|
|
501
|
+
}, {
|
|
502
|
+
default: l(() => [...e[21] || (e[21] = [
|
|
503
|
+
x(" 重新生成 ", -1)
|
|
504
|
+
])]),
|
|
505
|
+
_: 1
|
|
506
|
+
}, 8, ["disabled"])) : X("", !0),
|
|
507
|
+
C.factorSelectExpr ? (f(), F(d, {
|
|
508
|
+
key: 1,
|
|
509
|
+
type: "primary",
|
|
510
|
+
onClick: Ve
|
|
511
|
+
}, {
|
|
512
|
+
default: l(() => [...e[22] || (e[22] = [
|
|
513
|
+
x(" 插入到编辑器 ", -1)
|
|
514
|
+
])]),
|
|
515
|
+
_: 1
|
|
516
|
+
})) : (f(), F(d, {
|
|
517
|
+
key: 2,
|
|
518
|
+
type: "primary",
|
|
519
|
+
loading: z.value,
|
|
520
|
+
onClick: ie
|
|
521
|
+
}, {
|
|
522
|
+
default: l(() => [...e[23] || (e[23] = [
|
|
523
|
+
x(" 生成 ", -1)
|
|
524
|
+
])]),
|
|
525
|
+
_: 1
|
|
526
|
+
}, 8, ["loading"]))
|
|
527
|
+
])
|
|
528
|
+
]),
|
|
529
|
+
default: l(() => [
|
|
530
|
+
s("div", dt, [
|
|
531
|
+
o(u, {
|
|
532
|
+
modelValue: oe.value,
|
|
533
|
+
"onUpdate:modelValue": e[6] || (e[6] = (a) => oe.value = a),
|
|
534
|
+
type: "textarea",
|
|
535
|
+
rows: 3,
|
|
536
|
+
placeholder: "用自然语言描述脚本逻辑, 例: 收盘价大于10",
|
|
537
|
+
disabled: z.value
|
|
538
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
539
|
+
j.value.length ? (f(), E("div", ft, [
|
|
540
|
+
(f(!0), E(Y, null, Z(j.value, (a) => (f(), E("div", {
|
|
541
|
+
key: a.name,
|
|
542
|
+
class: "node-item"
|
|
543
|
+
}, [
|
|
544
|
+
a.status === "success" ? (f(), F(i, {
|
|
545
|
+
key: 0,
|
|
546
|
+
class: "success"
|
|
547
|
+
}, {
|
|
548
|
+
default: l(() => [
|
|
549
|
+
o(g(Ie))
|
|
550
|
+
]),
|
|
551
|
+
_: 1
|
|
552
|
+
})) : (f(), F(i, {
|
|
553
|
+
key: 1,
|
|
554
|
+
class: "is-loading executing"
|
|
555
|
+
}, {
|
|
556
|
+
default: l(() => [
|
|
557
|
+
o(g(Fe))
|
|
558
|
+
]),
|
|
559
|
+
_: 1
|
|
560
|
+
})),
|
|
561
|
+
s("span", null, O(a.name), 1)
|
|
562
|
+
]))), 128))
|
|
563
|
+
])) : X("", !0),
|
|
564
|
+
B.value ? (f(), E("div", pt, " ❌ " + O(B.value), 1)) : X("", !0),
|
|
565
|
+
C.factorSelectExpr ? (f(), E("div", mt, [
|
|
566
|
+
(f(!0), E(Y, null, Z(C.parsedConditions, (a, b) => (f(), E("div", {
|
|
567
|
+
key: b,
|
|
568
|
+
class: "parsed-condition"
|
|
569
|
+
}, O(a), 1))), 128)),
|
|
570
|
+
s("pre", vt, O(C.factorSelectExpr), 1)
|
|
571
|
+
])) : X("", !0)
|
|
572
|
+
])
|
|
573
|
+
]),
|
|
574
|
+
_: 1
|
|
575
|
+
}, 8, ["modelValue"]),
|
|
576
|
+
o(we, {
|
|
371
577
|
ref_key: "stVarSelectDialogRef",
|
|
372
|
-
ref:
|
|
578
|
+
ref: k
|
|
373
579
|
}, null, 512),
|
|
374
|
-
|
|
580
|
+
o(T, {
|
|
375
581
|
"modal-class": "log-dialog",
|
|
376
|
-
modelValue:
|
|
377
|
-
"onUpdate:modelValue": e[
|
|
582
|
+
modelValue: $.value,
|
|
583
|
+
"onUpdate:modelValue": e[10] || (e[10] = (a) => $.value = a),
|
|
378
584
|
width: "830",
|
|
379
585
|
"align-center": "",
|
|
380
586
|
"append-to-body": "",
|
|
@@ -384,56 +590,56 @@ const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me =
|
|
|
384
590
|
"modal-penetrable": !0,
|
|
385
591
|
"show-close": !1
|
|
386
592
|
}, {
|
|
387
|
-
header:
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
id:
|
|
392
|
-
class:
|
|
393
|
-
}, " 日志明细 ", 10,
|
|
593
|
+
header: l(({ titleId: a, titleClass: b }) => [
|
|
594
|
+
s("div", gt, [
|
|
595
|
+
s("div", yt, [
|
|
596
|
+
s("span", {
|
|
597
|
+
id: a,
|
|
598
|
+
class: W(b)
|
|
599
|
+
}, " 日志明细 ", 10, xt)
|
|
394
600
|
]),
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
onClick: e[
|
|
601
|
+
s("div", Et, [
|
|
602
|
+
o(i, {
|
|
603
|
+
onClick: e[8] || (e[8] = (re) => $.value = !1)
|
|
398
604
|
}, {
|
|
399
|
-
default:
|
|
400
|
-
|
|
605
|
+
default: l(() => [
|
|
606
|
+
o(g(ne))
|
|
401
607
|
]),
|
|
402
608
|
_: 1
|
|
403
609
|
})
|
|
404
610
|
])
|
|
405
611
|
])
|
|
406
612
|
]),
|
|
407
|
-
footer:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
onClick: e[
|
|
613
|
+
footer: l(() => [
|
|
614
|
+
s("div", ht, [
|
|
615
|
+
o(d, {
|
|
616
|
+
onClick: e[9] || (e[9] = (a) => $.value = !1)
|
|
411
617
|
}, {
|
|
412
|
-
default:
|
|
413
|
-
|
|
618
|
+
default: l(() => [...e[24] || (e[24] = [
|
|
619
|
+
x(" 关闭 ", -1)
|
|
414
620
|
])]),
|
|
415
621
|
_: 1
|
|
416
622
|
})
|
|
417
623
|
])
|
|
418
624
|
]),
|
|
419
|
-
default:
|
|
420
|
-
|
|
421
|
-
|
|
625
|
+
default: l(() => [
|
|
626
|
+
s("div", kt, [
|
|
627
|
+
o(v, {
|
|
422
628
|
class: "code",
|
|
423
629
|
height: "600px"
|
|
424
630
|
}, {
|
|
425
|
-
default:
|
|
426
|
-
|
|
631
|
+
default: l(() => [
|
|
632
|
+
s("pre", null, O(c.code), 1)
|
|
427
633
|
]),
|
|
428
634
|
_: 1
|
|
429
635
|
}),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
default:
|
|
433
|
-
|
|
434
|
-
class:
|
|
435
|
-
},
|
|
436
|
-
${
|
|
636
|
+
o(Ne, { direction: "vertical" }),
|
|
637
|
+
o(v, { height: "600px" }, {
|
|
638
|
+
default: l(() => [
|
|
639
|
+
s("pre", {
|
|
640
|
+
class: W(c.result === 1 ? "success-log" : "error-log")
|
|
641
|
+
}, O(c.result === 1 ? `✅️ 测试通过
|
|
642
|
+
${c.detail}` : c.detail), 3)
|
|
437
643
|
]),
|
|
438
644
|
_: 1
|
|
439
645
|
})
|
|
@@ -446,118 +652,118 @@ ${o.detail}` : o.detail), 3)
|
|
|
446
652
|
}, 8, ["modelValue"]);
|
|
447
653
|
};
|
|
448
654
|
}
|
|
449
|
-
},
|
|
450
|
-
const
|
|
655
|
+
}, bt = /* @__PURE__ */ xe(Ct, [["__scopeId", "data-v-5797123f"]]);
|
|
656
|
+
const Vt = { class: "custom-function" }, St = { class: "func-option" }, wt = { class: "icons" }, Nt = {
|
|
451
657
|
__name: "index",
|
|
452
658
|
props: {
|
|
453
659
|
size: { type: String, default: "small" },
|
|
454
660
|
selectWidth: { type: String, default: "200px" }
|
|
455
661
|
},
|
|
456
662
|
emits: ["insert", "actionState"],
|
|
457
|
-
setup(
|
|
458
|
-
const { request:
|
|
459
|
-
const { body:
|
|
460
|
-
if (
|
|
461
|
-
|
|
663
|
+
setup(D, { emit: te }) {
|
|
664
|
+
const { request: J } = ye("stConfig"), S = p(null), R = te, m = p(null), k = p(""), w = p([]), M = async () => {
|
|
665
|
+
const { body: _ } = await J.post("/common/qt/querySearchFunctions");
|
|
666
|
+
if (w.value = _ ?? [], m.value === null)
|
|
667
|
+
k.value = "";
|
|
462
668
|
else {
|
|
463
|
-
const
|
|
464
|
-
|
|
669
|
+
const t = w.value.find(({ id: c }) => c === m.value);
|
|
670
|
+
k.value = t ? t.funcName : "";
|
|
465
671
|
}
|
|
466
|
-
},
|
|
467
|
-
var
|
|
468
|
-
|
|
469
|
-
},
|
|
470
|
-
if (!
|
|
471
|
-
return
|
|
472
|
-
const { funcName:
|
|
473
|
-
|
|
474
|
-
},
|
|
475
|
-
switch (
|
|
672
|
+
}, A = (_) => {
|
|
673
|
+
var t;
|
|
674
|
+
_ ? m.value = (t = w.value.find((c) => c.funcName === _)) == null ? void 0 : t.id : m.value = null;
|
|
675
|
+
}, N = () => {
|
|
676
|
+
if (!k.value)
|
|
677
|
+
return V.error("请先选择自定义函数后, 再执行插入");
|
|
678
|
+
const { funcName: _, funcExpression: t } = w.value.find((c) => c.funcName === k.value);
|
|
679
|
+
R("insert", _, t);
|
|
680
|
+
}, h = async (_, t) => {
|
|
681
|
+
switch (_) {
|
|
476
682
|
case "open": {
|
|
477
|
-
|
|
683
|
+
S.value.open(), R("actionState", "因子筛选", "函数管理");
|
|
478
684
|
break;
|
|
479
685
|
}
|
|
480
686
|
case "copy": {
|
|
481
|
-
const
|
|
687
|
+
const c = {
|
|
482
688
|
id: null,
|
|
483
|
-
funcName: `${
|
|
484
|
-
funcExpression:
|
|
689
|
+
funcName: `${t.funcName}-复制`,
|
|
690
|
+
funcExpression: t.funcExpression
|
|
485
691
|
};
|
|
486
|
-
|
|
692
|
+
S.value.open(c);
|
|
487
693
|
break;
|
|
488
694
|
}
|
|
489
695
|
case "edit": {
|
|
490
|
-
const
|
|
491
|
-
id:
|
|
492
|
-
funcName:
|
|
493
|
-
funcExpression:
|
|
696
|
+
const c = {
|
|
697
|
+
id: t.id,
|
|
698
|
+
funcName: t.funcName,
|
|
699
|
+
funcExpression: t.funcExpression
|
|
494
700
|
};
|
|
495
|
-
|
|
701
|
+
S.value.open(c);
|
|
496
702
|
break;
|
|
497
703
|
}
|
|
498
704
|
case "delete": {
|
|
499
|
-
await
|
|
705
|
+
await J.post("/common/qt/deleteSearchFunctionById", { id: t.id }), M();
|
|
500
706
|
break;
|
|
501
707
|
}
|
|
502
708
|
}
|
|
503
709
|
};
|
|
504
|
-
return
|
|
505
|
-
|
|
506
|
-
}), (
|
|
507
|
-
const
|
|
508
|
-
return
|
|
509
|
-
|
|
510
|
-
modelValue:
|
|
511
|
-
"onUpdate:modelValue":
|
|
512
|
-
size:
|
|
710
|
+
return Me(() => {
|
|
711
|
+
M();
|
|
712
|
+
}), (_, t) => {
|
|
713
|
+
const c = ve, $ = ge, q = Ae, L = ze, K = _e;
|
|
714
|
+
return f(), E("div", Vt, [
|
|
715
|
+
o(L, {
|
|
716
|
+
modelValue: k.value,
|
|
717
|
+
"onUpdate:modelValue": t[0] || (t[0] = (y) => k.value = y),
|
|
718
|
+
size: D.size,
|
|
513
719
|
placeholder: "自定义函数",
|
|
514
720
|
"no-match-text": "无匹配选项",
|
|
515
721
|
"no-data-text": "无选项数据",
|
|
516
722
|
clearable: "",
|
|
517
723
|
filterable: "",
|
|
518
|
-
onChange:
|
|
519
|
-
style:
|
|
724
|
+
onChange: A,
|
|
725
|
+
style: Ue({ width: D.selectWidth })
|
|
520
726
|
}, {
|
|
521
|
-
default:
|
|
522
|
-
(
|
|
523
|
-
key:
|
|
524
|
-
label:
|
|
525
|
-
value:
|
|
526
|
-
onClick:
|
|
727
|
+
default: l(() => [
|
|
728
|
+
(f(!0), E(Y, null, Z(w.value, (y) => (f(), F(q, {
|
|
729
|
+
key: y.id,
|
|
730
|
+
label: y.funcName,
|
|
731
|
+
value: y.funcName,
|
|
732
|
+
onClick: N
|
|
527
733
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
onClick:
|
|
734
|
+
default: l(() => [
|
|
735
|
+
s("div", St, [
|
|
736
|
+
s("span", null, O(y.funcName), 1),
|
|
737
|
+
s("div", wt, [
|
|
738
|
+
o(c, {
|
|
739
|
+
onClick: ee((G) => h("copy", y), ["stop"])
|
|
534
740
|
}, {
|
|
535
|
-
default:
|
|
536
|
-
|
|
741
|
+
default: l(() => [
|
|
742
|
+
o(g(pe))
|
|
537
743
|
]),
|
|
538
744
|
_: 1
|
|
539
745
|
}, 8, ["onClick"]),
|
|
540
|
-
|
|
541
|
-
onClick:
|
|
746
|
+
o(c, {
|
|
747
|
+
onClick: ee((G) => h("edit", y), ["stop"])
|
|
542
748
|
}, {
|
|
543
|
-
default:
|
|
544
|
-
|
|
749
|
+
default: l(() => [
|
|
750
|
+
o(g(Oe))
|
|
545
751
|
]),
|
|
546
752
|
_: 1
|
|
547
753
|
}, 8, ["onClick"]),
|
|
548
|
-
|
|
754
|
+
o($, {
|
|
549
755
|
title: "确认是否删除?",
|
|
550
756
|
"confirm-button-text": "确认",
|
|
551
757
|
"cancel-button-text": "取消",
|
|
552
|
-
onConfirm: (
|
|
758
|
+
onConfirm: (G) => h("delete", y)
|
|
553
759
|
}, {
|
|
554
|
-
reference:
|
|
555
|
-
|
|
556
|
-
onClick:
|
|
760
|
+
reference: l(() => [
|
|
761
|
+
o(c, {
|
|
762
|
+
onClick: ee(() => {
|
|
557
763
|
}, ["stop"])
|
|
558
764
|
}, {
|
|
559
|
-
default:
|
|
560
|
-
|
|
765
|
+
default: l(() => [
|
|
766
|
+
o(g(me))
|
|
561
767
|
]),
|
|
562
768
|
_: 1
|
|
563
769
|
})
|
|
@@ -572,40 +778,40 @@ const Qe = { class: "custom-function" }, Xe = { class: "func-option" }, Ye = { c
|
|
|
572
778
|
]),
|
|
573
779
|
_: 1
|
|
574
780
|
}, 8, ["modelValue", "size", "style"]),
|
|
575
|
-
|
|
781
|
+
o(K, {
|
|
576
782
|
type: "primary",
|
|
577
|
-
size:
|
|
578
|
-
onClick:
|
|
783
|
+
size: D.size,
|
|
784
|
+
onClick: N
|
|
579
785
|
}, {
|
|
580
|
-
default:
|
|
581
|
-
|
|
786
|
+
default: l(() => [...t[2] || (t[2] = [
|
|
787
|
+
x(" 插入 ", -1)
|
|
582
788
|
])]),
|
|
583
789
|
_: 1
|
|
584
790
|
}, 8, ["size"]),
|
|
585
|
-
|
|
791
|
+
o(K, {
|
|
586
792
|
type: "primary",
|
|
587
|
-
size:
|
|
588
|
-
onClick:
|
|
793
|
+
size: D.size,
|
|
794
|
+
onClick: t[1] || (t[1] = (y) => h("open"))
|
|
589
795
|
}, {
|
|
590
|
-
default:
|
|
591
|
-
|
|
796
|
+
default: l(() => [...t[3] || (t[3] = [
|
|
797
|
+
x(" 函数管理 ", -1)
|
|
592
798
|
])]),
|
|
593
799
|
_: 1
|
|
594
800
|
}, 8, ["size"]),
|
|
595
|
-
|
|
801
|
+
o(bt, {
|
|
596
802
|
ref_key: "ManageDialogRef",
|
|
597
|
-
ref:
|
|
598
|
-
data:
|
|
599
|
-
onRefreshData:
|
|
803
|
+
ref: S,
|
|
804
|
+
data: w.value,
|
|
805
|
+
onRefreshData: M
|
|
600
806
|
}, null, 8, ["data"])
|
|
601
807
|
]);
|
|
602
808
|
};
|
|
603
809
|
}
|
|
604
|
-
},
|
|
605
|
-
install(
|
|
606
|
-
|
|
810
|
+
}, $t = /* @__PURE__ */ xe(Nt, [["__scopeId", "data-v-d01721a6"]]), yo = {
|
|
811
|
+
install(D) {
|
|
812
|
+
D.component("st-customFunction", $t);
|
|
607
813
|
}
|
|
608
814
|
};
|
|
609
815
|
export {
|
|
610
|
-
|
|
816
|
+
yo as default
|
|
611
817
|
};
|