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,697 +0,0 @@
1
- <!-- 常用指标组件 -->
2
- <script setup name="CommonIndicator">
3
- import { ref, watch, computed, inject } from "vue";
4
- import { PER_VOLUMN_RADIO_OPTIONS, AUDIT_OPINION_TYPE_RADIO_OPTIONS, hasIntersection, indicatorToGetDefaultValue, indicatorToValidateAndFormatTagText } from "./tools";
5
- import IndicatorTags from "./IndicatorTags.vue";
6
-
7
- const clearRow = inject("clearRow");
8
- const data = defineModel("data", { default: [] });
9
- const props = defineProps({
10
- config: { type: Object, default: () => {} }, // 常用指标配置
11
- varietyMarket: { type: null || Number, default: () => null },
12
- commonOption: { type: Array, default: () => [] },
13
- });
14
-
15
- // 指标窗口开关
16
- const visible = ref(false);
17
-
18
- // 当前已选指标中,第一个开启排名模式的 key(用于互斥:同一时间只能有一个指标使用排名)
19
- const rankKey = computed(() => {
20
- return data.value.find((i) => i.radioType === "1")?.key;
21
- });
22
-
23
- // 指标项数据源
24
- const indicatorOptions = computed(() => {
25
- let result = props.config.options;
26
- // 如果外部有选品种市场条件, 进行过滤
27
- if (props.varietyMarket !== null && props.varietyMarket !== undefined) {
28
- result = result.filter(({ parent }) => parent.varietyMarketIds.includes(props.varietyMarket));
29
- }
30
- // 如果外部有选常用选项条件, 进行过滤
31
- if (props.commonOption.length > 0) {
32
- result = result.filter(({ parent }) => hasIntersection(parent.commonOptionIds, props.commonOption));
33
- }
34
- return result;
35
- });
36
-
37
- // 当前选中的指标
38
- const currentIndicatorConfig = ref({});
39
- const currentIndicatorForm = ref({});
40
-
41
- // 指标: 点击
42
- const clickIndicator = (item) => {
43
- currentIndicatorConfig.value = item;
44
- // 赋予指标对应的默认值
45
- currentIndicatorForm.value = indicatorToGetDefaultValue(item, rankKey.value);
46
- visible.value = true;
47
- };
48
-
49
- // 指标: 窗口确认
50
- const submitDialog = () => {
51
- // 校验指标内是否填写完整, 并且生成tagText
52
- const { valid, message, tagText } = indicatorToValidateAndFormatTagText(currentIndicatorForm.value);
53
- if (!valid) return ElMessage.warning(message);
54
- currentIndicatorForm.value.tagText = tagText;
55
-
56
- // 按 key 去重:不存在则新增,存在则替换
57
- const keyIndex = data.value.findIndex(({ key }) => key === currentIndicatorForm.value.key);
58
- if (keyIndex === -1) {
59
- data.value.push(currentIndicatorForm.value);
60
- } else {
61
- data.value.splice(keyIndex, 1, currentIndicatorForm.value);
62
- }
63
- visible.value = false;
64
- };
65
-
66
- // 指标Tag: 编辑
67
- const editTag = (item) => {
68
- currentIndicatorConfig.value = indicatorOptions.value.find(({ key }) => key === item.key);
69
- currentIndicatorForm.value = JSON.parse(JSON.stringify(item));
70
- visible.value = true;
71
- };
72
-
73
- // 指标Tag: 删除
74
- const deleteTag = (index) => {
75
- data.value.splice(index, 1);
76
- };
77
-
78
- // 快捷项: 通用
79
- const clickConvenientOption = (item) => {
80
- currentIndicatorForm.value.range = [...item.range];
81
- currentIndicatorForm.value.unit = [...item.unit];
82
- };
83
-
84
- // 快捷项: 净利润
85
- const clicktFeaturelncomesOption = (value) => {
86
- switch (value) {
87
- case "≤0":
88
- Object.assign(currentIndicatorForm.value, {
89
- rule: 2, // 1超 2跌
90
- withFewYears: 1,
91
- yearsCount: 1,
92
- netProfit: 0,
93
- });
94
- break;
95
- case "≥0":
96
- Object.assign(currentIndicatorForm.value, {
97
- rule: 1,
98
- withFewYears: 1,
99
- yearsCount: 1,
100
- netProfit: 0,
101
- });
102
- break;
103
- case "五年内有四年以上盈利超过5千万":
104
- Object.assign(currentIndicatorForm.value, {
105
- rule: 1,
106
- withFewYears: 5,
107
- yearsCount: 4,
108
- netProfit: 0.5,
109
- });
110
- break;
111
- case "≥10亿":
112
- Object.assign(currentIndicatorForm.value, {
113
- rule: 1,
114
- withFewYears: 1,
115
- yearsCount: 1,
116
- netProfit: 10,
117
- });
118
- break;
119
- case "≥20亿":
120
- Object.assign(currentIndicatorForm.value, {
121
- rule: 1,
122
- withFewYears: 1,
123
- yearsCount: 1,
124
- netProfit: 20,
125
- });
126
- break;
127
- }
128
- };
129
-
130
- // 模式切换时清空已填数据
131
- const handleRadioTypeChange = () => {
132
- const { key } = currentIndicatorConfig.value;
133
- const form = currentIndicatorForm.value;
134
-
135
- // 根据指标 key 清空对应的字段
136
- if (key === "mainFlow") {
137
- form.radio = null;
138
- form.rankRange = [null, null];
139
- } else if (key === "perVolumn") {
140
- const newRadioType = form.radioType;
141
- // 切换到数值模式:清空分位相关字段
142
- if (newRadioType === "0") {
143
- form.radio = null;
144
- form.levels = [];
145
- }
146
- // 切换到分位模式:清空数值相关字段
147
- if (newRadioType === "2") {
148
- form.range = [null, null];
149
- }
150
- }
151
- // 其他支持排名的指标(成交额、成交量(期权)、持仓量等)不需要清空额外字段
152
- // 因为它们的非排名模式和排名模式共用 range/rankRange,切换时数据保留
153
- };
154
-
155
- // 监视: 常用指标数据源 => 已勾选且新的数据源中也有它,则要进行勾选保留
156
- watch(
157
- () => indicatorOptions.value,
158
- () => {
159
- if (data.value.length) {
160
- data.value = data.value.filter(({ key }) => {
161
- return indicatorOptions.value.find((item) => item.key === key);
162
- });
163
- }
164
- },
165
- );
166
- </script>
167
-
168
- <template>
169
- <div
170
- class="common-indicator"
171
- v-if="config.show && indicatorOptions.length"
172
- >
173
- <!-- 指标: 选项 -->
174
- <div class="indicator">
175
- <div class="title">
176
- <span>常用指标: </span>
177
- <span @click="clearRow('commonIndicator')">不限</span>
178
- </div>
179
- <div class="options">
180
- <span
181
- v-for="item in indicatorOptions"
182
- :key="item.key"
183
- @click="clickIndicator(item)"
184
- >
185
- {{ item.label }}
186
- </span>
187
- </div>
188
- </div>
189
-
190
- <!-- 指标: 弹窗 -->
191
- <el-dialog
192
- v-model="visible"
193
- :title="currentIndicatorConfig.label"
194
- width="600"
195
- align-center
196
- destroy-on-close
197
- >
198
- <template #header>
199
- <span style="font-size: 18px">{{ currentIndicatorConfig.label }}</span>
200
- <el-radio-group
201
- v-if="currentIndicatorConfig.radioTypeOptions?.length"
202
- v-model="currentIndicatorForm.radioType"
203
- style="vertical-align: 4px; margin-left: 12px"
204
- @change="handleRadioTypeChange"
205
- >
206
- <el-radio-button
207
- v-for="option in currentIndicatorConfig.radioTypeOptions"
208
- :key="option.value"
209
- :value="option.value"
210
- :disabled="option.value === '1' && rankKey && rankKey !== currentIndicatorConfig.key"
211
- >
212
- {{ option.label }}
213
- </el-radio-button>
214
- </el-radio-group>
215
- </template>
216
-
217
- <!-- 通用的指标表单 -->
218
- <template v-if="!currentIndicatorConfig.type">
219
- <!-- 排名模式 -->
220
- <div
221
- v-if="currentIndicatorForm.radioType === '1'"
222
- class="out-box"
223
- >
224
- <span>自定义: </span>
225
- <el-input
226
- v-model="currentIndicatorForm.rankRange[0]"
227
- style="flex: 1"
228
- />
229
- ~
230
- <el-input
231
- v-model="currentIndicatorForm.rankRange[1]"
232
- style="flex: 1"
233
- />
234
- </div>
235
-
236
- <!-- 数值模式 -->
237
- <div v-else>
238
- <!-- 便捷配置项区域 -->
239
- <div
240
- class="convenient-option-box"
241
- v-if="currentIndicatorConfig.convenientOptions?.length"
242
- >
243
- <el-button
244
- v-for="item in currentIndicatorConfig.convenientOptions"
245
- :key="item.text"
246
- @click="clickConvenientOption(item)"
247
- >{{ item.text }}</el-button
248
- >
249
- </div>
250
- <!-- 输入框区域 -->
251
- <div class="out-box">
252
- <span>自定义: </span>
253
- <el-input
254
- v-model="currentIndicatorForm.range[0]"
255
- style="flex: 1"
256
- >
257
- <!-- 单位 -->
258
- <template
259
- #append
260
- v-if="currentIndicatorConfig.unitOptions.length"
261
- >
262
- <span v-if="currentIndicatorConfig.unitOptions.length === 1">{{ currentIndicatorForm.unit[0] }}</span>
263
- <el-select
264
- v-else
265
- v-model="currentIndicatorForm.unit[0]"
266
- style="width: 72px"
267
- >
268
- <el-option
269
- v-for="unit in currentIndicatorConfig.unitOptions"
270
- :label="unit"
271
- :value="unit"
272
- />
273
- </el-select>
274
- </template>
275
- </el-input>
276
- ~
277
- <el-input
278
- v-model="currentIndicatorForm.range[1]"
279
- style="flex: 1"
280
- >
281
- <!-- 单位 -->
282
- <template
283
- #append
284
- v-if="currentIndicatorConfig.unitOptions.length"
285
- >
286
- <span v-if="currentIndicatorConfig.unitOptions.length === 1">{{ currentIndicatorForm.unit[1] }}</span>
287
- <el-select
288
- v-else
289
- v-model="currentIndicatorForm.unit[1]"
290
- style="width: 72px"
291
- >
292
- <el-option
293
- v-for="unit in currentIndicatorConfig.unitOptions"
294
- :label="unit"
295
- :value="unit"
296
- />
297
- </el-select>
298
- </template>
299
- </el-input>
300
- </div>
301
- </div>
302
- </template>
303
-
304
- <!-- type: custom 根据不同key进行自定义 -->
305
- <template v-else>
306
- <!-- 是否ST -->
307
- <div v-if="currentIndicatorConfig.key === 'st'">
308
- <el-radio-group v-model="currentIndicatorForm.st">
309
- <el-radio
310
- label="是"
311
- :value="1"
312
- />
313
- <el-radio
314
- label="否"
315
- :value="0"
316
- />
317
- </el-radio-group>
318
- </div>
319
-
320
- <!-- 净利润 -->
321
- <div v-if="currentIndicatorConfig.key === 'tFeaturelncomes'">
322
- <!-- 便捷配置项区域 -->
323
- <div class="tFeaturelncomes-option-box">
324
- <el-button @click="clicktFeaturelncomesOption('≤0')">≤0</el-button>
325
- <el-button @click="clicktFeaturelncomesOption('≥0')">≥0</el-button>
326
- <el-button @click="clicktFeaturelncomesOption('五年内有四年以上盈利超过5千万')">五年内有四年以上盈利超过5千万</el-button>
327
- <el-button @click="clicktFeaturelncomesOption('≥10亿')">≥10亿</el-button>
328
- <el-button @click="clicktFeaturelncomesOption('≥20亿')">≥20亿</el-button>
329
- </div>
330
- <!-- 输入框区域 -->
331
- <div class="tFeaturelncomes-out-box">
332
- <span>自定义: </span>
333
- <div>
334
- <el-input-number
335
- v-model="currentIndicatorForm.withFewYears"
336
- controls-position="right"
337
- />
338
- 年内
339
- <el-input-number
340
- v-model="currentIndicatorForm.yearsCount"
341
- controls-position="right"
342
- />
343
- 年以上盈利{{ currentIndicatorForm.rule === 1 ? "超" : "跌" }}过
344
- <el-input-number
345
- v-model="currentIndicatorForm.netProfit"
346
- controls-position="right"
347
- />
348
- 亿
349
- </div>
350
- </div>
351
- </div>
352
-
353
- <!-- 股价分位 -->
354
- <div v-if="currentIndicatorConfig.key === 'priceLevels'">
355
- <el-select
356
- v-model="currentIndicatorForm.priceLevels"
357
- multiple
358
- clearable
359
- placeholder="请选择"
360
- style="width: 100%"
361
- >
362
- <el-option
363
- v-for="item in [1, 2, 3, 4, 5]"
364
- :key="item"
365
- :label="`${item}分位`"
366
- :value="item"
367
- />
368
- </el-select>
369
- </div>
370
-
371
- <!-- 市盈率分位 -->
372
- <div v-if="currentIndicatorConfig.key === 'peTtmLevels'">
373
- <el-select
374
- v-model="currentIndicatorForm.peTtmLevels"
375
- multiple
376
- clearable
377
- placeholder="请选择"
378
- style="width: 100%"
379
- >
380
- <el-option
381
- v-for="item in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
382
- :key="item"
383
- :label="`${item}分位`"
384
- :value="item"
385
- />
386
- </el-select>
387
- </div>
388
-
389
- <!-- 市盈率估值走势分位 -->
390
- <div v-if="currentIndicatorConfig.key === 'peTrendTtmLevels'">
391
- <el-select
392
- v-model="currentIndicatorForm.peTrendTtmLevels"
393
- multiple
394
- clearable
395
- placeholder="请选择"
396
- style="width: 100%"
397
- >
398
- <el-option
399
- v-for="item in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
400
- :key="item"
401
- :label="`${item}分位`"
402
- :value="item"
403
- />
404
- </el-select>
405
- </div>
406
-
407
- <!-- 认沽认购 -->
408
- <div v-if="currentIndicatorConfig.key === 'optionsCpType'">
409
- <el-radio-group v-model="currentIndicatorForm.optionsCpType">
410
- <el-radio
411
- label="看涨"
412
- :value="1"
413
- />
414
- <el-radio
415
- label="看跌"
416
- :value="2"
417
- />
418
- </el-radio-group>
419
- </div>
420
-
421
- <!-- 成交量 -->
422
- <div v-if="currentIndicatorConfig.key === 'perVolumn'">
423
- <!-- 数值模式 -->
424
- <div
425
- v-if="currentIndicatorForm.radioType === '0'"
426
- class="out-box"
427
- >
428
- <span>自定义: </span>
429
- <el-input
430
- v-model="currentIndicatorForm.range[0]"
431
- style="flex: 1"
432
- >
433
- <!-- 单位 -->
434
- <template
435
- #append
436
- v-if="currentIndicatorConfig.unitOptions.length"
437
- >
438
- <span v-if="currentIndicatorConfig.unitOptions.length === 1">{{ currentIndicatorForm.unit[0] }}</span>
439
- <el-select
440
- v-else
441
- v-model="currentIndicatorForm.unit[0]"
442
- style="width: 72px"
443
- >
444
- <el-option
445
- v-for="unit in currentIndicatorConfig.unitOptions"
446
- :label="unit"
447
- :value="unit"
448
- />
449
- </el-select>
450
- </template>
451
- </el-input>
452
- ~
453
- <el-input
454
- v-model="currentIndicatorForm.range[1]"
455
- style="flex: 1"
456
- >
457
- <!-- 单位 -->
458
- <template
459
- #append
460
- v-if="currentIndicatorConfig.unitOptions.length"
461
- >
462
- <span v-if="currentIndicatorConfig.unitOptions.length === 1">{{ currentIndicatorForm.unit[1] }}</span>
463
- <el-select
464
- v-else
465
- v-model="currentIndicatorForm.unit[1]"
466
- style="width: 72px"
467
- >
468
- <el-option
469
- v-for="unit in currentIndicatorConfig.unitOptions"
470
- :label="unit"
471
- :value="unit"
472
- />
473
- </el-select>
474
- </template>
475
- </el-input>
476
- </div>
477
-
478
- <!-- 分位模式 -->
479
- <div
480
- v-if="currentIndicatorForm.radioType === '2'"
481
- class="perVolumn-group"
482
- >
483
- <el-radio-group v-model="currentIndicatorForm.radio">
484
- <el-radio
485
- v-for="item in PER_VOLUMN_RADIO_OPTIONS"
486
- :key="item.value"
487
- :value="item.value"
488
- >
489
- {{ item.label }}
490
- </el-radio>
491
- </el-radio-group>
492
- <el-select
493
- v-model="currentIndicatorForm.levels"
494
- multiple
495
- clearable
496
- placeholder="请选择分位"
497
- >
498
- <el-option
499
- v-for="item in [1, 2, 3, 4, 5]"
500
- :key="item"
501
- :label="`${item}分位`"
502
- :value="item"
503
- />
504
- </el-select>
505
- </div>
506
- </div>
507
-
508
- <!-- 主力净流入资金 -->
509
- <div v-if="currentIndicatorConfig.key === 'mainFlow'">
510
- <el-radio-group v-model="currentIndicatorForm.radio">
511
- <el-radio value="3">3日</el-radio>
512
- <el-radio value="5">5日</el-radio>
513
- <el-radio value="10">10日</el-radio>
514
- <el-radio value="20">20日</el-radio>
515
- </el-radio-group>
516
- <div
517
- class="out-box"
518
- style="margin-top: 12px"
519
- >
520
- <span>{{ currentIndicatorForm.radioType === "0" ? "涨幅范围" : "排名范围" }}:&nbsp;</span>
521
- <el-input
522
- v-model="currentIndicatorForm.rankRange[0]"
523
- style="flex: 1"
524
- />
525
- ~
526
- <el-input
527
- v-model="currentIndicatorForm.rankRange[1]"
528
- style="flex: 1"
529
- />
530
- </div>
531
- </div>
532
-
533
- <!-- 年报审计意见 -->
534
- <div v-if="currentIndicatorConfig.key === 'auditOpinionType'">
535
- <el-radio-group v-model="currentIndicatorForm.enumType">
536
- <el-radio
537
- v-for="(item, index) in AUDIT_OPINION_TYPE_RADIO_OPTIONS"
538
- :key="index"
539
- :label="item.label"
540
- :value="item.value"
541
- />
542
- </el-radio-group>
543
- </div>
544
- </template>
545
-
546
- <!-- 确定 -->
547
- <template #footer>
548
- <div class="dialog-footer">
549
- <el-button
550
- type="primary"
551
- @click="submitDialog"
552
- >确定</el-button
553
- >
554
- </div>
555
- </template>
556
- </el-dialog>
557
-
558
- <!-- 已选指标 -->
559
- <IndicatorTags
560
- :tags="data"
561
- @edit="editTag"
562
- @delete="deleteTag"
563
- />
564
- </div>
565
- </template>
566
-
567
- <style lang="scss" scoped>
568
- .common-indicator {
569
- .indicator {
570
- display: flex;
571
- .title {
572
- height: 24px;
573
- min-width: 100px;
574
- font-size: 12px;
575
- line-height: 24px;
576
- display: flex;
577
- align-items: center;
578
- span:nth-child(1) {
579
- width: 60px;
580
- }
581
- span:nth-child(2) {
582
- cursor: pointer;
583
- color: var(--el-color-primary);
584
- }
585
- }
586
- .options {
587
- display: flex;
588
- flex-wrap: wrap;
589
- gap: 2px 6px;
590
- span {
591
- font-size: 12px;
592
- line-height: 24px;
593
- padding: 0 6px;
594
- border-radius: 2px;
595
- color: var(--el-text-color-regular);
596
- cursor: pointer;
597
- transition: background 0.15s;
598
- &:hover {
599
- color: var(--el-color-primary);
600
- background: var(--el-color-primary-light-9);
601
- }
602
- }
603
- }
604
- }
605
-
606
- :deep(.el-button.is-text) {
607
- span {
608
- line-height: 24px;
609
- color: var(--el-text-color-regular);
610
- }
611
- }
612
-
613
- // 便捷选项
614
- .convenient-option-box {
615
- display: grid;
616
- grid-template-columns: repeat(3, 1fr);
617
- gap: 8px;
618
- padding-bottom: 12px;
619
- margin-bottom: 12px;
620
- border-bottom: 1px solid var(--el-border-color-lighter);
621
- .el-button {
622
- margin: 0;
623
- }
624
- }
625
-
626
- // 输入框组
627
- .out-box {
628
- display: flex;
629
- align-items: center;
630
- gap: 10px;
631
- span {
632
- flex-shrink: 0;
633
- white-space: nowrap;
634
- }
635
- .el-input {
636
- flex: 1;
637
- min-width: 0;
638
- }
639
- }
640
-
641
- // 净利润快捷选项
642
- .tFeaturelncomes-option-box {
643
- display: grid;
644
- grid-template-columns: 1fr 1fr 2fr;
645
- gap: 8px;
646
- padding-bottom: 12px;
647
- margin-bottom: 12px;
648
- border-bottom: 1px solid var(--el-border-color-lighter);
649
- .el-button {
650
- margin: 0;
651
- }
652
- }
653
-
654
- // 净利润输入框组
655
- .tFeaturelncomes-out-box {
656
- display: flex;
657
- align-items: center;
658
- gap: 10px;
659
- span {
660
- flex-shrink: 0;
661
- }
662
- .el-input-number {
663
- width: 100px;
664
- }
665
- > div {
666
- display: flex;
667
- align-items: center;
668
- gap: 6px;
669
- flex-wrap: wrap;
670
- }
671
- }
672
-
673
- // 成交量 - 分位模式
674
- .perVolumn-group {
675
- display: grid;
676
- grid-template-columns: 1fr;
677
- gap: 12px;
678
-
679
- .el-radio-group {
680
- display: flex;
681
- flex-wrap: wrap;
682
- gap: 6px 14px;
683
- }
684
-
685
- .el-select {
686
- width: 100%;
687
- }
688
- }
689
-
690
- // 弹窗内下拉框占满宽度
691
- :deep(.el-dialog) {
692
- .el-select {
693
- width: 100%;
694
- }
695
- }
696
- }
697
- </style>