vue2-client 1.19.1 → 1.19.3
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 +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/HForm/HForm.vue +1 -2
- package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
- package/src/base-client/components/common/XCollapse/XCollapse.vue +830 -830
- package/src/base-client/components/common/XDatePicker/index.vue +78 -0
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +6 -3
- package/src/base-client/components/common/XTimeline/XTimeline.vue +477 -477
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +1412 -1412
- package/src/base-client/components/his/XIcon/XIcon.vue +28 -0
- package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +354 -354
- package/src/base-client/components/his/XWorkflowProgress/XWorkflowProgress.vue +536 -0
- 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 +0 -347
- package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
|
@@ -199,6 +199,80 @@ export default {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
return {}
|
|
202
|
+
},
|
|
203
|
+
// 日期范围限制函数
|
|
204
|
+
disabledDate () {
|
|
205
|
+
// 查询模式下不进行范围限制
|
|
206
|
+
if (this.mode === '查询') {
|
|
207
|
+
return undefined
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const dateRangeOption = this.attr.dateRangeOption
|
|
211
|
+
if (!dateRangeOption || !dateRangeOption.type) {
|
|
212
|
+
return undefined
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const { type, beforeDays, afterDays } = dateRangeOption
|
|
216
|
+
const today = moment().startOf('day')
|
|
217
|
+
|
|
218
|
+
return (current) => {
|
|
219
|
+
// 根据组件类型处理不同的时间粒度
|
|
220
|
+
let currentDate, comparisonDate
|
|
221
|
+
|
|
222
|
+
if (['monthPicker', 'monthRangePicker'].includes(this.attr.type)) {
|
|
223
|
+
// 月份选择器:比较月份
|
|
224
|
+
currentDate = moment(current).startOf('month')
|
|
225
|
+
comparisonDate = moment(today).startOf('month')
|
|
226
|
+
} else if (['yearPicker', 'yearRangePicker'].includes(this.attr.type)) {
|
|
227
|
+
// 年份选择器:比较年份
|
|
228
|
+
currentDate = moment(current).startOf('year')
|
|
229
|
+
comparisonDate = moment(today).startOf('year')
|
|
230
|
+
} else {
|
|
231
|
+
// 日期选择器:比较日期
|
|
232
|
+
currentDate = moment(current).startOf('day')
|
|
233
|
+
comparisonDate = today
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
switch (type) {
|
|
237
|
+
case 'afterToday':
|
|
238
|
+
// 只能选择今天及以后的日期/月份/年份
|
|
239
|
+
return currentDate.isBefore(comparisonDate)
|
|
240
|
+
case 'beforeToday':
|
|
241
|
+
// 只能选择今天及以前的日期/月份/年份
|
|
242
|
+
return currentDate.isAfter(comparisonDate)
|
|
243
|
+
case 'custom':
|
|
244
|
+
// 自定义范围:beforeDays(今天前多少天)、afterDays(今天后多少天)
|
|
245
|
+
if (beforeDays && beforeDays > 0) {
|
|
246
|
+
let minDate
|
|
247
|
+
if (['monthPicker', 'monthRangePicker'].includes(this.attr.type)) {
|
|
248
|
+
minDate = moment(comparisonDate).subtract(beforeDays, 'months')
|
|
249
|
+
} else if (['yearPicker', 'yearRangePicker'].includes(this.attr.type)) {
|
|
250
|
+
minDate = moment(comparisonDate).subtract(beforeDays, 'years')
|
|
251
|
+
} else {
|
|
252
|
+
minDate = moment(comparisonDate).subtract(beforeDays, 'days')
|
|
253
|
+
}
|
|
254
|
+
if (currentDate.isBefore(minDate)) {
|
|
255
|
+
return true
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (afterDays && afterDays > 0) {
|
|
259
|
+
let maxDate
|
|
260
|
+
if (['monthPicker', 'monthRangePicker'].includes(this.attr.type)) {
|
|
261
|
+
maxDate = moment(comparisonDate).add(afterDays, 'months')
|
|
262
|
+
} else if (['yearPicker', 'yearRangePicker'].includes(this.attr.type)) {
|
|
263
|
+
maxDate = moment(comparisonDate).add(afterDays, 'years')
|
|
264
|
+
} else {
|
|
265
|
+
maxDate = moment(comparisonDate).add(afterDays, 'days')
|
|
266
|
+
}
|
|
267
|
+
if (currentDate.isAfter(maxDate)) {
|
|
268
|
+
return true
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return false
|
|
272
|
+
default:
|
|
273
|
+
return false
|
|
274
|
+
}
|
|
275
|
+
}
|
|
202
276
|
}
|
|
203
277
|
},
|
|
204
278
|
methods: {
|
|
@@ -234,6 +308,7 @@ export default {
|
|
|
234
308
|
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
235
309
|
v-model="localValue"
|
|
236
310
|
:disabled="disabled || readOnly"
|
|
311
|
+
:disabledDate="disabledDate"
|
|
237
312
|
style="width: 100%"
|
|
238
313
|
:showToday="true"
|
|
239
314
|
placeholder="请选择日期"
|
|
@@ -251,6 +326,7 @@ export default {
|
|
|
251
326
|
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
252
327
|
v-model="localValue"
|
|
253
328
|
:disabled="disabled || readOnly"
|
|
329
|
+
:disabledDate="disabledDate"
|
|
254
330
|
:show-time="true"
|
|
255
331
|
placeholder="请选择月份"
|
|
256
332
|
:valueFormat="formatType"
|
|
@@ -266,6 +342,7 @@ export default {
|
|
|
266
342
|
:getPopupContainer="enablePopupToBody? getBodyContainer : undefined"
|
|
267
343
|
v-model="localValue"
|
|
268
344
|
:disabled="disabled || readOnly"
|
|
345
|
+
:disabledDate="disabledDate"
|
|
269
346
|
format="YYYY"
|
|
270
347
|
:valueFormat="formatType"
|
|
271
348
|
:open="yearShowOne"
|
|
@@ -328,6 +405,7 @@ export default {
|
|
|
328
405
|
"
|
|
329
406
|
v-model="localValue"
|
|
330
407
|
:disabled="disabled"
|
|
408
|
+
:disabledDate="disabledDate"
|
|
331
409
|
:placeholder="placeholder"
|
|
332
410
|
:show-time="
|
|
333
411
|
['yearRangePicker', 'monthRangePicker'].includes(attr.type)
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
'x-import-excel-button',
|
|
65
65
|
'x-chart',
|
|
66
66
|
'h-chart',
|
|
67
|
-
'x-simple-table'
|
|
67
|
+
'x-simple-table',
|
|
68
|
+
'x-workflow-progress'
|
|
68
69
|
].includes(cell.slotType)">
|
|
69
70
|
<component
|
|
70
71
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
@@ -143,7 +144,8 @@
|
|
|
143
144
|
'x-import-excel-button',
|
|
144
145
|
'x-chart',
|
|
145
146
|
'h-chart',
|
|
146
|
-
'x-simple-table'
|
|
147
|
+
'x-simple-table',
|
|
148
|
+
'x-workflow-progress'
|
|
147
149
|
].includes(cell.slotType)">
|
|
148
150
|
<component
|
|
149
151
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
@@ -219,7 +221,8 @@ export default {
|
|
|
219
221
|
XImportExcelButton: () => import('@vue2-client/base-client/components/his/XImportExcelButton/XImportExcelButton.vue'),
|
|
220
222
|
XChart: () => import('@vue2-client/base-client/components/his/XChart/XChart.vue'),
|
|
221
223
|
HChart: () => import('@vue2-client/base-client/components/his/HChart/HChart.vue'),
|
|
222
|
-
XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue')
|
|
224
|
+
XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue'),
|
|
225
|
+
XWorkflowProgress: () => import('@vue2-client/base-client/components/his/XWorkflowProgress/XWorkflowProgress.vue')
|
|
223
226
|
},
|
|
224
227
|
props: {
|
|
225
228
|
// 每一行的配置
|