vue2-client 1.16.84 → 1.16.85

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.
Files changed (25) hide show
  1. package/package.json +112 -112
  2. package/src/assets/svg/female.svg +1 -1
  3. package/src/assets/svg/male.svg +1 -1
  4. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +381 -381
  5. package/src/base-client/components/common/HIS/HForm/HForm.vue +492 -348
  6. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  7. package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +10 -1
  8. package/src/base-client/components/common/HIS/HTab/HTab.vue +26 -1
  9. package/src/base-client/components/common/XCollapse/XCollapse.vue +833 -833
  10. package/src/base-client/components/common/XInput/XInput.vue +194 -194
  11. package/src/base-client/components/common/XTable/XTable.vue +1610 -1610
  12. package/src/base-client/components/common/XTimeline/XTimeline.vue +478 -462
  13. package/src/base-client/components/common/XTree/XTreePro.vue +4 -4
  14. package/src/base-client/components/his/XCheckbox/XCheckbox.vue +181 -181
  15. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  16. package/src/base-client/components/his/XList/XList.vue +829 -829
  17. package/src/base-client/components/his/XRadio/XRadio.vue +389 -389
  18. package/src/base-client/components/his/XSimpleTable/XSimpleTable.vue +159 -159
  19. package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +306 -306
  20. package/src/base-client/components/his/XTitle/XTitle.vue +274 -269
  21. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
  22. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  23. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  24. package/src-base-client/components/common/HIS/HForm/HForm.vue +0 -348
  25. package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
@@ -1,306 +1,306 @@
1
- <template>
2
- <div class="x-time-select" :class="wrapperClassObject">
3
- <div class="time-select-container">
4
- <div v-if="type === 'range'" class="picker-wrapper">
5
- <span v-if="showCalendarIcon" class="left-calendar-icon"><a-icon type="calendar" /></span>
6
- <a-range-picker
7
- :value="dateRange"
8
- :placeholder="['开始日期', '结束日期']"
9
- :separator="rangeSeparator"
10
- :disabled="disabled"
11
- :allowClear="allowClear"
12
- :format="format"
13
- :showTime="showTime"
14
- @change="handleDateChange"
15
- />
16
- </div>
17
- <div v-if="type === 'date'" class="picker-wrapper">
18
- <span v-if="showCalendarIcon" class="left-calendar-icon"><a-icon type="calendar" /></span>
19
- <a-date-picker
20
- :value="dateRange[0]"
21
- :format="format"
22
- :disabled="disabled"
23
- :allowClear="allowClear"
24
- :showTime="showTime"
25
- @change="handleDateChange"
26
- />
27
- </div>
28
-
29
- </div>
30
- </div>
31
- </template>
32
-
33
- <script>
34
- import moment from 'moment'
35
- import { getConfigByName } from '@vue2-client/services/api/common'
36
-
37
- export default {
38
- name: 'XTimeSelect',
39
- inject: ['getComponentByName'],
40
- props: {
41
- queryParamsName: {
42
- type: String,
43
- default: null
44
- },
45
- value: {
46
- type: Array,
47
- default: () => []
48
- },
49
- defaultTime: {
50
- type: Array,
51
- default: () => []
52
- },
53
- disabled: {
54
- type: Boolean,
55
- default: false
56
- },
57
- allowClear: {
58
- type: Boolean,
59
- default: true
60
- },
61
- format: {
62
- type: String,
63
- default: 'YYYY-MM-DD'
64
- }
65
- },
66
- data () {
67
- return {
68
- dateRange: [],
69
- type: 'range',
70
- showCalendarIcon: false
71
- }
72
- },
73
- computed: {
74
- // 与 XHDescriptions 一致的样式配置模式:通过 $attrs 映射布尔/尺寸类
75
- wrapperClassObject () {
76
- const attrs = this.$attrs || {}
77
- const classes = {}
78
- const booleanStyleKeys = [
79
- 'yizhu-date'
80
- ]
81
- booleanStyleKeys.forEach(key => {
82
- const val = attrs[key]
83
- const truthy = val === true || val === '' || val === 'true'
84
- if (truthy) classes[`xtime-${key}`] = true
85
- })
86
- const size = attrs.size
87
- if (size && typeof size === 'string') classes[`xtime-size-${size}`] = true
88
- return classes
89
- },
90
- showTime () {
91
- // 根据format判断是否需要显示时间选择器
92
- return this.format && (this.format.includes('HH:mm') || this.format.includes('hh:mm'))
93
- },
94
- rangeSeparator () {
95
- return this.type === 'range' ? '-' : '至'
96
- }
97
- },
98
- watch: {
99
- value: {
100
- handler (newVal) {
101
- this.convertValueToMoment(newVal)
102
- },
103
- immediate: true,
104
- deep: true
105
- },
106
- defaultTime: {
107
- handler (newVal) {
108
- // 只有在没有传入value时才使用defaultTime
109
- if (!this.value || this.value.length === 0) {
110
- this.convertValueToMoment(newVal)
111
- }
112
- },
113
- immediate: true,
114
- deep: true
115
- },
116
- type () {
117
- this.convertValueToMoment(this.value)
118
- }
119
-
120
- },
121
- created () {
122
- this.getData(this.queryParamsName)
123
- },
124
- methods: {
125
- convertValueToMoment (value) {
126
- // 如果没有传入value或value为空,则使用defaultTime
127
- const timeToUse = (value && value.length > 0) ? value : this.defaultTime
128
- if (this.type === 'range' && timeToUse?.length === 2) {
129
- this.dateRange = [
130
- timeToUse[0] ? moment(timeToUse[0]) : null,
131
- timeToUse[1] ? moment(timeToUse[1]) : null
132
- ]
133
- } else if (this.type === 'date' && timeToUse?.length === 1) {
134
- this.dateRange = [timeToUse[0] ? moment(timeToUse[0]) : null]
135
- } else {
136
- this.dateRange = []
137
- }
138
- },
139
- handleDateChange (dates, dateStrings) {
140
- if (this.type === 'date') {
141
- // 单个日期选择器,dates是一个moment对象或null
142
- this.dateRange = [dates]
143
- } else {
144
- // 范围选择器,dates是一个数组
145
- this.dateRange = dates
146
- }
147
- this.$emit('change', dateStrings)
148
- },
149
- async getData (data) {
150
- if (data) {
151
- getConfigByName(data, 'af-his', res => {
152
- if (['date', 'range'].includes(res.type)) {
153
- this.type = res.type
154
- }
155
- // 处理format配置
156
- if (res.format !== undefined) {
157
- this.format = res.format
158
- }
159
- // 处理图标开关配置(默认关闭)
160
- this.showCalendarIcon = res && res.showCalendarIcon === true
161
- // 处理defaultTime配置
162
- if (res.defaultTime !== undefined) {
163
- if (res.defaultTime === 'now') {
164
- // 如果配置为'now',设置当前时间
165
- const now = moment().format(this.format)
166
- if (this.type === 'range') {
167
- this.defaultTime = [now, now]
168
- } else if (this.type === 'date') {
169
- this.defaultTime = [now]
170
- }
171
- } else if (Array.isArray(res.defaultTime)) {
172
- // 如果配置为数组,直接使用
173
- this.defaultTime = res.defaultTime
174
- }
175
- }
176
- this.convertValueToMoment(this.value)
177
- })
178
- }
179
- }
180
- }
181
- }
182
- </script>
183
-
184
- <style scoped lang="less">
185
- .x-time-select {
186
- position: relative;
187
- width: 100%;
188
- box-sizing: border-box;
189
- display: block;
190
- }
191
-
192
- .time-select-container {
193
- display: flex;
194
- align-items: center;
195
- }
196
-
197
- .picker-wrapper {
198
- flex: 1;
199
- position: relative;
200
- }
201
-
202
- .x-time-select :deep(.ant-picker-range),
203
- .x-time-select :deep(.ant-picker) {
204
- width: 100%;
205
- height: 32px;
206
- border-radius: 7px;
207
- background: #FFFFFF;
208
- border: 1px solid #E5E9F0;
209
- box-sizing: border-box;
210
- opacity: 1;
211
- }
212
- .x-time-select :deep(.ant-calendar-picker) {
213
- width: 100%;
214
- display: block;
215
- }
216
- .x-time-select :deep(.ant-calendar-picker-input) {
217
- width: 100%;
218
- height: 32px;
219
- border-radius: 7px;
220
- background: #FFFFFF;
221
- border: 1px solid #E5E9F0;
222
- box-sizing: border-box;
223
- opacity: 1;
224
- }
225
-
226
- .x-time-select :deep(.ant-input) {
227
- width: 100%;
228
- }
229
-
230
- /* 左侧日历图标 */
231
- .left-calendar-icon {
232
- position: absolute;
233
- left: 10px;
234
- top: 1.8px;
235
- width: 18.2px;
236
- height: 91%;
237
- opacity: 1;
238
- color: #848484;
239
- z-index: 2;
240
- pointer-events: none;
241
- display: inline-flex;
242
- align-items: center;
243
- }
244
-
245
- /* 为日期输入增加左内边距,避免与图标重叠(兼容 ant 不同版本) */
246
- .x-time-select :deep(.ant-picker-input > input) {
247
- padding-left: 19px;
248
- padding-right: 19px;
249
- font-family: 'Source Han Sans';
250
- font-weight: normal;
251
- line-height: normal;
252
- text-align: center;
253
- color: #313131;
254
- }
255
- .x-time-select :deep(.ant-calendar-picker-input) {
256
- padding-left: 19px;
257
- padding-right: 19px;
258
- font-family: 'Source Han Sans';
259
- font-size: 16px;
260
- font-weight: normal;
261
- line-height: normal;
262
- text-align: center;
263
- color: #313131;
264
- }
265
-
266
- .x-time-select.xtime-yizhu-date {
267
- margin: 5px 11px auto 24px;
268
- width: 234px;
269
- height: 32px;
270
- border-radius: 7px;
271
- opacity: 1;
272
- background: #FFFFFF;
273
- box-sizing: border-box;
274
- border: 1px solid #E5E9F0;
275
- }
276
-
277
- /* 覆盖内部 antd 选择器在该样式下的尺寸与边框 */
278
- .x-time-select.xtime-yizhu-date :deep(.ant-picker-range),
279
- .x-time-select.xtime-yizhu-date :deep(.ant-picker),
280
- .x-time-select.xtime-yizhu-date :deep(.ant-calendar-picker),
281
- .x-time-select.xtime-yizhu-date :deep(.ant-calendar-picker-input) {
282
- width: 234px;
283
- height: 32px;
284
- border-radius: 7px;
285
- background: #FFFFFF;
286
- border: 1px solid #E5E9F0;
287
- }
288
-
289
- /* 范围选择时,避免分隔符遮挡文字:左输入靠右、右输入靠左,并在分隔符侧增加内边距 */
290
- .x-time-select.xtime-yizhu-date :deep(.ant-picker-range .ant-picker-input:first-child input) {
291
- text-align: right;
292
- padding-right: 28px;
293
- }
294
- .x-time-select.xtime-yizhu-date :deep(.ant-picker-range .ant-picker-input:last-child input) {
295
- text-align: left;
296
- padding-left: 28px;
297
- }
298
-
299
- /* 分隔符与清除按钮占位优化,减少遮挡概率 */
300
- .x-time-select.xtime-yizhu-date :deep(.ant-picker-range .ant-picker-separator) {
301
- margin: 0 4px;
302
- }
303
- .x-time-select.xtime-yizhu-date :deep(.ant-picker-clear) {
304
- right: 6px;
305
- }
306
- </style>
1
+ <template>
2
+ <div class="x-time-select" :class="wrapperClassObject">
3
+ <div class="time-select-container">
4
+ <div v-if="type === 'range'" class="picker-wrapper">
5
+ <span v-if="showCalendarIcon" class="left-calendar-icon"><a-icon type="calendar" /></span>
6
+ <a-range-picker
7
+ :value="dateRange"
8
+ :placeholder="['开始日期', '结束日期']"
9
+ :separator="rangeSeparator"
10
+ :disabled="disabled"
11
+ :allowClear="allowClear"
12
+ :format="format"
13
+ :showTime="showTime"
14
+ @change="handleDateChange"
15
+ />
16
+ </div>
17
+ <div v-if="type === 'date'" class="picker-wrapper">
18
+ <span v-if="showCalendarIcon" class="left-calendar-icon"><a-icon type="calendar" /></span>
19
+ <a-date-picker
20
+ :value="dateRange[0]"
21
+ :format="format"
22
+ :disabled="disabled"
23
+ :allowClear="allowClear"
24
+ :showTime="showTime"
25
+ @change="handleDateChange"
26
+ />
27
+ </div>
28
+
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import moment from 'moment'
35
+ import { getConfigByName } from '@vue2-client/services/api/common'
36
+
37
+ export default {
38
+ name: 'XTimeSelect',
39
+ inject: ['getComponentByName'],
40
+ props: {
41
+ queryParamsName: {
42
+ type: String,
43
+ default: null
44
+ },
45
+ value: {
46
+ type: Array,
47
+ default: () => []
48
+ },
49
+ defaultTime: {
50
+ type: Array,
51
+ default: () => []
52
+ },
53
+ disabled: {
54
+ type: Boolean,
55
+ default: false
56
+ },
57
+ allowClear: {
58
+ type: Boolean,
59
+ default: true
60
+ },
61
+ format: {
62
+ type: String,
63
+ default: 'YYYY-MM-DD'
64
+ }
65
+ },
66
+ data () {
67
+ return {
68
+ dateRange: [],
69
+ type: 'range',
70
+ showCalendarIcon: false
71
+ }
72
+ },
73
+ computed: {
74
+ // 与 XHDescriptions 一致的样式配置模式:通过 $attrs 映射布尔/尺寸类
75
+ wrapperClassObject () {
76
+ const attrs = this.$attrs || {}
77
+ const classes = {}
78
+ const booleanStyleKeys = [
79
+ 'yizhu-date'
80
+ ]
81
+ booleanStyleKeys.forEach(key => {
82
+ const val = attrs[key]
83
+ const truthy = val === true || val === '' || val === 'true'
84
+ if (truthy) classes[`xtime-${key}`] = true
85
+ })
86
+ const size = attrs.size
87
+ if (size && typeof size === 'string') classes[`xtime-size-${size}`] = true
88
+ return classes
89
+ },
90
+ showTime () {
91
+ // 根据format判断是否需要显示时间选择器
92
+ return this.format && (this.format.includes('HH:mm') || this.format.includes('hh:mm'))
93
+ },
94
+ rangeSeparator () {
95
+ return this.type === 'range' ? '-' : '至'
96
+ }
97
+ },
98
+ watch: {
99
+ value: {
100
+ handler (newVal) {
101
+ this.convertValueToMoment(newVal)
102
+ },
103
+ immediate: true,
104
+ deep: true
105
+ },
106
+ defaultTime: {
107
+ handler (newVal) {
108
+ // 只有在没有传入value时才使用defaultTime
109
+ if (!this.value || this.value.length === 0) {
110
+ this.convertValueToMoment(newVal)
111
+ }
112
+ },
113
+ immediate: true,
114
+ deep: true
115
+ },
116
+ type () {
117
+ this.convertValueToMoment(this.value)
118
+ }
119
+
120
+ },
121
+ created () {
122
+ this.getData(this.queryParamsName)
123
+ },
124
+ methods: {
125
+ convertValueToMoment (value) {
126
+ // 如果没有传入value或value为空,则使用defaultTime
127
+ const timeToUse = (value && value.length > 0) ? value : this.defaultTime
128
+ if (this.type === 'range' && timeToUse?.length === 2) {
129
+ this.dateRange = [
130
+ timeToUse[0] ? moment(timeToUse[0]) : null,
131
+ timeToUse[1] ? moment(timeToUse[1]) : null
132
+ ]
133
+ } else if (this.type === 'date' && timeToUse?.length === 1) {
134
+ this.dateRange = [timeToUse[0] ? moment(timeToUse[0]) : null]
135
+ } else {
136
+ this.dateRange = []
137
+ }
138
+ },
139
+ handleDateChange (dates, dateStrings) {
140
+ if (this.type === 'date') {
141
+ // 单个日期选择器,dates是一个moment对象或null
142
+ this.dateRange = [dates]
143
+ } else {
144
+ // 范围选择器,dates是一个数组
145
+ this.dateRange = dates
146
+ }
147
+ this.$emit('change', dateStrings)
148
+ },
149
+ async getData (data) {
150
+ if (data) {
151
+ getConfigByName(data, 'af-his', res => {
152
+ if (['date', 'range'].includes(res.type)) {
153
+ this.type = res.type
154
+ }
155
+ // 处理format配置
156
+ if (res.format !== undefined) {
157
+ this.format = res.format
158
+ }
159
+ // 处理图标开关配置(默认关闭)
160
+ this.showCalendarIcon = res && res.showCalendarIcon === true
161
+ // 处理defaultTime配置
162
+ if (res.defaultTime !== undefined) {
163
+ if (res.defaultTime === 'now') {
164
+ // 如果配置为'now',设置当前时间
165
+ const now = moment().format(this.format)
166
+ if (this.type === 'range') {
167
+ this.defaultTime = [now, now]
168
+ } else if (this.type === 'date') {
169
+ this.defaultTime = [now]
170
+ }
171
+ } else if (Array.isArray(res.defaultTime)) {
172
+ // 如果配置为数组,直接使用
173
+ this.defaultTime = res.defaultTime
174
+ }
175
+ }
176
+ this.convertValueToMoment(this.value)
177
+ })
178
+ }
179
+ }
180
+ }
181
+ }
182
+ </script>
183
+
184
+ <style scoped lang="less">
185
+ .x-time-select {
186
+ position: relative;
187
+ width: 100%;
188
+ box-sizing: border-box;
189
+ display: block;
190
+ }
191
+
192
+ .time-select-container {
193
+ display: flex;
194
+ align-items: center;
195
+ }
196
+
197
+ .picker-wrapper {
198
+ flex: 1;
199
+ position: relative;
200
+ }
201
+
202
+ .x-time-select :deep(.ant-picker-range),
203
+ .x-time-select :deep(.ant-picker) {
204
+ width: 100%;
205
+ height: 32px;
206
+ border-radius: 7px;
207
+ background: #FFFFFF;
208
+ border: 1px solid #E5E9F0;
209
+ box-sizing: border-box;
210
+ opacity: 1;
211
+ }
212
+ .x-time-select :deep(.ant-calendar-picker) {
213
+ width: 100%;
214
+ display: block;
215
+ }
216
+ .x-time-select :deep(.ant-calendar-picker-input) {
217
+ width: 100%;
218
+ height: 32px;
219
+ border-radius: 7px;
220
+ background: #FFFFFF;
221
+ border: 1px solid #E5E9F0;
222
+ box-sizing: border-box;
223
+ opacity: 1;
224
+ }
225
+
226
+ .x-time-select :deep(.ant-input) {
227
+ width: 100%;
228
+ }
229
+
230
+ /* 左侧日历图标 */
231
+ .left-calendar-icon {
232
+ position: absolute;
233
+ left: 10px;
234
+ top: 1.8px;
235
+ width: 18.2px;
236
+ height: 91%;
237
+ opacity: 1;
238
+ color: #848484;
239
+ z-index: 2;
240
+ pointer-events: none;
241
+ display: inline-flex;
242
+ align-items: center;
243
+ }
244
+
245
+ /* 为日期输入增加左内边距,避免与图标重叠(兼容 ant 不同版本) */
246
+ .x-time-select :deep(.ant-picker-input > input) {
247
+ padding-left: 19px;
248
+ padding-right: 19px;
249
+ font-family: 'Source Han Sans';
250
+ font-weight: normal;
251
+ line-height: normal;
252
+ text-align: center;
253
+ color: #313131;
254
+ }
255
+ .x-time-select :deep(.ant-calendar-picker-input) {
256
+ padding-left: 19px;
257
+ padding-right: 19px;
258
+ font-family: 'Source Han Sans';
259
+ font-size: 16px;
260
+ font-weight: normal;
261
+ line-height: normal;
262
+ text-align: center;
263
+ color: #313131;
264
+ }
265
+
266
+ .x-time-select.xtime-yizhu-date {
267
+ margin: 5px 11px auto 24px;
268
+ width: 234px;
269
+ height: 32px;
270
+ border-radius: 7px;
271
+ opacity: 1;
272
+ background: #FFFFFF;
273
+ box-sizing: border-box;
274
+ border: 1px solid #E5E9F0;
275
+ }
276
+
277
+ /* 覆盖内部 antd 选择器在该样式下的尺寸与边框 */
278
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker-range),
279
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker),
280
+ .x-time-select.xtime-yizhu-date :deep(.ant-calendar-picker),
281
+ .x-time-select.xtime-yizhu-date :deep(.ant-calendar-picker-input) {
282
+ width: 234px;
283
+ height: 32px;
284
+ border-radius: 7px;
285
+ background: #FFFFFF;
286
+ border: 1px solid #E5E9F0;
287
+ }
288
+
289
+ /* 范围选择时,避免分隔符遮挡文字:左输入靠右、右输入靠左,并在分隔符侧增加内边距 */
290
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker-range .ant-picker-input:first-child input) {
291
+ text-align: right;
292
+ padding-right: 28px;
293
+ }
294
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker-range .ant-picker-input:last-child input) {
295
+ text-align: left;
296
+ padding-left: 28px;
297
+ }
298
+
299
+ /* 分隔符与清除按钮占位优化,减少遮挡概率 */
300
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker-range .ant-picker-separator) {
301
+ margin: 0 4px;
302
+ }
303
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker-clear) {
304
+ right: 6px;
305
+ }
306
+ </style>