st-comp 0.0.199 → 0.0.200

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 (151) hide show
  1. package/auto-imports.d.ts +3 -0
  2. package/components.d.ts +0 -3
  3. package/es/ChartLayout.js +4 -4
  4. package/es/ConfigProvider.cjs +1 -1
  5. package/es/ConfigProvider.js +1 -1
  6. package/es/CustomFunction.cjs +1 -1
  7. package/es/CustomFunction.js +281 -217
  8. package/es/FactorWarning.cjs +1 -1
  9. package/es/FactorWarning.js +68 -71
  10. package/es/Kline.cjs +1 -1
  11. package/es/Kline.js +19 -21
  12. package/es/KlineBasic.cjs +1 -1
  13. package/es/KlineBasic.js +28 -30
  14. package/es/KlineConfig.cjs +1 -1
  15. package/es/KlineConfig.js +23 -25
  16. package/es/KlineNew.cjs +1 -1
  17. package/es/KlineNew.js +18 -20
  18. package/es/KlinePlus.cjs +1 -1
  19. package/es/KlinePlus.js +21 -23
  20. package/es/MonacoEditor.cjs +1 -1
  21. package/es/MonacoEditor.js +2 -2
  22. package/es/Pagination.cjs +1 -1
  23. package/es/Pagination.js +72 -74
  24. package/es/PasswordPrompt.cjs +1 -1
  25. package/es/PasswordPrompt.js +157 -9
  26. package/es/Pie.cjs +1 -1
  27. package/es/Pie.js +1 -1
  28. package/es/Table.cjs +1 -1
  29. package/es/Table.js +50 -53
  30. package/es/User.cjs +1 -1
  31. package/es/User.js +1 -1223
  32. package/es/VarSelectDialog.cjs +1 -1
  33. package/es/VarSelectDialog.js +26 -28
  34. package/es/VarietyAutoComplete.cjs +1 -1
  35. package/es/VarietyAutoComplete.js +18 -19
  36. package/es/VarietySearch.cjs +7 -7
  37. package/es/VarietySearch.js +693 -697
  38. package/es/VarietyTextCopy.cjs +3 -3
  39. package/es/VarietyTextCopy.js +15 -15
  40. package/es/VirtualTable.cjs +1 -1
  41. package/es/VirtualTable.js +79 -80
  42. package/es/{base-a5af3db3.js → base-8348063b.js} +38 -38
  43. package/es/{castArray-7741a212.js → castArray-3f45c3ec.js} +1 -1
  44. package/es/{config-provider-b16efd62.js → config-provider-1a687690.js} +6 -6
  45. package/es/{config-provider-a584d81e.cjs → config-provider-eb0460f1.cjs} +1 -1
  46. package/es/el-autocomplete-86c0d989.cjs +1 -0
  47. package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-d4cd96cd.js} +16 -16
  48. package/es/{el-button-c95adb85.js → el-button-2e680390.js} +33 -33
  49. package/es/{el-button-eec58cff.cjs → el-button-4ccd7122.cjs} +1 -1
  50. package/es/el-checkbox-group-dfdad075.cjs +1 -0
  51. package/es/el-checkbox-group-e26a4533.js +67 -0
  52. package/es/{el-dialog-ae86edb8.cjs → el-dialog-6413b4af.cjs} +1 -1
  53. package/es/{el-dialog-41ab8417.js → el-dialog-bafc4b2b.js} +6 -7
  54. package/es/{el-divider-4e059794.js → el-divider-93b0ee21.js} +1 -1
  55. package/es/{el-empty-33cb66f1.js → el-empty-56783dca.js} +3 -3
  56. package/es/el-form-item-41becb31.js +1749 -0
  57. package/es/el-form-item-95476197.cjs +12 -0
  58. package/es/{el-input-7fd293af.cjs → el-input-6c5ac889.cjs} +1 -1
  59. package/es/{el-input-2f75c4ba.js → el-input-735575f4.js} +34 -34
  60. package/es/{el-input-number-5193fe6d.js → el-input-number-6634a6ea.js} +35 -35
  61. package/es/{el-input-number-22e21d16.cjs → el-input-number-d5770776.cjs} +1 -1
  62. package/es/{el-loading-f6022062.js → el-loading-049dacc5.js} +5 -5
  63. package/es/{el-loading-cfd86c15.cjs → el-loading-98dcebee.cjs} +1 -1
  64. package/es/{el-menu-item-17dc717e.cjs → el-menu-item-828bc6fa.cjs} +1 -1
  65. package/es/{el-menu-item-7e881203.js → el-menu-item-8a210e21.js} +22 -22
  66. package/es/{el-message-5e6a6be9.cjs → el-message-a1ac37d4.cjs} +1 -1
  67. package/es/{el-message-e544a8f5.js → el-message-def216ae.js} +24 -24
  68. package/es/{el-overlay-09ad71cd.js → el-overlay-4ea38eab.js} +51 -51
  69. package/es/{el-overlay-9e34965f.cjs → el-overlay-69dfacb6.cjs} +1 -1
  70. package/es/{el-popconfirm-81dcd202.js → el-popconfirm-aace1104.js} +20 -20
  71. package/es/{el-popconfirm-70a976bf.cjs → el-popconfirm-bdeceeb7.cjs} +1 -1
  72. package/es/{_initCloneObject-52b6a510.cjs → el-popover-5421d52a.cjs} +1 -1
  73. package/es/{_initCloneObject-eaef9418.js → el-popover-7a1c6412.js} +9 -9
  74. package/es/{el-popper-b4f97157.js → el-popper-986a8371.js} +112 -115
  75. package/es/{el-popper-b6c99b28.cjs → el-popper-b962125f.cjs} +1 -1
  76. package/es/el-scrollbar-139aa96d.cjs +1 -0
  77. package/es/el-scrollbar-cdadd788.js +115 -0
  78. package/es/{el-segmented-f8fce9ac.cjs → el-segmented-6b057ed5.cjs} +1 -1
  79. package/es/{el-segmented-b868d074.js → el-segmented-f892ec18.js} +8 -8
  80. package/es/{el-select-95627997.js → el-select-2189a8ac.js} +41 -42
  81. package/es/el-select-e1046cc6.cjs +1 -0
  82. package/es/{el-table-column-72c50d58.js → el-table-column-91d69c86.js} +14 -14
  83. package/es/el-table-column-f1c4af89.cjs +14 -0
  84. package/es/{el-tag-66cab138.js → el-tag-75a7573a.js} +16 -16
  85. package/es/{el-tag-a33c4b22.cjs → el-tag-a15520b3.cjs} +1 -1
  86. package/es/{index-d77a7336.js → index-14c88a1a.js} +1 -1
  87. package/es/{index-11547a0c.cjs → index-16802b35.cjs} +1 -1
  88. package/es/{index-098c2447.cjs → index-1fb95601.cjs} +1 -1
  89. package/es/index-56ea97a9.js +122 -0
  90. package/es/{index-c108567d.cjs → index-5e0314ac.cjs} +1 -1
  91. package/es/{index-298075cf.cjs → index-680be212.cjs} +1 -1
  92. package/es/{index-bc8e277e.js → index-780e7fd2.js} +2 -2
  93. package/es/{index-d725fef6.cjs → index-78381381.cjs} +2 -2
  94. package/es/{index-a871c3eb.js → index-847d58bc.js} +62 -92
  95. package/es/index-8583c047.cjs +1 -0
  96. package/es/{index-7ed0999e.js → index-9cfb6ccf.js} +0 -2
  97. package/es/{index-e5566b94.js → index-c94b9543.js} +43 -43
  98. package/es/{index-8901a38c.cjs → index-cc200b99.cjs} +1 -1
  99. package/es/index-ce63356a.cjs +1 -0
  100. package/es/index-db1e1861.js +318 -0
  101. package/es/{index-960806da.js → index-e00ee015.js} +36 -36
  102. package/es/{index-844bdd85.js → index-f3a86049.js} +29 -29
  103. package/es/{index-d91dc23f.js → index-f45c2897.js} +20 -20
  104. package/es/{python-c27ba105.cjs → python-2e916d28.cjs} +1 -1
  105. package/es/{python-ecde9ff2.js → python-7cf0b6ba.js} +2 -2
  106. package/es/{raf-80ef0c0a.js → raf-8e5f0699.js} +1 -1
  107. package/es/{scroll-679bd6bf.js → scroll-c43468ab.js} +1 -1
  108. package/es/style.css +1 -1
  109. package/es/{use-form-common-props-fd9b61a0.cjs → use-form-common-props-d8866dc6.cjs} +1 -1
  110. package/es/{use-form-common-props-815d48a6.js → use-form-common-props-e6cba60f.js} +69 -69
  111. package/es/{use-global-config-30d7d8ce.cjs → use-global-config-72d50e62.cjs} +1 -1
  112. package/es/{use-global-config-b5e9d3d5.js → use-global-config-76ff2e3e.js} +14 -14
  113. package/es/{validator-764a9db0.js → validator-220652c5.js} +1 -1
  114. package/es/{validator-1b8a6128.cjs → validator-e759d43d.cjs} +1 -1
  115. package/es/{zh-cn-90317f62.cjs → zh-cn-33e7aee6.cjs} +1 -1
  116. package/es/{zh-cn-e963c628.js → zh-cn-c7fa42ea.js} +2 -2
  117. package/lib/bundle.js +1 -1
  118. package/lib/bundle.umd.cjs +205 -205
  119. package/lib/{index-c9dddb13.js → index-410c490f.js} +19955 -19802
  120. package/lib/{python-8de8f552.js → python-589861d2.js} +1 -1
  121. package/lib/style.css +1 -1
  122. package/package.json +1 -1
  123. package/packages/CustomFunction/index.vue +141 -30
  124. package/packages/User/components/EditInfoDialog/Mobile.vue +110 -0
  125. package/packages/User/components/EditInfoDialog/index.vue +136 -0
  126. package/packages/User/components/SetPasswordDialog.vue +6 -3
  127. package/packages/User/index.vue +7 -22
  128. package/es/debounce-62f5b6e8.cjs +0 -1
  129. package/es/debounce-8d53f4dd.js +0 -83
  130. package/es/dropdown-071c5d7e.cjs +0 -1
  131. package/es/dropdown-a59bba73.js +0 -178
  132. package/es/el-autocomplete-a07e9439.cjs +0 -1
  133. package/es/el-form-item-c3fe189b.cjs +0 -12
  134. package/es/el-form-item-eeb64520.js +0 -1269
  135. package/es/el-message-box-48d71ee5.cjs +0 -1
  136. package/es/el-message-box-81ffd21e.js +0 -550
  137. package/es/el-popover-0ea8fbf8.cjs +0 -1
  138. package/es/el-popover-4ed993c7.js +0 -1
  139. package/es/el-scrollbar-323542e7.js +0 -34
  140. package/es/el-scrollbar-bc3f790d.cjs +0 -1
  141. package/es/el-select-d8d91db1.cjs +0 -1
  142. package/es/el-table-column-079b76f5.cjs +0 -14
  143. package/es/index-1f7d4f70.js +0 -157
  144. package/es/index-57672682.js +0 -113
  145. package/es/index-88546436.js +0 -163
  146. package/es/index-9b9ef5dd.cjs +0 -1
  147. package/es/index-f3562b52.cjs +0 -1
  148. package/es/index-f967d6c1.cjs +0 -1
  149. package/es/vnode-5ddb7ed1.js +0 -14
  150. package/es/vnode-b906ae6d.cjs +0 -1
  151. package/packages/User/components/EditInfoDialog.vue +0 -144
@@ -1,68 +1,68 @@
1
- import "./base-a5af3db3.js";
2
- import { E as oe } from "./el-divider-4e059794.js";
3
- import "./el-scrollbar-323542e7.js";
4
- import { E as le } from "./el-dialog-41ab8417.js";
5
- import "./el-overlay-09ad71cd.js";
6
- import { E as ne } from "./el-input-2f75c4ba.js";
7
- import { E as se } from "./el-button-c95adb85.js";
8
- import "./el-tag-66cab138.js";
9
- import { E as ae, a as ie } from "./el-select-95627997.js";
10
- import "./el-popper-b4f97157.js";
11
- import { E as ce } from "./el-popconfirm-81dcd202.js";
12
- import "./el-popover-4ed993c7.js";
13
- import { inject as re, ref as r, reactive as q, onMounted as ue, watch as de, nextTick as fe, resolveComponent as B, openBlock as z, createElementBlock as j, createVNode as t, normalizeStyle as me, withCtx as o, Fragment as pe, renderList as _e, createBlock as ve, createElementVNode as n, toDisplayString as k, withModifiers as F, unref as E, createTextVNode as m, normalizeClass as O, pushScopeId as ge, popScopeId as he } from "vue";
14
- import { d as Ee, e as ye, a as xe, c as M, b as be, E as ke } from "./index-a871c3eb.js";
15
- import { E as u } from "./el-message-e544a8f5.js";
16
- import { _ as Ce } from "./_plugin-vue_export-helper-dad06003.js";
17
- import { E as Ve } from "./index-844bdd85.js";
18
- import "./use-form-common-props-815d48a6.js";
19
- import "./index-960806da.js";
20
- import "./index-d77a7336.js";
1
+ import "./base-8348063b.js";
2
+ import { E as ce } from "./el-divider-93b0ee21.js";
3
+ import "./el-scrollbar-cdadd788.js";
4
+ import { E as re } from "./el-dialog-bafc4b2b.js";
5
+ import "./el-overlay-4ea38eab.js";
6
+ import { E as j } from "./el-input-735575f4.js";
7
+ import { E as ue } from "./el-button-2e680390.js";
8
+ import "./el-tag-75a7573a.js";
9
+ import { E as de, a as me } from "./el-select-2189a8ac.js";
10
+ import "./el-popper-986a8371.js";
11
+ import { E as fe } from "./el-popconfirm-aace1104.js";
12
+ import "./el-popover-7a1c6412.js";
13
+ import { inject as pe, ref as u, reactive as L, onMounted as _e, watch as ve, nextTick as P, resolveComponent as W, openBlock as T, createElementBlock as A, createVNode as l, normalizeStyle as ge, withCtx as s, Fragment as he, renderList as Ee, createBlock as ye, createElementVNode as i, toDisplayString as $, withModifiers as q, unref as C, createTextVNode as v, normalizeClass as M, pushScopeId as xe, popScopeId as Ce, h as S } from "vue";
14
+ import { d as we, e as Ve, a as be, b as G, f as ke, E as Se } from "./index-847d58bc.js";
15
+ import { E as p } from "./el-message-def216ae.js";
16
+ import { E as Ne, a as Fe, b as $e } from "./el-form-item-41becb31.js";
17
+ import { _ as ze } from "./_plugin-vue_export-helper-dad06003.js";
18
+ import { E as De } from "./index-f3a86049.js";
19
+ import "./index-e00ee015.js";
20
+ import "./use-form-common-props-e6cba60f.js";
21
+ import "./index-14c88a1a.js";
21
22
  import "./index-2e331d74.js";
22
- import "./vnode-5ddb7ed1.js";
23
- import "./scroll-679bd6bf.js";
24
- import "./use-global-config-b5e9d3d5.js";
25
- import "./index-e5566b94.js";
23
+ import "./index-56ea97a9.js";
24
+ import "./scroll-c43468ab.js";
25
+ import "./use-global-config-76ff2e3e.js";
26
+ import "./index-c94b9543.js";
26
27
  import "./typescript-7ae59c4c.js";
27
- import "./index-d91dc23f.js";
28
+ import "./index-f45c2897.js";
28
29
  import "./index-657047bb.js";
29
- import "./index-57672682.js";
30
- import "./castArray-7741a212.js";
31
- import "./debounce-8d53f4dd.js";
32
- import "./config-provider-b16efd62.js";
33
- const R = (c) => (ge("data-v-0a65deeb"), c = c(), he(), c), Se = { class: "custom-function" }, we = { class: "func-option" }, Ne = { class: "icons" }, ze = { class: "custom-header" }, Fe = { class: "left" }, Oe = ["id"], $e = { class: "right" }, De = { class: "func-name" }, Ie = { class: "left" }, qe = /* @__PURE__ */ R(() => /* @__PURE__ */ n("span", null, "函数名称:", -1)), Be = { class: "right" }, je = /* @__PURE__ */ R(() => /* @__PURE__ */ n("div", { class: "tip-box" }, "Tip: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)), Me = { class: "dialog-footer" }, Re = { class: "custom-header" }, Te = { class: "left" }, Ue = ["id"], Le = { class: "right" }, We = { class: "content" }, Ae = { class: "dialog-footer" }, Pe = {
30
+ import "./castArray-3f45c3ec.js";
31
+ import "./config-provider-1a687690.js";
32
+ import "./validator-220652c5.js";
33
+ const H = (d) => (xe("data-v-ff7c4544"), d = d(), Ce(), d), Ie = { class: "custom-function" }, Be = { class: "func-option" }, Oe = { class: "icons" }, Te = { class: "custom-header" }, qe = { class: "left" }, Me = ["id"], Ue = { class: "right" }, Re = { class: "func-name" }, je = { class: "left" }, Le = /* @__PURE__ */ H(() => /* @__PURE__ */ i("span", null, "函数名称:", -1)), Pe = { class: "right" }, We = /* @__PURE__ */ H(() => /* @__PURE__ */ i("div", { class: "tip-box" }, "Tip: 公式里可以使用变量, 变量名命名格式: ${变量名}, 后续可在应用函数时填写具体值, 系统会自动换算", -1)), Ae = { class: "dialog-footer" }, Ge = { class: "custom-header" }, He = { class: "left" }, Je = ["id"], Ke = { class: "right" }, Qe = { class: "content" }, Xe = { class: "dialog-footer" }, Ye = {
34
34
  __name: "index",
35
35
  props: {
36
36
  size: { type: String, default: "small" },
37
37
  selectWidth: { type: String, default: "200px" }
38
38
  },
39
39
  emits: ["insert"],
40
- setup(c, { emit: T }) {
41
- const { request: x } = re("stConfig"), p = r(null), C = r(null), U = T, b = r(null), _ = r(""), y = r([]), v = r(!1), s = q({
40
+ setup(d, { emit: J }) {
41
+ const { request: N } = pe("stConfig"), g = u(null), z = u(null), K = J, F = u(null), h = u(""), w = u([]), E = u(!1), r = L({
42
42
  id: null,
43
43
  funcName: "",
44
44
  funcExpression: ""
45
- }), V = r(!1), g = r(!1), S = r(!1), d = q({
45
+ }), D = u(!1), y = u(!1), I = u(!1), _ = L({
46
46
  result: null,
47
47
  detail: "",
48
48
  code: ""
49
- }), w = async () => {
50
- const { body: a } = await x.post("/common/qt/querySearchFunctions");
51
- if (y.value = a ?? [], b.value === null)
52
- _.value = "";
49
+ }), B = async () => {
50
+ const { body: t } = await N.post("/common/qt/querySearchFunctions");
51
+ if (w.value = t ?? [], F.value === null)
52
+ h.value = "";
53
53
  else {
54
- const e = y.value.find(({ id: i }) => i === b.value);
55
- _.value = e ? e.funcName : "";
54
+ const e = w.value.find(({ id: o }) => o === F.value);
55
+ h.value = e ? e.funcName : "";
56
56
  }
57
- }, L = (a) => {
57
+ }, Q = (t) => {
58
58
  var e;
59
- a ? b.value = (e = y.value.find((i) => i.funcName === a)) == null ? void 0 : e.id : b.value = null;
60
- }, W = async (a) => {
61
- await x.post("/common/qt/deleteSearchFunctionById", { id: a.id }), w();
62
- }, N = (a, e) => {
63
- switch (!!a) {
59
+ t ? F.value = (e = w.value.find((o) => o.funcName === t)) == null ? void 0 : e.id : F.value = null;
60
+ }, X = async (t) => {
61
+ await N.post("/common/qt/deleteSearchFunctionById", { id: t.id }), B();
62
+ }, O = (t, e) => {
63
+ switch (!!t) {
64
64
  case !1: {
65
- Object.assign(s, {
65
+ Object.assign(r, {
66
66
  id: null,
67
67
  funcName: "",
68
68
  funcExpression: ""
@@ -70,125 +70,189 @@ const R = (c) => (ge("data-v-0a65deeb"), c = c(), he(), c), Se = { class: "custo
70
70
  break;
71
71
  }
72
72
  case !0: {
73
- Object.assign(s, {
74
- id: a.id,
75
- funcName: a.funcName,
76
- funcExpression: a.funcExpression
73
+ Object.assign(r, {
74
+ id: t.id,
75
+ funcName: t.funcName,
76
+ funcExpression: t.funcExpression
77
77
  });
78
78
  break;
79
79
  }
80
80
  }
81
- e && (s.id = null, s.funcName = `${s.funcName}-复制`), v.value = !0;
82
- }, A = async () => {
81
+ e && (r.id = null, r.funcName = `${r.funcName}-复制`), E.value = !0;
82
+ }, Y = async () => {
83
83
  try {
84
- if (S.value = !0, s.funcExpression = p.value.getValue(), !s.funcExpression)
85
- return u.error("函数内容不可为空");
86
- if (/\$\{[^}]*\}/.test(s.funcExpression))
87
- return u.error("不支持包含变量用法的函数进行测试");
88
- const { body: a } = await x.post("/common/qt/testFactorSelect", { factorSelectExpr: s.funcExpression }), { result: e, detail: i } = a;
89
- Object.assign(d, { result: e, detail: i, code: s.funcExpression }), e === 1 ? u.success("测试通过") : (u.error("测试未能通过"), g.value = !0);
84
+ if (D.value = !0, r.funcExpression = g.value.getValue(), !r.funcName)
85
+ return p.error("函数名称不可为空");
86
+ if (!r.funcExpression)
87
+ return p.error("函数内容不可为空");
88
+ await N.post("/common/qt/saveOrUpdateSearchFunction", r), p.success("操作成功"), E.value = !1, await B();
90
89
  } finally {
91
- S.value = !1;
90
+ D.value = !1;
92
91
  }
93
- }, P = () => {
94
- if (d.result === null)
95
- return u.warning("请先进行测试, 等待测试完成后可查看日志");
96
- g.value = !0;
97
- }, G = async () => {
92
+ }, U = () => {
93
+ if (!h.value)
94
+ return p.error("请先选择自定义函数后, 再执行插入");
95
+ const { funcName: t, funcExpression: e } = w.value.find((o) => o.funcName === h.value);
96
+ K("insert", t, e);
97
+ }, Z = (t) => {
98
+ const e = /\$\{([^}]*)\}/g, o = [];
99
+ let c;
100
+ for (; (c = e.exec(t)) !== null; )
101
+ o.push(c[1]);
102
+ return [...new Set(o)];
103
+ }, ee = (t, e) => t.replace(/\$\{([^}]*)\}/g, (o, c) => e[c] !== void 0 ? e[c] : o), te = (t) => new Promise((e) => {
104
+ const o = u(
105
+ t.reduce((n, m) => (n[m] = "", n), {})
106
+ ), c = u({}), V = () => {
107
+ let n = !0;
108
+ const m = {};
109
+ return t.forEach((f) => {
110
+ var k;
111
+ (k = o.value[f]) != null && k.trim() || (m[f] = `请输入${f}的值`, n = !1);
112
+ }), c.value = m, n;
113
+ };
114
+ Ne({
115
+ title: "填写变量值用于接口测试",
116
+ message: S({
117
+ setup() {
118
+ return () => S("div", [
119
+ S(
120
+ Fe,
121
+ {
122
+ model: o.value
123
+ },
124
+ () => t.map(
125
+ (n) => S(
126
+ $e,
127
+ {
128
+ label: `${n}: `,
129
+ prop: n,
130
+ error: c.value[n],
131
+ "label-width": "90px"
132
+ },
133
+ () => S(j, {
134
+ modelValue: o.value[n],
135
+ "onUpdate:modelValue": (m) => {
136
+ o.value[n] = m, c.value[n] && delete c.value[n];
137
+ },
138
+ placeholder: `请输入 ${n} 的值`,
139
+ status: c.value[n] ? "error" : ""
140
+ })
141
+ )
142
+ )
143
+ )
144
+ ]);
145
+ }
146
+ }),
147
+ showCancelButton: !0,
148
+ confirmButtonText: "确定",
149
+ cancelButtonText: "取消",
150
+ customClass: "variable-input-dialog",
151
+ beforeClose: async (n, m, f) => {
152
+ n !== "confirm" && (e(!1), f()), await P(), V() && (e({ ...o.value }), f());
153
+ }
154
+ }).catch(() => e(!1));
155
+ }), oe = async () => {
98
156
  try {
99
- if (V.value = !0, s.funcExpression = p.value.getValue(), !s.funcName)
100
- return u.error("函数名称不可为空");
101
- if (!s.funcExpression)
102
- return u.error("函数内容不可为空");
103
- await x.post("/common/qt/saveOrUpdateSearchFunction", s), u.success("操作成功"), v.value = !1, await w();
157
+ I.value = !0;
158
+ let t = g.value.getValue();
159
+ if (!t)
160
+ return p.error("函数内容不可为空");
161
+ if (/\$\{[^}]*\}/.test(t)) {
162
+ const V = Z(t), b = await te(V);
163
+ if (!b)
164
+ return;
165
+ t = ee(t, b);
166
+ }
167
+ const { body: e } = await N.post("/common/qt/testFactorSelect", { factorSelectExpr: t }), { result: o, detail: c } = e;
168
+ Object.assign(_, { result: o, detail: c, code: t }), o === 1 ? p.success("测试通过") : (p.error("测试未能通过"), y.value = !0);
104
169
  } finally {
105
- V.value = !1;
170
+ I.value = !1;
106
171
  }
107
- }, $ = () => {
108
- if (!_.value)
109
- return u.error("请先选择自定义函数后, 再执行插入");
110
- const { funcName: a, funcExpression: e } = y.value.find((i) => i.funcName === _.value);
111
- U("insert", a, e);
112
- }, H = () => {
113
- C.value.open(p.value);
172
+ }, le = () => {
173
+ if (_.result === null)
174
+ return p.warning("请先进行测试, 等待测试完成后可查看日志");
175
+ y.value = !0;
176
+ }, ne = () => {
177
+ z.value.open(g.value);
114
178
  };
115
- return ue(() => {
116
- w();
117
- }), de(
118
- () => v.value,
119
- (a) => {
120
- switch (a) {
179
+ return _e(() => {
180
+ B();
181
+ }), ve(
182
+ () => E.value,
183
+ (t) => {
184
+ switch (t) {
121
185
  case !0: {
122
- fe(() => {
123
- var e, i;
124
- (e = p.value) == null || e.setValue(s.funcExpression), (i = p.value) == null || i.resize();
125
- }), Object.assign(d, {
186
+ P(() => {
187
+ var e, o;
188
+ (e = g.value) == null || e.setValue(r.funcExpression), (o = g.value) == null || o.resize();
189
+ }), Object.assign(_, {
126
190
  result: null,
127
191
  detail: ""
128
192
  });
129
193
  break;
130
194
  }
131
195
  case !1: {
132
- C.value.close();
196
+ z.value.close();
133
197
  break;
134
198
  }
135
199
  }
136
200
  }
137
- ), (a, e) => {
138
- const i = ke, J = ce, K = ae, Q = ie, f = se, X = ne, Y = B("st-monacoEditor"), D = le, I = Ve, Z = oe, ee = B("st-varSelectDialog");
139
- return z(), j("div", Se, [
140
- t(Q, {
141
- modelValue: _.value,
142
- "onUpdate:modelValue": e[0] || (e[0] = (l) => _.value = l),
143
- size: c.size,
201
+ ), (t, e) => {
202
+ const o = Se, c = fe, V = de, b = me, n = ue, m = j, f = W("st-monacoEditor"), k = re, R = De, se = ce, ae = W("st-varSelectDialog");
203
+ return T(), A("div", Ie, [
204
+ l(b, {
205
+ modelValue: h.value,
206
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => h.value = a),
207
+ size: d.size,
144
208
  placeholder: "自定义函数",
145
209
  "no-match-text": "无匹配选项",
146
210
  "no-data-text": "无选项数据",
147
211
  clearable: "",
148
212
  filterable: "",
149
- onChange: L,
150
- style: me({ width: c.selectWidth })
213
+ onChange: Q,
214
+ style: ge({ width: d.selectWidth })
151
215
  }, {
152
- default: o(() => [
153
- (z(!0), j(pe, null, _e(y.value, (l) => (z(), ve(K, {
154
- key: l.id,
155
- label: l.funcName,
156
- value: l.funcName,
157
- onClick: $
216
+ default: s(() => [
217
+ (T(!0), A(he, null, Ee(w.value, (a) => (T(), ye(V, {
218
+ key: a.id,
219
+ label: a.funcName,
220
+ value: a.funcName,
221
+ onClick: U
158
222
  }, {
159
- default: o(() => [
160
- n("div", we, [
161
- n("span", null, k(l.funcName), 1),
162
- n("div", Ne, [
163
- t(i, {
164
- onClick: F((h) => N(l, !0), ["stop"])
223
+ default: s(() => [
224
+ i("div", Be, [
225
+ i("span", null, $(a.funcName), 1),
226
+ i("div", Oe, [
227
+ l(o, {
228
+ onClick: q((x) => O(a, !0), ["stop"])
165
229
  }, {
166
- default: o(() => [
167
- t(E(Ee))
230
+ default: s(() => [
231
+ l(C(we))
168
232
  ]),
169
233
  _: 2
170
234
  }, 1032, ["onClick"]),
171
- t(i, {
172
- onClick: F((h) => N(l), ["stop"])
235
+ l(o, {
236
+ onClick: q((x) => O(a), ["stop"])
173
237
  }, {
174
- default: o(() => [
175
- t(E(ye))
238
+ default: s(() => [
239
+ l(C(Ve))
176
240
  ]),
177
241
  _: 2
178
242
  }, 1032, ["onClick"]),
179
- t(J, {
243
+ l(c, {
180
244
  title: "确认是否删除?",
181
245
  "confirm-button-text": "确认",
182
246
  "cancel-button-text": "取消",
183
- onConfirm: (h) => W(l)
247
+ onConfirm: (x) => X(a)
184
248
  }, {
185
- reference: o(() => [
186
- t(i, {
187
- onClick: F(() => {
249
+ reference: s(() => [
250
+ l(o, {
251
+ onClick: q(() => {
188
252
  }, ["stop"])
189
253
  }, {
190
- default: o(() => [
191
- t(E(xe))
254
+ default: s(() => [
255
+ l(C(be))
192
256
  ]),
193
257
  _: 1
194
258
  })
@@ -203,30 +267,30 @@ const R = (c) => (ge("data-v-0a65deeb"), c = c(), he(), c), Se = { class: "custo
203
267
  ]),
204
268
  _: 1
205
269
  }, 8, ["modelValue", "size", "style"]),
206
- t(f, {
270
+ l(n, {
207
271
  type: "primary",
208
- size: c.size,
209
- onClick: $
272
+ size: d.size,
273
+ onClick: U
210
274
  }, {
211
- default: o(() => [
212
- m(" 插入 ")
275
+ default: s(() => [
276
+ v(" 插入 ")
213
277
  ]),
214
278
  _: 1
215
279
  }, 8, ["size"]),
216
- t(f, {
280
+ l(n, {
217
281
  type: "primary",
218
- size: c.size,
219
- onClick: e[1] || (e[1] = (l) => N())
282
+ size: d.size,
283
+ onClick: e[1] || (e[1] = (a) => O())
220
284
  }, {
221
- default: o(() => [
222
- m(" 新建 ")
285
+ default: s(() => [
286
+ v(" 新建 ")
223
287
  ]),
224
288
  _: 1
225
289
  }, 8, ["size"]),
226
- t(D, {
290
+ l(k, {
227
291
  "modal-class": "add-or-edit-dialog",
228
- modelValue: v.value,
229
- "onUpdate:modelValue": e[4] || (e[4] = (l) => v.value = l),
292
+ modelValue: E.value,
293
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => E.value = a),
230
294
  width: "1000",
231
295
  "align-center": "",
232
296
  "append-to-body": "",
@@ -236,95 +300,95 @@ const R = (c) => (ge("data-v-0a65deeb"), c = c(), he(), c), Se = { class: "custo
236
300
  "modal-penetrable": !0,
237
301
  "show-close": !1
238
302
  }, {
239
- header: o(({ titleId: l, titleClass: h }) => [
240
- n("div", ze, [
241
- n("div", Fe, [
242
- n("span", {
243
- id: l,
244
- class: O(h)
245
- }, k(s.id ? "编辑自定义函数" : "新建自定义函数"), 11, Oe)
303
+ header: s(({ titleId: a, titleClass: x }) => [
304
+ i("div", Te, [
305
+ i("div", qe, [
306
+ i("span", {
307
+ id: a,
308
+ class: M(x)
309
+ }, $(r.id ? "编辑自定义函数" : "新建自定义函数"), 11, Me)
246
310
  ]),
247
- n("div", $e, [
248
- t(f, {
311
+ i("div", Ue, [
312
+ l(n, {
249
313
  size: "small",
250
314
  type: "primary",
251
- onClick: H
315
+ onClick: ne
252
316
  }, {
253
- default: o(() => [
254
- m(" 变量选择器 ")
317
+ default: s(() => [
318
+ v(" 变量选择器 ")
255
319
  ]),
256
320
  _: 1
257
321
  }),
258
- t(i, {
259
- onClick: e[2] || (e[2] = (te) => v.value = !1)
322
+ l(o, {
323
+ onClick: e[2] || (e[2] = (ie) => E.value = !1)
260
324
  }, {
261
- default: o(() => [
262
- t(E(M))
325
+ default: s(() => [
326
+ l(C(G))
263
327
  ]),
264
328
  _: 1
265
329
  })
266
330
  ])
267
331
  ])
268
332
  ]),
269
- footer: o(() => [
270
- n("div", Me, [
271
- t(f, {
333
+ footer: s(() => [
334
+ i("div", Ae, [
335
+ l(n, {
272
336
  type: "primary",
273
- loading: V.value,
274
- onClick: G
337
+ loading: D.value,
338
+ onClick: Y
275
339
  }, {
276
- default: o(() => [
277
- m(" 确定 ")
340
+ default: s(() => [
341
+ v(" 确定 ")
278
342
  ]),
279
343
  _: 1
280
344
  }, 8, ["loading"])
281
345
  ])
282
346
  ]),
283
- default: o(() => [
284
- n("div", De, [
285
- n("div", Ie, [
286
- qe,
287
- t(X, {
288
- modelValue: s.funcName,
289
- "onUpdate:modelValue": e[3] || (e[3] = (l) => s.funcName = l)
347
+ default: s(() => [
348
+ i("div", Re, [
349
+ i("div", je, [
350
+ Le,
351
+ l(m, {
352
+ modelValue: r.funcName,
353
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => r.funcName = a)
290
354
  }, null, 8, ["modelValue"])
291
355
  ]),
292
- n("div", Be, [
293
- t(f, {
356
+ i("div", Pe, [
357
+ l(n, {
294
358
  type: "primary",
295
- loading: S.value,
296
- onClick: A
359
+ loading: I.value,
360
+ onClick: oe
297
361
  }, {
298
- default: o(() => [
299
- m(" 测试 ")
362
+ default: s(() => [
363
+ v(" 测试 ")
300
364
  ]),
301
365
  _: 1
302
366
  }, 8, ["loading"]),
303
- t(f, {
304
- icon: E(be),
305
- onClick: P
367
+ l(n, {
368
+ icon: C(ke),
369
+ onClick: le
306
370
  }, {
307
- default: o(() => [
308
- m(" 日志明细 ")
371
+ default: s(() => [
372
+ v(" 日志明细 ")
309
373
  ]),
310
374
  _: 1
311
375
  }, 8, ["icon"])
312
376
  ])
313
377
  ]),
314
- je,
315
- t(Y, {
378
+ We,
379
+ l(f, {
316
380
  ref_key: "stMonacoEditorRef",
317
- ref: p,
381
+ ref: g,
318
382
  language: "lua",
319
383
  style: { width: "968px", height: "400px" }
320
384
  }, null, 512)
321
385
  ]),
322
386
  _: 1
323
387
  }, 8, ["modelValue"]),
324
- t(D, {
388
+ l(k, {
325
389
  "modal-class": "log-dialog",
326
- modelValue: g.value,
327
- "onUpdate:modelValue": e[7] || (e[7] = (l) => g.value = l),
390
+ modelValue: y.value,
391
+ "onUpdate:modelValue": e[7] || (e[7] = (a) => y.value = a),
328
392
  width: "830",
329
393
  "align-center": "",
330
394
  "append-to-body": "",
@@ -334,55 +398,55 @@ const R = (c) => (ge("data-v-0a65deeb"), c = c(), he(), c), Se = { class: "custo
334
398
  "modal-penetrable": !0,
335
399
  "show-close": !1
336
400
  }, {
337
- header: o(({ titleId: l, titleClass: h }) => [
338
- n("div", Re, [
339
- n("div", Te, [
340
- n("span", {
341
- id: l,
342
- class: O(h)
343
- }, " 日志明细 ", 10, Ue)
401
+ header: s(({ titleId: a, titleClass: x }) => [
402
+ i("div", Ge, [
403
+ i("div", He, [
404
+ i("span", {
405
+ id: a,
406
+ class: M(x)
407
+ }, " 日志明细 ", 10, Je)
344
408
  ]),
345
- n("div", Le, [
346
- t(i, {
347
- onClick: e[5] || (e[5] = (te) => g.value = !1)
409
+ i("div", Ke, [
410
+ l(o, {
411
+ onClick: e[5] || (e[5] = (ie) => y.value = !1)
348
412
  }, {
349
- default: o(() => [
350
- t(E(M))
413
+ default: s(() => [
414
+ l(C(G))
351
415
  ]),
352
416
  _: 1
353
417
  })
354
418
  ])
355
419
  ])
356
420
  ]),
357
- footer: o(() => [
358
- n("div", Ae, [
359
- t(f, {
360
- onClick: e[6] || (e[6] = (l) => g.value = !1)
421
+ footer: s(() => [
422
+ i("div", Xe, [
423
+ l(n, {
424
+ onClick: e[6] || (e[6] = (a) => y.value = !1)
361
425
  }, {
362
- default: o(() => [
363
- m(" 关闭 ")
426
+ default: s(() => [
427
+ v(" 关闭 ")
364
428
  ]),
365
429
  _: 1
366
430
  })
367
431
  ])
368
432
  ]),
369
- default: o(() => [
370
- n("div", We, [
371
- t(I, {
433
+ default: s(() => [
434
+ i("div", Qe, [
435
+ l(R, {
372
436
  class: "code",
373
437
  height: "600px"
374
438
  }, {
375
- default: o(() => [
376
- n("pre", null, k(d.code), 1)
439
+ default: s(() => [
440
+ i("pre", null, $(_.code), 1)
377
441
  ]),
378
442
  _: 1
379
443
  }),
380
- t(Z, { direction: "vertical" }),
381
- t(I, { height: "600px" }, {
382
- default: o(() => [
383
- n("pre", {
384
- class: O(d.result === 1 ? "success-log" : "error-log")
385
- }, k(d.result === 1 ? "测试通过 √" : d.detail), 3)
444
+ l(se, { direction: "vertical" }),
445
+ l(R, { height: "600px" }, {
446
+ default: s(() => [
447
+ i("pre", {
448
+ class: M(_.result === 1 ? "success-log" : "error-log")
449
+ }, $(_.result === 1 ? "测试通过 √" : _.detail), 3)
386
450
  ]),
387
451
  _: 1
388
452
  })
@@ -390,18 +454,18 @@ const R = (c) => (ge("data-v-0a65deeb"), c = c(), he(), c), Se = { class: "custo
390
454
  ]),
391
455
  _: 1
392
456
  }, 8, ["modelValue"]),
393
- t(ee, {
457
+ l(ae, {
394
458
  ref_key: "stVarSelectDialogRef",
395
- ref: C
459
+ ref: z
396
460
  }, null, 512)
397
461
  ]);
398
462
  };
399
463
  }
400
- }, Ge = /* @__PURE__ */ Ce(Pe, [["__scopeId", "data-v-0a65deeb"]]), Vt = {
401
- install(c) {
402
- c.component("st-customFunction", Ge);
464
+ }, Ze = /* @__PURE__ */ ze(Ye, [["__scopeId", "data-v-ff7c4544"]]), Dt = {
465
+ install(d) {
466
+ d.component("st-customFunction", Ze);
403
467
  }
404
468
  };
405
469
  export {
406
- Vt as default
470
+ Dt as default
407
471
  };