vue2-client 1.14.66 → 1.14.68
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/.history/public/his/editor/editor_20250606134713.html +51 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +509 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +524 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +524 -0
- package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +524 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +1320 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +1332 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +1331 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +1339 -0
- package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +173 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +222 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +229 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +241 -0
- package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +245 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +255 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +270 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +294 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +303 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +288 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +317 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +306 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +306 -0
- package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +306 -0
- package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +36 -0
- package/docs/Logic/345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +1 -0
- package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +2 -1
- package/package.json +1 -1
- package/src/base-client/components/TreeList/TreeList.vue +91 -0
- package/src/base-client/components/TreeList/TreeNode.vue +81 -0
- package/src/base-client/components/common/AmapMarker/index.js +3 -3
- package/src/base-client/components/common/XCardSet/XTiltle.vue +191 -0
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/his/XList/XList.vue +155 -22
- package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
- package/src/base-client/components/his/XTreeRows/TreeNode.vue +100 -100
- package/src/base-client/components/his/XTreeRows/XTreeRows.vue +197 -197
- package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
- package/src/base-client/components/his/threeTestOrders/threeTestOrders.vue +76 -13
- package/src/components/FileImageItem/FileItem.vue +268 -23
- package/src/components/FileImageItem/FileItemGroup.vue +197 -0
- package/src/components/FileImageItem/ImageItem.vue +32 -3
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +36 -79
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +16 -7
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +74 -31
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowTimeline.vue +1 -1
- package/src/services/api/workFlow.js +3 -1
- package/vue.config.js +2 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tree-container">
|
|
3
|
+
<div class="tree-list">
|
|
4
|
+
<tree-node
|
|
5
|
+
v-for="node in treeData"
|
|
6
|
+
:key="node.id"
|
|
7
|
+
:node="node"
|
|
8
|
+
@toggle="toggleNode"/>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import TreeNode from './TreeNode.vue'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'TreeList',
|
|
18
|
+
components: {
|
|
19
|
+
TreeNode
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
treeData: [
|
|
24
|
+
{
|
|
25
|
+
id: '1',
|
|
26
|
+
title: '体征',
|
|
27
|
+
expanded: false,
|
|
28
|
+
children: [
|
|
29
|
+
{
|
|
30
|
+
id: '1-1',
|
|
31
|
+
title: '一般情况'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: '1-2',
|
|
35
|
+
title: '皮肤粘膜'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: '1-3',
|
|
39
|
+
title: '头颈',
|
|
40
|
+
expanded: false,
|
|
41
|
+
children: [
|
|
42
|
+
{
|
|
43
|
+
id: '1-3-1',
|
|
44
|
+
title: '头部'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: '1-3-2',
|
|
48
|
+
title: '颈部'
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
toggleNode(node) {
|
|
59
|
+
node.expanded = !node.expanded
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style scoped>
|
|
66
|
+
.tree-container {
|
|
67
|
+
width: 240px;
|
|
68
|
+
height: 400px;
|
|
69
|
+
border: 1px solid #e8e8e8;
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
padding: 8px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* 自定义滚动条样式 */
|
|
75
|
+
.tree-container::-webkit-scrollbar {
|
|
76
|
+
width: 6px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tree-container::-webkit-scrollbar-thumb {
|
|
80
|
+
background-color: #ccc;
|
|
81
|
+
border-radius: 3px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.tree-container::-webkit-scrollbar-track {
|
|
85
|
+
background-color: #f5f5f5;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.tree-list {
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tree-node">
|
|
3
|
+
<div class="node-content" @click="handleClick">
|
|
4
|
+
<span v-if="hasChildren" class="toggle-icon">
|
|
5
|
+
{{ node.expanded ? '-' : '+' }}
|
|
6
|
+
</span>
|
|
7
|
+
<span class="node-title">{{ node.title }}</span>
|
|
8
|
+
</div>
|
|
9
|
+
<div v-if="hasChildren && node.expanded" class="node-children">
|
|
10
|
+
<tree-node
|
|
11
|
+
v-for="child in node.children"
|
|
12
|
+
:key="child.id"
|
|
13
|
+
:node="child"
|
|
14
|
+
@toggle="$emit('toggle', $event)"
|
|
15
|
+
:level="level + 1"/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: 'TreeNode',
|
|
23
|
+
props: {
|
|
24
|
+
node: {
|
|
25
|
+
type: Object,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
level: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
computed: {
|
|
34
|
+
hasChildren() {
|
|
35
|
+
return this.node.children && this.node.children.length > 0
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
handleClick() {
|
|
40
|
+
if (this.hasChildren) {
|
|
41
|
+
this.$emit('toggle', this.node)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style scoped>
|
|
49
|
+
.tree-node {
|
|
50
|
+
margin: 2px 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.node-content {
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: 4px 0;
|
|
57
|
+
user-select: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.toggle-icon {
|
|
61
|
+
width: 16px;
|
|
62
|
+
text-align: center;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
color: #666;
|
|
65
|
+
margin-right: 4px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.node-title {
|
|
70
|
+
flex: 1;
|
|
71
|
+
cursor: default;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.node-content:hover {
|
|
75
|
+
background-color: #f5f5f5;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.node-children {
|
|
79
|
+
padding-left: 20px;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
-
|
|
3
|
-
export default AmapPointRendering
|
|
1
|
+
import AmapPointRendering from './AmapPointRendering'
|
|
2
|
+
|
|
3
|
+
export default AmapPointRendering
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-row
|
|
3
|
+
class="title_box"
|
|
4
|
+
:style="{backgroundColor: requiredParameters.backgroundColor,height:requiredParameters.height}"
|
|
5
|
+
type="flex"
|
|
6
|
+
v-model="requiredParameters">
|
|
7
|
+
<a-col class="title_col_left" :flex="3">
|
|
8
|
+
<div class="title_img_box">
|
|
9
|
+
<img src="../img/header10086.png" class="title_img" alt="">
|
|
10
|
+
</div>
|
|
11
|
+
<div class="title_name">{{ requiredParameters.title }}</div>
|
|
12
|
+
</a-col>
|
|
13
|
+
<a-col class="title_col_right" id="titleSelect" :flex="3" style="padding-right: 3%" v-model="dateData">
|
|
14
|
+
<div class="title_date_box">
|
|
15
|
+
<div class="title_data">{{ dateData.date }}</div>
|
|
16
|
+
<div class="title_week">{{ dateData.dayOfWeek }}</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="title_time">{{ dateData.time }}</div>
|
|
19
|
+
<div style="font-size: x-large;margin-left: 1%">|</div>
|
|
20
|
+
<div class="title_refresh" @click="refreshTitle"><a-icon type="undo" style="font-size: x-large;"/></div>
|
|
21
|
+
<div class="title_refresh_box">
|
|
22
|
+
<div class="title_refresh_time">{{ dateData.refreshTime }}</div>
|
|
23
|
+
<div class="latest_update_time">最新更新时间</div>
|
|
24
|
+
</div>
|
|
25
|
+
</a-col>
|
|
26
|
+
</a-row>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: 'TitleComponent',
|
|
33
|
+
components: {},
|
|
34
|
+
data () {
|
|
35
|
+
return {
|
|
36
|
+
dateData: {
|
|
37
|
+
date: '',
|
|
38
|
+
dayOfWeek: '',
|
|
39
|
+
time: '',
|
|
40
|
+
refreshTime: ''
|
|
41
|
+
},
|
|
42
|
+
timer: null
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
props: {
|
|
46
|
+
requiredParameters: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default: () => ({
|
|
49
|
+
title: '',
|
|
50
|
+
backgroundColor: '',
|
|
51
|
+
height: ''
|
|
52
|
+
}),
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
created () {
|
|
56
|
+
this.updateDateData()
|
|
57
|
+
this.startTimer()
|
|
58
|
+
},
|
|
59
|
+
beforeDestroy () {
|
|
60
|
+
this.stopTimer()
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
// 刷新页面
|
|
64
|
+
refreshTitle () {
|
|
65
|
+
this.$forceUpdate()
|
|
66
|
+
const now = new Date()
|
|
67
|
+
this.dateData.refreshTime = now.toLocaleTimeString()
|
|
68
|
+
this.$emit('refreshTitle')
|
|
69
|
+
},
|
|
70
|
+
updateDateData () {
|
|
71
|
+
const now = new Date()
|
|
72
|
+
const options = { weekday: 'long' }
|
|
73
|
+
this.dateData.date = this.formatDate(now)
|
|
74
|
+
this.dateData.time = this.formatTime(now)
|
|
75
|
+
this.dateData.dayOfWeek = now.toLocaleDateString(undefined, options)
|
|
76
|
+
this.dateData.refreshTime = now.toLocaleTimeString()
|
|
77
|
+
},
|
|
78
|
+
formatDate (date) {
|
|
79
|
+
const month = date.getMonth() + 1
|
|
80
|
+
const day = date.getDate()
|
|
81
|
+
return `${month}月${day}日`
|
|
82
|
+
},
|
|
83
|
+
formatTime (date) {
|
|
84
|
+
const hours = String(date.getHours()).padStart(2, '0')
|
|
85
|
+
const minutes = String(date.getMinutes()).padStart(2, '0')
|
|
86
|
+
return `${hours}:${minutes}`
|
|
87
|
+
},
|
|
88
|
+
startTimer () {
|
|
89
|
+
this.timer = setInterval(() => {
|
|
90
|
+
const now = new Date()
|
|
91
|
+
this.dateData.time = this.formatTime(now)
|
|
92
|
+
}, 10000) // 每秒更新一次
|
|
93
|
+
},
|
|
94
|
+
stopTimer () {
|
|
95
|
+
if (this.timer) {
|
|
96
|
+
clearInterval(this.timer)
|
|
97
|
+
this.timer = null
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style scoped>
|
|
105
|
+
.title_box {
|
|
106
|
+
width: 100%;
|
|
107
|
+
min-height:42px;
|
|
108
|
+
}
|
|
109
|
+
.title_col_left {
|
|
110
|
+
height: 100%;
|
|
111
|
+
color: white;
|
|
112
|
+
display: flex;
|
|
113
|
+
align-content: center;
|
|
114
|
+
align-items: center;
|
|
115
|
+
}
|
|
116
|
+
.title_col_right {
|
|
117
|
+
height: 100%;
|
|
118
|
+
color: white;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-content: center;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: flex-end;
|
|
123
|
+
}
|
|
124
|
+
.title_img_box {
|
|
125
|
+
height: 80%;
|
|
126
|
+
width: auto;
|
|
127
|
+
margin-left: 1%;
|
|
128
|
+
border-radius: 50%;
|
|
129
|
+
background-color: #35baf6;
|
|
130
|
+
}
|
|
131
|
+
.title_img{
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
134
|
+
}
|
|
135
|
+
.title_name {
|
|
136
|
+
font-size: medium !important;
|
|
137
|
+
font-weight: bold;
|
|
138
|
+
margin-left: 1%;
|
|
139
|
+
}
|
|
140
|
+
.title_date_box{
|
|
141
|
+
width: 20%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
}
|
|
147
|
+
.title_data{
|
|
148
|
+
display: flex;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
align-items: center;
|
|
151
|
+
font-size: smaller;
|
|
152
|
+
}
|
|
153
|
+
.title_week{
|
|
154
|
+
display: flex;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
align-items: center;
|
|
157
|
+
font-size: smaller;
|
|
158
|
+
}
|
|
159
|
+
.title_time{
|
|
160
|
+
font-size: x-large;
|
|
161
|
+
}
|
|
162
|
+
.title_refresh{
|
|
163
|
+
margin-left: 1%;
|
|
164
|
+
height: 100%;
|
|
165
|
+
align-content: center;
|
|
166
|
+
align-items: center;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
display: flex;
|
|
169
|
+
width: 7%;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
min-width: 31px;
|
|
172
|
+
}
|
|
173
|
+
.title_refresh:hover{
|
|
174
|
+
background-color: rgb(31, 138, 137);
|
|
175
|
+
}
|
|
176
|
+
.title_refresh:active{
|
|
177
|
+
background-color: rgb(26, 129, 128);
|
|
178
|
+
}
|
|
179
|
+
.title_refresh_box{
|
|
180
|
+
margin-right: 1%;
|
|
181
|
+
}
|
|
182
|
+
.latest_update_time{
|
|
183
|
+
font-size: x-small;
|
|
184
|
+
}
|
|
185
|
+
.title_refresh_time{
|
|
186
|
+
display: flex;
|
|
187
|
+
font-size: x-small;
|
|
188
|
+
align-content: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XDetailsView from './XDetailsView'
|
|
2
|
-
|
|
3
|
-
export default XDetailsView
|
|
1
|
+
import XDetailsView from './XDetailsView'
|
|
2
|
+
|
|
3
|
+
export default XDetailsView
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import XFormGroupDetails from './XFormGroupDetails'
|
|
2
|
-
|
|
3
|
-
export default XFormGroupDetails
|
|
1
|
+
import XFormGroupDetails from './XFormGroupDetails'
|
|
2
|
+
|
|
3
|
+
export default XFormGroupDetails
|
|
@@ -1,28 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="list-wrapper">
|
|
3
3
|
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
|
-
<a-list-item
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
<a-list-item
|
|
5
|
+
slot="renderItem"
|
|
6
|
+
slot-scope="item, index"
|
|
7
|
+
class="list-item"
|
|
8
|
+
@click="handleClick(index)"
|
|
9
|
+
@mouseenter="enableHoverOptions && handleMouseEnter(index)"
|
|
10
|
+
@mouseleave="handleMouseLeave"
|
|
11
|
+
:class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }"
|
|
12
|
+
>
|
|
13
|
+
<i
|
|
14
|
+
v-if="icon"
|
|
15
|
+
class="icon-menu"
|
|
16
|
+
:style="getIconStyle(item)"
|
|
17
|
+
></i>
|
|
18
|
+
<span
|
|
19
|
+
class="item-text">
|
|
20
|
+
{{ item.number }} {{ item.name }}
|
|
21
|
+
</span>
|
|
22
|
+
|
|
23
|
+
<div v-if="button" class="button-group">
|
|
24
|
+
<a-button
|
|
25
|
+
v-for="(name, idx) in buttonNames"
|
|
26
|
+
:key="idx"
|
|
27
|
+
type="link"
|
|
28
|
+
:class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
|
|
29
|
+
@click.stop="click(index, idx)"
|
|
30
|
+
>
|
|
31
|
+
<span :class="{ 'hover-active': enableHoverOptions && hoveredIndex === index }">{{ name }}</span>
|
|
32
|
+
</a-button>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- 悬浮选项框 -->
|
|
36
|
+
<div
|
|
37
|
+
v-show="enableHoverOptions && hoveredIndex === index"
|
|
38
|
+
class="hover-options"
|
|
39
|
+
@mouseenter="handleOptionsEnter"
|
|
40
|
+
@mouseleave="handleOptionsLeave"
|
|
22
41
|
>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
<div class="hover-options-content">
|
|
43
|
+
<div
|
|
44
|
+
v-for="(item, idx) in select_options"
|
|
45
|
+
:key="idx"
|
|
46
|
+
class="option-item"
|
|
47
|
+
@click="handleOptionClick(index, item)"
|
|
48
|
+
>
|
|
49
|
+
{{ item }}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
26
53
|
</a-list-item>
|
|
27
54
|
</a-list>
|
|
28
55
|
</div>
|
|
@@ -42,6 +69,10 @@ export default {
|
|
|
42
69
|
fixedQueryForm: {
|
|
43
70
|
type: Object,
|
|
44
71
|
default: { condition: '1=1' }
|
|
72
|
+
},
|
|
73
|
+
enableHoverOptions: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: true
|
|
45
76
|
}
|
|
46
77
|
},
|
|
47
78
|
inject: ['getComponentByName'],
|
|
@@ -51,7 +82,12 @@ export default {
|
|
|
51
82
|
button: false,
|
|
52
83
|
icon: false,
|
|
53
84
|
buttonNames: [],
|
|
54
|
-
buttonMode: false
|
|
85
|
+
buttonMode: false,
|
|
86
|
+
hoveredIndex: -1,
|
|
87
|
+
isOptionsHovered: false,
|
|
88
|
+
hoverTimer: null,
|
|
89
|
+
leaveTimer: null,
|
|
90
|
+
select_options: []
|
|
55
91
|
}
|
|
56
92
|
},
|
|
57
93
|
created () {
|
|
@@ -65,6 +101,10 @@ export default {
|
|
|
65
101
|
that.icon = res.icon
|
|
66
102
|
that.buttonNames = res.buttonNames || []
|
|
67
103
|
that.buttonMode = res.buttonMode || false
|
|
104
|
+
this.enableHoverOptions = res.enableHoverOptions || false
|
|
105
|
+
if (this.enableHoverOptions) {
|
|
106
|
+
this.select_options = res.select_options
|
|
107
|
+
}
|
|
68
108
|
runLogic(res.data, param, 'af-his').then(ress => {
|
|
69
109
|
that.data = ress
|
|
70
110
|
})
|
|
@@ -88,6 +128,42 @@ export default {
|
|
|
88
128
|
runLogic(this.queryParamsName, par, 'af-his').then(res => {
|
|
89
129
|
this.data = res.data
|
|
90
130
|
})
|
|
131
|
+
},
|
|
132
|
+
handleMouseEnter (index) {
|
|
133
|
+
this.clearAllTimers()
|
|
134
|
+
this.hoveredIndex = index
|
|
135
|
+
this.isOptionsHovered = true
|
|
136
|
+
},
|
|
137
|
+
handleMouseLeave () {
|
|
138
|
+
this.clearAllTimers()
|
|
139
|
+
this.leaveTimer = setTimeout(() => {
|
|
140
|
+
this.isOptionsHovered = false
|
|
141
|
+
this.hoveredIndex = -1
|
|
142
|
+
}, 100)
|
|
143
|
+
},
|
|
144
|
+
handleOptionsEnter () {
|
|
145
|
+
this.clearAllTimers()
|
|
146
|
+
this.isOptionsHovered = true
|
|
147
|
+
},
|
|
148
|
+
handleOptionsLeave () {
|
|
149
|
+
this.clearAllTimers()
|
|
150
|
+
this.leaveTimer = setTimeout(() => {
|
|
151
|
+
this.isOptionsHovered = false
|
|
152
|
+
this.hoveredIndex = -1
|
|
153
|
+
}, 100)
|
|
154
|
+
},
|
|
155
|
+
clearAllTimers () {
|
|
156
|
+
if (this.hoverTimer) {
|
|
157
|
+
clearTimeout(this.hoverTimer)
|
|
158
|
+
this.hoverTimer = null
|
|
159
|
+
}
|
|
160
|
+
if (this.leaveTimer) {
|
|
161
|
+
clearTimeout(this.leaveTimer)
|
|
162
|
+
this.leaveTimer = null
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
handleOptionClick (index, action) {
|
|
166
|
+
this.$emit('optionClick', { data: this.data[index], action })
|
|
91
167
|
}
|
|
92
168
|
},
|
|
93
169
|
watch: {
|
|
@@ -97,6 +173,9 @@ export default {
|
|
|
97
173
|
this.refreshList(val)
|
|
98
174
|
}
|
|
99
175
|
}
|
|
176
|
+
},
|
|
177
|
+
beforeDestroy () {
|
|
178
|
+
this.clearAllTimers()
|
|
100
179
|
}
|
|
101
180
|
}
|
|
102
181
|
</script>
|
|
@@ -124,6 +203,8 @@ export default {
|
|
|
124
203
|
border: 1px solid #D9D9D9;
|
|
125
204
|
box-sizing: border-box;
|
|
126
205
|
margin-bottom: 8px !important;
|
|
206
|
+
position: relative;
|
|
207
|
+
transition: background-color 0.3s ease;
|
|
127
208
|
}
|
|
128
209
|
|
|
129
210
|
.icon-menu {
|
|
@@ -170,4 +251,56 @@ export default {
|
|
|
170
251
|
.list-wrapper::-webkit-scrollbar-track {
|
|
171
252
|
background-color: #f0f0f0;
|
|
172
253
|
}
|
|
254
|
+
|
|
255
|
+
.hover-active {
|
|
256
|
+
color: white;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.list-item.hover-active {
|
|
260
|
+
background-color: rgb(0, 87, 254) !important;
|
|
261
|
+
color: white;
|
|
262
|
+
border: 1px solid black;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.hover-options {
|
|
266
|
+
position: absolute;
|
|
267
|
+
left: 0;
|
|
268
|
+
right: 0;
|
|
269
|
+
top: 100%;
|
|
270
|
+
background: white;
|
|
271
|
+
border: 1px solid #d9d9d9;
|
|
272
|
+
border-radius: 4px;
|
|
273
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
274
|
+
z-index: 1000;
|
|
275
|
+
margin-top: 4px;
|
|
276
|
+
width: 100%;
|
|
277
|
+
box-sizing: border-box;
|
|
278
|
+
pointer-events: auto;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.hover-options-content {
|
|
282
|
+
padding: 4px 0;
|
|
283
|
+
display: flex;
|
|
284
|
+
flex-direction: column;
|
|
285
|
+
width: 100%;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.option-item {
|
|
289
|
+
padding: 8px 12px;
|
|
290
|
+
cursor: pointer;
|
|
291
|
+
transition: all 0.3s ease;
|
|
292
|
+
color: #333;
|
|
293
|
+
font-size: 14px;
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.option-item:hover {
|
|
299
|
+
background-color: #f5f5f5;
|
|
300
|
+
color: #1890ff;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.option-item:active {
|
|
304
|
+
background-color: #e6f7ff;
|
|
305
|
+
}
|
|
173
306
|
</style>
|