st-comp 0.0.220 → 0.0.222
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.js +4 -4
- package/es/CustomFunction.js +30 -30
- package/es/FactorWarning.js +33 -33
- package/es/Kline.js +17 -17
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +432 -401
- package/es/KlineConfig.js +61 -61
- package/es/KlineNew.js +16 -16
- package/es/KlinePlus.js +19 -19
- package/es/Pagination.js +73 -73
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.js +38 -38
- package/es/TreeMap.cjs +1 -2
- package/es/TreeMap.js +1 -163
- package/es/User.js +44 -44
- package/es/VarSelectDialog.js +24 -24
- package/es/VarietyAutoComplete.js +10 -10
- package/es/VarietySearch.cjs +18 -18
- package/es/VarietySearch.js +2388 -2224
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +15 -15
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-eaef9418.js → _initCloneObject-71a2d663.js} +7 -7
- package/es/{base-a5af3db3.js → base-ff0e366f.js} +40 -40
- package/es/{castArray-7741a212.js → castArray-15070be9.js} +1 -1
- package/es/{config-provider-b16efd62.js → config-provider-ef3c8ca2.js} +6 -6
- package/es/{debounce-8d53f4dd.js → debounce-e9e47f9a.js} +1 -1
- package/es/{dropdown-a59bba73.js → dropdown-41512a70.js} +13 -13
- package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-6b56f161.js} +16 -16
- package/es/{el-button-c95adb85.js → el-button-72e66b1c.js} +39 -39
- package/es/{el-checkbox-7421ccd3.js → el-checkbox-7df65088.js} +31 -31
- package/es/{el-dialog-41ab8417.js → el-dialog-7d6e8f91.js} +15 -15
- package/es/{el-divider-4e059794.js → el-divider-4fe55ebe.js} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-ceecb81c.js} +5 -5
- package/es/{el-form-item-c53c374d.js → el-form-item-706eb72e.js} +36 -36
- package/es/{el-input-2f75c4ba.js → el-input-8cafa639.js} +55 -55
- package/es/{el-input-number-5193fe6d.js → el-input-number-7907c63c.js} +36 -36
- package/es/{el-loading-f6022062.js → el-loading-3cfc4e19.js} +5 -5
- package/es/{el-menu-item-7e881203.js → el-menu-item-f7436984.js} +22 -22
- package/es/{el-message-box-a93d2f6a.js → el-message-box-8e4d6990.js} +11 -11
- package/es/{el-message-e544a8f5.js → el-message-f3d56a3e.js} +23 -23
- package/es/{el-overlay-09ad71cd.js → el-overlay-31707230.js} +56 -56
- package/es/{el-popconfirm-81dcd202.js → el-popconfirm-b113716a.js} +20 -20
- package/es/{el-popper-b4f97157.js → el-popper-f28554e1.js} +109 -109
- package/es/{el-segmented-b868d074.js → el-segmented-5f4d8e64.js} +8 -8
- package/es/{el-select-95627997.js → el-select-90ba1ff9.js} +64 -64
- package/es/{el-table-column-376cd907.js → el-table-column-bccab55d.js} +15 -15
- package/es/{el-tag-66cab138.js → el-tag-f03f602d.js} +15 -15
- package/es/{el-text-ac60d0f2.js → el-text-f106c80e.js} +2 -2
- package/es/{index-57672682.js → index-00e91ed2.js} +3 -3
- package/es/{index-a871c3eb.js → index-065f4c40.js} +29 -29
- package/es/{index-844bdd85.js → index-158df623.js} +34 -34
- package/es/{index-960806da.js → index-269b8a8c.js} +36 -36
- package/es/{index-d91dc23f.js → index-49767c81.js} +12 -12
- package/es/{index-e5566b94.js → index-60dd8509.js} +43 -43
- package/es/{index-88546436.js → index-89707217.js} +17 -17
- package/es/{index-d77a7336.js → index-93a8960e.js} +1 -1
- package/es/{index-1f7d4f70.js → index-b792012c.js} +2 -2
- package/es/raf-8e05a7f4.js +6 -0
- package/es/{scroll-679bd6bf.js → scroll-41b4f625.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-815d48a6.js → use-form-common-props-1f967d2e.js} +67 -67
- package/es/{use-global-config-b5e9d3d5.js → use-global-config-ded5e07b.js} +14 -14
- package/es/{validator-764a9db0.js → validator-5c8b5cdc.js} +1 -1
- package/es/{vnode-5ddb7ed1.js → vnode-06571d5b.js} +1 -1
- package/es/{zh-cn-e963c628.js → zh-cn-cae8ba43.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +174 -174
- package/lib/{index-5488b4d1.js → index-b2c7b8c5.js} +18110 -17915
- package/lib/{python-8dfbca86.js → python-430bbf9c.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/AverageTips/index.vue +33 -0
- package/packages/KlineBasic/components/KlineSub/index.vue +2 -2
- package/packages/KlineBasic/components/Tips/index.vue +21 -3
- package/packages/VarietySearch/components/AddTag/index.vue +191 -0
- package/packages/VarietySearch/index.vue +14 -13
- package/src/pages/KlineBasic/api.js +1 -1
- package/es/raf-80ef0c0a.js +0 -6
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="kline-averageTips">
|
|
3
|
+
<div
|
|
4
|
+
v-for="(item, index) in data"
|
|
5
|
+
:key="index"
|
|
6
|
+
class="kline-averageTips-item"
|
|
7
|
+
:style="{ color: item.color, width: `calc(100% / ${data.length} - 10px)` }"
|
|
8
|
+
>{{ item.label }} {{ item.value }}</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
defineProps({
|
|
14
|
+
// 提示数据
|
|
15
|
+
data: {
|
|
16
|
+
type: Array,
|
|
17
|
+
require: true,
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style lang="scss" scoped>
|
|
23
|
+
.kline-averageTips {
|
|
24
|
+
width: 100%;
|
|
25
|
+
color: #fff;
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
line-height: 1.5;
|
|
28
|
+
&-item {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
margin-right: 10px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
/>
|
|
20
20
|
</el-select>
|
|
21
21
|
</div>
|
|
22
|
-
<
|
|
22
|
+
<AverageTips :data="subIndicatorTips" />
|
|
23
23
|
</div>
|
|
24
24
|
<div
|
|
25
25
|
class="klineSub-chart"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
import dayjs from "dayjs";
|
|
33
33
|
import { ref, onMounted, onUnmounted, nextTick, computed } from "vue";
|
|
34
34
|
import * as echarts from "echarts";
|
|
35
|
-
import
|
|
35
|
+
import AverageTips from "../AverageTips/index.vue";
|
|
36
36
|
import { stMath } from "st-func";
|
|
37
37
|
const { round } = stMath;
|
|
38
38
|
|
|
@@ -1,22 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="kline-tips">
|
|
2
|
+
<div class="kline-tips" ref="tipsRef">
|
|
3
3
|
<div
|
|
4
4
|
v-for="(item, index) in data"
|
|
5
5
|
:key="index"
|
|
6
6
|
class="kline-tips-item"
|
|
7
|
-
:style="{ color: item.color }"
|
|
7
|
+
:style="{ color: item.color, width: widthList[index] ? widthList[index] : null }"
|
|
8
8
|
>{{ item.label }} {{ item.value }}</div>
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup lang="ts">
|
|
13
|
-
|
|
13
|
+
import { ref, watch, nextTick } from "vue";
|
|
14
|
+
const props = defineProps({
|
|
14
15
|
// 提示数据
|
|
15
16
|
data: {
|
|
16
17
|
type: Array,
|
|
17
18
|
require: true,
|
|
18
19
|
},
|
|
19
20
|
})
|
|
21
|
+
|
|
22
|
+
const tipsRef = ref<any>(null)
|
|
23
|
+
const widthList = ref<Array<string>>([])
|
|
24
|
+
|
|
25
|
+
watch(() => props.data, () => {
|
|
26
|
+
if (widthList.value.length === 0) {
|
|
27
|
+
nextTick(() => {
|
|
28
|
+
Array.from(tipsRef.value.children).forEach((item: any, index) => {
|
|
29
|
+
if (String(props.data?.[index]?.value)?.includes('%')) {
|
|
30
|
+
widthList.value[index] = '80px'
|
|
31
|
+
} else {
|
|
32
|
+
widthList.value[index] = `${item.offsetWidth + 20}px`
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
})
|
|
20
38
|
</script>
|
|
21
39
|
|
|
22
40
|
<style lang="scss" scoped>
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-tag
|
|
4
|
+
v-for="(item, index) in showCheckTagList"
|
|
5
|
+
closable
|
|
6
|
+
style="margin-right: 10px;"
|
|
7
|
+
type="info"
|
|
8
|
+
@close="handleAction('delete', index)"
|
|
9
|
+
>
|
|
10
|
+
<span>{{ item.name }}</span>
|
|
11
|
+
</el-tag>
|
|
12
|
+
<el-button
|
|
13
|
+
class="screen-btn"
|
|
14
|
+
type="primary"
|
|
15
|
+
plain
|
|
16
|
+
size="small"
|
|
17
|
+
:icon="Plus"
|
|
18
|
+
@click="handleAction('add')"
|
|
19
|
+
>
|
|
20
|
+
添加标签
|
|
21
|
+
</el-button>
|
|
22
|
+
</div>
|
|
23
|
+
<!-- 添加标签弹窗 -->
|
|
24
|
+
<el-dialog
|
|
25
|
+
v-model="visible"
|
|
26
|
+
title="Tips"
|
|
27
|
+
width="1000"
|
|
28
|
+
>
|
|
29
|
+
<template #header>
|
|
30
|
+
<div>
|
|
31
|
+
添加标签
|
|
32
|
+
<el-radio-group v-model="tagType" size="small" style="margin-left: 8px; vertical-align: 5px;" v-if="0">
|
|
33
|
+
<el-radio-button label="个人" value="person" />
|
|
34
|
+
<el-radio-button label="系统" value="system" />
|
|
35
|
+
</el-radio-group>
|
|
36
|
+
<el-input v-model="searchValue" size="small" style="width: 120px; margin-left: 8px;" placeholder="请输入标签名称" />
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
<div class="tag-list">
|
|
40
|
+
<div class="tab-list-item" v-for="item in tagList">
|
|
41
|
+
<el-checkbox :checked="isCheck(item)" @change="changeCheckBox(item)">
|
|
42
|
+
<div style="display: flex; width: 280px;">
|
|
43
|
+
<div style="flex: 1;line-height: 24px;">{{ item.name }}</div>
|
|
44
|
+
<el-button size="small" :icon="Edit" v-if="0"></el-button>
|
|
45
|
+
<el-button size="small" :icon="Delete" @click="deleteTag(item)"></el-button>
|
|
46
|
+
</div>
|
|
47
|
+
</el-checkbox>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
<template #footer>
|
|
51
|
+
<div class="dialog-footer">
|
|
52
|
+
<el-button @click="visible = false">取消</el-button>
|
|
53
|
+
<el-button type="primary" @click="handleAction('submit')">确定</el-button>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
</el-dialog>
|
|
57
|
+
<!-- 编辑标签弹窗 -->
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup>
|
|
61
|
+
import { inject, ref, watch, computed, nextTick } from "vue";
|
|
62
|
+
import { Plus, Edit, Delete } from "@element-plus/icons-vue";
|
|
63
|
+
|
|
64
|
+
let searchTimer = null
|
|
65
|
+
|
|
66
|
+
const { request } = inject("stConfig"); // 组件库全局配置
|
|
67
|
+
|
|
68
|
+
const data = defineModel("data", { default: [] });
|
|
69
|
+
const visible = ref(false);
|
|
70
|
+
const tagType = ref('person'); // 标签类型
|
|
71
|
+
const searchValue = ref(''); // 搜索值
|
|
72
|
+
const totalTagList = ref([]); // 全部标签列表
|
|
73
|
+
const tagList = ref([]); // 标签列表
|
|
74
|
+
const checkList = ref([]); // 勾选列表
|
|
75
|
+
|
|
76
|
+
const showCheckTagList = computed(() => {
|
|
77
|
+
return data.value.map(id => {
|
|
78
|
+
return {
|
|
79
|
+
name: totalTagList.value?.find(i => i.id === id)?.tagName,
|
|
80
|
+
id,
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
watch(() => tagType.value, () => {
|
|
86
|
+
searchValue.value = ''
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
watch(() => searchValue.value, () => {
|
|
90
|
+
clearTimeout(searchTimer)
|
|
91
|
+
searchTimer = setTimeout(() => {
|
|
92
|
+
getTagList()
|
|
93
|
+
}, 300)
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
const isCheck = (item) => {
|
|
97
|
+
return Boolean(checkList.value.includes(item.id))
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const changeCheckBox = (item) => {
|
|
101
|
+
if (isCheck(item)) {
|
|
102
|
+
// 已经勾选
|
|
103
|
+
checkList.value = checkList.value.filter(i => i !== item.id)
|
|
104
|
+
} else {
|
|
105
|
+
checkList.value.push(item.id)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const handleAction = (action, index) => {
|
|
110
|
+
switch (action) {
|
|
111
|
+
// 新增
|
|
112
|
+
case "add": {
|
|
113
|
+
tagList.value = []
|
|
114
|
+
visible.value = true;
|
|
115
|
+
searchValue.value = '';
|
|
116
|
+
checkList.value = [...data.value]
|
|
117
|
+
getTagList()
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
// 编辑
|
|
121
|
+
case "edit": {
|
|
122
|
+
const item = data.value[index];
|
|
123
|
+
compositeOrderForm.value = { ...item };
|
|
124
|
+
visible.value = true;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
// 窗口确认
|
|
128
|
+
case "submit": {
|
|
129
|
+
visible.value = false;
|
|
130
|
+
data.value = [...checkList.value]
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
// 删除
|
|
134
|
+
case "delete": {
|
|
135
|
+
data.value.splice(index, 1);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const deleteTag = (item) => {
|
|
142
|
+
ElMessageBox.alert(`确认删除标签“${item.name}”吗?`, '删除标签', {
|
|
143
|
+
confirmButtonText: 'OK',
|
|
144
|
+
callback: async (action) => {
|
|
145
|
+
if (action === 'confirm') {
|
|
146
|
+
await request.post('/alarm/deliversign/deleteTag', { tagId: item.id })
|
|
147
|
+
getTagList()
|
|
148
|
+
Elmessage.success('删除成功!')
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const getTagList = async (isTotal = false) => {
|
|
155
|
+
if (tagType.value === 'person') {
|
|
156
|
+
// 个人标签
|
|
157
|
+
const res = await request.post('/alarm/deliversign/findTagsByUserId', { tagName: searchValue.value })
|
|
158
|
+
tagList.value = []
|
|
159
|
+
nextTick(() => {
|
|
160
|
+
tagList.value = res.body?.map(item => ({
|
|
161
|
+
name: item.tagName,
|
|
162
|
+
id: item.id
|
|
163
|
+
}))
|
|
164
|
+
})
|
|
165
|
+
if (isTotal) {
|
|
166
|
+
totalTagList.value = res.body
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
// 系统标签
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
getTagList(true)
|
|
174
|
+
|
|
175
|
+
defineExpose({
|
|
176
|
+
updateTag: () => {
|
|
177
|
+
getTagList(true)
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<style lang="scss" scoped>
|
|
183
|
+
.tag-list {
|
|
184
|
+
max-height: 40vh;
|
|
185
|
+
overflow-y: scroll;
|
|
186
|
+
.tab-list-item {
|
|
187
|
+
display: inline-block;
|
|
188
|
+
width: 33%;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup name="VarietySearch">
|
|
2
|
-
import { watch, computed, provide } from "vue";
|
|
2
|
+
import { watch, computed, provide, ref } from "vue";
|
|
3
3
|
import defaultConfig from "./config.js";
|
|
4
4
|
import FactorScreen from "./components/FactorScreen/index.vue";
|
|
5
5
|
import CommonIndicator from "./components/CommonIndicator/index.vue";
|
|
6
6
|
import CompositeOrder from "./components/CompositeOrder/index.vue";
|
|
7
|
+
import AddTag from "./components/AddTag/index.vue";
|
|
7
8
|
|
|
8
9
|
const props = defineProps({ config: { type: Object, default: {} } });
|
|
9
10
|
const searchData = defineModel("searchData");
|
|
@@ -34,6 +35,9 @@ searchData.value = Object.assign(searchData.value, {
|
|
|
34
35
|
compositeOrder: [],
|
|
35
36
|
});
|
|
36
37
|
|
|
38
|
+
// 添加标签
|
|
39
|
+
const addTagRef = ref();
|
|
40
|
+
|
|
37
41
|
// 合并配置项
|
|
38
42
|
const config = computed(() => {
|
|
39
43
|
const result = {};
|
|
@@ -482,6 +486,10 @@ defineExpose({
|
|
|
482
486
|
compositeOrder: [],
|
|
483
487
|
};
|
|
484
488
|
},
|
|
489
|
+
// 更新标签
|
|
490
|
+
updateTag: () => {
|
|
491
|
+
addTagRef.value.updateTag();
|
|
492
|
+
},
|
|
485
493
|
});
|
|
486
494
|
</script>
|
|
487
495
|
|
|
@@ -548,23 +556,16 @@ defineExpose({
|
|
|
548
556
|
</div>
|
|
549
557
|
</template>
|
|
550
558
|
<!-- 自定标签 -->
|
|
551
|
-
<template v-if="config.customTag?.show
|
|
559
|
+
<template v-if="config.customTag?.show">
|
|
552
560
|
<div class="variety-search-row">
|
|
553
561
|
<div class="title">
|
|
554
562
|
<span>自定标签: </span>
|
|
555
563
|
<span @click="clearRow('customTag')">不限</span>
|
|
556
564
|
</div>
|
|
557
|
-
<
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
<el-checkbox
|
|
562
|
-
v-for="{ label, value } in customTagDict"
|
|
563
|
-
:label="label"
|
|
564
|
-
:value="value"
|
|
565
|
-
:key="value"
|
|
566
|
-
/>
|
|
567
|
-
</el-checkbox-group>
|
|
565
|
+
<AddTag
|
|
566
|
+
ref="addTagRef"
|
|
567
|
+
v-model:data="searchData.customTag"
|
|
568
|
+
/>
|
|
568
569
|
</div>
|
|
569
570
|
</template>
|
|
570
571
|
<!-- 价差转换 -->
|