st-comp 0.0.242 → 0.0.244

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 (47) 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 -261
  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 +19 -19
  26. package/es/VarietySearch.js +1359 -1352
  27. package/es/{VarietySelect-2fd501da.cjs → VarietySelect-031bf077.cjs} +1 -1
  28. package/es/{VarietySelect-5a9dd50b.js → VarietySelect-ae0c48b2.js} +1 -1
  29. package/es/{index-2375023e.cjs → index-1f939868.cjs} +2 -2
  30. package/es/{index-8901a38c.cjs → index-2c456130.cjs} +40 -40
  31. package/es/{index-ac98a4d8.js → index-4b01552e.js} +3 -3
  32. package/es/{index-7ed0999e.js → index-edabe380.js} +5574 -5487
  33. package/es/{python-a914569a.js → python-7ce6f0b1.js} +3 -3
  34. package/es/{python-c67c8901.cjs → python-c8abd4f5.cjs} +1 -1
  35. package/es/style.css +1 -1
  36. package/lib/bundle.js +1 -1
  37. package/lib/bundle.umd.cjs +174 -174
  38. package/lib/{index-0c373441.js → index-200db55b.js} +19734 -19640
  39. package/lib/{python-4e746381.js → python-9540022d.js} +1 -1
  40. package/lib/style.css +1 -1
  41. package/package.json +1 -1
  42. package/packages/CustomFunction/index.vue +5 -2
  43. package/packages/VarietySearch/components/AddTag/index.vue +4 -4
  44. package/packages/VarietySearch/components/CompositeOrder/index.vue +4 -0
  45. package/packages/VarietySearch/components/FactorScreen/index.vue +7 -0
  46. package/packages/VarietySearch/config.js +4 -5
  47. package/packages/VarietySearch/index.vue +10 -11
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.242",
4
+ "version": "0.0.244",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
- import { ref, inject, onMounted, watch, reactive } from "vue";
2
+ import { actionStat } from "st-func";
3
+ import { ref, inject, onMounted } from "vue";
3
4
  import { Edit, DocumentCopy, Delete } from "@element-plus/icons-vue";
4
5
  import ManageDialog from "./components/ManageDialog.vue";
5
6
 
@@ -10,6 +11,7 @@ const emit = defineEmits(["insert"]);
10
11
  const props = defineProps({
11
12
  size: { type: String, default: "small" },
12
13
  selectWidth: { type: String, default: "200px" },
14
+ pageName: { type: String, default: "" },
13
15
  });
14
16
 
15
17
  const customFunctionId = ref(null);
@@ -44,11 +46,12 @@ const handleInsert = () => {
44
46
  emit("insert", funcName, funcExpression);
45
47
  };
46
48
 
47
- // 窗口: 函数管理(复制, 编辑, 删除)
49
+ // 窗口: 函数管理(打开, 复制, 编辑, 删除)
48
50
  const handleCustomFuncManage = async (action, item) => {
49
51
  switch (action) {
50
52
  case "open": {
51
53
  ManageDialogRef.value.open();
54
+ props.pageName && actionStat(props.pageName, "因子筛选", "函数管理");
52
55
  break;
53
56
  }
54
57
  case "copy": {
@@ -197,7 +197,7 @@ const getTagList = async () => {
197
197
  // 个人标签
198
198
  const res = await request.post('/alarm/deliversign/findTagsByUserId', { tagName: searchValue.value })
199
199
  tagList.value = []
200
- tagMap.value = [
200
+ tagMap.value = {
201
201
  ...tagMap.value,
202
202
  ...res.body.reduce((r, i) => {
203
203
  return {
@@ -205,7 +205,7 @@ const getTagList = async () => {
205
205
  [i.id]: i.tagName
206
206
  }
207
207
  }, {})
208
- ]
208
+ }
209
209
  nextTick(() => {
210
210
  tagList.value = res.body?.map(item => ({
211
211
  name: item.tagName,
@@ -216,7 +216,7 @@ const getTagList = async () => {
216
216
  // 系统标签
217
217
  const res = await request.post('/alarm/deliversign/findSystemTagsByTagName', { tagName: searchValue.value })
218
218
  tagList.value = []
219
- tagMap.value = [
219
+ tagMap.value = {
220
220
  ...tagMap.value,
221
221
  ...res.body.reduce((r, i) => {
222
222
  return {
@@ -224,7 +224,7 @@ const getTagList = async () => {
224
224
  [i.id]: i.tagName
225
225
  }
226
226
  }, {})
227
- ]
227
+ }
228
228
  nextTick(() => {
229
229
  tagList.value = res.body?.map(item => ({
230
230
  name: item.tagName,
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { actionStat } from "st-func";
2
3
  import { Close, Plus } from "@element-plus/icons-vue";
3
4
  import { ref, watch, computed, inject } from "vue";
4
5
 
@@ -9,6 +10,7 @@ const props = defineProps({
9
10
  config: { type: Object, default: () => {} },
10
11
  varietyMarket: { type: null || Number, default: () => null }, // 已选品种市场
11
12
  commonOption: { type: Array, default: () => [] }, // 已选常用选项
13
+ pageName: { type: String, default: "" },
12
14
  });
13
15
  const visible = ref(false);
14
16
  const compositeOrderForm = ref({
@@ -58,6 +60,8 @@ const handleAction = (action, index) => {
58
60
  }
59
61
  // 窗口确认
60
62
  case "submit": {
63
+ props.pageName && actionStat(props.pageName, "组合排序");
64
+
61
65
  const { id, name, value } = compositeOrderForm.value;
62
66
  if (!name) return ElMessage.warning("请选择需要排序的条件");
63
67
  const { label } = compositeOrderOptions.value.find((item) => item.key === name);
@@ -1,5 +1,6 @@
1
1
  <!-- 因子筛选组件 -->
2
2
  <script setup name="FactorScreen">
3
+ import { actionStat } from "st-func";
3
4
  import { nextTick, ref, watch, inject, reactive } from "vue";
4
5
  import { Close, Plus, CircleCloseFilled, InfoFilled, Document } from "@element-plus/icons-vue";
5
6
  import { handleVerifyScore, extractConditionDetails, extractVariables, sendToAi } from "./tools.js";
@@ -20,6 +21,7 @@ const props = defineProps({
20
21
  factorDescriptions: [], // 因子使用说明数据源
21
22
  },
22
23
  },
24
+ pageName: { type: String, default: "" },
23
25
  });
24
26
  const data = defineModel("data", {
25
27
  default: {
@@ -322,8 +324,10 @@ const handleScriptCopy = async () => {
322
324
  ElMessage.success("脚本内容已经成功复制到粘贴板");
323
325
  } finally {
324
326
  scriptCopyLoading.value = false;
327
+ props.pageName && actionStat(props.pageName, "因子筛选", "复制");
325
328
  }
326
329
  };
330
+
327
331
  // 测试: 复制
328
332
  const handleTestCodeCopy = () => {
329
333
  let txa = document.createElement("textarea");
@@ -372,6 +376,7 @@ const handleScriptTest = async (action) => {
372
376
  }
373
377
  } finally {
374
378
  scriptTestLoading.value = false;
379
+ props.pageName && actionStat(props.pageName, "因子筛选", "测试");
375
380
  }
376
381
  break;
377
382
  }
@@ -386,6 +391,7 @@ const handleScriptTest = async (action) => {
386
391
  };
387
392
  // 测试: AI分析
388
393
  const handleTestAi = () => {
394
+ props.pageName && actionStat(props.pageName, "因子筛选", "AI分析");
389
395
  const appId = "87be17ecc84d4d2ea3108d7155bec2ac";
390
396
  const apiKey = "sk-d995eb26a4334bdeb2ccb4cbfaf51de8";
391
397
  scriptAILoading.value = true;
@@ -568,6 +574,7 @@ watch(
568
574
  v-show="factorType === '脚本'"
569
575
  size="small"
570
576
  @insert="handleInsertCustomFunction"
577
+ :pageName="pageName"
571
578
  />
572
579
  <el-button
573
580
  type="primary"
@@ -47,12 +47,11 @@ const config = {
47
47
  // { label: "深港通", value: 8192, varietyMarketIds: "5" },
48
48
  ],
49
49
  },
50
- // 自定标签 [选项: 接口]
50
+ // 自定标签 [选项: 组件内部请求]
51
51
  customTag: {
52
52
  show: true,
53
- options: [],
54
53
  },
55
- // 价差转换 [选项: 前端默认]
54
+ // 价差转换 [选项: 组件默认]
56
55
  jcTranslate: {
57
56
  show: true,
58
57
  jcOptions: [
@@ -77,7 +76,7 @@ const config = {
77
76
  factorOptions: [], // 因子下拉框数据源
78
77
  factorDescriptions: [], // 因子使用说明数据源
79
78
  },
80
- // 常用指标 [选项: 前端默认]
79
+ // 常用指标 [选项: 组件默认]
81
80
  commonIndicator: {
82
81
  show: true,
83
82
  options: [
@@ -618,7 +617,7 @@ const config = {
618
617
 
619
618
  export default {
620
619
  ...config,
621
- // 组合排序 [选项: 前端默认] 本质就是给常用指标排序用的, 用的就是常用指标的数据源
620
+ // 组合排序 [选项: 组件默认] 本质就是给常用指标排序用的, 用的就是常用指标的数据源
622
621
  compositeOrder: {
623
622
  show: true,
624
623
  options: config.commonIndicator.options,
@@ -1,12 +1,15 @@
1
1
  <script setup name="VarietySearch">
2
- import { watch, computed, provide, ref } from "vue";
2
+ import { watch, computed, provide } from "vue";
3
3
  import defaultConfig from "./config.js";
4
4
  import FactorScreen from "./components/FactorScreen/index.vue";
5
5
  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({ config: { type: Object, default: {} } });
9
+ const props = defineProps({
10
+ config: { type: Object, default: {} },
11
+ pageName: { type: String, default: "" },
12
+ });
10
13
  const searchData = defineModel("searchData");
11
14
  searchData.value = Object.assign(searchData.value, {
12
15
  // 品种市场
@@ -83,10 +86,6 @@ const marketIdsOptionDict = computed(() => {
83
86
  return config.value.marketIds.options;
84
87
  }
85
88
  });
86
- // 选项数据源: 自定标签
87
- const customTagDict = computed(() => {
88
- return config.value.customTag.options;
89
- });
90
89
  // 选项数据源: 价差转换
91
90
  const jcOptions = computed(() => {
92
91
  return config.value.jcTranslate.jcOptions;
@@ -148,7 +147,7 @@ watch(
148
147
  return newValue.find(({ value }) => value === id);
149
148
  });
150
149
  }
151
- }
150
+ },
152
151
  );
153
152
  // 监视: 上市市场数据源
154
153
  watch(
@@ -160,7 +159,7 @@ watch(
160
159
  return newValue.find(({ value }) => value === id);
161
160
  });
162
161
  }
163
- }
162
+ },
164
163
  );
165
164
 
166
165
  provide("clearRow", clearRow);
@@ -555,9 +554,7 @@ defineExpose({
555
554
  <span>自定标签: </span>
556
555
  <span @click="clearRow('customTag')">不限</span>
557
556
  </div>
558
- <AddTag
559
- v-model:data="searchData.customTag"
560
- />
557
+ <AddTag v-model:data="searchData.customTag" />
561
558
  </div>
562
559
  </template>
563
560
  <!-- 价差转换 -->
@@ -603,6 +600,7 @@ defineExpose({
603
600
  <FactorScreen
604
601
  v-model:data="searchData.factorScreen"
605
602
  :config="config.factorScreen"
603
+ :pageName="pageName"
606
604
  />
607
605
  </div>
608
606
  </template>
@@ -619,6 +617,7 @@ defineExpose({
619
617
  :varietyMarket="searchData.varietyMarket"
620
618
  :commonOption="searchData.commonOption"
621
619
  :config="config.compositeOrder"
620
+ :pageName="pageName"
622
621
  />
623
622
  </div>
624
623
  </template>