vue2-client 1.16.22 → 1.16.23
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 +112 -112
- package/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue +478 -478
- package/src/base-client/components/common/HIS/HAddNativeForm/index.js +3 -3
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +365 -365
- package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +219 -219
- package/src/base-client/components/common/HIS/HTab/HTab.vue +293 -293
- package/src/base-client/components/common/HIS/demo.vue +54 -54
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +813 -813
- package/src/base-client/components/his/XCharge/XCharge.vue +610 -610
- package/src/base-client/components/his/XSidebar/XSidebar.vue +283 -283
- package/src/base-client/components/his/XSimpleTable/XSimpleTable.vue +119 -119
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +192 -153
- package/src/base-client/components/his/threeTestOrders/threeTestOrders.vue +482 -481
- package/src/router/async/router.map.js +129 -130
- package/src/services/api/common.js +0 -1
- package/src/assets/img/paymentMethod/icon1.png +0 -0
- package/src/assets/img/paymentMethod/icon2.png +0 -0
- package/src/assets/img/paymentMethod/icon3.png +0 -0
- package/src/assets/img/paymentMethod/icon4.png +0 -0
- package/src/assets/img/paymentMethod/icon5.png +0 -0
- package/src/assets/img/paymentMethod/icon6.png +0 -0
- package/src/base-client/components/his/XCharge/testConfig.js +0 -149
@@ -1,119 +1,119 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="table-container" :style="{ height: tableHeight }">
|
3
|
-
<a-table
|
4
|
-
:columns="processedColumns"
|
5
|
-
:dataSource="tableData"
|
6
|
-
:pagination="false"
|
7
|
-
:bordered="false"
|
8
|
-
:rowKey="rowKey"
|
9
|
-
:scroll="{ y: scrollY }"
|
10
|
-
/>
|
11
|
-
</div>
|
12
|
-
</template>
|
13
|
-
|
14
|
-
<script>
|
15
|
-
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
16
|
-
|
17
|
-
export default {
|
18
|
-
props: {
|
19
|
-
queryParamsName: String,
|
20
|
-
rowKey: {
|
21
|
-
type: String,
|
22
|
-
default: 'id'
|
23
|
-
},
|
24
|
-
parameter: {
|
25
|
-
type: Object,
|
26
|
-
default: () => ({})
|
27
|
-
}
|
28
|
-
},
|
29
|
-
data () {
|
30
|
-
return {
|
31
|
-
columns: [],
|
32
|
-
tableData: [],
|
33
|
-
tableHeight: 'auto', // 默认高度
|
34
|
-
scrollY: undefined
|
35
|
-
}
|
36
|
-
},
|
37
|
-
watch: {
|
38
|
-
queryParamsName: {
|
39
|
-
immediate: true,
|
40
|
-
handler (val) {
|
41
|
-
val && this.init(val, this.parameter)
|
42
|
-
}
|
43
|
-
}
|
44
|
-
},
|
45
|
-
computed: {
|
46
|
-
processedColumns () {
|
47
|
-
return this.columns.map(column => ({
|
48
|
-
...column,
|
49
|
-
customHeaderCell: column.headerStyle
|
50
|
-
? () => ({ style: column.headerStyle })
|
51
|
-
: undefined
|
52
|
-
}))
|
53
|
-
}
|
54
|
-
},
|
55
|
-
methods: {
|
56
|
-
init (config, parameterData) {
|
57
|
-
getConfigByName(config, 'af-his', res => {
|
58
|
-
// 从配置中获取表格高度
|
59
|
-
this.tableHeight = res.tableHeight || '400px' // 默认400px
|
60
|
-
this.columns = res.columns || []
|
61
|
-
|
62
|
-
runLogic(res.logicName, parameterData, 'af-his').then(result => {
|
63
|
-
this.tableData = result.map((item, index) => ({
|
64
|
-
...item,
|
65
|
-
key: item[this.rowKey] || `row_${index}`
|
66
|
-
}))
|
67
|
-
|
68
|
-
this.$nextTick(() => {
|
69
|
-
this.scrollY = this.tableHeight
|
70
|
-
})
|
71
|
-
})
|
72
|
-
})
|
73
|
-
}
|
74
|
-
}
|
75
|
-
}
|
76
|
-
</script>
|
77
|
-
|
78
|
-
<style scoped>
|
79
|
-
/* 表格容器 */
|
80
|
-
.table-container {
|
81
|
-
overflow: hidden;
|
82
|
-
display: flex;
|
83
|
-
flex-direction: column;
|
84
|
-
}
|
85
|
-
|
86
|
-
/* 基础无边框样式 */
|
87
|
-
/deep/ .ant-table {
|
88
|
-
border: none !important;
|
89
|
-
flex: 1;
|
90
|
-
display: flex;
|
91
|
-
flex-direction: column;
|
92
|
-
}
|
93
|
-
|
94
|
-
/deep/ .ant-table-content {
|
95
|
-
flex: 1;
|
96
|
-
display: flex;
|
97
|
-
flex-direction: column;
|
98
|
-
}
|
99
|
-
|
100
|
-
/deep/ .ant-table-body {
|
101
|
-
flex: 1;
|
102
|
-
overflow-y: auto !important;
|
103
|
-
}
|
104
|
-
|
105
|
-
/deep/ .ant-table-tbody > tr > td {
|
106
|
-
border-bottom: none !important;
|
107
|
-
padding: 6px !important;
|
108
|
-
}
|
109
|
-
|
110
|
-
/deep/ .ant-table-thead > tr > th {
|
111
|
-
border-bottom: none !important;
|
112
|
-
background: none !important;
|
113
|
-
padding: 8px 6px !important;
|
114
|
-
position: sticky;
|
115
|
-
top: 0;
|
116
|
-
z-index: 1;
|
117
|
-
background-color: white !important;
|
118
|
-
}
|
119
|
-
</style>
|
1
|
+
<template>
|
2
|
+
<div class="table-container" :style="{ height: tableHeight }">
|
3
|
+
<a-table
|
4
|
+
:columns="processedColumns"
|
5
|
+
:dataSource="tableData"
|
6
|
+
:pagination="false"
|
7
|
+
:bordered="false"
|
8
|
+
:rowKey="rowKey"
|
9
|
+
:scroll="{ y: scrollY }"
|
10
|
+
/>
|
11
|
+
</div>
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<script>
|
15
|
+
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
16
|
+
|
17
|
+
export default {
|
18
|
+
props: {
|
19
|
+
queryParamsName: String,
|
20
|
+
rowKey: {
|
21
|
+
type: String,
|
22
|
+
default: 'id'
|
23
|
+
},
|
24
|
+
parameter: {
|
25
|
+
type: Object,
|
26
|
+
default: () => ({})
|
27
|
+
}
|
28
|
+
},
|
29
|
+
data () {
|
30
|
+
return {
|
31
|
+
columns: [],
|
32
|
+
tableData: [],
|
33
|
+
tableHeight: 'auto', // 默认高度
|
34
|
+
scrollY: undefined
|
35
|
+
}
|
36
|
+
},
|
37
|
+
watch: {
|
38
|
+
queryParamsName: {
|
39
|
+
immediate: true,
|
40
|
+
handler (val) {
|
41
|
+
val && this.init(val, this.parameter)
|
42
|
+
}
|
43
|
+
}
|
44
|
+
},
|
45
|
+
computed: {
|
46
|
+
processedColumns () {
|
47
|
+
return this.columns.map(column => ({
|
48
|
+
...column,
|
49
|
+
customHeaderCell: column.headerStyle
|
50
|
+
? () => ({ style: column.headerStyle })
|
51
|
+
: undefined
|
52
|
+
}))
|
53
|
+
}
|
54
|
+
},
|
55
|
+
methods: {
|
56
|
+
init (config, parameterData) {
|
57
|
+
getConfigByName(config, 'af-his', res => {
|
58
|
+
// 从配置中获取表格高度
|
59
|
+
this.tableHeight = res.tableHeight || '400px' // 默认400px
|
60
|
+
this.columns = res.columns || []
|
61
|
+
|
62
|
+
runLogic(res.logicName, parameterData, 'af-his').then(result => {
|
63
|
+
this.tableData = result.map((item, index) => ({
|
64
|
+
...item,
|
65
|
+
key: item[this.rowKey] || `row_${index}`
|
66
|
+
}))
|
67
|
+
|
68
|
+
this.$nextTick(() => {
|
69
|
+
this.scrollY = this.tableHeight
|
70
|
+
})
|
71
|
+
})
|
72
|
+
})
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
</script>
|
77
|
+
|
78
|
+
<style scoped>
|
79
|
+
/* 表格容器 */
|
80
|
+
.table-container {
|
81
|
+
overflow: hidden;
|
82
|
+
display: flex;
|
83
|
+
flex-direction: column;
|
84
|
+
}
|
85
|
+
|
86
|
+
/* 基础无边框样式 */
|
87
|
+
/deep/ .ant-table {
|
88
|
+
border: none !important;
|
89
|
+
flex: 1;
|
90
|
+
display: flex;
|
91
|
+
flex-direction: column;
|
92
|
+
}
|
93
|
+
|
94
|
+
/deep/ .ant-table-content {
|
95
|
+
flex: 1;
|
96
|
+
display: flex;
|
97
|
+
flex-direction: column;
|
98
|
+
}
|
99
|
+
|
100
|
+
/deep/ .ant-table-body {
|
101
|
+
flex: 1;
|
102
|
+
overflow-y: auto !important;
|
103
|
+
}
|
104
|
+
|
105
|
+
/deep/ .ant-table-tbody > tr > td {
|
106
|
+
border-bottom: none !important;
|
107
|
+
padding: 6px !important;
|
108
|
+
}
|
109
|
+
|
110
|
+
/deep/ .ant-table-thead > tr > th {
|
111
|
+
border-bottom: none !important;
|
112
|
+
background: none !important;
|
113
|
+
padding: 8px 6px !important;
|
114
|
+
position: sticky;
|
115
|
+
top: 0;
|
116
|
+
z-index: 1;
|
117
|
+
background-color: white !important;
|
118
|
+
}
|
119
|
+
</style>
|
@@ -1,153 +1,192 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="x-time-select">
|
3
|
-
<div class="time-select-container">
|
4
|
-
<div v-if="type === 'range'" class="picker-wrapper">
|
5
|
-
<a-range-picker
|
6
|
-
:value="dateRange"
|
7
|
-
:placeholder="['开始日期', '结束日期']"
|
8
|
-
separator="至"
|
9
|
-
:disabled="disabled"
|
10
|
-
:allowClear="allowClear"
|
11
|
-
:format="format"
|
12
|
-
@change="handleDateChange"
|
13
|
-
/>
|
14
|
-
</div>
|
15
|
-
<div v-if="type === 'date'" class="picker-wrapper">
|
16
|
-
<a-date-picker
|
17
|
-
:value="dateRange"
|
18
|
-
:format="format"
|
19
|
-
:disabled="disabled"
|
20
|
-
:allowClear="allowClear"
|
21
|
-
@change="handleDateChange"
|
22
|
-
/>
|
23
|
-
</div>
|
24
|
-
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
</template>
|
28
|
-
|
29
|
-
<script>
|
30
|
-
import moment from 'moment'
|
31
|
-
import { getConfigByName } from '@vue2-client/services/api/common'
|
32
|
-
|
33
|
-
export default {
|
34
|
-
name: 'XTimeSelect',
|
35
|
-
inject: ['getComponentByName'],
|
36
|
-
props: {
|
37
|
-
queryParamsName: {
|
38
|
-
type: String,
|
39
|
-
default: null
|
40
|
-
},
|
41
|
-
value: {
|
42
|
-
type: Array,
|
43
|
-
default: () => []
|
44
|
-
},
|
45
|
-
|
46
|
-
type:
|
47
|
-
default:
|
48
|
-
},
|
49
|
-
|
50
|
-
type: Boolean,
|
51
|
-
default:
|
52
|
-
},
|
53
|
-
|
54
|
-
type:
|
55
|
-
default:
|
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
|
-
}
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
}
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
1
|
+
<template>
|
2
|
+
<div class="x-time-select">
|
3
|
+
<div class="time-select-container">
|
4
|
+
<div v-if="type === 'range'" class="picker-wrapper">
|
5
|
+
<a-range-picker
|
6
|
+
:value="dateRange"
|
7
|
+
:placeholder="['开始日期', '结束日期']"
|
8
|
+
separator="至"
|
9
|
+
:disabled="disabled"
|
10
|
+
:allowClear="allowClear"
|
11
|
+
:format="format"
|
12
|
+
@change="handleDateChange"
|
13
|
+
/>
|
14
|
+
</div>
|
15
|
+
<div v-if="type === 'date'" class="picker-wrapper">
|
16
|
+
<a-date-picker
|
17
|
+
:value="dateRange[0]"
|
18
|
+
:format="format"
|
19
|
+
:disabled="disabled"
|
20
|
+
:allowClear="allowClear"
|
21
|
+
@change="handleDateChange"
|
22
|
+
/>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
import moment from 'moment'
|
31
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
32
|
+
|
33
|
+
export default {
|
34
|
+
name: 'XTimeSelect',
|
35
|
+
inject: ['getComponentByName'],
|
36
|
+
props: {
|
37
|
+
queryParamsName: {
|
38
|
+
type: String,
|
39
|
+
default: null
|
40
|
+
},
|
41
|
+
value: {
|
42
|
+
type: Array,
|
43
|
+
default: () => []
|
44
|
+
},
|
45
|
+
defaultTime: {
|
46
|
+
type: Array,
|
47
|
+
default: () => []
|
48
|
+
},
|
49
|
+
disabled: {
|
50
|
+
type: Boolean,
|
51
|
+
default: false
|
52
|
+
},
|
53
|
+
allowClear: {
|
54
|
+
type: Boolean,
|
55
|
+
default: true
|
56
|
+
},
|
57
|
+
format: {
|
58
|
+
type: String,
|
59
|
+
default: 'YYYY/MM/DD'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
data () {
|
63
|
+
return {
|
64
|
+
dateRange: [],
|
65
|
+
type: 'range'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
watch: {
|
69
|
+
value: {
|
70
|
+
handler (newVal) {
|
71
|
+
this.convertValueToMoment(newVal)
|
72
|
+
},
|
73
|
+
immediate: true,
|
74
|
+
deep: true
|
75
|
+
},
|
76
|
+
defaultTime: {
|
77
|
+
handler (newVal) {
|
78
|
+
// 只有在没有传入value时才使用defaultTime
|
79
|
+
if (!this.value || this.value.length === 0) {
|
80
|
+
this.convertValueToMoment(newVal)
|
81
|
+
}
|
82
|
+
},
|
83
|
+
immediate: true,
|
84
|
+
deep: true
|
85
|
+
},
|
86
|
+
type () {
|
87
|
+
this.convertValueToMoment(this.value)
|
88
|
+
}
|
89
|
+
|
90
|
+
},
|
91
|
+
created () {
|
92
|
+
this.getData(this.queryParamsName)
|
93
|
+
},
|
94
|
+
methods: {
|
95
|
+
convertValueToMoment (value) {
|
96
|
+
// 如果没有传入value或value为空,则使用defaultTime
|
97
|
+
const timeToUse = (value && value.length > 0) ? value : this.defaultTime
|
98
|
+
if (this.type === 'range' && timeToUse?.length === 2) {
|
99
|
+
this.dateRange = [
|
100
|
+
timeToUse[0] ? moment(timeToUse[0]) : null,
|
101
|
+
timeToUse[1] ? moment(timeToUse[1]) : null
|
102
|
+
]
|
103
|
+
} else if (this.type === 'date' && timeToUse?.length === 1) {
|
104
|
+
this.dateRange = [timeToUse[0] ? moment(timeToUse[0]) : null]
|
105
|
+
} else {
|
106
|
+
this.dateRange = []
|
107
|
+
}
|
108
|
+
},
|
109
|
+
handleDateChange (dates, dateStrings) {
|
110
|
+
if (this.type === 'date') {
|
111
|
+
// 单个日期选择器,dates是一个moment对象或null
|
112
|
+
this.dateRange = [dates]
|
113
|
+
} else {
|
114
|
+
// 范围选择器,dates是一个数组
|
115
|
+
this.dateRange = dates
|
116
|
+
}
|
117
|
+
this.$emit('change', dateStrings)
|
118
|
+
},
|
119
|
+
async getData (data) {
|
120
|
+
if (data) {
|
121
|
+
getConfigByName(data, 'af-his', res => {
|
122
|
+
if (['date', 'range'].includes(res.type)) {
|
123
|
+
this.type = res.type
|
124
|
+
}
|
125
|
+
// 处理format配置
|
126
|
+
if (res.format !== undefined) {
|
127
|
+
this.format = res.format
|
128
|
+
}
|
129
|
+
// 处理defaultTime配置
|
130
|
+
if (res.defaultTime !== undefined) {
|
131
|
+
if (res.defaultTime === 'now') {
|
132
|
+
// 如果配置为'now',设置当前时间
|
133
|
+
const now = moment().format(this.format)
|
134
|
+
if (this.type === 'range') {
|
135
|
+
this.defaultTime = [now, now]
|
136
|
+
} else if (this.type === 'date') {
|
137
|
+
this.defaultTime = [now]
|
138
|
+
}
|
139
|
+
} else if (Array.isArray(res.defaultTime)) {
|
140
|
+
// 如果配置为数组,直接使用
|
141
|
+
this.defaultTime = res.defaultTime
|
142
|
+
}
|
143
|
+
}
|
144
|
+
this.convertValueToMoment(this.value)
|
145
|
+
})
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
</script>
|
151
|
+
|
152
|
+
<style scoped>
|
153
|
+
.x-time-select {
|
154
|
+
position: relative;
|
155
|
+
width: 100%;
|
156
|
+
box-sizing: border-box;
|
157
|
+
display: block;
|
158
|
+
}
|
159
|
+
|
160
|
+
.time-select-container {
|
161
|
+
display: flex;
|
162
|
+
align-items: center;
|
163
|
+
}
|
164
|
+
|
165
|
+
.picker-wrapper {
|
166
|
+
flex: 1;
|
167
|
+
}
|
168
|
+
|
169
|
+
.x-time-select :deep(.ant-picker-range),
|
170
|
+
.x-time-select :deep(.ant-picker) {
|
171
|
+
width: 100%;
|
172
|
+
height: 30px;
|
173
|
+
border-radius: 7px;
|
174
|
+
background: #FFFFFF;
|
175
|
+
border: 1px solid #E5E9F0;
|
176
|
+
}
|
177
|
+
.x-time-select :deep(.ant-calendar-picker) {
|
178
|
+
width: 100%;
|
179
|
+
display: block;
|
180
|
+
}
|
181
|
+
.x-time-select :deep(.ant-calendar-picker-input) {
|
182
|
+
width: 100%;
|
183
|
+
height: 30px;
|
184
|
+
border-radius: 7px;
|
185
|
+
background: #FFFFFF;
|
186
|
+
border: 1px solid #E5E9F0;
|
187
|
+
}
|
188
|
+
|
189
|
+
.x-time-select :deep(.ant-input) {
|
190
|
+
width: 100%;
|
191
|
+
}
|
192
|
+
</style>
|