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.
- package/README.md +19 -19
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +1 -1
- package/es/ConfigProvider.cjs +1 -1
- package/es/ConfigProvider.js +3 -3
- package/es/Contextmenu.cjs +1 -1
- package/es/Contextmenu.js +7 -7
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +514 -308
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +37 -37
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +7 -7
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +18 -18
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +93 -93
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +17 -17
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +14 -14
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +760 -656
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +1 -1
- package/es/Map.cjs +1 -1
- package/es/Map.js +1 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +18 -18
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +76 -76
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +2 -2
- package/es/Pie.cjs +2 -2
- package/es/Pie.js +14 -14
- package/es/Table.cjs +1 -1
- package/es/Table.js +22 -22
- package/es/TreeMap.cjs +1 -1
- package/es/TreeMap.js +4 -4
- package/es/User.cjs +1 -1
- package/es/User.js +73 -73
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +21 -21
- package/es/VarietyAiHelper.cjs +4 -4
- package/es/VarietyAiHelper.js +139 -138
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +16 -16
- package/es/VarietySearch.cjs +4 -4
- package/es/VarietySearch.js +861 -857
- package/es/{VarietySelect-6a166293.js → VarietySelect-41daac7b.js} +10 -10
- package/es/{VarietySelect-610903f0.cjs → VarietySelect-d58eee29.cjs} +1 -1
- package/es/VarietyTextCopy.cjs +2 -2
- package/es/VarietyTextCopy.js +25 -25
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +6 -6
- package/es/{_initCloneObject-152b4f4e.js → _initCloneObject-5e73c9c8.js} +2 -2
- package/es/{_initCloneObject-76e116d0.cjs → _initCloneObject-a5832933.cjs} +1 -1
- package/es/aiTools-229609fb.cjs +2 -0
- package/es/aiTools-ce2f9281.js +115 -0
- package/es/aiTools.js +179 -176
- package/es/{config-provider-4c784baf.cjs → config-provider-06ea6b42.cjs} +1 -1
- package/es/{config-provider-7a3aca55.js → config-provider-88b637a8.js} +3 -3
- package/es/{dropdown-987c47fb.cjs → dropdown-4ce4c3e2.cjs} +1 -1
- package/es/{dropdown-01e09205.js → dropdown-72fbc15d.js} +2 -2
- package/es/{el-autocomplete-342ae823.js → el-autocomplete-6cafcdf1.js} +5 -5
- package/es/{el-autocomplete-16f66b34.cjs → el-autocomplete-e0857c5b.cjs} +1 -1
- package/es/{el-button-13dc915f.cjs → el-button-613e0bb2.cjs} +1 -1
- package/es/{el-button-314171a0.js → el-button-94d3de38.js} +3 -3
- package/es/{el-checkbox-5899681f.js → el-checkbox-6d4cb393.js} +3 -3
- package/es/{el-checkbox-bdf64663.cjs → el-checkbox-e90762df.cjs} +1 -1
- package/es/{el-dialog-0ef95df6.cjs → el-dialog-02942e22.cjs} +1 -1
- package/es/{el-dialog-86a3eec2.js → el-dialog-5e30161f.js} +4 -4
- package/es/{el-form-item-77ef6784.cjs → el-form-item-44f060d8.cjs} +1 -1
- package/es/{el-form-item-cda4d93c.js → el-form-item-9e8969ea.js} +5 -5
- package/es/{el-input-fa1445ad.js → el-input-342b2def.js} +13 -13
- package/es/{el-input-89222943.cjs → el-input-9a9a7f7f.cjs} +1 -1
- package/es/{el-input-number-d3338e5e.cjs → el-input-number-65c847d6.cjs} +1 -1
- package/es/{el-input-number-8f6dbf74.js → el-input-number-c22b803a.js} +35 -35
- package/es/{el-loading-84dde1a8.cjs → el-loading-8179b497.cjs} +1 -1
- package/es/{el-loading-9b671203.js → el-loading-bcc51e3d.js} +1 -1
- package/es/{el-menu-item-535fef90.js → el-menu-item-339baf6d.js} +21 -21
- package/es/{el-menu-item-4531fd0e.cjs → el-menu-item-83186444.cjs} +1 -1
- package/es/{el-message-box-621ed2f1.js → el-message-box-035b699c.js} +9 -9
- package/es/{el-message-box-f5717070.cjs → el-message-box-c62d3217.cjs} +1 -1
- package/es/{el-overlay-23de4324.js → el-overlay-3e17604b.js} +3 -3
- package/es/{el-overlay-151708cb.cjs → el-overlay-8f1da9e8.cjs} +1 -1
- package/es/{el-popconfirm-b8aa490e.cjs → el-popconfirm-4e32ec1b.cjs} +1 -1
- package/es/{el-popconfirm-bcff0aa5.js → el-popconfirm-f8a86e2c.js} +4 -4
- package/es/{el-popper-43ec37f4.cjs → el-popper-a4f3ae4d.cjs} +1 -1
- package/es/{el-popper-03988662.js → el-popper-fbd0dcea.js} +1 -1
- package/es/{el-segmented-db3a86be.js → el-segmented-56bd58a8.js} +2 -2
- package/es/{el-segmented-79a1367c.cjs → el-segmented-833ac177.cjs} +1 -1
- package/es/{el-select-4bd0010d.js → el-select-44fa547d.js} +8 -8
- package/es/{el-select-ec04e7ce.cjs → el-select-70806166.cjs} +1 -1
- package/es/{el-table-column-35e47229.cjs → el-table-column-3e2cdfca.cjs} +1 -1
- package/es/{el-table-column-7af2bec7.js → el-table-column-b74a857d.js} +9 -9
- package/es/{el-tag-bef9e83d.js → el-tag-66c83156.js} +2 -2
- package/es/{el-tag-5d5608e0.cjs → el-tag-9c2f329f.cjs} +1 -1
- package/es/{el-text-f998902c.js → el-text-034bd3f4.js} +1 -1
- package/es/{el-text-abf10fdf.cjs → el-text-6b2374bb.cjs} +1 -1
- package/es/index-00f6ca75.cjs +1 -0
- package/es/{index-a00e0534.cjs → index-185792a7.cjs} +1 -1
- package/es/{index-d1b554ac.js → index-1e2a38ab.js} +2 -2
- package/es/{index-0986e373.cjs → index-3153c1db.cjs} +1 -1
- package/es/{index-936e7dec.js → index-44a382a5.js} +2 -2
- package/es/{index-ce21e2ce.js → index-5216d5f5.js} +5 -5
- package/es/{index-7ed0999e.js → index-53cc4e43.js} +720 -716
- package/es/{index-cfcd60ca.cjs → index-5c0dd943.cjs} +1 -1
- package/es/{index-cfd00899.cjs → index-870b6c9d.cjs} +1 -1
- package/es/{index-a83ec4b7.js → index-8c2d7e05.js} +1 -1
- package/es/{index-8901a38c.cjs → index-94131fd7.cjs} +30 -30
- package/es/{index-db846633.cjs → index-9d16cea8.cjs} +1 -1
- package/es/{index-f3f6ee27.js → index-a33b2fb8.js} +178 -178
- package/es/{index-2d7ac156.cjs → index-a9246d17.cjs} +17 -17
- package/es/{index-60c69dd1.cjs → index-ac8dc53d.cjs} +1 -1
- package/es/{index-102edf6c.js → index-c5f2d372.js} +2 -2
- package/es/{index-6290ae0f.js → index-c6584658.js} +2 -2
- package/es/{index-5c44d71a.js → index-eb96e074.js} +149 -119
- package/es/{index-5ed42e9c.js → index-f034b910.js} +2 -2
- package/es/{index-c58e90e9.cjs → index-f58b2920.cjs} +1 -1
- package/es/{python-6cc6ec1b.js → python-8a1664e6.js} +18 -18
- package/es/{python-71f59893.cjs → python-a3db9620.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-02be4928.cjs → use-form-common-props-ac666630.cjs} +1 -1
- package/es/{use-form-common-props-76a09d89.js → use-form-common-props-ed72e914.js} +11 -11
- package/es/{use-global-config-31b3ec57.cjs → use-global-config-23472471.cjs} +1 -1
- package/es/{use-global-config-0f43458b.js → use-global-config-ee406d58.js} +2 -2
- package/es/{validator-ea292506.cjs → validator-366dbf39.cjs} +1 -1
- package/es/{validator-0e037618.js → validator-c60a8956.js} +1 -1
- package/es/{zh-cn-1227eb8a.js → zh-cn-b59a0910.js} +1 -1
- package/es/{zh-cn-0edc7234.cjs → zh-cn-c21d12d8.cjs} +1 -1
- package/lib/aiTools.js +179 -176
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +230 -230
- package/lib/{index-2a269748.js → index-62fa175a.js} +30149 -29800
- package/lib/{python-41da18e5.js → python-4a48fa39.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +53 -44
- package/auto-imports.d.ts +0 -13
- package/components.d.ts +0 -59
- package/es/aiTools-a3b095f6.js +0 -113
- package/es/aiTools-f36136a4.cjs +0 -2
- package/es/index-476c4459.cjs +0 -1
- package/index.html +0 -13
- package/packages/ChartLayout/index.ts +0 -8
- package/packages/ChartLayout/index.vue +0 -63
- package/packages/ConfigProvider/index.ts +0 -8
- package/packages/ConfigProvider/index.vue +0 -66
- package/packages/Contextmenu/index.ts +0 -8
- package/packages/Contextmenu/index.vue +0 -134
- package/packages/CustomFunction/components/ManageDialog.vue +0 -706
- package/packages/CustomFunction/index.ts +0 -8
- package/packages/CustomFunction/index.vue +0 -200
- package/packages/FactorWarning/index.ts +0 -8
- package/packages/FactorWarning/index.vue +0 -754
- package/packages/FactorWarning/tools.js +0 -10
- package/packages/HeatMap/index.ts +0 -8
- package/packages/HeatMap/index.vue +0 -141
- package/packages/Kline/components/Contextmenu/index.vue +0 -110
- package/packages/Kline/components/Tips/index.vue +0 -40
- package/packages/Kline/componentsNew/KlineSlide/index.vue +0 -155
- package/packages/Kline/componentsNew/KlineSub/index.vue +0 -297
- package/packages/Kline/componentsNew/KlineTips/index.vue +0 -66
- package/packages/Kline/componentsNew/KlineUtils/index.vue +0 -84
- package/packages/Kline/componentsNew/Tips/index.vue +0 -33
- package/packages/Kline/formatKlineData.ts +0 -109
- package/packages/Kline/images/buy.svg +0 -1
- package/packages/Kline/images/pen.png +0 -0
- package/packages/Kline/images/sell.svg +0 -1
- package/packages/Kline/images/t.svg +0 -1
- package/packages/Kline/index.ts +0 -16
- package/packages/Kline/index.vue +0 -891
- package/packages/Kline/option.ts +0 -539
- package/packages/Kline/type.d.ts +0 -219
- package/packages/Kline/utils.ts +0 -682
- package/packages/KlineBasic/api.js +0 -58
- package/packages/KlineBasic/components/AverageTips/index.vue +0 -33
- package/packages/KlineBasic/components/Contextmenu/index.vue +0 -105
- package/packages/KlineBasic/components/KlineSub/index.vue +0 -332
- package/packages/KlineBasic/components/KlineTips/index.vue +0 -99
- package/packages/KlineBasic/components/Tips/index.vue +0 -56
- package/packages/KlineBasic/index.ts +0 -8
- package/packages/KlineBasic/index.vue +0 -839
- package/packages/KlineBasic/utils.js +0 -258
- package/packages/KlineConfig/config.js +0 -46
- package/packages/KlineConfig/index.ts +0 -8
- package/packages/KlineConfig/index.vue +0 -356
- package/packages/KlineNew/components/KlineSlide/index.vue +0 -156
- package/packages/KlineNew/components/KlineSub/index.vue +0 -335
- package/packages/KlineNew/components/KlineTips/index.vue +0 -96
- package/packages/KlineNew/components/KlineUtils/index.vue +0 -341
- package/packages/KlineNew/components/Tips/index.vue +0 -33
- package/packages/KlineNew/index.ts +0 -14
- package/packages/KlinePlus/components/SliderChart.vue +0 -208
- package/packages/KlinePlus/components/Tips.vue +0 -36
- package/packages/KlinePlus/images/buy.svg +0 -1
- package/packages/KlinePlus/images/sell.svg +0 -1
- package/packages/KlinePlus/images/t.svg +0 -1
- package/packages/KlinePlus/index.ts +0 -8
- package/packages/KlinePlus/index.vue +0 -1067
- package/packages/KlinePlus/utils.js +0 -771
- package/packages/LinearLegend/index.ts +0 -8
- package/packages/LinearLegend/index.vue +0 -112
- package/packages/Map/China.json +0 -1
- package/packages/Map/index.ts +0 -8
- package/packages/Map/index.vue +0 -147
- package/packages/MonacoEditor/index.ts +0 -8
- package/packages/MonacoEditor/index.vue +0 -1141
- package/packages/MonacoEditor/tools.js +0 -18
- package/packages/Pagination/index.ts +0 -8
- package/packages/Pagination/index.vue +0 -87
- package/packages/PasswordPrompt/index.ts +0 -8
- package/packages/PasswordPrompt/index.vue +0 -267
- package/packages/Pie/index.ts +0 -8
- package/packages/Pie/index.vue +0 -148
- package/packages/Table/components/Button/index.vue +0 -61
- package/packages/Table/components/Formatter/index.vue +0 -26
- package/packages/Table/index.d.ts +0 -0
- package/packages/Table/index.ts +0 -8
- package/packages/Table/index.vue +0 -133
- package/packages/TreeMap/index.ts +0 -8
- package/packages/TreeMap/index.vue +0 -186
- package/packages/User/components/EditInfoDialog/Mobile.vue +0 -214
- package/packages/User/components/EditInfoDialog/index.vue +0 -161
- package/packages/User/components/EditPasswordDialog.vue +0 -168
- package/packages/User/components/SetPasswordDialog.vue +0 -160
- package/packages/User/index.ts +0 -8
- package/packages/User/index.vue +0 -117
- package/packages/VarSelectDialog/Mock.js +0 -495
- package/packages/VarSelectDialog/VarietySelect.vue +0 -78
- package/packages/VarSelectDialog/index.ts +0 -8
- package/packages/VarSelectDialog/index.vue +0 -323
- package/packages/VarietyAiHelper/images/like.png +0 -0
- package/packages/VarietyAiHelper/images/like_no.png +0 -0
- package/packages/VarietyAiHelper/index.ts +0 -8
- package/packages/VarietyAiHelper/index.vue +0 -910
- package/packages/VarietyAutoComplete/index.ts +0 -8
- package/packages/VarietyAutoComplete/index.vue +0 -89
- package/packages/VarietySearch/components/AddTag/index.vue +0 -268
- package/packages/VarietySearch/components/CommonIndicator/IndicatorTags.vue +0 -52
- package/packages/VarietySearch/components/CommonIndicator/index.vue +0 -697
- package/packages/VarietySearch/components/CommonIndicator/tools.js +0 -260
- package/packages/VarietySearch/components/CompositeOrder/index.vue +0 -260
- package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +0 -70
- package/packages/VarietySearch/components/FactorScreen/index.vue +0 -1158
- package/packages/VarietySearch/components/FactorScreen/tools.js +0 -34
- package/packages/VarietySearch/config.js +0 -539
- package/packages/VarietySearch/index.ts +0 -8
- package/packages/VarietySearch/index.vue +0 -688
- package/packages/VarietyTextCopy/index.ts +0 -8
- package/packages/VarietyTextCopy/index.vue +0 -136
- package/packages/VirtualTable/index.ts +0 -8
- package/packages/VirtualTable/index.vue +0 -241
- package/packages/index.ts +0 -59
- package/public/aiTools.js +0 -176
- package/public/talib.wasm +0 -0
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -140
- package/src/assets/vue.svg +0 -1
- package/src/components/Dialog/index.vue +0 -16
- package/src/components/Kline/index.vue +0 -21
- package/src/components/Table/index.vue +0 -27
- package/src/main.ts +0 -17
- package/src/pages/ChartLayout/index.vue +0 -22
- package/src/pages/ConfigProvider/index.vue +0 -9
- package/src/pages/Contextmenu/index.vue +0 -46
- package/src/pages/CustomFunction/index.vue +0 -13
- package/src/pages/FactorWarning/index.vue +0 -203
- package/src/pages/HeatMap/index.vue +0 -128
- package/src/pages/Kline/index.vue +0 -12
- package/src/pages/KlineBasic/api.js +0 -48
- package/src/pages/KlineBasic/index.vue +0 -366
- package/src/pages/KlineBasic/indicator.js +0 -114
- package/src/pages/KlineConfig/index.vue +0 -20
- package/src/pages/KlineNew/components/KlineAction/components/ContextMenu/index.vue +0 -91
- package/src/pages/KlineNew/components/KlineAction/components/YearChart/index.vue +0 -532
- package/src/pages/KlineNew/components/KlineAction/images/pen.png +0 -0
- package/src/pages/KlineNew/components/KlineAction/index.vue +0 -716
- package/src/pages/KlineNew/components/KlineAction/mockApi/index.js +0 -13
- package/src/pages/KlineNew/components/KlineAction/utils.js +0 -571
- package/src/pages/KlineNew/components/KlineBasic/index.vue +0 -336
- package/src/pages/KlineNew/components/KlineBasic/utils.js +0 -46
- package/src/pages/KlineNew/components/KlineNew/index.vue +0 -316
- package/src/pages/KlineNew/components/KlineNew/utils.js +0 -31
- package/src/pages/KlineNew/components/KlineSlide/index.vue +0 -448
- package/src/pages/KlineNew/components/KlineSlide/utils.js +0 -78
- package/src/pages/KlineNew/components/KlineSlideNew/index.vue +0 -430
- package/src/pages/KlineNew/components/KlineSlideNew/utils.js +0 -78
- package/src/pages/KlineNew/index.vue +0 -92
- package/src/pages/KlinePlus/KlineDialog/MultiCycle.vue +0 -312
- package/src/pages/KlinePlus/KlineDialog/api.js +0 -108
- package/src/pages/KlinePlus/KlineDialog/index.vue +0 -582
- package/src/pages/KlinePlus/KlineDialog/indicator.js +0 -109
- package/src/pages/KlinePlus/KlineDialog/tools.js +0 -86
- package/src/pages/KlinePlus/index.vue +0 -30
- package/src/pages/KlinePlus/tradeLogMock.js +0 -1927
- package/src/pages/LinearLegend/index.vue +0 -92
- package/src/pages/Map/index.vue +0 -62
- package/src/pages/MonacoEditor/index.vue +0 -63
- package/src/pages/Pagination/index.vue +0 -24
- package/src/pages/PasswordPrompt/index.vue +0 -12
- package/src/pages/Pie/index.vue +0 -36
- package/src/pages/Table/index.vue +0 -117
- package/src/pages/TreeMap/index.vue +0 -542
- package/src/pages/User/index.vue +0 -24
- package/src/pages/VarSelectDialog/index.vue +0 -16
- package/src/pages/VarietyAiHelper/index.vue +0 -20
- package/src/pages/VarietyAutoComplete/index.vue +0 -19
- package/src/pages/VarietySearch/api.js +0 -70
- package/src/pages/VarietySearch/index.vue +0 -467
- package/src/pages/VarietyTextCopy/index.vue +0 -24
- package/src/pages/VirtualTable/demo.json +0 -6377
- package/src/pages/VirtualTable/index.vue +0 -79
- package/src/router/index.ts +0 -9
- package/src/router/routes.ts +0 -132
- package/src/style.css +0 -79
- package/src/vite-env.d.ts +0 -9
- package/tsconfig.json +0 -30
- package/tsconfig.node.json +0 -10
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
// ==================== 常量 ====================
|
|
2
|
-
|
|
3
|
-
// 成交量 - 时间选项
|
|
4
|
-
export const PER_VOLUMN_RADIO_OPTIONS = [
|
|
5
|
-
{ label: "近2周", value: "1" },
|
|
6
|
-
{ label: "近1个月", value: "2" },
|
|
7
|
-
{ label: "近3个月", value: "3" },
|
|
8
|
-
{ label: "近6个月", value: "4" },
|
|
9
|
-
{ label: "近1年", value: "5" },
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
// 年报审计意见 - 选项
|
|
13
|
-
export const AUDIT_OPINION_TYPE_RADIO_OPTIONS = [
|
|
14
|
-
{ label: "无保留意见", value: 1 },
|
|
15
|
-
{ label: "保留意见", value: 2 },
|
|
16
|
-
{ label: "否定意见", value: 3 },
|
|
17
|
-
{ label: "无法表示意见", value: 4 },
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
// ==================== 工具函数 ====================
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 判断两个数组是否有交集
|
|
24
|
-
*/
|
|
25
|
-
export const hasIntersection = (arr1, arr2) => {
|
|
26
|
-
if (!arr1?.length || !arr2?.length) return false;
|
|
27
|
-
return arr1.some((item) => arr2.includes(item));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 校验是否为有效数字
|
|
32
|
-
*/
|
|
33
|
-
export const isValidNumber = (val) => {
|
|
34
|
-
if (val === "" || val === null || val === undefined) return false;
|
|
35
|
-
return !isNaN(Number(val));
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// ==================== 指标配置(策略模式) ====================
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 获取指标的默认值
|
|
42
|
-
*/
|
|
43
|
-
export const indicatorToGetDefaultValue = (item, rankKey) => {
|
|
44
|
-
const base = {
|
|
45
|
-
key: item.key,
|
|
46
|
-
type: item.type,
|
|
47
|
-
label: item.label,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const defaults = {
|
|
51
|
-
// 是否ST
|
|
52
|
-
st: () => ({ ...base, st: null }),
|
|
53
|
-
// 净利润
|
|
54
|
-
tFeaturelncomes: () => ({
|
|
55
|
-
...base,
|
|
56
|
-
rule: 1, // 1超, 2跌
|
|
57
|
-
withFewYears: null, // 近N年内
|
|
58
|
-
yearsCount: null, // N年以上
|
|
59
|
-
netProfit: null, // 盈利金额(亿)
|
|
60
|
-
}),
|
|
61
|
-
// 股价分位
|
|
62
|
-
priceLevels: () => ({
|
|
63
|
-
...base,
|
|
64
|
-
priceLevels: null, // 选中的分位值(1-5分位)
|
|
65
|
-
}),
|
|
66
|
-
// 市盈率分位
|
|
67
|
-
peTtmLevels: () => ({
|
|
68
|
-
...base,
|
|
69
|
-
peTtmLevels: null, // 选中的分位值(1-10分位)
|
|
70
|
-
}),
|
|
71
|
-
// 市盈率估值走势分位
|
|
72
|
-
peTrendTtmLevels: () => ({
|
|
73
|
-
...base,
|
|
74
|
-
peTrendTtmLevels: null, // 选中的分位值(1-10分位)
|
|
75
|
-
}),
|
|
76
|
-
// 认沽认购
|
|
77
|
-
optionsCpType: () => ({
|
|
78
|
-
...base,
|
|
79
|
-
optionsCpType: null, // 1看涨, 2看跌
|
|
80
|
-
}),
|
|
81
|
-
// 成交量
|
|
82
|
-
perVolumn: () => ({
|
|
83
|
-
...base,
|
|
84
|
-
radioType: item.defaultRadioType,
|
|
85
|
-
range: [null, null],
|
|
86
|
-
unit: item.defaultUnit?.length ? [...item.defaultUnit] : [null, null],
|
|
87
|
-
radio: null, // 时间周期: 1近2周, 2近1个月, 3近3个月, 4近6个月, 5近1年
|
|
88
|
-
levels: [], // 选中的分位值(1-5分位)
|
|
89
|
-
}),
|
|
90
|
-
// 主力净流入资金
|
|
91
|
-
mainFlow: () => ({
|
|
92
|
-
...base,
|
|
93
|
-
radioType: item.defaultRadioType,
|
|
94
|
-
rankRange: [null, null], // 区间范围 [左值, 右值]
|
|
95
|
-
}),
|
|
96
|
-
// 年报审计意见
|
|
97
|
-
auditOpinionType: () => ({
|
|
98
|
-
...base,
|
|
99
|
-
enumType: null, // 1无保留意见, 2保留意见, 3否定意见, 4无法表示意见
|
|
100
|
-
}),
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const getDefault = () => ({
|
|
104
|
-
...base,
|
|
105
|
-
range: [null, null],
|
|
106
|
-
unit: item.defaultUnit?.length ? [...item.defaultUnit] : [null, null],
|
|
107
|
-
radioType: rankKey && rankKey !== item.key ? "0" : item.defaultRadioType,
|
|
108
|
-
rankRange: item.defaultRankRange || [null, null],
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
return (defaults[item.key] || getDefault)();
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* 校验并格式化指标
|
|
116
|
-
* 返回: { valid: boolean, message?: string, tagText?: string }
|
|
117
|
-
*/
|
|
118
|
-
export const indicatorToValidateAndFormatTagText = (value) => {
|
|
119
|
-
const { key, label } = value;
|
|
120
|
-
|
|
121
|
-
// 各指标校验 + 格式化规则
|
|
122
|
-
const rules = {
|
|
123
|
-
// 是否ST
|
|
124
|
-
st: (val) => {
|
|
125
|
-
if (val.st === null) return { valid: false, message: "格式错误: 请至少选择一个值" };
|
|
126
|
-
return { valid: true, tagText: `${label}: ${val.st ? "是" : "否"}` };
|
|
127
|
-
},
|
|
128
|
-
// 净利润
|
|
129
|
-
tFeaturelncomes: (val) => {
|
|
130
|
-
if (["", null].includes(val.withFewYears) || ["", null].includes(val.yearsCount) || ["", null].includes(val.netProfit)) {
|
|
131
|
-
return { valid: false, message: "格式错误: 请填写完整" };
|
|
132
|
-
}
|
|
133
|
-
return { valid: true, tagText: `${label}: ${val.withFewYears}年内${val.yearsCount}年以上盈利${val.rule === 1 ? "超" : "跌"}过${val.netProfit}亿` };
|
|
134
|
-
},
|
|
135
|
-
// 股价分位
|
|
136
|
-
priceLevels: (val) => {
|
|
137
|
-
if (!val.priceLevels?.length) return { valid: false, message: "格式错误: 请至少选择一个值" };
|
|
138
|
-
return { valid: true, tagText: `${label}: 已选${val.priceLevels}分位` };
|
|
139
|
-
},
|
|
140
|
-
// 市盈率分位
|
|
141
|
-
peTtmLevels: (val) => {
|
|
142
|
-
if (!val.peTtmLevels?.length) return { valid: false, message: "格式错误: 请至少选择一个值" };
|
|
143
|
-
return { valid: true, tagText: `${label}: 已选${val.peTtmLevels}分位` };
|
|
144
|
-
},
|
|
145
|
-
// 市盈率估值走势分位
|
|
146
|
-
peTrendTtmLevels: (val) => {
|
|
147
|
-
if (!val.peTrendTtmLevels?.length) return { valid: false, message: "格式错误: 请至少选择一个值" };
|
|
148
|
-
return { valid: true, tagText: `${label}: 已选${val.peTrendTtmLevels}分位` };
|
|
149
|
-
},
|
|
150
|
-
// 认沽认购
|
|
151
|
-
optionsCpType: (val) => {
|
|
152
|
-
if (val.optionsCpType === null) return { valid: false, message: "格式错误: 请至少选择一个值" };
|
|
153
|
-
return { valid: true, tagText: `${label}: ${val.optionsCpType === 1 ? "看涨" : "看跌"}` };
|
|
154
|
-
},
|
|
155
|
-
// 成交量
|
|
156
|
-
perVolumn: (val) => {
|
|
157
|
-
// 数值模式
|
|
158
|
-
if (val.radioType === "0") {
|
|
159
|
-
if (["", null].includes(val.range?.[0]) && ["", null].includes(val.range?.[1])) {
|
|
160
|
-
return { valid: false, message: "格式错误: 请至少填写一个值" };
|
|
161
|
-
}
|
|
162
|
-
const unitLeft = val.unit?.[0] ?? "";
|
|
163
|
-
const unitRight = val.unit?.[1] ?? "";
|
|
164
|
-
let tagText = "";
|
|
165
|
-
if (!["", null].includes(val.range[0]) && !["", null].includes(val.range[1])) {
|
|
166
|
-
tagText = `${label}: ${val.range[0]}${unitLeft} ~ ${val.range[1]}${unitRight}`;
|
|
167
|
-
} else if (!["", null].includes(val.range[0])) {
|
|
168
|
-
tagText = `${label}: ≥${val.range[0]}${unitLeft}`;
|
|
169
|
-
} else {
|
|
170
|
-
tagText = `${label}: ≤${val.range[1]}${unitRight}`;
|
|
171
|
-
}
|
|
172
|
-
return { valid: true, tagText };
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// 分位模式
|
|
176
|
-
if (!val.radio) return { valid: false, message: "格式错误: 请选择时间周期" };
|
|
177
|
-
if (!val.levels?.length) return { valid: false, message: "格式错误: 请选择分位" };
|
|
178
|
-
const timeLabel = PER_VOLUMN_RADIO_OPTIONS.find((item) => item.value === val.radio)?.label;
|
|
179
|
-
return { valid: true, tagText: `${label}: ${timeLabel}${val.levels.map((i) => `${i}分位`).join("、")}` };
|
|
180
|
-
},
|
|
181
|
-
// 主力净流入资金
|
|
182
|
-
mainFlow: (val) => {
|
|
183
|
-
const { radioType, radio, rankRange } = val;
|
|
184
|
-
// 校验:是否选择时间周期
|
|
185
|
-
if (!radio) return { valid: false, message: "格式错误: 请选择时间周期" };
|
|
186
|
-
// 校验:左右区间至少填一个
|
|
187
|
-
if (!isValidNumber(rankRange[0]) && !isValidNumber(rankRange[1])) {
|
|
188
|
-
return { valid: false, message: "格式错误: 请填写区间范围" };
|
|
189
|
-
}
|
|
190
|
-
// 校验:排名模式下,左值不能大于右值,且不能为负数
|
|
191
|
-
if (radioType !== "0" && (rankRange[0] < 0 || rankRange[1] < 0 || rankRange[0] > rankRange[1])) {
|
|
192
|
-
return { valid: false, message: "格式错误: 无效的排名范围" };
|
|
193
|
-
}
|
|
194
|
-
// 格式化文案
|
|
195
|
-
let tagText = "";
|
|
196
|
-
// 左右都填
|
|
197
|
-
if (!["", null].includes(rankRange[0]) && !["", null].includes(rankRange[1])) {
|
|
198
|
-
tagText = `${label}: ${radio}日${radioType === "0" ? "涨幅范围" : "排名范围"}: ${rankRange[0]}${radioType === "0" ? "%" : ""} ~ ${rankRange[1]}${radioType === "0" ? "%" : ""}`;
|
|
199
|
-
}
|
|
200
|
-
// 只填左 → ≥
|
|
201
|
-
else if (!["", null].includes(rankRange[0])) {
|
|
202
|
-
tagText = `${label}: ${radio}日${radioType === "0" ? "涨幅范围" : "排名范围"}: ≥${rankRange[0]}${radioType === "0" ? "%" : ""}`;
|
|
203
|
-
}
|
|
204
|
-
// 只填右 → ≤
|
|
205
|
-
else {
|
|
206
|
-
tagText = `${label}: ${radio}日${radioType === "0" ? "涨幅范围" : "排名范围"}: ≤${rankRange[1]}${radioType === "0" ? "%" : ""}`;
|
|
207
|
-
}
|
|
208
|
-
return { valid: true, tagText };
|
|
209
|
-
},
|
|
210
|
-
// 年报审计意见
|
|
211
|
-
auditOpinionType: (val) => {
|
|
212
|
-
if (val.enumType === null) return { valid: false, message: "格式错误: 请至少选择一个值" };
|
|
213
|
-
const labelText = AUDIT_OPINION_TYPE_RADIO_OPTIONS.find((item) => item.value === val.enumType)?.label;
|
|
214
|
-
return { valid: true, tagText: `${label}: ${labelText}` };
|
|
215
|
-
},
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
// 通用默认规则(适用于没有特殊配置的指标)
|
|
219
|
-
const getDefault = (val) => {
|
|
220
|
-
const { label, unit, radioType } = val;
|
|
221
|
-
const range = radioType === "1" ? val.rankRange : val.range;
|
|
222
|
-
|
|
223
|
-
// 校验:左右至少填一个
|
|
224
|
-
if (["", null].includes(range[0]) && ["", null].includes(range[1])) {
|
|
225
|
-
return { valid: false, message: "格式错误: 请至少填写一个值" };
|
|
226
|
-
}
|
|
227
|
-
// 校验:排名模式特殊规则
|
|
228
|
-
if (radioType === "1") {
|
|
229
|
-
// 必须是有效数字
|
|
230
|
-
if (!isValidNumber(range[0]) && !isValidNumber(range[1])) {
|
|
231
|
-
return { valid: false, message: "格式错误: 请填写有效排名" };
|
|
232
|
-
}
|
|
233
|
-
// 不能为负数,左值不能大于右值
|
|
234
|
-
if (range[0] < 0 || range[1] < 0 || range[0] > range[1]) {
|
|
235
|
-
return { valid: false, message: "格式错误: 无效的排名范围" };
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// 单位处理:排名模式没有单位
|
|
240
|
-
const unitLeft = radioType === "1" ? "" : (unit?.[0] ?? "");
|
|
241
|
-
const unitRight = radioType === "1" ? "" : (unit?.[1] ?? "");
|
|
242
|
-
|
|
243
|
-
// 格式化文案
|
|
244
|
-
let tagText = "";
|
|
245
|
-
// 左右都填
|
|
246
|
-
if (!["", null].includes(range[0]) && !["", null].includes(range[1])) {
|
|
247
|
-
tagText = `${label}${radioType === "1" ? "排名" : ""}: ${range[0]}${unitLeft} ~ ${range[1]}${unitRight}`;
|
|
248
|
-
// 只填左 → ≥
|
|
249
|
-
} else if (!["", null].includes(range[0])) {
|
|
250
|
-
tagText = `${label}${radioType === "1" ? "排名" : ""}: ≥${range[0]}${unitLeft}`;
|
|
251
|
-
// 只填右 → ≤
|
|
252
|
-
} else {
|
|
253
|
-
tagText = `${label}${radioType === "1" ? "排名" : ""}: ≤${range[1]}${unitRight}`;
|
|
254
|
-
}
|
|
255
|
-
return { valid: true, tagText };
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
// 如果有对应的规则则使用,否则使用通用默认规则
|
|
259
|
-
return (rules[key] || getDefault)(value);
|
|
260
|
-
};
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { Close, Plus } from "@element-plus/icons-vue";
|
|
3
|
-
import { ref, watch, computed, inject } from "vue";
|
|
4
|
-
|
|
5
|
-
const clearRow = inject("clearRow");
|
|
6
|
-
|
|
7
|
-
const data = defineModel("data", { default: [] });
|
|
8
|
-
const emit = defineEmits(["actionState"]);
|
|
9
|
-
const props = defineProps({
|
|
10
|
-
config: { type: Object, default: () => {} },
|
|
11
|
-
varietyMarket: { type: null || Number, default: () => null }, // 已选品种市场
|
|
12
|
-
commonOption: { type: Array, default: () => [] }, // 已选常用选项
|
|
13
|
-
});
|
|
14
|
-
const visible = ref(false);
|
|
15
|
-
const compositeOrderForm = ref({
|
|
16
|
-
id: null,
|
|
17
|
-
name: null, // 字段名
|
|
18
|
-
value: "desc", // 排序
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// 组合排序数据源 [受到: 品种市场, 常用选项影响]
|
|
22
|
-
const compositeOrderOptions = computed(() => {
|
|
23
|
-
let result = [];
|
|
24
|
-
// 如果品种市场和常用选项一个都没有选, 那么就展示全部的常用指标
|
|
25
|
-
if (props.varietyMarket === null && !props.commonOption.length) {
|
|
26
|
-
result = props.config.options;
|
|
27
|
-
} else {
|
|
28
|
-
result = props.config.options;
|
|
29
|
-
// 1. 如果选择了品种市场, 进行一波筛选
|
|
30
|
-
if (props.varietyMarket) {
|
|
31
|
-
result = result.filter(({ parent }) => parent.varietyMarketIds.includes(props.varietyMarket));
|
|
32
|
-
}
|
|
33
|
-
// 2. 如果选择了常用选项, 进行一波筛选
|
|
34
|
-
if (props.commonOption.length) {
|
|
35
|
-
result = result.filter(({ parent }) => {
|
|
36
|
-
const { commonOptionIds } = parent;
|
|
37
|
-
// 只要选择了的常用选项里面, 有commonOptionIds中的值, 那么就展示, 即判断两个数组是否有重复元素
|
|
38
|
-
return [...new Set([...commonOptionIds, ...props.commonOption])].length !== [...commonOptionIds, ...props.commonOption].length;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
});
|
|
44
|
-
// 条件: 新增, 编辑, 窗口确认, 删除
|
|
45
|
-
const handleAction = (action, index) => {
|
|
46
|
-
switch (action) {
|
|
47
|
-
// 新增
|
|
48
|
-
case "add": {
|
|
49
|
-
compositeOrderForm.value = { id: null, name: null, value: "desc" };
|
|
50
|
-
visible.value = true;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
// 编辑
|
|
54
|
-
case "edit": {
|
|
55
|
-
const item = data.value[index];
|
|
56
|
-
compositeOrderForm.value = { ...item };
|
|
57
|
-
visible.value = true;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
// 窗口确认
|
|
61
|
-
case "submit": {
|
|
62
|
-
emit("actionState", "组合排序");
|
|
63
|
-
const { id, name, value } = compositeOrderForm.value;
|
|
64
|
-
if (!name) return ElMessage.warning("请选择需要排序的条件");
|
|
65
|
-
const { label } = compositeOrderOptions.value.find((item) => item.key === name);
|
|
66
|
-
const tagText = `${label}-${value === "asc" ? "升序↑" : "降序↓"}`;
|
|
67
|
-
|
|
68
|
-
// 新增确认逻辑
|
|
69
|
-
if (id === null) {
|
|
70
|
-
// 判断data中是否已存在同字段条件, 是则替换, 否则push
|
|
71
|
-
const index = data.value.findIndex((item) => item.name === name);
|
|
72
|
-
if (index === -1) {
|
|
73
|
-
data.value.push({ ...compositeOrderForm.value, id: name, tagText });
|
|
74
|
-
} else {
|
|
75
|
-
data.value.splice(index, 1, { ...compositeOrderForm.value, id: name, tagText });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// 编辑确认逻辑
|
|
79
|
-
else if (compositeOrderForm.value.id) {
|
|
80
|
-
// 修改当前位置的内容, 并将其他相同name的删除掉
|
|
81
|
-
const index = data.value.findIndex((item) => item.name === id);
|
|
82
|
-
const index2 = data.value.findIndex((item) => item.name === name);
|
|
83
|
-
data.value[index] = { ...compositeOrderForm.value, id: name, tagText };
|
|
84
|
-
if (index2 !== -1 && index !== index2) data.value.splice(index2, 1);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
visible.value = false;
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
// 删除
|
|
91
|
-
case "delete": {
|
|
92
|
-
data.value.splice(index, 1);
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// 监视排序数据源变动, 已勾选且新的数据源中也有它,则要进行勾选保留
|
|
99
|
-
watch(
|
|
100
|
-
() => compositeOrderOptions.value,
|
|
101
|
-
() => {
|
|
102
|
-
if (data.value.length) {
|
|
103
|
-
data.value = data.value.filter(({ name }) => {
|
|
104
|
-
return compositeOrderOptions.value.find((item) => item.key === name);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
);
|
|
109
|
-
</script>
|
|
110
|
-
|
|
111
|
-
<template>
|
|
112
|
-
<div
|
|
113
|
-
class="composite-order"
|
|
114
|
-
v-if="config.show && compositeOrderOptions.length"
|
|
115
|
-
>
|
|
116
|
-
<div class="title">
|
|
117
|
-
<span>组合排序: </span>
|
|
118
|
-
<span @click="clearRow('compositeOrder')">不限</span>
|
|
119
|
-
</div>
|
|
120
|
-
<div class="tag-box">
|
|
121
|
-
<el-tag
|
|
122
|
-
v-for="(item, index) in data"
|
|
123
|
-
closable
|
|
124
|
-
type="info"
|
|
125
|
-
@close="handleAction('delete', index)"
|
|
126
|
-
>
|
|
127
|
-
<span>{{ item.tagText }}</span>
|
|
128
|
-
<span
|
|
129
|
-
class="edit"
|
|
130
|
-
@click="handleAction('edit', index)"
|
|
131
|
-
>编辑</span
|
|
132
|
-
>
|
|
133
|
-
</el-tag>
|
|
134
|
-
<el-button
|
|
135
|
-
type="primary"
|
|
136
|
-
plain
|
|
137
|
-
size="small"
|
|
138
|
-
:icon="Plus"
|
|
139
|
-
@click="handleAction('add')"
|
|
140
|
-
>
|
|
141
|
-
添加排序
|
|
142
|
-
</el-button>
|
|
143
|
-
</div>
|
|
144
|
-
<el-dialog
|
|
145
|
-
modal-class="order-dialog"
|
|
146
|
-
v-model="visible"
|
|
147
|
-
width="400"
|
|
148
|
-
align-center
|
|
149
|
-
destroy-on-close
|
|
150
|
-
overflow
|
|
151
|
-
:show-close="false"
|
|
152
|
-
>
|
|
153
|
-
<template #header="{ titleId, titleClass }">
|
|
154
|
-
<div class="custom-header">
|
|
155
|
-
<div class="left">
|
|
156
|
-
<span
|
|
157
|
-
:id="titleId"
|
|
158
|
-
:class="titleClass"
|
|
159
|
-
>
|
|
160
|
-
添加条件
|
|
161
|
-
</span>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="right">
|
|
164
|
-
<el-icon @click="visible = false"><Close /></el-icon>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</template>
|
|
168
|
-
<el-form
|
|
169
|
-
ref="compositeOrderFormRef"
|
|
170
|
-
:model="compositeOrderForm"
|
|
171
|
-
>
|
|
172
|
-
<el-form-item label="添加条件: ">
|
|
173
|
-
<el-select
|
|
174
|
-
v-model="compositeOrderForm.name"
|
|
175
|
-
filterable
|
|
176
|
-
placeholder="请选择"
|
|
177
|
-
no-match-text="未匹配到相关条件"
|
|
178
|
-
>
|
|
179
|
-
<el-option
|
|
180
|
-
v-for="{ label, key } in compositeOrderOptions"
|
|
181
|
-
:label="label"
|
|
182
|
-
:value="key"
|
|
183
|
-
:key="key"
|
|
184
|
-
/>
|
|
185
|
-
</el-select>
|
|
186
|
-
</el-form-item>
|
|
187
|
-
<el-form-item label="排序方式: ">
|
|
188
|
-
<el-radio-group v-model="compositeOrderForm.value">
|
|
189
|
-
<el-radio
|
|
190
|
-
label="升序"
|
|
191
|
-
value="asc"
|
|
192
|
-
/>
|
|
193
|
-
<el-radio
|
|
194
|
-
label="降序"
|
|
195
|
-
value="desc"
|
|
196
|
-
/>
|
|
197
|
-
</el-radio-group>
|
|
198
|
-
</el-form-item>
|
|
199
|
-
</el-form>
|
|
200
|
-
<template #footer>
|
|
201
|
-
<div class="dialog-footer">
|
|
202
|
-
<el-button @click="visible = false">取消</el-button>
|
|
203
|
-
<el-button
|
|
204
|
-
type="primary"
|
|
205
|
-
@click="handleAction('submit')"
|
|
206
|
-
>
|
|
207
|
-
确定
|
|
208
|
-
</el-button>
|
|
209
|
-
</div>
|
|
210
|
-
</template>
|
|
211
|
-
</el-dialog>
|
|
212
|
-
</div>
|
|
213
|
-
</template>
|
|
214
|
-
|
|
215
|
-
<style lang="scss" scoped>
|
|
216
|
-
.composite-order {
|
|
217
|
-
display: flex;
|
|
218
|
-
.title {
|
|
219
|
-
height: 24px;
|
|
220
|
-
min-width: 100px;
|
|
221
|
-
font-size: 12px;
|
|
222
|
-
line-height: 24px;
|
|
223
|
-
display: flex;
|
|
224
|
-
align-items: center;
|
|
225
|
-
span:nth-child(1) {
|
|
226
|
-
width: 60px;
|
|
227
|
-
}
|
|
228
|
-
span:nth-child(2) {
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
color: var(--el-color-primary);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
.tag-box {
|
|
234
|
-
display: flex;
|
|
235
|
-
align-items: center;
|
|
236
|
-
gap: 10px;
|
|
237
|
-
.edit {
|
|
238
|
-
cursor: pointer;
|
|
239
|
-
color: var(--el-color-primary);
|
|
240
|
-
margin-left: 6px;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
.order-dialog {
|
|
244
|
-
.custom-header {
|
|
245
|
-
display: flex;
|
|
246
|
-
align-items: center;
|
|
247
|
-
justify-content: space-between;
|
|
248
|
-
.left,
|
|
249
|
-
.right {
|
|
250
|
-
display: flex;
|
|
251
|
-
align-items: center;
|
|
252
|
-
gap: 10px;
|
|
253
|
-
}
|
|
254
|
-
.el-icon {
|
|
255
|
-
cursor: pointer;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
</style>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<!-- 因子说明 -->
|
|
2
|
-
<script setup name="FactorDescription">
|
|
3
|
-
import { ref, onMounted, inject } from "vue";
|
|
4
|
-
import MarkdownIt from "markdown-it";
|
|
5
|
-
|
|
6
|
-
const { request } = inject("stConfig"); // 组件库全局配置
|
|
7
|
-
|
|
8
|
-
// 选股变量说明文档
|
|
9
|
-
const md = new MarkdownIt();
|
|
10
|
-
const markdownContent = ref("");
|
|
11
|
-
|
|
12
|
-
const props = defineProps({
|
|
13
|
-
factorType: { type: String, default: "模版" },
|
|
14
|
-
data: { type: Array, default: [] },
|
|
15
|
-
});
|
|
16
|
-
const visible = defineModel("visible", { default: false });
|
|
17
|
-
|
|
18
|
-
onMounted(async () => {
|
|
19
|
-
const { data } = await request.post("/middleLayer/special/getOss", { url: "resource/factor_select.md" });
|
|
20
|
-
const uint8Array = new Uint8Array(data.data);
|
|
21
|
-
const decoder = new TextDecoder("utf-8");
|
|
22
|
-
const markdownText = decoder.decode(uint8Array);
|
|
23
|
-
markdownContent.value = md.render(markdownText);
|
|
24
|
-
});
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<el-dialog
|
|
29
|
-
v-model="visible"
|
|
30
|
-
:title="factorType === '模版' ? '因子说明' : '脚本编写说明'"
|
|
31
|
-
width="1000"
|
|
32
|
-
align-center
|
|
33
|
-
append-to-body
|
|
34
|
-
destroy-on-close
|
|
35
|
-
draggable
|
|
36
|
-
overflow
|
|
37
|
-
:modal="false"
|
|
38
|
-
:modal-penetrable="true"
|
|
39
|
-
>
|
|
40
|
-
<el-scrollbar height="500px">
|
|
41
|
-
<template v-if="factorType === '模版'">
|
|
42
|
-
<el-table
|
|
43
|
-
:data="data"
|
|
44
|
-
border
|
|
45
|
-
height="500"
|
|
46
|
-
>
|
|
47
|
-
<el-table-column
|
|
48
|
-
prop="factorName"
|
|
49
|
-
label="因子名称"
|
|
50
|
-
width="200"
|
|
51
|
-
/>
|
|
52
|
-
<el-table-column
|
|
53
|
-
prop="factorDesc"
|
|
54
|
-
label="因子说明"
|
|
55
|
-
/>
|
|
56
|
-
<el-table-column
|
|
57
|
-
prop="factorScoreDefine"
|
|
58
|
-
label="分值定义"
|
|
59
|
-
/>
|
|
60
|
-
</el-table>
|
|
61
|
-
</template>
|
|
62
|
-
<template v-if="factorType === '脚本'">
|
|
63
|
-
<div
|
|
64
|
-
class="markdown-body"
|
|
65
|
-
v-html="markdownContent"
|
|
66
|
-
/>
|
|
67
|
-
</template>
|
|
68
|
-
</el-scrollbar>
|
|
69
|
-
</el-dialog>
|
|
70
|
-
</template>
|