vue2-client 1.16.99 → 1.17.0
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/.env.message +19 -19
- package/package.json +1 -1
- package/src/assets/svg/female.svg +1 -1
- package/src/assets/svg/male.svg +1 -1
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +491 -491
- package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
- package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +2 -1
- package/src/base-client/components/common/HIS/HTab/HTab.vue +443 -443
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +1288 -1288
- package/src/base-client/components/common/XCollapse/XCollapse.vue +833 -833
- package/src/base-client/components/common/XForm/XFormItem.vue +1530 -1530
- package/src/base-client/components/common/XFormTable/demo.vue +89 -89
- package/src/base-client/components/common/XTimeline/XTimeline.vue +477 -477
- package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
- package/src/base-client/components/his/XList/XList.vue +938 -938
- package/src/base-client/components/his/XRadio/XRadio.vue +553 -469
- package/src/base-client/components/his/XSimpleTable/XSimpleTable.vue +159 -159
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +354 -354
- package/src/base-client/components/his/XTitle/XTitle.vue +314 -312
- package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
- package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
- package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
- package/src-base-client/components/common/HIS/HForm/HForm.vue +347 -0
- package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
|
@@ -1,469 +1,553 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="x-radio-container" :class="wrapperClassObject()">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
:
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
display: flex;
|
|
398
|
-
justify-content: space-between;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
:deep(.
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-radio-container" :class="wrapperClassObject()">
|
|
3
|
+
<!-- 按钮模式 -->
|
|
4
|
+
<a-radio-group
|
|
5
|
+
v-if="config.buttonMode"
|
|
6
|
+
v-model="innerValue"
|
|
7
|
+
@change="onChange"
|
|
8
|
+
:class="['x-radio-group', 'x-radio-group-button', { 'x-radio-group-left': config.alignLeft }]"
|
|
9
|
+
button-style="solid">
|
|
10
|
+
<a-radio-button
|
|
11
|
+
v-for="item in data"
|
|
12
|
+
:key="item.value"
|
|
13
|
+
:value="item.value"
|
|
14
|
+
class="x-radio-button-item"
|
|
15
|
+
>
|
|
16
|
+
{{ item.label }}
|
|
17
|
+
</a-radio-button>
|
|
18
|
+
</a-radio-group>
|
|
19
|
+
|
|
20
|
+
<!-- 普通模式 -->
|
|
21
|
+
<a-radio-group
|
|
22
|
+
v-else
|
|
23
|
+
v-model="innerValue"
|
|
24
|
+
@change="onChange"
|
|
25
|
+
:class="['x-radio-group', { 'x-radio-group-left': config.alignLeft }]">
|
|
26
|
+
<div
|
|
27
|
+
v-for="item in data"
|
|
28
|
+
:key="item.value"
|
|
29
|
+
class="x-radio-item-container"
|
|
30
|
+
:class="{
|
|
31
|
+
'x-radio-item-bordered': config.showBorder,
|
|
32
|
+
'x-radio-item-highlight': config.highlightBorder
|
|
33
|
+
}"
|
|
34
|
+
:style="getHighlightBorderStyle(item)">
|
|
35
|
+
<div class="x-radio-item-wrapper">
|
|
36
|
+
<div
|
|
37
|
+
v-if="config.showIndicator && item.bottomLine !== false"
|
|
38
|
+
class="x-radio-indicator-left"
|
|
39
|
+
:style="{
|
|
40
|
+
width: item.indicatorWidth || '4px',
|
|
41
|
+
backgroundColor: item.indicatorColor || config.indicatorActiveColor,
|
|
42
|
+
height: item.indicatorHeight || '16px'
|
|
43
|
+
}"
|
|
44
|
+
></div>
|
|
45
|
+
<a-radio
|
|
46
|
+
:value="item.value"
|
|
47
|
+
class="x-radio-item"
|
|
48
|
+
:class="{ 'x-radio-item-no-dot': config.highlightBorder }"
|
|
49
|
+
>
|
|
50
|
+
{{ item.label }}
|
|
51
|
+
</a-radio>
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
v-if="config.showIndicator && item.bottomLine !== false && !config.showBorder && !config.highlightBorder"
|
|
55
|
+
class="x-radio-indicator-bottom"
|
|
56
|
+
:style="{
|
|
57
|
+
width: item.indicatorWidth || '100%',
|
|
58
|
+
backgroundColor: item.indicatorColor || config.indicatorActiveColor,
|
|
59
|
+
height: config.indicatorHeight + 'px'
|
|
60
|
+
}"
|
|
61
|
+
></div>
|
|
62
|
+
</div>
|
|
63
|
+
</a-radio-group>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
69
|
+
|
|
70
|
+
export default {
|
|
71
|
+
name: 'XRadio',
|
|
72
|
+
inject: ['getComponentByName'],
|
|
73
|
+
props: {
|
|
74
|
+
queryParamsName: {
|
|
75
|
+
type: Object,
|
|
76
|
+
default: null
|
|
77
|
+
},
|
|
78
|
+
// eslint-disable-next-line vue/require-default-prop
|
|
79
|
+
value: [String, Number]
|
|
80
|
+
},
|
|
81
|
+
data () {
|
|
82
|
+
return {
|
|
83
|
+
data: [],
|
|
84
|
+
innerValue: null,
|
|
85
|
+
config: {
|
|
86
|
+
showIndicator: true,
|
|
87
|
+
indicatorHeight: 3,
|
|
88
|
+
indicatorActiveColor: '#1890ff',
|
|
89
|
+
alignLeft: false,
|
|
90
|
+
showBorder: false,
|
|
91
|
+
highlightBorder: false,
|
|
92
|
+
buttonMode: false
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
created () {
|
|
97
|
+
this.getData(this.queryParamsName)
|
|
98
|
+
},
|
|
99
|
+
watch: {
|
|
100
|
+
value (val) {
|
|
101
|
+
this.innerValue = val
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
emits: ['change', 'init'],
|
|
105
|
+
methods: {
|
|
106
|
+
async getData (data) {
|
|
107
|
+
getConfigByName(data, 'af-his', res => {
|
|
108
|
+
// 1. 先加载选项
|
|
109
|
+
if (res.radio && Array.isArray(res.radio)) {
|
|
110
|
+
this.data = res.radio
|
|
111
|
+
// 2. 加载指示器配置
|
|
112
|
+
if (res.indicator !== undefined) {
|
|
113
|
+
// 如果indicator是布尔值,则只控制显示/隐藏
|
|
114
|
+
if (typeof res.indicator === 'boolean') {
|
|
115
|
+
this.config.showIndicator = res.indicator
|
|
116
|
+
} else if (typeof res.indicator === 'object') {
|
|
117
|
+
this.config = {
|
|
118
|
+
...this.config,
|
|
119
|
+
...res.indicator
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// 3. 加载布局配置
|
|
124
|
+
if (res.layout !== undefined) {
|
|
125
|
+
if (typeof res.layout === 'object') {
|
|
126
|
+
this.config = {
|
|
127
|
+
...this.config,
|
|
128
|
+
...res.layout
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// 4. 加载按钮模式配置
|
|
133
|
+
if (res.buttonMode !== undefined) {
|
|
134
|
+
this.config.buttonMode = res.buttonMode
|
|
135
|
+
}
|
|
136
|
+
// 5. 初始化默认值(优先级: 配置defaultValue > 第一个选项)
|
|
137
|
+
if (this.value !== undefined && this.value !== null) {
|
|
138
|
+
this.innerValue = this.value // 优先使用外部传入的 value
|
|
139
|
+
} else if (res.defaultValue !== undefined && res.defaultValue !== null) {
|
|
140
|
+
// 使用配置中的defaultValue
|
|
141
|
+
this.innerValue = res.defaultValue
|
|
142
|
+
} else if (this.data.length > 0) {
|
|
143
|
+
// 如果没有默认值但有选项,使用第一个选项
|
|
144
|
+
this.innerValue = this.data[0].value
|
|
145
|
+
}
|
|
146
|
+
// 6. 触发初始化事件
|
|
147
|
+
this.$emit('init', this.innerValue)
|
|
148
|
+
} else {
|
|
149
|
+
this.$message.error('配置错误,radio字段不是数组')
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
onChange (e) {
|
|
154
|
+
this.innerValue = e.target.value
|
|
155
|
+
this.$emit('change', e.target.value)
|
|
156
|
+
},
|
|
157
|
+
wrapperClassObject () {
|
|
158
|
+
const attrs = this.$attrs || {}
|
|
159
|
+
const classes = {}
|
|
160
|
+
const booleanStyleKeys = [
|
|
161
|
+
'item-0padding', 'compact', 'out-radio', 'distributed'
|
|
162
|
+
]
|
|
163
|
+
booleanStyleKeys.forEach(key => {
|
|
164
|
+
const val = attrs[key]
|
|
165
|
+
const truthy = val === true || val === '' || val === 'true'
|
|
166
|
+
if (truthy) classes[`x-radio-${key}`] = true
|
|
167
|
+
})
|
|
168
|
+
return classes
|
|
169
|
+
},
|
|
170
|
+
getHighlightBorderStyle (item) {
|
|
171
|
+
if (!this.config.highlightBorder) return {}
|
|
172
|
+
|
|
173
|
+
// 如果当前选项被选中且有边框颜色配置,使用配置的颜色
|
|
174
|
+
if (this.innerValue === item.value && item.borderColor) {
|
|
175
|
+
return {
|
|
176
|
+
borderColor: item.borderColor
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// 如果当前选项被选中且有indicatorColor配置,使用indicatorColor作为边框颜色
|
|
181
|
+
if (this.innerValue === item.value && item.indicatorColor) {
|
|
182
|
+
return {
|
|
183
|
+
borderColor: item.indicatorColor
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 默认返回空对象,使用CSS中的默认灰色边框
|
|
188
|
+
return {}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<style scoped lang="less">
|
|
195
|
+
.x-radio-container {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.x-radio-group {
|
|
201
|
+
display: flex;
|
|
202
|
+
justify-content: space-around;
|
|
203
|
+
|
|
204
|
+
&.x-radio-group-left {
|
|
205
|
+
justify-content: flex-start;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&.x-radio-group-button {
|
|
209
|
+
display: flex;
|
|
210
|
+
justify-content: flex-end; // 居右对齐
|
|
211
|
+
gap: 0; // 移除间距,让按钮紧密相连
|
|
212
|
+
&.x-radio-group-left {
|
|
213
|
+
justify-content: flex-start;
|
|
214
|
+
}
|
|
215
|
+
:deep(.ant-radio-button-wrapper) {
|
|
216
|
+
border-radius: 0; // 先移除所有圆角
|
|
217
|
+
border: 1px solid #d9d9d9;
|
|
218
|
+
background: #fff;
|
|
219
|
+
color: #000;
|
|
220
|
+
transition: all 0.3s;
|
|
221
|
+
min-width: 80px;
|
|
222
|
+
text-align: center;
|
|
223
|
+
margin: 0; // 确保没有外边距
|
|
224
|
+
|
|
225
|
+
&:hover {
|
|
226
|
+
border-color: #40a9ff;
|
|
227
|
+
color: #40a9ff;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.ant-radio-button-wrapper-checked {
|
|
231
|
+
background-color: #0057FE;
|
|
232
|
+
border-color: #0057FE;
|
|
233
|
+
color: #fff;
|
|
234
|
+
|
|
235
|
+
&:hover {
|
|
236
|
+
background-color: #0057FE;
|
|
237
|
+
border-color: #0057FE;
|
|
238
|
+
color: #fff;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// 第一个按钮只保留左侧圆角
|
|
242
|
+
&:first-child {
|
|
243
|
+
border-top-left-radius: 6px;
|
|
244
|
+
border-bottom-left-radius: 6px;
|
|
245
|
+
border-right: none; // 移除右边框,与下一个按钮连接
|
|
246
|
+
}
|
|
247
|
+
// 最后一个按钮只保留右侧圆角
|
|
248
|
+
&:last-child {
|
|
249
|
+
border-top-right-radius: 6px;
|
|
250
|
+
border-bottom-right-radius: 6px;
|
|
251
|
+
}
|
|
252
|
+
// 中间按钮(如果有)移除所有圆角和右边框
|
|
253
|
+
&:not(:first-child):not(:last-child) {
|
|
254
|
+
border-radius: 0;
|
|
255
|
+
border-right: none;
|
|
256
|
+
}
|
|
257
|
+
// 除了最后一个按钮,其他按钮都移除右边框
|
|
258
|
+
&:not(:last-child) {
|
|
259
|
+
border-right: none;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.x-radio-item-container {
|
|
266
|
+
flex: 1;
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
align-items: center;
|
|
270
|
+
text-align: center;
|
|
271
|
+
padding: 0 8px;
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
|
|
274
|
+
.x-radio-group-left & {
|
|
275
|
+
flex: none;
|
|
276
|
+
align-items: flex-start;
|
|
277
|
+
text-align: left;
|
|
278
|
+
margin-right: 16px;
|
|
279
|
+
padding: 0 4px;
|
|
280
|
+
|
|
281
|
+
&:last-child {
|
|
282
|
+
margin-right: 0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&.x-radio-item-bordered {
|
|
287
|
+
border: 1px solid #d9d9d9;
|
|
288
|
+
border-radius: 173px;
|
|
289
|
+
padding: 8px 12px;
|
|
290
|
+
margin-right: 8px;
|
|
291
|
+
background-color: #fff;
|
|
292
|
+
transition: all 0.3s;
|
|
293
|
+
|
|
294
|
+
&:hover {
|
|
295
|
+
border-color: #40a9ff;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
&:last-child {
|
|
299
|
+
margin-right: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.x-radio-group-left & {
|
|
303
|
+
margin-right: 8px;
|
|
304
|
+
|
|
305
|
+
&:last-child {
|
|
306
|
+
margin-right: 0;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&.x-radio-item-highlight {
|
|
312
|
+
border: 2px solid #d9d9d9;
|
|
313
|
+
border-radius: 173px;
|
|
314
|
+
padding: 8px 12px;
|
|
315
|
+
margin-right: 8px;
|
|
316
|
+
background-color: #fff;
|
|
317
|
+
transition: all 0.3s;
|
|
318
|
+
position: relative;
|
|
319
|
+
|
|
320
|
+
&:last-child {
|
|
321
|
+
margin-right: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.x-radio-group-left & {
|
|
325
|
+
margin-right: 8px;
|
|
326
|
+
|
|
327
|
+
&:last-child {
|
|
328
|
+
margin-right: 0;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// 动态边框颜色通过内联样式设置
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.x-radio-item-wrapper {
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
width: 100%;
|
|
340
|
+
|
|
341
|
+
.x-radio-group-left & {
|
|
342
|
+
justify-content: flex-start;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.x-radio-item {
|
|
347
|
+
margin-bottom: 8px;
|
|
348
|
+
|
|
349
|
+
.x-radio-item-bordered & {
|
|
350
|
+
margin-bottom: 0;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
&.x-radio-item-no-dot {
|
|
354
|
+
:deep(.ant-radio) {
|
|
355
|
+
display: none;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:deep(.ant-radio-wrapper) {
|
|
359
|
+
padding-left: 0;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.x-radio-indicator-left {
|
|
365
|
+
width: 4px;
|
|
366
|
+
height: 16px;
|
|
367
|
+
margin-right: 8px;
|
|
368
|
+
border-radius: 6px;
|
|
369
|
+
transition: all 0.3s;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.x-radio-indicator-bottom {
|
|
373
|
+
height: 3px;
|
|
374
|
+
transition: all 0.3s;
|
|
375
|
+
max-width: 100%;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.x-radio-description {
|
|
379
|
+
padding: 4px 4px 4px 4px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.x-radio-item-0padding {
|
|
383
|
+
&.x-radio-container,
|
|
384
|
+
.x-radio-container {
|
|
385
|
+
:deep(.x-radio-item-container) {
|
|
386
|
+
padding: 0px;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
.x-radio-compact {
|
|
391
|
+
&.x-radio-container,
|
|
392
|
+
.x-radio-container {
|
|
393
|
+
:deep(.simple-inline-item){
|
|
394
|
+
padding: 0px !important;
|
|
395
|
+
}
|
|
396
|
+
:deep(.ant-radio-group){
|
|
397
|
+
display: flex;
|
|
398
|
+
justify-content: space-between;
|
|
399
|
+
}
|
|
400
|
+
:deep(.x-radio-item) > span:last-child {
|
|
401
|
+
padding-right: 2px;
|
|
402
|
+
padding-left: 2px;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/* 门诊收费样式:字体规格与间距 42px */
|
|
407
|
+
.x-radio-out-radio {
|
|
408
|
+
&.x-radio-container,
|
|
409
|
+
.x-radio-container {
|
|
410
|
+
:deep(.x-radio-group) {
|
|
411
|
+
justify-content: flex-start !important; /* 覆盖默认的 space-around */
|
|
412
|
+
}
|
|
413
|
+
:deep(.ant-radio-wrapper) {
|
|
414
|
+
/* 仅归零内外边距,避免额外空隙 */
|
|
415
|
+
padding: 0;
|
|
416
|
+
margin: 0;
|
|
417
|
+
}
|
|
418
|
+
/* 确保文字本身也应用同样的字体样式(提高优先级并可视化高度) */
|
|
419
|
+
:deep(.ant-radio-wrapper > span:last-child) {
|
|
420
|
+
display: inline-block;
|
|
421
|
+
height: 23px !important;
|
|
422
|
+
line-height: 23px !important;
|
|
423
|
+
font-family: "Source Han Sans" !important;
|
|
424
|
+
font-size: 16px !important;
|
|
425
|
+
font-weight: normal !important;
|
|
426
|
+
letter-spacing: 0em !important;
|
|
427
|
+
color: #313131 !important;
|
|
428
|
+
}
|
|
429
|
+
/* 单选框与文字之间保持 5px 间距 */
|
|
430
|
+
:deep(.ant-radio) { margin-right: 0; }
|
|
431
|
+
:deep(.ant-radio + span) { padding: 0; margin-left: 5px; }
|
|
432
|
+
/* 单选框外圈视觉 16x16,边框 #CDCFD4,背景白色 */
|
|
433
|
+
:deep(.ant-radio-inner) {
|
|
434
|
+
width: 16px;
|
|
435
|
+
height: 16px;
|
|
436
|
+
background: #FFFFFF;
|
|
437
|
+
box-sizing: border-box;
|
|
438
|
+
border: 1px solid #CDCFD4;
|
|
439
|
+
}
|
|
440
|
+
/* 选中时内部实心点 10x10,背景 #0057FE */
|
|
441
|
+
:deep(.ant-radio-checked .ant-radio-inner::after) {
|
|
442
|
+
width: 10px;
|
|
443
|
+
height: 10px;
|
|
444
|
+
background: #0057FE;
|
|
445
|
+
margin: 0;
|
|
446
|
+
left: 50%;
|
|
447
|
+
top: 50%;
|
|
448
|
+
transform: translate(-50%, -50%) scale(1);
|
|
449
|
+
}
|
|
450
|
+
/* 保持外圈边框颜色不被默认覆盖 */
|
|
451
|
+
:deep(.ant-radio-checked .ant-radio-inner) {
|
|
452
|
+
border-color: #CDCFD4;
|
|
453
|
+
background: #FFFFFF;
|
|
454
|
+
}
|
|
455
|
+
:deep(.x-radio-item-container) {
|
|
456
|
+
margin-right: 42px; /* 直接设置42px间距,让第二个单选框与第一个文字距离为42px */
|
|
457
|
+
padding: 0 !important;
|
|
458
|
+
flex: none !important; /* 覆盖默认的 flex: 1 */
|
|
459
|
+
align-items: flex-start !important; /* 覆盖默认的 center */
|
|
460
|
+
text-align: left !important; /* 覆盖默认的 center */
|
|
461
|
+
}
|
|
462
|
+
:deep(.x-radio-item-wrapper) {
|
|
463
|
+
width: auto !important; /* 覆盖默认的 width: 100% */
|
|
464
|
+
}
|
|
465
|
+
:deep(.x-radio-item-container:first-child) {
|
|
466
|
+
margin-left: 4px;
|
|
467
|
+
}
|
|
468
|
+
:deep(.x-radio-item-container:last-child) {
|
|
469
|
+
margin-right: 0;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* 分布布局样式 */
|
|
475
|
+
.x-radio-distributed {
|
|
476
|
+
&.x-radio-container,
|
|
477
|
+
.x-radio-container {
|
|
478
|
+
width: 100%;
|
|
479
|
+
:deep(.x-radio-group) {
|
|
480
|
+
width: 100%;
|
|
481
|
+
display: flex;
|
|
482
|
+
justify-content: space-between;
|
|
483
|
+
flex-wrap: nowrap;
|
|
484
|
+
gap: 0;
|
|
485
|
+
overflow: hidden;
|
|
486
|
+
}
|
|
487
|
+
:deep(.x-radio-item-container) {
|
|
488
|
+
flex: 0 0 auto;
|
|
489
|
+
display: flex;
|
|
490
|
+
justify-content: center;
|
|
491
|
+
align-items: center;
|
|
492
|
+
padding: 0 2px;
|
|
493
|
+
min-width: 0;
|
|
494
|
+
}
|
|
495
|
+
:deep(.x-radio-item-wrapper) {
|
|
496
|
+
display: flex;
|
|
497
|
+
align-items: center;
|
|
498
|
+
justify-content: flex-start;
|
|
499
|
+
}
|
|
500
|
+
:deep(.ant-radio-wrapper) {
|
|
501
|
+
padding: 0;
|
|
502
|
+
margin: 0;
|
|
503
|
+
display: flex;
|
|
504
|
+
align-items: center;
|
|
505
|
+
}
|
|
506
|
+
:deep(.ant-radio) {
|
|
507
|
+
margin-right: 0;
|
|
508
|
+
}
|
|
509
|
+
:deep(.ant-radio + span) {
|
|
510
|
+
margin-left: 3px;
|
|
511
|
+
padding: 0;
|
|
512
|
+
}
|
|
513
|
+
:deep(.ant-radio-inner) {
|
|
514
|
+
width: 16px;
|
|
515
|
+
height: 16px;
|
|
516
|
+
opacity: 1;
|
|
517
|
+
background: #FFFFFF;
|
|
518
|
+
box-sizing: border-box;
|
|
519
|
+
border: 1px solid #CDCFD4;
|
|
520
|
+
transition: none !important;
|
|
521
|
+
}
|
|
522
|
+
:deep(.ant-radio-checked .ant-radio-inner::after) {
|
|
523
|
+
width: 10px;
|
|
524
|
+
height: 10px;
|
|
525
|
+
opacity: 1;
|
|
526
|
+
background: #0057FE;
|
|
527
|
+
margin: 0;
|
|
528
|
+
left: 50%;
|
|
529
|
+
top: 50%;
|
|
530
|
+
transform: translate(-50%, -50%) scale(1);
|
|
531
|
+
transition: none !important;
|
|
532
|
+
animation: none !important;
|
|
533
|
+
}
|
|
534
|
+
:deep(.ant-radio-checked .ant-radio-inner) {
|
|
535
|
+
border-color: #CDCFD4;
|
|
536
|
+
background: #FFFFFF;
|
|
537
|
+
transition: none !important;
|
|
538
|
+
}
|
|
539
|
+
:deep(.ant-radio-wrapper > span:last-child) {
|
|
540
|
+
height: 23px;
|
|
541
|
+
opacity: 1;
|
|
542
|
+
font-family: "Source Han Sans";
|
|
543
|
+
font-size: 16px;
|
|
544
|
+
font-weight: normal;
|
|
545
|
+
line-height: normal;
|
|
546
|
+
letter-spacing: 0em;
|
|
547
|
+
color: #5D5C5C;
|
|
548
|
+
white-space: nowrap;
|
|
549
|
+
}
|
|
550
|
+
/* 改为内容自适应宽度,父容器使用 space-between 保证等距 */
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
</style>
|