st-comp 0.0.208 → 0.0.210
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +74 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +54 -51
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +46 -43
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +118 -1
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +90 -87
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +28 -25
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +164 -161
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +114 -111
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +183 -180
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +143 -140
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -2
- package/es/Table.cjs +1 -1
- package/es/Table.js +58 -55
- package/es/User.cjs +1 -1
- package/es/User.js +88 -85
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +56 -53
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +17 -15
- package/es/VarietySearch.cjs +14 -14
- package/es/VarietySearch.js +2433 -2204
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +34 -31
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +106 -103
- package/es/_initCloneObject-52b6a510.cjs +1 -0
- package/es/{_initCloneObject-c477c74d.js → _initCloneObject-eaef9418.js} +26 -25
- package/es/base-a5af3db3.js +288 -0
- package/es/base-ef747d02.cjs +5 -0
- package/es/castArray-35947698.cjs +1 -0
- package/es/{castArray-1eb17278.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-18c0a68a.cjs → config-provider-a584d81e.cjs} +1 -1
- package/es/{config-provider-49c17381.js → config-provider-b16efd62.js} +6 -6
- package/es/debounce-62f5b6e8.cjs +1 -0
- package/es/{debounce-33406a0d.js → debounce-8d53f4dd.js} +9 -9
- package/es/{dropdown-3f1fe325.cjs → dropdown-071c5d7e.cjs} +1 -1
- package/es/{dropdown-6e7b1df0.js → dropdown-a59bba73.js} +15 -15
- package/es/el-autocomplete-a07e9439.cjs +1 -0
- package/es/{el-autocomplete-87b7f461.js → el-autocomplete-ba808eb6.js} +53 -51
- package/es/{el-button-56624e61.js → el-button-c95adb85.js} +46 -45
- package/es/el-button-eec58cff.cjs +1 -0
- package/es/{el-checkbox-f13560e9.js → el-checkbox-7421ccd3.js} +40 -40
- package/es/{el-checkbox-09f3b57f.cjs → el-checkbox-c25236a6.cjs} +1 -1
- package/es/{el-dialog-1d5f5877.js → el-dialog-41ab8417.js} +10 -9
- package/es/el-dialog-ae86edb8.cjs +1 -0
- package/es/{el-divider-8a4c87e3.cjs → el-divider-4713d74c.cjs} +1 -1
- package/es/{el-divider-1cda1783.js → el-divider-4e059794.js} +1 -1
- package/es/el-empty-1697ded8.cjs +1 -0
- package/es/{el-empty-04682b5d.js → el-empty-33cb66f1.js} +3 -3
- package/es/el-form-item-c3fe189b.cjs +12 -0
- package/es/{el-form-item-505c0b70.js → el-form-item-c53c374d.js} +76 -75
- package/es/{el-input-262851e8.js → el-input-2f75c4ba.js} +85 -84
- package/es/el-input-7fd293af.cjs +1 -0
- package/es/el-input-number-22e21d16.cjs +1 -0
- package/es/{el-input-number-fdac2b86.js → el-input-number-5193fe6d.js} +83 -82
- package/es/{el-loading-3cf7b796.cjs → el-loading-cfd86c15.cjs} +1 -1
- package/es/{el-loading-7440dc64.js → el-loading-f6022062.js} +2 -2
- package/es/el-menu-item-17dc717e.cjs +1 -0
- package/es/{el-menu-item-36c3004c.js → el-menu-item-7e881203.js} +54 -53
- package/es/el-message-5e6a6be9.cjs +1 -0
- package/es/{el-message-box-8f5e34ca.js → el-message-box-a93d2f6a.js} +22 -20
- package/es/el-message-box-c10adb52.cjs +1 -0
- package/es/{el-message-416bd265.js → el-message-e544a8f5.js} +29 -28
- package/es/{el-overlay-04426e36.js → el-overlay-09ad71cd.js} +53 -52
- package/es/el-overlay-9e34965f.cjs +1 -0
- package/es/el-popconfirm-70a976bf.cjs +1 -0
- package/es/{el-popconfirm-3790cda2.js → el-popconfirm-81dcd202.js} +39 -38
- package/es/{el-popper-49152708.js → el-popper-b4f97157.js} +192 -191
- package/es/el-popper-b6c99b28.cjs +1 -0
- package/es/{el-segmented-05509f9d.js → el-segmented-b868d074.js} +13 -12
- package/es/el-segmented-f8fce9ac.cjs +1 -0
- package/es/{el-select-700f3686.js → el-select-95627997.js} +295 -292
- package/es/el-select-d8d91db1.cjs +1 -0
- package/es/{el-table-column-44360700.js → el-table-column-376cd907.js} +57 -54
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/{el-tag-55a172c9.js → el-tag-66cab138.js} +31 -30
- package/es/el-tag-a33c4b22.cjs +1 -0
- package/es/{el-text-ab6bfc40.js → el-text-ac60d0f2.js} +4 -4
- package/es/{el-text-5bcaffb6.cjs → el-text-c20a9f48.cjs} +1 -1
- package/es/index-098c2447.cjs +1 -0
- package/es/{index-d8294b1a.cjs → index-11547a0c.cjs} +1 -1
- package/es/{index-0afedcbd.js → index-1f7d4f70.js} +12 -11
- package/es/{index-ae6c9d97.cjs → index-298075cf.cjs} +1 -1
- package/es/{index-4e46f96c.js → index-57672682.js} +13 -12
- package/es/{index-66ad0d6a.js → index-844bdd85.js} +34 -34
- package/es/{index-29418a8d.js → index-88546436.js} +18 -18
- package/es/index-960806da.js +314 -0
- package/es/index-9780a537.cjs +1 -0
- package/es/index-9b9ef5dd.cjs +1 -0
- package/es/{base-aa512893.js → index-a871c3eb.js} +171 -454
- package/es/index-bb833443.cjs +1 -0
- package/es/index-c108567d.cjs +1 -0
- package/es/index-d77a7336.js +204 -0
- package/es/{index-cbbd78b4.js → index-d91dc23f.js} +12 -12
- package/es/index-e5566b94.js +368 -0
- package/es/index-f3562b52.cjs +1 -0
- package/es/{index-882d77d3.cjs → index-f967d6c1.cjs} +1 -1
- package/es/raf-80ef0c0a.js +6 -0
- package/es/{raf-336ef01e.cjs → raf-8249652f.cjs} +1 -1
- package/es/{scroll-0a48995c.js → scroll-679bd6bf.js} +5 -5
- package/es/{scroll-19533c53.cjs → scroll-b108dabd.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-815d48a6.js +364 -0
- package/es/use-form-common-props-fd9b61a0.cjs +1 -0
- package/es/use-global-config-30d7d8ce.cjs +1 -0
- package/es/use-global-config-b5e9d3d5.js +72 -0
- package/es/{validator-28b22907.cjs → validator-1b8a6128.cjs} +1 -1
- package/es/{validator-e35f7978.js → validator-764a9db0.js} +1 -1
- package/es/{vnode-b62d0045.js → vnode-5ddb7ed1.js} +1 -1
- package/es/{vnode-8cb31692.cjs → vnode-b906ae6d.cjs} +1 -1
- package/es/{zh-cn-7c8640bb.cjs → zh-cn-90317f62.cjs} +1 -1
- package/es/{zh-cn-346f3a73.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +202 -202
- package/lib/{index-da0f2951.js → index-a5dba4c8.js} +26352 -26126
- package/lib/{python-c0a1e4ef.js → python-198536af.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/Kline/componentsNew/KlineTips/index.vue +4 -4
- package/packages/Kline/index.vue +4 -4
- package/packages/KlineNew/components/KlineTips/index.vue +8 -8
- package/packages/KlinePlus/index.vue +4 -4
- package/packages/VarietySearch/components/CommonIndicator/index.vue +9 -8
- package/packages/VarietySearch/components/CompositeOrder/index.vue +243 -0
- package/packages/VarietySearch/config.js +16 -7
- package/packages/VarietySearch/index.vue +140 -125
- package/src/pages/KlineBasic/api.js +1 -1
- package/src/pages/VarietySearch/index.vue +101 -8
- package/es/_initCloneObject-e660897e.cjs +0 -1
- package/es/base-7ba08794.cjs +0 -5
- package/es/castArray-efa457a5.cjs +0 -1
- package/es/debounce-4aa22feb.cjs +0 -1
- package/es/el-autocomplete-609ac86d.cjs +0 -1
- package/es/el-button-08310c06.cjs +0 -1
- package/es/el-dialog-ea480083.cjs +0 -1
- package/es/el-empty-b40fa7ea.cjs +0 -1
- package/es/el-form-item-338ea2f7.cjs +0 -12
- package/es/el-input-b04b5bfc.cjs +0 -1
- package/es/el-input-number-7242c8b5.cjs +0 -1
- package/es/el-menu-item-7aca344e.cjs +0 -1
- package/es/el-message-05cd85bf.cjs +0 -1
- package/es/el-message-box-b7e9917e.cjs +0 -1
- package/es/el-overlay-60bc5a02.cjs +0 -1
- package/es/el-popconfirm-24b622c5.cjs +0 -1
- package/es/el-popper-1dd8f5b4.cjs +0 -1
- package/es/el-segmented-a928d89b.cjs +0 -1
- package/es/el-select-5fd77a96.cjs +0 -1
- package/es/el-table-column-bf3ab2a6.cjs +0 -14
- package/es/el-tag-d59f3463.cjs +0 -1
- package/es/index-3d0bc5da.js +0 -566
- package/es/index-a206f6eb.cjs +0 -1
- package/es/index-b4700d83.cjs +0 -1
- package/es/index-c30cf7f9.cjs +0 -1
- package/es/raf-d8c44079.js +0 -6
- package/es/use-form-common-props-41182853.cjs +0 -1
- package/es/use-form-common-props-4cdda474.js +0 -671
- package/es/use-global-config-7bfbe48c.js +0 -71
- package/es/use-global-config-dc5527e8.cjs +0 -1
package/package.json
CHANGED
|
@@ -28,10 +28,10 @@ const mainTips = computed(() => {
|
|
|
28
28
|
if (data.data && data.data[activeIndex]) {
|
|
29
29
|
const itemData = data.data[activeIndex];
|
|
30
30
|
const result = [
|
|
31
|
-
{ label: "开", value:
|
|
32
|
-
{ label: "高", value:
|
|
33
|
-
{ label: "低", value:
|
|
34
|
-
{ label: "收", value:
|
|
31
|
+
{ label: "开", value: itemData[0] },
|
|
32
|
+
{ label: "高", value: itemData[3] },
|
|
33
|
+
{ label: "低", value: itemData[2] },
|
|
34
|
+
{ label: "收", value: itemData[1] },
|
|
35
35
|
];
|
|
36
36
|
// 特殊: 交易总额
|
|
37
37
|
itemData[4] !== null && result.push({ label: "额", value: formatValue(itemData[4]) });
|
package/packages/Kline/index.vue
CHANGED
|
@@ -156,10 +156,10 @@ const kLineTips = computed(() => {
|
|
|
156
156
|
// 处理结果
|
|
157
157
|
const result = [];
|
|
158
158
|
const { open, heigh, low, close, business, riseAndFall } = config.value.tipsConfig;
|
|
159
|
-
open && result.push({ label: "开", value:
|
|
160
|
-
heigh && result.push({ label: "高", value:
|
|
161
|
-
low && result.push({ label: "低", value:
|
|
162
|
-
close && result.push({ label: "收", value:
|
|
159
|
+
open && result.push({ label: "开", value: klineItem[0], color: "rgb(153, 153, 153)" });
|
|
160
|
+
heigh && result.push({ label: "高", value: klineItem[3], color: "rgb(153, 153, 153)" });
|
|
161
|
+
low && result.push({ label: "低", value: klineItem[2], color: "rgb(153, 153, 153)" });
|
|
162
|
+
close && result.push({ label: "收", value: klineItem[1], color: "rgb(153, 153, 153)" });
|
|
163
163
|
business && result.push({ label: "额", value: formatPrice(klineItem[4]), color: "rgb(153, 153, 153)" });
|
|
164
164
|
if (riseAndFall) {
|
|
165
165
|
let ratio = (((klineItem[1] - klineItem[5]) / klineItem[1]) * 100).toFixed(2);
|
|
@@ -46,10 +46,10 @@ const mainTips = computed(() => {
|
|
|
46
46
|
diffColor = "green";
|
|
47
47
|
}
|
|
48
48
|
return [
|
|
49
|
-
{ label: "开", value:
|
|
50
|
-
{ label: "高", value:
|
|
51
|
-
{ label: "低", value:
|
|
52
|
-
{ label: "收", value:
|
|
49
|
+
{ label: "开", value: candlestickData[activeIndex][0] },
|
|
50
|
+
{ label: "高", value: candlestickData[activeIndex][3] },
|
|
51
|
+
{ label: "低", value: candlestickData[activeIndex][2] },
|
|
52
|
+
{ label: "收", value: candlestickData[activeIndex][1] },
|
|
53
53
|
{ label: "额", value: formatValue(candlestickData[activeIndex][4]) },
|
|
54
54
|
{ label: "涨跌", value: `${round(candlestickData[activeIndex][6])}%`, color: diffColor }
|
|
55
55
|
]
|
|
@@ -57,10 +57,10 @@ const mainTips = computed(() => {
|
|
|
57
57
|
// candlestickData: [开, 收, 低, 高, 昨收, 交易总额]
|
|
58
58
|
const itemData = drawData.candlestickData[activeIndex];
|
|
59
59
|
const result = [
|
|
60
|
-
{ label: "开", value:
|
|
61
|
-
{ label: "高", value:
|
|
62
|
-
{ label: "低", value:
|
|
63
|
-
{ label: "收", value:
|
|
60
|
+
{ label: "开", value: itemData[0] },
|
|
61
|
+
{ label: "高", value: itemData[3] },
|
|
62
|
+
{ label: "低", value: itemData[2] },
|
|
63
|
+
{ label: "收", value: itemData[1] },
|
|
64
64
|
];
|
|
65
65
|
// 特殊: 交易总额
|
|
66
66
|
itemData[5] !== undefined && result.push({ label: "额", value: formatValue(itemData[5]) });
|
|
@@ -82,10 +82,10 @@ const mainTips = computed(() => {
|
|
|
82
82
|
];
|
|
83
83
|
}
|
|
84
84
|
const result = [
|
|
85
|
-
{ label: "开", value:
|
|
86
|
-
{ label: "高", value:
|
|
87
|
-
{ label: "低", value:
|
|
88
|
-
{ label: "收", value:
|
|
85
|
+
{ label: "开", value: itemData[0] },
|
|
86
|
+
{ label: "高", value: itemData[3] },
|
|
87
|
+
{ label: "低", value: itemData[2] },
|
|
88
|
+
{ label: "收", value: itemData[1] },
|
|
89
89
|
];
|
|
90
90
|
// 特殊: 交易总额
|
|
91
91
|
itemData[4] !== null && result.push({ label: "额", value: formatValue(itemData[4]) });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- 常用指标组件 -->
|
|
2
2
|
<script setup name="CommonIndicator">
|
|
3
|
-
import { ref, watch, computed } from "vue";
|
|
3
|
+
import { ref, watch, computed, inject } from "vue";
|
|
4
4
|
|
|
5
5
|
const perVolumnRadioOptions = [
|
|
6
6
|
{ label: "近2周", value: "1" },
|
|
@@ -16,6 +16,7 @@ const auditOpinionTypeRadioOptions = [
|
|
|
16
16
|
{ label: "无法表示意见", value: 4 },
|
|
17
17
|
];
|
|
18
18
|
|
|
19
|
+
const clearRow = inject("clearRow");
|
|
19
20
|
const data = defineModel("data", { default: [] });
|
|
20
21
|
const props = defineProps({
|
|
21
22
|
config: { type: Object, default: () => {} },
|
|
@@ -369,7 +370,7 @@ const changeMainFlowRadioType = () => {
|
|
|
369
370
|
<div class="indicator">
|
|
370
371
|
<div class="title">
|
|
371
372
|
<span>常用指标: </span>
|
|
372
|
-
<span>不限</span>
|
|
373
|
+
<span @click="clearRow('commonIndicator')">不限</span>
|
|
373
374
|
</div>
|
|
374
375
|
<div class="options">
|
|
375
376
|
<span
|
|
@@ -381,7 +382,7 @@ const changeMainFlowRadioType = () => {
|
|
|
381
382
|
</span>
|
|
382
383
|
</div>
|
|
383
384
|
</div>
|
|
384
|
-
<!--
|
|
385
|
+
<!-- TagList: 已选指标 -->
|
|
385
386
|
<div class="tags">
|
|
386
387
|
<el-tag
|
|
387
388
|
v-for="(item, index) in data"
|
|
@@ -397,8 +398,7 @@ const changeMainFlowRadioType = () => {
|
|
|
397
398
|
>
|
|
398
399
|
</el-tag>
|
|
399
400
|
</div>
|
|
400
|
-
|
|
401
|
-
<!-- 指标弹窗 -->
|
|
401
|
+
<!-- TagInfo: 指标具体弹窗 -->
|
|
402
402
|
<el-dialog
|
|
403
403
|
v-model="visible"
|
|
404
404
|
:title="nowIndicator.label"
|
|
@@ -716,7 +716,6 @@ const changeMainFlowRadioType = () => {
|
|
|
716
716
|
.common-indicator {
|
|
717
717
|
.indicator {
|
|
718
718
|
display: flex;
|
|
719
|
-
align-items: start;
|
|
720
719
|
.title {
|
|
721
720
|
height: 24px;
|
|
722
721
|
min-width: 100px;
|
|
@@ -733,13 +732,15 @@ const changeMainFlowRadioType = () => {
|
|
|
733
732
|
}
|
|
734
733
|
}
|
|
735
734
|
.options {
|
|
735
|
+
display: flex;
|
|
736
|
+
flex-wrap: wrap;
|
|
736
737
|
span {
|
|
737
738
|
font-size: 12px;
|
|
739
|
+
height: 24;
|
|
738
740
|
line-height: 24px;
|
|
739
741
|
color: var(--el-text-color-regular);
|
|
740
|
-
padding: 4px 0;
|
|
741
|
-
margin-right: 20px;
|
|
742
742
|
cursor: pointer;
|
|
743
|
+
margin-right: 16px;
|
|
743
744
|
&:hover {
|
|
744
745
|
color: var(--el-color-primary);
|
|
745
746
|
}
|
|
@@ -0,0 +1,243 @@
|
|
|
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 props = defineProps({
|
|
9
|
+
config: { type: Object, default: () => {} },
|
|
10
|
+
varietyMarket: { type: null || Number, default: () => null }, // 已选品种市场
|
|
11
|
+
commonOption: { type: Array, default: () => [] }, // 已选常用选项
|
|
12
|
+
});
|
|
13
|
+
const visible = ref(false);
|
|
14
|
+
const compositeOrderForm = ref({ name: null, value: "desc" });
|
|
15
|
+
|
|
16
|
+
// 组合排序数据源 [受到: 品种市场, 常用选项影响]
|
|
17
|
+
const compositeOrderOptions = computed(() => {
|
|
18
|
+
let result = [];
|
|
19
|
+
// 如果品种市场和常用选项一个都没有选, 那么就展示全部的常用指标
|
|
20
|
+
if (props.varietyMarket === null && !props.commonOption.length) {
|
|
21
|
+
result = props.config.options;
|
|
22
|
+
} else {
|
|
23
|
+
result = props.config.options;
|
|
24
|
+
// 1. 如果选择了品种市场, 进行一波筛选
|
|
25
|
+
if (props.varietyMarket) {
|
|
26
|
+
result = result.filter(({ parent }) => parent.varietyMarketIds.includes(props.varietyMarket));
|
|
27
|
+
}
|
|
28
|
+
// 2. 如果选择了常用选项, 进行一波筛选
|
|
29
|
+
if (props.commonOption.length) {
|
|
30
|
+
result = result.filter(({ parent }) => {
|
|
31
|
+
const { commonOptionIds } = parent;
|
|
32
|
+
// 只要选择了的常用选项里面, 有commonOptionIds中的值, 那么就展示, 即判断两个数组是否有重复元素
|
|
33
|
+
return [...new Set([...commonOptionIds, ...props.commonOption])].length !== [...commonOptionIds, ...props.commonOption].length;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
});
|
|
39
|
+
// 条件: 新增, 编辑, 窗口确认, 删除
|
|
40
|
+
const handleAction = (action, index) => {
|
|
41
|
+
switch (action) {
|
|
42
|
+
// 新增
|
|
43
|
+
case "add": {
|
|
44
|
+
compositeOrderForm.value = { name: null, value: "desc" };
|
|
45
|
+
visible.value = true;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
// 编辑
|
|
49
|
+
case "edit": {
|
|
50
|
+
const item = data.value[index];
|
|
51
|
+
compositeOrderForm.value = { ...item };
|
|
52
|
+
visible.value = true;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
// 窗口确认
|
|
56
|
+
case "submit": {
|
|
57
|
+
if (!compositeOrderForm.value.name) return ElMessage.warning("请选择需要排序的条件");
|
|
58
|
+
const { label } = compositeOrderOptions.value.find((item) => item.key === compositeOrderForm.value.name);
|
|
59
|
+
const tagText = `${label}-${compositeOrderForm.value.value === "asc" ? "正序↑" : "降序↓"}`;
|
|
60
|
+
// 判断data中是否已存在同字段条件, 是则替换, 否则push
|
|
61
|
+
const keyIndex = data.value.findIndex(({ name }) => name === compositeOrderForm.value.name);
|
|
62
|
+
if (keyIndex === -1) {
|
|
63
|
+
data.value.push({ ...compositeOrderForm.value, tagText });
|
|
64
|
+
} else {
|
|
65
|
+
data.value.splice(keyIndex, 1, { ...compositeOrderForm.value, tagText });
|
|
66
|
+
}
|
|
67
|
+
visible.value = false;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
// 删除
|
|
71
|
+
case "delete": {
|
|
72
|
+
data.value.splice(index, 1);
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// 监视排序数据源变动, 已勾选且新的数据源中也有它,则要进行勾选保留
|
|
79
|
+
watch(
|
|
80
|
+
() => compositeOrderOptions.value,
|
|
81
|
+
() => {
|
|
82
|
+
if (data.value.length) {
|
|
83
|
+
data.value = data.value.filter(({ name }) => {
|
|
84
|
+
return compositeOrderOptions.value.find((item) => item.key === name);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<template>
|
|
92
|
+
<div
|
|
93
|
+
class="composite-order"
|
|
94
|
+
v-if="config.show && compositeOrderOptions.length"
|
|
95
|
+
>
|
|
96
|
+
<div class="title">
|
|
97
|
+
<span>组合排序: </span>
|
|
98
|
+
<span @click="clearRow('compositeOrder')">不限</span>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="tag-box">
|
|
101
|
+
<el-tag
|
|
102
|
+
v-for="(item, index) in data"
|
|
103
|
+
closable
|
|
104
|
+
type="info"
|
|
105
|
+
@close="handleAction('delete', index)"
|
|
106
|
+
>
|
|
107
|
+
<span>{{ item.tagText }}</span>
|
|
108
|
+
<span
|
|
109
|
+
class="edit"
|
|
110
|
+
@click="handleAction('edit', index)"
|
|
111
|
+
>编辑</span
|
|
112
|
+
>
|
|
113
|
+
</el-tag>
|
|
114
|
+
<el-button
|
|
115
|
+
type="primary"
|
|
116
|
+
plain
|
|
117
|
+
size="small"
|
|
118
|
+
:icon="Plus"
|
|
119
|
+
@click="handleAction('add')"
|
|
120
|
+
>
|
|
121
|
+
添加排序
|
|
122
|
+
</el-button>
|
|
123
|
+
</div>
|
|
124
|
+
<el-dialog
|
|
125
|
+
modal-class="order-dialog"
|
|
126
|
+
v-model="visible"
|
|
127
|
+
width="400"
|
|
128
|
+
align-center
|
|
129
|
+
destroy-on-close
|
|
130
|
+
draggable
|
|
131
|
+
overflow
|
|
132
|
+
:modal="false"
|
|
133
|
+
:modal-penetrable="true"
|
|
134
|
+
:show-close="false"
|
|
135
|
+
>
|
|
136
|
+
<template #header="{ titleId, titleClass }">
|
|
137
|
+
<div class="custom-header">
|
|
138
|
+
<div class="left">
|
|
139
|
+
<span
|
|
140
|
+
:id="titleId"
|
|
141
|
+
:class="titleClass"
|
|
142
|
+
>
|
|
143
|
+
添加条件
|
|
144
|
+
</span>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="right">
|
|
147
|
+
<el-icon @click="visible = false"><Close /></el-icon>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</template>
|
|
151
|
+
<el-form
|
|
152
|
+
ref="compositeOrderFormRef"
|
|
153
|
+
:model="compositeOrderForm"
|
|
154
|
+
>
|
|
155
|
+
<el-form-item label="添加条件: ">
|
|
156
|
+
<el-select
|
|
157
|
+
v-model="compositeOrderForm.name"
|
|
158
|
+
filterable
|
|
159
|
+
placeholder="请选择"
|
|
160
|
+
no-match-text="未匹配到相关条件"
|
|
161
|
+
>
|
|
162
|
+
<el-option
|
|
163
|
+
v-for="{ label, key } in compositeOrderOptions"
|
|
164
|
+
:label="label"
|
|
165
|
+
:value="key"
|
|
166
|
+
:key="key"
|
|
167
|
+
/>
|
|
168
|
+
</el-select>
|
|
169
|
+
</el-form-item>
|
|
170
|
+
<el-form-item label="排序方式: ">
|
|
171
|
+
<el-radio-group v-model="compositeOrderForm.value">
|
|
172
|
+
<el-radio
|
|
173
|
+
label="正序"
|
|
174
|
+
value="asc"
|
|
175
|
+
/>
|
|
176
|
+
<el-radio
|
|
177
|
+
label="倒序"
|
|
178
|
+
value="desc"
|
|
179
|
+
/>
|
|
180
|
+
</el-radio-group>
|
|
181
|
+
</el-form-item>
|
|
182
|
+
</el-form>
|
|
183
|
+
<template #footer>
|
|
184
|
+
<div class="dialog-footer">
|
|
185
|
+
<el-button @click="visible = false">取消</el-button>
|
|
186
|
+
<el-button
|
|
187
|
+
type="primary"
|
|
188
|
+
@click="handleAction('submit')"
|
|
189
|
+
>
|
|
190
|
+
确定
|
|
191
|
+
</el-button>
|
|
192
|
+
</div>
|
|
193
|
+
</template>
|
|
194
|
+
</el-dialog>
|
|
195
|
+
</div>
|
|
196
|
+
</template>
|
|
197
|
+
|
|
198
|
+
<style lang="scss" scoped>
|
|
199
|
+
.composite-order {
|
|
200
|
+
display: flex;
|
|
201
|
+
.title {
|
|
202
|
+
height: 24px;
|
|
203
|
+
min-width: 100px;
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
line-height: 24px;
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
span:nth-child(1) {
|
|
209
|
+
width: 60px;
|
|
210
|
+
}
|
|
211
|
+
span:nth-child(2) {
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
color: var(--el-color-primary);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
.tag-box {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
gap: 10px;
|
|
220
|
+
.edit {
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
color: var(--el-color-primary);
|
|
223
|
+
margin-left: 6px;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
.order-dialog {
|
|
227
|
+
.custom-header {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
.left,
|
|
232
|
+
.right {
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
gap: 10px;
|
|
236
|
+
}
|
|
237
|
+
.el-icon {
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 品种池搜索组件的默认配置项
|
|
2
|
-
|
|
3
|
-
// 品种市场 [选项:
|
|
2
|
+
const config = {
|
|
3
|
+
// 品种市场 [选项: 接口]
|
|
4
4
|
varietyMarket: {
|
|
5
5
|
show: true,
|
|
6
6
|
options: [
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
// { label: "期权", value: 8, memo: [11] },
|
|
14
14
|
],
|
|
15
15
|
},
|
|
16
|
-
// 常用选项 [选项:
|
|
16
|
+
// 常用选项 [选项: 接口]
|
|
17
17
|
commonOption: {
|
|
18
18
|
show: true,
|
|
19
19
|
options: [
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
// { label: "概念板块指数", value: 15 },
|
|
34
34
|
],
|
|
35
35
|
},
|
|
36
|
-
// 上市板块 [选项:
|
|
36
|
+
// 上市板块 [选项: 接口]
|
|
37
37
|
marketIds: {
|
|
38
38
|
show: true,
|
|
39
39
|
options: [
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
// { label: "深港通", value: 8192, varietyMarketIds: "5" },
|
|
48
48
|
],
|
|
49
49
|
},
|
|
50
|
-
// 自定标签 [选项:
|
|
50
|
+
// 自定标签 [选项: 接口]
|
|
51
51
|
customTag: {
|
|
52
52
|
show: true,
|
|
53
53
|
options: [],
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
{ label: "中证1000", value: "ZZ1000CFJC" },
|
|
65
65
|
],
|
|
66
66
|
},
|
|
67
|
-
// 因子筛选 [选项:
|
|
67
|
+
// 因子筛选 [选项: 接口]
|
|
68
68
|
factorScreen: {
|
|
69
69
|
show: true,
|
|
70
70
|
// SQL功能是否展示
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
factorOptions: [], // 因子下拉框数据源
|
|
78
78
|
factorDescriptions: [], // 因子使用说明数据源
|
|
79
79
|
},
|
|
80
|
-
// 常用指标 [选项:
|
|
80
|
+
// 常用指标 [选项: 前端默认]
|
|
81
81
|
commonIndicator: {
|
|
82
82
|
show: true,
|
|
83
83
|
options: [
|
|
@@ -615,3 +615,12 @@ export default {
|
|
|
615
615
|
],
|
|
616
616
|
},
|
|
617
617
|
};
|
|
618
|
+
|
|
619
|
+
export default {
|
|
620
|
+
...config,
|
|
621
|
+
// 组合排序 [选项: 前端默认] 本质就是给常用指标排序用的, 用的就是常用指标的数据源
|
|
622
|
+
compositeOrder: {
|
|
623
|
+
show: true,
|
|
624
|
+
options: config.commonIndicator.options,
|
|
625
|
+
},
|
|
626
|
+
};
|