cnhis-design-vue 3.1.13-beta.4 → 3.1.13-beta.7
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/packages/big-table/src/BigTable.vue.d.ts +15 -7
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +30 -19
- package/es/packages/big-table/src/utils.js +2 -1
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.d.ts +5 -0
- package/es/packages/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/packages/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/packages/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +3 -6
- package/es/packages/fabric-chart/src/hooks/useCenter.js +15 -4
- package/es/packages/fabric-chart/src/hooks/useDraw.js +23 -29
- package/es/packages/fabric-chart/src/hooks/useLeft.js +51 -12
- package/es/packages/fabric-chart/src/hooks/useOther.js +3 -2
- package/es/packages/fabric-chart/src/utils/index.d.ts +6823 -2
- package/es/packages/form-render/index.d.ts +5 -0
- package/es/packages/form-render/src/FormRender.vue.d.ts +7 -2
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.js +24 -4
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/packages/form-render/src/types/fieldItem.d.ts +58 -7
- package/es/packages/form-render/src/types/index.d.ts +5 -0
- package/es/packages/form-render/src/utils/index.d.ts +8 -2
- package/es/packages/form-render/src/utils/index.js +29 -2
- package/package.json +153 -153
|
@@ -1080,7 +1080,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1080
1080
|
textColorSuccess: string;
|
|
1081
1081
|
textColorHoverSuccess: string;
|
|
1082
1082
|
textColorPressedSuccess: string;
|
|
1083
|
-
textColorFocusSuccess: string;
|
|
1083
|
+
textColorFocusSuccess: string; /**
|
|
1084
|
+
* 删除选中scan数据
|
|
1085
|
+
*/
|
|
1084
1086
|
textColorDisabledSuccess: string;
|
|
1085
1087
|
textColorTextSuccess: string;
|
|
1086
1088
|
textColorTextHoverSuccess: string;
|
|
@@ -1098,7 +1100,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1098
1100
|
borderFocusSuccess: string;
|
|
1099
1101
|
borderDisabledSuccess: string;
|
|
1100
1102
|
rippleColorSuccess: string;
|
|
1101
|
-
colorWarning: string;
|
|
1103
|
+
colorWarning: string; /**
|
|
1104
|
+
* 判断是否渲染EditForm
|
|
1105
|
+
* @param {*} row
|
|
1106
|
+
* @param {*} column
|
|
1107
|
+
* @returns
|
|
1108
|
+
*/
|
|
1102
1109
|
colorHoverWarning: string;
|
|
1103
1110
|
colorPressedWarning: string;
|
|
1104
1111
|
colorFocusWarning: string;
|
|
@@ -1173,10 +1180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1173
1180
|
}, any>>;
|
|
1174
1181
|
readonly themeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
1175
1182
|
heightTiny: string;
|
|
1176
|
-
heightSmall: string;
|
|
1177
|
-
* 单个form提交失败
|
|
1178
|
-
* @param {*} obj
|
|
1179
|
-
*/
|
|
1183
|
+
heightSmall: string;
|
|
1180
1184
|
heightMedium: string;
|
|
1181
1185
|
heightLarge: string;
|
|
1182
1186
|
borderRadiusTiny: string;
|
|
@@ -1195,6 +1199,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1195
1199
|
colorSecondaryHover: string;
|
|
1196
1200
|
colorSecondaryPressed: string;
|
|
1197
1201
|
colorTertiary: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* 避免每次点击都查询
|
|
1204
|
+
* 初始化查一次 行编辑 表单search用
|
|
1205
|
+
*/
|
|
1198
1206
|
colorTertiaryHover: string;
|
|
1199
1207
|
colorTertiaryPressed: string;
|
|
1200
1208
|
colorQuaternary: string;
|
|
@@ -1297,7 +1305,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1297
1305
|
textColorGhostSuccess: string;
|
|
1298
1306
|
textColorGhostHoverSuccess: string;
|
|
1299
1307
|
textColorGhostPressedSuccess: string;
|
|
1300
|
-
textColorGhostFocusSuccess: string;
|
|
1308
|
+
textColorGhostFocusSuccess: string; /** string */
|
|
1301
1309
|
textColorGhostDisabledSuccess: string;
|
|
1302
1310
|
borderSuccess: string;
|
|
1303
1311
|
borderHoverSuccess: string;
|
|
@@ -423,9 +423,16 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
425
|
const currentColumns = fieldList.map((item, index) => {
|
|
426
|
-
var _a2, _b2, _c, _d;
|
|
427
|
-
let filterField =
|
|
428
|
-
let
|
|
426
|
+
var _a2, _b2, _c, _d, _e;
|
|
427
|
+
let filterField = false;
|
|
428
|
+
let filterItems = [];
|
|
429
|
+
try {
|
|
430
|
+
const fieldSetting = JSON.parse(item.fieldSetting);
|
|
431
|
+
filterField = ((_a2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _a2.type) === "manual" && item.isMerge != 1;
|
|
432
|
+
filterItems = (_c = (_b2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _b2.mappingFiled) == null ? void 0 : _c.map((item2) => item2.value[0]);
|
|
433
|
+
} catch (e) {
|
|
434
|
+
}
|
|
435
|
+
let notParticipatingSort = ((_d = item == null ? void 0 : item.fieldSetting) == null ? void 0 : _d.notParticipatingSort) || "";
|
|
429
436
|
let fixed = isAboutNestTable.value ? "" : item.isFixed ? item.isFixed == 1 ? "left" : "right" : "";
|
|
430
437
|
let sortable = props.isNestTable ? false : !filterField && item.isSort == 1 && notParticipatingSort != 1 && item.isMerge != 1;
|
|
431
438
|
let treeNode = props.isNestTable ? false : state.isTree != 0 ? index === 0 : false;
|
|
@@ -475,7 +482,10 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
475
482
|
editRender: isEdit ? {} : generateEditRender(item)
|
|
476
483
|
});
|
|
477
484
|
if (filterField && !props.isNestTable && !isScanMultiTable2) {
|
|
478
|
-
state.filterFields[item.columnName] = Object.assign({}, vexutils.clone(
|
|
485
|
+
state.filterFields[item.columnName] = Object.assign({}, vexutils.clone({
|
|
486
|
+
...item,
|
|
487
|
+
setting: item.settingObj
|
|
488
|
+
}, true), {
|
|
479
489
|
visible: false,
|
|
480
490
|
left: "initial",
|
|
481
491
|
right: "initial",
|
|
@@ -484,7 +494,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
484
494
|
checkAll: false,
|
|
485
495
|
searchFilterText: "",
|
|
486
496
|
searchFilterCONVERT: [],
|
|
487
|
-
filterSort: ""
|
|
497
|
+
filterSort: "",
|
|
498
|
+
filterItems
|
|
488
499
|
});
|
|
489
500
|
let field = state.filterFields[item.columnName];
|
|
490
501
|
handlerInitSearchItem([field]);
|
|
@@ -495,7 +506,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
495
506
|
if (!isScanMultiTable2) {
|
|
496
507
|
col.slots.footer = "tooltip_footer";
|
|
497
508
|
}
|
|
498
|
-
if (props.showNestTable && state.isTree == 0 && ((
|
|
509
|
+
if (props.showNestTable && state.isTree == 0 && ((_e = props.curNestColumnConfig) == null ? void 0 : _e.isTree) == 0) {
|
|
499
510
|
col.slots.content = "nest_table_content";
|
|
500
511
|
}
|
|
501
512
|
return col;
|
|
@@ -734,7 +745,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
734
745
|
"class": "filter-header-icon vxe-filter--btn vxe-icon--funnel"
|
|
735
746
|
}, null), createVNode("span", {
|
|
736
747
|
"class": "filter-header-text"
|
|
737
|
-
}, [createTextVNode("\u7B5B\u9009")])]), field.
|
|
748
|
+
}, [createTextVNode("\u7B5B\u9009")])]), field.filterItems.length > 5 ? createVNode("div", {
|
|
738
749
|
"class": "checkbox-wrap checkbox-wrap--search"
|
|
739
750
|
}, [createVNode("div", {
|
|
740
751
|
"class": "check-search-wrap"
|
|
@@ -763,10 +774,10 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
763
774
|
}, {
|
|
764
775
|
default: () => [createVNode(NSpace, {
|
|
765
776
|
"item-style": "display: flex;"
|
|
766
|
-
}, _isSlot(_slot = field.
|
|
777
|
+
}, _isSlot(_slot = field.filterItems.map((item2) => {
|
|
767
778
|
return createVNode(NCheckbox, {
|
|
768
779
|
"value": item2.value,
|
|
769
|
-
"label": item2.
|
|
780
|
+
"label": item2.key
|
|
770
781
|
}, null);
|
|
771
782
|
})) ? _slot : {
|
|
772
783
|
default: () => [_slot]
|
|
@@ -777,15 +788,15 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
777
788
|
}, {
|
|
778
789
|
default: () => [createVNode(NSpace, {
|
|
779
790
|
"item-style": "display: flex;"
|
|
780
|
-
}, _isSlot(_slot2 = field.
|
|
791
|
+
}, _isSlot(_slot2 = field.filterItems.filter((item2) => {
|
|
781
792
|
if (!field.searchFilterText)
|
|
782
793
|
return item2;
|
|
783
794
|
let reg = new RegExp(field.searchFilterText);
|
|
784
|
-
return reg.test(item2.
|
|
795
|
+
return reg.test(item2.key);
|
|
785
796
|
}).map((item2) => {
|
|
786
797
|
return createVNode(NCheckbox, {
|
|
787
798
|
"value": item2.value,
|
|
788
|
-
"label": item2.
|
|
799
|
+
"label": item2.key
|
|
789
800
|
}, null);
|
|
790
801
|
})) ? _slot2 : {
|
|
791
802
|
default: () => [_slot2]
|
|
@@ -835,12 +846,12 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
835
846
|
const handleFilterSeach = (val, field) => {
|
|
836
847
|
field.searchFilterText = val;
|
|
837
848
|
if (val === "") {
|
|
838
|
-
field.checkAll = field.CONVERT.length === field.
|
|
839
|
-
field.indeterminate = !!field.CONVERT.length && field.CONVERT.length !== field.
|
|
849
|
+
field.checkAll = field.CONVERT.length === field.filterItems.length;
|
|
850
|
+
field.indeterminate = !!field.CONVERT.length && field.CONVERT.length !== field.filterItems.length;
|
|
840
851
|
return;
|
|
841
852
|
}
|
|
842
|
-
field.searchFilterCONVERT = field.
|
|
843
|
-
return field.searchFilterText === item.
|
|
853
|
+
field.searchFilterCONVERT = field.filterItems.filter((item) => {
|
|
854
|
+
return field.searchFilterText === item.key && field.CONVERT.includes(item.value);
|
|
844
855
|
}).map((item) => item.value);
|
|
845
856
|
_beforeSearchConvert = field.searchFilterCONVERT;
|
|
846
857
|
};
|
|
@@ -849,15 +860,15 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
849
860
|
let checked = val;
|
|
850
861
|
field.indeterminate = false;
|
|
851
862
|
field.checkAll = checked;
|
|
852
|
-
state.filterFields[field.columnName].CONVERT = checked ? field.
|
|
863
|
+
state.filterFields[field.columnName].CONVERT = checked ? field.filterItems.map((item) => {
|
|
853
864
|
return item.value;
|
|
854
865
|
}) : [];
|
|
855
866
|
};
|
|
856
867
|
const handleFilterChange = (value, name, field) => {
|
|
857
868
|
reScrollFilterWrap();
|
|
858
869
|
state.filterFields[name].CONVERT = value;
|
|
859
|
-
field.checkAll = value.length === field.
|
|
860
|
-
field.indeterminate = !!value.length && value.length !== field.
|
|
870
|
+
field.checkAll = value.length === field.filterItems.length;
|
|
871
|
+
field.indeterminate = !!value.length && value.length !== field.filterItems.length;
|
|
861
872
|
};
|
|
862
873
|
const handleFilterSearchChange = (value, columnName, field) => {
|
|
863
874
|
reScrollFilterWrap();
|
|
@@ -207,6 +207,7 @@ const handlerInitSearchItem = (arr) => {
|
|
|
207
207
|
if (!Array.isArray(arr))
|
|
208
208
|
return;
|
|
209
209
|
arr.forEach((el) => {
|
|
210
|
+
var _a;
|
|
210
211
|
if (el.setting) {
|
|
211
212
|
el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
|
|
212
213
|
if (!vexutils.isEmpty(el.setting.wordbook)) {
|
|
@@ -224,7 +225,7 @@ const handlerInitSearchItem = (arr) => {
|
|
|
224
225
|
return;
|
|
225
226
|
}
|
|
226
227
|
}
|
|
227
|
-
if (el.fieldType.includes("DATE")) {
|
|
228
|
+
if ((_a = el.fieldType) == null ? void 0 : _a.includes("DATE")) {
|
|
228
229
|
if (el.settingObj && el.settingObj.attr == "BIRTHDAY") {
|
|
229
230
|
el["con"] = "BIRTHDAY";
|
|
230
231
|
el["showDate"] = false;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -60,7 +60,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
60
60
|
return grid.mainYCell * grid.subYCell;
|
|
61
61
|
});
|
|
62
62
|
const endX = computed(() => {
|
|
63
|
-
const { width, right = null } = props.data;
|
|
63
|
+
const { width, right = null, top } = props.data;
|
|
64
64
|
if (!right)
|
|
65
65
|
return width;
|
|
66
66
|
const endWidth = right.width || 50;
|
|
@@ -69,17 +69,14 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
69
69
|
const originX = computed(() => {
|
|
70
70
|
const { top, left } = props.data;
|
|
71
71
|
const originX2 = top.titleWidth + iconsWidth.value;
|
|
72
|
-
|
|
73
|
-
return originX2 + residue;
|
|
72
|
+
return originX2;
|
|
74
73
|
});
|
|
75
74
|
const endY = computed(() => {
|
|
76
75
|
const { bottom = null, height } = props.data;
|
|
77
76
|
if (!bottom)
|
|
78
77
|
return height;
|
|
79
78
|
const endHeight = bottom.height || 30;
|
|
80
|
-
|
|
81
|
-
const residue = (endY2 - originY.value) % gridYNumber.value;
|
|
82
|
-
return endY2 - residue;
|
|
79
|
+
return height - endHeight;
|
|
83
80
|
});
|
|
84
81
|
const originY = computed(() => {
|
|
85
82
|
const { top } = props.data;
|
|
@@ -45,6 +45,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
45
45
|
});
|
|
46
46
|
function init() {
|
|
47
47
|
drawShaDow();
|
|
48
|
+
maiboPoints.clear();
|
|
49
|
+
otherPoints.clear();
|
|
48
50
|
left.yScaleValue.forEach((scaleValue) => {
|
|
49
51
|
scaleValue.dataList.forEach((item, dataIndex) => {
|
|
50
52
|
drawPolyLine(item, dataIndex, scaleValue);
|
|
@@ -148,6 +150,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
148
150
|
pointMenuProps.point = { x, y };
|
|
149
151
|
pointMenuProps.show = true;
|
|
150
152
|
const { type } = ((_a = event.target) == null ? void 0 : _a.origin) || {};
|
|
153
|
+
console.log(999, type);
|
|
151
154
|
if (event.target && (type === "temperature" || type === "pain")) {
|
|
152
155
|
if (type === "temperature") {
|
|
153
156
|
pointMenuProps.list = [...TEMPERATURE_MENU];
|
|
@@ -200,16 +203,17 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
200
203
|
if (!pulseObj.dataList.some((item) => item.title.includes("\u8109\u640F")))
|
|
201
204
|
return;
|
|
202
205
|
const overlap = left.overlap || {};
|
|
206
|
+
const points = [];
|
|
203
207
|
maiboPoints.size && [...maiboPoints].forEach((item) => {
|
|
204
208
|
[...otherPoints].forEach((obj) => {
|
|
205
209
|
if (obj.origin && item.left === obj.left && item.top === obj.top) {
|
|
206
210
|
const key = obj.origin.key;
|
|
207
211
|
if (key) {
|
|
208
|
-
console.log(333, key);
|
|
209
212
|
const pointer = {
|
|
210
213
|
left: obj.left,
|
|
211
214
|
top: obj.top,
|
|
212
|
-
defaultStyle
|
|
215
|
+
...defaultStyle,
|
|
216
|
+
hoverCursor: "default"
|
|
213
217
|
};
|
|
214
218
|
let type = "koumai";
|
|
215
219
|
if (key === "yemai") {
|
|
@@ -218,14 +222,21 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
218
222
|
if (key === "humai") {
|
|
219
223
|
type = "circle";
|
|
220
224
|
}
|
|
221
|
-
drawPoint(type, {
|
|
225
|
+
points.push(drawPoint(type, {
|
|
222
226
|
...overlap[key] || {},
|
|
223
227
|
...pointer
|
|
224
|
-
});
|
|
228
|
+
}));
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
});
|
|
228
232
|
});
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
canvas.value.add(...points);
|
|
235
|
+
points.forEach((v) => {
|
|
236
|
+
v == null ? void 0 : v.bringToFront();
|
|
237
|
+
});
|
|
238
|
+
canvas.value.renderAll();
|
|
239
|
+
});
|
|
229
240
|
}
|
|
230
241
|
function drawPolyLine(item, dataIndex, scaleValue) {
|
|
231
242
|
const {
|
|
@@ -64,14 +64,13 @@ function drawPoint(type = "circle", style) {
|
|
|
64
64
|
hasBorders: false,
|
|
65
65
|
...style
|
|
66
66
|
};
|
|
67
|
-
const createCircleBorder = (
|
|
67
|
+
const createCircleBorder = () => {
|
|
68
68
|
return new fabric.Circle({
|
|
69
69
|
objectCaching: false,
|
|
70
|
-
strokeWidth: 1,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
fill: "#fff"
|
|
74
|
-
...data
|
|
70
|
+
strokeWidth: style.strokeWidth || 1,
|
|
71
|
+
stroke: style.stroke || "red",
|
|
72
|
+
radius: style.radius || 5,
|
|
73
|
+
fill: "#fff"
|
|
75
74
|
});
|
|
76
75
|
};
|
|
77
76
|
switch (type) {
|
|
@@ -99,41 +98,36 @@ function drawPoint(type = "circle", style) {
|
|
|
99
98
|
});
|
|
100
99
|
}
|
|
101
100
|
case "yemai":
|
|
102
|
-
const createAdd = (
|
|
103
|
-
const width = (
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
return new fabric.Group([line1, line2], {
|
|
115
|
-
scale: 1,
|
|
116
|
-
...data
|
|
117
|
-
});
|
|
101
|
+
const createAdd = () => {
|
|
102
|
+
const width = ((style.radius || 5) + (style.strokeWidth || 1)) * 2;
|
|
103
|
+
const subLineStyle = {
|
|
104
|
+
stroke: style.strokeX || "blue",
|
|
105
|
+
strokeWidth: style.strokeWidthX || 1,
|
|
106
|
+
originX: "center",
|
|
107
|
+
originY: "center"
|
|
108
|
+
};
|
|
109
|
+
const line1 = new fabric.Line([0, width / 2, width, width / 2], subLineStyle);
|
|
110
|
+
const line2 = new fabric.Line([width / 2, 0, width / 2, width], subLineStyle);
|
|
111
|
+
return new fabric.Group([line1, line2]);
|
|
118
112
|
};
|
|
119
|
-
return new fabric.Group([createCircleBorder(
|
|
113
|
+
return new fabric.Group([createCircleBorder(), createAdd()], {
|
|
120
114
|
scale: 1,
|
|
121
|
-
...
|
|
122
|
-
angle: 0
|
|
115
|
+
...newStyle
|
|
123
116
|
});
|
|
124
117
|
case "koumai":
|
|
118
|
+
const left = (style.radius || 5) + (style.strokeWidth || 1);
|
|
125
119
|
const circle = new fabric.Circle({
|
|
126
120
|
objectCaching: false,
|
|
127
121
|
radius: style.radiusCircle || 2,
|
|
128
122
|
fill: style.fillCircle || "#000",
|
|
129
123
|
originX: "center",
|
|
130
124
|
originY: "center",
|
|
131
|
-
left
|
|
132
|
-
top:
|
|
125
|
+
left,
|
|
126
|
+
top: left
|
|
133
127
|
});
|
|
134
|
-
return new fabric.Group([createCircleBorder(
|
|
128
|
+
return new fabric.Group([createCircleBorder(), circle], {
|
|
135
129
|
scale: 1,
|
|
136
|
-
...
|
|
130
|
+
...newStyle
|
|
137
131
|
});
|
|
138
132
|
default:
|
|
139
133
|
style && Reflect.deleteProperty(style, "stroke");
|
|
@@ -63,24 +63,63 @@ ${item.title.slice(-2)}`,
|
|
|
63
63
|
...defaultBorderStyle
|
|
64
64
|
}) : null;
|
|
65
65
|
line && list.push(line);
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
item.
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
const centerX = rectLeft + rectWidth / 2;
|
|
67
|
+
let leftVal = centerX;
|
|
68
|
+
const spaceGridNumber = item.spaceGridNumber || 5;
|
|
69
|
+
if (item.showScale || item.showNumber) {
|
|
70
|
+
const mainScaleWidth = 9;
|
|
71
|
+
const subScaleWidth = 5;
|
|
72
|
+
const spaceScale = spaceGridNumber * yCellHeight / 5;
|
|
73
|
+
const position = item.position || "center";
|
|
74
|
+
let leftX = leftVal;
|
|
75
|
+
let lineXMain = [leftVal - mainScaleWidth / 2, leftVal + mainScaleWidth / 2];
|
|
76
|
+
let lineXSub = [leftVal - subScaleWidth / 2, leftVal + subScaleWidth / 2];
|
|
77
|
+
if (position === "left") {
|
|
78
|
+
leftVal = rectLeft;
|
|
79
|
+
lineXMain = [leftVal, leftVal + mainScaleWidth];
|
|
80
|
+
lineXSub = [leftVal, leftVal + subScaleWidth];
|
|
81
|
+
leftX = lineXMain[1];
|
|
82
|
+
}
|
|
83
|
+
if (position === "right") {
|
|
84
|
+
leftVal = rectLeft + rectWidth;
|
|
85
|
+
lineXMain = [leftVal - mainScaleWidth, leftVal];
|
|
86
|
+
lineXSub = [leftVal - subScaleWidth, leftVal];
|
|
87
|
+
leftX = lineXMain[0];
|
|
88
|
+
}
|
|
89
|
+
item.list.forEach((v, i) => {
|
|
90
|
+
const top = vitalSignsOriginY.endY - i * yCellHeight * spaceGridNumber;
|
|
91
|
+
if (item.showNumber) {
|
|
92
|
+
const text = new fabric.Text(String(v), {
|
|
93
|
+
...defaultTextStyle,
|
|
94
|
+
originX: position,
|
|
95
|
+
left: leftX,
|
|
96
|
+
top: i === 0 ? top - 5 : top,
|
|
97
|
+
...item.style
|
|
98
|
+
});
|
|
99
|
+
list.push(text);
|
|
100
|
+
}
|
|
101
|
+
if (item.showScale && i !== item.list.length - 1) {
|
|
102
|
+
for (let j = 0; j < 5; j++) {
|
|
103
|
+
if (j > 0 || !item.showNumber || position !== "center") {
|
|
104
|
+
const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
|
|
105
|
+
const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
|
|
106
|
+
const y = top - j * spaceScale;
|
|
107
|
+
const line2 = new fabric.Line([x1, y, x2, y], {
|
|
108
|
+
...defaultBorderStyle,
|
|
109
|
+
...item.style
|
|
110
|
+
});
|
|
111
|
+
list.push(line2);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
75
115
|
});
|
|
76
|
-
|
|
77
|
-
});
|
|
116
|
+
}
|
|
78
117
|
let title = item.title || "";
|
|
79
118
|
if (item.unit)
|
|
80
119
|
title += "\n" + item.unit;
|
|
81
120
|
title && list.push(new fabric.Text(String(title), {
|
|
82
121
|
...defaultTextStyle,
|
|
83
|
-
left:
|
|
122
|
+
left: centerX,
|
|
84
123
|
top: vitalSignsOriginY.originY + yCellHeight * spaceGridNumber / 2,
|
|
85
124
|
textAlign: "center",
|
|
86
125
|
...item.style
|
|
@@ -9,13 +9,14 @@ function useOther(canvas, propItems, cumputedX) {
|
|
|
9
9
|
return false;
|
|
10
10
|
const list = [];
|
|
11
11
|
other.list.forEach((v, i) => {
|
|
12
|
+
var _a;
|
|
12
13
|
const text = new fabric.Text(String(v.value.toString().split("").join("\n")), {
|
|
13
14
|
originX: "center",
|
|
14
|
-
top: vitalSignsOriginY.originY,
|
|
15
|
+
top: (((_a = v.style) == null ? void 0 : _a.baseTop) || 0) + vitalSignsOriginY.originY,
|
|
15
16
|
left: cumputedX(v.time),
|
|
16
17
|
textAlign: "center",
|
|
17
18
|
...defaultStyle,
|
|
18
|
-
...
|
|
19
|
+
...v.style || {}
|
|
19
20
|
});
|
|
20
21
|
list.push(text);
|
|
21
22
|
});
|