cnhis-design-vue 3.1.34-beta.15 → 3.1.34-beta.16
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/es/components/big-table/src/components/edit-form/edit-select.js +21 -9
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +1 -1
- package/es/components/big-table/src/hooks/useEvent.js +20 -2
- package/es/components/fabric-chart/src/hooks/useCenter.js +115 -44
- package/es/components/fabric-chart/src/hooks/useLeft.js +3 -2
- package/es/components/fabric-chart/src/utils/utils.d.ts +0 -6
- package/es/components/fabric-chart/src/utils/utils.js +1 -13
- package/es/components/form-config/index.d.ts +16 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +16 -0
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +8 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +8 -8
- package/package.json +2 -2
|
@@ -37,6 +37,7 @@ var EditSelect = defineComponent({
|
|
|
37
37
|
const state = reactive({
|
|
38
38
|
keyupValue: attrs.value,
|
|
39
39
|
options: [],
|
|
40
|
+
filterOptions: [],
|
|
40
41
|
loading: false,
|
|
41
42
|
keyword: "",
|
|
42
43
|
config: {
|
|
@@ -46,10 +47,8 @@ var EditSelect = defineComponent({
|
|
|
46
47
|
});
|
|
47
48
|
const setOptions = async () => {
|
|
48
49
|
if (props.col.options) {
|
|
49
|
-
state.options =
|
|
50
|
-
|
|
51
|
-
state.keyupValue = state.options[0].value;
|
|
52
|
-
}
|
|
50
|
+
state.options = XEUtils.clone(props.col.options);
|
|
51
|
+
state.filterOptions = XEUtils.clone(props.col.options);
|
|
53
52
|
} else {
|
|
54
53
|
`${props.col.columnName}_options`;
|
|
55
54
|
const obj = {
|
|
@@ -60,8 +59,8 @@ var EditSelect = defineComponent({
|
|
|
60
59
|
};
|
|
61
60
|
state.options = await props.col.queryOptions(obj);
|
|
62
61
|
state.loading = false;
|
|
63
|
-
emit("setOptions", state.options);
|
|
64
62
|
}
|
|
63
|
+
emit("setOptions", state.options);
|
|
65
64
|
};
|
|
66
65
|
let selectSearch = (value) => {
|
|
67
66
|
state.keyword = value;
|
|
@@ -81,6 +80,13 @@ var EditSelect = defineComponent({
|
|
|
81
80
|
const init = () => {
|
|
82
81
|
if (props.col.options) {
|
|
83
82
|
setOptions();
|
|
83
|
+
state.config.onSearch = (value) => {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
const filterOptions = ((_c = (_b = (_a = formRef == null ? void 0 : formRef.value) == null ? void 0 : _a.treeMate) == null ? void 0 : _b.treeNodes) == null ? void 0 : _c.map((item) => item.rawNode)) || XEUtils.clone(props.col.options);
|
|
86
|
+
state.filterOptions = filterOptions;
|
|
87
|
+
props.row[`${props.col.columnName}_filter_options`] = state.filterOptions;
|
|
88
|
+
props.row[`${props.col.columnName}_is_key_arrow`] = false;
|
|
89
|
+
};
|
|
84
90
|
} else {
|
|
85
91
|
state.config.remote = true;
|
|
86
92
|
state.config.onSearch = selectSearch;
|
|
@@ -88,22 +94,28 @@ var EditSelect = defineComponent({
|
|
|
88
94
|
}
|
|
89
95
|
};
|
|
90
96
|
function onKeyup(event) {
|
|
97
|
+
var _a, _b, _c, _d;
|
|
91
98
|
const {
|
|
92
99
|
key
|
|
93
100
|
} = event;
|
|
94
101
|
if (state.config.multiple || !["ArrowUp", "ArrowDown"].includes(key))
|
|
95
102
|
return;
|
|
103
|
+
props.row[`${props.col.columnName}_is_key_arrow`] = true;
|
|
96
104
|
if (!state.keyupValue)
|
|
97
|
-
state.keyupValue = state.
|
|
98
|
-
let index = state.
|
|
99
|
-
|
|
105
|
+
state.keyupValue = (_b = (_a = state.filterOptions) == null ? void 0 : _a[0]) == null ? void 0 : _b.value;
|
|
106
|
+
let index = state.filterOptions.findIndex((item) => item.value === state.keyupValue);
|
|
107
|
+
if (!~index) {
|
|
108
|
+
state.keyupValue = (_d = (_c = state.filterOptions) == null ? void 0 : _c[0]) == null ? void 0 : _d.value;
|
|
109
|
+
index = 0;
|
|
110
|
+
}
|
|
111
|
+
const length = state.filterOptions.length;
|
|
100
112
|
if (key === "ArrowUp") {
|
|
101
113
|
index = index - 1 === -1 ? length - 1 : index - 1;
|
|
102
114
|
}
|
|
103
115
|
if (key === "ArrowDown") {
|
|
104
116
|
index = index + 1 === length ? 0 : index + 1;
|
|
105
117
|
}
|
|
106
|
-
state.keyupValue = state.
|
|
118
|
+
state.keyupValue = state.filterOptions[index].value;
|
|
107
119
|
onUpdateValue(state.keyupValue);
|
|
108
120
|
}
|
|
109
121
|
init();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
2
|
export declare const useCommon: (props: AnyObject, attrs: AnyObject, isTriggerClick?: boolean) => {
|
|
3
|
-
formRef:
|
|
3
|
+
formRef: any;
|
|
4
4
|
isShow: import("vue").Ref<boolean>;
|
|
5
5
|
};
|
|
@@ -4,7 +4,7 @@ import { hideFilterWrap } from '../utils.js';
|
|
|
4
4
|
|
|
5
5
|
const useEvent = (props, state, emit, xGrid, anchorEvent) => {
|
|
6
6
|
function keyDown({ $event }) {
|
|
7
|
-
var _a, _b;
|
|
7
|
+
var _a, _b, _c, _d, _e;
|
|
8
8
|
const { isArrow, isEnter, isChecked, isTab, isEdit } = ((_a = props.columnConfig) == null ? void 0 : _a.keyboardConfig) || {};
|
|
9
9
|
let activeRow = null;
|
|
10
10
|
let index = 0;
|
|
@@ -18,6 +18,24 @@ const useEvent = (props, state, emit, xGrid, anchorEvent) => {
|
|
|
18
18
|
return;
|
|
19
19
|
if (isEdit) {
|
|
20
20
|
const data = xGridRef.getEditRecord() || xGridRef.getSelectedCell() || {};
|
|
21
|
+
const { row, column } = data;
|
|
22
|
+
const { fieldList = [] } = props.columnConfig;
|
|
23
|
+
if ($event.key === "Tab") {
|
|
24
|
+
const fieldItem = fieldList.find((item) => item.columnName === column.field);
|
|
25
|
+
const { formType = "", componentProps } = fieldItem;
|
|
26
|
+
const _index = (_b = row[`${column.field}_filter_options`]) == null ? void 0 : _b.findIndex((item) => item.value === row[column.field]);
|
|
27
|
+
if (formType === "select" && !(componentProps == null ? void 0 : componentProps.multiple) && ((_c = row[`${column.field}_filter_options`]) == null ? void 0 : _c.length) > 0 && (!row[column.field] || !row[`${column.field}_is_key_arrow`] && !~_index)) {
|
|
28
|
+
const oldValue = row[column.field];
|
|
29
|
+
row[column.field] = (_d = row[`${column.field}_filter_options`]) == null ? void 0 : _d[0].value;
|
|
30
|
+
emit("formChange", {
|
|
31
|
+
value: row[column.field],
|
|
32
|
+
row,
|
|
33
|
+
column,
|
|
34
|
+
index: data.rowIndex,
|
|
35
|
+
oldValue
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
21
39
|
emit("keyboard", {
|
|
22
40
|
key: $event.key,
|
|
23
41
|
...data,
|
|
@@ -29,7 +47,7 @@ const useEvent = (props, state, emit, xGrid, anchorEvent) => {
|
|
|
29
47
|
if ($event.key === "ArrowUp" && index > 0) {
|
|
30
48
|
activeIndex = index - 1;
|
|
31
49
|
}
|
|
32
|
-
if ($event.key === "ArrowDown" && index < ((
|
|
50
|
+
if ($event.key === "ArrowDown" && index < ((_e = props.data) == null ? void 0 : _e.length) - 1) {
|
|
33
51
|
activeIndex = index + 1;
|
|
34
52
|
}
|
|
35
53
|
const row = xGridRef.getData(activeIndex);
|
|
@@ -4,11 +4,12 @@ import useGrid from './useGrid.js';
|
|
|
4
4
|
import { useShadow } from './useShadow.js';
|
|
5
5
|
import { TEMPERATURE_MENU, PAIN_MENU, OVERLAP } from './constant.js';
|
|
6
6
|
import { cloneDeep } from 'lodash-es';
|
|
7
|
-
import {
|
|
7
|
+
import { isEffectiveNode, getIndex, deleteProperty } from '../utils/utils.js';
|
|
8
8
|
|
|
9
9
|
function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, getYValue, addRenderItem, pointTipProps, pointMenuProps, useCommon) {
|
|
10
10
|
useGrid(canvas, propItems);
|
|
11
11
|
const { getEqualXTypes, repeatTip, maxLimitTip, minLimitTip } = useCommon;
|
|
12
|
+
const { createShadowLines } = useShadow();
|
|
12
13
|
const {
|
|
13
14
|
left,
|
|
14
15
|
xScaleList,
|
|
@@ -26,22 +27,21 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
26
27
|
config
|
|
27
28
|
} = propItems;
|
|
28
29
|
const shadowLinesCache = /* @__PURE__ */ new Set();
|
|
29
|
-
|
|
30
|
+
const SHADOWKEYS = ["xinmai", "mai"];
|
|
31
|
+
const shadowPointCache = /* @__PURE__ */ new Map();
|
|
30
32
|
const maiboPoints = /* @__PURE__ */ new Set();
|
|
31
33
|
const otherPoints = /* @__PURE__ */ new Set();
|
|
32
|
-
const prevLines = /* @__PURE__ */ new Set();
|
|
33
34
|
const gridPoints = /* @__PURE__ */ new Set();
|
|
34
35
|
const yScaleValue = cloneDeep(left.yScaleValue);
|
|
35
36
|
init();
|
|
36
37
|
function init() {
|
|
37
|
-
shadowPointCache
|
|
38
|
+
shadowPointCache.clear();
|
|
38
39
|
maiboPoints.clear();
|
|
39
40
|
otherPoints.clear();
|
|
40
|
-
prevLines.clear();
|
|
41
41
|
yScaleValue.forEach((scaleValue) => {
|
|
42
42
|
drawPositionLine(scaleValue);
|
|
43
43
|
scaleValue.dataList.forEach((item, dataIndex) => {
|
|
44
|
-
if (scaleValue.type
|
|
44
|
+
if (!isOneLine(scaleValue.type) || item.enable) {
|
|
45
45
|
drawPolyLine(item, dataIndex, scaleValue);
|
|
46
46
|
}
|
|
47
47
|
});
|
|
@@ -50,6 +50,9 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
50
50
|
drawOverlapPoint();
|
|
51
51
|
setCanvasEvent();
|
|
52
52
|
}
|
|
53
|
+
function isOneLine(type) {
|
|
54
|
+
return ["temperature", "pulse"].includes(type);
|
|
55
|
+
}
|
|
53
56
|
function drawPositionLine(scaleValue) {
|
|
54
57
|
if (scaleValue.type !== "temperature" || !scaleValue.positionLine)
|
|
55
58
|
return;
|
|
@@ -65,35 +68,101 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
65
68
|
if (shadowLinesCache.size)
|
|
66
69
|
canvas.value.remove(...shadowLinesCache);
|
|
67
70
|
shadowLinesCache.clear();
|
|
68
|
-
if (shadowPointCache.
|
|
71
|
+
if (shadowPointCache.size > 1) {
|
|
69
72
|
if (target) {
|
|
70
|
-
const { type,
|
|
73
|
+
const { type, key } = target.origin || {};
|
|
71
74
|
if (type === "pulse") {
|
|
72
|
-
shadowPointCache
|
|
75
|
+
const list = shadowPointCache.get(key);
|
|
76
|
+
const index = list == null ? void 0 : list.findIndex((point) => point[0] === target.left);
|
|
77
|
+
list.splice(index, 1, [target.left, target.top]);
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
data.forEach((item) => {
|
|
86
|
-
var _a2, _b, _c, _d;
|
|
87
|
-
if (((_a2 = pulseObj.shadow) == null ? void 0 : _a2.mode) == "color") {
|
|
88
|
-
const points = item.map((v) => ({ x: v[0], y: v[1] }));
|
|
89
|
-
const polygon = new fabric.Polygon(points, {
|
|
90
|
-
...defaultStyle,
|
|
91
|
-
...((_b = pulseObj.shadow) == null ? void 0 : _b.style) || {}
|
|
80
|
+
console.log("shadowPointCache :>> ", shadowPointCache);
|
|
81
|
+
const data = [];
|
|
82
|
+
const _shadowPointCache = [];
|
|
83
|
+
const somes = [];
|
|
84
|
+
for (const item of shadowPointCache) {
|
|
85
|
+
_shadowPointCache.push(item[1]);
|
|
86
|
+
if (item[0] === SHADOWKEYS[0]) {
|
|
87
|
+
item[1].forEach((_item) => {
|
|
88
|
+
const someIndex = (shadowPointCache.get(SHADOWKEYS[1]) || []).findIndex((v) => v[0] === _item[0]);
|
|
89
|
+
someIndex > -1 && somes.push(_item[0]);
|
|
92
90
|
});
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const [points1, points2] = _shadowPointCache;
|
|
94
|
+
console.log("points1, points2 :>> ", points1, points2);
|
|
95
|
+
let _arr1 = [];
|
|
96
|
+
let _arr2 = [];
|
|
97
|
+
somes.forEach((x, i) => {
|
|
98
|
+
const index1 = points1.findIndex((point) => point[0] === x);
|
|
99
|
+
const index2 = points2.findIndex((point) => point[0] === x);
|
|
100
|
+
const currentPoint1 = points1[index1];
|
|
101
|
+
const currentPoint2 = points2[index2];
|
|
102
|
+
const prevPoint1 = points1[index1 - 1];
|
|
103
|
+
const nextPoint1 = points1[index1 + 1];
|
|
104
|
+
const prevPoint2 = points2[index2 - 1];
|
|
105
|
+
const nextPoint2 = points2[index2 + 1];
|
|
106
|
+
if (prevPoint1 && prevPoint2) {
|
|
107
|
+
if (prevPoint1[0] !== prevPoint2[0]) {
|
|
108
|
+
const maxPoint = Math.max(prevPoint1[0], prevPoint2[0]);
|
|
109
|
+
_arr1.push([prevPoint1, prevPoint2].find((point) => point[0] === maxPoint));
|
|
110
|
+
} else {
|
|
111
|
+
const minYPoint = Math.min(currentPoint1[1], currentPoint2[1]);
|
|
112
|
+
_arr1.push([currentPoint1, currentPoint2].find((point) => point[1] === minYPoint));
|
|
113
|
+
const maxYPoint = Math.max(currentPoint1[1], currentPoint2[1]);
|
|
114
|
+
_arr2.push([currentPoint1, currentPoint2].find((point) => point[1] === maxYPoint));
|
|
115
|
+
}
|
|
116
|
+
} else if (prevPoint1) {
|
|
117
|
+
_arr1.push(prevPoint1);
|
|
118
|
+
} else if (prevPoint2) {
|
|
119
|
+
_arr2.push(prevPoint2);
|
|
120
|
+
} else {
|
|
121
|
+
const minYPoint = Math.min(currentPoint1[1], currentPoint2[1]);
|
|
122
|
+
_arr1.push([currentPoint1, currentPoint2].find((point) => point[1] === minYPoint));
|
|
123
|
+
const maxYPoint = Math.max(currentPoint1[1], currentPoint2[1]);
|
|
124
|
+
_arr2.push([currentPoint1, currentPoint2].find((point) => point[1] === maxYPoint));
|
|
125
|
+
}
|
|
126
|
+
const setData = () => {
|
|
127
|
+
const dataItem = [..._arr1, ..._arr2.reverse()];
|
|
128
|
+
const [firstPoint] = dataItem;
|
|
129
|
+
const lastPoint = dataItem.at(-1);
|
|
130
|
+
if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1])
|
|
131
|
+
dataItem.splice(-1, 1);
|
|
132
|
+
data.push(dataItem);
|
|
133
|
+
_arr1 = [];
|
|
134
|
+
_arr2 = [];
|
|
135
|
+
};
|
|
136
|
+
if (nextPoint1 && nextPoint2) {
|
|
137
|
+
if (nextPoint1[0] !== nextPoint2[0]) {
|
|
138
|
+
const minPoint = Math.min(nextPoint1[0], nextPoint2[0]);
|
|
139
|
+
_arr1.push([nextPoint1, nextPoint2].find((point) => point[0] === minPoint));
|
|
140
|
+
setData();
|
|
141
|
+
}
|
|
142
|
+
} else if (nextPoint1) {
|
|
143
|
+
_arr1.push(nextPoint1);
|
|
144
|
+
setData();
|
|
145
|
+
} else if (nextPoint2) {
|
|
146
|
+
_arr2.push(nextPoint2);
|
|
147
|
+
setData();
|
|
95
148
|
} else {
|
|
96
|
-
|
|
149
|
+
setData();
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
console.log(data, somes);
|
|
153
|
+
data.forEach((item) => {
|
|
154
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
155
|
+
const points = item.map((v) => ({ x: v[0], y: v[1] }));
|
|
156
|
+
const polygon = new fabric.Polygon(points, {
|
|
157
|
+
...defaultStyle,
|
|
158
|
+
...((_a2 = pulseObj.shadow) == null ? void 0 : _a2.style) || {}
|
|
159
|
+
});
|
|
160
|
+
if (((_b = pulseObj.shadow) == null ? void 0 : _b.mode) == "slash") {
|
|
161
|
+
polygon.set({
|
|
162
|
+
fill: "transparent",
|
|
163
|
+
stroke: ((_d = (_c = pulseObj.shadow) == null ? void 0 : _c.style) == null ? void 0 : _d.stroke) || "#f00"
|
|
164
|
+
});
|
|
165
|
+
const shadowLines = createShadowLines(item, (_e = pulseObj.shadow) == null ? void 0 : _e.style._angle, (_f = pulseObj.shadow) == null ? void 0 : _f.style.space);
|
|
97
166
|
shadowLines.forEach((l) => {
|
|
98
167
|
var _a3;
|
|
99
168
|
Object.assign(l, {
|
|
@@ -104,6 +173,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
104
173
|
});
|
|
105
174
|
canvas.value.add(...shadowLines);
|
|
106
175
|
}
|
|
176
|
+
shadowLinesCache.add(polygon);
|
|
177
|
+
canvas.value.add(polygon);
|
|
107
178
|
});
|
|
108
179
|
}
|
|
109
180
|
}
|
|
@@ -220,7 +291,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
220
291
|
const lineList = [];
|
|
221
292
|
const otherList = [];
|
|
222
293
|
(_a = item.list) == null ? void 0 : _a.forEach((v, index) => {
|
|
223
|
-
const _item = type
|
|
294
|
+
const _item = !isOneLine(type) ? item : dataList.find((_v) => _v.key === v.key);
|
|
224
295
|
const points = getPointer(v, scaleValue);
|
|
225
296
|
const otherObj = {};
|
|
226
297
|
otherObj.value = drawValue(points, v, _item);
|
|
@@ -228,7 +299,17 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
228
299
|
drawPulseOther(points, v, _item, otherObj);
|
|
229
300
|
drawPointLine(points, v, index, _item, otherObj);
|
|
230
301
|
});
|
|
231
|
-
type === "pulse"
|
|
302
|
+
if (type === "pulse") {
|
|
303
|
+
SHADOWKEYS.forEach((key) => {
|
|
304
|
+
shadowPointCache.set(
|
|
305
|
+
key,
|
|
306
|
+
pointList.filter((point) => {
|
|
307
|
+
var _a2;
|
|
308
|
+
return ((_a2 = point.origin) == null ? void 0 : _a2.key) === key;
|
|
309
|
+
}).map((point) => [point.left, point.top])
|
|
310
|
+
);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
232
313
|
Promise.all(pointList).then((res) => {
|
|
233
314
|
const lineListFilter = lineList.filter((v) => v);
|
|
234
315
|
let prevPoint = null;
|
|
@@ -396,19 +477,10 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
396
477
|
const nextPoint = getPointer(nextV, scaleValue);
|
|
397
478
|
const isNonePain = isNoneValuePain(type, item.list[index].value);
|
|
398
479
|
const isNextNonePain = nextPoint && isNoneValuePain(type, nextV.value);
|
|
399
|
-
if (points && nextPoint && !v.breakpoint && !isNonePain && !isNextNonePain) {
|
|
480
|
+
if (points && nextPoint && !v.breakpoint && !isNonePain && !isNextNonePain && points[0] !== nextPoint[0]) {
|
|
400
481
|
line = drawLine([...points, ...nextPoint], {
|
|
401
482
|
...lineAttr
|
|
402
483
|
});
|
|
403
|
-
} else if (points && !nextPoint && !v.breakpoint) {
|
|
404
|
-
const nextLinePoint = getPointer(nextV, scaleValue);
|
|
405
|
-
line = nextLinePoint ? drawLine([...points, ...nextLinePoint], {
|
|
406
|
-
...lineAttr
|
|
407
|
-
}) : null;
|
|
408
|
-
nextLinePoint && prevLines.add({
|
|
409
|
-
dataIndex,
|
|
410
|
-
line
|
|
411
|
-
});
|
|
412
484
|
}
|
|
413
485
|
const currentPointType = v.pacemakerShow && type == "pulse" ? pacemaker.value : isNonePain ? 0 : pointType;
|
|
414
486
|
const previousLine = lineList[index - 1];
|
|
@@ -627,14 +699,13 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
627
699
|
function redrawPoints() {
|
|
628
700
|
var _a;
|
|
629
701
|
gridPoints.size && ((_a = canvas.value) == null ? void 0 : _a.remove(...getRemovePoints([...gridPoints])));
|
|
630
|
-
shadowPointCache
|
|
702
|
+
shadowPointCache.clear();
|
|
631
703
|
gridPoints.clear();
|
|
632
704
|
maiboPoints.clear();
|
|
633
705
|
otherPoints.clear();
|
|
634
|
-
prevLines.clear();
|
|
635
706
|
yScaleValue.forEach((scaleValue) => {
|
|
636
707
|
scaleValue.dataList.forEach((item, dataIndex) => {
|
|
637
|
-
if (scaleValue.type
|
|
708
|
+
if (!isOneLine(scaleValue.type) || item.enable) {
|
|
638
709
|
drawPolyLine(item, dataIndex, scaleValue);
|
|
639
710
|
}
|
|
640
711
|
});
|
|
@@ -114,6 +114,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, cumputedX, c
|
|
|
114
114
|
const residue = (end - start) % column;
|
|
115
115
|
const firstColWidth = colWidth + residue;
|
|
116
116
|
yScaleValueList2.forEach((item, index) => {
|
|
117
|
+
var _a3, _b2;
|
|
117
118
|
if (item.type === "pain") {
|
|
118
119
|
drwaPainScaleValue(item);
|
|
119
120
|
return;
|
|
@@ -138,8 +139,8 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, cumputedX, c
|
|
|
138
139
|
const spaceScale = spaceGridNumber * yCellHeight / 5;
|
|
139
140
|
const position = item.position || "center";
|
|
140
141
|
const { lineXMain, lineXSub, textLeft } = getScaleInfo(item.position, rectLeft, rectWidth);
|
|
141
|
-
const listLen = item.list.length;
|
|
142
|
-
item.list.forEach((v, i) => {
|
|
142
|
+
const listLen = (_a3 = item.list) == null ? void 0 : _a3.length;
|
|
143
|
+
(_b2 = item == null ? void 0 : item.list) == null ? void 0 : _b2.forEach((v, i) => {
|
|
143
144
|
const top = vitalSignsOriginY.endY - i * yCellHeight * spaceGridNumber;
|
|
144
145
|
const isMaxMinNumber = i === 0 || i === listLen - 1;
|
|
145
146
|
if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { IPoint } from '../interface';
|
|
2
2
|
import { AnyObject } from '../../../../../es/shared/types';
|
|
3
3
|
export declare function isEffectiveNode(node: IPoint): string | number | boolean;
|
|
4
|
-
/**
|
|
5
|
-
* @description: 根据断点分割数组
|
|
6
|
-
* @param {any} arr
|
|
7
|
-
* @return {[number, number][][]}
|
|
8
|
-
*/
|
|
9
|
-
export declare function getPointArr(arr: AnyObject[]): AnyObject;
|
|
10
4
|
export declare function deleteProperty(data: AnyObject, list: AnyObject[]): void;
|
|
11
5
|
export declare function getIndex(time: string, list: AnyObject[]): number;
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
function isEffectiveNode(node) {
|
|
2
2
|
return (node == null ? void 0 : node.time) && ((node == null ? void 0 : node.value) || (node == null ? void 0 : node.value) === 0);
|
|
3
3
|
}
|
|
4
|
-
function getPointArr(arr) {
|
|
5
|
-
let _arr = [];
|
|
6
|
-
return arr.reduce((pre, cur, index) => {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
_arr.push([cur.left, cur.top]);
|
|
9
|
-
if (((_b = (_a = cur.origin) == null ? void 0 : _a.data) == null ? void 0 : _b.breakpoint) || arr.length - 1 === index) {
|
|
10
|
-
pre.push(_arr);
|
|
11
|
-
_arr = [];
|
|
12
|
-
}
|
|
13
|
-
return pre;
|
|
14
|
-
}, []);
|
|
15
|
-
}
|
|
16
4
|
function deleteProperty(data, list) {
|
|
17
5
|
list.map((v) => v.type).forEach((key) => {
|
|
18
6
|
if (Reflect.has(data, key))
|
|
@@ -24,4 +12,4 @@ function getIndex(time, list) {
|
|
|
24
12
|
return !~index ? list.length : index;
|
|
25
13
|
}
|
|
26
14
|
|
|
27
|
-
export { deleteProperty, getIndex,
|
|
15
|
+
export { deleteProperty, getIndex, isEffectiveNode };
|
|
@@ -34,6 +34,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
34
34
|
type: string;
|
|
35
35
|
name: string;
|
|
36
36
|
show?: boolean | undefined;
|
|
37
|
+
options?: {
|
|
38
|
+
value: string;
|
|
39
|
+
text: string;
|
|
40
|
+
}[] | undefined;
|
|
37
41
|
defaultValue?: any;
|
|
38
42
|
defaultExpand?: boolean | undefined;
|
|
39
43
|
fold?: boolean | undefined;
|
|
@@ -51,6 +55,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
51
55
|
type: string;
|
|
52
56
|
name: string;
|
|
53
57
|
show?: boolean | undefined;
|
|
58
|
+
options?: {
|
|
59
|
+
value: string;
|
|
60
|
+
text: string;
|
|
61
|
+
}[] | undefined;
|
|
54
62
|
defaultValue?: any;
|
|
55
63
|
defaultExpand?: boolean | undefined;
|
|
56
64
|
fold?: boolean | undefined;
|
|
@@ -2598,6 +2606,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2598
2606
|
type?: string | undefined;
|
|
2599
2607
|
name?: string | undefined;
|
|
2600
2608
|
show?: boolean | undefined;
|
|
2609
|
+
options?: {
|
|
2610
|
+
value: string;
|
|
2611
|
+
text: string;
|
|
2612
|
+
}[] | undefined;
|
|
2601
2613
|
defaultValue?: any;
|
|
2602
2614
|
defaultExpand?: boolean | undefined;
|
|
2603
2615
|
fold?: boolean | undefined;
|
|
@@ -2612,6 +2624,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2612
2624
|
type: string;
|
|
2613
2625
|
name: string;
|
|
2614
2626
|
show?: boolean | undefined;
|
|
2627
|
+
options?: {
|
|
2628
|
+
value: string;
|
|
2629
|
+
text: string;
|
|
2630
|
+
}[] | undefined;
|
|
2615
2631
|
defaultValue?: any;
|
|
2616
2632
|
defaultExpand?: boolean | undefined;
|
|
2617
2633
|
fold?: boolean | undefined;
|
|
@@ -35,6 +35,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
type: string;
|
|
36
36
|
name: string;
|
|
37
37
|
show?: boolean | undefined;
|
|
38
|
+
options?: {
|
|
39
|
+
value: string;
|
|
40
|
+
text: string;
|
|
41
|
+
}[] | undefined;
|
|
38
42
|
defaultValue?: any;
|
|
39
43
|
defaultExpand?: boolean | undefined;
|
|
40
44
|
fold?: boolean | undefined;
|
|
@@ -52,6 +56,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
56
|
type: string;
|
|
53
57
|
name: string;
|
|
54
58
|
show?: boolean | undefined;
|
|
59
|
+
options?: {
|
|
60
|
+
value: string;
|
|
61
|
+
text: string;
|
|
62
|
+
}[] | undefined;
|
|
55
63
|
defaultValue?: any;
|
|
56
64
|
defaultExpand?: boolean | undefined;
|
|
57
65
|
fold?: boolean | undefined;
|
|
@@ -2599,6 +2607,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2599
2607
|
type?: string | undefined;
|
|
2600
2608
|
name?: string | undefined;
|
|
2601
2609
|
show?: boolean | undefined;
|
|
2610
|
+
options?: {
|
|
2611
|
+
value: string;
|
|
2612
|
+
text: string;
|
|
2613
|
+
}[] | undefined;
|
|
2602
2614
|
defaultValue?: any;
|
|
2603
2615
|
defaultExpand?: boolean | undefined;
|
|
2604
2616
|
fold?: boolean | undefined;
|
|
@@ -2613,6 +2625,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2613
2625
|
type: string;
|
|
2614
2626
|
name: string;
|
|
2615
2627
|
show?: boolean | undefined;
|
|
2628
|
+
options?: {
|
|
2629
|
+
value: string;
|
|
2630
|
+
text: string;
|
|
2631
|
+
}[] | undefined;
|
|
2616
2632
|
defaultValue?: any;
|
|
2617
2633
|
defaultExpand?: boolean | undefined;
|
|
2618
2634
|
fold?: boolean | undefined;
|
|
@@ -2,6 +2,7 @@ import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, cr
|
|
|
2
2
|
import draggableComponent from '../../../../shared/components/VueDraggable/src/vuedraggable.js';
|
|
3
3
|
import { usePresetRenderer } from '../hooks/usePresetRenderer.js';
|
|
4
4
|
import { useSortableConfig } from '../hooks/useSortalbeConfig.js';
|
|
5
|
+
import 'lodash-es';
|
|
5
6
|
import { layoutWidthEnum2Column } from '../utils/index.js';
|
|
6
7
|
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
8
|
|
|
@@ -1690,6 +1690,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1690
1690
|
type?: string | undefined;
|
|
1691
1691
|
name?: string | undefined;
|
|
1692
1692
|
show?: boolean | undefined;
|
|
1693
|
+
options?: {
|
|
1694
|
+
value: string;
|
|
1695
|
+
text: string;
|
|
1696
|
+
}[] | undefined;
|
|
1693
1697
|
defaultValue?: any;
|
|
1694
1698
|
defaultExpand?: boolean | undefined;
|
|
1695
1699
|
fold?: boolean | undefined;
|
|
@@ -1704,6 +1708,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1704
1708
|
type: string;
|
|
1705
1709
|
name: string;
|
|
1706
1710
|
show?: boolean | undefined;
|
|
1711
|
+
options?: {
|
|
1712
|
+
value: string;
|
|
1713
|
+
text: string;
|
|
1714
|
+
}[] | undefined;
|
|
1707
1715
|
defaultValue?: any;
|
|
1708
1716
|
defaultExpand?: boolean | undefined;
|
|
1709
1717
|
fold?: boolean | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isArray } from 'lodash-es';
|
|
1
2
|
import { EditAbleField, widgetWidthOptionConfig, isShowOptionConfig, isNotFoldOptionConfig, isEditOptionConfig, isNullOptionConfig } from '../constants/index.js';
|
|
2
3
|
|
|
3
4
|
function useConfigurationField() {
|
|
@@ -6,7 +7,12 @@ function useConfigurationField() {
|
|
|
6
7
|
[EditAbleField.NOTES, () => ({ alias: "\u95EE\u53F7\u63D0\u793A", elem_width: 6, html_type: "INPUT" })],
|
|
7
8
|
[
|
|
8
9
|
EditAbleField.DEFAULT_VALUE,
|
|
9
|
-
() =>
|
|
10
|
+
(fieldItem) => {
|
|
11
|
+
if (isArray(fieldItem == null ? void 0 : fieldItem.options) && fieldItem.options.length) {
|
|
12
|
+
return { alias: "\u9ED8\u8BA4\u503C", elem_width: 6, html_type: "SELECT", option: fieldItem == null ? void 0 : fieldItem.options };
|
|
13
|
+
}
|
|
14
|
+
return { alias: "\u9ED8\u8BA4\u503C", elem_width: 6, html_type: "INPUT", validate: { max_length: 20 } };
|
|
15
|
+
}
|
|
10
16
|
],
|
|
11
17
|
[
|
|
12
18
|
EditAbleField.LAYOUT_WIDTH_ENUM,
|
package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js
CHANGED
|
@@ -15,14 +15,14 @@ function useDeepValidate() {
|
|
|
15
15
|
field.value.validator = [
|
|
16
16
|
{
|
|
17
17
|
async validator() {
|
|
18
|
-
return Promise.allSettled(
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
);
|
|
18
|
+
return Promise.allSettled(
|
|
19
|
+
formRenderRefs.value.filter((formRenderRef) => formRenderRef).map((formRenderRef) => formRenderRef.validate())
|
|
20
|
+
).then((resultList) => {
|
|
21
|
+
const rejected = resultList.filter((res) => res.status === "rejected");
|
|
22
|
+
if (!rejected.length)
|
|
23
|
+
return "";
|
|
24
|
+
return flatten(rejected.map((res) => res.reason));
|
|
25
|
+
});
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
...tempValidator ? arrayed(tempValidator) : []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.34-beta.
|
|
3
|
+
"version": "3.1.34-beta.16",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b4bd6163c854b00c2401f51ab21e90121abafcb3"
|
|
65
65
|
}
|