cnhis-design-vue 3.3.2-release.2 → 3.3.3-beta.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/README.md +87 -87
- package/es/components/audio-sdk/index.d.ts +22 -9
- package/es/components/audio-sdk/src/Index.vue.d.ts +22 -9
- package/es/components/audio-sdk/src/Index.vue2.js +5 -1
- package/es/components/audio-sdk/src/audioSDK.d.ts +6 -53
- package/es/components/audio-sdk/src/audioSDK.js +67 -425
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +5 -5
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +5 -5
- package/es/components/audio-sdk/src/types/index.d.ts +1 -1
- package/es/components/button-print/index.d.ts +2 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +2 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +6 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +20 -8
- package/es/components/callback/src/components/render/popupMaps.d.ts +2 -2
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +11 -1
- package/es/components/field-set/src/FieldSet.vue2.js +7 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +35 -5
- package/es/components/form-config/src/FormConfig.vue.d.ts +35 -5
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +28 -4
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +7 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/components/renderer/date.js +64 -55
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +8 -9
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -2
- package/es/components/form-render/src/hooks/useFieldNormalize.js +6 -2
- package/es/components/form-render/src/types/fieldItem.d.ts +9 -1
- package/es/components/form-render/src/utils/business.d.ts +2 -1
- package/es/components/form-render/src/utils/business.js +45 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-table/index.d.ts +2 -2
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -2
- package/es/components/iho-table/src/IhoTable.vue2.js +6 -6
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +17 -3
- package/es/components/index.js +1 -1
- package/es/components/scale-view/index.d.ts +13 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +4 -4
- package/es/components/scale-view/src/hooks/scaleview-computed.js +12 -7
- package/es/components/scale-view/src/hooks/scaleview-init.js +3 -3
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +4 -0
- package/es/components/shortcut-setter/index.d.ts +7 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +7 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +3 -2
@@ -1,11 +1,12 @@
|
|
1
1
|
import { defineComponent, computed, watch, ref, onMounted, inject, createVNode, mergeProps } from 'vue';
|
2
2
|
import { generateTimeFormat } from '../../../../../shared/utils/index.js';
|
3
3
|
import { connect, mapProps } from '@formily/vue';
|
4
|
-
import {
|
4
|
+
import { useEventListener } from '@vueuse/core';
|
5
5
|
import { promiseTimeout } from '@vueuse/shared';
|
6
6
|
import { format } from 'date-fns';
|
7
7
|
import useLocale from 'naive-ui/es/_mixins/use-locale';
|
8
8
|
import DatePicker from '../../../../date-picker/index.js';
|
9
|
+
import '../../../index.js';
|
9
10
|
import { InjectionFormGlobalProps } from '../../constants/index.js';
|
10
11
|
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
11
12
|
import '@formily/core';
|
@@ -15,9 +16,10 @@ import '@vue/shared';
|
|
15
16
|
import 'lodash-es';
|
16
17
|
import 'naive-ui';
|
17
18
|
import './text.js';
|
18
|
-
import '../../utils/business.js';
|
19
|
+
import { parseLowCodeDate } from '../../utils/business.js';
|
19
20
|
import { assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
20
21
|
import script$1 from '../../../../../shared/components/DateIcon/DateIcon.vue.js';
|
22
|
+
import { useFormField } from '../../hooks/useFormField.js';
|
21
23
|
|
22
24
|
const script = /* @__PURE__ */ defineComponent({
|
23
25
|
props: {
|
@@ -55,63 +57,70 @@ const script = /* @__PURE__ */ defineComponent({
|
|
55
57
|
injectValueBindKey
|
56
58
|
} = useCommonInjection();
|
57
59
|
injectValueValidate(() => props.value);
|
58
|
-
function
|
59
|
-
var _a;
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
const
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
60
|
+
function generateDateValidator(params) {
|
61
|
+
var _a, _b;
|
62
|
+
const minTime = (_a = parseLowCodeDate(params.min_date_unit, params.min_date_condition, params.min_date_value)) == null ? void 0 : _a.getTime();
|
63
|
+
const maxTime = (_b = parseLowCodeDate(params.max_date_unit, params.max_date_condition, params.max_date_value)) == null ? void 0 : _b.getTime();
|
64
|
+
const getStartOfDay = (time) => {
|
65
|
+
if (time === void 0)
|
66
|
+
return void 0;
|
67
|
+
const date = new Date(time);
|
68
|
+
date.setHours(0, 0, 0, 0);
|
69
|
+
return date.getTime();
|
70
|
+
};
|
71
|
+
const minDateTimestamp = getStartOfDay(minTime);
|
72
|
+
const maxDateTimestamp = getStartOfDay(maxTime);
|
73
|
+
const isDateDisabled = (time) => {
|
74
|
+
const dateStart = getStartOfDay(time);
|
75
|
+
return !!(minDateTimestamp && dateStart && dateStart < minDateTimestamp || maxDateTimestamp && dateStart && dateStart > maxDateTimestamp);
|
76
|
+
};
|
77
|
+
const isTimeDisabled = (time) => {
|
78
|
+
const current = new Date(time);
|
79
|
+
const isMinEdgeDay = minTime ? isSameDate(current, new Date(minTime)) : false;
|
80
|
+
const isMaxEdgeDay = maxTime ? isSameDate(current, new Date(maxTime)) : false;
|
81
|
+
return {
|
82
|
+
isHourDisabled: (hour) => {
|
83
|
+
if (isMinEdgeDay)
|
84
|
+
return hour < new Date(minTime).getHours();
|
85
|
+
if (isMaxEdgeDay)
|
86
|
+
return hour > new Date(maxTime).getHours();
|
87
|
+
return false;
|
88
|
+
},
|
89
|
+
isMinuteDisabled: (minute, hour) => {
|
90
|
+
if (isMinEdgeDay && hour === new Date(minTime).getHours()) {
|
91
|
+
return minute < new Date(minTime).getMinutes();
|
92
|
+
}
|
93
|
+
if (isMaxEdgeDay && hour === new Date(maxTime).getHours()) {
|
94
|
+
return minute > new Date(maxTime).getMinutes();
|
95
|
+
}
|
96
|
+
return false;
|
97
|
+
}
|
98
|
+
};
|
99
|
+
};
|
88
100
|
return {
|
89
|
-
|
90
|
-
|
101
|
+
isDateDisabled: params.min_date_condition || params.max_date_condition ? isDateDisabled : void 0,
|
102
|
+
isTimeDisabled: params.min_date_condition || params.max_date_condition ? isTimeDisabled : void 0
|
91
103
|
};
|
92
|
-
function isHourDisabled(hour) {
|
93
|
-
return minCurrentDate() && !isOverDate && hour < currentHour || maxCurrentDate() && !isBeforeDate && hour > currentHour;
|
94
|
-
}
|
95
|
-
function isMinuteDisabled(minute) {
|
96
|
-
if (checkHour === currentHour) {
|
97
|
-
return minCurrentDate() && !isOverDate && minute < currentMinute || maxCurrentDate() && !isBeforeDate && minute > currentMinute;
|
98
|
-
}
|
99
|
-
return minCurrentDate() && !isOverDate && checkHour < currentHour || maxCurrentDate() && !isBeforeDate && checkHour > currentHour;
|
100
|
-
}
|
101
104
|
}
|
105
|
+
function isSameDate(a, b) {
|
106
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
107
|
+
}
|
108
|
+
const {
|
109
|
+
getFieldItem
|
110
|
+
} = useFormField();
|
102
111
|
const validateConfig = computed(() => {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
112
|
+
var _a, _b;
|
113
|
+
const fieldItem = getFieldItem();
|
114
|
+
if (!fieldItem)
|
115
|
+
return {};
|
116
|
+
return generateDateValidator({
|
117
|
+
max_date_unit: fieldItem.max_date_unit,
|
118
|
+
min_date_unit: fieldItem.min_date_unit,
|
119
|
+
max_date_value: (_a = fieldItem.validate) == null ? void 0 : _a.max_date,
|
120
|
+
min_date_value: (_b = fieldItem.validate) == null ? void 0 : _b.min_date,
|
121
|
+
max_date_condition: fieldItem.max_date_condition,
|
122
|
+
min_date_condition: fieldItem.min_date_condition
|
123
|
+
});
|
115
124
|
});
|
116
125
|
const formatConfig = computed(() => {
|
117
126
|
return {
|
@@ -214,14 +214,6 @@ function createComponent(name, Wrapper, Item) {
|
|
214
214
|
__spanPercent: (span || 0) / 12 * 100
|
215
215
|
};
|
216
216
|
});
|
217
|
-
const elementStyle = {
|
218
|
-
alignItems: props.vertical ? "flex-start" : "center",
|
219
|
-
flexDirection: props.vertical ? "column" : "row",
|
220
|
-
display: "flex",
|
221
|
-
flexWrap: "wrap",
|
222
|
-
justifyItems: "flex-start",
|
223
|
-
width: "100%"
|
224
|
-
};
|
225
217
|
const _Wrapper = Wrapper;
|
226
218
|
const content = createVNode(_Wrapper, mergeProps({
|
227
219
|
"key": key.value,
|
@@ -233,7 +225,14 @@ function createComponent(name, Wrapper, Item) {
|
|
233
225
|
}
|
234
226
|
}, attrs), {
|
235
227
|
default: () => [createVNode("section", {
|
236
|
-
"style":
|
228
|
+
"style": {
|
229
|
+
alignItems: props.vertical ? "flex-start" : "center",
|
230
|
+
flexDirection: props.vertical ? "column" : "row",
|
231
|
+
display: "flex",
|
232
|
+
flexWrap: "wrap",
|
233
|
+
justifyItems: "flex-start",
|
234
|
+
width: "100%"
|
235
|
+
}
|
237
236
|
}, [optionsWithSpan.map(renderOption)])]
|
238
237
|
});
|
239
238
|
return props.selectAll ? createVNode("section", null, [[renderSelectAll(), content]]) : content;
|
@@ -59,7 +59,7 @@ function useFieldListAdaptor(collector, globProps) {
|
|
59
59
|
fieldItem: item,
|
60
60
|
beforeSetValue: (_b = globProps == null ? void 0 : globProps.lifeCycle) == null ? void 0 : _b.beforeSetValue,
|
61
61
|
dialogFn: globProps == null ? void 0 : globProps.dialogFn,
|
62
|
-
span: (item.elem_width || 3) * 2,
|
62
|
+
span: +(item.elem_width || 3) * 2,
|
63
63
|
showLabel: !isPositive(item.hide_title),
|
64
64
|
remark: item.remark,
|
65
65
|
remarkTo: item.remarkTo,
|
@@ -320,7 +320,7 @@ function useFieldListAdaptor(collector, globProps) {
|
|
320
320
|
};
|
321
321
|
})];
|
322
322
|
const groupSpan = fieldList.reduce((res, item2) => {
|
323
|
-
return res + (item2.elem_width || 3) * 2;
|
323
|
+
return res + +(item2.elem_width || 3) * 2;
|
324
324
|
}, 0);
|
325
325
|
Object.assign(schema, {
|
326
326
|
type: "void",
|
@@ -13,8 +13,8 @@ import { format } from 'date-fns';
|
|
13
13
|
import { isString, isEmpty } from 'lodash-es';
|
14
14
|
import '../../index.js';
|
15
15
|
import { FIELD_BUSINESS_TYPE } from '../constants/index.js';
|
16
|
+
import { transformDateFormat, parseLowCodeDate } from '../utils/business.js';
|
16
17
|
import { isNegative, isPositive, FieldListFilter, findItemByValCondition, parseEnhanceText } from '../utils/index.js';
|
17
|
-
import { transformDateFormat } from '../utils/business.js';
|
18
18
|
|
19
19
|
function useFieldNormalize() {
|
20
20
|
const FieldListNormalizeWaterfallHook = new SyncWaterfallHook(["fieldList", "props"]);
|
@@ -116,7 +116,11 @@ function useFieldNormalize() {
|
|
116
116
|
}
|
117
117
|
case "DATE": {
|
118
118
|
if (fieldItem.default_val === "current") {
|
119
|
-
fieldItem.default_val = format(new Date(), fieldItem.date_format || "
|
119
|
+
fieldItem.default_val = format(new Date(), fieldItem.date_format || "HH:mm:ss");
|
120
|
+
}
|
121
|
+
const default_val = parseLowCodeDate(fieldItem.unit, fieldItem.condition, fieldItem.default_val);
|
122
|
+
if (default_val) {
|
123
|
+
fieldItem.default_val = format(default_val, fieldItem.date_format || "yyyy-MM-dd");
|
120
124
|
}
|
121
125
|
break;
|
122
126
|
}
|
@@ -7,6 +7,8 @@ import { DependKeyType, FormCommonState } from '../../../../components/form-rend
|
|
7
7
|
type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
8
8
|
type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
9
9
|
type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
|
10
|
+
type UnitType = 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR';
|
11
|
+
type ConditionType = '0' | 'IN_THE_PAST' | 'IN_THE_FUTURE' | 'CURRENT_TIME';
|
10
12
|
export type ValidateItem = Partial<{
|
11
13
|
/**
|
12
14
|
* 业务类型
|
@@ -80,7 +82,7 @@ export type FieldItem = {
|
|
80
82
|
annotation: boolean;
|
81
83
|
val_key_unit: string;
|
82
84
|
is_edit: FormCommonState;
|
83
|
-
elem_width: number;
|
85
|
+
elem_width: number | string;
|
84
86
|
is_show: FormCommonState;
|
85
87
|
is_null: FormCommonState;
|
86
88
|
name: string;
|
@@ -149,6 +151,12 @@ export type FieldItem = {
|
|
149
151
|
[key: string]: any;
|
150
152
|
};
|
151
153
|
selected_style: 'RADIO_MARK' | 'CHECK_MARK';
|
154
|
+
unit: UnitType;
|
155
|
+
condition: ConditionType;
|
156
|
+
max_date_unit: UnitType;
|
157
|
+
min_date_unit: UnitType;
|
158
|
+
max_date_condition: ConditionType;
|
159
|
+
min_date_condition: ConditionType;
|
152
160
|
fieldTitleColor: string;
|
153
161
|
fieldType: SchemaTypes;
|
154
162
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AgeContext, IdCardParseInfo } from '../../../../components/form-render';
|
1
|
+
import { AgeContext, FieldItem, IdCardParseInfo } from '../../../../components/form-render';
|
2
2
|
import { FIELD_AGE_UNIT } from '../../../../components/form-render/src/constants';
|
3
3
|
export declare function parseIdCard(idCardNo: string): IdCardParseInfo;
|
4
4
|
export declare function transformDateFormat(format?: string): "year" | "month" | "date" | "datetime" | "time";
|
@@ -12,3 +12,4 @@ export declare function parseAgeFromContext(context: AgeContext): {
|
|
12
12
|
age: number;
|
13
13
|
};
|
14
14
|
export declare function businessDateParser(dateString: string): Date | undefined;
|
15
|
+
export declare function parseLowCodeDate(unit?: NonNullable<FieldItem['unit']>, condition?: NonNullable<FieldItem['condition']>, date?: string): Date | null;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { format, differenceInDays, differenceInMonths, differenceInYears, differenceInHours, differenceInMinutes } from 'date-fns';
|
2
|
-
import { range, isString } from 'lodash-es';
|
2
|
+
import { range, isString, isNumber } from 'lodash-es';
|
3
3
|
import { FIELD_AGE_UNIT, FIELD_SEX_VALUE } from '../constants/index.js';
|
4
4
|
|
5
5
|
function parseIdCard(idCardNo) {
|
@@ -204,5 +204,48 @@ function businessDateParser(dateString) {
|
|
204
204
|
const [, year, month, day, hour, minute, second] = matched;
|
205
205
|
return new Date(`${year}-${month}-${day || "01"} ${hour || "00"}:${minute || "00"}:${second || "00"}`);
|
206
206
|
}
|
207
|
+
function parseLowCodeDate(unit, condition, date) {
|
208
|
+
if (!date)
|
209
|
+
return null;
|
210
|
+
if (condition === "0")
|
211
|
+
return new Date(date);
|
212
|
+
if (condition === "CURRENT_TIME" || date === "current")
|
213
|
+
return new Date();
|
214
|
+
if (!isNumber(+date) || isNaN(+date))
|
215
|
+
return null;
|
216
|
+
if (!unit || !condition)
|
217
|
+
return null;
|
218
|
+
return calculateTime({
|
219
|
+
unit,
|
220
|
+
condition,
|
221
|
+
value: +date
|
222
|
+
});
|
223
|
+
}
|
224
|
+
function calculateTime(params) {
|
225
|
+
const now = new Date();
|
226
|
+
const date = new Date(now);
|
227
|
+
const sign = params.condition === "IN_THE_PAST" ? -1 : 1;
|
228
|
+
switch (params.unit) {
|
229
|
+
case "HOUR":
|
230
|
+
date.setHours(date.getHours() + sign * params.value);
|
231
|
+
break;
|
232
|
+
case "DAY":
|
233
|
+
date.setDate(date.getDate() + sign * params.value);
|
234
|
+
break;
|
235
|
+
case "WEEK":
|
236
|
+
date.setDate(date.getDate() + sign * params.value * 7);
|
237
|
+
break;
|
238
|
+
case "MONTH":
|
239
|
+
date.setMonth(date.getMonth() + sign * params.value);
|
240
|
+
break;
|
241
|
+
case "QUARTER":
|
242
|
+
date.setMonth(date.getMonth() + sign * params.value * 3);
|
243
|
+
break;
|
244
|
+
case "YEAR":
|
245
|
+
date.setFullYear(date.getFullYear() + sign * params.value);
|
246
|
+
break;
|
247
|
+
}
|
248
|
+
return date;
|
249
|
+
}
|
207
250
|
|
208
|
-
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, transformDateFormat };
|
251
|
+
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, parseLowCodeDate, transformDateFormat };
|
@@ -9,7 +9,7 @@ import { isString, isFunction, omit, castArray, flattenDeep, isArray } from 'lod
|
|
9
9
|
import { NTooltip, NIcon } from 'naive-ui';
|
10
10
|
import { NESTED_FORM_ITEM_TYPE } from '../constants/index.js';
|
11
11
|
import { TEXT } from '../components/renderer/text.js';
|
12
|
-
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, transformDateFormat } from './business.js';
|
12
|
+
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, parseLowCodeDate, transformDateFormat } from './business.js';
|
13
13
|
import '../../index.js';
|
14
14
|
|
15
15
|
function formRenderLog(message) {
|
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
225
225
|
round: "",
|
226
226
|
size: 100,
|
227
227
|
onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
|
228
|
-
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
228
|
+
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\r\n <n-upload-trigger #="{ handleClick }" abstract>\r\n <n-button\r\n circle\r\n secondary\r\n class="edit-avatar"\r\n v-show="userDetail.id === state.userInfo.id"\r\n @click="handleClick"\r\n >\r\n <template #icon>\r\n <n-icon size="16" color="#666666" :component="Camera" />\r\n </template>\r\n </n-button>\r\n </n-upload-trigger>\r\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
229
229
|
class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
|
230
230
|
}, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
|
231
231
|
strong: "",
|
@@ -3226,7 +3226,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3226
3226
|
dateOperationalForm?: {
|
3227
3227
|
scene: "DIFF" | "CALC";
|
3228
3228
|
precision: string;
|
3229
|
-
diffValUnit: "
|
3229
|
+
diffValUnit: "HOUR" | "DAY" | "MIN" | "DHM";
|
3230
3230
|
diffValField: string;
|
3231
3231
|
startDateField: string;
|
3232
3232
|
endDateField: string;
|
@@ -6823,7 +6823,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6823
6823
|
dateOperationalForm?: {
|
6824
6824
|
scene: "DIFF" | "CALC";
|
6825
6825
|
precision: string;
|
6826
|
-
diffValUnit: "
|
6826
|
+
diffValUnit: "HOUR" | "DAY" | "MIN" | "DHM";
|
6827
6827
|
diffValField: string;
|
6828
6828
|
startDateField: string;
|
6829
6829
|
endDateField: string;
|
@@ -3224,7 +3224,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
3224
3224
|
dateOperationalForm?: {
|
3225
3225
|
scene: "DIFF" | "CALC";
|
3226
3226
|
precision: string;
|
3227
|
-
diffValUnit: "
|
3227
|
+
diffValUnit: "HOUR" | "DAY" | "MIN" | "DHM";
|
3228
3228
|
diffValField: string;
|
3229
3229
|
startDateField: string;
|
3230
3230
|
endDateField: string;
|
@@ -6821,7 +6821,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
6821
6821
|
dateOperationalForm?: {
|
6822
6822
|
scene: "DIFF" | "CALC";
|
6823
6823
|
precision: string;
|
6824
|
-
diffValUnit: "
|
6824
|
+
diffValUnit: "HOUR" | "DAY" | "MIN" | "DHM";
|
6825
6825
|
diffValField: string;
|
6826
6826
|
startDateField: string;
|
6827
6827
|
endDateField: string;
|
@@ -140,8 +140,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
140
140
|
});
|
141
141
|
}
|
142
142
|
const configBindProps = computed(() => {
|
143
|
-
var _a2, _b2, _c, _d, _e, _f, _g;
|
144
|
-
const height = widthAppend(configRef.value.rowConfig.height);
|
143
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
|
144
|
+
const height = widthAppend((_b2 = (_a2 = configRef.value.rowConfig) == null ? void 0 : _a2.height) != null ? _b2 : 36);
|
145
145
|
const defaultTheme = configRef.value.tableRowHeight ? {
|
146
146
|
heightLarge: height,
|
147
147
|
heightMedium: height,
|
@@ -150,16 +150,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
150
150
|
} : null;
|
151
151
|
return {
|
152
152
|
...props.nConfigProviderProps,
|
153
|
-
namespace: `vxe-table--ignore-clear ${(
|
153
|
+
namespace: `vxe-table--ignore-clear ${(_d = (_c = props.nConfigProviderProps) == null ? void 0 : _c.namespace) != null ? _d : ""}`,
|
154
154
|
themeOverrides: {
|
155
|
-
...(
|
155
|
+
...(_e = props.nConfigProviderProps) == null ? void 0 : _e.themeOverrides,
|
156
156
|
Input: {
|
157
157
|
...defaultTheme,
|
158
|
-
...(
|
158
|
+
...(_g = (_f = props.nConfigProviderProps) == null ? void 0 : _f.themeOverrides) == null ? void 0 : _g.Input
|
159
159
|
},
|
160
160
|
InternalSelection: {
|
161
161
|
...defaultTheme,
|
162
|
-
...(
|
162
|
+
...(_i = (_h = props.nConfigProviderProps) == null ? void 0 : _h.themeOverrides) == null ? void 0 : _i.InternalSelection
|
163
163
|
}
|
164
164
|
}
|
165
165
|
};
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { isArray } from 'lodash-es';
|
2
|
+
|
1
3
|
function getDefaultValue(row, item, options = []) {
|
2
4
|
const {
|
3
5
|
aliasField = "",
|
@@ -5,17 +7,29 @@ function getDefaultValue(row, item, options = []) {
|
|
5
7
|
valueField = "value"
|
6
8
|
} = (item == null ? void 0 : item.componentProps) || {};
|
7
9
|
const value = row[item.columnName];
|
8
|
-
if (
|
10
|
+
if (isArray(value))
|
9
11
|
return value.map((v) => getValue(v));
|
10
12
|
return getValue(value);
|
11
13
|
function getValue(value2) {
|
12
14
|
var _a, _b, _c;
|
13
|
-
const findItem = (_a =
|
15
|
+
const findItem = (_a = getGoupFlatten(options)) == null ? void 0 : _a.find((v) => v[valueField] == value2);
|
14
16
|
return (_c = (_b = findItem == null ? void 0 : findItem[aliasField]) != null ? _b : findItem == null ? void 0 : findItem[labelField]) != null ? _c : value2;
|
15
17
|
}
|
16
18
|
}
|
17
19
|
function getArray(list) {
|
18
|
-
return
|
20
|
+
return isArray(list) && !list.length ? null : list;
|
21
|
+
}
|
22
|
+
function getGoupFlatten(list) {
|
23
|
+
if (!isArray(list) || !list.length)
|
24
|
+
return [];
|
25
|
+
return list.reduce((acc, cur) => {
|
26
|
+
if (cur.type === "group" && cur.children) {
|
27
|
+
acc.push(...getGoupFlatten(cur.children));
|
28
|
+
} else if (cur.type !== "group") {
|
29
|
+
acc.push(cur);
|
30
|
+
}
|
31
|
+
return acc;
|
32
|
+
}, []);
|
19
33
|
}
|
20
34
|
|
21
35
|
export { getArray, getDefaultValue };
|
package/es/components/index.js
CHANGED
@@ -129,7 +129,7 @@ export { usePresetScope } from './form-render/src/hooks/usePresetScope.js';
|
|
129
129
|
export { useWordbookSetting, wordbookSettingHandler } from './form-render/src/hooks/useWordbookSetting.js';
|
130
130
|
export { useNewLowCodeReactions } from './form-render/src/hooks/useNewLowCodeReactions.js';
|
131
131
|
export { useSelectedSetting } from './form-render/src/hooks/useSelectedSetting.js';
|
132
|
-
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, transformDateFormat } from './form-render/src/utils/business.js';
|
132
|
+
export { businessDateParser, isForeignerID, isIdCard, isMobile, parseAge2Birthday, parseAgeFromContext, parseBirthday, parseIdCard, parseLowCodeDate, transformDateFormat } from './form-render/src/utils/business.js';
|
133
133
|
export { findNextWidget, queryDecoratorByAddress, queryDecoratorByFieldKey, queryInput } from './form-render/src/utils/dom.js';
|
134
134
|
export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createFieldAddressId, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './form-render/src/utils/schema.js';
|
135
135
|
export { FieldListFilter, combineExtendKey, createInputSlot, createSlot, editorUnescape, findItemByValCondition, formRenderLog, getAbsoluteKey, injectOrProvide, isEnter, isNegative, isNestedFieldType, isNestedType, isPositive, isValidWidgetCombination, mergeDeepProperties, parseEnhanceText, parseNumberFromMaybeString, renderDescOption, renderOptionLabel, replace2Any, splitExtendKey, validateMessageParser } from './form-render/src/utils/index.js';
|
@@ -117,6 +117,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
117
117
|
type: ObjectConstructor;
|
118
118
|
default: () => {};
|
119
119
|
};
|
120
|
+
allQuery: {
|
121
|
+
type: ObjectConstructor;
|
122
|
+
default: () => {};
|
123
|
+
};
|
120
124
|
}, {
|
121
125
|
ScaleViewState: {
|
122
126
|
other: string;
|
@@ -268,6 +272,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
268
272
|
type: ObjectConstructor;
|
269
273
|
default: () => {};
|
270
274
|
};
|
275
|
+
allQuery: {
|
276
|
+
type: ObjectConstructor;
|
277
|
+
default: () => {};
|
278
|
+
};
|
271
279
|
}>> & {
|
272
280
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
273
281
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -891,6 +899,10 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
891
899
|
type: ObjectConstructor;
|
892
900
|
default: () => {};
|
893
901
|
};
|
902
|
+
allQuery: {
|
903
|
+
type: ObjectConstructor;
|
904
|
+
default: () => {};
|
905
|
+
};
|
894
906
|
}>> & {
|
895
907
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
896
908
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -923,6 +935,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
923
935
|
printingHideBtn: boolean;
|
924
936
|
isGeneratePrintPdf: boolean;
|
925
937
|
combinationParmas: Record<string, any>;
|
938
|
+
allQuery: Record<string, any>;
|
926
939
|
}>>;
|
927
940
|
declare const CRadio: SFCWithInstall<import("vue").DefineComponent<{
|
928
941
|
form: {
|
@@ -115,6 +115,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
115
115
|
type: ObjectConstructor;
|
116
116
|
default: () => {};
|
117
117
|
};
|
118
|
+
allQuery: {
|
119
|
+
type: ObjectConstructor;
|
120
|
+
default: () => {};
|
121
|
+
};
|
118
122
|
}, {
|
119
123
|
ScaleViewState: {
|
120
124
|
other: string;
|
@@ -266,6 +270,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
266
270
|
type: ObjectConstructor;
|
267
271
|
default: () => {};
|
268
272
|
};
|
273
|
+
allQuery: {
|
274
|
+
type: ObjectConstructor;
|
275
|
+
default: () => {};
|
276
|
+
};
|
269
277
|
}>> & {
|
270
278
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
271
279
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -889,6 +897,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
889
897
|
type: ObjectConstructor;
|
890
898
|
default: () => {};
|
891
899
|
};
|
900
|
+
allQuery: {
|
901
|
+
type: ObjectConstructor;
|
902
|
+
default: () => {};
|
903
|
+
};
|
892
904
|
}>> & {
|
893
905
|
onOnCloseSetting?: ((...args: any[]) => any) | undefined;
|
894
906
|
onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
|
@@ -921,5 +933,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
921
933
|
printingHideBtn: boolean;
|
922
934
|
isGeneratePrintPdf: boolean;
|
923
935
|
combinationParmas: Record<string, any>;
|
936
|
+
allQuery: Record<string, any>;
|
924
937
|
}>;
|
925
938
|
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, reactive, ref, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref,
|
1
|
+
import { defineComponent, reactive, ref, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref, Fragment, createBlock, mergeProps, createCommentVNode, createElementVNode, normalizeStyle, createVNode, withCtx, renderList, toDisplayString, createTextVNode, resolveDynamicComponent, renderSlot } from 'vue';
|
2
2
|
import useNoData from './hooks/use-noData.js';
|
3
3
|
import { ScaleViewProps } from './hooks/scaleview-props.js';
|
4
4
|
import { getScaleViewState } from './hooks/scaleview-state.js';
|
@@ -62,7 +62,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
62
|
setNoData,
|
63
63
|
resetNodata
|
64
64
|
} = useNoData();
|
65
|
-
|
65
|
+
let query = props.openType == "qiankun" ? props.allQuery : handleQueryParams();
|
66
66
|
const {
|
67
67
|
showEvatip,
|
68
68
|
isFormBoldOpen,
|
@@ -133,8 +133,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
133
133
|
} = query;
|
134
134
|
id && (state.shareId = id);
|
135
135
|
};
|
136
|
-
handleQuery();
|
137
136
|
const init = async (configData) => {
|
137
|
+
handleQuery();
|
138
138
|
try {
|
139
139
|
resetNodata();
|
140
140
|
await initForm(configData);
|
@@ -193,7 +193,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
193
193
|
}]),
|
194
194
|
ref_key: "scaleViewDom",
|
195
195
|
ref: scaleViewDom
|
196
|
-
}, [
|
196
|
+
}, [!state.spinning && !state.hasFrontAddress ? (openBlock(), createElementBlock(Fragment, {
|
197
197
|
key: 0
|
198
198
|
}, [unref(noDataState).noData ? (openBlock(), createBlock(NoData, {
|
199
199
|
key: 0,
|
@@ -5,6 +5,7 @@ import moment from 'moment';
|
|
5
5
|
import vexutilsExpand from '../../../../shared/utils/vexutilsExpand.js';
|
6
6
|
import { componentMapStr } from './use-component.js';
|
7
7
|
|
8
|
+
const defaultVariable = ["evaname", "evadesc", "evast", "evadur", "evaan", "evasit", "evaztip"];
|
8
9
|
const ScaleViewComputed = (props, state, config) => {
|
9
10
|
const {
|
10
11
|
query,
|
@@ -157,8 +158,8 @@ const ScaleViewComputed = (props, state, config) => {
|
|
157
158
|
return guage_id && props.noBtn;
|
158
159
|
});
|
159
160
|
const skipCover = computed(() => {
|
160
|
-
var _a, _b;
|
161
|
-
const skipCover2 = ((_a = props.params) == null ? void 0 : _a.skipCover) || ((_b = props.combinationParmas) == null ? void 0 : _b.skipCover);
|
161
|
+
var _a, _b, _c;
|
162
|
+
const skipCover2 = ((_a = props.params) == null ? void 0 : _a.skipCover) || ((_b = props.combinationParmas) == null ? void 0 : _b.skipCover) || ((_c = props.allQuery) == null ? void 0 : _c.skipCover);
|
162
163
|
if (!skipCover2 && !("skipCover" in props.params)) {
|
163
164
|
return false;
|
164
165
|
}
|
@@ -188,11 +189,15 @@ const ScaleViewComputed = (props, state, config) => {
|
|
188
189
|
return state.paramsEvaluate && Object.keys(state.paramsEvaluate).length;
|
189
190
|
});
|
190
191
|
const hasDefault = computed(() => {
|
191
|
-
|
192
|
-
if (
|
193
|
-
|
194
|
-
|
195
|
-
|
192
|
+
let hasDefaultItem = false;
|
193
|
+
if (props.openType == "qiankun") {
|
194
|
+
hasDefaultItem = !!defaultVariable.find((item) => props.allQuery[item]);
|
195
|
+
} else {
|
196
|
+
const hash = window.location.search || window.location.hash;
|
197
|
+
if (!hash)
|
198
|
+
return;
|
199
|
+
hasDefaultItem = !!defaultVariable.find((item) => hash.includes(item));
|
200
|
+
}
|
196
201
|
return state.paramsEvaluate || hasDefaultItem;
|
197
202
|
});
|
198
203
|
const canEdit = computed(() => {
|