st-comp 0.0.224 → 0.0.225
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 -8
- package/es/CustomFunction.js +268 -348
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +189 -189
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +4 -4
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +161 -167
- package/lib/{index-f21f4ed2.js → index-e729ead8.js} +11901 -11981
- package/lib/{python-dfab6a0b.js → python-185d0316.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/components/ManageDialog.vue +4 -78
- package/packages/KlineBasic/components/Tips/index.vue +3 -1
package/es/CustomFunction.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import "./base-a5af3db3.js";
|
|
2
|
-
import { E as
|
|
2
|
+
import { E as te } from "./el-button-c95adb85.js";
|
|
3
3
|
import "./el-tag-66cab138.js";
|
|
4
|
-
import { E as
|
|
4
|
+
import { E as _e, a as ve } from "./el-select-95627997.js";
|
|
5
5
|
import "./el-scrollbar-323542e7.js";
|
|
6
6
|
import "./el-popper-b4f97157.js";
|
|
7
|
-
import { E as
|
|
7
|
+
import { E as oe } from "./el-popconfirm-81dcd202.js";
|
|
8
8
|
import "./el-popover-4ed993c7.js";
|
|
9
|
-
import { inject as
|
|
10
|
-
import { c as
|
|
11
|
-
import { E as
|
|
12
|
-
import { E as Fe } from "./el-dialog-41ab8417.js";
|
|
9
|
+
import { inject as ne, ref as v, reactive as P, computed as ge, watch as he, nextTick as X, resolveComponent as Y, openBlock as D, createBlock as G, withCtx as s, createElementVNode as a, normalizeClass as U, createVNode as t, unref as b, createTextVNode as S, createElementBlock as L, Fragment as le, renderList as se, toDisplayString as j, withModifiers as T, pushScopeId as ye, popScopeId as Ee, h as M, onMounted as xe, normalizeStyle as be } from "vue";
|
|
10
|
+
import { c as Z, d as ae, a as ie, b as Ce, E as ce, e as ke } from "./index-a871c3eb.js";
|
|
11
|
+
import { E as Ve } from "./el-dialog-41ab8417.js";
|
|
13
12
|
import "./el-overlay-09ad71cd.js";
|
|
14
|
-
import { E as
|
|
15
|
-
import { E as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { E as
|
|
19
|
-
import { E as
|
|
13
|
+
import { E as we } from "./el-divider-4e059794.js";
|
|
14
|
+
import { E as Ne } from "./el-empty-33cb66f1.js";
|
|
15
|
+
import { E as ee } from "./el-input-2f75c4ba.js";
|
|
16
|
+
import { G as $e } from "./index-7ed0999e.js";
|
|
17
|
+
import { E as $ } from "./el-message-e544a8f5.js";
|
|
18
|
+
import { E as Se } from "./el-message-box-a93d2f6a.js";
|
|
19
|
+
import { E as De, a as Fe } from "./el-form-item-c53c374d.js";
|
|
20
20
|
import { _ as ue } from "./_plugin-vue_export-helper-dad06003.js";
|
|
21
|
-
import { E as
|
|
21
|
+
import { E as ze } from "./index-844bdd85.js";
|
|
22
22
|
import "./index-2e331d74.js";
|
|
23
23
|
import "./use-global-config-b5e9d3d5.js";
|
|
24
24
|
import "./use-form-common-props-815d48a6.js";
|
|
@@ -36,7 +36,7 @@ import "./typescript-7ae59c4c.js";
|
|
|
36
36
|
import "./config-provider-b16efd62.js";
|
|
37
37
|
import "./validator-764a9db0.js";
|
|
38
38
|
import "./_initCloneObject-eaef9418.js";
|
|
39
|
-
const
|
|
39
|
+
const K = (f) => (ye("data-v-b5dcb4b8"), f = f(), Ee(), f), Ie = { class: "custom-header" }, Me = { class: "left" }, Oe = ["id"], Be = { class: "right" }, qe = { class: "manage-dialog-body" }, Re = { class: "func-list" }, Ue = { class: "search" }, je = /* @__PURE__ */ K(() => /* @__PURE__ */ a("span", null, "输入函数关键字", -1)), Te = ["onClick"], Le = { class: "icon-box" }, We = { class: "rule-form" }, Ae = { class: "header" }, Pe = /* @__PURE__ */ K(() => /* @__PURE__ */ a("span", null, "函数名称:", -1)), Ge = { class: "right" }, Ke = /* @__PURE__ */ K(() => /* @__PURE__ */ a("div", { class: "tip-box" }, "说明: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)), He = { class: "custom-header" }, Je = { class: "left" }, Qe = ["id"], Xe = { class: "right" }, Ye = { class: "content" }, Ze = { class: "dialog-footer" }, et = {
|
|
40
40
|
__name: "ManageDialog",
|
|
41
41
|
props: {
|
|
42
42
|
data: {
|
|
@@ -45,90 +45,90 @@ const Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custo
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
emits: ["refreshData"],
|
|
48
|
-
setup(
|
|
49
|
-
const { request:
|
|
48
|
+
setup(f, { expose: W, emit: O }) {
|
|
49
|
+
const { request: C } = ne("stConfig"), p = v(null), k = v(null), h = O, y = f, E = v(!1), V = P({
|
|
50
50
|
save: !1,
|
|
51
51
|
test: !1
|
|
52
|
-
}),
|
|
52
|
+
}), w = v(null), x = ge(() => w.value ? y.data.filter((o) => o.funcName.includes(w.value)) : y.data), l = P({
|
|
53
53
|
id: null,
|
|
54
54
|
funcName: "",
|
|
55
55
|
funcExpression: ""
|
|
56
|
-
}),
|
|
56
|
+
}), n = P({
|
|
57
57
|
result: null,
|
|
58
58
|
detail: "",
|
|
59
59
|
code: ""
|
|
60
|
-
}),
|
|
60
|
+
}), i = v(!1), z = () => {
|
|
61
61
|
var o;
|
|
62
|
-
Object.assign(
|
|
62
|
+
Object.assign(l, {
|
|
63
63
|
id: null,
|
|
64
64
|
funcName: "",
|
|
65
65
|
funcExpression: ""
|
|
66
|
-
}),
|
|
67
|
-
},
|
|
66
|
+
}), (o = p.value) == null || o.setValue(l.funcExpression);
|
|
67
|
+
}, I = (o) => {
|
|
68
68
|
var e;
|
|
69
|
-
Object.assign(
|
|
69
|
+
Object.assign(l, {
|
|
70
70
|
id: o.id,
|
|
71
71
|
funcName: o.funcName,
|
|
72
72
|
funcExpression: o.funcExpression
|
|
73
|
-
}),
|
|
74
|
-
},
|
|
73
|
+
}), (e = p.value) == null || e.setValue(l.funcExpression);
|
|
74
|
+
}, A = (o) => {
|
|
75
75
|
var e;
|
|
76
|
-
Object.assign(
|
|
76
|
+
Object.assign(l, {
|
|
77
77
|
id: null,
|
|
78
78
|
funcName: `${o.funcName}-复制`,
|
|
79
79
|
funcExpression: o.funcExpression
|
|
80
|
-
}),
|
|
81
|
-
},
|
|
80
|
+
}), (e = p.value) == null || e.setValue(l.funcExpression);
|
|
81
|
+
}, B = async (o) => {
|
|
82
82
|
var e;
|
|
83
|
-
o.id ===
|
|
83
|
+
o.id === l.id && (Object.assign(l, {
|
|
84
84
|
id: null,
|
|
85
85
|
funcName: "",
|
|
86
86
|
funcExpression: ""
|
|
87
|
-
}), (e =
|
|
88
|
-
},
|
|
87
|
+
}), (e = p.value) == null || e.setValue(l.funcExpression)), await C.post("/common/qt/deleteSearchFunctionById", { id: o.id }), h("refreshData");
|
|
88
|
+
}, m = $e(async () => {
|
|
89
89
|
try {
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
92
|
-
if (!
|
|
93
|
-
return
|
|
94
|
-
await
|
|
90
|
+
if (V.save = !0, l.funcExpression = p.value.getValue(), !l.funcName)
|
|
91
|
+
return $.error("函数名称不可为空");
|
|
92
|
+
if (!l.funcExpression)
|
|
93
|
+
return $.error("函数内容不可为空");
|
|
94
|
+
await C.post("/common/qt/saveOrUpdateSearchFunction", l), $.success("操作成功"), h("refreshData"), l.id || z();
|
|
95
95
|
} finally {
|
|
96
|
-
|
|
96
|
+
V.save = !1;
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
99
|
-
const c =
|
|
100
|
-
o.reduce((d,
|
|
101
|
-
), r =
|
|
98
|
+
}), q = (o) => new Promise((e) => {
|
|
99
|
+
const c = v(
|
|
100
|
+
o.reduce((d, _) => (d[_] = "", d), {})
|
|
101
|
+
), r = v({}), g = () => {
|
|
102
102
|
let d = !0;
|
|
103
|
-
const
|
|
104
|
-
return o.forEach((
|
|
105
|
-
var
|
|
106
|
-
(
|
|
107
|
-
}), r.value =
|
|
103
|
+
const _ = {};
|
|
104
|
+
return o.forEach((N) => {
|
|
105
|
+
var R;
|
|
106
|
+
(R = c.value[N]) != null && R.trim() || (_[N] = `请输入${N}的值`, d = !1);
|
|
107
|
+
}), r.value = _, d;
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
Se({
|
|
110
110
|
title: "填写变量值用于接口测试",
|
|
111
|
-
message:
|
|
111
|
+
message: M({
|
|
112
112
|
setup() {
|
|
113
|
-
return () =>
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
return () => M("div", [
|
|
114
|
+
M(
|
|
115
|
+
De,
|
|
116
116
|
{
|
|
117
117
|
model: c.value
|
|
118
118
|
},
|
|
119
119
|
() => o.map(
|
|
120
|
-
(d) =>
|
|
121
|
-
|
|
120
|
+
(d) => M(
|
|
121
|
+
Fe,
|
|
122
122
|
{
|
|
123
123
|
label: `${d}: `,
|
|
124
124
|
prop: d,
|
|
125
125
|
error: r.value[d],
|
|
126
126
|
"label-width": "90px"
|
|
127
127
|
},
|
|
128
|
-
() =>
|
|
128
|
+
() => M(ee, {
|
|
129
129
|
modelValue: c.value[d],
|
|
130
|
-
"onUpdate:modelValue": (
|
|
131
|
-
c.value[d] =
|
|
130
|
+
"onUpdate:modelValue": (_) => {
|
|
131
|
+
c.value[d] = _, r.value[d] && delete r.value[d];
|
|
132
132
|
},
|
|
133
133
|
placeholder: `请输入 ${d} 的值`,
|
|
134
134
|
status: r.value[d] ? "error" : ""
|
|
@@ -143,71 +143,57 @@ const Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custo
|
|
|
143
143
|
confirmButtonText: "确定",
|
|
144
144
|
cancelButtonText: "取消",
|
|
145
145
|
customClass: "variable-input-dialog",
|
|
146
|
-
beforeClose: async (d,
|
|
147
|
-
d !== "confirm" && (e(!1),
|
|
146
|
+
beforeClose: async (d, _, N) => {
|
|
147
|
+
d !== "confirm" && (e(!1), N()), await X(), g() && (e({ ...c.value }), N());
|
|
148
148
|
}
|
|
149
149
|
}).catch(() => e(!1));
|
|
150
|
-
}),
|
|
150
|
+
}), re = (o) => {
|
|
151
151
|
const e = /\$\{([^}]*)\}/g, c = [];
|
|
152
152
|
let r;
|
|
153
153
|
for (; (r = e.exec(o)) !== null; )
|
|
154
154
|
c.push(r[1]);
|
|
155
155
|
return [...new Set(c)];
|
|
156
|
-
},
|
|
157
|
-
`).reduce((e, c) => {
|
|
158
|
-
const r = c.trim().replace(/\s+/gi, " ").split(" ")[0];
|
|
159
|
-
return r && e.push(r), e;
|
|
160
|
-
}, []) : [], K = async (o) => {
|
|
156
|
+
}, de = (o, e) => o.replace(/\$\{([^}]*)\}/g, (c, r) => e[r] !== void 0 ? e[r] : c), H = async (o) => {
|
|
161
157
|
switch (o) {
|
|
162
|
-
case "open": {
|
|
163
|
-
if (!m.value.getValue())
|
|
164
|
-
return V.error("函数内容不可为空");
|
|
165
|
-
D.value = !0;
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
158
|
case "submit": {
|
|
169
|
-
let e =
|
|
159
|
+
let e = p.value.getValue();
|
|
170
160
|
if (!e)
|
|
171
|
-
return
|
|
161
|
+
return $.error("函数内容不可为空");
|
|
172
162
|
if (/\$\{[^}]*\}/.test(e)) {
|
|
173
|
-
const c =
|
|
163
|
+
const c = re(e), r = await q(c);
|
|
174
164
|
if (!r)
|
|
175
165
|
return;
|
|
176
|
-
e =
|
|
166
|
+
e = de(e, r);
|
|
177
167
|
}
|
|
178
|
-
D.value = !1;
|
|
179
168
|
try {
|
|
180
|
-
|
|
181
|
-
const c = {
|
|
182
|
-
|
|
183
|
-
factorSelectExpr: e
|
|
184
|
-
}, { body: r } = await w.post("/common/qt/testFactorSelect", c), { result: v, detail: j } = r;
|
|
185
|
-
Object.assign(u, { result: v, detail: j, code: c.factorSelectExpr }), v === 1 ? V.success("测试通过") : (V.error("测试未能通过"), C.value = !0);
|
|
169
|
+
V.test = !0;
|
|
170
|
+
const { body: c } = await C.post("/common/qt/testFactorSelect", { factorSelectExpr: e }), { result: r, detail: g } = c;
|
|
171
|
+
Object.assign(n, { result: r, detail: g, code: e }), r === 1 ? $.success("测试通过") : ($.error("测试未能通过"), i.value = !0);
|
|
186
172
|
} finally {
|
|
187
|
-
|
|
173
|
+
V.test = !1;
|
|
188
174
|
}
|
|
189
175
|
break;
|
|
190
176
|
}
|
|
191
177
|
case "log": {
|
|
192
|
-
if (
|
|
193
|
-
return
|
|
194
|
-
|
|
178
|
+
if (n.result === null)
|
|
179
|
+
return $.warning("请先进行测试, 等待测试完成后可查看日志");
|
|
180
|
+
i.value = !0;
|
|
195
181
|
break;
|
|
196
182
|
}
|
|
197
183
|
}
|
|
198
|
-
},
|
|
199
|
-
|
|
184
|
+
}, fe = () => {
|
|
185
|
+
k.value.open(p.value);
|
|
200
186
|
};
|
|
201
|
-
return
|
|
187
|
+
return he(
|
|
202
188
|
() => E.value,
|
|
203
189
|
(o) => {
|
|
204
|
-
o || (
|
|
190
|
+
o || (k.value.close(), i.value = !1);
|
|
205
191
|
}
|
|
206
|
-
),
|
|
192
|
+
), W({
|
|
207
193
|
open: (o) => {
|
|
208
|
-
E.value = !0,
|
|
194
|
+
E.value = !0, X(() => {
|
|
209
195
|
var e;
|
|
210
|
-
if ((e =
|
|
196
|
+
if ((e = p.value) == null || e.resize(), w.value = null, Object.assign(n, {
|
|
211
197
|
result: null,
|
|
212
198
|
detail: "",
|
|
213
199
|
code: ""
|
|
@@ -217,17 +203,17 @@ const Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custo
|
|
|
217
203
|
funcName: o.funcName,
|
|
218
204
|
funcExpression: o.funcExpression
|
|
219
205
|
};
|
|
220
|
-
|
|
206
|
+
I(c);
|
|
221
207
|
} else
|
|
222
|
-
|
|
208
|
+
x.value.length ? I(x.value[0]) : z();
|
|
223
209
|
});
|
|
224
210
|
}
|
|
225
211
|
}), (o, e) => {
|
|
226
|
-
const c =
|
|
227
|
-
return
|
|
212
|
+
const c = ce, r = ee, g = te, J = oe, d = Ne, _ = ze, N = Y("st-monacoEditor"), R = Y("st-varSelectDialog"), me = we, Q = Ve;
|
|
213
|
+
return D(), G(Q, {
|
|
228
214
|
"modal-class": "manage-dialog",
|
|
229
215
|
modelValue: E.value,
|
|
230
|
-
"onUpdate:modelValue": e[
|
|
216
|
+
"onUpdate:modelValue": e[8] || (e[8] = (u) => E.value = u),
|
|
231
217
|
width: "1600",
|
|
232
218
|
"align-center": "",
|
|
233
219
|
"append-to-body": "",
|
|
@@ -236,78 +222,78 @@ const Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custo
|
|
|
236
222
|
"modal-penetrable": !0,
|
|
237
223
|
"show-close": !1
|
|
238
224
|
}, {
|
|
239
|
-
header:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
id:
|
|
244
|
-
class:
|
|
245
|
-
}, " 自定义函数管理面板 ", 10,
|
|
225
|
+
header: s(({ titleId: u, titleClass: F }) => [
|
|
226
|
+
a("div", Ie, [
|
|
227
|
+
a("div", Me, [
|
|
228
|
+
a("span", {
|
|
229
|
+
id: u,
|
|
230
|
+
class: U(F)
|
|
231
|
+
}, " 自定义函数管理面板 ", 10, Oe)
|
|
246
232
|
]),
|
|
247
|
-
|
|
233
|
+
a("div", Be, [
|
|
248
234
|
t(c, {
|
|
249
|
-
onClick: e[0] || (e[0] = (
|
|
235
|
+
onClick: e[0] || (e[0] = (pe) => E.value = !1)
|
|
250
236
|
}, {
|
|
251
|
-
default:
|
|
252
|
-
t(
|
|
237
|
+
default: s(() => [
|
|
238
|
+
t(b(Z))
|
|
253
239
|
]),
|
|
254
240
|
_: 1
|
|
255
241
|
})
|
|
256
242
|
])
|
|
257
243
|
])
|
|
258
244
|
]),
|
|
259
|
-
default:
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
245
|
+
default: s(() => [
|
|
246
|
+
a("div", qe, [
|
|
247
|
+
a("div", Re, [
|
|
248
|
+
a("div", Ue, [
|
|
249
|
+
je,
|
|
264
250
|
t(r, {
|
|
265
|
-
modelValue:
|
|
266
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
251
|
+
modelValue: w.value,
|
|
252
|
+
"onUpdate:modelValue": e[1] || (e[1] = (u) => w.value = u),
|
|
267
253
|
clearable: ""
|
|
268
254
|
}, null, 8, ["modelValue"]),
|
|
269
|
-
t(
|
|
255
|
+
t(g, {
|
|
270
256
|
type: "primary",
|
|
271
|
-
onClick:
|
|
257
|
+
onClick: z
|
|
272
258
|
}, {
|
|
273
|
-
default:
|
|
274
|
-
|
|
259
|
+
default: s(() => [
|
|
260
|
+
S("新建")
|
|
275
261
|
]),
|
|
276
262
|
_: 1
|
|
277
263
|
})
|
|
278
264
|
]),
|
|
279
|
-
t(
|
|
280
|
-
default:
|
|
281
|
-
|
|
282
|
-
key:
|
|
283
|
-
class:
|
|
265
|
+
t(_, { class: "list" }, {
|
|
266
|
+
default: s(() => [
|
|
267
|
+
x.value.length ? (D(!0), L(le, { key: 0 }, se(x.value, (u) => (D(), L("div", {
|
|
268
|
+
key: u.id,
|
|
269
|
+
class: U([{ "active-list-item": l.id === u.id }, "list-item"])
|
|
284
270
|
}, [
|
|
285
|
-
|
|
271
|
+
a("span", {
|
|
286
272
|
class: "func-name",
|
|
287
|
-
onClick: (
|
|
288
|
-
},
|
|
289
|
-
|
|
273
|
+
onClick: (F) => I(u)
|
|
274
|
+
}, j(u.funcName), 9, Te),
|
|
275
|
+
a("div", Le, [
|
|
290
276
|
t(c, null, {
|
|
291
|
-
default:
|
|
292
|
-
t(
|
|
293
|
-
onClick: (
|
|
277
|
+
default: s(() => [
|
|
278
|
+
t(b(ae), {
|
|
279
|
+
onClick: (F) => A(u)
|
|
294
280
|
}, null, 8, ["onClick"])
|
|
295
281
|
]),
|
|
296
282
|
_: 2
|
|
297
283
|
}, 1024),
|
|
298
|
-
t(
|
|
284
|
+
t(J, {
|
|
299
285
|
title: "确认是否删除?",
|
|
300
286
|
"confirm-button-text": "确认",
|
|
301
287
|
"cancel-button-text": "取消",
|
|
302
|
-
onConfirm: (
|
|
288
|
+
onConfirm: (F) => B(u)
|
|
303
289
|
}, {
|
|
304
|
-
reference:
|
|
290
|
+
reference: s(() => [
|
|
305
291
|
t(c, {
|
|
306
|
-
onClick:
|
|
292
|
+
onClick: T(() => {
|
|
307
293
|
}, ["stop"])
|
|
308
294
|
}, {
|
|
309
|
-
default:
|
|
310
|
-
t(
|
|
295
|
+
default: s(() => [
|
|
296
|
+
t(b(ie))
|
|
311
297
|
]),
|
|
312
298
|
_: 1
|
|
313
299
|
})
|
|
@@ -315,7 +301,7 @@ const Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custo
|
|
|
315
301
|
_: 2
|
|
316
302
|
}, 1032, ["onConfirm"])
|
|
317
303
|
])
|
|
318
|
-
], 2))), 128)) : (
|
|
304
|
+
], 2))), 128)) : (D(), G(d, {
|
|
319
305
|
key: 1,
|
|
320
306
|
description: "暂无数据"
|
|
321
307
|
}))
|
|
@@ -323,136 +309,70 @@ const Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custo
|
|
|
323
309
|
_: 1
|
|
324
310
|
})
|
|
325
311
|
]),
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
312
|
+
a("div", We, [
|
|
313
|
+
a("div", Ae, [
|
|
314
|
+
Pe,
|
|
329
315
|
t(r, {
|
|
330
|
-
modelValue:
|
|
331
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
316
|
+
modelValue: l.funcName,
|
|
317
|
+
"onUpdate:modelValue": e[2] || (e[2] = (u) => l.funcName = u)
|
|
332
318
|
}, null, 8, ["modelValue"]),
|
|
333
|
-
|
|
334
|
-
t(
|
|
319
|
+
a("div", Ge, [
|
|
320
|
+
t(g, {
|
|
335
321
|
type: "primary",
|
|
336
|
-
onClick:
|
|
337
|
-
loading:
|
|
322
|
+
onClick: b(m),
|
|
323
|
+
loading: V.save
|
|
338
324
|
}, {
|
|
339
|
-
default:
|
|
340
|
-
|
|
325
|
+
default: s(() => [
|
|
326
|
+
S(" 保存 ")
|
|
341
327
|
]),
|
|
342
328
|
_: 1
|
|
343
329
|
}, 8, ["onClick", "loading"]),
|
|
344
|
-
t(
|
|
345
|
-
loading:
|
|
346
|
-
onClick: e[3] || (e[3] = (
|
|
330
|
+
t(g, {
|
|
331
|
+
loading: V.test,
|
|
332
|
+
onClick: e[3] || (e[3] = (u) => H("submit"))
|
|
347
333
|
}, {
|
|
348
|
-
default:
|
|
349
|
-
|
|
334
|
+
default: s(() => [
|
|
335
|
+
S(" 测试 ")
|
|
350
336
|
]),
|
|
351
337
|
_: 1
|
|
352
338
|
}, 8, ["loading"]),
|
|
353
|
-
t(
|
|
354
|
-
icon:
|
|
355
|
-
onClick: e[4] || (e[4] = (
|
|
339
|
+
t(g, {
|
|
340
|
+
icon: b(Ce),
|
|
341
|
+
onClick: e[4] || (e[4] = (u) => H("log"))
|
|
356
342
|
}, {
|
|
357
|
-
default:
|
|
358
|
-
|
|
343
|
+
default: s(() => [
|
|
344
|
+
S(" 日志明细 ")
|
|
359
345
|
]),
|
|
360
346
|
_: 1
|
|
361
347
|
}, 8, ["icon"]),
|
|
362
|
-
t(
|
|
348
|
+
t(g, {
|
|
363
349
|
type: "primary",
|
|
364
|
-
onClick:
|
|
350
|
+
onClick: fe
|
|
365
351
|
}, {
|
|
366
|
-
default:
|
|
367
|
-
|
|
352
|
+
default: s(() => [
|
|
353
|
+
S(" 变量选择器 ")
|
|
368
354
|
]),
|
|
369
355
|
_: 1
|
|
370
356
|
})
|
|
371
357
|
])
|
|
372
358
|
]),
|
|
373
|
-
|
|
374
|
-
t(
|
|
359
|
+
Ke,
|
|
360
|
+
t(N, {
|
|
375
361
|
ref_key: "stMonacoEditorRef",
|
|
376
|
-
ref:
|
|
362
|
+
ref: p,
|
|
377
363
|
language: "lua",
|
|
378
364
|
style: { width: "100%", height: "calc(80vh - 75px)" }
|
|
379
365
|
}, null, 512)
|
|
380
366
|
])
|
|
381
367
|
]),
|
|
382
|
-
t(
|
|
368
|
+
t(R, {
|
|
383
369
|
ref_key: "stVarSelectDialogRef",
|
|
384
|
-
ref:
|
|
370
|
+
ref: k
|
|
385
371
|
}, null, 512),
|
|
386
|
-
t(
|
|
387
|
-
"modal-class": "test-variety-dialog",
|
|
388
|
-
modelValue: D.value,
|
|
389
|
-
"onUpdate:modelValue": e[9] || (e[9] = (s) => D.value = s),
|
|
390
|
-
width: "500",
|
|
391
|
-
"align-center": "",
|
|
392
|
-
"append-to-body": "",
|
|
393
|
-
overflow: "",
|
|
394
|
-
modal: !1,
|
|
395
|
-
"modal-penetrable": !0,
|
|
396
|
-
"show-close": !1
|
|
397
|
-
}, {
|
|
398
|
-
header: n(({ titleId: s, titleClass: z }) => [
|
|
399
|
-
l("div", Ze, [
|
|
400
|
-
l("div", et, [
|
|
401
|
-
l("span", {
|
|
402
|
-
id: s,
|
|
403
|
-
class: B(z)
|
|
404
|
-
}, " 测试品种 ", 10, tt)
|
|
405
|
-
]),
|
|
406
|
-
l("div", ot, [
|
|
407
|
-
t(ge, {
|
|
408
|
-
label: "",
|
|
409
|
-
onSelect: e[5] || (e[5] = ({ name: A, code: xe }) => i.value += `${xe} ${A}
|
|
410
|
-
`)
|
|
411
|
-
}),
|
|
412
|
-
t(c, {
|
|
413
|
-
onClick: e[6] || (e[6] = (A) => D.value = !1)
|
|
414
|
-
}, {
|
|
415
|
-
default: n(() => [
|
|
416
|
-
t(h(X))
|
|
417
|
-
]),
|
|
418
|
-
_: 1
|
|
419
|
-
})
|
|
420
|
-
])
|
|
421
|
-
])
|
|
422
|
-
]),
|
|
423
|
-
footer: n(() => [
|
|
424
|
-
l("div", nt, [
|
|
425
|
-
t(v, {
|
|
426
|
-
type: "primary",
|
|
427
|
-
onClick: e[8] || (e[8] = (s) => K("submit"))
|
|
428
|
-
}, {
|
|
429
|
-
default: n(() => [
|
|
430
|
-
k(" 确认 ")
|
|
431
|
-
]),
|
|
432
|
-
_: 1
|
|
433
|
-
})
|
|
434
|
-
])
|
|
435
|
-
]),
|
|
436
|
-
default: n(() => [
|
|
437
|
-
t(r, {
|
|
438
|
-
class: "full-height-textarea",
|
|
439
|
-
modelValue: i.value,
|
|
440
|
-
"onUpdate:modelValue": e[7] || (e[7] = (s) => i.value = s),
|
|
441
|
-
resize: "none",
|
|
442
|
-
type: "textarea",
|
|
443
|
-
placeholder: `不填写时, 默认为000001 平安银行
|
|
444
|
-
格式示例:
|
|
445
|
-
hc8888 热轧卷板期货指数
|
|
446
|
-
sp8888 纸浆期货指数
|
|
447
|
-
bu8888 石油沥青期货指数`
|
|
448
|
-
}, null, 8, ["modelValue"])
|
|
449
|
-
]),
|
|
450
|
-
_: 1
|
|
451
|
-
}, 8, ["modelValue"]),
|
|
452
|
-
t(H, {
|
|
372
|
+
t(Q, {
|
|
453
373
|
"modal-class": "log-dialog",
|
|
454
|
-
modelValue:
|
|
455
|
-
"onUpdate:modelValue": e[
|
|
374
|
+
modelValue: i.value,
|
|
375
|
+
"onUpdate:modelValue": e[7] || (e[7] = (u) => i.value = u),
|
|
456
376
|
width: "830",
|
|
457
377
|
"align-center": "",
|
|
458
378
|
"append-to-body": "",
|
|
@@ -462,56 +382,56 @@ bu8888 石油沥青期货指数`
|
|
|
462
382
|
"modal-penetrable": !0,
|
|
463
383
|
"show-close": !1
|
|
464
384
|
}, {
|
|
465
|
-
header:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
id:
|
|
470
|
-
class:
|
|
471
|
-
}, " 日志明细 ", 10,
|
|
385
|
+
header: s(({ titleId: u, titleClass: F }) => [
|
|
386
|
+
a("div", He, [
|
|
387
|
+
a("div", Je, [
|
|
388
|
+
a("span", {
|
|
389
|
+
id: u,
|
|
390
|
+
class: U(F)
|
|
391
|
+
}, " 日志明细 ", 10, Qe)
|
|
472
392
|
]),
|
|
473
|
-
|
|
393
|
+
a("div", Xe, [
|
|
474
394
|
t(c, {
|
|
475
|
-
onClick: e[
|
|
395
|
+
onClick: e[5] || (e[5] = (pe) => i.value = !1)
|
|
476
396
|
}, {
|
|
477
|
-
default:
|
|
478
|
-
t(
|
|
397
|
+
default: s(() => [
|
|
398
|
+
t(b(Z))
|
|
479
399
|
]),
|
|
480
400
|
_: 1
|
|
481
401
|
})
|
|
482
402
|
])
|
|
483
403
|
])
|
|
484
404
|
]),
|
|
485
|
-
footer:
|
|
486
|
-
|
|
487
|
-
t(
|
|
488
|
-
onClick: e[
|
|
405
|
+
footer: s(() => [
|
|
406
|
+
a("div", Ze, [
|
|
407
|
+
t(g, {
|
|
408
|
+
onClick: e[6] || (e[6] = (u) => i.value = !1)
|
|
489
409
|
}, {
|
|
490
|
-
default:
|
|
491
|
-
|
|
410
|
+
default: s(() => [
|
|
411
|
+
S(" 关闭 ")
|
|
492
412
|
]),
|
|
493
413
|
_: 1
|
|
494
414
|
})
|
|
495
415
|
])
|
|
496
416
|
]),
|
|
497
|
-
default:
|
|
498
|
-
|
|
499
|
-
t(
|
|
417
|
+
default: s(() => [
|
|
418
|
+
a("div", Ye, [
|
|
419
|
+
t(_, {
|
|
500
420
|
class: "code",
|
|
501
421
|
height: "600px"
|
|
502
422
|
}, {
|
|
503
|
-
default:
|
|
504
|
-
|
|
423
|
+
default: s(() => [
|
|
424
|
+
a("pre", null, j(n.code), 1)
|
|
505
425
|
]),
|
|
506
426
|
_: 1
|
|
507
427
|
}),
|
|
508
|
-
t(
|
|
509
|
-
t(
|
|
510
|
-
default:
|
|
511
|
-
|
|
512
|
-
class:
|
|
513
|
-
},
|
|
514
|
-
${
|
|
428
|
+
t(me, { direction: "vertical" }),
|
|
429
|
+
t(_, { height: "600px" }, {
|
|
430
|
+
default: s(() => [
|
|
431
|
+
a("pre", {
|
|
432
|
+
class: U(n.result === 1 ? "success-log" : "error-log")
|
|
433
|
+
}, j(n.result === 1 ? `✅️ 测试通过
|
|
434
|
+
${n.detail}` : n.detail), 3)
|
|
515
435
|
]),
|
|
516
436
|
_: 1
|
|
517
437
|
})
|
|
@@ -524,118 +444,118 @@ ${u.detail}` : u.detail), 3)
|
|
|
524
444
|
}, 8, ["modelValue"]);
|
|
525
445
|
};
|
|
526
446
|
}
|
|
527
|
-
},
|
|
528
|
-
const
|
|
447
|
+
}, tt = /* @__PURE__ */ ue(et, [["__scopeId", "data-v-b5dcb4b8"]]);
|
|
448
|
+
const ot = { class: "custom-function" }, nt = { class: "func-option" }, lt = { class: "icons" }, st = {
|
|
529
449
|
__name: "index",
|
|
530
450
|
props: {
|
|
531
451
|
size: { type: String, default: "small" },
|
|
532
452
|
selectWidth: { type: String, default: "200px" }
|
|
533
453
|
},
|
|
534
454
|
emits: ["insert"],
|
|
535
|
-
setup(
|
|
536
|
-
const { request:
|
|
537
|
-
const { body:
|
|
538
|
-
if (y.value =
|
|
539
|
-
|
|
455
|
+
setup(f, { emit: W }) {
|
|
456
|
+
const { request: O } = ne("stConfig"), C = v(null), p = W, k = v(null), h = v(""), y = v([]), E = async () => {
|
|
457
|
+
const { body: l } = await O.post("/common/qt/querySearchFunctions");
|
|
458
|
+
if (y.value = l ?? [], k.value === null)
|
|
459
|
+
h.value = "";
|
|
540
460
|
else {
|
|
541
|
-
const
|
|
542
|
-
|
|
461
|
+
const n = y.value.find(({ id: i }) => i === k.value);
|
|
462
|
+
h.value = n ? n.funcName : "";
|
|
543
463
|
}
|
|
544
|
-
},
|
|
545
|
-
var
|
|
546
|
-
|
|
547
|
-
},
|
|
548
|
-
if (!
|
|
549
|
-
return
|
|
550
|
-
const { funcName:
|
|
551
|
-
|
|
552
|
-
},
|
|
553
|
-
switch (
|
|
464
|
+
}, V = (l) => {
|
|
465
|
+
var n;
|
|
466
|
+
l ? k.value = (n = y.value.find((i) => i.funcName === l)) == null ? void 0 : n.id : k.value = null;
|
|
467
|
+
}, w = () => {
|
|
468
|
+
if (!h.value)
|
|
469
|
+
return $.error("请先选择自定义函数后, 再执行插入");
|
|
470
|
+
const { funcName: l, funcExpression: n } = y.value.find((i) => i.funcName === h.value);
|
|
471
|
+
p("insert", l, n);
|
|
472
|
+
}, x = async (l, n) => {
|
|
473
|
+
switch (l) {
|
|
554
474
|
case "open": {
|
|
555
|
-
|
|
475
|
+
C.value.open();
|
|
556
476
|
break;
|
|
557
477
|
}
|
|
558
478
|
case "copy": {
|
|
559
|
-
const
|
|
479
|
+
const i = {
|
|
560
480
|
id: null,
|
|
561
|
-
funcName: `${
|
|
562
|
-
funcExpression:
|
|
481
|
+
funcName: `${n.funcName}-复制`,
|
|
482
|
+
funcExpression: n.funcExpression
|
|
563
483
|
};
|
|
564
|
-
|
|
484
|
+
C.value.open(i);
|
|
565
485
|
break;
|
|
566
486
|
}
|
|
567
487
|
case "edit": {
|
|
568
|
-
const
|
|
569
|
-
id:
|
|
570
|
-
funcName:
|
|
571
|
-
funcExpression:
|
|
488
|
+
const i = {
|
|
489
|
+
id: n.id,
|
|
490
|
+
funcName: n.funcName,
|
|
491
|
+
funcExpression: n.funcExpression
|
|
572
492
|
};
|
|
573
|
-
|
|
493
|
+
C.value.open(i);
|
|
574
494
|
break;
|
|
575
495
|
}
|
|
576
496
|
case "delete": {
|
|
577
|
-
await
|
|
497
|
+
await O.post("/common/qt/deleteSearchFunctionById", { id: n.id }), E();
|
|
578
498
|
break;
|
|
579
499
|
}
|
|
580
500
|
}
|
|
581
501
|
};
|
|
582
|
-
return
|
|
502
|
+
return xe(() => {
|
|
583
503
|
E();
|
|
584
|
-
}), (
|
|
585
|
-
const
|
|
586
|
-
return
|
|
587
|
-
t(
|
|
588
|
-
modelValue:
|
|
589
|
-
"onUpdate:modelValue":
|
|
590
|
-
size:
|
|
504
|
+
}), (l, n) => {
|
|
505
|
+
const i = ce, z = oe, I = _e, A = ve, B = te;
|
|
506
|
+
return D(), L("div", ot, [
|
|
507
|
+
t(A, {
|
|
508
|
+
modelValue: h.value,
|
|
509
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => h.value = m),
|
|
510
|
+
size: f.size,
|
|
591
511
|
placeholder: "自定义函数",
|
|
592
512
|
"no-match-text": "无匹配选项",
|
|
593
513
|
"no-data-text": "无选项数据",
|
|
594
514
|
clearable: "",
|
|
595
515
|
filterable: "",
|
|
596
|
-
onChange:
|
|
597
|
-
style:
|
|
516
|
+
onChange: V,
|
|
517
|
+
style: be({ width: f.selectWidth })
|
|
598
518
|
}, {
|
|
599
|
-
default:
|
|
600
|
-
(
|
|
601
|
-
key:
|
|
602
|
-
label:
|
|
603
|
-
value:
|
|
604
|
-
onClick:
|
|
519
|
+
default: s(() => [
|
|
520
|
+
(D(!0), L(le, null, se(y.value, (m) => (D(), G(I, {
|
|
521
|
+
key: m.id,
|
|
522
|
+
label: m.funcName,
|
|
523
|
+
value: m.funcName,
|
|
524
|
+
onClick: w
|
|
605
525
|
}, {
|
|
606
|
-
default:
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
t(
|
|
611
|
-
onClick:
|
|
526
|
+
default: s(() => [
|
|
527
|
+
a("div", nt, [
|
|
528
|
+
a("span", null, j(m.funcName), 1),
|
|
529
|
+
a("div", lt, [
|
|
530
|
+
t(i, {
|
|
531
|
+
onClick: T((q) => x("copy", m), ["stop"])
|
|
612
532
|
}, {
|
|
613
|
-
default:
|
|
614
|
-
t(
|
|
533
|
+
default: s(() => [
|
|
534
|
+
t(b(ae))
|
|
615
535
|
]),
|
|
616
536
|
_: 2
|
|
617
537
|
}, 1032, ["onClick"]),
|
|
618
|
-
t(
|
|
619
|
-
onClick:
|
|
538
|
+
t(i, {
|
|
539
|
+
onClick: T((q) => x("edit", m), ["stop"])
|
|
620
540
|
}, {
|
|
621
|
-
default:
|
|
622
|
-
t(
|
|
541
|
+
default: s(() => [
|
|
542
|
+
t(b(ke))
|
|
623
543
|
]),
|
|
624
544
|
_: 2
|
|
625
545
|
}, 1032, ["onClick"]),
|
|
626
|
-
t(
|
|
546
|
+
t(z, {
|
|
627
547
|
title: "确认是否删除?",
|
|
628
548
|
"confirm-button-text": "确认",
|
|
629
549
|
"cancel-button-text": "取消",
|
|
630
|
-
onConfirm: (
|
|
550
|
+
onConfirm: (q) => x("delete", m)
|
|
631
551
|
}, {
|
|
632
|
-
reference:
|
|
633
|
-
t(
|
|
634
|
-
onClick:
|
|
552
|
+
reference: s(() => [
|
|
553
|
+
t(i, {
|
|
554
|
+
onClick: T(() => {
|
|
635
555
|
}, ["stop"])
|
|
636
556
|
}, {
|
|
637
|
-
default:
|
|
638
|
-
t(
|
|
557
|
+
default: s(() => [
|
|
558
|
+
t(b(ie))
|
|
639
559
|
]),
|
|
640
560
|
_: 1
|
|
641
561
|
})
|
|
@@ -650,40 +570,40 @@ const ft = { class: "custom-function" }, pt = { class: "func-option" }, mt = { c
|
|
|
650
570
|
]),
|
|
651
571
|
_: 1
|
|
652
572
|
}, 8, ["modelValue", "size", "style"]),
|
|
653
|
-
t(
|
|
573
|
+
t(B, {
|
|
654
574
|
type: "primary",
|
|
655
|
-
size:
|
|
656
|
-
onClick:
|
|
575
|
+
size: f.size,
|
|
576
|
+
onClick: w
|
|
657
577
|
}, {
|
|
658
|
-
default:
|
|
659
|
-
|
|
578
|
+
default: s(() => [
|
|
579
|
+
S(" 插入 ")
|
|
660
580
|
]),
|
|
661
581
|
_: 1
|
|
662
582
|
}, 8, ["size"]),
|
|
663
|
-
t(
|
|
583
|
+
t(B, {
|
|
664
584
|
type: "primary",
|
|
665
|
-
size:
|
|
666
|
-
onClick:
|
|
585
|
+
size: f.size,
|
|
586
|
+
onClick: n[1] || (n[1] = (m) => x("open"))
|
|
667
587
|
}, {
|
|
668
|
-
default:
|
|
669
|
-
|
|
588
|
+
default: s(() => [
|
|
589
|
+
S(" 函数管理 ")
|
|
670
590
|
]),
|
|
671
591
|
_: 1
|
|
672
592
|
}, 8, ["size"]),
|
|
673
|
-
t(
|
|
593
|
+
t(tt, {
|
|
674
594
|
ref_key: "ManageDialogRef",
|
|
675
|
-
ref:
|
|
595
|
+
ref: C,
|
|
676
596
|
data: y.value,
|
|
677
597
|
onRefreshData: E
|
|
678
598
|
}, null, 8, ["data"])
|
|
679
599
|
]);
|
|
680
600
|
};
|
|
681
601
|
}
|
|
682
|
-
},
|
|
683
|
-
install(
|
|
684
|
-
|
|
602
|
+
}, at = /* @__PURE__ */ ue(st, [["__scopeId", "data-v-d2f2ff3e"]]), Pt = {
|
|
603
|
+
install(f) {
|
|
604
|
+
f.component("st-customFunction", at);
|
|
685
605
|
}
|
|
686
606
|
};
|
|
687
607
|
export {
|
|
688
|
-
|
|
608
|
+
Pt as default
|
|
689
609
|
};
|