cnhis-design-vue 3.4.0-beta.55 → 3.4.0-beta.58
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/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +69 -117
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +75 -117
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +65 -113
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +152 -208
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +3 -3
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +194 -272
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +8 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/useData.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +3 -2
- package/es/shared/utils/business.js +16 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive,
|
|
1
|
+
import { reactive, watch, toRefs } from 'vue';
|
|
2
2
|
import { defaultBorderStyle } from '../useDraw.js';
|
|
3
3
|
import '../../../../../shared/utils/fabricjs/index.js';
|
|
4
4
|
import { useCumputedPoint } from '../useCumputedPoint.js';
|
|
@@ -28,284 +28,206 @@ function useTemperatureChart(canvas, props, emits, canvasRef, pointTipProps, poi
|
|
|
28
28
|
redrawPoints: null,
|
|
29
29
|
clickMenu: null
|
|
30
30
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const { width, right = null, top } = props.data;
|
|
98
|
-
if (!right)
|
|
99
|
-
return width;
|
|
100
|
-
const endWidth = (_a = right.width) != null ? _a : 0;
|
|
101
|
-
return width - endWidth;
|
|
102
|
-
});
|
|
103
|
-
const endXLimit = computed(() => {
|
|
104
|
-
return endX.value - surplusCell.value[1] * xCellWidth.value;
|
|
105
|
-
});
|
|
106
|
-
const originX = computed(() => {
|
|
107
|
-
const { top, left } = props.data;
|
|
108
|
-
const originX2 = top.titleWidth + iconsWidth.value;
|
|
109
|
-
return originX2;
|
|
110
|
-
});
|
|
111
|
-
const endY = computed(() => {
|
|
112
|
-
const { bottom = null, height } = props.data;
|
|
113
|
-
if (!bottom)
|
|
114
|
-
return height;
|
|
115
|
-
const endHeight = bottom.height || 30;
|
|
116
|
-
return height - endHeight;
|
|
117
|
-
});
|
|
118
|
-
const originY = computed(() => {
|
|
119
|
-
var _a;
|
|
120
|
-
const { top } = props.data;
|
|
121
|
-
const dayHeight = top.xScalevalue.show && ((_a = top.dayHeight) != null ? _a : 0) || 0;
|
|
122
|
-
const xScaleHeight = top.xScalevalue.show && (top.xScalevalue.height || defaultHeight) || 0;
|
|
123
|
-
const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value + childbirthDaysHeight.value;
|
|
124
|
-
return topHeight;
|
|
125
|
-
});
|
|
126
|
-
const xCellWidth = computed(() => {
|
|
127
|
-
return (endX.value - originX.value) / gridXNumber.value;
|
|
128
|
-
});
|
|
129
|
-
const yCellHeight = computed(() => {
|
|
130
|
-
return (endY.value - originY.value) / gridYNumber.value;
|
|
131
|
-
});
|
|
132
|
-
const iconsWidth = computed(() => {
|
|
133
|
-
var _a, _b;
|
|
134
|
-
const { left } = props.data;
|
|
135
|
-
return ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
|
|
136
|
-
});
|
|
137
|
-
const xScaleList = computed(() => {
|
|
138
|
-
var _a, _b;
|
|
139
|
-
const { top, grid } = props.data;
|
|
140
|
-
const dateList = ((_b = (_a = top.date.list) == null ? void 0 : _a.slice) == null ? void 0 : _b.call(_a, 0, grid.mainXCell)) || [];
|
|
141
|
-
const times = top.xScalevalue.times;
|
|
142
|
-
let left = originX.value - xCellWidth.value;
|
|
143
|
-
const startDate = top.date.startDate || format(new Date(), "yyyy-MM-dd");
|
|
144
|
-
const newDateList = dateList.reduce(
|
|
145
|
-
(arr, item, index) => index === 0 ? arr.concat(startDate) : arr.concat(format(addDays(new Date(startDate.replace(/-/g, "/")), index), "yyyy-MM-dd")),
|
|
146
|
-
[]
|
|
147
|
-
);
|
|
148
|
-
const timeList = newDateList.map((item) => {
|
|
149
|
-
return times.map((v) => {
|
|
150
|
-
left += xCellWidth.value;
|
|
151
|
-
const start = Date.parse(`${item} ${v.start}`);
|
|
152
|
-
const end = Date.parse(`${item} ${v.end}`);
|
|
153
|
-
return {
|
|
154
|
-
start,
|
|
155
|
-
end,
|
|
156
|
-
left,
|
|
157
|
-
center: left + xCellWidth.value / 2,
|
|
158
|
-
scaleCell: (end - start) / xCellWidth.value
|
|
159
|
-
};
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
return flatten(timeList);
|
|
163
|
-
});
|
|
164
|
-
const event = computed(() => {
|
|
165
|
-
var _a;
|
|
166
|
-
return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
|
|
167
|
-
});
|
|
168
|
-
const itemList = computed(() => {
|
|
169
|
-
const { left } = props.data;
|
|
170
|
-
return flatten(
|
|
171
|
-
left.yScaleValue.filter((v) => v.show).map((item) => {
|
|
172
|
-
return item.dataList.filter((v) => v.show).map((v, dataIndex) => {
|
|
31
|
+
function buildDerived() {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
33
|
+
const { grid, top, left, right, bottom } = props.data;
|
|
34
|
+
const iconsWidth = ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
|
|
35
|
+
const dateHeight = top.date.show && (top.date.height || defaultHeight) || 0;
|
|
36
|
+
const hospitalDaysHeight = ((_c = top.hospitalDays) == null ? void 0 : _c.show) && (top.hospitalDays.height || defaultHeight) || 0;
|
|
37
|
+
const operationDaysHeight = ((_d = top.operationDays) == null ? void 0 : _d.show) && (top.operationDays.height || defaultHeight) || 0;
|
|
38
|
+
const xScaleHeight = ((_e = top.xScalevalue) == null ? void 0 : _e.show) && (top.xScalevalue.height || defaultHeight) || 0;
|
|
39
|
+
const dayHeight = ((_f = top.xScalevalue) == null ? void 0 : _f.show) ? (_g = top.dayHeight) != null ? _g : 0 : 0;
|
|
40
|
+
const xScalevalueHeight = xScaleHeight + dayHeight;
|
|
41
|
+
const childbirthDaysHeight = ((_h = top.childbirthDays) == null ? void 0 : _h.show) && (top.childbirthDays.height || defaultHeight) || 0;
|
|
42
|
+
const breathingHeight = ((_i = bottom == null ? void 0 : bottom.breathing) == null ? void 0 : _i.show) && (bottom.breathing.height || defaultHeight * 2) || 0;
|
|
43
|
+
const painIndex = (() => {
|
|
44
|
+
const index = left.yScaleValue.findIndex((v) => v.type === "pain");
|
|
45
|
+
return index > -1 && left.yScaleValue[index].show ? index : -1;
|
|
46
|
+
})();
|
|
47
|
+
const painSurplusCell = (() => {
|
|
48
|
+
const { painSurplusCell: painSurplusCell2 = [0, 0] } = grid || {};
|
|
49
|
+
if (!~painIndex)
|
|
50
|
+
return [0, 0];
|
|
51
|
+
return painSurplusCell2;
|
|
52
|
+
})();
|
|
53
|
+
const surplusCell = (() => {
|
|
54
|
+
var _a2;
|
|
55
|
+
const sc = ((_a2 = grid == null ? void 0 : grid.surplusCell) == null ? void 0 : _a2.slice()) || [0, 0, 0, 0];
|
|
56
|
+
if (painIndex === 0) {
|
|
57
|
+
sc[0] = sc[0] + painSurplusCell[1];
|
|
58
|
+
} else if (painIndex > 0) {
|
|
59
|
+
sc[2] = sc[2] + painSurplusCell[0];
|
|
60
|
+
}
|
|
61
|
+
return sc;
|
|
62
|
+
})();
|
|
63
|
+
const mainSurplusCell = (() => {
|
|
64
|
+
if (painIndex === 0) {
|
|
65
|
+
return [painSurplusCell[0], surplusCell[1], surplusCell[2], surplusCell[3]];
|
|
66
|
+
} else if (painIndex > 0) {
|
|
67
|
+
return [surplusCell[0], surplusCell[1], painSurplusCell[1], surplusCell[3]];
|
|
68
|
+
}
|
|
69
|
+
return surplusCell;
|
|
70
|
+
})();
|
|
71
|
+
const originX = top.titleWidth + iconsWidth;
|
|
72
|
+
const endX = !right ? props.data.width : props.data.width - ((_j = right.width) != null ? _j : 0);
|
|
73
|
+
const endXLimit = endX - surplusCell[1] * ((endX - originX) / (grid.mainXCell * grid.subXCell + surplusCell[1] + surplusCell[3]));
|
|
74
|
+
const endY = !bottom ? props.data.height : props.data.height - (bottom.height || 30);
|
|
75
|
+
const originY = dateHeight + dayHeight + xScaleHeight + hospitalDaysHeight + operationDaysHeight + childbirthDaysHeight;
|
|
76
|
+
const gridXNumber = grid.mainXCell * grid.subXCell + surplusCell[1] + surplusCell[3];
|
|
77
|
+
const { mainYCell, subYCell, painSubYCell = 5 } = grid;
|
|
78
|
+
const painSurplusCellNumber = painIndex > 0 ? painSurplusCell[1] : painSurplusCell[0];
|
|
79
|
+
const gridYNumber = (mainYCell - 1) * subYCell + painSubYCell + surplusCell[0] + surplusCell[2] + painSurplusCellNumber;
|
|
80
|
+
const xCellWidth = (endX - originX) / gridXNumber;
|
|
81
|
+
const yCellHeight = (endY - originY) / gridYNumber;
|
|
82
|
+
const xScaleList = (() => {
|
|
83
|
+
var _a2, _b2;
|
|
84
|
+
const dateList = ((_b2 = (_a2 = top.date.list) == null ? void 0 : _a2.slice) == null ? void 0 : _b2.call(_a2, 0, grid.mainXCell)) || [];
|
|
85
|
+
const times = top.xScalevalue.times;
|
|
86
|
+
let leftPos = originX - xCellWidth;
|
|
87
|
+
const startDate = top.date.startDate || format(new Date(), "yyyy-MM-dd");
|
|
88
|
+
const newDateList = dateList.reduce(
|
|
89
|
+
(arr, _item, index) => index === 0 ? arr.concat(startDate) : arr.concat(format(addDays(new Date(startDate.replace(/-/g, "/")), index), "yyyy-MM-dd")),
|
|
90
|
+
[]
|
|
91
|
+
);
|
|
92
|
+
const timeList = newDateList.map((item) => {
|
|
93
|
+
return times.map((v) => {
|
|
94
|
+
leftPos += xCellWidth;
|
|
95
|
+
const start = Date.parse(`${item} ${v.start}`);
|
|
96
|
+
const end = Date.parse(`${item} ${v.end}`);
|
|
173
97
|
return {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
98
|
+
start,
|
|
99
|
+
end,
|
|
100
|
+
left: leftPos,
|
|
101
|
+
center: leftPos + xCellWidth / 2,
|
|
102
|
+
scaleCell: (end - start) / xCellWidth
|
|
179
103
|
};
|
|
180
104
|
});
|
|
181
|
-
})
|
|
105
|
+
});
|
|
106
|
+
return flatten(timeList);
|
|
107
|
+
})();
|
|
108
|
+
const event = ((_k = props.data.grid) == null ? void 0 : _k.event) || { selectable: true, evented: true, hovered: true };
|
|
109
|
+
const itemList = flatten(
|
|
110
|
+
left.yScaleValue.filter((v) => v.show).map(
|
|
111
|
+
(item) => item.dataList.filter((v) => v.show).map((v, dataIndex) => ({
|
|
112
|
+
...v,
|
|
113
|
+
bigType: setOtherType(v.key, item.type),
|
|
114
|
+
unit: item.unit,
|
|
115
|
+
dataIndex,
|
|
116
|
+
isOneLine: isOneLine(item)
|
|
117
|
+
}))
|
|
118
|
+
)
|
|
182
119
|
);
|
|
183
|
-
});
|
|
184
|
-
const painScalePositionSurplusHeight = computed(() => {
|
|
185
|
-
const { left } = props.data;
|
|
186
120
|
const painItem = left.yScaleValue.find((v) => v.type === "pain");
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
121
|
+
const painScalePositionSurplusHeight = (() => {
|
|
122
|
+
if (!painItem)
|
|
123
|
+
return 0;
|
|
124
|
+
const { numberVerticalPosition = "bottom", spaceGridNumber = 1 } = painItem;
|
|
125
|
+
return numberVerticalPosition === "center" ? yCellHeight * spaceGridNumber / 2 : 0;
|
|
126
|
+
})();
|
|
127
|
+
const painHeight = painIndex === -1 ? 0 : yCellHeight * ((_l = grid.painSubYCell) != null ? _l : 5);
|
|
128
|
+
const painBorderColor = (painItem || {}).borderColor;
|
|
129
|
+
const painOriginY = (() => {
|
|
130
|
+
const obj = {
|
|
131
|
+
originY: originY + painSurplusCell[0] * yCellHeight,
|
|
132
|
+
endY: endY - painSurplusCell[1] * yCellHeight - painScalePositionSurplusHeight
|
|
133
|
+
};
|
|
134
|
+
if (painIndex === 0 && left.yScaleValue.length > 1) {
|
|
135
|
+
obj.endY = obj.originY + painHeight - painScalePositionSurplusHeight;
|
|
136
|
+
} else if (painIndex === left.yScaleValue.length - 1) {
|
|
137
|
+
obj.originY = obj.endY - painHeight + painScalePositionSurplusHeight;
|
|
138
|
+
}
|
|
139
|
+
return obj;
|
|
140
|
+
})();
|
|
141
|
+
const vitalSignsOriginY = (() => {
|
|
142
|
+
const obj = {
|
|
143
|
+
originY: originY + surplusCell[0] * yCellHeight,
|
|
144
|
+
endY: endY - surplusCell[2] * yCellHeight
|
|
145
|
+
};
|
|
146
|
+
if (painIndex === 0 && left.yScaleValue.length > 1) {
|
|
147
|
+
obj.originY = painOriginY.endY + painScalePositionSurplusHeight + surplusCell[0] * yCellHeight;
|
|
148
|
+
} else if (painIndex === left.yScaleValue.length - 1) {
|
|
149
|
+
obj.endY = painOriginY.originY - surplusCell[2] * yCellHeight;
|
|
150
|
+
}
|
|
151
|
+
return obj;
|
|
152
|
+
})();
|
|
153
|
+
const topList = (() => {
|
|
154
|
+
var _a2, _b2;
|
|
155
|
+
const list = [];
|
|
156
|
+
for (const i in top) {
|
|
157
|
+
if (top[i].show) {
|
|
158
|
+
list.push({
|
|
159
|
+
...top[i],
|
|
160
|
+
list: ((_b2 = (_a2 = top[i].list) == null ? void 0 : _a2.slice) == null ? void 0 : _b2.call(_a2, 0, grid.mainXCell)) || [],
|
|
161
|
+
key: i
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return list.sort((a, b) => a.seq - b.seq);
|
|
166
|
+
})();
|
|
167
|
+
const getRightInfo = (() => {
|
|
168
|
+
var _a2;
|
|
169
|
+
const temperatureObj = left.yScaleValue.find((v) => v.type === "temperature");
|
|
170
|
+
const yScaleValue = (right == null ? void 0 : right.yScaleValue) ? { ...right.yScaleValue } : {};
|
|
171
|
+
if ((_a2 = temperatureObj == null ? void 0 : temperatureObj.list) == null ? void 0 : _a2.length) {
|
|
172
|
+
const detailedList = (yScaleValue == null ? void 0 : yScaleValue.showdetailedScale) ? temperatureObj.list.reduce((res) => {
|
|
173
|
+
const lastItem = res[res.length - 1];
|
|
174
|
+
return lastItem ? res.concat([lastItem + 1, lastItem + 2]) : res.concat([92]);
|
|
175
|
+
}, []) : [];
|
|
176
|
+
const list = temperatureObj.list.map((v) => getFloorNumber(1.8 * v + 32));
|
|
177
|
+
Object.assign(yScaleValue, {
|
|
178
|
+
list,
|
|
179
|
+
detailedList,
|
|
180
|
+
spaceGridNumber: temperatureObj.spaceGridNumber
|
|
241
181
|
});
|
|
242
182
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
originX: originX.value,
|
|
292
|
-
originY: originY.value,
|
|
293
|
-
endX: endX.value,
|
|
294
|
-
endXLimit: endXLimit.value,
|
|
295
|
-
endY: endY.value,
|
|
296
|
-
xCellWidth: xCellWidth.value,
|
|
297
|
-
yCellHeight: yCellHeight.value,
|
|
298
|
-
xScaleList: xScaleList.value,
|
|
299
|
-
event: event.value,
|
|
300
|
-
itemList: itemList.value,
|
|
301
|
-
getRightInfo: getRightInfo.value,
|
|
302
|
-
config: props.data.config || {},
|
|
303
|
-
surplusCell: surplusCell.value,
|
|
304
|
-
painSurplusCell: painSurplusCell.value,
|
|
305
|
-
mainSurplusCell: mainSurplusCell.value,
|
|
306
|
-
painScalePositionSurplusHeight: painScalePositionSurplusHeight.value,
|
|
307
|
-
painBorderColor: painBorderColor.value
|
|
308
|
-
});
|
|
183
|
+
return yScaleValue;
|
|
184
|
+
})();
|
|
185
|
+
return {
|
|
186
|
+
canvasWidth: props.data.width,
|
|
187
|
+
canvasHeight: props.data.height,
|
|
188
|
+
borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
|
|
189
|
+
selectionStyle: props.data.selectionStyle || {},
|
|
190
|
+
dateHeight,
|
|
191
|
+
hospitalDaysHeight,
|
|
192
|
+
operationDaysHeight,
|
|
193
|
+
xScalevalueHeight,
|
|
194
|
+
childbirthDaysHeight,
|
|
195
|
+
topList,
|
|
196
|
+
breathingHeight,
|
|
197
|
+
hospitalizationDate: props.data.hospitalizationDate,
|
|
198
|
+
grid: props.data.grid,
|
|
199
|
+
top: props.data.top,
|
|
200
|
+
left: props.data.left,
|
|
201
|
+
right: props.data.right,
|
|
202
|
+
bottom: props.data.bottom,
|
|
203
|
+
other: props.data.other,
|
|
204
|
+
painIndex,
|
|
205
|
+
painHeight,
|
|
206
|
+
painOriginY,
|
|
207
|
+
vitalSignsOriginY,
|
|
208
|
+
gridXNumber,
|
|
209
|
+
gridYNumber,
|
|
210
|
+
iconsWidth,
|
|
211
|
+
originX,
|
|
212
|
+
originY,
|
|
213
|
+
endX,
|
|
214
|
+
endXLimit,
|
|
215
|
+
endY,
|
|
216
|
+
xCellWidth,
|
|
217
|
+
yCellHeight,
|
|
218
|
+
xScaleList,
|
|
219
|
+
event,
|
|
220
|
+
itemList,
|
|
221
|
+
getRightInfo,
|
|
222
|
+
config: props.data.config || {},
|
|
223
|
+
surplusCell,
|
|
224
|
+
painSurplusCell,
|
|
225
|
+
mainSurplusCell,
|
|
226
|
+
painScalePositionSurplusHeight,
|
|
227
|
+
painBorderColor
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
const propItems = reactive(buildDerived());
|
|
309
231
|
const { computedX, computedY, getXValue, getYValue } = useCumputedPoint(propItems);
|
|
310
232
|
watch(
|
|
311
233
|
() => canvas.value,
|
|
@@ -39,6 +39,14 @@ function useNewLowCodeReactions(configListRef, formModel) {
|
|
|
39
39
|
createFieldHandler((state, isPositive) => {
|
|
40
40
|
state.disabled = isPositive;
|
|
41
41
|
})
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
["setValue", "_"],
|
|
45
|
+
createFieldHandler((state, isPositive, { actionConfig: { value } = {} }) => {
|
|
46
|
+
if (!isPositive)
|
|
47
|
+
return;
|
|
48
|
+
state.value = value === null ? "null" : value === void 0 ? "undefined" : value;
|
|
49
|
+
})
|
|
42
50
|
]
|
|
43
51
|
]);
|
|
44
52
|
const relativeFieldMap = computed(() => {
|
|
@@ -601,7 +601,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
601
601
|
}, {
|
|
602
602
|
default: withCtx(() => [!unref(isAudioOrVideoMessage)(item.content) ? (openBlock(), createElementBlock(Fragment, {
|
|
603
603
|
key: 0
|
|
604
|
-
}, [createCommentVNode(' <n-button\n quaternary\n size="tiny"\n @click="(event: MouseEvent) => handleSelectLabel(event, item.id)"\n >\n <template #icon>\n <n-icon size="17" :component="HappyOutline" />\n </template>\n </n-button> '), createVNode(unref(NButton), {
|
|
604
|
+
}, [createCommentVNode(' <n-button\r\n quaternary\r\n size="tiny"\r\n @click="(event: MouseEvent) => handleSelectLabel(event, item.id)"\r\n >\r\n <template #icon>\r\n <n-icon size="17" :component="HappyOutline" />\r\n </template>\r\n </n-button> '), createVNode(unref(NButton), {
|
|
605
605
|
quaternary: "",
|
|
606
606
|
size: "tiny",
|
|
607
607
|
onClick: () => setReferenceMsg(item)
|
|
@@ -170,7 +170,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
170
170
|
round: "",
|
|
171
171
|
size: 100,
|
|
172
172
|
onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
|
|
173
|
-
}, 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", {
|
|
173
|
+
}, 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", {
|
|
174
174
|
class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
|
|
175
175
|
}, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
|
|
176
176
|
strong: "",
|
|
@@ -247,7 +247,7 @@ function initData(props, emit) {
|
|
|
247
247
|
}
|
|
248
248
|
async function openSession(session) {
|
|
249
249
|
try {
|
|
250
|
-
const item = typeof session === "string" ? state.sessionList.find((_session) => _session.id
|
|
250
|
+
const item = typeof session === "string" ? state.sessionList.find((_session) => session && (_session.id, _session.sessionKey).includes(session)) : session;
|
|
251
251
|
if (!item)
|
|
252
252
|
return;
|
|
253
253
|
if (item.status === STATUS.REMOVED) {
|
package/es/env.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
25
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
25
|
+
|
|
@@ -88,19 +88,20 @@ export declare namespace LowCodeTypes {
|
|
|
88
88
|
__oppositeBindField: reactionConfig;
|
|
89
89
|
__oppositeTargetField: reactionConfig;
|
|
90
90
|
}>;
|
|
91
|
-
type reactionActionType = 'show' | 'hide' | 'required' | 'notRequired' | 'enabled' | 'disabled';
|
|
91
|
+
type reactionActionType = 'show' | 'hide' | 'required' | 'notRequired' | 'enabled' | 'disabled' | 'setValue';
|
|
92
92
|
type reactionAction = {
|
|
93
93
|
action: reactionActionType;
|
|
94
94
|
fields: string[];
|
|
95
95
|
actionConfig?: Partial<{
|
|
96
96
|
restoreDefault: boolean;
|
|
97
97
|
restoreEmpty: boolean;
|
|
98
|
+
value: unknown;
|
|
98
99
|
}>;
|
|
99
100
|
};
|
|
100
101
|
type LowCodeConditions = {
|
|
101
102
|
field: string;
|
|
102
103
|
type: VALUE_RELATION;
|
|
103
|
-
valueType?: 'const' | 'field';
|
|
104
|
+
valueType?: 'const' | 'field' | 'range';
|
|
104
105
|
value?: any;
|
|
105
106
|
};
|
|
106
107
|
type newReactionConfig = {
|