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,754 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
|
3
|
-
import { InfoFilled } from "@element-plus/icons-vue";
|
|
4
|
-
import { ref, watch } from "vue";
|
|
5
|
-
import { defaultShowConfig } from "./tools";
|
|
6
|
-
import { debounce } from "st-func";
|
|
7
|
-
|
|
8
|
-
const segmentedValue = ref("ruleForm");
|
|
9
|
-
const visible = defineModel("visible", { default: false });
|
|
10
|
-
const emit = defineEmits(["add", "delete", "enabled", "closed", "shortcutAdd", "shortcutDelete"]);
|
|
11
|
-
const props = defineProps({
|
|
12
|
-
// 弹窗名称
|
|
13
|
-
title: { type: [String, null], default: null },
|
|
14
|
-
// 因子数据
|
|
15
|
-
moreFactorOptions: { type: Array, default: () => [] },
|
|
16
|
-
emptyFactorOptions: { type: Array, default: () => [] },
|
|
17
|
-
// 管理数据
|
|
18
|
-
tableData: { type: Array, default: () => [] },
|
|
19
|
-
// 快捷配置数据
|
|
20
|
-
shortcutData: { type: Array, default: () => [] },
|
|
21
|
-
|
|
22
|
-
// 字段展示配置
|
|
23
|
-
showConfig: { type: Object, default: () => ({}) },
|
|
24
|
-
// 是否支持操作
|
|
25
|
-
allowOperation: { type: Boolean, default: true },
|
|
26
|
-
});
|
|
27
|
-
const showConfig = Object.assign(defaultShowConfig, props.showConfig);
|
|
28
|
-
|
|
29
|
-
// 添加因子相关参数
|
|
30
|
-
const ruleFormRef = ref(null);
|
|
31
|
-
const ruleForm = ref({
|
|
32
|
-
factorType: 1,
|
|
33
|
-
factorSelectedList: [],
|
|
34
|
-
totalCount: 1,
|
|
35
|
-
minPrice: null,
|
|
36
|
-
maxPrice: null,
|
|
37
|
-
mark: null,
|
|
38
|
-
});
|
|
39
|
-
const rules = ref({
|
|
40
|
-
factorType: [{ required: true, message: "请选择交易类型", trigger: "blur" }],
|
|
41
|
-
factorSelectedList: [{ required: true, message: "请选择预警因子", trigger: "blur" }],
|
|
42
|
-
totalCount: [{ required: true, message: "请填写预警次数", trigger: "blur" }],
|
|
43
|
-
});
|
|
44
|
-
// 快捷配置相关参数
|
|
45
|
-
const shortcut_ruleFormRef = ref(null);
|
|
46
|
-
const shortcut_ruleForm = ref({
|
|
47
|
-
shortcutName: null,
|
|
48
|
-
factorType: 1,
|
|
49
|
-
factorSelectedList: [],
|
|
50
|
-
totalCount: 1,
|
|
51
|
-
});
|
|
52
|
-
const shortcut_rules = ref({
|
|
53
|
-
factorType: [{ required: true, message: "请选择交易类型", trigger: "blur" }],
|
|
54
|
-
factorSelectedList: [{ required: true, message: "请选择预警因子", trigger: "blur" }],
|
|
55
|
-
totalCount: [{ required: true, message: "请填写预警次数", trigger: "blur" }],
|
|
56
|
-
shortcutName: [{ required: true, message: "请填写配置名称", trigger: "blur" }],
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// [添加, 快捷配置] 重置
|
|
60
|
-
const handleResetForm = () => {
|
|
61
|
-
ruleForm.value = {
|
|
62
|
-
factorType: 1,
|
|
63
|
-
factorSelectedList: [],
|
|
64
|
-
totalCount: 1,
|
|
65
|
-
minPrice: null,
|
|
66
|
-
maxPrice: null,
|
|
67
|
-
mark: null,
|
|
68
|
-
};
|
|
69
|
-
shortcut_ruleForm.value = {
|
|
70
|
-
shortcutName: null,
|
|
71
|
-
factorType: 1,
|
|
72
|
-
factorSelectedList: [],
|
|
73
|
-
totalCount: 1,
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// [添加] 内置3次+
|
|
78
|
-
const handleThreeAdd = async (factorName) => {
|
|
79
|
-
Object.assign(ruleForm.value, {
|
|
80
|
-
factorSelectedList: [factorName],
|
|
81
|
-
totalCount: 3,
|
|
82
|
-
});
|
|
83
|
-
const fsParams = {
|
|
84
|
-
factorSelectedList: ruleForm.value.factorSelectedList.map((factorName) => {
|
|
85
|
-
let totalCount = 3;
|
|
86
|
-
// 判断表格里面有没有同因子的数据, 如果有的话需要确保增加以后的有效次数 <= 12
|
|
87
|
-
const repeatData = props.tableData.find(({ factorExtendName }) => factorExtendName === factorName);
|
|
88
|
-
if (repeatData) {
|
|
89
|
-
const diff = repeatData.totalCount - repeatData.currentCount;
|
|
90
|
-
// 如果: 已触发次数 === 触发次数上限, 直接全额添加, 此时后端会另起一行数据的
|
|
91
|
-
if (diff === 0) totalCount = 3;
|
|
92
|
-
// 如果: 已触发次数 !== 触发次数上限 确保添加后的diff要小于等于12, 出于兼容老数据1/20类似的情况考虑, 加个容错
|
|
93
|
-
else totalCount = Math.min(3, 12 - diff >= 0 ? 12 - diff : 0);
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
factorName,
|
|
97
|
-
...ruleForm.value,
|
|
98
|
-
totalCount,
|
|
99
|
-
};
|
|
100
|
-
}),
|
|
101
|
-
};
|
|
102
|
-
const callBack = () => {
|
|
103
|
-
const factorType_catch = ruleForm.value.factorType;
|
|
104
|
-
handleResetForm();
|
|
105
|
-
ruleForm.value.factorType = factorType_catch;
|
|
106
|
-
};
|
|
107
|
-
handleSubmit(ruleFormRef.value, fsParams, callBack);
|
|
108
|
-
};
|
|
109
|
-
// [添加] 快捷提交
|
|
110
|
-
const handleFastControls = async (item) => {
|
|
111
|
-
const data = JSON.parse(item.data);
|
|
112
|
-
Object.assign(ruleForm.value, {
|
|
113
|
-
factorType: data.factorType,
|
|
114
|
-
factorSelectedList: data.factorSelectedList,
|
|
115
|
-
totalCount: data.totalCount,
|
|
116
|
-
});
|
|
117
|
-
const fsParams = {
|
|
118
|
-
// 通过快捷进行添加的因子, 具备有效次数上限10的校验
|
|
119
|
-
factorSelectedList: ruleForm.value.factorSelectedList.map((factorName) => {
|
|
120
|
-
let totalCount = data.totalCount;
|
|
121
|
-
// 判断表格里面有没有同因子的数据, 如果有的话需要确保增加以后的有效次数 <= 10
|
|
122
|
-
const repeatData = props.tableData.find(({ factorExtendName }) => factorExtendName === factorName);
|
|
123
|
-
if (repeatData) {
|
|
124
|
-
const diff = repeatData.totalCount - repeatData.currentCount;
|
|
125
|
-
// 如果: 已触发次数 === 触发次数上限, 直接全额添加, 此时后端会另起一行数据的
|
|
126
|
-
if (diff === 0) totalCount = data.totalCount;
|
|
127
|
-
// 如果: 已触发次数 !== 触发次数上限 确保添加后的diff要小于等于10, 出于兼容老数据1/20类似的情况考虑, 加个容错
|
|
128
|
-
else totalCount = Math.min(data.totalCount, 10 - diff >= 0 ? 10 - diff : 0);
|
|
129
|
-
}
|
|
130
|
-
return {
|
|
131
|
-
factorName,
|
|
132
|
-
...ruleForm.value,
|
|
133
|
-
totalCount,
|
|
134
|
-
};
|
|
135
|
-
}),
|
|
136
|
-
};
|
|
137
|
-
const callBack = () => handleResetForm();
|
|
138
|
-
handleSubmit(ruleFormRef.value, fsParams, callBack);
|
|
139
|
-
};
|
|
140
|
-
// [添加] 普通提交
|
|
141
|
-
const handleSubmit = debounce(async (formEl, fsParams, callBack) => {
|
|
142
|
-
if (!formEl) return;
|
|
143
|
-
await formEl.validate((valid) => {
|
|
144
|
-
if (!valid) return false;
|
|
145
|
-
// 将表单值抛出
|
|
146
|
-
const params = fsParams ?? {
|
|
147
|
-
factorSelectedList: ruleForm.value.factorSelectedList.map((factorName) => {
|
|
148
|
-
return {
|
|
149
|
-
factorName,
|
|
150
|
-
...ruleForm.value,
|
|
151
|
-
};
|
|
152
|
-
}),
|
|
153
|
-
};
|
|
154
|
-
emit("add", params);
|
|
155
|
-
if (callBack) {
|
|
156
|
-
callBack();
|
|
157
|
-
} else {
|
|
158
|
-
visible.value = false;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}, 200);
|
|
162
|
-
|
|
163
|
-
// [快捷配置] 保存配置
|
|
164
|
-
const handleSaveShortcut = async (formEl) => {
|
|
165
|
-
if (!formEl) return;
|
|
166
|
-
await formEl.validate((valid) => {
|
|
167
|
-
if (!valid) return false;
|
|
168
|
-
// 将表单值抛出
|
|
169
|
-
const params = {
|
|
170
|
-
shortcutName: shortcut_ruleForm.value.shortcutName,
|
|
171
|
-
data: JSON.stringify(shortcut_ruleForm.value),
|
|
172
|
-
};
|
|
173
|
-
emit("shortcutAdd", params);
|
|
174
|
-
handleResetForm();
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
// [快捷配置] 回显配置
|
|
178
|
-
const handleClickShortcut = (item) => {
|
|
179
|
-
shortcut_ruleForm.value = JSON.parse(item.data);
|
|
180
|
-
};
|
|
181
|
-
// [快捷配置] 删除配置
|
|
182
|
-
const handleDeleteShortcut = (item) => {
|
|
183
|
-
ElMessageBox.confirm(`是否确认删除配置: ${item.shortcutName} ?`, "删除提示", {
|
|
184
|
-
confirmButtonText: "确认",
|
|
185
|
-
cancelButtonText: "取消",
|
|
186
|
-
type: "warning",
|
|
187
|
-
}).then(() => emit("shortcutDelete", item));
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
watch(
|
|
191
|
-
() => visible.value,
|
|
192
|
-
(newValue) => {
|
|
193
|
-
if (newValue) {
|
|
194
|
-
segmentedValue.value = props.allowOperation ? "ruleForm" : "table";
|
|
195
|
-
handleResetForm();
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
immediate: true,
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
</script>
|
|
203
|
-
|
|
204
|
-
<template>
|
|
205
|
-
<div class="st-factorWarning">
|
|
206
|
-
<el-config-provider :locale="zhCn">
|
|
207
|
-
<el-dialog
|
|
208
|
-
v-model="visible"
|
|
209
|
-
width="1020"
|
|
210
|
-
align-center
|
|
211
|
-
destroy-on-close
|
|
212
|
-
@closed="emit('closed')"
|
|
213
|
-
>
|
|
214
|
-
<!-- 头部: 标题 + 切换 -->
|
|
215
|
-
<template #header="{ close, titleId, titleClass }">
|
|
216
|
-
<div class="custom-header">
|
|
217
|
-
<div :class="titleClass">
|
|
218
|
-
<span style="margin-right: 4px">因子预警</span>
|
|
219
|
-
<span>{{ title }}</span>
|
|
220
|
-
</div>
|
|
221
|
-
<el-segmented
|
|
222
|
-
v-model="segmentedValue"
|
|
223
|
-
size="default"
|
|
224
|
-
:options="[
|
|
225
|
-
{ label: '添加', value: 'ruleForm', disabled: !allowOperation },
|
|
226
|
-
{ label: '管理', value: 'table', disabled: false },
|
|
227
|
-
{ label: '快捷配置', value: 'shortcut', disabled: !allowOperation },
|
|
228
|
-
]"
|
|
229
|
-
/>
|
|
230
|
-
</div>
|
|
231
|
-
</template>
|
|
232
|
-
<!-- 内容: 添加 -->
|
|
233
|
-
<template v-if="segmentedValue === 'ruleForm'">
|
|
234
|
-
<el-form
|
|
235
|
-
ref="ruleFormRef"
|
|
236
|
-
:model="ruleForm"
|
|
237
|
-
:rules="rules"
|
|
238
|
-
size="default"
|
|
239
|
-
label-width="90px"
|
|
240
|
-
>
|
|
241
|
-
<!-- 交易类型 -->
|
|
242
|
-
<el-form-item
|
|
243
|
-
label="交易类型:"
|
|
244
|
-
prop="factorType"
|
|
245
|
-
>
|
|
246
|
-
<el-button
|
|
247
|
-
type="danger"
|
|
248
|
-
:plain="ruleForm.factorType !== 1"
|
|
249
|
-
@click="
|
|
250
|
-
() => {
|
|
251
|
-
if (ruleForm.factorType === -1) {
|
|
252
|
-
ruleForm.factorSelectedList = [];
|
|
253
|
-
}
|
|
254
|
-
ruleForm.factorType = 1;
|
|
255
|
-
}
|
|
256
|
-
"
|
|
257
|
-
>
|
|
258
|
-
多
|
|
259
|
-
</el-button>
|
|
260
|
-
<el-button
|
|
261
|
-
type="success"
|
|
262
|
-
:plain="ruleForm.factorType !== -1"
|
|
263
|
-
@click="
|
|
264
|
-
() => {
|
|
265
|
-
if (ruleForm.factorType === 1) {
|
|
266
|
-
ruleForm.factorSelectedList = [];
|
|
267
|
-
}
|
|
268
|
-
ruleForm.factorType = -1;
|
|
269
|
-
}
|
|
270
|
-
"
|
|
271
|
-
>
|
|
272
|
-
空
|
|
273
|
-
</el-button>
|
|
274
|
-
</el-form-item>
|
|
275
|
-
<!-- 预警因子 -->
|
|
276
|
-
<el-form-item
|
|
277
|
-
label="预警因子:"
|
|
278
|
-
prop="factorSelectedList"
|
|
279
|
-
>
|
|
280
|
-
<el-checkbox-group v-model="ruleForm.factorSelectedList">
|
|
281
|
-
<template v-if="ruleForm.factorType === 1">
|
|
282
|
-
<div
|
|
283
|
-
class="factor-checkbox"
|
|
284
|
-
v-for="(item, index) in moreFactorOptions"
|
|
285
|
-
:key="index"
|
|
286
|
-
>
|
|
287
|
-
<el-checkbox
|
|
288
|
-
:label="item.factorTypeName"
|
|
289
|
-
:value="item.factorTypeName"
|
|
290
|
-
>
|
|
291
|
-
<span class="factor-name">{{ item.factorTypeName }}</span>
|
|
292
|
-
</el-checkbox>
|
|
293
|
-
<span
|
|
294
|
-
class="tag-button"
|
|
295
|
-
@click="handleThreeAdd(item.factorTypeName)"
|
|
296
|
-
>+3</span
|
|
297
|
-
>
|
|
298
|
-
</div>
|
|
299
|
-
</template>
|
|
300
|
-
<template v-if="ruleForm.factorType === -1">
|
|
301
|
-
<div
|
|
302
|
-
class="factor-checkbox"
|
|
303
|
-
v-for="(item, index) in emptyFactorOptions"
|
|
304
|
-
:key="index"
|
|
305
|
-
>
|
|
306
|
-
<el-checkbox
|
|
307
|
-
:label="item.factorTypeName"
|
|
308
|
-
:value="item.factorTypeName"
|
|
309
|
-
>
|
|
310
|
-
<span class="factor-name">{{ item.factorTypeName }}</span>
|
|
311
|
-
</el-checkbox>
|
|
312
|
-
<span
|
|
313
|
-
class="tag-button"
|
|
314
|
-
@click="handleThreeAdd(item.factorTypeName)"
|
|
315
|
-
>+3</span
|
|
316
|
-
>
|
|
317
|
-
</div>
|
|
318
|
-
</template>
|
|
319
|
-
</el-checkbox-group>
|
|
320
|
-
</el-form-item>
|
|
321
|
-
<!-- 预警次数 -->
|
|
322
|
-
<el-form-item
|
|
323
|
-
label="预警次数:"
|
|
324
|
-
prop="totalCount"
|
|
325
|
-
>
|
|
326
|
-
<div style="display: flex; align-items: start">
|
|
327
|
-
<el-input-number
|
|
328
|
-
v-model="ruleForm.totalCount"
|
|
329
|
-
:min="1"
|
|
330
|
-
controls-position="right"
|
|
331
|
-
style="margin-right: 20px"
|
|
332
|
-
/>
|
|
333
|
-
<div
|
|
334
|
-
v-if="shortcutData.length"
|
|
335
|
-
style="flex: 1"
|
|
336
|
-
>
|
|
337
|
-
<el-button
|
|
338
|
-
v-for="item in shortcutData"
|
|
339
|
-
:key="item.id"
|
|
340
|
-
@click="handleFastControls(item)"
|
|
341
|
-
style="margin: 0 12px 4px 0"
|
|
342
|
-
>
|
|
343
|
-
{{ item.shortcutName }}
|
|
344
|
-
</el-button>
|
|
345
|
-
</div>
|
|
346
|
-
<el-text
|
|
347
|
-
v-else
|
|
348
|
-
type="primary"
|
|
349
|
-
style="cursor: pointer"
|
|
350
|
-
@click="() => (segmentedValue = 'shortcut')"
|
|
351
|
-
>
|
|
352
|
-
暂无快捷配置, 是否点击前往自定义配置?
|
|
353
|
-
</el-text>
|
|
354
|
-
</div>
|
|
355
|
-
</el-form-item>
|
|
356
|
-
<!-- 价格范围 -->
|
|
357
|
-
<el-form-item
|
|
358
|
-
v-if="showConfig.ruleFormPrice"
|
|
359
|
-
label="价格范围:"
|
|
360
|
-
>
|
|
361
|
-
<el-input-number
|
|
362
|
-
v-model="ruleForm.minPrice"
|
|
363
|
-
:min="-999"
|
|
364
|
-
placeholder="请输入"
|
|
365
|
-
:max="999"
|
|
366
|
-
controls-position="right"
|
|
367
|
-
/>
|
|
368
|
-
<span style="margin: 0 5px">~</span>
|
|
369
|
-
<el-input-number
|
|
370
|
-
v-model="ruleForm.maxPrice"
|
|
371
|
-
placeholder="请输入"
|
|
372
|
-
:min="-999"
|
|
373
|
-
:max="999"
|
|
374
|
-
controls-position="right"
|
|
375
|
-
/>
|
|
376
|
-
</el-form-item>
|
|
377
|
-
<!-- 备注 -->
|
|
378
|
-
<el-form-item
|
|
379
|
-
v-if="showConfig.ruleFormMark"
|
|
380
|
-
label="备注:"
|
|
381
|
-
>
|
|
382
|
-
<el-input
|
|
383
|
-
v-model="ruleForm.mark"
|
|
384
|
-
type="textarea"
|
|
385
|
-
placeholder="请输入关键字"
|
|
386
|
-
:rows="2"
|
|
387
|
-
style="width: 380px"
|
|
388
|
-
/>
|
|
389
|
-
</el-form-item>
|
|
390
|
-
</el-form>
|
|
391
|
-
</template>
|
|
392
|
-
<!-- 内容: 管理 -->
|
|
393
|
-
<template v-if="segmentedValue === 'table'">
|
|
394
|
-
<el-table
|
|
395
|
-
:data="tableData"
|
|
396
|
-
size="small"
|
|
397
|
-
>
|
|
398
|
-
<el-table-column
|
|
399
|
-
label="预警周期"
|
|
400
|
-
width="70"
|
|
401
|
-
>
|
|
402
|
-
<template #default="scope">
|
|
403
|
-
{{ scope.row.freqName || "-" }}
|
|
404
|
-
</template>
|
|
405
|
-
</el-table-column>
|
|
406
|
-
<el-table-column
|
|
407
|
-
label="交易类型"
|
|
408
|
-
width="70"
|
|
409
|
-
>
|
|
410
|
-
<template #default="scope">
|
|
411
|
-
<span
|
|
412
|
-
v-if="scope.row.factorExtendValue == 1"
|
|
413
|
-
style="color: #f56c6c"
|
|
414
|
-
>多</span
|
|
415
|
-
>
|
|
416
|
-
<span
|
|
417
|
-
v-else
|
|
418
|
-
style="color: #67c23a"
|
|
419
|
-
>空</span
|
|
420
|
-
>
|
|
421
|
-
</template>
|
|
422
|
-
</el-table-column>
|
|
423
|
-
<el-table-column label="预警因子">
|
|
424
|
-
<template #default="scope">
|
|
425
|
-
{{ scope.row.factorExtendName || "-" }}
|
|
426
|
-
</template>
|
|
427
|
-
</el-table-column>
|
|
428
|
-
<el-table-column
|
|
429
|
-
label="预警次数"
|
|
430
|
-
width="70"
|
|
431
|
-
>
|
|
432
|
-
<template #default="scope">
|
|
433
|
-
{{ `${scope.row.currentCount} / ${scope.row.totalCount}` }}
|
|
434
|
-
</template>
|
|
435
|
-
</el-table-column>
|
|
436
|
-
<el-table-column
|
|
437
|
-
v-if="showConfig.tableStatus"
|
|
438
|
-
label="状态"
|
|
439
|
-
width="70"
|
|
440
|
-
>
|
|
441
|
-
<template #default="scope">
|
|
442
|
-
<div>
|
|
443
|
-
<span v-if="scope.row.enable === 1">未触发</span>
|
|
444
|
-
<span v-else-if="scope.row.enable === 2">已触发</span>
|
|
445
|
-
<span v-else>-</span>
|
|
446
|
-
</div>
|
|
447
|
-
</template>
|
|
448
|
-
</el-table-column>
|
|
449
|
-
<el-table-column
|
|
450
|
-
v-if="showConfig.tableCreateTime"
|
|
451
|
-
label="设置时间"
|
|
452
|
-
width="136"
|
|
453
|
-
>
|
|
454
|
-
<template #default="scope">
|
|
455
|
-
{{ scope.row.createdTime || "-" }}
|
|
456
|
-
</template>
|
|
457
|
-
</el-table-column>
|
|
458
|
-
<el-table-column
|
|
459
|
-
v-if="showConfig.tableMark"
|
|
460
|
-
label="备注"
|
|
461
|
-
width="70"
|
|
462
|
-
>
|
|
463
|
-
<template #default="scope">
|
|
464
|
-
{{ scope.row.mark || "-" }}
|
|
465
|
-
</template>
|
|
466
|
-
</el-table-column>
|
|
467
|
-
<el-table-column
|
|
468
|
-
v-if="allowOperation"
|
|
469
|
-
label="操作"
|
|
470
|
-
width="140"
|
|
471
|
-
>
|
|
472
|
-
<template #default="scope">
|
|
473
|
-
<el-button
|
|
474
|
-
v-if="showConfig.tableEnable"
|
|
475
|
-
:disabled="scope.row.currentCount !== scope.row.totalCount"
|
|
476
|
-
size="small"
|
|
477
|
-
@click="emit('enabled', scope.row)"
|
|
478
|
-
>
|
|
479
|
-
启用
|
|
480
|
-
</el-button>
|
|
481
|
-
<el-popconfirm
|
|
482
|
-
title="确定删除?"
|
|
483
|
-
@confirm="emit('delete', scope.row)"
|
|
484
|
-
>
|
|
485
|
-
<template #reference>
|
|
486
|
-
<el-button size="small">删除</el-button>
|
|
487
|
-
</template>
|
|
488
|
-
</el-popconfirm>
|
|
489
|
-
</template>
|
|
490
|
-
</el-table-column>
|
|
491
|
-
</el-table>
|
|
492
|
-
</template>
|
|
493
|
-
<!-- 内容: 快捷配置 -->
|
|
494
|
-
<template v-if="segmentedValue === 'shortcut'">
|
|
495
|
-
<div class="shortcut-title">
|
|
496
|
-
<span>我的配置</span>
|
|
497
|
-
<el-tooltip
|
|
498
|
-
effect="dark"
|
|
499
|
-
content="如有配置数据, 可点击查看该配置的具体信息"
|
|
500
|
-
placement="right-start"
|
|
501
|
-
>
|
|
502
|
-
<el-icon><InfoFilled /></el-icon>
|
|
503
|
-
</el-tooltip>
|
|
504
|
-
</div>
|
|
505
|
-
<div class="shortcut-config">
|
|
506
|
-
<template v-if="shortcutData.length">
|
|
507
|
-
<el-tag
|
|
508
|
-
v-for="item in shortcutData"
|
|
509
|
-
:key="item.id"
|
|
510
|
-
type="primary"
|
|
511
|
-
size="default"
|
|
512
|
-
closable
|
|
513
|
-
@click="handleClickShortcut(item)"
|
|
514
|
-
@close="handleDeleteShortcut(item)"
|
|
515
|
-
>
|
|
516
|
-
{{ item.shortcutName }}
|
|
517
|
-
</el-tag>
|
|
518
|
-
</template>
|
|
519
|
-
<span
|
|
520
|
-
class="empty"
|
|
521
|
-
v-else
|
|
522
|
-
>暂无数据</span
|
|
523
|
-
>
|
|
524
|
-
</div>
|
|
525
|
-
<div class="shortcut-title">
|
|
526
|
-
<span>新增配置</span>
|
|
527
|
-
<el-tooltip
|
|
528
|
-
effect="dark"
|
|
529
|
-
content="同名配置将会进行覆盖"
|
|
530
|
-
placement="right-start"
|
|
531
|
-
>
|
|
532
|
-
<el-icon><InfoFilled /></el-icon>
|
|
533
|
-
</el-tooltip>
|
|
534
|
-
</div>
|
|
535
|
-
<el-form
|
|
536
|
-
ref="shortcut_ruleFormRef"
|
|
537
|
-
:model="shortcut_ruleForm"
|
|
538
|
-
:rules="shortcut_rules"
|
|
539
|
-
label-width="90px"
|
|
540
|
-
size="default"
|
|
541
|
-
>
|
|
542
|
-
<!-- 配置名称 -->
|
|
543
|
-
<el-form-item
|
|
544
|
-
label="配置名称:"
|
|
545
|
-
prop="shortcutName"
|
|
546
|
-
>
|
|
547
|
-
<el-input
|
|
548
|
-
v-model="shortcut_ruleForm.shortcutName"
|
|
549
|
-
maxlength="6"
|
|
550
|
-
show-word-limit
|
|
551
|
-
style="width: 160px"
|
|
552
|
-
/>
|
|
553
|
-
</el-form-item>
|
|
554
|
-
<!-- 交易类型 -->
|
|
555
|
-
<el-form-item
|
|
556
|
-
label="交易类型:"
|
|
557
|
-
prop="factorType"
|
|
558
|
-
>
|
|
559
|
-
<el-button
|
|
560
|
-
type="danger"
|
|
561
|
-
:plain="shortcut_ruleForm.factorType !== 1"
|
|
562
|
-
@click="
|
|
563
|
-
() => {
|
|
564
|
-
if (shortcut_ruleForm.factorType === -1) {
|
|
565
|
-
shortcut_ruleForm.factorSelectedList = [];
|
|
566
|
-
}
|
|
567
|
-
shortcut_ruleForm.factorType = 1;
|
|
568
|
-
}
|
|
569
|
-
"
|
|
570
|
-
>
|
|
571
|
-
多
|
|
572
|
-
</el-button>
|
|
573
|
-
<el-button
|
|
574
|
-
type="success"
|
|
575
|
-
:plain="shortcut_ruleForm.factorType !== -1"
|
|
576
|
-
@click="
|
|
577
|
-
() => {
|
|
578
|
-
if (shortcut_ruleForm.factorType === 1) {
|
|
579
|
-
shortcut_ruleForm.factorSelectedList = [];
|
|
580
|
-
}
|
|
581
|
-
shortcut_ruleForm.factorType = -1;
|
|
582
|
-
}
|
|
583
|
-
"
|
|
584
|
-
>
|
|
585
|
-
空
|
|
586
|
-
</el-button>
|
|
587
|
-
</el-form-item>
|
|
588
|
-
<!-- 预警因子 -->
|
|
589
|
-
<el-form-item
|
|
590
|
-
label="预警因子:"
|
|
591
|
-
prop="factorSelectedList"
|
|
592
|
-
>
|
|
593
|
-
<el-checkbox-group v-model="shortcut_ruleForm.factorSelectedList">
|
|
594
|
-
<template v-if="shortcut_ruleForm.factorType === 1">
|
|
595
|
-
<el-checkbox
|
|
596
|
-
v-for="(item, index) in moreFactorOptions"
|
|
597
|
-
:key="index"
|
|
598
|
-
:label="item.factorTypeName"
|
|
599
|
-
:value="item.factorTypeName"
|
|
600
|
-
style="width: 200px"
|
|
601
|
-
/>
|
|
602
|
-
</template>
|
|
603
|
-
<template v-if="shortcut_ruleForm.factorType === -1">
|
|
604
|
-
<el-checkbox
|
|
605
|
-
v-for="(item, index) in emptyFactorOptions"
|
|
606
|
-
:key="index"
|
|
607
|
-
:label="item.factorTypeName"
|
|
608
|
-
:value="item.factorTypeName"
|
|
609
|
-
style="width: 200px"
|
|
610
|
-
/>
|
|
611
|
-
</template>
|
|
612
|
-
</el-checkbox-group>
|
|
613
|
-
</el-form-item>
|
|
614
|
-
<!-- 预警次数 -->
|
|
615
|
-
<el-form-item
|
|
616
|
-
label="预警次数:"
|
|
617
|
-
prop="totalCount"
|
|
618
|
-
>
|
|
619
|
-
<el-input-number
|
|
620
|
-
v-model="shortcut_ruleForm.totalCount"
|
|
621
|
-
:min="1"
|
|
622
|
-
:max="10"
|
|
623
|
-
controls-position="right"
|
|
624
|
-
style="margin-right: 20px"
|
|
625
|
-
/>
|
|
626
|
-
</el-form-item>
|
|
627
|
-
</el-form>
|
|
628
|
-
</template>
|
|
629
|
-
<!-- 底部 -->
|
|
630
|
-
<template #footer>
|
|
631
|
-
<div class="custom-footer">
|
|
632
|
-
<el-button
|
|
633
|
-
size="default"
|
|
634
|
-
@click="visible = false"
|
|
635
|
-
>关闭</el-button
|
|
636
|
-
>
|
|
637
|
-
<el-button
|
|
638
|
-
v-if="segmentedValue === 'ruleForm'"
|
|
639
|
-
size="default"
|
|
640
|
-
type="primary"
|
|
641
|
-
@click="handleSubmit(ruleFormRef)"
|
|
642
|
-
>
|
|
643
|
-
确认
|
|
644
|
-
</el-button>
|
|
645
|
-
<el-button
|
|
646
|
-
v-if="segmentedValue === 'shortcut'"
|
|
647
|
-
size="default"
|
|
648
|
-
type="primary"
|
|
649
|
-
@click="handleSaveShortcut(shortcut_ruleFormRef)"
|
|
650
|
-
>
|
|
651
|
-
保存配置
|
|
652
|
-
</el-button>
|
|
653
|
-
</div>
|
|
654
|
-
</template>
|
|
655
|
-
</el-dialog>
|
|
656
|
-
</el-config-provider>
|
|
657
|
-
</div>
|
|
658
|
-
</template>
|
|
659
|
-
|
|
660
|
-
<style lang="scss" scoped>
|
|
661
|
-
.st-factorWarning {
|
|
662
|
-
:deep(.el-dialog__header) {
|
|
663
|
-
padding-top: 6px;
|
|
664
|
-
padding-right: 40px;
|
|
665
|
-
}
|
|
666
|
-
:deep(.el-dialog__headerbtn) {
|
|
667
|
-
top: 9px;
|
|
668
|
-
}
|
|
669
|
-
:deep(.el-dialog__body) {
|
|
670
|
-
padding-top: 0;
|
|
671
|
-
padding-bottom: 0;
|
|
672
|
-
.text-btn {
|
|
673
|
-
display: inline-block;
|
|
674
|
-
padding: 6px 8px;
|
|
675
|
-
}
|
|
676
|
-
.el-table {
|
|
677
|
-
height: 590px;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
.custom-header {
|
|
681
|
-
width: 100%;
|
|
682
|
-
display: flex;
|
|
683
|
-
align-items: center;
|
|
684
|
-
justify-content: space-between;
|
|
685
|
-
padding: 10px;
|
|
686
|
-
margin-top: -15px;
|
|
687
|
-
}
|
|
688
|
-
.el-radio {
|
|
689
|
-
margin-right: 20px;
|
|
690
|
-
}
|
|
691
|
-
.factor-checkbox {
|
|
692
|
-
display: inline-block;
|
|
693
|
-
.factor-name {
|
|
694
|
-
display: inline-block;
|
|
695
|
-
width: 200px;
|
|
696
|
-
}
|
|
697
|
-
.tag-button {
|
|
698
|
-
box-sizing: border-box;
|
|
699
|
-
padding: 2px 4px;
|
|
700
|
-
margin-right: 10px;
|
|
701
|
-
margin-left: 10px;
|
|
702
|
-
font-size: 14px;
|
|
703
|
-
color: var(--el-color-info);
|
|
704
|
-
border: var(--el-border);
|
|
705
|
-
border-radius: 4px;
|
|
706
|
-
cursor: pointer;
|
|
707
|
-
transition: 0.2s;
|
|
708
|
-
&:hover {
|
|
709
|
-
color: var(--el-color-primary);
|
|
710
|
-
border-color: var(--el-color-primary);
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
.shortcut-title {
|
|
715
|
-
display: inline-block;
|
|
716
|
-
color: var(--el-text-color-regular);
|
|
717
|
-
width: 100%;
|
|
718
|
-
padding: 2px;
|
|
719
|
-
padding-left: 6px;
|
|
720
|
-
font-size: 14px;
|
|
721
|
-
background: linear-gradient(90deg, rgba(178, 161, 248, 0.15), rgba(123, 104, 238, 0));
|
|
722
|
-
position: relative;
|
|
723
|
-
margin-bottom: 10px;
|
|
724
|
-
display: flex;
|
|
725
|
-
align-items: center;
|
|
726
|
-
&::before {
|
|
727
|
-
content: "";
|
|
728
|
-
left: 0;
|
|
729
|
-
top: 0;
|
|
730
|
-
width: 3px;
|
|
731
|
-
height: 100%;
|
|
732
|
-
background-color: #7b68ee;
|
|
733
|
-
position: absolute;
|
|
734
|
-
}
|
|
735
|
-
.el-icon {
|
|
736
|
-
margin-top: 1px;
|
|
737
|
-
margin-left: 4px;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
.shortcut-config {
|
|
741
|
-
margin-bottom: 10px;
|
|
742
|
-
.el-tag {
|
|
743
|
-
cursor: pointer;
|
|
744
|
-
margin-right: 4px;
|
|
745
|
-
}
|
|
746
|
-
.empty {
|
|
747
|
-
display: inline-block;
|
|
748
|
-
width: 100%;
|
|
749
|
-
color: var(--el-color-info);
|
|
750
|
-
text-align: center;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
</style>
|