vue2-client 1.16.80 → 1.16.81

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 (26) 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/HFormGroup/index.js +3 -3
  5. package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +379 -379
  6. package/src/base-client/components/common/HIS/HTab/HTab.vue +418 -413
  7. package/src/base-client/components/common/XCollapse/XCollapse.vue +833 -833
  8. package/src/base-client/components/common/XInput/XInput.vue +194 -170
  9. package/src/base-client/components/common/XTable/XTable.vue +1610 -1610
  10. package/src/base-client/components/common/XTimeline/XTimeline.vue +454 -454
  11. package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +1022 -944
  12. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  13. package/src/base-client/components/his/XList/XList.vue +829 -829
  14. package/src/base-client/components/his/XRadio/XRadio.vue +17 -1
  15. package/src/base-client/components/his/XSidebar/XSidebar.vue +15 -14
  16. package/src/base-client/components/his/XSimpleTable/XSimpleTable.vue +159 -159
  17. package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +72 -3
  18. package/src/base-client/components/his/XTitle/XTitle.vue +255 -233
  19. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
  20. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  21. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  22. package/src/router/async/router.map.js +1 -2
  23. package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
  24. package/.npmignore +0 -21
  25. package/.serena/.npmignore +0 -1
  26. package/yarn.lock +0 -11468
@@ -131,7 +131,7 @@ export default {
131
131
  const attrs = this.$attrs || {}
132
132
  const classes = {}
133
133
  const booleanStyleKeys = [
134
- 'item-0padding'
134
+ 'item-0padding', 'compact'
135
135
  ]
136
136
  booleanStyleKeys.forEach(key => {
137
137
  const val = attrs[key]
@@ -303,4 +303,20 @@ export default {
303
303
  }
304
304
  }
305
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(.ant-radio-wrapper-checked) > span:last-child {
317
+ padding-right: 2px;
318
+ padding-left: 2px;
319
+ }
320
+ }
321
+ }
306
322
  </style>
@@ -212,7 +212,7 @@ export default {
212
212
  return []
213
213
  }
214
214
  },
215
-
215
+ // 计算mainCol,currentCol可以设置的总宽度
216
216
  computeRemainingWidth (allElements, mainCol, currentCol) {
217
217
  if (!allElements || allElements.length === 0) {
218
218
  return '0px'
@@ -223,33 +223,34 @@ export default {
223
223
  element !== mainCol && element !== currentCol
224
224
  )
225
225
 
226
- if (filteredElements.length === 0) {
227
- return '0px'
228
- }
229
-
230
226
  let totalWidth = 0
231
227
 
228
+ // 计算过滤后元素的总宽度(包括外边距)
232
229
  filteredElements.forEach(element => {
233
230
  if (element && element.style) {
234
- // 获取元素的计算样式
235
231
  const computedStyle = window.getComputedStyle(element)
236
-
237
- // 获取宽度(包括padding和border)
238
232
  const width = parseFloat(computedStyle.width) || 0
239
-
240
- // 获取左右margin
241
233
  const marginLeft = parseFloat(computedStyle.marginLeft) || 0
242
234
  const marginRight = parseFloat(computedStyle.marginRight) || 0
243
-
244
- // 累加总宽度(宽度 + 左右margin)
245
235
  totalWidth += width + marginLeft + marginRight
246
236
  }
247
237
  })
248
238
 
249
- // 返回计算出的宽度,如果计算失败则返回默认值
239
+ // 添加 mainCol 和 currentCol 的左右外边距
240
+ const addMarginsFromElements = (element) => {
241
+ if (element && element.style) {
242
+ const computedStyle = window.getComputedStyle(element)
243
+ const marginLeft = parseFloat(computedStyle.marginLeft) || 0
244
+ const marginRight = parseFloat(computedStyle.marginRight) || 0
245
+ totalWidth += marginLeft + marginRight
246
+ }
247
+ }
248
+
249
+ addMarginsFromElements(mainCol)
250
+ addMarginsFromElements(currentCol)
251
+
250
252
  return totalWidth > 0 ? `${totalWidth}px` : '0px'
251
253
  },
252
-
253
254
  updateLayout (isOpen) {
254
255
  this.$nextTick(() => {
255
256
  try {
@@ -1,159 +1,159 @@
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
- padding-left: 13px; /* 整体左边距 */
85
- }
86
-
87
- /* 基础无边框样式 */
88
- /deep/ .ant-table {
89
- border: none !important;
90
- flex: 1;
91
- display: flex;
92
- flex-direction: column;
93
- }
94
-
95
- /deep/ .ant-table-content {
96
- flex: 1;
97
- display: flex;
98
- flex-direction: column;
99
- }
100
-
101
- /deep/ .ant-table-body {
102
- flex: 1;
103
- overflow-y: auto !important;
104
- padding-top: 5px; /* 表头与第一行的间距 */
105
- }
106
-
107
- /* 自定义滚动条样式 */
108
- /deep/ .ant-table-body {
109
- /* Firefox */
110
- scrollbar-width: thin; /* auto | thin | none */
111
- scrollbar-color: #E5E5E5 transparent; /* thumb track */
112
- }
113
- /deep/ .ant-table-body::-webkit-scrollbar {
114
- width: 8px;
115
- height: 8px;
116
- }
117
- /deep/ .ant-table-body::-webkit-scrollbar-track {
118
- background: transparent;
119
- }
120
- /deep/ .ant-table-body::-webkit-scrollbar-thumb {
121
- background: #E5E5E5;
122
- border-radius: 25px;
123
- }
124
-
125
- /deep/ .ant-table-tbody > tr > td {
126
- border-bottom: none !important;
127
- padding: 6px !important;
128
- /* 表体字体样式 */
129
- font-family: 'Source Han Sans', sans-serif;
130
- font-size: 14px;
131
- font-weight: 400; /* normal */
132
- line-height: 18px;
133
- letter-spacing: 0em;
134
- font-optical-sizing: auto; /* 替代 font-variation-settings:"opsz" auto */
135
- font-feature-settings: 'kern' on;
136
- color: #5D5C5C;
137
- }
138
-
139
- /deep/ .ant-table-thead > tr > th {
140
- border-bottom: none !important;
141
- background: none !important;
142
- padding: 8px 6px !important;
143
- position: sticky;
144
- top: 0;
145
- z-index: 1;
146
- background-color: white !important;
147
- /* 头部字体样式 */
148
- height: 20px;
149
- opacity: 1;
150
- font-family: 'Source Han Sans', sans-serif;
151
- font-size: 14px;
152
- font-weight: 700; /* bold */
153
- line-height: normal;
154
- letter-spacing: 0em;
155
- font-optical-sizing: auto; /* 替代 font-variation-settings:"opsz" auto 以通过校验 */
156
- font-feature-settings: 'kern' on;
157
- color: #5D5C5C;
158
- }
159
- </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
+ padding-left: 13px; /* 整体左边距 */
85
+ }
86
+
87
+ /* 基础无边框样式 */
88
+ /deep/ .ant-table {
89
+ border: none !important;
90
+ flex: 1;
91
+ display: flex;
92
+ flex-direction: column;
93
+ }
94
+
95
+ /deep/ .ant-table-content {
96
+ flex: 1;
97
+ display: flex;
98
+ flex-direction: column;
99
+ }
100
+
101
+ /deep/ .ant-table-body {
102
+ flex: 1;
103
+ overflow-y: auto !important;
104
+ padding-top: 5px; /* 表头与第一行的间距 */
105
+ }
106
+
107
+ /* 自定义滚动条样式 */
108
+ /deep/ .ant-table-body {
109
+ /* Firefox */
110
+ scrollbar-width: thin; /* auto | thin | none */
111
+ scrollbar-color: #E5E5E5 transparent; /* thumb track */
112
+ }
113
+ /deep/ .ant-table-body::-webkit-scrollbar {
114
+ width: 8px;
115
+ height: 8px;
116
+ }
117
+ /deep/ .ant-table-body::-webkit-scrollbar-track {
118
+ background: transparent;
119
+ }
120
+ /deep/ .ant-table-body::-webkit-scrollbar-thumb {
121
+ background: #E5E5E5;
122
+ border-radius: 25px;
123
+ }
124
+
125
+ /deep/ .ant-table-tbody > tr > td {
126
+ border-bottom: none !important;
127
+ padding: 6px !important;
128
+ /* 表体字体样式 */
129
+ font-family: 'Source Han Sans', sans-serif;
130
+ font-size: 14px;
131
+ font-weight: 400; /* normal */
132
+ line-height: 18px;
133
+ letter-spacing: 0em;
134
+ font-optical-sizing: auto; /* 替代 font-variation-settings:"opsz" auto */
135
+ font-feature-settings: 'kern' on;
136
+ color: #5D5C5C;
137
+ }
138
+
139
+ /deep/ .ant-table-thead > tr > th {
140
+ border-bottom: none !important;
141
+ background: none !important;
142
+ padding: 8px 6px !important;
143
+ position: sticky;
144
+ top: 0;
145
+ z-index: 1;
146
+ background-color: white !important;
147
+ /* 头部字体样式 */
148
+ height: 20px;
149
+ opacity: 1;
150
+ font-family: 'Source Han Sans', sans-serif;
151
+ font-size: 14px;
152
+ font-weight: 700; /* bold */
153
+ line-height: normal;
154
+ letter-spacing: 0em;
155
+ font-optical-sizing: auto; /* 替代 font-variation-settings:"opsz" auto 以通过校验 */
156
+ font-feature-settings: 'kern' on;
157
+ color: #5D5C5C;
158
+ }
159
+ </style>
@@ -1,7 +1,8 @@
1
1
  <template>
2
- <div class="x-time-select">
2
+ <div class="x-time-select" :class="wrapperClassObject">
3
3
  <div class="time-select-container">
4
4
  <div v-if="type === 'range'" class="picker-wrapper">
5
+ <span v-if="showCalendarIcon" class="left-calendar-icon"><a-icon type="calendar" /></span>
5
6
  <a-range-picker
6
7
  :value="dateRange"
7
8
  :placeholder="['开始日期', '结束日期']"
@@ -14,6 +15,7 @@
14
15
  />
15
16
  </div>
16
17
  <div v-if="type === 'date'" class="picker-wrapper">
18
+ <span v-if="showCalendarIcon" class="left-calendar-icon"><a-icon type="calendar" /></span>
17
19
  <a-date-picker
18
20
  :value="dateRange[0]"
19
21
  :format="format"
@@ -64,10 +66,27 @@ export default {
64
66
  data () {
65
67
  return {
66
68
  dateRange: [],
67
- type: 'range'
69
+ type: 'range',
70
+ showCalendarIcon: false
68
71
  }
69
72
  },
70
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
+ },
71
90
  showTime () {
72
91
  // 根据format判断是否需要显示时间选择器
73
92
  return this.format && (this.format.includes('HH:mm') || this.format.includes('hh:mm'))
@@ -134,6 +153,8 @@ export default {
134
153
  if (res.format !== undefined) {
135
154
  this.format = res.format
136
155
  }
156
+ // 处理图标开关配置(默认关闭)
157
+ this.showCalendarIcon = res && res.showCalendarIcon === true
137
158
  // 处理defaultTime配置
138
159
  if (res.defaultTime !== undefined) {
139
160
  if (res.defaultTime === 'now') {
@@ -157,7 +178,7 @@ export default {
157
178
  }
158
179
  </script>
159
180
 
160
- <style scoped>
181
+ <style scoped lang="less">
161
182
  .x-time-select {
162
183
  position: relative;
163
184
  width: 100%;
@@ -172,6 +193,7 @@ export default {
172
193
 
173
194
  .picker-wrapper {
174
195
  flex: 1;
196
+ position: relative;
175
197
  }
176
198
 
177
199
  .x-time-select :deep(.ant-picker-range),
@@ -197,4 +219,51 @@ export default {
197
219
  .x-time-select :deep(.ant-input) {
198
220
  width: 100%;
199
221
  }
222
+
223
+ /* 左侧日历图标 */
224
+ .left-calendar-icon {
225
+ position: absolute;
226
+ left: 10px;
227
+ top: 1.8px;
228
+ width: 18.2px;
229
+ height: 91%;
230
+ opacity: 1;
231
+ color: #848484;
232
+ z-index: 2;
233
+ pointer-events: none;
234
+ display: inline-flex;
235
+ align-items: center;
236
+ }
237
+
238
+ /* 为日期输入增加左内边距,避免与图标重叠(兼容 ant 不同版本) */
239
+ .x-time-select :deep(.ant-picker-input > input) {
240
+ padding-left: 26px;
241
+ }
242
+ .x-time-select :deep(.ant-calendar-picker-input) {
243
+ padding-left: 26px;
244
+ }
245
+
246
+ /* yizhu-date 样式(通过 $attrs 使用:<XTimeSelect yizhu-date />) */
247
+ .x-time-select.xtime-yizhu-date {
248
+ margin: 2px 2px 0 10px;
249
+ width: 224px;
250
+ height: 32px;
251
+ border-radius: 7px;
252
+ opacity: 1;
253
+ background: #FFFFFF;
254
+ box-sizing: border-box;
255
+ border: 1px solid #E5E9F0;
256
+ }
257
+
258
+ /* 覆盖内部 antd 选择器在该样式下的尺寸与边框 */
259
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker-range),
260
+ .x-time-select.xtime-yizhu-date :deep(.ant-picker),
261
+ .x-time-select.xtime-yizhu-date :deep(.ant-calendar-picker),
262
+ .x-time-select.xtime-yizhu-date :deep(.ant-calendar-picker-input) {
263
+ width: 224px;
264
+ height: 32px;
265
+ border-radius: 7px;
266
+ background: #FFFFFF;
267
+ border: 1px solid #E5E9F0;
268
+ }
200
269
  </style>