st-comp 0.0.277 → 0.0.279

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 (319) hide show
  1. package/README.md +19 -19
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +1 -1
  4. package/es/ConfigProvider.cjs +1 -1
  5. package/es/ConfigProvider.js +3 -3
  6. package/es/Contextmenu.cjs +1 -1
  7. package/es/Contextmenu.js +7 -7
  8. package/es/CustomFunction.cjs +2 -2
  9. package/es/CustomFunction.js +514 -308
  10. package/es/FactorWarning.cjs +1 -1
  11. package/es/FactorWarning.js +37 -37
  12. package/es/HeatMap.cjs +1 -1
  13. package/es/HeatMap.js +7 -7
  14. package/es/Kline.cjs +1 -1
  15. package/es/Kline.js +18 -18
  16. package/es/KlineBasic.cjs +1 -1
  17. package/es/KlineBasic.js +93 -93
  18. package/es/KlineConfig.cjs +1 -1
  19. package/es/KlineConfig.js +17 -17
  20. package/es/KlineNew.cjs +1 -1
  21. package/es/KlineNew.js +14 -14
  22. package/es/KlinePlus.cjs +4 -4
  23. package/es/KlinePlus.js +760 -656
  24. package/es/LinearLegend.cjs +1 -1
  25. package/es/LinearLegend.js +1 -1
  26. package/es/Map.cjs +1 -1
  27. package/es/Map.js +1 -1
  28. package/es/MonacoEditor.cjs +1 -1
  29. package/es/MonacoEditor.js +18 -18
  30. package/es/Pagination.cjs +1 -1
  31. package/es/Pagination.js +76 -76
  32. package/es/PasswordPrompt.cjs +1 -1
  33. package/es/PasswordPrompt.js +2 -2
  34. package/es/Pie.cjs +2 -2
  35. package/es/Pie.js +14 -14
  36. package/es/Table.cjs +1 -1
  37. package/es/Table.js +22 -22
  38. package/es/TreeMap.cjs +1 -1
  39. package/es/TreeMap.js +4 -4
  40. package/es/User.cjs +1 -1
  41. package/es/User.js +73 -73
  42. package/es/VarSelectDialog.cjs +2 -2
  43. package/es/VarSelectDialog.js +21 -21
  44. package/es/VarietyAiHelper.cjs +4 -4
  45. package/es/VarietyAiHelper.js +139 -138
  46. package/es/VarietyAutoComplete.cjs +1 -1
  47. package/es/VarietyAutoComplete.js +16 -16
  48. package/es/VarietySearch.cjs +4 -4
  49. package/es/VarietySearch.js +861 -857
  50. package/es/{VarietySelect-6a166293.js → VarietySelect-41daac7b.js} +10 -10
  51. package/es/{VarietySelect-610903f0.cjs → VarietySelect-d58eee29.cjs} +1 -1
  52. package/es/VarietyTextCopy.cjs +2 -2
  53. package/es/VarietyTextCopy.js +25 -25
  54. package/es/VirtualTable.cjs +1 -1
  55. package/es/VirtualTable.js +6 -6
  56. package/es/{_initCloneObject-152b4f4e.js → _initCloneObject-5e73c9c8.js} +2 -2
  57. package/es/{_initCloneObject-76e116d0.cjs → _initCloneObject-a5832933.cjs} +1 -1
  58. package/es/aiTools-229609fb.cjs +2 -0
  59. package/es/aiTools-ce2f9281.js +115 -0
  60. package/es/aiTools.js +179 -176
  61. package/es/{config-provider-4c784baf.cjs → config-provider-06ea6b42.cjs} +1 -1
  62. package/es/{config-provider-7a3aca55.js → config-provider-88b637a8.js} +3 -3
  63. package/es/{dropdown-987c47fb.cjs → dropdown-4ce4c3e2.cjs} +1 -1
  64. package/es/{dropdown-01e09205.js → dropdown-72fbc15d.js} +2 -2
  65. package/es/{el-autocomplete-342ae823.js → el-autocomplete-6cafcdf1.js} +5 -5
  66. package/es/{el-autocomplete-16f66b34.cjs → el-autocomplete-e0857c5b.cjs} +1 -1
  67. package/es/{el-button-13dc915f.cjs → el-button-613e0bb2.cjs} +1 -1
  68. package/es/{el-button-314171a0.js → el-button-94d3de38.js} +3 -3
  69. package/es/{el-checkbox-5899681f.js → el-checkbox-6d4cb393.js} +3 -3
  70. package/es/{el-checkbox-bdf64663.cjs → el-checkbox-e90762df.cjs} +1 -1
  71. package/es/{el-dialog-0ef95df6.cjs → el-dialog-02942e22.cjs} +1 -1
  72. package/es/{el-dialog-86a3eec2.js → el-dialog-5e30161f.js} +4 -4
  73. package/es/{el-form-item-77ef6784.cjs → el-form-item-44f060d8.cjs} +1 -1
  74. package/es/{el-form-item-cda4d93c.js → el-form-item-9e8969ea.js} +5 -5
  75. package/es/{el-input-fa1445ad.js → el-input-342b2def.js} +13 -13
  76. package/es/{el-input-89222943.cjs → el-input-9a9a7f7f.cjs} +1 -1
  77. package/es/{el-input-number-d3338e5e.cjs → el-input-number-65c847d6.cjs} +1 -1
  78. package/es/{el-input-number-8f6dbf74.js → el-input-number-c22b803a.js} +35 -35
  79. package/es/{el-loading-84dde1a8.cjs → el-loading-8179b497.cjs} +1 -1
  80. package/es/{el-loading-9b671203.js → el-loading-bcc51e3d.js} +1 -1
  81. package/es/{el-menu-item-535fef90.js → el-menu-item-339baf6d.js} +21 -21
  82. package/es/{el-menu-item-4531fd0e.cjs → el-menu-item-83186444.cjs} +1 -1
  83. package/es/{el-message-box-621ed2f1.js → el-message-box-035b699c.js} +9 -9
  84. package/es/{el-message-box-f5717070.cjs → el-message-box-c62d3217.cjs} +1 -1
  85. package/es/{el-overlay-23de4324.js → el-overlay-3e17604b.js} +3 -3
  86. package/es/{el-overlay-151708cb.cjs → el-overlay-8f1da9e8.cjs} +1 -1
  87. package/es/{el-popconfirm-b8aa490e.cjs → el-popconfirm-4e32ec1b.cjs} +1 -1
  88. package/es/{el-popconfirm-bcff0aa5.js → el-popconfirm-f8a86e2c.js} +4 -4
  89. package/es/{el-popper-43ec37f4.cjs → el-popper-a4f3ae4d.cjs} +1 -1
  90. package/es/{el-popper-03988662.js → el-popper-fbd0dcea.js} +1 -1
  91. package/es/{el-segmented-db3a86be.js → el-segmented-56bd58a8.js} +2 -2
  92. package/es/{el-segmented-79a1367c.cjs → el-segmented-833ac177.cjs} +1 -1
  93. package/es/{el-select-4bd0010d.js → el-select-44fa547d.js} +8 -8
  94. package/es/{el-select-ec04e7ce.cjs → el-select-70806166.cjs} +1 -1
  95. package/es/{el-table-column-35e47229.cjs → el-table-column-3e2cdfca.cjs} +1 -1
  96. package/es/{el-table-column-7af2bec7.js → el-table-column-b74a857d.js} +9 -9
  97. package/es/{el-tag-bef9e83d.js → el-tag-66c83156.js} +2 -2
  98. package/es/{el-tag-5d5608e0.cjs → el-tag-9c2f329f.cjs} +1 -1
  99. package/es/{el-text-f998902c.js → el-text-034bd3f4.js} +1 -1
  100. package/es/{el-text-abf10fdf.cjs → el-text-6b2374bb.cjs} +1 -1
  101. package/es/index-00f6ca75.cjs +1 -0
  102. package/es/{index-a00e0534.cjs → index-185792a7.cjs} +1 -1
  103. package/es/{index-d1b554ac.js → index-1e2a38ab.js} +2 -2
  104. package/es/{index-0986e373.cjs → index-3153c1db.cjs} +1 -1
  105. package/es/{index-936e7dec.js → index-44a382a5.js} +2 -2
  106. package/es/{index-ce21e2ce.js → index-5216d5f5.js} +5 -5
  107. package/es/{index-7ed0999e.js → index-53cc4e43.js} +720 -716
  108. package/es/{index-cfcd60ca.cjs → index-5c0dd943.cjs} +1 -1
  109. package/es/{index-cfd00899.cjs → index-870b6c9d.cjs} +1 -1
  110. package/es/{index-a83ec4b7.js → index-8c2d7e05.js} +1 -1
  111. package/es/{index-8901a38c.cjs → index-94131fd7.cjs} +30 -30
  112. package/es/{index-db846633.cjs → index-9d16cea8.cjs} +1 -1
  113. package/es/{index-f3f6ee27.js → index-a33b2fb8.js} +178 -178
  114. package/es/{index-2d7ac156.cjs → index-a9246d17.cjs} +17 -17
  115. package/es/{index-60c69dd1.cjs → index-ac8dc53d.cjs} +1 -1
  116. package/es/{index-102edf6c.js → index-c5f2d372.js} +2 -2
  117. package/es/{index-6290ae0f.js → index-c6584658.js} +2 -2
  118. package/es/{index-5c44d71a.js → index-eb96e074.js} +149 -119
  119. package/es/{index-5ed42e9c.js → index-f034b910.js} +2 -2
  120. package/es/{index-c58e90e9.cjs → index-f58b2920.cjs} +1 -1
  121. package/es/{python-6cc6ec1b.js → python-8a1664e6.js} +18 -18
  122. package/es/{python-71f59893.cjs → python-a3db9620.cjs} +1 -1
  123. package/es/style.css +1 -1
  124. package/es/{use-form-common-props-02be4928.cjs → use-form-common-props-ac666630.cjs} +1 -1
  125. package/es/{use-form-common-props-76a09d89.js → use-form-common-props-ed72e914.js} +11 -11
  126. package/es/{use-global-config-31b3ec57.cjs → use-global-config-23472471.cjs} +1 -1
  127. package/es/{use-global-config-0f43458b.js → use-global-config-ee406d58.js} +2 -2
  128. package/es/{validator-ea292506.cjs → validator-366dbf39.cjs} +1 -1
  129. package/es/{validator-0e037618.js → validator-c60a8956.js} +1 -1
  130. package/es/{zh-cn-1227eb8a.js → zh-cn-b59a0910.js} +1 -1
  131. package/es/{zh-cn-0edc7234.cjs → zh-cn-c21d12d8.cjs} +1 -1
  132. package/lib/aiTools.js +179 -176
  133. package/lib/bundle.js +1 -1
  134. package/lib/bundle.umd.cjs +230 -230
  135. package/lib/{index-2a269748.js → index-62fa175a.js} +30149 -29800
  136. package/lib/{python-41da18e5.js → python-4a48fa39.js} +1 -1
  137. package/lib/style.css +1 -1
  138. package/package.json +53 -44
  139. package/auto-imports.d.ts +0 -13
  140. package/components.d.ts +0 -59
  141. package/es/aiTools-a3b095f6.js +0 -113
  142. package/es/aiTools-f36136a4.cjs +0 -2
  143. package/es/index-476c4459.cjs +0 -1
  144. package/index.html +0 -13
  145. package/packages/ChartLayout/index.ts +0 -8
  146. package/packages/ChartLayout/index.vue +0 -63
  147. package/packages/ConfigProvider/index.ts +0 -8
  148. package/packages/ConfigProvider/index.vue +0 -66
  149. package/packages/Contextmenu/index.ts +0 -8
  150. package/packages/Contextmenu/index.vue +0 -134
  151. package/packages/CustomFunction/components/ManageDialog.vue +0 -706
  152. package/packages/CustomFunction/index.ts +0 -8
  153. package/packages/CustomFunction/index.vue +0 -200
  154. package/packages/FactorWarning/index.ts +0 -8
  155. package/packages/FactorWarning/index.vue +0 -754
  156. package/packages/FactorWarning/tools.js +0 -10
  157. package/packages/HeatMap/index.ts +0 -8
  158. package/packages/HeatMap/index.vue +0 -141
  159. package/packages/Kline/components/Contextmenu/index.vue +0 -110
  160. package/packages/Kline/components/Tips/index.vue +0 -40
  161. package/packages/Kline/componentsNew/KlineSlide/index.vue +0 -155
  162. package/packages/Kline/componentsNew/KlineSub/index.vue +0 -297
  163. package/packages/Kline/componentsNew/KlineTips/index.vue +0 -66
  164. package/packages/Kline/componentsNew/KlineUtils/index.vue +0 -84
  165. package/packages/Kline/componentsNew/Tips/index.vue +0 -33
  166. package/packages/Kline/formatKlineData.ts +0 -109
  167. package/packages/Kline/images/buy.svg +0 -1
  168. package/packages/Kline/images/pen.png +0 -0
  169. package/packages/Kline/images/sell.svg +0 -1
  170. package/packages/Kline/images/t.svg +0 -1
  171. package/packages/Kline/index.ts +0 -16
  172. package/packages/Kline/index.vue +0 -891
  173. package/packages/Kline/option.ts +0 -539
  174. package/packages/Kline/type.d.ts +0 -219
  175. package/packages/Kline/utils.ts +0 -682
  176. package/packages/KlineBasic/api.js +0 -58
  177. package/packages/KlineBasic/components/AverageTips/index.vue +0 -33
  178. package/packages/KlineBasic/components/Contextmenu/index.vue +0 -105
  179. package/packages/KlineBasic/components/KlineSub/index.vue +0 -332
  180. package/packages/KlineBasic/components/KlineTips/index.vue +0 -99
  181. package/packages/KlineBasic/components/Tips/index.vue +0 -56
  182. package/packages/KlineBasic/index.ts +0 -8
  183. package/packages/KlineBasic/index.vue +0 -839
  184. package/packages/KlineBasic/utils.js +0 -258
  185. package/packages/KlineConfig/config.js +0 -46
  186. package/packages/KlineConfig/index.ts +0 -8
  187. package/packages/KlineConfig/index.vue +0 -356
  188. package/packages/KlineNew/components/KlineSlide/index.vue +0 -156
  189. package/packages/KlineNew/components/KlineSub/index.vue +0 -335
  190. package/packages/KlineNew/components/KlineTips/index.vue +0 -96
  191. package/packages/KlineNew/components/KlineUtils/index.vue +0 -341
  192. package/packages/KlineNew/components/Tips/index.vue +0 -33
  193. package/packages/KlineNew/index.ts +0 -14
  194. package/packages/KlinePlus/components/SliderChart.vue +0 -208
  195. package/packages/KlinePlus/components/Tips.vue +0 -36
  196. package/packages/KlinePlus/images/buy.svg +0 -1
  197. package/packages/KlinePlus/images/sell.svg +0 -1
  198. package/packages/KlinePlus/images/t.svg +0 -1
  199. package/packages/KlinePlus/index.ts +0 -8
  200. package/packages/KlinePlus/index.vue +0 -1067
  201. package/packages/KlinePlus/utils.js +0 -771
  202. package/packages/LinearLegend/index.ts +0 -8
  203. package/packages/LinearLegend/index.vue +0 -112
  204. package/packages/Map/China.json +0 -1
  205. package/packages/Map/index.ts +0 -8
  206. package/packages/Map/index.vue +0 -147
  207. package/packages/MonacoEditor/index.ts +0 -8
  208. package/packages/MonacoEditor/index.vue +0 -1141
  209. package/packages/MonacoEditor/tools.js +0 -18
  210. package/packages/Pagination/index.ts +0 -8
  211. package/packages/Pagination/index.vue +0 -87
  212. package/packages/PasswordPrompt/index.ts +0 -8
  213. package/packages/PasswordPrompt/index.vue +0 -267
  214. package/packages/Pie/index.ts +0 -8
  215. package/packages/Pie/index.vue +0 -148
  216. package/packages/Table/components/Button/index.vue +0 -61
  217. package/packages/Table/components/Formatter/index.vue +0 -26
  218. package/packages/Table/index.d.ts +0 -0
  219. package/packages/Table/index.ts +0 -8
  220. package/packages/Table/index.vue +0 -133
  221. package/packages/TreeMap/index.ts +0 -8
  222. package/packages/TreeMap/index.vue +0 -186
  223. package/packages/User/components/EditInfoDialog/Mobile.vue +0 -214
  224. package/packages/User/components/EditInfoDialog/index.vue +0 -161
  225. package/packages/User/components/EditPasswordDialog.vue +0 -168
  226. package/packages/User/components/SetPasswordDialog.vue +0 -160
  227. package/packages/User/index.ts +0 -8
  228. package/packages/User/index.vue +0 -117
  229. package/packages/VarSelectDialog/Mock.js +0 -495
  230. package/packages/VarSelectDialog/VarietySelect.vue +0 -78
  231. package/packages/VarSelectDialog/index.ts +0 -8
  232. package/packages/VarSelectDialog/index.vue +0 -323
  233. package/packages/VarietyAiHelper/images/like.png +0 -0
  234. package/packages/VarietyAiHelper/images/like_no.png +0 -0
  235. package/packages/VarietyAiHelper/index.ts +0 -8
  236. package/packages/VarietyAiHelper/index.vue +0 -910
  237. package/packages/VarietyAutoComplete/index.ts +0 -8
  238. package/packages/VarietyAutoComplete/index.vue +0 -89
  239. package/packages/VarietySearch/components/AddTag/index.vue +0 -268
  240. package/packages/VarietySearch/components/CommonIndicator/IndicatorTags.vue +0 -52
  241. package/packages/VarietySearch/components/CommonIndicator/index.vue +0 -697
  242. package/packages/VarietySearch/components/CommonIndicator/tools.js +0 -260
  243. package/packages/VarietySearch/components/CompositeOrder/index.vue +0 -260
  244. package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +0 -70
  245. package/packages/VarietySearch/components/FactorScreen/index.vue +0 -1158
  246. package/packages/VarietySearch/components/FactorScreen/tools.js +0 -34
  247. package/packages/VarietySearch/config.js +0 -539
  248. package/packages/VarietySearch/index.ts +0 -8
  249. package/packages/VarietySearch/index.vue +0 -688
  250. package/packages/VarietyTextCopy/index.ts +0 -8
  251. package/packages/VarietyTextCopy/index.vue +0 -136
  252. package/packages/VirtualTable/index.ts +0 -8
  253. package/packages/VirtualTable/index.vue +0 -241
  254. package/packages/index.ts +0 -59
  255. package/public/aiTools.js +0 -176
  256. package/public/talib.wasm +0 -0
  257. package/public/vite.svg +0 -1
  258. package/src/App.vue +0 -140
  259. package/src/assets/vue.svg +0 -1
  260. package/src/components/Dialog/index.vue +0 -16
  261. package/src/components/Kline/index.vue +0 -21
  262. package/src/components/Table/index.vue +0 -27
  263. package/src/main.ts +0 -17
  264. package/src/pages/ChartLayout/index.vue +0 -22
  265. package/src/pages/ConfigProvider/index.vue +0 -9
  266. package/src/pages/Contextmenu/index.vue +0 -46
  267. package/src/pages/CustomFunction/index.vue +0 -13
  268. package/src/pages/FactorWarning/index.vue +0 -203
  269. package/src/pages/HeatMap/index.vue +0 -128
  270. package/src/pages/Kline/index.vue +0 -12
  271. package/src/pages/KlineBasic/api.js +0 -48
  272. package/src/pages/KlineBasic/index.vue +0 -366
  273. package/src/pages/KlineBasic/indicator.js +0 -114
  274. package/src/pages/KlineConfig/index.vue +0 -20
  275. package/src/pages/KlineNew/components/KlineAction/components/ContextMenu/index.vue +0 -91
  276. package/src/pages/KlineNew/components/KlineAction/components/YearChart/index.vue +0 -532
  277. package/src/pages/KlineNew/components/KlineAction/images/pen.png +0 -0
  278. package/src/pages/KlineNew/components/KlineAction/index.vue +0 -716
  279. package/src/pages/KlineNew/components/KlineAction/mockApi/index.js +0 -13
  280. package/src/pages/KlineNew/components/KlineAction/utils.js +0 -571
  281. package/src/pages/KlineNew/components/KlineBasic/index.vue +0 -336
  282. package/src/pages/KlineNew/components/KlineBasic/utils.js +0 -46
  283. package/src/pages/KlineNew/components/KlineNew/index.vue +0 -316
  284. package/src/pages/KlineNew/components/KlineNew/utils.js +0 -31
  285. package/src/pages/KlineNew/components/KlineSlide/index.vue +0 -448
  286. package/src/pages/KlineNew/components/KlineSlide/utils.js +0 -78
  287. package/src/pages/KlineNew/components/KlineSlideNew/index.vue +0 -430
  288. package/src/pages/KlineNew/components/KlineSlideNew/utils.js +0 -78
  289. package/src/pages/KlineNew/index.vue +0 -92
  290. package/src/pages/KlinePlus/KlineDialog/MultiCycle.vue +0 -312
  291. package/src/pages/KlinePlus/KlineDialog/api.js +0 -108
  292. package/src/pages/KlinePlus/KlineDialog/index.vue +0 -582
  293. package/src/pages/KlinePlus/KlineDialog/indicator.js +0 -109
  294. package/src/pages/KlinePlus/KlineDialog/tools.js +0 -86
  295. package/src/pages/KlinePlus/index.vue +0 -30
  296. package/src/pages/KlinePlus/tradeLogMock.js +0 -1927
  297. package/src/pages/LinearLegend/index.vue +0 -92
  298. package/src/pages/Map/index.vue +0 -62
  299. package/src/pages/MonacoEditor/index.vue +0 -63
  300. package/src/pages/Pagination/index.vue +0 -24
  301. package/src/pages/PasswordPrompt/index.vue +0 -12
  302. package/src/pages/Pie/index.vue +0 -36
  303. package/src/pages/Table/index.vue +0 -117
  304. package/src/pages/TreeMap/index.vue +0 -542
  305. package/src/pages/User/index.vue +0 -24
  306. package/src/pages/VarSelectDialog/index.vue +0 -16
  307. package/src/pages/VarietyAiHelper/index.vue +0 -20
  308. package/src/pages/VarietyAutoComplete/index.vue +0 -19
  309. package/src/pages/VarietySearch/api.js +0 -70
  310. package/src/pages/VarietySearch/index.vue +0 -467
  311. package/src/pages/VarietyTextCopy/index.vue +0 -24
  312. package/src/pages/VirtualTable/demo.json +0 -6377
  313. package/src/pages/VirtualTable/index.vue +0 -79
  314. package/src/router/index.ts +0 -9
  315. package/src/router/routes.ts +0 -132
  316. package/src/style.css +0 -79
  317. package/src/vite-env.d.ts +0 -9
  318. package/tsconfig.json +0 -30
  319. package/tsconfig.node.json +0 -10
@@ -1,688 +0,0 @@
1
- <script setup name="VarietySearch">
2
- import { watch, computed, provide } from "vue";
3
- import defaultConfig from "./config.js";
4
- import FactorScreen from "./components/FactorScreen/index.vue";
5
- import CommonIndicator from "./components/CommonIndicator/index.vue";
6
- import CompositeOrder from "./components/CompositeOrder/index.vue";
7
- import AddTag from "./components/AddTag/index.vue";
8
-
9
- const emit = defineEmits(["actionState"]);
10
- const props = defineProps({ config: { type: Object, default: {} } });
11
- const searchData = defineModel("searchData");
12
- searchData.value = Object.assign(searchData.value, {
13
- // 品种市场
14
- varietyMarket: null,
15
- // 常用选项
16
- commonOption: [],
17
- // 上市板块
18
- marketIds: [],
19
- // 自定标签
20
- customTag: [],
21
- // 价差转换
22
- jcTranslate: {
23
- type: null,
24
- jcList: [],
25
- },
26
- // 因子筛选
27
- factorScreen: {
28
- list: [],
29
- sqlEnable: 0,
30
- sqlValue: null,
31
- factorSelectExpr: "",
32
- },
33
- // 常用指标
34
- commonIndicator: [],
35
- // 组合排序
36
- compositeOrder: [],
37
- });
38
-
39
- // 合并配置项
40
- const config = computed(() => {
41
- const result = {};
42
- Object.keys(defaultConfig).forEach((key) => {
43
- const oldObj = defaultConfig[key];
44
- const newObj = props.config[key] ?? {};
45
- const mergeObj = { ...oldObj, ...newObj };
46
- result[key] = mergeObj;
47
- });
48
- return result;
49
- });
50
-
51
- // 选项数据源: 品种市场
52
- const varietyMarketDict = computed(() => {
53
- return config.value.varietyMarket.options;
54
- });
55
- // 选项数据源: 常用选项
56
- const commonOptionDict = computed(() => {
57
- const { varietyMarket } = searchData.value;
58
- // 已选品种市场,仅展示匹配的
59
- if (varietyMarket) {
60
- const memo = varietyMarketDict.value.find(({ value }) => value === varietyMarket)?.memo ?? [];
61
- // 按照memo的顺序进行数据排序
62
- return memo.reduce((result, value) => {
63
- const commonItem = config.value.commonOption.options.find((i) => i.value === value);
64
- commonItem && result.push(commonItem);
65
- return result;
66
- }, []);
67
- }
68
- // 未选品种市场,展示全部
69
- else {
70
- return config.value.commonOption.options;
71
- }
72
- });
73
- // 选项数据源: 上市市场
74
- const marketIdsOptionDict = computed(() => {
75
- const { varietyMarket } = searchData.value;
76
- // 已选品种市场, 仅展示匹配的
77
- if (varietyMarket) {
78
- return config.value.marketIds.options.filter((item) => {
79
- return item.varietyMarketIds.includes(varietyMarket);
80
- });
81
- }
82
- // 未选品种市场,展示全部
83
- else {
84
- return config.value.marketIds.options;
85
- }
86
- });
87
- // 选项数据源: 价差转换
88
- const jcOptions = computed(() => {
89
- return config.value.jcTranslate.jcOptions;
90
- });
91
-
92
- // 不限
93
- const clearRow = (key) => {
94
- switch (key) {
95
- case "commonOption": {
96
- searchData.value[key] = [];
97
- break;
98
- }
99
- case "marketIds": {
100
- searchData.value[key] = [];
101
- break;
102
- }
103
- case "customTag": {
104
- searchData.value[key] = [];
105
- break;
106
- }
107
- case "jcTranslate": {
108
- searchData.value[key] = {
109
- type: null,
110
- jcList: [],
111
- };
112
- break;
113
- }
114
- case "factorScreen": {
115
- searchData.value[key] = {
116
- list: [],
117
- sqlEnable: 0,
118
- sqlValue: null,
119
- factorSelectExpr: "",
120
- };
121
- break;
122
- }
123
- case "commonIndicator": {
124
- searchData.value[key] = [];
125
- break;
126
- }
127
- case "compositeOrder": {
128
- searchData.value[key] = [];
129
- break;
130
- }
131
- default: {
132
- searchData.value[key] = null;
133
- break;
134
- }
135
- }
136
- };
137
-
138
- // 监视: 常用选项数据源
139
- watch(
140
- () => commonOptionDict.value,
141
- (newValue) => {
142
- // 如果常用选项已经进行了勾选, 则只保留常用选项中存在的值
143
- if (searchData.value.commonOption?.length) {
144
- searchData.value.commonOption = searchData.value.commonOption.filter((id) => {
145
- return newValue.find(({ value }) => value === id);
146
- });
147
- }
148
- },
149
- );
150
- // 监视: 上市市场数据源
151
- watch(
152
- () => marketIdsOptionDict.value,
153
- (newValue) => {
154
- // 如果常用选项已经进行了勾选, 则只保留常用选项中存在的值
155
- if (searchData.value.marketIds?.length) {
156
- searchData.value.marketIds = searchData.value.marketIds.filter((id) => {
157
- return newValue.find(({ value }) => value === id);
158
- });
159
- }
160
- },
161
- );
162
-
163
- provide("clearRow", clearRow);
164
- defineExpose({
165
- // 生成接口传参结构的数据
166
- formatData: (data) => {
167
- console.log("%c[st-varietySearch]: 正在生成接口传参...", "color: tomato");
168
- const params = {};
169
- // 1.品种市场
170
- if (data.varietyMarket) {
171
- params.exchangeId = String(data.varietyMarket);
172
- }
173
- // 2.常用选项
174
- if (data.commonOption?.length) {
175
- params.optionId = data.commonOption.join(",");
176
- }
177
- // 3.上市板块
178
- if (data.marketIds?.length) {
179
- params.marketIds = data.marketIds;
180
- }
181
- // 4.自定标签
182
- if (data.customTag?.length) {
183
- params.tagIds = data.customTag;
184
- }
185
- // 5.价差转换
186
- if (config.value.jcTranslate?.show) {
187
- const { jcTranslate } = data;
188
- const { type, jcList } = jcTranslate;
189
- switch (type) {
190
- case 1: {
191
- params.translateType = 1;
192
- params.jcType = jcList.join(",");
193
- break;
194
- }
195
- case 2: {
196
- params.translateType = 2;
197
- }
198
- }
199
- }
200
- // 6.因子筛选
201
- if (config.value.factorScreen?.show) {
202
- const { factorScreen } = data;
203
- // tbFeatureFactorScores参数整理
204
- if (factorScreen?.list?.length) {
205
- params.tbFeatureFactorScores = factorScreen.list.map((item) => {
206
- switch (item.key) {
207
- // 对比
208
- case "compare": {
209
- return {
210
- freqId: item.cycle,
211
- factorId: item.factor,
212
- compareType: item.compareType,
213
- freqId2: item.cycle2,
214
- factorId2: item.factor2,
215
- };
216
- }
217
- // 常规
218
- default: {
219
- return {
220
- freqId: item.cycle,
221
- factorId: item.factor,
222
- startScore: item.score[0],
223
- endScore: item.score[1],
224
- };
225
- }
226
- }
227
- });
228
- }
229
- // sql参数整理
230
- if (factorScreen.sqlEnable) {
231
- const conditions = factorScreen.list.reduce((result, item, index) => {
232
- const key = `条件${index + 1}`;
233
- switch (item.key) {
234
- case "compare": {
235
- let sql = "";
236
- if (config.value.factorScreen?.cycleShow) {
237
- sql = `freq_id = ${item.cycle} and factor_id = ${item.factor} ${item.compareType} freq_id = ${item.cycle2} and factor_id = ${item.factor2}`;
238
- } else {
239
- sql = `factor_id = ${item.factor} ${item.compareType} factor_id = ${item.factor2}`;
240
- }
241
- result.set(key, `(${sql})`);
242
- break;
243
- }
244
- default: {
245
- let sql = `factor_id = ${item.factor} and `;
246
- if (config.value.factorScreen?.cycleShow) sql = `freq_id = ${item.cycle} and factor_id = ${item.factor} and `;
247
- // 分数语句
248
- if ((item.score[0] || item.score[0] === 0) && (item.score[1] || item.score[1] === 0)) {
249
- sql += `score >= ${item.score[0]} and score <= ${item.score[1]}`;
250
- } else if (item.score[0] || item.score[0] === 0) {
251
- sql += `score >= ${item.score[0]}`;
252
- } else if (item.score[1] || item.score[1] === 0) {
253
- sql += `score <= ${item.score[1]}`;
254
- }
255
- result.set(key, `(${sql})`);
256
- }
257
- }
258
- return result;
259
- }, new Map([]));
260
- // 将(SQL语句)与(字符串条件N)进行替换
261
- let sqlStr = factorScreen.sqlValue;
262
- for (const [key, value] of conditions) {
263
- const regex = new RegExp(key, "g");
264
- sqlStr = sqlStr.replace(regex, value);
265
- }
266
- params.sql = sqlStr;
267
- params.sqlExpression = factorScreen.sqlValue;
268
- }
269
- // enableSql参数整理
270
- params.enableSql = factorScreen.sqlEnable === 1 ? 2 : 1;
271
- // 2.因子筛选表达式
272
- if (factorScreen.factorSelectExpr) {
273
- params.factorSelectExpr = factorScreen.factorSelectExpr;
274
- }
275
- }
276
- // 7.常用指标
277
- {
278
- const QIQUANKYES = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"];
279
- // 基本面(type: undefined的指标, 且[期权]的常用指标不计入基本面)
280
- const query = data.commonIndicator.reduce((result, item) => {
281
- const { key, type, range, unit, radioType, radio, rankRange } = item;
282
- // 主力净流入资金
283
- if (key === "mainFlow") {
284
- let [start, end] = rankRange;
285
- let column = radioType === "0" ? `netInfow${radio}d` : `last${radio}DayMainFlowRank`;
286
- result.push({ column, start, end });
287
- }
288
- // 年报审计意见
289
- else if (key === "auditOpinionType") {
290
- result.push({ column: item.key, enumType: item.enumType });
291
- }
292
- // 排名模式
293
- else if (radioType === "1") {
294
- params.sortBy = {
295
- column: item.key,
296
- start: rankRange[0] || null,
297
- end: rankRange[1] || null,
298
- };
299
- }
300
- // 需要传递原始值的, 即除100
301
- else if (["dividendYield", "incrementRevenueLyr", "netProfitGrowthRatioLyr", "fiveYearRoe"].includes(key)) {
302
- let [start, end] = range;
303
- if (!["", null].includes(start)) start = start / 100;
304
- if (!["", null].includes(end)) end = end / 100;
305
- result.push({
306
- column: item.key,
307
- start,
308
- end,
309
- });
310
- }
311
- // 其它基本面指标
312
- else if (type === undefined && !QIQUANKYES.includes(key)) {
313
- let [start, end] = range;
314
- if (!["", null].includes(start)) {
315
- switch (unit[0]) {
316
- case "亿":
317
- start = start * 100000000;
318
- break;
319
- case "千万":
320
- start = start * 10000000;
321
- break;
322
- default:
323
- start = start;
324
- break;
325
- }
326
- }
327
- if (!["", null].includes(end)) {
328
- switch (unit[1]) {
329
- case "亿":
330
- end = end * 100000000;
331
- break;
332
- case "千万":
333
- end = end * 10000000;
334
- break;
335
- default:
336
- end = end;
337
- break;
338
- }
339
- }
340
- result.push({
341
- column: item.key,
342
- start,
343
- end,
344
- });
345
- }
346
- return result;
347
- }, []);
348
- // 是否ST
349
- const stIndicator = data.commonIndicator.find(({ key }) => key === "st");
350
- if (stIndicator) {
351
- params.st = stIndicator.st;
352
- }
353
- // 净利润
354
- const netProfitQueryDto = data.commonIndicator.find(({ key }) => key === "tFeaturelncomes");
355
- if (netProfitQueryDto) {
356
- params.netProfitQueryDto = { ...netProfitQueryDto, netProfit: netProfitQueryDto.netProfit * 100000000.0 };
357
- }
358
- // 股价分位
359
- const priceLevelIndicator = data.commonIndicator.find(({ key }) => key === "priceLevels");
360
- if (priceLevelIndicator) {
361
- params.priceLevels = priceLevelIndicator.priceLevels;
362
- }
363
- // 市盈率分位
364
- const peTtmLevelIndicator = data.commonIndicator.find(({ key }) => key === "peTtmLevels");
365
- if (peTtmLevelIndicator) {
366
- params.peTtmLevels = peTtmLevelIndicator.peTtmLevels;
367
- }
368
- // 市盈率估值走势分位
369
- const peTrendTtmLevelIndicator = data.commonIndicator.find(({ key }) => key === "peTrendTtmLevels");
370
- if (peTrendTtmLevelIndicator) {
371
- params.peTrendTtmLevels = peTrendTtmLevelIndicator.peTrendTtmLevels;
372
- }
373
- // 成交量
374
- const perVolumnIndicator = data.commonIndicator.find(({ key }) => key === "perVolumn");
375
- if (perVolumnIndicator) {
376
- const { radioType, radio, levels, range, unit } = perVolumnIndicator;
377
-
378
- // 分位模式
379
- if (radioType === "2") {
380
- params.perVolumn = {
381
- type: radio,
382
- value: levels,
383
- };
384
- }
385
- // 数值模式(放入 query)
386
- if (radioType === "0") {
387
- let [start, end] = range;
388
- // 单位转换
389
- if (!["", null].includes(start)) {
390
- switch (unit?.[0]) {
391
- case "亿":
392
- start = start * 100000000;
393
- break;
394
- case "千万":
395
- start = start * 10000000;
396
- break;
397
- default:
398
- break;
399
- }
400
- }
401
- if (!["", null].includes(end)) {
402
- switch (unit?.[1]) {
403
- case "亿":
404
- end = end * 100000000;
405
- break;
406
- case "千万":
407
- end = end * 10000000;
408
- break;
409
- default:
410
- break;
411
- }
412
- }
413
- query.push({
414
- column: "volumn",
415
- start,
416
- end,
417
- });
418
- }
419
- }
420
-
421
- // 期权相关参数
422
- const searchOptionDto = {};
423
- data.commonIndicator.forEach((item) => {
424
- const { key } = item;
425
- switch (key) {
426
- // 过期时间
427
- case "expireDays":
428
- if (!["", null].includes(item.range[0])) searchOptionDto.minExpireDays = item.range[0];
429
- if (!["", null].includes(item.range[1])) searchOptionDto.maxExpireDays = item.range[1];
430
- break;
431
- // 虚实度
432
- case "virtualRealDegree":
433
- if (!["", null].includes(item.range[0])) searchOptionDto.minVirtualRealDegree = item.range[0] / 100;
434
- if (!["", null].includes(item.range[1])) searchOptionDto.maxVirtualRealDegree = item.range[1] / 100;
435
- break;
436
- // 年化收益率
437
- case "yearProfitRate":
438
- if (!["", null].includes(item.range[0])) searchOptionDto.minYearProfitRate = item.range[0] / 100;
439
- if (!["", null].includes(item.range[1])) searchOptionDto.maxYearProfitRate = item.range[1] / 100;
440
- break;
441
- // 隐含波动率
442
- case "impliedVolatility":
443
- if (!["", null].includes(item.range[0])) searchOptionDto.minImpliedVolatility = item.range[0] / 100;
444
- if (!["", null].includes(item.range[1])) searchOptionDto.maxImpliedVolatility = item.range[1] / 100;
445
- break;
446
- // 杠杆率
447
- case "levelMultiplier":
448
- if (!["", null].includes(item.range[0])) searchOptionDto.minLevelMultiplier = item.range[0];
449
- if (!["", null].includes(item.range[1])) searchOptionDto.maxLevelMultiplier = item.range[1];
450
- break;
451
- // 成交额(期权)
452
- case "turnover":
453
- if (item.radioType === "0" && !["", null].includes(item.range[0])) searchOptionDto.minTurnover = item.range[0] * 10000;
454
- if (item.radioType === "0" && !["", null].includes(item.range[1])) searchOptionDto.maxTurnover = item.range[1] * 10000;
455
- break;
456
- // 成交量(期权)
457
- case "volume":
458
- if (item.radioType === "0" && !["", null].includes(item.range[0])) searchOptionDto.minVolume = item.range[0];
459
- if (item.radioType === "0" && !["", null].includes(item.range[1])) searchOptionDto.maxVolume = item.range[1];
460
- break;
461
- // 持仓量
462
- case "openInterest":
463
- if (item.radioType === "0" && !["", null].includes(item.range[0])) searchOptionDto.minOpenInterest = item.range[0];
464
- if (item.radioType === "0" && !["", null].includes(item.range[1])) searchOptionDto.maxOpenInterest = item.range[1];
465
- break;
466
- // 认沽认购
467
- case "optionsCpType":
468
- searchOptionDto.optionsCpType = item.optionsCpType;
469
- break;
470
- // 期权档位
471
- case "optionGear":
472
- if (!["", null].includes(item.range[0])) searchOptionDto.minOptionGear = item.range[0];
473
- if (!["", null].includes(item.range[1])) searchOptionDto.maxOptionGear = item.range[1];
474
- break;
475
- }
476
- });
477
-
478
- if (query.length) {
479
- params.query = query;
480
- }
481
- if (Object.keys(searchOptionDto).length) {
482
- params.searchOptionDto = searchOptionDto;
483
- }
484
- }
485
- // 8.组合分析
486
- if (data.compositeOrder?.length) {
487
- params.compositeOrder = data.compositeOrder.map(({ name, value }) => ({ name, value }));
488
- }
489
- console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", params);
490
- return params;
491
- },
492
- // 重置函数
493
- reset: () => {
494
- searchData.value = {
495
- // 品种市场
496
- varietyMarket: null,
497
- // 常用选项
498
- commonOption: [],
499
- // 上市板块
500
- marketIds: [],
501
- // 自定标签
502
- customTag: [],
503
- // 价差转换
504
- jcTranslate: {
505
- type: null,
506
- jcList: [],
507
- },
508
- // 因子筛选
509
- factorScreen: {
510
- list: [],
511
- sqlEnable: 0,
512
- sqlValue: null,
513
- factorSelectExpr: "",
514
- },
515
- // 常用指标
516
- commonIndicator: [],
517
- // 组合排序
518
- compositeOrder: [],
519
- };
520
- },
521
- });
522
- </script>
523
-
524
- <template>
525
- <div class="variety-search">
526
- <!-- 品种市场 -->
527
- <template v-if="config.varietyMarket?.show">
528
- <div class="variety-search-row">
529
- <div class="title">
530
- <span>品种市场: </span>
531
- <span @click="clearRow('varietyMarket')">不限</span>
532
- </div>
533
- <el-radio-group
534
- v-model="searchData.varietyMarket"
535
- size="small"
536
- >
537
- <el-radio
538
- v-for="{ label, value } in varietyMarketDict"
539
- :label="label"
540
- :value="value"
541
- :key="value"
542
- />
543
- </el-radio-group>
544
- </div>
545
- </template>
546
- <!-- 常用选项 -->
547
- <template v-if="config.commonOption?.show && commonOptionDict.length">
548
- <div class="variety-search-row">
549
- <div class="title">
550
- <span>常用选项: </span>
551
- <span @click="clearRow('commonOption')">不限</span>
552
- </div>
553
- <el-checkbox-group
554
- v-model="searchData.commonOption"
555
- size="small"
556
- >
557
- <el-checkbox
558
- v-for="{ label, value } in commonOptionDict"
559
- :label="label"
560
- :value="value"
561
- :key="value"
562
- />
563
- </el-checkbox-group>
564
- </div>
565
- </template>
566
- <!-- 上市板块 -->
567
- <template v-if="config.marketIds?.show && marketIdsOptionDict.length">
568
- <div class="variety-search-row">
569
- <div class="title">
570
- <span>上市板块: </span>
571
- <span @click="clearRow('marketIds')">不限</span>
572
- </div>
573
- <el-checkbox-group
574
- v-model="searchData.marketIds"
575
- size="small"
576
- >
577
- <el-checkbox
578
- v-for="{ label, value } in marketIdsOptionDict"
579
- :label="label"
580
- :value="value"
581
- :key="value"
582
- />
583
- </el-checkbox-group>
584
- </div>
585
- </template>
586
- <!-- 自定标签 -->
587
- <template v-if="config.customTag?.show">
588
- <div class="variety-search-row">
589
- <div class="title">
590
- <span>自定标签: </span>
591
- <span @click="clearRow('customTag')">不限</span>
592
- </div>
593
- <AddTag v-model:data="searchData.customTag" />
594
- </div>
595
- </template>
596
- <!-- 价差转换 -->
597
- <template v-if="config.jcTranslate?.show">
598
- <div class="variety-search-row">
599
- <div class="title">
600
- <span>价差转换: </span>
601
- <span @click="clearRow('jcTranslate')">不限</span>
602
- </div>
603
- <el-radio-group
604
- v-model="searchData.jcTranslate.type"
605
- size="small"
606
- >
607
- <el-radio :value="2">价差转品种</el-radio>
608
- <el-radio :value="1">品种转价差</el-radio>
609
- </el-radio-group>
610
- <el-select
611
- v-show="searchData.jcTranslate.type === 1"
612
- v-model="searchData.jcTranslate.jcList"
613
- size="small"
614
- multiple
615
- collapse-tags
616
- collapse-tags-tooltip
617
- placeholder="请选择价差品种"
618
- style="width: 140px"
619
- >
620
- <el-option
621
- v-for="item in jcOptions"
622
- :key="item.value"
623
- :label="item.label"
624
- :value="item.value"
625
- />
626
- </el-select>
627
- </div>
628
- </template>
629
- <!-- 因子筛选 -->
630
- <template v-if="config.factorScreen?.show">
631
- <div class="variety-search-row">
632
- <div class="title">
633
- <span>因子筛选: </span>
634
- <span @click="clearRow('factorScreen')">不限</span>
635
- </div>
636
- <FactorScreen
637
- v-model:data="searchData.factorScreen"
638
- :config="config.factorScreen"
639
- @actionState="(...args) => emit('actionState', ...args)"
640
- />
641
- </div>
642
- </template>
643
- <!-- 常用指标 -->
644
- <CommonIndicator
645
- v-model:data="searchData.commonIndicator"
646
- :varietyMarket="searchData.varietyMarket"
647
- :commonOption="searchData.commonOption"
648
- :config="config.commonIndicator"
649
- />
650
- <!-- 组合排序 -->
651
- <CompositeOrder
652
- v-model:data="searchData.compositeOrder"
653
- :varietyMarket="searchData.varietyMarket"
654
- :commonOption="searchData.commonOption"
655
- :config="config.compositeOrder"
656
- @actionState="(...args) => emit('actionState', ...args)"
657
- />
658
- </div>
659
- </template>
660
-
661
- <style lang="scss" scoped>
662
- .variety-search {
663
- .variety-search-row {
664
- display: flex;
665
- .title {
666
- height: 24px;
667
- min-width: 100px;
668
- font-size: 12px;
669
- line-height: 24px;
670
- display: flex;
671
- align-items: center;
672
- span:nth-child(1) {
673
- width: 60px;
674
- }
675
- span:nth-child(2) {
676
- cursor: pointer;
677
- color: var(--el-color-primary);
678
- }
679
- }
680
- .el-radio {
681
- margin-right: 20px;
682
- }
683
- .el-checkbox {
684
- margin-right: 20px;
685
- }
686
- }
687
- }
688
- </style>
@@ -1,8 +0,0 @@
1
- import { App } from "vue";
2
- import StVarietyTextCopy from "./index.vue";
3
-
4
- export default {
5
- install(app: App) {
6
- app.component("st-varietyTextCopy", StVarietyTextCopy);
7
- },
8
- }