st-comp 0.0.260 → 0.0.262

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 (89) hide show
  1. package/es/ChartLayout.js +4 -4
  2. package/es/CustomFunction.js +31 -31
  3. package/es/FactorWarning.cjs +1 -1
  4. package/es/FactorWarning.js +36 -37
  5. package/es/Kline.cjs +1 -1
  6. package/es/Kline.js +1593 -839
  7. package/es/KlineBasic.cjs +1 -1
  8. package/es/KlineBasic.js +1 -1197
  9. package/es/KlineConfig.js +89 -89
  10. package/es/KlineNew.js +17 -17
  11. package/es/KlinePlus.js +20 -20
  12. package/es/MonacoEditor.js +25 -25
  13. package/es/Pagination.js +113 -113
  14. package/es/PasswordPrompt.js +3 -3
  15. package/es/Table.js +29 -29
  16. package/es/User.js +25 -25
  17. package/es/VarSelectDialog.cjs +1 -1
  18. package/es/VarSelectDialog.js +27 -27
  19. package/es/VarietyAiHelper.cjs +3 -5
  20. package/es/VarietyAiHelper.js +244 -330
  21. package/es/VarietyAutoComplete.js +11 -11
  22. package/es/VarietySearch.cjs +18 -19
  23. package/es/VarietySearch.js +1169 -1205
  24. package/es/{VarietySelect-9f267958.js → VarietySelect-faef4799.js} +4 -4
  25. package/es/VarietyTextCopy.js +13 -13
  26. package/es/VirtualTable.js +74 -74
  27. package/es/{_initCloneObject-69c8ae23.js → _initCloneObject-009eedf8.js} +7 -7
  28. package/es/aiTools-2e1f92d2.cjs +3 -0
  29. package/es/aiTools-faa0a14d.js +90 -0
  30. package/es/{base-29f73b05.js → base-7ff209fc.js} +40 -40
  31. package/es/{castArray-609a313e.js → castArray-b9f1609f.js} +1 -1
  32. package/es/{config-provider-7860903c.js → config-provider-071b8bec.js} +6 -6
  33. package/es/{debounce-a09ce9a3.js → debounce-23c2f7e1.js} +1 -1
  34. package/es/{dropdown-497442b7.js → dropdown-9941f401.js} +4 -4
  35. package/es/{el-autocomplete-27c60cc8.js → el-autocomplete-43f205b0.js} +17 -17
  36. package/es/{el-button-e2c63c08.js → el-button-7f58608d.js} +33 -33
  37. package/es/{el-checkbox-71ebd862.js → el-checkbox-40664b27.js} +17 -17
  38. package/es/{el-input-number-c8018cb1.js → el-checkbox-group-3ddad0d7.js} +34 -34
  39. package/es/{el-input-number-3d94fa58.cjs → el-checkbox-group-f775e73f.cjs} +1 -1
  40. package/es/{el-dialog-eedcfd3e.js → el-dialog-2f10a2f4.js} +15 -15
  41. package/es/{el-divider-523e5874.js → el-divider-4e66c835.js} +1 -1
  42. package/es/{el-empty-f5a1607a.js → el-empty-e0d826de.js} +5 -5
  43. package/es/{el-form-item-bdcfd297.js → el-form-item-2b68cdf5.js} +36 -36
  44. package/es/{el-input-d47281da.js → el-input-31a818d4.js} +36 -36
  45. package/es/{el-loading-0cd81d05.js → el-loading-3e350f5e.js} +5 -5
  46. package/es/{el-message-box-fea4fca8.js → el-message-box-a3aa9b89.js} +11 -11
  47. package/es/{el-overlay-1ee0338d.js → el-overlay-4e9a99e0.js} +59 -59
  48. package/es/{el-popconfirm-089b8bec.js → el-popconfirm-c2896741.js} +12 -12
  49. package/es/{el-popper-c9b3d3cf.js → el-popper-003b3af7.js} +177 -177
  50. package/es/{el-segmented-9d3a9e11.js → el-segmented-4ae54e6a.js} +8 -8
  51. package/es/{el-select-e51e11c1.js → el-select-19ee0e79.js} +65 -65
  52. package/es/{el-table-column-05d292a8.js → el-table-column-3be856d7.js} +16 -16
  53. package/es/{el-tag-17cd04a1.js → el-tag-19cc5b59.js} +14 -14
  54. package/es/{el-text-2710fff3.js → el-text-9a7a4f0f.js} +2 -2
  55. package/es/{index-0f79095c.js → index-19ac550e.js} +49 -49
  56. package/es/{index-1d9b50de.js → index-308aab33.js} +34 -34
  57. package/es/{index-8a54ceeb.js → index-41dd5a1c.js} +10 -10
  58. package/es/{index-0ee486ad.js → index-6917da9d.js} +43 -43
  59. package/es/{index-bcd895a0.js → index-6d530e54.js} +13 -13
  60. package/es/{index-c71e37dc.js → index-808db9b4.js} +11 -11
  61. package/es/{index-f30561d3.js → index-99abf4ff.js} +17 -17
  62. package/es/{index-95e5d454.js → index-b56d81e8.js} +3 -3
  63. package/es/{index-8391a3df.js → index-d898531c.js} +37 -37
  64. package/es/{index-c2b9bbfd.js → index-e17987ac.js} +30 -30
  65. package/es/{index-b0117ba2.js → index-f3799536.js} +2 -2
  66. package/es/{index-de24705f.js → index-f402d1da.js} +1 -1
  67. package/es/{python-99011a53.js → python-be79c7c1.js} +25 -25
  68. package/es/raf-ba3dfafe.js +6 -0
  69. package/es/{scroll-6799bafc.js → scroll-8642151c.js} +5 -5
  70. package/es/style.css +1 -1
  71. package/es/{use-form-common-props-cb0ca65c.js → use-form-common-props-d170ccfd.js} +72 -72
  72. package/es/{use-global-config-cdaeca54.js → use-global-config-74436b92.js} +14 -14
  73. package/es/{validator-4ab9774f.js → validator-672bad4a.js} +1 -1
  74. package/es/{vnode-a83e6de8.js → vnode-6d2615f0.js} +1 -1
  75. package/es/{zh-cn-8a6390a4.js → zh-cn-ed10eeb1.js} +2 -2
  76. package/lib/bundle.js +1 -1
  77. package/lib/bundle.umd.cjs +150 -151
  78. package/lib/{index-107e931f.js → index-c3ddbee7.js} +7463 -7499
  79. package/lib/{python-5735efdf.js → python-da8fd227.js} +1 -1
  80. package/lib/style.css +1 -1
  81. package/package.json +1 -1
  82. package/packages/VarietyAiHelper/index.vue +3 -3
  83. package/packages/VarietySearch/components/FactorScreen/index.vue +20 -7
  84. package/packages/VarietySearch/components/FactorScreen/tools.js +0 -41
  85. package/es/el-checkbox-group-0ea8fbf8.cjs +0 -1
  86. package/es/el-checkbox-group-4ed993c7.js +0 -1
  87. package/es/el-menu-item-26071fd6.cjs +0 -1
  88. package/es/el-menu-item-dac65bb3.js +0 -769
  89. package/es/raf-744cf95a.js +0 -6
package/es/Table.js CHANGED
@@ -1,33 +1,33 @@
1
- import "./base-29f73b05.js";
2
- import { v as L } from "./el-loading-0cd81d05.js";
3
- import { z as N, E as P } from "./zh-cn-8a6390a4.js";
4
- import { E as V, a as D } from "./el-table-column-05d292a8.js";
5
- import "./el-checkbox-71ebd862.js";
1
+ import "./base-7ff209fc.js";
2
+ import { v as L } from "./el-loading-3e350f5e.js";
3
+ import { z as N, E as P } from "./zh-cn-ed10eeb1.js";
4
+ import { E as V, a as D } from "./el-table-column-3be856d7.js";
5
+ import "./el-checkbox-40664b27.js";
6
6
  import "./el-tooltip-4ed993c7.js";
7
- import "./el-popper-c9b3d3cf.js";
7
+ import "./el-popper-003b3af7.js";
8
8
  import "./el-scrollbar-323542e7.js";
9
- import "./el-tag-17cd04a1.js";
9
+ import "./el-tag-19cc5b59.js";
10
10
  import "./el-popover-4ed993c7.js";
11
- import { defineComponent as C, computed as j, openBlock as t, createElementBlock as l, Fragment as c, createBlock as d, withCtx as n, createVNode as f, normalizeStyle as b, createTextVNode as E, toDisplayString as k, unref as S, withDirectives as W, renderList as g, createSlots as F, renderSlot as G, createCommentVNode as H } from "vue";
12
- import { j as I, E as J } from "./index-c2b9bbfd.js";
13
- import { E as K } from "./el-popconfirm-089b8bec.js";
14
- import { E as Q } from "./el-button-e2c63c08.js";
15
- import { E as R } from "./index-bcd895a0.js";
16
- import "./use-global-config-cdaeca54.js";
17
- import "./use-form-common-props-cb0ca65c.js";
18
- import "./index-8391a3df.js";
19
- import "./index-de24705f.js";
20
- import "./index-0ee486ad.js";
21
- import "./config-provider-7860903c.js";
22
- import "./index-1d9b50de.js";
23
- import "./index-0f79095c.js";
24
- import "./_initCloneObject-69c8ae23.js";
25
- import "./castArray-609a313e.js";
26
- import "./debounce-a09ce9a3.js";
27
- import "./raf-744cf95a.js";
11
+ import { defineComponent as C, computed as M, openBlock as t, createElementBlock as l, Fragment as c, createBlock as d, withCtx as n, createVNode as f, normalizeStyle as b, createTextVNode as E, toDisplayString as k, unref as S, withDirectives as W, renderList as g, createSlots as F, renderSlot as G, createCommentVNode as H } from "vue";
12
+ import { m as I, E as J } from "./index-e17987ac.js";
13
+ import { E as K } from "./el-popconfirm-c2896741.js";
14
+ import { E as Q } from "./el-button-7f58608d.js";
15
+ import { E as R } from "./index-6d530e54.js";
16
+ import "./use-global-config-74436b92.js";
17
+ import "./use-form-common-props-d170ccfd.js";
18
+ import "./index-d898531c.js";
19
+ import "./index-f402d1da.js";
20
+ import "./index-6917da9d.js";
21
+ import "./config-provider-071b8bec.js";
22
+ import "./index-308aab33.js";
23
+ import "./index-19ac550e.js";
24
+ import "./_initCloneObject-009eedf8.js";
25
+ import "./castArray-b9f1609f.js";
26
+ import "./debounce-23c2f7e1.js";
27
+ import "./raf-ba3dfafe.js";
28
28
  import "./index-2e331d74.js";
29
29
  import "./index-657047bb.js";
30
- import "./dropdown-497442b7.js";
30
+ import "./dropdown-9941f401.js";
31
31
  const T = /* @__PURE__ */ C({
32
32
  __name: "index",
33
33
  props: {
@@ -45,7 +45,7 @@ const T = /* @__PURE__ */ C({
45
45
  }
46
46
  },
47
47
  setup(e) {
48
- const u = e, y = j(() => {
48
+ const u = e, y = M(() => {
49
49
  const { option: p, scope: i } = u;
50
50
  return typeof p.show == "function" ? p.show(i.row, i.$index) : p.show !== !1;
51
51
  });
@@ -124,11 +124,11 @@ const T = /* @__PURE__ */ C({
124
124
  },
125
125
  emits: ["sortChange"],
126
126
  setup(e, { emit: u }) {
127
- const y = u, p = e, i = j(() => p.column.filter((r) => r.show !== !1)), w = (r) => {
127
+ const y = u, p = e, i = M(() => p.column.filter((r) => r.show !== !1)), w = (r) => {
128
128
  y("sortChange", r);
129
129
  }, h = (r, x) => r.filter((s) => typeof s.show == "function" && s.show(x.row, x.$index) === !1 ? !1 : s.show !== !1);
130
130
  return (r, x) => {
131
- const s = J, M = R, q = V, z = D, B = P, O = L;
131
+ const s = J, j = R, q = V, z = D, B = P, O = L;
132
132
  return t(), d(B, { locale: S(N) }, {
133
133
  default: n(() => [
134
134
  W((t(), d(z, {
@@ -171,7 +171,7 @@ const T = /* @__PURE__ */ C({
171
171
  key: `${m.text}-${A}`
172
172
  }, [
173
173
  m.children ? (t(), l(c, { key: 0 }, [
174
- h(m.children, a).length ? (t(), d(M, {
174
+ h(m.children, a).length ? (t(), d(j, {
175
175
  key: 0,
176
176
  placement: "bottom",
177
177
  trigger: "hover",
package/es/User.js CHANGED
@@ -1,36 +1,36 @@
1
- import { b as Be, e as ie, _ as L, u as ue, n as Me, w as Ae, l as Ee } from "./base-29f73b05.js";
2
- import { E as J } from "./el-button-e2c63c08.js";
3
- import { c as V, E as Ue, O as Ge, w as be } from "./el-popper-c9b3d3cf.js";
1
+ import { b as Be, d as ie, _ as L, u as ue, j as Me, w as Ae, B as Ee } from "./base-7ff209fc.js";
2
+ import { E as J } from "./el-button-7f58608d.js";
3
+ import { c as V, E as Ue, O as Ge, w as be } from "./el-popper-003b3af7.js";
4
4
  import "./el-scrollbar-323542e7.js";
5
5
  import { defineComponent as z, ref as y, inject as P, computed as T, provide as Q, readonly as Le, toRef as W, unref as h, watch as ze, renderSlot as K, resolveComponent as R, openBlock as C, createBlock as D, withCtx as l, createVNode as t, normalizeProps as qe, guardReactiveProps as Ye, getCurrentInstance as Ce, createElementBlock as M, normalizeClass as X, createSlots as He, mergeProps as ee, createCommentVNode as oe, nextTick as de, Fragment as Pe, createElementVNode as ne, withModifiers as H, resolveDynamicComponent as Je, normalizeStyle as je, reactive as A, createTextVNode as k, toDisplayString as Z, withKeys as Fe } from "vue";
6
- import { E as ce, f as $e, u as We, r as Ze } from "./index-c2b9bbfd.js";
6
+ import { E as ce, g as $e, u as We, B as Ze } from "./index-e17987ac.js";
7
7
  import { R as pe, V as Qe, A as Xe, K as xe } from "./index-7ed0999e.js";
8
- import { c as he, E as te } from "./el-dialog-eedcfd3e.js";
9
- import "./el-overlay-1ee0338d.js";
10
- import { a as le, E as re } from "./el-form-item-bdcfd297.js";
11
- import { E as se } from "./el-input-d47281da.js";
12
- import { E as Re } from "./el-text-2710fff3.js";
8
+ import { c as he, E as te } from "./el-dialog-2f10a2f4.js";
9
+ import "./el-overlay-4e9a99e0.js";
10
+ import { E as le, a as re } from "./el-form-item-2b68cdf5.js";
11
+ import { E as se } from "./el-input-31a818d4.js";
12
+ import { E as Re } from "./el-text-9a7a4f0f.js";
13
13
  import "./el-message-4ed993c7.js";
14
14
  import { _ as me } from "./_plugin-vue_export-helper-dad06003.js";
15
- import { E as Y } from "./index-f30561d3.js";
16
- import { P as ke } from "./index-b0117ba2.js";
17
- import { E as eo } from "./index-1d9b50de.js";
18
- import { c as oo, e as no } from "./use-form-common-props-cb0ca65c.js";
19
- import { c as to, E as lo, d as ro, a as Te, C as so, b as ao, e as io, f as uo, g as co, F as po, L as mo } from "./dropdown-497442b7.js";
20
- import { E as S, F as fo } from "./index-0f79095c.js";
21
- import { u as vo } from "./index-de24705f.js";
22
- import { u as Se } from "./index-8391a3df.js";
23
- import { c as _o } from "./castArray-609a313e.js";
15
+ import { E as Y } from "./index-99abf4ff.js";
16
+ import { P as ke } from "./index-f3799536.js";
17
+ import { E as eo } from "./index-308aab33.js";
18
+ import { b as oo, a as no } from "./use-form-common-props-d170ccfd.js";
19
+ import { c as to, E as lo, d as ro, a as Te, C as so, b as ao, e as io, f as uo, g as co, F as po, L as mo } from "./dropdown-9941f401.js";
20
+ import { a as S, F as fo } from "./index-19ac550e.js";
21
+ import { u as vo } from "./index-f402d1da.js";
22
+ import { u as Se } from "./index-d898531c.js";
23
+ import { c as _o } from "./castArray-b9f1609f.js";
24
24
  import "./index-2e331d74.js";
25
- import "./use-global-config-cdaeca54.js";
26
- import "./index-0ee486ad.js";
25
+ import "./use-global-config-74436b92.js";
26
+ import "./index-6917da9d.js";
27
27
  import "./index-657047bb.js";
28
- import "./vnode-a83e6de8.js";
29
- import "./scroll-6799bafc.js";
30
- import "./_initCloneObject-69c8ae23.js";
28
+ import "./vnode-6d2615f0.js";
29
+ import "./scroll-8642151c.js";
30
+ import "./_initCloneObject-009eedf8.js";
31
31
  import "./typescript-7ae59c4c.js";
32
- import "./index-c71e37dc.js";
33
- import "./config-provider-7860903c.js";
32
+ import "./index-808db9b4.js";
33
+ import "./config-provider-071b8bec.js";
34
34
  const wo = Be({
35
35
  style: { type: ie([String, Array, Object]) },
36
36
  currentTabId: {
@@ -1,3 +1,3 @@
1
- "use strict";require("./base-ef747d02.cjs");const I=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");require("./el-tooltip-0ea8fbf8.cjs");const L=require("./el-popper-2d3914e4.cjs"),D=require("./el-button-974ff9e9.cjs"),$=require("./el-input-fa18ef84.cjs");require("./el-tag-6d8e653e.cjs");const B=require("./el-select-a11f33e8.cjs");require("./el-scrollbar-bc3f790d.cjs");const e=require("vue"),x=require("./index-33f80550.cjs"),F=require("./VarietySelect-5c845562.cjs");require("./el-message-0ea8fbf8.cjs");const U=require("./_plugin-vue_export-helper-f246444f.cjs"),N=require("./index-6ca95c8a.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./use-form-common-props-d3ed62c6.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./index-e8eeea22.cjs");require("./index-6b99def3.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");require("./el-autocomplete-b59eb529.cjs");require("./index-8901a38c.cjs");require("./config-provider-2ae47cc8.cjs");const z=m=>(e.pushScopeId("data-v-e4f6c06a"),m=m(),e.popScopeId(),m),T={class:"custom-header"},j={class:"left"},M=z(()=>e.createElementVNode("span",null," 选择变量 ",-1)),P={class:"right"},A={class:"custom-body"},O={class:"config-list"},H={class:"config-item"},R={key:0},G={key:0},J={key:1},K={key:0},Q={style:{"max-width":"820px"}},W={style:{"white-space":"pre-line"}},X={__name:"index",props:{useCase:{type:String,default:"1"}},setup(m,{expose:C}){const E=e.inject("stConfig"),g=m,_=e.ref(null),V=e.ref(!1),f=e.ref(null),h=e.ref([]),q=e.computed(()=>{var r;return((r=h.value.find(n=>n.varName===f.value))==null?void 0:r.formatList)??[]}),b=r=>r.replace(/^\[|\]$/g,"").split("],[").map(c=>{const s=c.replace(/\[|\]/g,""),[k,u]=s.split(",");return{label:k.trim(),value:u.trim()}}),S=r=>{const n=[];for(let i=0;i<r.length;i++){const o=r[i];switch(console.log(o),o.vtype){case"text":{n.push(o.param);break}default:{if(!o.modelValue)return N.ElMessage.error("请检查插入格式内是否填写完整");let t=o.modelValue;o.prefix&&(t=`${o.prefix}${t}`),o.suffix&&(t=`${t}${o.suffix}`),n.push(t);break}}}if(!_.value)return N.ElMessage.error("未检测到编辑器实例");const v=n.join("_"),c=_.value.getInstance(),s=c.getPosition(),u=_.value.getValue().split(`
1
+ "use strict";require("./base-ef747d02.cjs");const I=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");require("./el-tooltip-0ea8fbf8.cjs");const L=require("./el-popper-2d3914e4.cjs"),D=require("./el-button-974ff9e9.cjs"),$=require("./el-input-fa18ef84.cjs");require("./el-tag-6d8e653e.cjs");const B=require("./el-select-a11f33e8.cjs");require("./el-scrollbar-bc3f790d.cjs");const e=require("vue"),x=require("./index-33f80550.cjs"),F=require("./VarietySelect-5c845562.cjs"),U=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-message-0ea8fbf8.cjs");const N=require("./index-6ca95c8a.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./use-form-common-props-d3ed62c6.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./index-e8eeea22.cjs");require("./index-6b99def3.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");require("./el-autocomplete-b59eb529.cjs");require("./index-8901a38c.cjs");require("./config-provider-2ae47cc8.cjs");const z=m=>(e.pushScopeId("data-v-e4f6c06a"),m=m(),e.popScopeId(),m),T={class:"custom-header"},j={class:"left"},M=z(()=>e.createElementVNode("span",null," 选择变量 ",-1)),P={class:"right"},A={class:"custom-body"},O={class:"config-list"},H={class:"config-item"},R={key:0},G={key:0},J={key:1},K={key:0},Q={style:{"max-width":"820px"}},W={style:{"white-space":"pre-line"}},X={__name:"index",props:{useCase:{type:String,default:"1"}},setup(m,{expose:C}){const E=e.inject("stConfig"),g=m,_=e.ref(null),V=e.ref(!1),f=e.ref(null),h=e.ref([]),q=e.computed(()=>{var r;return((r=h.value.find(n=>n.varName===f.value))==null?void 0:r.formatList)??[]}),b=r=>r.replace(/^\[|\]$/g,"").split("],[").map(c=>{const s=c.replace(/\[|\]/g,""),[k,u]=s.split(",");return{label:k.trim(),value:u.trim()}}),S=r=>{const n=[];for(let i=0;i<r.length;i++){const o=r[i];switch(console.log(o),o.vtype){case"text":{n.push(o.param);break}default:{if(!o.modelValue)return N.ElMessage.error("请检查插入格式内是否填写完整");let t=o.modelValue;o.prefix&&(t=`${o.prefix}${t}`),o.suffix&&(t=`${t}${o.suffix}`),n.push(t);break}}}if(!_.value)return N.ElMessage.error("未检测到编辑器实例");const v=n.join("_"),c=_.value.getInstance(),s=c.getPosition(),u=_.value.getValue().split(`
2
2
  `);if(s.lineNumber<=u.length){const i=s.lineNumber-1,o=u[i],t=s.column-1,d=t>0?o[t-1]:"",l=t<o.length?o[t]:"";let p=v;d&&d!==" "&&!/[\s({[ ]/.test(d)&&(p=" "+p),l&&l!==" "&&!/[\s)}\]]/.test(l)&&(p=p+" ");const a=o.substring(0,t)+p+o.substring(t);u[i]=a;const y=u.join(`
3
3
  `);_.value.setValue(y);const w=s.column+p.length;c.setPosition({lineNumber:s.lineNumber,column:w}),c.focus()}};return e.onMounted(async()=>{const{body:r}=await E.request.post("/common/conf/queryAllBackVariables",{useCase:g.useCase});h.value=r??[]}),C({open:r=>{_.value=r,V.value=!0},close:()=>{V.value=!1}}),(r,n)=>{const v=B.ElOption,c=B.ElSelect,s=x.ElIcon,k=$.ElInput,u=D.ElButton,i=L.ElTooltip,o=I.ElDialog;return e.openBlock(),e.createBlock(o,{"modal-class":"var-select-dialog",modelValue:V.value,"onUpdate:modelValue":n[2]||(n[2]=t=>V.value=t),"align-center":"","append-to-body":"","destroy-on-close":"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0,"show-close":!1},{header:e.withCtx(()=>[e.createElementVNode("div",T,[e.createElementVNode("div",j,[M,e.createVNode(c,{modelValue:f.value,"onUpdate:modelValue":n[0]||(n[0]=t=>f.value=t),placeholder:"选择变量",filterable:"",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(t,d)=>(e.openBlock(),e.createBlock(v,{key:d,label:t.varName,value:t.varName},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",P,[e.createVNode(s,{class:"el-icon--left",onClick:n[1]||(n[1]=t=>V.value=!1)},{default:e.withCtx(()=>[e.createVNode(e.unref(x.close_default))]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",A,[q.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(q.value,(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:"format-item",key:d},[e.createElementVNode("span",null,"格式"+e.toDisplayString(d+1)+":",1),e.createElementVNode("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.configList,(l,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",H,[l.vtype==="text"?(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString(l.param),1)):e.createCommentVNode("",!0),l.vtype==="inputVariety"?(e.openBlock(),e.createBlock(F.VarietySelect,{key:1,size:"small",placeholder:l.param,selectClearEnable:!1,labelShowEnable:!1,onSelect:({name:a,code:y})=>l.modelValue=y,onChange:a=>l.modelValue=a,style:{width:"100px"}},null,8,["placeholder","onSelect","onChange"])):e.createCommentVNode("",!0),l.vtype==="input"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.prefix?(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(l.prefix),1)):e.createCommentVNode("",!0),e.createVNode(k,{modelValue:l.modelValue,"onUpdate:modelValue":a=>l.modelValue=a,placeholder:l.param,size:"small"},null,8,["modelValue","onUpdate:modelValue","placeholder"]),l.suffix?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(l.suffix),1)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),l.vtype==="select"?(e.openBlock(),e.createBlock(c,{key:3,modelValue:l.modelValue,"onUpdate:modelValue":a=>l.modelValue=a,placeholder:l.param,clearable:"",size:"small"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b(l.optionsStr),a=>(e.openBlock(),e.createBlock(v,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),p!==t.configList.length-1?(e.openBlock(),e.createElementBlock("span",K,"_")):e.createCommentVNode("",!0)],64))),256))]),e.createVNode(u,{type:"primary",plain:"",size:"small",onClick:l=>S(t.configList)},{default:e.withCtx(()=>[e.createTextVNode(" 插入变量 ")]),_:2},1032,["onClick"]),e.createVNode(i,{effect:"dark",placement:"top-start"},{content:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createElementVNode("span",W,e.toDisplayString(t.tip),1)])]),default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.info_filled_default))]),_:1})]),_:2},1024)]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}},Y=U._export_sfc(X,[["__scopeId","data-v-e4f6c06a"]]),Z={install(m){m.component("st-varSelectDialog",Y)}};module.exports=Z;
@@ -1,38 +1,38 @@
1
- import "./base-29f73b05.js";
2
- import { E as M } from "./el-dialog-eedcfd3e.js";
3
- import "./el-overlay-1ee0338d.js";
1
+ import "./base-7ff209fc.js";
2
+ import { E as M } from "./el-dialog-2f10a2f4.js";
3
+ import "./el-overlay-4e9a99e0.js";
4
4
  import "./el-tooltip-4ed993c7.js";
5
- import { E as O } from "./el-popper-c9b3d3cf.js";
6
- import { E as P } from "./el-button-e2c63c08.js";
7
- import { E as F } from "./el-input-d47281da.js";
8
- import "./el-tag-17cd04a1.js";
9
- import { E as R, a as G } from "./el-select-e51e11c1.js";
5
+ import { E as O } from "./el-popper-003b3af7.js";
6
+ import { E as P } from "./el-button-7f58608d.js";
7
+ import { E as F } from "./el-input-31a818d4.js";
8
+ import "./el-tag-19cc5b59.js";
9
+ import { E as R, a as G } from "./el-select-19ee0e79.js";
10
10
  import "./el-scrollbar-323542e7.js";
11
11
  import { inject as H, ref as S, computed as J, onMounted as K, openBlock as o, createBlock as g, withCtx as p, createElementVNode as u, createVNode as f, createElementBlock as r, Fragment as y, renderList as w, unref as U, toDisplayString as E, createCommentVNode as h, createTextVNode as Q, pushScopeId as W, popScopeId as X } from "vue";
12
- import { c as Y, i as Z, E as ee } from "./index-c2b9bbfd.js";
13
- import { V as te } from "./VarietySelect-9f267958.js";
14
- import "./el-message-4ed993c7.js";
12
+ import { a as Y, i as Z, E as ee } from "./index-e17987ac.js";
13
+ import { V as te } from "./VarietySelect-faef4799.js";
15
14
  import { _ as le } from "./_plugin-vue_export-helper-dad06003.js";
16
- import { E as B } from "./index-f30561d3.js";
17
- import "./index-0f79095c.js";
18
- import "./index-8391a3df.js";
19
- import "./use-form-common-props-cb0ca65c.js";
20
- import "./index-de24705f.js";
15
+ import "./el-message-4ed993c7.js";
16
+ import { E as B } from "./index-99abf4ff.js";
17
+ import "./index-19ac550e.js";
18
+ import "./index-d898531c.js";
19
+ import "./use-form-common-props-d170ccfd.js";
20
+ import "./index-f402d1da.js";
21
21
  import "./index-2e331d74.js";
22
- import "./vnode-a83e6de8.js";
23
- import "./scroll-6799bafc.js";
24
- import "./use-global-config-cdaeca54.js";
25
- import "./index-0ee486ad.js";
22
+ import "./vnode-6d2615f0.js";
23
+ import "./scroll-8642151c.js";
24
+ import "./use-global-config-74436b92.js";
25
+ import "./index-6917da9d.js";
26
26
  import "./index-657047bb.js";
27
27
  import "./typescript-7ae59c4c.js";
28
- import "./index-c71e37dc.js";
29
- import "./index-1d9b50de.js";
30
- import "./index-95e5d454.js";
31
- import "./castArray-609a313e.js";
32
- import "./debounce-a09ce9a3.js";
33
- import "./el-autocomplete-27c60cc8.js";
28
+ import "./index-808db9b4.js";
29
+ import "./index-308aab33.js";
30
+ import "./index-b56d81e8.js";
31
+ import "./castArray-b9f1609f.js";
32
+ import "./debounce-23c2f7e1.js";
33
+ import "./el-autocomplete-43f205b0.js";
34
34
  import "./index-7ed0999e.js";
35
- import "./config-provider-7860903c.js";
35
+ import "./config-provider-071b8bec.js";
36
36
  const oe = (V) => (W("data-v-e4f6c06a"), V = V(), X(), V), ae = { class: "custom-header" }, ne = { class: "left" }, se = /* @__PURE__ */ oe(() => /* @__PURE__ */ u("span", null, " 选择变量 ", -1)), re = { class: "right" }, ie = { class: "custom-body" }, ue = { class: "config-list" }, pe = { class: "config-item" }, ce = { key: 0 }, me = { key: 0 }, de = { key: 1 }, _e = { key: 0 }, ve = { style: { "max-width": "820px" } }, fe = { style: { "white-space": "pre-line" } }, he = {
37
37
  __name: "index",
38
38
  props: {
@@ -1,7 +1,5 @@
1
- "use strict";const C=require("./base-ef747d02.cjs"),R=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");const U=require("./el-button-974ff9e9.cjs"),K=require("./el-input-fa18ef84.cjs"),e=require("vue"),M=require("./dayjs.min-2c20abe6.cjs"),W=require("./index-8901a38c.cjs"),D=require("./index-33f80550.cjs"),X=require("./_plugin-vue_export-helper-f246444f.cjs"),P=require("./index-6ca95c8a.cjs"),A=require("./use-form-common-props-d3ed62c6.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./config-provider-2ae47cc8.cjs");const G=C.buildProps({size:{type:[Number,String],values:A.componentSizes,default:"",validator:c=>C.isNumber(c)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:A.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:C.definePropType(String),default:"cover"}}),Q={error:c=>c instanceof Event},Z=e.defineComponent({name:"ElAvatar"}),ee=e.defineComponent({...Z,props:G,emits:Q,setup(c,{emit:N}){const k=c,r=C.useNamespace("avatar"),v=e.ref(!1),l=e.computed(()=>{const{size:n,icon:T,shape:E}=k,a=[r.b()];return C.isString(n)&&a.push(r.m(n)),T&&a.push(r.m("icon")),E&&a.push(r.m(E)),a}),y=e.computed(()=>{const{size:n}=k;return C.isNumber(n)?r.cssVarBlock({size:C.addUnit(n)||""}):void 0}),m=e.computed(()=>({objectFit:k.fit}));e.watch(()=>k.src,()=>v.value=!1);function d(n){v.value=!0,N("error",n)}return(n,T)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(l)),style:e.normalizeStyle(e.unref(y))},[(n.src||n.srcSet)&&!v.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.src,alt:n.alt,srcset:n.srcSet,style:e.normalizeStyle(e.unref(m)),onError:d},null,44,["src","alt","srcset"])):n.icon?(e.openBlock(),e.createBlock(e.unref(D.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon)))]),_:1})):e.renderSlot(n.$slots,"default",{key:2})],6))}});var te=C._export_sfc(ee,[["__file","avatar.vue"]]);const se=C.withInstall(te);const ae=async({appId:c,apiKey:N,value:k,callback:r})=>{var v;try{const l=await fetch(`https://dashscope.aliyuncs.com/api/v1/apps/${c}/completion`,{method:"POST",body:JSON.stringify({input:{prompt:k},parameters:{incremental_output:"true"},debug:{}}),headers:{Authorization:`Bearer ${N}`,"Content-Type":"application/json","X-DashScope-SSE":"enable"}});if(!l.ok){r("error",`HTTP ${l.status}: ${l.statusText}`);return}const y=l.body.getReader(),m=new TextDecoder;let d="",n=null;for(;;){const{done:T,value:E}=await y.read();if(T){d.trim()&&ne(d,r),r("finish","");break}d+=m.decode(E,{stream:!0});let a;for(;(a=d.indexOf(`
2
- `))!==-1;){const h=d.substring(0,a).trim();if(d=d.substring(a+1),h.startsWith("event:")){n=h.substring(6).trim();continue}if(h.startsWith("data:")){const _=h.substring(5).trim();if(n==="error"||_&&_.startsWith("{"))try{const f=JSON.parse(_);if(f.code||f.message||n==="error"){const F=f.message||f.code||"未知错误";r("error",`百炼服务端错误: ${F}`);return}const x=(v=f==null?void 0:f.output)==null?void 0:v.text;x&&r&&r("message",x)}catch{console.debug("JSON 解析失败:",_)}n=null}}}}catch(l){console.error("流式请求失败:",l),r("error",l.message)}},ne=(c,N)=>{var v;const k=c.split(`
3
- `);let r=null;for(const l of k){if(l.startsWith("event:")){r=l.substring(6).trim();continue}if(l.startsWith("data:")){const y=l.substring(5).trim();if(y&&y!=="[DONE]")try{const m=JSON.parse(y);if(r==="error"||m.code||m.message){const n=m.message||m.code||"未知错误";N("error",`百炼服务端错误: ${n}`);return}const d=(v=m==null?void 0:m.output)==null?void 0:v.text;d&&N&&N("message",d)}catch{}r=null}}};const w=c=>(e.pushScopeId("data-v-94f32fe5"),c=c(),e.popScopeId(),c),oe={class:"ai-dialog-body"},re={class:"avatar"},ie={class:"message-content"},le=["innerHTML"],ce={key:1,class:"message-text"},ue={class:"message-createTime"},de=w(()=>e.createElementVNode("div",{class:"message-createTime"},"请问对本轮查询结果是否满意?",-1)),me={class:"feedback-buttons"},fe=["onClick"],pe=w(()=>e.createElementVNode("span",{class:"btn-emoji"},"👍",-1)),ve=w(()=>e.createElementVNode("span",{class:"btn-text"},"满意",-1)),ge=[pe,ve],he=["onClick"],_e=w(()=>e.createElementVNode("span",{class:"btn-emoji"},"👎",-1)),ke=w(()=>e.createElementVNode("span",{class:"btn-text"},"不满意",-1)),ye=[_e,ke],Te={key:1,class:"message-createTime"},be={key:0,class:"message-item assistant"},Ne={class:"avatar"},Ee=w(()=>e.createElementVNode("div",{class:"message-content"},[e.createElementVNode("div",{class:"typing-indicator"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)),Ve={class:"input-area"},Ce={class:"input-actions"},we=w(()=>e.createElementVNode("div",{class:"input-hint"},[e.createElementVNode("span",null,"Enter 发送 | Ctrl + Enter 换行")],-1)),Se={class:"feedback-dialog-content"},Be=w(()=>e.createElementVNode("div",{class:"feedback-emoji"},"😟",-1)),qe=w(()=>e.createElementVNode("p",{class:"feedback-tip"},"很抱歉没能帮到您,请告诉我们哪里需要改进:",-1)),xe={class:"dialog-footer"},Me={__name:"index",props:{defaultMessage:{type:String,default:`你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
1
+ "use strict";const f=require("./base-ef747d02.cjs"),R=require("./el-dialog-1b185570.cjs");require("./el-overlay-ea65cb05.cjs");const U=require("./el-button-974ff9e9.cjs"),K=require("./el-input-fa18ef84.cjs"),e=require("vue"),w=require("./dayjs.min-2c20abe6.cjs"),G=require("./index-8901a38c.cjs"),Q=require("./aiTools-2e1f92d2.cjs"),S=require("./index-33f80550.cjs"),W=require("./_plugin-vue_export-helper-f246444f.cjs"),M=require("./index-6ca95c8a.cjs"),z=require("./use-form-common-props-d3ed62c6.cjs");require("./index-28e03bad.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-c80f33a4.cjs");require("./index-37b8d3c6.cjs");require("./index-eea0bcb3.cjs");require("./typescript-b63f8e83.cjs");require("./index-7dce9f59.cjs");require("./config-provider-2ae47cc8.cjs");const X=f.buildProps({size:{type:[Number,String],values:z.componentSizes,default:"",validator:c=>f.isNumber(c)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:z.iconPropType},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:f.definePropType(String),default:"cover"}}),Z={error:c=>c instanceof Event},ee=e.defineComponent({name:"ElAvatar"}),te=e.defineComponent({...ee,props:X,emits:Z,setup(c,{emit:D}){const T=c,d=f.useNamespace("avatar"),k=e.ref(!1),E=e.computed(()=>{const{size:o,icon:g,shape:_}=T,n=[d.b()];return f.isString(o)&&n.push(d.m(o)),g&&n.push(d.m("icon")),_&&n.push(d.m(_)),n}),B=e.computed(()=>{const{size:o}=T;return f.isNumber(o)?d.cssVarBlock({size:f.addUnit(o)||""}):void 0}),F=e.computed(()=>({objectFit:T.fit}));e.watch(()=>T.src,()=>k.value=!1);function q(o){k.value=!0,D("error",o)}return(o,g)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(E)),style:e.normalizeStyle(e.unref(B))},[(o.src||o.srcSet)&&!k.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.src,alt:o.alt,srcset:o.srcSet,style:e.normalizeStyle(e.unref(F)),onError:q},null,44,["src","alt","srcset"])):o.icon?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon)))]),_:1})):e.renderSlot(o.$slots,"default",{key:2})],6))}});var ae=f._export_sfc(te,[["__file","avatar.vue"]]);const se=f.withInstall(ae);const v=c=>(e.pushScopeId("data-v-536916ba"),c=c(),e.popScopeId(),c),ne={class:"ai-dialog-body"},oe={class:"avatar"},re={class:"message-content"},le=["innerHTML"],ie={key:1,class:"message-text"},ce={class:"message-createTime"},ue=v(()=>e.createElementVNode("div",{class:"message-createTime"},"请问对本轮查询结果是否满意?",-1)),de={class:"feedback-buttons"},me=["onClick"],pe=v(()=>e.createElementVNode("span",{class:"btn-emoji"},"👍",-1)),fe=v(()=>e.createElementVNode("span",{class:"btn-text"},"满意",-1)),ve=[pe,fe],ge=["onClick"],ke=v(()=>e.createElementVNode("span",{class:"btn-emoji"},"👎",-1)),_e=v(()=>e.createElementVNode("span",{class:"btn-text"},"不满意",-1)),he=[ke,_e],ye={key:1,class:"message-createTime"},be={key:0,class:"message-item assistant"},Te={class:"avatar"},Ve=v(()=>e.createElementVNode("div",{class:"message-content"},[e.createElementVNode("div",{class:"typing-indicator"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")])],-1)),Ne={class:"input-area"},Ee={class:"input-actions"},Ce=v(()=>e.createElementVNode("div",{class:"input-hint"},[e.createElementVNode("span",null,"Enter 发送 | Ctrl + Enter 换行")],-1)),we={class:"feedback-dialog-content"},Se=v(()=>e.createElementVNode("div",{class:"feedback-emoji"},"😟",-1)),Be=v(()=>e.createElementVNode("p",{class:"feedback-tip"},"很抱歉没能帮到您,请告诉我们哪里需要改进:",-1)),qe={class:"dialog-footer"},Me={__name:"index",props:{defaultMessage:{type:String,default:`你好呀!我是你的品种池AI助手,会根据您的自然语言去进行品种的条件查询
4
2
 
5
3
  示例:
6
- 帮我查A股科创板下品种转价差上证50并且总市值大于1千万, 按照总市值升序进行排序`}},emits:["callBack"],setup(c,{expose:N,emit:k}){const r=e.inject("stConfig"),v=e.reactive(W.V()),l=e.ref(!1),y=k,m=c,d=e.ref(),n=e.ref(!1),T=e.ref(!1),E=e.ref(null),a=e.ref([{role:"assistant",content:m.defaultMessage,userContent:null,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}]),h=e.ref(""),_=e.ref(!1),f=e.ref(""),x=e.ref({}),F=o=>{if(typeof o!="string")return!1;try{const t=JSON.parse(o);return t!==null&&typeof t=="object"}catch{return!1}},O=o=>{if(!F(o))return null;try{const t=JSON.parse(o),{parsedConditions:s,...i}=t;return{parsedConditions:s,webParams:i}}catch{return null}},z=o=>{var s;if(!o)return"";let t="";return(s=o.parsedConditions)!=null&&s.length&&(t+='<div class="parsed-conditions">',o.parsedConditions.forEach(i=>{t+=`<div class="parsed-conditions-item">${i}</div>`}),t+="</div>"),t},B=async(o,t)=>{switch(o){case"satisfied":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,aiContent:s.content,type:1,createTime:s.createTime,resTime:s.resTime,firstPackageTime:s.firstPackageTime,isSolved:1,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i),P.ElMessage.success("感谢您的评价!"),a.value[t].hasFeedback=!0;break}case"open":{x.value=t,_.value=!0;break}case"unsatisfied":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,userSuggestion:f.value,aiContent:s.content,type:2,resTime:s.resTime,createTime:s.createTime,firstPackageTime:s.firstPackageTime,isSolved:0,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i),P.ElMessage.success("感谢您的反馈!我们将持续跟踪并进行优化"),_.value=!1,a.value[t].hasFeedback=!0;break}case"default":{const s=a.value[t],i={userName:v.username,userContent:s.userContent,userSuggestion:f.value,aiContent:s.content,type:null,resTime:s.resTime,createTime:s.createTime,firstPackageTime:s.firstPackageTime,isSolved:1,logOrigin:1};await r.request.post("/alarm/deliversign/addVarietyAiHelperLog",i)}}},H=async()=>{const o=h.value.trim();if(!o)return P.ElMessage.warning("请输入消息内容");if(n.value)return;a.value.push({role:"user",content:o,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss")}),h.value="",await S(),a.value.push({role:"assistant",content:"",userContent:o,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}),await S(),n.value=!0,T.value=!0;let t="",s=new Date().getTime();try{await ae({appId:"9e54d112acfe4531bd1fc4fee8827fef",apiKey:"sk-d995eb26a4334bdeb2ccb4cbfaf51de8",value:o,callback:(V,g)=>{var u;if(V==="error"){T.value=!1,n.value=!1,a.value.pop(),a.value.push({role:"assistant",userContent:o,content:`❌ ${g}`,showFeedback:!1,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-s,firstPackageTime:0}),B("default",a.value.length-1),S();return}else if(V==="message"){t+=g;const p=a.value[a.value.length-1];p&&p.role==="assistant"&&(p.content=t,S()),p.firstPackageTime===0&&(p.firstPackageTime=new Date().getTime()-s)}else if(V==="finish"){T.value=!1,n.value=!1;const p=a.value[a.value.length-1];p&&p.role==="assistant"&&(p.showFeedback=!0,p.resTime=new Date().getTime()-s,B("default",a.value.length-1)),console.log(t);try{const b=JSON.parse(t);if(b.parsedConditions&&delete b.parsedConditions,(u=b.customTagNames)!=null&&u.length){const L=b.customTagNames.reduce((Y,J)=>{const $=d.value[J];return $&&Y.push($),Y},[]);delete b.customTagNames,b.customTag=L}y("callBack",b)}catch{y("callBack",t)}}}})}catch(i){P.ElMessage.error(`AI响应异常: ${i}`),a.value.pop(),a.value.push({role:"assistant",userContent:o,content:"❌ 抱歉,AI服务响应异常,请稍后重试。",showFeedback:!0,hasFeedback:!1,createTime:M.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-s,firstPackageTime:0}),B("default",a.value.length-1),await S(),n.value=!1,T.value=!1}},j=o=>{if(o.key==="Enter")if(o.ctrlKey){o.preventDefault();const t=o.target,s=t.selectionStart,i=t.selectionEnd;h.value=h.value.substring(0,s)+`
7
- `+h.value.substring(i),e.nextTick(()=>{t.selectionStart=t.selectionEnd=s+1})}else o.preventDefault(),H()},S=async()=>{await e.nextTick(),E.value&&(E.value.scrollTop=E.value.scrollHeight)},I=async()=>{const o=await Promise.all([r.request.post("/alarm/deliversign/findTagsByUserId"),r.request.post("/alarm/deliversign/findSystemTagsByTagName")]);d.value=o.reduce((t,s)=>{var i;return{...t,...(i=s.body)==null?void 0:i.reduce((q,V)=>({...q,[V.tagName]:V.id}),{})}},{})};return e.onMounted(()=>{I()}),e.watch(()=>a.value,()=>{S()},{deep:!0}),e.watch(()=>_.value,o=>{o||(f.value="")}),N({open:()=>{l.value=!0,e.nextTick(()=>{S()})}}),(o,t)=>{const s=se,i=K.ElInput,q=U.ElButton,V=R.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,{class:"ai-dialog",modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=g=>l.value=g),title:"✨ 品种池参数解析AI助手",width:"500px",center:"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:e.withCtx(()=>{var g;return[e.createElementVNode("div",oe,[e.createElementVNode("div",{ref_key:"messageListRef",ref:E,class:"message-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass([u.role,"message-item"])},[u.content?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",re,[e.createVNode(s,{size:32,icon:u.role==="user"?e.unref(D.user_filled_default):e.unref(D.service_default)},null,8,["icon"])]),e.createElementVNode("div",ie,[F(u.content)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"message-json",innerHTML:z(O(u.content))},null,8,le)):(e.openBlock(),e.createElementBlock("div",ce,e.toDisplayString(u.content),1)),e.createElementVNode("div",ue,e.toDisplayString(u.createTime),1),u.role==="assistant"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[u.showFeedback&&!u.hasFeedback?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[de,e.createElementVNode("div",me,[e.createElementVNode("button",{class:"feedback-btn satisfied-btn",onClick:b=>B("satisfied",p)},ge,8,fe),e.createElementVNode("button",{class:"feedback-btn unsatisfied-btn",onClick:b=>B("open",p)},ye,8,he)])],64)):e.createCommentVNode("",!0),u.showFeedback&&u.hasFeedback?(e.openBlock(),e.createElementBlock("div",Te,"感谢您进行的评价反馈")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])],64)):e.createCommentVNode("",!0)],2))),128)),T.value&&!((g=a.value[a.value.length-1])!=null&&g.content)?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Ne,[e.createVNode(s,{size:32,icon:e.unref(D.service_default)},null,8,["icon"])]),Ee])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",Ve,[e.createVNode(i,{class:"message-input",modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=u=>h.value=u),type:"textarea",rows:4,autosize:{minRows:2,maxRows:4},placeholder:"输入您想查询的品种条件...",onKeydown:j},null,8,["modelValue"]),e.createElementVNode("div",Ce,[we,e.createVNode(q,{class:"send-btn",type:"primary",icon:e.unref(D.promotion_default),loading:n.value,onClick:H,round:""},{default:e.withCtx(()=>[e.createTextVNode(" 发送 ")]),_:1},8,["icon","loading"])])])])]}),_:1},8,["modelValue"]),e.createVNode(V,{modelValue:_.value,"onUpdate:modelValue":t[5]||(t[5]=g=>_.value=g),title:"📝 反馈意见",width:"400px"},{footer:e.withCtx(()=>[e.createElementVNode("span",xe,[e.createVNode(q,{onClick:t[3]||(t[3]=g=>_.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(q,{type:"primary",onClick:t[4]||(t[4]=g=>B("unsatisfied",x.value))},{default:e.withCtx(()=>[e.createTextVNode("提交反馈")]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",Se,[Be,qe,e.createVNode(i,{modelValue:f.value,"onUpdate:modelValue":t[2]||(t[2]=g=>f.value=g),type:"textarea",rows:4,placeholder:"[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."},null,8,["modelValue"])])]),_:1},8,["modelValue"])],64)}}},De=X._export_sfc(Me,[["__scopeId","data-v-94f32fe5"]]),Fe={install(c){c.component("st-varietyAiHelper",De)}};module.exports=Fe;
4
+ 帮我查A股科创板下品种转价差上证50并且总市值大于1千万, 最近一次红箱的开盘价大于前5根K线的最高价, 并按照总市值升序进行排序`}},emits:["callBack"],setup(c,{expose:D,emit:T}){const d=e.inject("stConfig"),k=e.reactive(G.V()),E=e.ref(!1),B=T,F=c,q=e.ref(),o=e.ref(!1),g=e.ref(!1),_=e.ref(null),n=e.ref([{role:"assistant",content:F.defaultMessage,userContent:null,showFeedback:!1,hasFeedback:!1,createTime:w.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}]),h=e.ref(""),V=e.ref(!1),C=e.ref(""),x=e.ref({}),Y=s=>{if(typeof s!="string")return!1;try{const t=JSON.parse(s);return t!==null&&typeof t=="object"}catch{return!1}},j=s=>{if(!Y(s))return null;try{const t=JSON.parse(s),{parsedConditions:a,...r}=t;return{parsedConditions:a,webParams:r}}catch{return null}},L=s=>{var a;if(!s)return"";let t="";return(a=s.parsedConditions)!=null&&a.length&&(t+='<div class="parsed-conditions">',s.parsedConditions.forEach(r=>{t+=`<div class="parsed-conditions-item">${r}</div>`}),t+="</div>"),t},N=async(s,t)=>{switch(s){case"satisfied":{const a=n.value[t],r={userName:k.username,userContent:a.userContent,aiContent:a.content,type:1,createTime:a.createTime,resTime:a.resTime,firstPackageTime:a.firstPackageTime,isSolved:1,logOrigin:1};await d.request.post("/alarm/deliversign/addVarietyAiHelperLog",r),M.ElMessage.success("感谢您的评价!"),n.value[t].hasFeedback=!0;break}case"open":{x.value=t,V.value=!0;break}case"unsatisfied":{const a=n.value[t],r={userName:k.username,userContent:a.userContent,userSuggestion:C.value,aiContent:a.content,type:2,resTime:a.resTime,createTime:a.createTime,firstPackageTime:a.firstPackageTime,isSolved:0,logOrigin:1};await d.request.post("/alarm/deliversign/addVarietyAiHelperLog",r),M.ElMessage.success("感谢您的反馈!我们将持续跟踪并进行优化"),V.value=!1,n.value[t].hasFeedback=!0;break}case"default":{const a=n.value[t],r={userName:k.username,userContent:a.userContent,userSuggestion:C.value,aiContent:a.content,type:null,resTime:a.resTime,createTime:a.createTime,firstPackageTime:a.firstPackageTime,isSolved:1,logOrigin:1};await d.request.post("/alarm/deliversign/addVarietyAiHelperLog",r)}}},H=async()=>{const s=h.value.trim();if(!s)return M.ElMessage.warning("请输入消息内容");if(o.value)return;n.value.push({role:"user",content:s,createTime:w.dayjs().format("YYYY-MM-DD HH:mm:ss")}),h.value="",await y(),n.value.push({role:"assistant",content:"",userContent:s,showFeedback:!1,hasFeedback:!1,createTime:w.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:0,firstPackageTime:0}),await y(),o.value=!0,g.value=!0;let t="",a=new Date().getTime();try{const r="9e54d112acfe4531bd1fc4fee8827fef",b="sk-d995eb26a4334bdeb2ccb4cbfaf51de8";await Q.sendToBaiLianAppStreaming({appId:r,apiKey:b,value:s,callback:(p,u)=>{var l;if(p==="error"){g.value=!1,o.value=!1,n.value.pop(),n.value.push({role:"assistant",userContent:s,content:`❌ ${u}`,showFeedback:!1,hasFeedback:!1,createTime:w.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-a,firstPackageTime:0}),N("default",n.value.length-1),y();return}else if(p==="message"){t+=u;const i=n.value[n.value.length-1];i&&i.role==="assistant"&&(i.content=t,y()),i.firstPackageTime===0&&(i.firstPackageTime=new Date().getTime()-a)}else if(p==="finish"){g.value=!1,o.value=!1;const i=n.value[n.value.length-1];i&&i.role==="assistant"&&(i.showFeedback=!0,i.resTime=new Date().getTime()-a,N("default",n.value.length-1)),console.log(t);try{const m=JSON.parse(t);if(m.parsedConditions&&delete m.parsedConditions,(l=m.customTagNames)!=null&&l.length){const O=m.customTagNames.reduce((P,J)=>{const A=q.value[J];return A&&P.push(A),P},[]);delete m.customTagNames,m.customTag=O}B("callBack",m)}catch{B("callBack",t)}}}})}catch(r){M.ElMessage.error(`AI响应异常: ${r}`),n.value.pop(),n.value.push({role:"assistant",userContent:s,content:"❌ 抱歉,AI服务响应异常,请稍后重试。",showFeedback:!0,hasFeedback:!1,createTime:w.dayjs().format("YYYY-MM-DD HH:mm:ss"),resTime:new Date().getTime()-a,firstPackageTime:0}),N("default",n.value.length-1),await y(),o.value=!1,g.value=!1}},$=s=>{if(s.key==="Enter")if(s.ctrlKey){s.preventDefault();const t=s.target,a=t.selectionStart,r=t.selectionEnd;h.value=h.value.substring(0,a)+`
5
+ `+h.value.substring(r),e.nextTick(()=>{t.selectionStart=t.selectionEnd=a+1})}else s.preventDefault(),H()},y=async()=>{await e.nextTick(),_.value&&(_.value.scrollTop=_.value.scrollHeight)},I=async()=>{const s=await Promise.all([d.request.post("/alarm/deliversign/findTagsByUserId"),d.request.post("/alarm/deliversign/findSystemTagsByTagName")]);q.value=s.reduce((t,a)=>{var r;return{...t,...(r=a.body)==null?void 0:r.reduce((b,p)=>({...b,[p.tagName]:p.id}),{})}},{})};return e.onMounted(()=>{I()}),e.watch(()=>n.value,()=>{y()},{deep:!0}),e.watch(()=>V.value,s=>{s||(C.value="")}),D({open:()=>{E.value=!0,e.nextTick(()=>{y()})}}),(s,t)=>{const a=se,r=K.ElInput,b=U.ElButton,p=R.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(p,{class:"ai-dialog",modelValue:E.value,"onUpdate:modelValue":t[1]||(t[1]=u=>E.value=u),title:"✨ 品种池参数解析AI助手",width:"500px",center:"",draggable:"",overflow:"",modal:!1,"modal-penetrable":!0},{default:e.withCtx(()=>{var u;return[e.createElementVNode("div",ne,[e.createElementVNode("div",{ref_key:"messageListRef",ref:_,class:"message-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(l,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:e.normalizeClass([l.role,"message-item"])},[l.content?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",oe,[e.createVNode(a,{size:32,icon:l.role==="user"?e.unref(S.user_filled_default):e.unref(S.service_default)},null,8,["icon"])]),e.createElementVNode("div",re,[Y(l.content)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"message-json",innerHTML:L(j(l.content))},null,8,le)):(e.openBlock(),e.createElementBlock("div",ie,e.toDisplayString(l.content),1)),e.createElementVNode("div",ce,e.toDisplayString(l.createTime),1),l.role==="assistant"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.showFeedback&&!l.hasFeedback?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[ue,e.createElementVNode("div",de,[e.createElementVNode("button",{class:"feedback-btn satisfied-btn",onClick:m=>N("satisfied",i)},ve,8,me),e.createElementVNode("button",{class:"feedback-btn unsatisfied-btn",onClick:m=>N("open",i)},he,8,ge)])],64)):e.createCommentVNode("",!0),l.showFeedback&&l.hasFeedback?(e.openBlock(),e.createElementBlock("div",ye,"感谢您进行的评价反馈")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])],64)):e.createCommentVNode("",!0)],2))),128)),g.value&&!((u=n.value[n.value.length-1])!=null&&u.content)?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Te,[e.createVNode(a,{size:32,icon:e.unref(S.service_default)},null,8,["icon"])]),Ve])):e.createCommentVNode("",!0)],512),e.createElementVNode("div",Ne,[e.createVNode(r,{class:"message-input",modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=l=>h.value=l),type:"textarea",rows:4,autosize:{minRows:2,maxRows:4},placeholder:"输入您想查询的品种条件...",onKeydown:$},null,8,["modelValue"]),e.createElementVNode("div",Ee,[Ce,e.createVNode(b,{class:"send-btn",type:"primary",icon:e.unref(S.promotion_default),loading:o.value,onClick:H,round:""},{default:e.withCtx(()=>[e.createTextVNode(" 发送 ")]),_:1},8,["icon","loading"])])])])]}),_:1},8,["modelValue"]),e.createVNode(p,{modelValue:V.value,"onUpdate:modelValue":t[5]||(t[5]=u=>V.value=u),title:"📝 反馈意见",width:"400px"},{footer:e.withCtx(()=>[e.createElementVNode("span",qe,[e.createVNode(b,{onClick:t[3]||(t[3]=u=>V.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(b,{type:"primary",onClick:t[4]||(t[4]=u=>N("unsatisfied",x.value))},{default:e.withCtx(()=>[e.createTextVNode("提交反馈")]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",we,[Se,Be,e.createVNode(r,{modelValue:C.value,"onUpdate:modelValue":t[2]||(t[2]=u=>C.value=u),type:"textarea",rows:4,placeholder:"[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."},null,8,["modelValue"])])]),_:1},8,["modelValue"])],64)}}},De=W._export_sfc(Me,[["__scopeId","data-v-536916ba"]]),Fe={install(c){c.component("st-varietyAiHelper",De)}};module.exports=Fe;