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.
@@ -1,24 +1,24 @@
1
1
  import "./base-a5af3db3.js";
2
- import { E as oe } from "./el-button-c95adb85.js";
2
+ import { E as te } from "./el-button-c95adb85.js";
3
3
  import "./el-tag-66cab138.js";
4
- import { E as ye, a as Ee } from "./el-select-95627997.js";
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 ne } from "./el-popconfirm-81dcd202.js";
7
+ import { E as oe } from "./el-popconfirm-81dcd202.js";
8
8
  import "./el-popover-4ed993c7.js";
9
- import { inject as le, ref as f, reactive as J, computed as be, watch as Ce, nextTick as ee, resolveComponent as Q, openBlock as I, createBlock as Y, withCtx as n, createElementVNode as l, normalizeClass as B, createVNode as t, unref as h, createTextVNode as k, createElementBlock as P, Fragment as se, renderList as ae, toDisplayString as L, withModifiers as W, pushScopeId as Ve, popScopeId as ke, h as U, onMounted as we, normalizeStyle as $e } from "vue";
10
- import { c as X, d as ie, a as ce, b as Ne, E as re, e as Se } from "./index-a871c3eb.js";
11
- import { E as De } from "./el-divider-4e059794.js";
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 ze } from "./el-empty-33cb66f1.js";
15
- import { E as te } from "./el-input-2f75c4ba.js";
16
- import { G as Ie } from "./index-7ed0999e.js";
17
- import { E as V } from "./el-message-e544a8f5.js";
18
- import { E as Me } from "./el-message-box-a93d2f6a.js";
19
- import { E as Oe, a as Be } from "./el-form-item-c53c374d.js";
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 Ue } from "./index-844bdd85.js";
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 Z = (p) => (Ve("data-v-cbbcbba3"), p = p(), ke(), p), qe = { class: "custom-header" }, Re = { class: "left" }, je = ["id"], Te = { class: "right" }, Ae = { class: "manage-dialog-body" }, Le = { class: "func-list" }, We = { class: "search" }, Pe = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("span", null, "输入函数关键字", -1)), Ge = ["onClick"], Ke = { class: "icon-box" }, He = { class: "rule-form" }, Je = { class: "header" }, Qe = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("span", null, "函数名称:", -1)), Xe = { class: "right" }, Ye = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("div", { class: "tip-box" }, "说明: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)), Ze = { class: "custom-header" }, et = { class: "left" }, tt = ["id"], ot = { class: "right" }, nt = { class: "dialog-footer" }, lt = { class: "custom-header" }, st = { class: "left" }, at = ["id"], it = { class: "right" }, ct = { class: "content" }, rt = { class: "dialog-footer" }, ut = {
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(p, { expose: G, emit: q }) {
49
- const { request: w } = le("stConfig"), m = f(null), $ = f(null), x = q, y = p, E = f(!1), N = J({
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
- }), S = f(null), b = be(() => S.value ? y.data.filter((o) => o.funcName.includes(S.value)) : y.data), a = J({
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
- }), i = f(""), u = J({
56
+ }), n = P({
57
57
  result: null,
58
58
  detail: "",
59
59
  code: ""
60
- }), D = f(!1), C = f(!1), O = () => {
60
+ }), i = v(!1), z = () => {
61
61
  var o;
62
- Object.assign(a, {
62
+ Object.assign(l, {
63
63
  id: null,
64
64
  funcName: "",
65
65
  funcExpression: ""
66
- }), i.value = "", (o = m.value) == null || o.setValue(a.funcExpression);
67
- }, M = (o) => {
66
+ }), (o = p.value) == null || o.setValue(l.funcExpression);
67
+ }, I = (o) => {
68
68
  var e;
69
- Object.assign(a, {
69
+ Object.assign(l, {
70
70
  id: o.id,
71
71
  funcName: o.funcName,
72
72
  funcExpression: o.funcExpression
73
- }), i.value = "", (e = m.value) == null || e.setValue(a.funcExpression);
74
- }, _ = (o) => {
73
+ }), (e = p.value) == null || e.setValue(l.funcExpression);
74
+ }, A = (o) => {
75
75
  var e;
76
- Object.assign(a, {
76
+ Object.assign(l, {
77
77
  id: null,
78
78
  funcName: `${o.funcName}-复制`,
79
79
  funcExpression: o.funcExpression
80
- }), i.value = "", (e = m.value) == null || e.setValue(a.funcExpression);
81
- }, R = async (o) => {
80
+ }), (e = p.value) == null || e.setValue(l.funcExpression);
81
+ }, B = async (o) => {
82
82
  var e;
83
- o.id === a.id && (Object.assign(a, {
83
+ o.id === l.id && (Object.assign(l, {
84
84
  id: null,
85
85
  funcName: "",
86
86
  funcExpression: ""
87
- }), (e = m.value) == null || e.setValue(a.funcExpression)), await w.post("/common/qt/deleteSearchFunctionById", { id: o.id }), x("refreshData");
88
- }, de = Ie(async () => {
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 (N.save = !0, a.funcExpression = m.value.getValue(), !a.funcName)
91
- return V.error("函数名称不可为空");
92
- if (!a.funcExpression)
93
- return V.error("函数内容不可为空");
94
- await w.post("/common/qt/saveOrUpdateSearchFunction", a), V.success("操作成功"), x("refreshData"), a.id || O();
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
- N.save = !1;
96
+ V.save = !1;
97
97
  }
98
- }), fe = (o) => new Promise((e) => {
99
- const c = f(
100
- o.reduce((d, g) => (d[g] = "", d), {})
101
- ), r = f({}), v = () => {
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 g = {};
104
- return o.forEach((F) => {
105
- var T;
106
- (T = c.value[F]) != null && T.trim() || (g[F] = `请输入${F}的值`, d = !1);
107
- }), r.value = g, d;
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
- Me({
109
+ Se({
110
110
  title: "填写变量值用于接口测试",
111
- message: U({
111
+ message: M({
112
112
  setup() {
113
- return () => U("div", [
114
- U(
115
- Oe,
113
+ return () => M("div", [
114
+ M(
115
+ De,
116
116
  {
117
117
  model: c.value
118
118
  },
119
119
  () => o.map(
120
- (d) => U(
121
- Be,
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
- () => U(te, {
128
+ () => M(ee, {
129
129
  modelValue: c.value[d],
130
- "onUpdate:modelValue": (g) => {
131
- c.value[d] = g, r.value[d] && delete r.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, g, F) => {
147
- d !== "confirm" && (e(!1), F()), await ee(), v() && (e({ ...c.value }), F());
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
- }), pe = (o) => {
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
- }, me = (o, e) => o.replace(/\$\{([^}]*)\}/g, (c, r) => e[r] !== void 0 ? e[r] : c), _e = (o) => o ? o.split(`
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 = m.value.getValue();
159
+ let e = p.value.getValue();
170
160
  if (!e)
171
- return V.error("函数内容不可为空");
161
+ return $.error("函数内容不可为空");
172
162
  if (/\$\{[^}]*\}/.test(e)) {
173
- const c = pe(e), r = await fe(c);
163
+ const c = re(e), r = await q(c);
174
164
  if (!r)
175
165
  return;
176
- e = me(e, r);
166
+ e = de(e, r);
177
167
  }
178
- D.value = !1;
179
168
  try {
180
- N.test = !0;
181
- const c = {
182
- codes: _e(i.value),
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
- N.test = !1;
173
+ V.test = !1;
188
174
  }
189
175
  break;
190
176
  }
191
177
  case "log": {
192
- if (u.result === null)
193
- return V.warning("请先进行测试, 等待测试完成后可查看日志");
194
- C.value = !0;
178
+ if (n.result === null)
179
+ return $.warning("请先进行测试, 等待测试完成后可查看日志");
180
+ i.value = !0;
195
181
  break;
196
182
  }
197
183
  }
198
- }, ve = () => {
199
- $.value.open(m.value);
184
+ }, fe = () => {
185
+ k.value.open(p.value);
200
186
  };
201
- return Ce(
187
+ return he(
202
188
  () => E.value,
203
189
  (o) => {
204
- o || ($.value.close(), D.value = !1, C.value = !1);
190
+ o || (k.value.close(), i.value = !1);
205
191
  }
206
- ), G({
192
+ ), W({
207
193
  open: (o) => {
208
- E.value = !0, ee(() => {
194
+ E.value = !0, X(() => {
209
195
  var e;
210
- if ((e = m.value) == null || e.resize(), S.value = null, Object.assign(u, {
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
- M(c);
206
+ I(c);
221
207
  } else
222
- b.value.length ? M(b.value[0]) : O();
208
+ x.value.length ? I(x.value[0]) : z();
223
209
  });
224
210
  }
225
211
  }), (o, e) => {
226
- const c = re, r = te, v = oe, j = ne, d = ze, g = Ue, F = Q("st-monacoEditor"), T = Q("st-varSelectDialog"), ge = Q("st-varietyAutoComplete"), H = Fe, he = De;
227
- return I(), Y(H, {
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[13] || (e[13] = (s) => E.value = s),
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: n(({ titleId: s, titleClass: z }) => [
240
- l("div", qe, [
241
- l("div", Re, [
242
- l("span", {
243
- id: s,
244
- class: B(z)
245
- }, " 自定义函数管理面板 ", 10, je)
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
- l("div", Te, [
233
+ a("div", Be, [
248
234
  t(c, {
249
- onClick: e[0] || (e[0] = (A) => E.value = !1)
235
+ onClick: e[0] || (e[0] = (pe) => E.value = !1)
250
236
  }, {
251
- default: n(() => [
252
- t(h(X))
237
+ default: s(() => [
238
+ t(b(Z))
253
239
  ]),
254
240
  _: 1
255
241
  })
256
242
  ])
257
243
  ])
258
244
  ]),
259
- default: n(() => [
260
- l("div", Ae, [
261
- l("div", Le, [
262
- l("div", We, [
263
- Pe,
245
+ default: s(() => [
246
+ a("div", qe, [
247
+ a("div", Re, [
248
+ a("div", Ue, [
249
+ je,
264
250
  t(r, {
265
- modelValue: S.value,
266
- "onUpdate:modelValue": e[1] || (e[1] = (s) => S.value = s),
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(v, {
255
+ t(g, {
270
256
  type: "primary",
271
- onClick: O
257
+ onClick: z
272
258
  }, {
273
- default: n(() => [
274
- k("新建")
259
+ default: s(() => [
260
+ S("新建")
275
261
  ]),
276
262
  _: 1
277
263
  })
278
264
  ]),
279
- t(g, { class: "list" }, {
280
- default: n(() => [
281
- b.value.length ? (I(!0), P(se, { key: 0 }, ae(b.value, (s) => (I(), P("div", {
282
- key: s.id,
283
- class: B([{ "active-list-item": a.id === s.id }, "list-item"])
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
- l("span", {
271
+ a("span", {
286
272
  class: "func-name",
287
- onClick: (z) => M(s)
288
- }, L(s.funcName), 9, Ge),
289
- l("div", Ke, [
273
+ onClick: (F) => I(u)
274
+ }, j(u.funcName), 9, Te),
275
+ a("div", Le, [
290
276
  t(c, null, {
291
- default: n(() => [
292
- t(h(ie), {
293
- onClick: (z) => _(s)
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(j, {
284
+ t(J, {
299
285
  title: "确认是否删除?",
300
286
  "confirm-button-text": "确认",
301
287
  "cancel-button-text": "取消",
302
- onConfirm: (z) => R(s)
288
+ onConfirm: (F) => B(u)
303
289
  }, {
304
- reference: n(() => [
290
+ reference: s(() => [
305
291
  t(c, {
306
- onClick: W(() => {
292
+ onClick: T(() => {
307
293
  }, ["stop"])
308
294
  }, {
309
- default: n(() => [
310
- t(h(ce))
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)) : (I(), Y(d, {
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
- l("div", He, [
327
- l("div", Je, [
328
- Qe,
312
+ a("div", We, [
313
+ a("div", Ae, [
314
+ Pe,
329
315
  t(r, {
330
- modelValue: a.funcName,
331
- "onUpdate:modelValue": e[2] || (e[2] = (s) => a.funcName = s)
316
+ modelValue: l.funcName,
317
+ "onUpdate:modelValue": e[2] || (e[2] = (u) => l.funcName = u)
332
318
  }, null, 8, ["modelValue"]),
333
- l("div", Xe, [
334
- t(v, {
319
+ a("div", Ge, [
320
+ t(g, {
335
321
  type: "primary",
336
- onClick: h(de),
337
- loading: N.save
322
+ onClick: b(m),
323
+ loading: V.save
338
324
  }, {
339
- default: n(() => [
340
- k(" 保存 ")
325
+ default: s(() => [
326
+ S(" 保存 ")
341
327
  ]),
342
328
  _: 1
343
329
  }, 8, ["onClick", "loading"]),
344
- t(v, {
345
- loading: N.test,
346
- onClick: e[3] || (e[3] = (s) => K("open"))
330
+ t(g, {
331
+ loading: V.test,
332
+ onClick: e[3] || (e[3] = (u) => H("submit"))
347
333
  }, {
348
- default: n(() => [
349
- k(" 测试 ")
334
+ default: s(() => [
335
+ S(" 测试 ")
350
336
  ]),
351
337
  _: 1
352
338
  }, 8, ["loading"]),
353
- t(v, {
354
- icon: h(Ne),
355
- onClick: e[4] || (e[4] = (s) => K("log"))
339
+ t(g, {
340
+ icon: b(Ce),
341
+ onClick: e[4] || (e[4] = (u) => H("log"))
356
342
  }, {
357
- default: n(() => [
358
- k(" 日志明细 ")
343
+ default: s(() => [
344
+ S(" 日志明细 ")
359
345
  ]),
360
346
  _: 1
361
347
  }, 8, ["icon"]),
362
- t(v, {
348
+ t(g, {
363
349
  type: "primary",
364
- onClick: ve
350
+ onClick: fe
365
351
  }, {
366
- default: n(() => [
367
- k(" 变量选择器 ")
352
+ default: s(() => [
353
+ S(" 变量选择器 ")
368
354
  ]),
369
355
  _: 1
370
356
  })
371
357
  ])
372
358
  ]),
373
- Ye,
374
- t(F, {
359
+ Ke,
360
+ t(N, {
375
361
  ref_key: "stMonacoEditorRef",
376
- ref: m,
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(T, {
368
+ t(R, {
383
369
  ref_key: "stVarSelectDialogRef",
384
- ref: $
370
+ ref: k
385
371
  }, null, 512),
386
- t(H, {
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: C.value,
455
- "onUpdate:modelValue": e[12] || (e[12] = (s) => C.value = s),
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: n(({ titleId: s, titleClass: z }) => [
466
- l("div", lt, [
467
- l("div", st, [
468
- l("span", {
469
- id: s,
470
- class: B(z)
471
- }, " 日志明细 ", 10, at)
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
- l("div", it, [
393
+ a("div", Xe, [
474
394
  t(c, {
475
- onClick: e[10] || (e[10] = (A) => C.value = !1)
395
+ onClick: e[5] || (e[5] = (pe) => i.value = !1)
476
396
  }, {
477
- default: n(() => [
478
- t(h(X))
397
+ default: s(() => [
398
+ t(b(Z))
479
399
  ]),
480
400
  _: 1
481
401
  })
482
402
  ])
483
403
  ])
484
404
  ]),
485
- footer: n(() => [
486
- l("div", rt, [
487
- t(v, {
488
- onClick: e[11] || (e[11] = (s) => C.value = !1)
405
+ footer: s(() => [
406
+ a("div", Ze, [
407
+ t(g, {
408
+ onClick: e[6] || (e[6] = (u) => i.value = !1)
489
409
  }, {
490
- default: n(() => [
491
- k(" 关闭 ")
410
+ default: s(() => [
411
+ S(" 关闭 ")
492
412
  ]),
493
413
  _: 1
494
414
  })
495
415
  ])
496
416
  ]),
497
- default: n(() => [
498
- l("div", ct, [
499
- t(g, {
417
+ default: s(() => [
418
+ a("div", Ye, [
419
+ t(_, {
500
420
  class: "code",
501
421
  height: "600px"
502
422
  }, {
503
- default: n(() => [
504
- l("pre", null, L(u.code), 1)
423
+ default: s(() => [
424
+ a("pre", null, j(n.code), 1)
505
425
  ]),
506
426
  _: 1
507
427
  }),
508
- t(he, { direction: "vertical" }),
509
- t(g, { height: "600px" }, {
510
- default: n(() => [
511
- l("pre", {
512
- class: B(u.result === 1 ? "success-log" : "error-log")
513
- }, L(u.result === 1 ? `✅️ 测试通过
514
- ${u.detail}` : u.detail), 3)
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
- }, dt = /* @__PURE__ */ ue(ut, [["__scopeId", "data-v-cbbcbba3"]]);
528
- const ft = { class: "custom-function" }, pt = { class: "func-option" }, mt = { class: "icons" }, _t = {
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(p, { emit: G }) {
536
- const { request: q } = le("stConfig"), w = f(null), m = G, $ = f(null), x = f(""), y = f([]), E = async () => {
537
- const { body: a } = await q.post("/common/qt/querySearchFunctions");
538
- if (y.value = a ?? [], $.value === null)
539
- x.value = "";
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 i = y.value.find(({ id: u }) => u === $.value);
542
- x.value = i ? i.funcName : "";
461
+ const n = y.value.find(({ id: i }) => i === k.value);
462
+ h.value = n ? n.funcName : "";
543
463
  }
544
- }, N = (a) => {
545
- var i;
546
- a ? $.value = (i = y.value.find((u) => u.funcName === a)) == null ? void 0 : i.id : $.value = null;
547
- }, S = () => {
548
- if (!x.value)
549
- return V.error("请先选择自定义函数后, 再执行插入");
550
- const { funcName: a, funcExpression: i } = y.value.find((u) => u.funcName === x.value);
551
- m("insert", a, i);
552
- }, b = async (a, i) => {
553
- switch (a) {
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
- w.value.open();
475
+ C.value.open();
556
476
  break;
557
477
  }
558
478
  case "copy": {
559
- const u = {
479
+ const i = {
560
480
  id: null,
561
- funcName: `${i.funcName}-复制`,
562
- funcExpression: i.funcExpression
481
+ funcName: `${n.funcName}-复制`,
482
+ funcExpression: n.funcExpression
563
483
  };
564
- w.value.open(u);
484
+ C.value.open(i);
565
485
  break;
566
486
  }
567
487
  case "edit": {
568
- const u = {
569
- id: i.id,
570
- funcName: i.funcName,
571
- funcExpression: i.funcExpression
488
+ const i = {
489
+ id: n.id,
490
+ funcName: n.funcName,
491
+ funcExpression: n.funcExpression
572
492
  };
573
- w.value.open(u);
493
+ C.value.open(i);
574
494
  break;
575
495
  }
576
496
  case "delete": {
577
- await q.post("/common/qt/deleteSearchFunctionById", { id: i.id }), E();
497
+ await O.post("/common/qt/deleteSearchFunctionById", { id: n.id }), E();
578
498
  break;
579
499
  }
580
500
  }
581
501
  };
582
- return we(() => {
502
+ return xe(() => {
583
503
  E();
584
- }), (a, i) => {
585
- const u = re, D = ne, C = ye, O = Ee, M = oe;
586
- return I(), P("div", ft, [
587
- t(O, {
588
- modelValue: x.value,
589
- "onUpdate:modelValue": i[0] || (i[0] = (_) => x.value = _),
590
- size: p.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: N,
597
- style: $e({ width: p.selectWidth })
516
+ onChange: V,
517
+ style: be({ width: f.selectWidth })
598
518
  }, {
599
- default: n(() => [
600
- (I(!0), P(se, null, ae(y.value, (_) => (I(), Y(C, {
601
- key: _.id,
602
- label: _.funcName,
603
- value: _.funcName,
604
- onClick: S
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: n(() => [
607
- l("div", pt, [
608
- l("span", null, L(_.funcName), 1),
609
- l("div", mt, [
610
- t(u, {
611
- onClick: W((R) => b("copy", _), ["stop"])
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: n(() => [
614
- t(h(ie))
533
+ default: s(() => [
534
+ t(b(ae))
615
535
  ]),
616
536
  _: 2
617
537
  }, 1032, ["onClick"]),
618
- t(u, {
619
- onClick: W((R) => b("edit", _), ["stop"])
538
+ t(i, {
539
+ onClick: T((q) => x("edit", m), ["stop"])
620
540
  }, {
621
- default: n(() => [
622
- t(h(Se))
541
+ default: s(() => [
542
+ t(b(ke))
623
543
  ]),
624
544
  _: 2
625
545
  }, 1032, ["onClick"]),
626
- t(D, {
546
+ t(z, {
627
547
  title: "确认是否删除?",
628
548
  "confirm-button-text": "确认",
629
549
  "cancel-button-text": "取消",
630
- onConfirm: (R) => b("delete", _)
550
+ onConfirm: (q) => x("delete", m)
631
551
  }, {
632
- reference: n(() => [
633
- t(u, {
634
- onClick: W(() => {
552
+ reference: s(() => [
553
+ t(i, {
554
+ onClick: T(() => {
635
555
  }, ["stop"])
636
556
  }, {
637
- default: n(() => [
638
- t(h(ce))
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(M, {
573
+ t(B, {
654
574
  type: "primary",
655
- size: p.size,
656
- onClick: S
575
+ size: f.size,
576
+ onClick: w
657
577
  }, {
658
- default: n(() => [
659
- k(" 插入 ")
578
+ default: s(() => [
579
+ S(" 插入 ")
660
580
  ]),
661
581
  _: 1
662
582
  }, 8, ["size"]),
663
- t(M, {
583
+ t(B, {
664
584
  type: "primary",
665
- size: p.size,
666
- onClick: i[1] || (i[1] = (_) => b("open"))
585
+ size: f.size,
586
+ onClick: n[1] || (n[1] = (m) => x("open"))
667
587
  }, {
668
- default: n(() => [
669
- k(" 函数管理 ")
588
+ default: s(() => [
589
+ S(" 函数管理 ")
670
590
  ]),
671
591
  _: 1
672
592
  }, 8, ["size"]),
673
- t(dt, {
593
+ t(tt, {
674
594
  ref_key: "ManageDialogRef",
675
- ref: w,
595
+ ref: C,
676
596
  data: y.value,
677
597
  onRefreshData: E
678
598
  }, null, 8, ["data"])
679
599
  ]);
680
600
  };
681
601
  }
682
- }, vt = /* @__PURE__ */ ue(_t, [["__scopeId", "data-v-d2f2ff3e"]]), to = {
683
- install(p) {
684
- p.component("st-customFunction", vt);
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
- to as default
608
+ Pt as default
689
609
  };