st-comp 0.0.280 → 0.0.281

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.
Files changed (116) hide show
  1. package/es/CustomFunction.cjs +2 -2
  2. package/es/CustomFunction.js +512 -306
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +25 -25
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +10 -10
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +39 -39
  9. package/es/KlineConfig.cjs +1 -1
  10. package/es/KlineConfig.js +16 -16
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +9 -9
  13. package/es/KlinePlus.cjs +1 -1
  14. package/es/KlinePlus.js +11 -11
  15. package/es/MonacoEditor.cjs +1 -1
  16. package/es/MonacoEditor.js +17 -17
  17. package/es/Pagination.cjs +1 -1
  18. package/es/Pagination.js +13 -13
  19. package/es/PasswordPrompt.cjs +1 -1
  20. package/es/PasswordPrompt.js +2 -2
  21. package/es/Table.cjs +1 -1
  22. package/es/Table.js +22 -22
  23. package/es/User.cjs +1 -1
  24. package/es/User.js +18 -18
  25. package/es/VarSelectDialog.cjs +1 -1
  26. package/es/VarSelectDialog.js +19 -19
  27. package/es/VarietyAiHelper.cjs +7 -7
  28. package/es/VarietyAiHelper.js +426 -437
  29. package/es/VarietyAutoComplete.cjs +1 -1
  30. package/es/VarietyAutoComplete.js +7 -7
  31. package/es/VarietySearch.cjs +1 -1
  32. package/es/VarietySearch.js +29 -29
  33. package/es/{VarietySelect-c402bade.js → VarietySelect-3fc0f0ce.js} +3 -3
  34. package/es/{VarietySelect-aa082a9c.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
  35. package/es/VarietyTextCopy.cjs +1 -1
  36. package/es/VarietyTextCopy.js +10 -10
  37. package/es/VirtualTable.cjs +1 -1
  38. package/es/VirtualTable.js +94 -94
  39. package/es/{_baseClone-10bdb989.cjs → _baseClone-f8e5d3ba.cjs} +1 -1
  40. package/es/{_baseClone-98af8b33.js → _baseClone-fb6a3947.js} +2 -2
  41. package/es/{config-provider-563023c9.js → config-provider-06d8207f.js} +3 -3
  42. package/es/{config-provider-33a127c4.cjs → config-provider-bb61bd3e.cjs} +1 -1
  43. package/es/{dropdown-ce7496c7.cjs → dropdown-8fa21bfd.cjs} +1 -1
  44. package/es/{dropdown-feea8702.js → dropdown-bcf8d198.js} +2 -2
  45. package/es/{el-autocomplete-d9253bba.cjs → el-autocomplete-13b9e372.cjs} +1 -1
  46. package/es/{el-autocomplete-eac54f9f.js → el-autocomplete-419bfbcf.js} +5 -5
  47. package/es/{el-button-8a9721f8.js → el-button-ee9fe159.js} +3 -3
  48. package/es/{el-button-8259594b.cjs → el-button-fac5e058.cjs} +1 -1
  49. package/es/{el-checkbox-6303fc92.cjs → el-checkbox-6cf1a71c.cjs} +1 -1
  50. package/es/{el-checkbox-c328b097.js → el-checkbox-b5ac7f04.js} +4 -4
  51. package/es/{el-dialog-67536fac.js → el-dialog-060b3735.js} +4 -4
  52. package/es/{el-dialog-8788bcc1.cjs → el-dialog-54aebacd.cjs} +1 -1
  53. package/es/{el-form-item-8efcf2c3.js → el-form-item-2be6b683.js} +3 -3
  54. package/es/{el-form-item-95e68669.cjs → el-form-item-758dfefa.cjs} +1 -1
  55. package/es/{el-input-c8a9bb71.cjs → el-input-7fe53030.cjs} +1 -1
  56. package/es/{el-input-e66500b7.js → el-input-d23f5442.js} +60 -60
  57. package/es/{el-input-number-68ee0d65.js → el-input-number-484fb184.js} +15 -15
  58. package/es/{el-input-number-d7a81922.cjs → el-input-number-f0f4eedb.cjs} +1 -1
  59. package/es/{el-loading-db4c6d13.js → el-loading-9d3e405c.js} +1 -1
  60. package/es/{el-loading-62132db2.cjs → el-loading-fafaaa7b.cjs} +1 -1
  61. package/es/{el-menu-item-c2523d82.js → el-menu-item-0ac22681.js} +4 -4
  62. package/es/{el-menu-item-4b8e7794.cjs → el-menu-item-c91ae430.cjs} +1 -1
  63. package/es/{el-message-box-7c13546c.js → el-message-box-568a0aa6.js} +9 -9
  64. package/es/{el-message-box-fed174f0.cjs → el-message-box-ceacb54e.cjs} +1 -1
  65. package/es/{el-overlay-17299785.cjs → el-overlay-9f36e73c.cjs} +1 -1
  66. package/es/{el-overlay-36f223e9.js → el-overlay-cb5c85aa.js} +3 -3
  67. package/es/{el-popconfirm-520b2928.cjs → el-popconfirm-4a8cd35c.cjs} +1 -1
  68. package/es/{el-popconfirm-a857c54a.js → el-popconfirm-6f8e65c8.js} +4 -4
  69. package/es/{el-popper-852446fd.js → el-popper-0454c8e8.js} +1 -1
  70. package/es/{el-popper-f824c63b.cjs → el-popper-acd0ff35.cjs} +1 -1
  71. package/es/{el-segmented-bf08279f.js → el-segmented-64dc7258.js} +2 -2
  72. package/es/{el-segmented-45dcc036.cjs → el-segmented-eb3c8e65.cjs} +1 -1
  73. package/es/{el-select-a34348e1.js → el-select-a573c78b.js} +8 -8
  74. package/es/{el-select-d2958ae8.cjs → el-select-c317294a.cjs} +1 -1
  75. package/es/{el-table-column-e2be313e.js → el-table-column-1c443963.js} +9 -9
  76. package/es/{el-table-column-ad70ee0e.cjs → el-table-column-f555115d.cjs} +1 -1
  77. package/es/{el-tag-9bcfae32.js → el-tag-2d8a3fe7.js} +2 -2
  78. package/es/{el-tag-527f06f0.cjs → el-tag-dca1292c.cjs} +1 -1
  79. package/es/{el-text-fc345ffd.cjs → el-text-649c986a.cjs} +1 -1
  80. package/es/{el-text-f9379288.js → el-text-761e6717.js} +1 -1
  81. package/es/{index-7711aa69.cjs → index-11181b5f.cjs} +1 -1
  82. package/es/{index-5e76a22d.cjs → index-21a3dc89.cjs} +1 -1
  83. package/es/{index-99bb359f.cjs → index-33e039e3.cjs} +1 -1
  84. package/es/{index-bb0bc131.cjs → index-4614e8e9.cjs} +2 -2
  85. package/es/{index-dfb34e00.js → index-53beef02.js} +1 -1
  86. package/es/index-5cada1ed.cjs +1 -0
  87. package/es/{index-3ed0c678.cjs → index-6a36e1fc.cjs} +1 -1
  88. package/es/{index-60900c6c.js → index-6a52dc7c.js} +112 -82
  89. package/es/{index-b9a26e7f.js → index-78dab605.js} +3 -3
  90. package/es/{index-99d4335d.cjs → index-798fec2d.cjs} +1 -1
  91. package/es/{index-47d30a52.js → index-9573f74b.js} +1 -1
  92. package/es/{index-69d2353a.js → index-ab0ad219.js} +9 -9
  93. package/es/{index-3a0a7c36.cjs → index-beb5cb7d.cjs} +1 -1
  94. package/es/{index-86678b72.js → index-c09fc6f5.js} +2 -2
  95. package/es/{index-5dec535a.cjs → index-ceae4c47.cjs} +1 -1
  96. package/es/{index-a0522466.js → index-d9379af4.js} +2 -2
  97. package/es/{index-7c4d8f5d.js → index-dddacf80.js} +1 -1
  98. package/es/{index-2419d69a.js → index-e2e58ea9.js} +5 -5
  99. package/es/{python-922eca89.cjs → python-60e79979.cjs} +1 -1
  100. package/es/{python-6eafa04b.js → python-673bf8b8.js} +17 -17
  101. package/es/style.css +1 -1
  102. package/es/{use-form-item-0a831287.cjs → use-form-item-76516e50.cjs} +1 -1
  103. package/es/{use-form-item-187cd7db.js → use-form-item-784142b4.js} +16 -16
  104. package/es/{use-global-config-c90c91f7.cjs → use-global-config-7ff9a1c2.cjs} +1 -1
  105. package/es/{use-global-config-17dafd40.js → use-global-config-9a4ccf33.js} +2 -2
  106. package/es/{validator-ee5bc3eb.cjs → validator-1926345b.cjs} +1 -1
  107. package/es/{validator-800ed2ba.js → validator-a66ec4f8.js} +1 -1
  108. package/es/{zh-cn-26cc7233.js → zh-cn-51c2e528.js} +1 -1
  109. package/es/{zh-cn-a22a6792.cjs → zh-cn-ad12d9f5.cjs} +1 -1
  110. package/lib/bundle.js +1 -1
  111. package/lib/bundle.umd.cjs +197 -197
  112. package/lib/{index-74ed48c6.js → index-7282d3be.js} +22370 -22147
  113. package/lib/{python-7aaa84e4.js → python-418be57d.js} +1 -1
  114. package/lib/style.css +1 -1
  115. package/package.json +1 -1
  116. package/es/index-3e7d5ffb.cjs +0 -1
@@ -1,44 +1,54 @@
1
- import { c as Q, d as ee, a as te, b as pe, E as oe, e as _e } from "./index-60900c6c.js";
2
- import { E as ne } from "./el-button-8a9721f8.js";
3
- import { E as ve, a as ge } from "./el-select-a34348e1.js";
4
- import { E as le } from "./el-popconfirm-a857c54a.js";
5
- import { E as $ } from "./index-2419d69a.js";
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-852446fd.js";
9
- import "./el-tag-9bcfae32.js";
8
+ import "./el-popper-0454c8e8.js";
9
+ import "./el-tag-2d8a3fe7.js";
10
10
  import "./el-popover-4ed993c7.js";
11
- import { inject as se, ref as _, reactive as P, computed as ye, watch as Ee, nextTick as X, resolveComponent as Y, openBlock as D, createBlock as K, withCtx as s, createElementVNode as a, normalizeClass as j, createVNode as t, unref as h, createTextVNode as S, createElementBlock as L, Fragment as ae, renderList as ie, toDisplayString as U, withModifiers as T, h as O, onMounted as xe, normalizeStyle as he } from "vue";
12
- import { E as Ce, a as ke } from "./el-form-item-8efcf2c3.js";
13
- import { E as Z } from "./el-input-e66500b7.js";
14
- import { E as be } from "./index-a0522466.js";
15
- import { E as Ve } from "./el-dialog-67536fac.js";
16
- import { E as we } from "./el-divider-c5d72961.js";
17
- import { E as Ne } from "./el-empty-552baf04.js";
18
- import { E as $e } from "./el-message-box-7c13546c.js";
19
- import "./el-overlay-36f223e9.js";
20
- import { j as Se } from "./index-53cc4e43.js";
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 re } from "./_plugin-vue_export-helper-dad06003.js";
23
- import "./use-form-item-187cd7db.js";
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-17dafd40.js";
27
- import "./index-47d30a52.js";
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-86678b72.js";
32
+ import "./index-c09fc6f5.js";
32
33
  import "./scroll-70271cb1.js";
33
- import "./index-7c4d8f5d.js";
34
+ import "./index-dddacf80.js";
34
35
  import "./toNumber-f077c66a.js";
35
36
  import "./clamp-c7512966.js";
36
- import "./config-provider-563023c9.js";
37
+ import "./config-provider-06d8207f.js";
37
38
  import "./typescript-7ae59c4c.js";
38
- import "./_baseClone-98af8b33.js";
39
+ import "./_baseClone-fb6a3947.js";
39
40
  import "./raf-b4fd1e12.js";
40
- import "./validator-800ed2ba.js";
41
- const De = { class: "custom-header" }, Fe = { class: "left" }, ze = ["id"], Me = { class: "right" }, Oe = { class: "manage-dialog-body" }, Be = { class: "func-list" }, Ie = { class: "search" }, qe = ["onClick"], Re = { class: "icon-box" }, je = { class: "rule-form" }, Ue = { class: "header" }, Te = { class: "right" }, Le = { class: "custom-header" }, We = { class: "left" }, Ae = ["id"], Pe = { class: "right" }, Ke = { class: "content" }, Ge = { class: "dialog-footer" }, He = {
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(C, { expose: W, emit: B }) {
51
- const { request: k } = se("stConfig"), f = _(null), b = _(null), g = B, y = C, E = _(!1), V = P({
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
- }), w = _(null), x = ye(() => w.value ? y.data.filter((n) => n.funcName.includes(w.value)) : y.data), l = P({
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
- }), o = P({
68
+ }), c = Q({
59
69
  result: null,
60
70
  detail: "",
61
71
  code: ""
62
- }), i = _(!1), z = () => {
72
+ }), $ = p(!1), q = () => {
63
73
  var n;
64
- Object.assign(l, {
74
+ Object.assign(t, {
65
75
  id: null,
66
76
  funcName: "",
67
77
  funcExpression: ""
68
- }), (n = f.value) == null || n.setValue(l.funcExpression);
69
- }, M = (n) => {
78
+ }), (n = m.value) == null || n.setValue(t.funcExpression);
79
+ }, L = (n) => {
70
80
  var e;
71
- Object.assign(l, {
81
+ Object.assign(t, {
72
82
  id: n.id,
73
83
  funcName: n.funcName,
74
84
  funcExpression: n.funcExpression
75
- }), (e = f.value) == null || e.setValue(l.funcExpression);
76
- }, A = (n) => {
85
+ }), (e = m.value) == null || e.setValue(t.funcExpression);
86
+ }, K = (n) => {
77
87
  var e;
78
- Object.assign(l, {
88
+ Object.assign(t, {
79
89
  id: null,
80
90
  funcName: `${n.funcName}-复制`,
81
91
  funcExpression: n.funcExpression
82
- }), (e = f.value) == null || e.setValue(l.funcExpression);
83
- }, I = async (n) => {
92
+ }), (e = m.value) == null || e.setValue(t.funcExpression);
93
+ }, y = async (n) => {
84
94
  var e;
85
- n.id === l.id && (Object.assign(l, {
95
+ n.id === t.id && (Object.assign(t, {
86
96
  id: null,
87
97
  funcName: "",
88
98
  funcExpression: ""
89
- }), (e = f.value) == null || e.setValue(l.funcExpression)), await k.post("/common/qt/deleteSearchFunctionById", { id: n.id }), g("refreshData");
90
- }, m = Se(async () => {
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 (V.save = !0, l.funcExpression = f.value.getValue(), !l.funcName)
93
- return $.error("函数名称不可为空");
94
- if (!l.funcExpression)
95
- return $.error("函数内容不可为空");
96
- await k.post("/common/qt/saveOrUpdateSearchFunction", l), $.success("操作成功"), g("refreshData"), l.id || z();
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
- V.save = !1;
108
+ N.save = !1;
99
109
  }
100
- }), q = (n) => new Promise((e) => {
101
- const r = _(
102
- n.reduce((d, p) => (d[p] = "", d), {})
103
- ), c = _({}), v = () => {
104
- let d = !0;
105
- const p = {};
106
- return n.forEach((N) => {
107
- var R;
108
- (R = r.value[N]) != null && R.trim() || (p[N] = `请输入${N}的值`, d = !1);
109
- }), c.value = p, d;
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
- $e({
121
+ fe({
112
122
  title: "填写变量值用于接口测试",
113
- message: O({
123
+ message: H({
114
124
  setup() {
115
- return () => O("div", [
116
- O(
117
- Ce,
125
+ return () => H("div", [
126
+ H(
127
+ je,
118
128
  {
119
- model: r.value
129
+ model: i.value
120
130
  },
121
131
  () => n.map(
122
- (d) => O(
123
- ke,
132
+ (r) => H(
133
+ Te,
124
134
  {
125
- label: `${d}: `,
126
- prop: d,
127
- error: c.value[d],
135
+ label: `${r}: `,
136
+ prop: r,
137
+ error: u.value[r],
128
138
  "label-width": "90px"
129
139
  },
130
- () => O(Z, {
131
- modelValue: r.value[d],
132
- "onUpdate:modelValue": (p) => {
133
- r.value[d] = p, c.value[d] && delete c.value[d];
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: `请输入 ${d} 的值`,
136
- status: c.value[d] ? "error" : ""
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 (d, p, N) => {
149
- d !== "confirm" && (e(!1), N()), await X(), v() && (e({ ...r.value }), N());
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
- }), ue = (n) => {
153
- const e = /\$\{([^}]*)\}/g, r = [];
154
- let c;
155
- for (; (c = e.exec(n)) !== null; )
156
- r.push(c[1]);
157
- return [...new Set(r)];
158
- }, ce = (n, e) => n.replace(/\$\{([^}]*)\}/g, (r, c) => e[c] !== void 0 ? e[c] : r), G = async (n) => {
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 = f.value.getValue();
171
+ let e = m.value.getValue();
162
172
  if (!e)
163
- return $.error("函数内容不可为空");
173
+ return V.error("函数内容不可为空");
164
174
  if (/\$\{[^}]*\}/.test(e)) {
165
- const r = ue(e), c = await q(r);
166
- if (!c)
175
+ const i = ke(e), u = await Ee(i);
176
+ if (!u)
167
177
  return;
168
- e = ce(e, c);
178
+ e = he(e, u);
169
179
  }
170
180
  try {
171
- V.test = !0;
172
- const { body: r } = await k.post("/common/qt/testFactorSelect", { factorSelectExpr: e }), { result: c, detail: v } = r;
173
- Object.assign(o, { result: c, detail: v, code: e }), c === 1 ? $.success("测试通过") : ($.error("测试未能通过"), i.value = !0);
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
- V.test = !1;
185
+ N.test = !1;
176
186
  }
177
187
  break;
178
188
  }
179
189
  case "log": {
180
- if (o.result === null)
181
- return $.warning("请先进行测试, 等待测试完成后可查看日志");
182
- i.value = !0;
190
+ if (c.result === null)
191
+ return V.warning("请先进行测试, 等待测试完成后可查看日志");
192
+ $.value = !0;
183
193
  break;
184
194
  }
185
195
  }
186
- }, de = () => {
187
- b.value.open(f.value);
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 Ee(
190
- () => E.value,
270
+ return Re(
271
+ () => A.value,
191
272
  (n) => {
192
- n || (b.value.close(), i.value = !1);
273
+ n || (k.value.close(), $.value = !1, U.value = !1);
193
274
  }
194
- ), W({
275
+ ), te({
195
276
  open: (n) => {
196
- E.value = !0, X(() => {
277
+ A.value = !0, ue(() => {
197
278
  var e;
198
- if ((e = f.value) == null || e.resize(), w.value = null, Object.assign(o, {
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 r = {
284
+ const i = {
204
285
  id: n.id,
205
286
  funcName: n.funcName,
206
287
  funcExpression: n.funcExpression
207
288
  };
208
- M(r);
289
+ L(i);
209
290
  } else
210
- x.value.length ? M(x.value[0]) : z();
291
+ _.value.length ? L(_.value[0]) : q();
211
292
  });
212
293
  }
213
294
  }), (n, e) => {
214
- const r = oe, c = Z, v = ne, H = le, d = Ne, p = be, N = Y("st-monacoEditor"), R = Y("st-varSelectDialog"), fe = we, J = Ve;
215
- return D(), K(J, {
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: E.value,
218
- "onUpdate:modelValue": e[8] || (e[8] = (u) => E.value = u),
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: s(({ titleId: u, titleClass: F }) => [
228
- a("div", De, [
229
- a("div", Fe, [
230
- a("span", {
231
- id: u,
232
- class: j(F)
233
- }, " 自定义函数管理面板 ", 10, ze)
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
- a("div", Me, [
236
- t(r, {
237
- onClick: e[0] || (e[0] = (me) => E.value = !1)
316
+ s("div", Ye, [
317
+ o(i, {
318
+ onClick: e[0] || (e[0] = (re) => A.value = !1)
238
319
  }, {
239
- default: s(() => [
240
- t(h(Q))
320
+ default: l(() => [
321
+ o(g(ne))
241
322
  ]),
242
323
  _: 1
243
324
  })
244
325
  ])
245
326
  ])
246
327
  ]),
247
- default: s(() => [
248
- a("div", Oe, [
249
- a("div", Be, [
250
- a("div", Ie, [
251
- e[10] || (e[10] = a("span", null, "输入函数关键字", -1)),
252
- t(c, {
253
- modelValue: w.value,
254
- "onUpdate:modelValue": e[1] || (e[1] = (u) => w.value = u),
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
- t(v, {
338
+ o(d, {
258
339
  type: "primary",
259
- onClick: z
340
+ onClick: q
260
341
  }, {
261
- default: s(() => [...e[9] || (e[9] = [
262
- S("新建", -1)
342
+ default: l(() => [...e[12] || (e[12] = [
343
+ x("新建", -1)
263
344
  ])]),
264
345
  _: 1
265
346
  })
266
347
  ]),
267
- t(p, { class: "list" }, {
268
- default: s(() => [
269
- x.value.length ? (D(!0), L(ae, { key: 0 }, ie(x.value, (u) => (D(), L("div", {
270
- key: u.id,
271
- class: j([{ "active-list-item": l.id === u.id }, "list-item"])
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
- a("span", {
354
+ s("span", {
274
355
  class: "func-name",
275
- onClick: (F) => M(u)
276
- }, U(u.funcName), 9, qe),
277
- a("div", Re, [
278
- t(r, null, {
279
- default: s(() => [
280
- t(h(ee), {
281
- onClick: (F) => A(u)
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
- t(H, {
367
+ o(P, {
287
368
  title: "确认是否删除?",
288
369
  "confirm-button-text": "确认",
289
370
  "cancel-button-text": "取消",
290
- onConfirm: (F) => I(u)
371
+ onConfirm: (b) => y(a)
291
372
  }, {
292
- reference: s(() => [
293
- t(r, {
294
- onClick: T(() => {
373
+ reference: l(() => [
374
+ o(i, {
375
+ onClick: ee(() => {
295
376
  }, ["stop"])
296
377
  }, {
297
- default: s(() => [
298
- t(h(te))
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)) : (D(), K(d, {
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
- a("div", je, [
315
- a("div", Ue, [
316
- e[15] || (e[15] = a("span", null, "函数名称:", -1)),
317
- t(c, {
318
- modelValue: l.funcName,
319
- "onUpdate:modelValue": e[2] || (e[2] = (u) => l.funcName = u)
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
- a("div", Te, [
322
- t(v, {
402
+ s("div", at, [
403
+ o(d, {
323
404
  type: "primary",
324
- onClick: h(m),
325
- loading: V.save
405
+ onClick: g(G),
406
+ loading: N.save
326
407
  }, {
327
- default: s(() => [...e[11] || (e[11] = [
328
- S(" 保存 ", -1)
408
+ default: l(() => [...e[14] || (e[14] = [
409
+ x(" 保存 ", -1)
329
410
  ])]),
330
411
  _: 1
331
412
  }, 8, ["onClick", "loading"]),
332
- t(v, {
333
- loading: V.test,
334
- onClick: e[3] || (e[3] = (u) => G("submit"))
413
+ o(d, {
414
+ loading: N.test,
415
+ onClick: e[3] || (e[3] = (a) => se("submit"))
335
416
  }, {
336
- default: s(() => [...e[12] || (e[12] = [
337
- S(" 测试 ", -1)
417
+ default: l(() => [...e[15] || (e[15] = [
418
+ x(" 测试 ", -1)
338
419
  ])]),
339
420
  _: 1
340
421
  }, 8, ["loading"]),
341
- t(v, {
342
- icon: h(pe),
343
- onClick: e[4] || (e[4] = (u) => G("log"))
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: s(() => [...e[13] || (e[13] = [
346
- S(" 日志明细 ", -1)
436
+ default: l(() => [...e[17] || (e[17] = [
437
+ x(" AI 生成 ", -1)
347
438
  ])]),
348
439
  _: 1
349
440
  }, 8, ["icon"]),
350
- t(v, {
441
+ o(d, {
351
442
  type: "primary",
352
- onClick: de
443
+ onClick: Se
353
444
  }, {
354
- default: s(() => [...e[14] || (e[14] = [
355
- S(" 变量选择器 ", -1)
445
+ default: l(() => [...e[18] || (e[18] = [
446
+ x(" 变量选择器 ", -1)
356
447
  ])]),
357
448
  _: 1
358
449
  })
359
450
  ])
360
451
  ]),
361
- e[16] || (e[16] = a("div", { class: "tip-box" }, "说明: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)),
362
- t(N, {
452
+ e[20] || (e[20] = s("div", { class: "tip-box" }, "说明: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)),
453
+ o(I, {
363
454
  ref_key: "stMonacoEditorRef",
364
- ref: f,
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
- t(R, {
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: b
578
+ ref: k
373
579
  }, null, 512),
374
- t(J, {
580
+ o(T, {
375
581
  "modal-class": "log-dialog",
376
- modelValue: i.value,
377
- "onUpdate:modelValue": e[7] || (e[7] = (u) => i.value = u),
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: s(({ titleId: u, titleClass: F }) => [
388
- a("div", Le, [
389
- a("div", We, [
390
- a("span", {
391
- id: u,
392
- class: j(F)
393
- }, " 日志明细 ", 10, Ae)
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
- a("div", Pe, [
396
- t(r, {
397
- onClick: e[5] || (e[5] = (me) => i.value = !1)
601
+ s("div", Et, [
602
+ o(i, {
603
+ onClick: e[8] || (e[8] = (re) => $.value = !1)
398
604
  }, {
399
- default: s(() => [
400
- t(h(Q))
605
+ default: l(() => [
606
+ o(g(ne))
401
607
  ]),
402
608
  _: 1
403
609
  })
404
610
  ])
405
611
  ])
406
612
  ]),
407
- footer: s(() => [
408
- a("div", Ge, [
409
- t(v, {
410
- onClick: e[6] || (e[6] = (u) => i.value = !1)
613
+ footer: l(() => [
614
+ s("div", ht, [
615
+ o(d, {
616
+ onClick: e[9] || (e[9] = (a) => $.value = !1)
411
617
  }, {
412
- default: s(() => [...e[17] || (e[17] = [
413
- S(" 关闭 ", -1)
618
+ default: l(() => [...e[24] || (e[24] = [
619
+ x(" 关闭 ", -1)
414
620
  ])]),
415
621
  _: 1
416
622
  })
417
623
  ])
418
624
  ]),
419
- default: s(() => [
420
- a("div", Ke, [
421
- t(p, {
625
+ default: l(() => [
626
+ s("div", kt, [
627
+ o(v, {
422
628
  class: "code",
423
629
  height: "600px"
424
630
  }, {
425
- default: s(() => [
426
- a("pre", null, U(o.code), 1)
631
+ default: l(() => [
632
+ s("pre", null, O(c.code), 1)
427
633
  ]),
428
634
  _: 1
429
635
  }),
430
- t(fe, { direction: "vertical" }),
431
- t(p, { height: "600px" }, {
432
- default: s(() => [
433
- a("pre", {
434
- class: j(o.result === 1 ? "success-log" : "error-log")
435
- }, U(o.result === 1 ? `✅️ 测试通过
436
- ${o.detail}` : o.detail), 3)
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
- }, Je = /* @__PURE__ */ re(He, [["__scopeId", "data-v-d6df26f4"]]);
450
- const Qe = { class: "custom-function" }, Xe = { class: "func-option" }, Ye = { class: "icons" }, Ze = {
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(C, { emit: W }) {
458
- const { request: B } = se("stConfig"), k = _(null), f = W, b = _(null), g = _(""), y = _([]), E = async () => {
459
- const { body: l } = await B.post("/common/qt/querySearchFunctions");
460
- if (y.value = l ?? [], b.value === null)
461
- g.value = "";
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 o = y.value.find(({ id: i }) => i === b.value);
464
- g.value = o ? o.funcName : "";
669
+ const t = w.value.find(({ id: c }) => c === m.value);
670
+ k.value = t ? t.funcName : "";
465
671
  }
466
- }, V = (l) => {
467
- var o;
468
- l ? b.value = (o = y.value.find((i) => i.funcName === l)) == null ? void 0 : o.id : b.value = null;
469
- }, w = () => {
470
- if (!g.value)
471
- return $.error("请先选择自定义函数后, 再执行插入");
472
- const { funcName: l, funcExpression: o } = y.value.find((i) => i.funcName === g.value);
473
- f("insert", l, o);
474
- }, x = async (l, o) => {
475
- switch (l) {
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
- k.value.open(), f("actionState", "因子筛选", "函数管理");
683
+ S.value.open(), R("actionState", "因子筛选", "函数管理");
478
684
  break;
479
685
  }
480
686
  case "copy": {
481
- const i = {
687
+ const c = {
482
688
  id: null,
483
- funcName: `${o.funcName}-复制`,
484
- funcExpression: o.funcExpression
689
+ funcName: `${t.funcName}-复制`,
690
+ funcExpression: t.funcExpression
485
691
  };
486
- k.value.open(i);
692
+ S.value.open(c);
487
693
  break;
488
694
  }
489
695
  case "edit": {
490
- const i = {
491
- id: o.id,
492
- funcName: o.funcName,
493
- funcExpression: o.funcExpression
696
+ const c = {
697
+ id: t.id,
698
+ funcName: t.funcName,
699
+ funcExpression: t.funcExpression
494
700
  };
495
- k.value.open(i);
701
+ S.value.open(c);
496
702
  break;
497
703
  }
498
704
  case "delete": {
499
- await B.post("/common/qt/deleteSearchFunctionById", { id: o.id }), E();
705
+ await J.post("/common/qt/deleteSearchFunctionById", { id: t.id }), M();
500
706
  break;
501
707
  }
502
708
  }
503
709
  };
504
- return xe(() => {
505
- E();
506
- }), (l, o) => {
507
- const i = oe, z = le, M = ve, A = ge, I = ne;
508
- return D(), L("div", Qe, [
509
- t(A, {
510
- modelValue: g.value,
511
- "onUpdate:modelValue": o[0] || (o[0] = (m) => g.value = m),
512
- size: C.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: V,
519
- style: he({ width: C.selectWidth })
724
+ onChange: A,
725
+ style: Ue({ width: D.selectWidth })
520
726
  }, {
521
- default: s(() => [
522
- (D(!0), L(ae, null, ie(y.value, (m) => (D(), K(M, {
523
- key: m.id,
524
- label: m.funcName,
525
- value: m.funcName,
526
- onClick: w
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: s(() => [
529
- a("div", Xe, [
530
- a("span", null, U(m.funcName), 1),
531
- a("div", Ye, [
532
- t(i, {
533
- onClick: T((q) => x("copy", m), ["stop"])
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: s(() => [
536
- t(h(ee))
741
+ default: l(() => [
742
+ o(g(pe))
537
743
  ]),
538
744
  _: 1
539
745
  }, 8, ["onClick"]),
540
- t(i, {
541
- onClick: T((q) => x("edit", m), ["stop"])
746
+ o(c, {
747
+ onClick: ee((G) => h("edit", y), ["stop"])
542
748
  }, {
543
- default: s(() => [
544
- t(h(_e))
749
+ default: l(() => [
750
+ o(g(Oe))
545
751
  ]),
546
752
  _: 1
547
753
  }, 8, ["onClick"]),
548
- t(z, {
754
+ o($, {
549
755
  title: "确认是否删除?",
550
756
  "confirm-button-text": "确认",
551
757
  "cancel-button-text": "取消",
552
- onConfirm: (q) => x("delete", m)
758
+ onConfirm: (G) => h("delete", y)
553
759
  }, {
554
- reference: s(() => [
555
- t(i, {
556
- onClick: T(() => {
760
+ reference: l(() => [
761
+ o(c, {
762
+ onClick: ee(() => {
557
763
  }, ["stop"])
558
764
  }, {
559
- default: s(() => [
560
- t(h(te))
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
- t(I, {
781
+ o(K, {
576
782
  type: "primary",
577
- size: C.size,
578
- onClick: w
783
+ size: D.size,
784
+ onClick: N
579
785
  }, {
580
- default: s(() => [...o[2] || (o[2] = [
581
- S(" 插入 ", -1)
786
+ default: l(() => [...t[2] || (t[2] = [
787
+ x(" 插入 ", -1)
582
788
  ])]),
583
789
  _: 1
584
790
  }, 8, ["size"]),
585
- t(I, {
791
+ o(K, {
586
792
  type: "primary",
587
- size: C.size,
588
- onClick: o[1] || (o[1] = (m) => x("open"))
793
+ size: D.size,
794
+ onClick: t[1] || (t[1] = (y) => h("open"))
589
795
  }, {
590
- default: s(() => [...o[3] || (o[3] = [
591
- S(" 函数管理 ", -1)
796
+ default: l(() => [...t[3] || (t[3] = [
797
+ x(" 函数管理 ", -1)
592
798
  ])]),
593
799
  _: 1
594
800
  }, 8, ["size"]),
595
- t(Je, {
801
+ o(bt, {
596
802
  ref_key: "ManageDialogRef",
597
- ref: k,
598
- data: y.value,
599
- onRefreshData: E
803
+ ref: S,
804
+ data: w.value,
805
+ onRefreshData: M
600
806
  }, null, 8, ["data"])
601
807
  ]);
602
808
  };
603
809
  }
604
- }, et = /* @__PURE__ */ re(Ze, [["__scopeId", "data-v-d01721a6"]]), Tt = {
605
- install(C) {
606
- C.component("st-customFunction", et);
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
- Tt as default
816
+ yo as default
611
817
  };