vue2-client 1.12.90 → 1.12.93
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 +1 -1
- package/src/base-client/components/common/XCalendar/XCalendar.vue +21 -3
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +709 -708
- package/src/base-client/components/his/XList/XList.vue +52 -14
- package/src/base-client/components/his/XSidebar/XSidebar.vue +4 -4
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +99 -0
- package/src/router/async/router.map.js +2 -1
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="list-wrapper"
|
|
2
|
+
<div class="list-wrapper">
|
|
3
3
|
<a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
|
|
4
4
|
<a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
|
|
5
|
-
|
|
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>
|
|
6
15
|
</a-list-item>
|
|
7
16
|
</a-list>
|
|
8
17
|
</div>
|
|
@@ -10,20 +19,23 @@
|
|
|
10
19
|
|
|
11
20
|
<script>
|
|
12
21
|
|
|
13
|
-
import { runLogic } from '@vue2-client/services/api/common'
|
|
22
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
14
23
|
|
|
15
24
|
export default {
|
|
16
25
|
name: 'XList',
|
|
17
26
|
props: {
|
|
18
27
|
queryParamsName: {
|
|
19
28
|
type: Object,
|
|
20
|
-
default: '
|
|
21
|
-
}
|
|
29
|
+
default: 'outpatientWaitConfig'
|
|
30
|
+
}
|
|
22
31
|
},
|
|
23
32
|
inject: ['getComponentByName'],
|
|
24
33
|
data () {
|
|
25
34
|
return {
|
|
26
|
-
data: []
|
|
35
|
+
data: [],
|
|
36
|
+
button: false,
|
|
37
|
+
icon: false,
|
|
38
|
+
buttonName: ''
|
|
27
39
|
}
|
|
28
40
|
},
|
|
29
41
|
created () {
|
|
@@ -31,8 +43,13 @@ export default {
|
|
|
31
43
|
},
|
|
32
44
|
methods: {
|
|
33
45
|
async getData (config) {
|
|
34
|
-
|
|
35
|
-
this.
|
|
46
|
+
getConfigByName(config, 'af-his', res => {
|
|
47
|
+
this.button = res.button
|
|
48
|
+
this.icon = res.icon
|
|
49
|
+
this.buttonName = res.buttonName
|
|
50
|
+
runLogic(res.mainSource, {}, 'af-his').then(resData => {
|
|
51
|
+
this.data = resData
|
|
52
|
+
})
|
|
36
53
|
})
|
|
37
54
|
},
|
|
38
55
|
handleClick (index) {
|
|
@@ -41,7 +58,14 @@ export default {
|
|
|
41
58
|
refreshList () {
|
|
42
59
|
this.getData(this.queryParamsName)
|
|
43
60
|
},
|
|
44
|
-
|
|
61
|
+
click (index) {
|
|
62
|
+
this.$emit('click', this.data[index + 1])
|
|
63
|
+
},
|
|
64
|
+
getIconStyle (item) {
|
|
65
|
+
return item.picture
|
|
66
|
+
? { backgroundImage: `url(${item.picture})` }
|
|
67
|
+
: {}
|
|
68
|
+
}
|
|
45
69
|
}
|
|
46
70
|
}
|
|
47
71
|
</script>
|
|
@@ -50,7 +74,6 @@ export default {
|
|
|
50
74
|
.list-wrapper {
|
|
51
75
|
max-height: 240px;
|
|
52
76
|
overflow-y: auto;
|
|
53
|
-
cursor: pointer;
|
|
54
77
|
padding-right: 2px;
|
|
55
78
|
}
|
|
56
79
|
|
|
@@ -62,16 +85,31 @@ export default {
|
|
|
62
85
|
height: 35px;
|
|
63
86
|
border-radius: 6px;
|
|
64
87
|
background-color: #F4F4F4;
|
|
65
|
-
padding: 8px 15px
|
|
88
|
+
padding: 8px 15px;
|
|
66
89
|
font-size: 16px;
|
|
67
90
|
display: flex;
|
|
68
91
|
align-items: center;
|
|
69
92
|
width: 100%;
|
|
70
93
|
border: 1px solid #D9D9D9;
|
|
71
94
|
box-sizing: border-box;
|
|
72
|
-
margin-bottom:
|
|
73
|
-
|
|
74
|
-
|
|
95
|
+
margin-bottom: 8px !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.icon-menu {
|
|
99
|
+
display: inline-block;
|
|
100
|
+
width: 20px;
|
|
101
|
+
height: 20px;
|
|
102
|
+
background-color: #ccc;
|
|
103
|
+
margin-right: 8px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.item-text {
|
|
107
|
+
flex: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.confirm-btn {
|
|
111
|
+
margin-left: auto;
|
|
112
|
+
padding: 0 8px;
|
|
75
113
|
}
|
|
76
114
|
|
|
77
115
|
/* 自定义滚动条样式 */
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
return {
|
|
51
51
|
isOpen: false,
|
|
52
52
|
// 定义主内容区域的最大和最小宽度百分比
|
|
53
|
-
mainWithData: [{ max: 80, min:
|
|
53
|
+
mainWithData: [{ max: 80, min: 50 }]
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
mounted () {
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
return []
|
|
83
83
|
}
|
|
84
84
|
// 获取a-row中的所有a-col
|
|
85
|
-
const allCols = Array.from(row.querySelectorAll('.ant-col-
|
|
85
|
+
const allCols = Array.from(row.querySelectorAll('.ant-col-12'))
|
|
86
86
|
// 过滤掉当前a-col,返回其他所有a-col
|
|
87
87
|
return allCols.filter(col => col !== currentCol)
|
|
88
88
|
} catch (error) {
|
|
@@ -102,7 +102,7 @@ export default {
|
|
|
102
102
|
}
|
|
103
103
|
if (currentCol) {
|
|
104
104
|
// 更新当前列的宽度
|
|
105
|
-
const drawerWidth = isOpen ?
|
|
105
|
+
const drawerWidth = isOpen ? 33.3 : 2
|
|
106
106
|
// 强制更新样式
|
|
107
107
|
currentCol.style.cssText = `
|
|
108
108
|
flex: 0 0 ${drawerWidth}% !important;
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
190
190
|
.arrow {
|
|
191
191
|
font-size: 20px;
|
|
192
192
|
line-height: 1;
|
|
193
|
-
color:
|
|
193
|
+
color: #94979E;
|
|
194
194
|
}
|
|
195
195
|
.drawer-content {
|
|
196
196
|
height: 100%;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-time-select">
|
|
3
|
+
<a-range-picker
|
|
4
|
+
:value="dateRange"
|
|
5
|
+
:placeholder="['开始日期', '结束日期']"
|
|
6
|
+
separator="至"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
:allowClear="allowClear"
|
|
9
|
+
:format="format"
|
|
10
|
+
@change="handleDateChange"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import dayjs from 'dayjs'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'XTimeSelect',
|
|
20
|
+
props: {
|
|
21
|
+
value: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default: () => []
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
allowClear: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
format: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'YYYY/MM/DD'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
data () {
|
|
39
|
+
return {
|
|
40
|
+
dateRange: []
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
value: {
|
|
45
|
+
handler (newVal) {
|
|
46
|
+
if (newVal && newVal.length === 2) {
|
|
47
|
+
this.dateRange = [
|
|
48
|
+
newVal[0] ? dayjs(newVal[0]) : null,
|
|
49
|
+
newVal[1] ? dayjs(newVal[1]) : null
|
|
50
|
+
]
|
|
51
|
+
} else {
|
|
52
|
+
this.dateRange = []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
immediate: true,
|
|
56
|
+
deep: true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
handleDateChange (dates, dateStrings) {
|
|
61
|
+
this.dateRange = dates
|
|
62
|
+
console.warn(dateStrings)
|
|
63
|
+
this.$emit('change', dateStrings)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style scoped>
|
|
70
|
+
.x-time-select {
|
|
71
|
+
position: relative;
|
|
72
|
+
width: 100%;
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
display: block;
|
|
75
|
+
}
|
|
76
|
+
.x-time-select :deep(.ant-picker-range),
|
|
77
|
+
.x-time-select :deep(.ant-picker) {
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 30px;
|
|
80
|
+
border-radius: 7px;
|
|
81
|
+
background: #FFFFFF;
|
|
82
|
+
border: 1px solid #E5E9F0;
|
|
83
|
+
}
|
|
84
|
+
.x-time-select :deep(.ant-calendar-picker) {
|
|
85
|
+
width: 100%;
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
.x-time-select :deep(.ant-calendar-picker-input) {
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 30px;
|
|
91
|
+
border-radius: 7px;
|
|
92
|
+
background: #FFFFFF;
|
|
93
|
+
border: 1px solid #E5E9F0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.x-time-select :deep(.ant-input) {
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -52,9 +52,10 @@ routerResource.newDynamicStatistics = () => import('@vue2-client/pages/NewDynami
|
|
|
52
52
|
routerResource.example = {
|
|
53
53
|
path: 'example',
|
|
54
54
|
name: '示例主页面',
|
|
55
|
+
component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
|
|
55
56
|
// component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
|
56
57
|
// component: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
|
|
57
|
-
component: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
|
|
58
|
+
// component: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
|
|
58
59
|
// component: () => import('@vue2-client/base-client/components/common/XDataCard/XDataCard.vue'),
|
|
59
60
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
60
61
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|