vue2-client 1.12.92 → 1.12.94
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/package.json +109 -109
- package/src/base-client/components/common/XCollapse/XCollapse.vue +247 -247
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +709 -708
- package/src/base-client/components/his/XList/XList.vue +126 -128
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +2 -5
|
@@ -1,128 +1,126 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="list-wrapper">
|
|
3
|
-
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
|
-
<a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
|
|
5
|
-
<i
|
|
6
|
-
v-if="icon"
|
|
7
|
-
class="icon-menu"
|
|
8
|
-
:style="getIconStyle(item)"
|
|
9
|
-
></i>
|
|
10
|
-
<span
|
|
11
|
-
class="item-text">
|
|
12
|
-
{{ item.number }} {{ item.name }}
|
|
13
|
-
</span>
|
|
14
|
-
<a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
|
|
15
|
-
</a-list-item>
|
|
16
|
-
</a-list>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
name: 'XList',
|
|
26
|
-
props: {
|
|
27
|
-
queryParamsName: {
|
|
28
|
-
type: Object,
|
|
29
|
-
default:
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
inject: ['getComponentByName'],
|
|
33
|
-
data () {
|
|
34
|
-
return {
|
|
35
|
-
data: [],
|
|
36
|
-
button: false,
|
|
37
|
-
icon: false,
|
|
38
|
-
buttonName: ''
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
created () {
|
|
42
|
-
this.getData(this.queryParamsName)
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
async getData (config) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="list-wrapper">
|
|
3
|
+
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
|
+
<a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
|
|
5
|
+
<i
|
|
6
|
+
v-if="icon"
|
|
7
|
+
class="icon-menu"
|
|
8
|
+
:style="getIconStyle(item)"
|
|
9
|
+
></i>
|
|
10
|
+
<span
|
|
11
|
+
class="item-text">
|
|
12
|
+
{{ item.number }} {{ item.name }}
|
|
13
|
+
</span>
|
|
14
|
+
<a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
|
|
15
|
+
</a-list-item>
|
|
16
|
+
</a-list>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
|
|
22
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
name: 'XList',
|
|
26
|
+
props: {
|
|
27
|
+
queryParamsName: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: null
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
inject: ['getComponentByName'],
|
|
33
|
+
data () {
|
|
34
|
+
return {
|
|
35
|
+
data: [],
|
|
36
|
+
button: false,
|
|
37
|
+
icon: false,
|
|
38
|
+
buttonName: ''
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
created () {
|
|
42
|
+
this.getData(this.queryParamsName)
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
async getData (config) {
|
|
46
|
+
runLogic(config, {}, 'af-his').then(res => {
|
|
47
|
+
this.button = res.button
|
|
48
|
+
this.icon = res.icon
|
|
49
|
+
this.buttonName = res.buttonName
|
|
50
|
+
this.data = res.data
|
|
51
|
+
})
|
|
52
|
+
},
|
|
53
|
+
handleClick (index) {
|
|
54
|
+
this.$emit('listClick', this.data[index])
|
|
55
|
+
},
|
|
56
|
+
refreshList () {
|
|
57
|
+
this.getData(this.queryParamsName)
|
|
58
|
+
},
|
|
59
|
+
click (index) {
|
|
60
|
+
this.$emit('click', this.data[index + 1])
|
|
61
|
+
},
|
|
62
|
+
getIconStyle (item) {
|
|
63
|
+
return item.picture
|
|
64
|
+
? { backgroundImage: `url(${item.picture})` }
|
|
65
|
+
: {}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style scoped>
|
|
72
|
+
.list-wrapper {
|
|
73
|
+
max-height: 240px;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
padding-right: 2px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.list-container {
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.list-item {
|
|
83
|
+
height: 35px;
|
|
84
|
+
border-radius: 6px;
|
|
85
|
+
background-color: #F4F4F4;
|
|
86
|
+
padding: 8px 15px;
|
|
87
|
+
font-size: 16px;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
width: 100%;
|
|
91
|
+
border: 1px solid #D9D9D9;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
margin-bottom: 8px !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.icon-menu {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
width: 20px;
|
|
99
|
+
height: 20px;
|
|
100
|
+
background-color: #ccc;
|
|
101
|
+
margin-right: 8px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.item-text {
|
|
105
|
+
flex: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.confirm-btn {
|
|
109
|
+
margin-left: auto;
|
|
110
|
+
padding: 0 8px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 自定义滚动条样式 */
|
|
114
|
+
.list-wrapper::-webkit-scrollbar {
|
|
115
|
+
width: 6px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.list-wrapper::-webkit-scrollbar-thumb {
|
|
119
|
+
background-color: #d9d9d9;
|
|
120
|
+
border-radius: 3px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.list-wrapper::-webkit-scrollbar-track {
|
|
124
|
+
background-color: #f0f0f0;
|
|
125
|
+
}
|
|
126
|
+
</style>
|
|
@@ -59,11 +59,8 @@ export default {
|
|
|
59
59
|
methods: {
|
|
60
60
|
handleDateChange (dates, dateStrings) {
|
|
61
61
|
this.dateRange = dates
|
|
62
|
-
|
|
63
|
-
this.$emit('change',
|
|
64
|
-
dates,
|
|
65
|
-
dateStrings
|
|
66
|
-
})
|
|
62
|
+
console.warn(dateStrings)
|
|
63
|
+
this.$emit('change', dateStrings)
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
66
|
}
|