st-comp 0.0.244 → 0.0.245

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 (46) hide show
  1. package/es/ConfigProvider.cjs +1 -1
  2. package/es/ConfigProvider.js +1 -1
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +262 -263
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +1 -1
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +1 -1
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +1 -1
  11. package/es/KlineNew.cjs +1 -1
  12. package/es/KlineNew.js +1 -1
  13. package/es/KlinePlus.cjs +1 -1
  14. package/es/KlinePlus.js +1 -1
  15. package/es/MonacoEditor.cjs +1 -1
  16. package/es/MonacoEditor.js +3 -3
  17. package/es/Pie.cjs +1 -1
  18. package/es/Pie.js +1 -1
  19. package/es/User.cjs +1 -1
  20. package/es/User.js +1 -1
  21. package/es/VarSelectDialog.cjs +1 -1
  22. package/es/VarSelectDialog.js +2 -2
  23. package/es/VarietyAutoComplete.cjs +1 -1
  24. package/es/VarietyAutoComplete.js +1 -1
  25. package/es/VarietySearch.cjs +20 -20
  26. package/es/VarietySearch.js +2995 -3000
  27. package/es/{VarietySelect-031bf077.cjs → VarietySelect-2fd501da.cjs} +1 -1
  28. package/es/{VarietySelect-ae0c48b2.js → VarietySelect-5a9dd50b.js} +1 -1
  29. package/es/{index-1f939868.cjs → index-2375023e.cjs} +2 -2
  30. package/es/{index-edabe380.js → index-7ed0999e.js} +5487 -5574
  31. package/es/{index-2c456130.cjs → index-8901a38c.cjs} +40 -40
  32. package/es/{index-4b01552e.js → index-ac98a4d8.js} +3 -3
  33. package/es/{python-7ce6f0b1.js → python-a914569a.js} +3 -3
  34. package/es/{python-c8abd4f5.cjs → python-c67c8901.cjs} +1 -1
  35. package/es/style.css +1 -1
  36. package/lib/bundle.js +1 -1
  37. package/lib/bundle.umd.cjs +220 -220
  38. package/lib/{index-200db55b.js → index-ab2ee69a.js} +33080 -33172
  39. package/lib/{python-9540022d.js → python-ca75e11c.js} +1 -1
  40. package/lib/style.css +1 -1
  41. package/package.json +1 -1
  42. package/packages/CustomFunction/index.vue +2 -4
  43. package/packages/VarietySearch/components/CompositeOrder/index.vue +2 -4
  44. package/packages/VarietySearch/components/FactorScreen/index.vue +5 -7
  45. package/packages/VarietySearch/index.vue +4 -6
  46. package/src/pages/VarietySearch/index.vue +7 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.244",
4
+ "version": "0.0.245",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { actionStat } from "st-func";
3
2
  import { ref, inject, onMounted } from "vue";
4
3
  import { Edit, DocumentCopy, Delete } from "@element-plus/icons-vue";
5
4
  import ManageDialog from "./components/ManageDialog.vue";
@@ -7,11 +6,10 @@ import ManageDialog from "./components/ManageDialog.vue";
7
6
  const { request } = inject("stConfig"); // 组件库全局配置
8
7
  const ManageDialogRef = ref(null);
9
8
 
10
- const emit = defineEmits(["insert"]);
9
+ const emit = defineEmits(["insert", "actionState"]);
11
10
  const props = defineProps({
12
11
  size: { type: String, default: "small" },
13
12
  selectWidth: { type: String, default: "200px" },
14
- pageName: { type: String, default: "" },
15
13
  });
16
14
 
17
15
  const customFunctionId = ref(null);
@@ -51,7 +49,7 @@ const handleCustomFuncManage = async (action, item) => {
51
49
  switch (action) {
52
50
  case "open": {
53
51
  ManageDialogRef.value.open();
54
- props.pageName && actionStat(props.pageName, "因子筛选", "函数管理");
52
+ emit("actionState", "因子筛选", "函数管理");
55
53
  break;
56
54
  }
57
55
  case "copy": {
@@ -1,16 +1,15 @@
1
1
  <script setup>
2
- import { actionStat } from "st-func";
3
2
  import { Close, Plus } from "@element-plus/icons-vue";
4
3
  import { ref, watch, computed, inject } from "vue";
5
4
 
6
5
  const clearRow = inject("clearRow");
7
6
 
8
7
  const data = defineModel("data", { default: [] });
8
+ const emit = defineEmits(["actionState"]);
9
9
  const props = defineProps({
10
10
  config: { type: Object, default: () => {} },
11
11
  varietyMarket: { type: null || Number, default: () => null }, // 已选品种市场
12
12
  commonOption: { type: Array, default: () => [] }, // 已选常用选项
13
- pageName: { type: String, default: "" },
14
13
  });
15
14
  const visible = ref(false);
16
15
  const compositeOrderForm = ref({
@@ -60,8 +59,7 @@ const handleAction = (action, index) => {
60
59
  }
61
60
  // 窗口确认
62
61
  case "submit": {
63
- props.pageName && actionStat(props.pageName, "组合排序");
64
-
62
+ emit("actionState", "组合排序");
65
63
  const { id, name, value } = compositeOrderForm.value;
66
64
  if (!name) return ElMessage.warning("请选择需要排序的条件");
67
65
  const { label } = compositeOrderOptions.value.find((item) => item.key === name);
@@ -1,6 +1,5 @@
1
1
  <!-- 因子筛选组件 -->
2
2
  <script setup name="FactorScreen">
3
- import { actionStat } from "st-func";
4
3
  import { nextTick, ref, watch, inject, reactive } from "vue";
5
4
  import { Close, Plus, CircleCloseFilled, InfoFilled, Document } from "@element-plus/icons-vue";
6
5
  import { handleVerifyScore, extractConditionDetails, extractVariables, sendToAi } from "./tools.js";
@@ -9,6 +8,7 @@ import MonacoEditor from "../../../MonacoEditor/index.vue";
9
8
 
10
9
  const { request } = inject("stConfig"); // 组件库全局配置
11
10
 
11
+ const emit = defineEmits(["actionState"]);
12
12
  const props = defineProps({
13
13
  config: {
14
14
  type: Object,
@@ -21,7 +21,6 @@ const props = defineProps({
21
21
  factorDescriptions: [], // 因子使用说明数据源
22
22
  },
23
23
  },
24
- pageName: { type: String, default: "" },
25
24
  });
26
25
  const data = defineModel("data", {
27
26
  default: {
@@ -324,7 +323,7 @@ const handleScriptCopy = async () => {
324
323
  ElMessage.success("脚本内容已经成功复制到粘贴板");
325
324
  } finally {
326
325
  scriptCopyLoading.value = false;
327
- props.pageName && actionStat(props.pageName, "因子筛选", "复制");
326
+ emit("actionState", "因子筛选", "复制");
328
327
  }
329
328
  };
330
329
 
@@ -376,7 +375,7 @@ const handleScriptTest = async (action) => {
376
375
  }
377
376
  } finally {
378
377
  scriptTestLoading.value = false;
379
- props.pageName && actionStat(props.pageName, "因子筛选", "测试");
378
+ emit("actionState", "因子筛选", "测试");
380
379
  }
381
380
  break;
382
381
  }
@@ -391,7 +390,7 @@ const handleScriptTest = async (action) => {
391
390
  };
392
391
  // 测试: AI分析
393
392
  const handleTestAi = () => {
394
- props.pageName && actionStat(props.pageName, "因子筛选", "AI分析");
393
+ emit("actionState", "因子筛选", "AI分析");
395
394
  const appId = "87be17ecc84d4d2ea3108d7155bec2ac";
396
395
  const apiKey = "sk-d995eb26a4334bdeb2ccb4cbfaf51de8";
397
396
  scriptAILoading.value = true;
@@ -402,7 +401,6 @@ const handleTestAi = () => {
402
401
  return;
403
402
  }
404
403
  scriptTestResult.ai = scriptTestResult.ai + res;
405
- console.log(scriptTestResult.ai);
406
404
  });
407
405
  };
408
406
 
@@ -574,7 +572,7 @@ watch(
574
572
  v-show="factorType === '脚本'"
575
573
  size="small"
576
574
  @insert="handleInsertCustomFunction"
577
- :pageName="pageName"
575
+ @actionState="(...args) => emit('actionState', ...args)"
578
576
  />
579
577
  <el-button
580
578
  type="primary"
@@ -6,10 +6,8 @@ import CommonIndicator from "./components/CommonIndicator/index.vue";
6
6
  import CompositeOrder from "./components/CompositeOrder/index.vue";
7
7
  import AddTag from "./components/AddTag/index.vue";
8
8
 
9
- const props = defineProps({
10
- config: { type: Object, default: {} },
11
- pageName: { type: String, default: "" },
12
- });
9
+ const emit = defineEmits(["actionState"]);
10
+ const props = defineProps({ config: { type: Object, default: {} } });
13
11
  const searchData = defineModel("searchData");
14
12
  searchData.value = Object.assign(searchData.value, {
15
13
  // 品种市场
@@ -600,7 +598,7 @@ defineExpose({
600
598
  <FactorScreen
601
599
  v-model:data="searchData.factorScreen"
602
600
  :config="config.factorScreen"
603
- :pageName="pageName"
601
+ @actionState="(...args) => emit('actionState', ...args)"
604
602
  />
605
603
  </div>
606
604
  </template>
@@ -617,7 +615,7 @@ defineExpose({
617
615
  :varietyMarket="searchData.varietyMarket"
618
616
  :commonOption="searchData.commonOption"
619
617
  :config="config.compositeOrder"
620
- :pageName="pageName"
618
+ @actionState="(...args) => emit('actionState', ...args)"
621
619
  />
622
620
  </div>
623
621
  </template>
@@ -48,7 +48,7 @@ const getTableData = async () => {
48
48
  * @description: 根据用户最后一次操作交互的时机, 决定排序使用哪个维度
49
49
  * 常规排序字段: orderByInfo
50
50
  * 表头的orderByInfo和预警组的orderByInfo为顺序互斥, 谁最后操作就用谁
51
- *
51
+ *
52
52
  * 组合排序字段: compositeOrder
53
53
  * 表头的orderByInfo与compositeOrder为顺序互斥, 谁最后操作就用谁
54
54
  * 预警组的orderByInfo与compositeOrder为强制互斥, compositeOrder有值就一定优先使用compositeOrder
@@ -105,6 +105,10 @@ const sortChange = ({ column, prop, order }) => {
105
105
  getTableData();
106
106
  };
107
107
 
108
+ const actionState = (...args) => {
109
+ console.log(...args);
110
+ };
111
+
108
112
  onMounted(async () => {
109
113
  const dicAlar = await getAlarDict();
110
114
  const dicCycle = await getAlarFreq();
@@ -181,7 +185,7 @@ watch(
181
185
  },
182
186
  {
183
187
  deep: true,
184
- }
188
+ },
185
189
  );
186
190
  </script>
187
191
 
@@ -191,6 +195,7 @@ watch(
191
195
  ref="varietySearchRef"
192
196
  v-model:searchData="varietySearchData"
193
197
  :config="varietySearchConfig"
198
+ @actionState="actionState"
194
199
  />
195
200
  <div>品种池组件接口参数: {{ apiParams }}</div>
196
201
  <el-button