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