cnhis-design-vue 3.1.34-beta.1 → 3.1.34-beta.11
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/index.d.ts +1 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -0
- package/es/components/big-table/src/BigTable.vue2.js +17 -5
- package/es/components/big-table/src/components/edit-form/edit-input.js +2 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +26 -1
- package/es/components/big-table/src/hooks/useEvent.js +3 -4
- package/es/components/fabric-chart/index.d.ts +141 -374
- package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +142 -374
- package/es/components/fabric-chart/src/FabricChart.vue.js +52 -22
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +1 -0
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +2 -2
- package/es/components/fabric-chart/src/hooks/useBottom.js +1 -6
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -18
- package/es/components/fabric-chart/src/hooks/useCenter.js +5 -21
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.js +2 -2
- package/es/components/fabric-chart/src/hooks/useGrid.js +2 -7
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +22 -28
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -6
- package/es/components/fabric-chart/src/hooks/useRight.js +13 -18
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +25 -0
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +339 -0
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -6
- package/es/components/iho-table/index.d.ts +6 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -0
- package/es/components/iho-table/src/IhoTable.vue.js +12 -1
- package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +10 -0
- package/es/components/iho-table/src/constants/index.js +14 -7
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +4 -4
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +32 -7
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +12 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +58 -25
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +56 -55
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +13 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +31 -24
- package/es/components/iho-table/src/types/index.d.ts +11 -4
- package/es/components/iho-table/src/utils/index.d.ts +6 -0
- package/es/components/iho-table/src/utils/index.js +16 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/shared/types/index.d.ts +1 -0
- package/package.json +2 -2
- package/es/components/fabric-chart/src/BirthProcessChart.vue.js +0 -172
- package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +0 -214
- package/es/components/fabric-chart/src/TemperatureChart.vue.js +0 -355
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { ref, reactive, computed, onMounted, nextTick } from 'vue';
|
|
2
|
+
import { defaultBorderStyle } from './useDraw.js';
|
|
3
|
+
import { useCumputedPoint } from './useCumputedPoint.js';
|
|
4
|
+
import { useTop } from './useTop.js';
|
|
5
|
+
import { useLeft } from './useLeft.js';
|
|
6
|
+
import { useRight } from './useRight.js';
|
|
7
|
+
import { useCenter } from './useCenter.js';
|
|
8
|
+
import { useBottom } from './useBottom.js';
|
|
9
|
+
import { useOther } from './useOther.js';
|
|
10
|
+
import { useEvent, useCanvasEvent } from './useEvent.js';
|
|
11
|
+
import '../utils/index.js';
|
|
12
|
+
import { useCommon } from './useCommon.js';
|
|
13
|
+
import 'lodash-es';
|
|
14
|
+
|
|
15
|
+
function useTemperatureChart(canvas, props, emits, canvasRef) {
|
|
16
|
+
const defaultHeight = 15;
|
|
17
|
+
const select = ref();
|
|
18
|
+
const redrawPoints = ref();
|
|
19
|
+
const clickMenu = ref();
|
|
20
|
+
const pointTipProps = reactive({
|
|
21
|
+
show: false,
|
|
22
|
+
point: { x: 0, y: 0 },
|
|
23
|
+
list: []
|
|
24
|
+
});
|
|
25
|
+
const pointMenuProps = reactive({
|
|
26
|
+
show: false,
|
|
27
|
+
point: { x: 0, y: 0 },
|
|
28
|
+
list: [],
|
|
29
|
+
target: null
|
|
30
|
+
});
|
|
31
|
+
const dateHeight = computed(() => {
|
|
32
|
+
const { top } = props.data;
|
|
33
|
+
return top.date.show && (top.date.height || defaultHeight) || 0;
|
|
34
|
+
});
|
|
35
|
+
const hospitalDaysHeight = computed(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
const { top } = props.data;
|
|
38
|
+
return ((_a = top.hospitalDays) == null ? void 0 : _a.show) && (top.hospitalDays.height || defaultHeight) || 0;
|
|
39
|
+
});
|
|
40
|
+
const operationDaysHeight = computed(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
const { top } = props.data;
|
|
43
|
+
return ((_a = top.operationDays) == null ? void 0 : _a.show) && (top.operationDays.height || defaultHeight) || 0;
|
|
44
|
+
});
|
|
45
|
+
const xScalevalueHeight = computed(() => {
|
|
46
|
+
var _a, _b, _c;
|
|
47
|
+
const { top } = props.data;
|
|
48
|
+
const height = ((_a = top.xScalevalue) == null ? void 0 : _a.show) && (top.xScalevalue.height || defaultHeight) || 0;
|
|
49
|
+
const dayHeight = ((_b = top.xScalevalue) == null ? void 0 : _b.show) ? (_c = top.dayHeight) != null ? _c : 0 : 0;
|
|
50
|
+
return height + dayHeight;
|
|
51
|
+
});
|
|
52
|
+
const breathingHeight = computed(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
const { bottom } = props.data;
|
|
55
|
+
return ((_a = bottom == null ? void 0 : bottom.breathing) == null ? void 0 : _a.show) && (bottom.breathing.height || defaultHeight * 2) || 0;
|
|
56
|
+
});
|
|
57
|
+
const gridXNumber = computed(() => {
|
|
58
|
+
const { grid } = props.data;
|
|
59
|
+
return grid.mainXCell * grid.subXCell + grid.surplusXCell;
|
|
60
|
+
});
|
|
61
|
+
const gridYNumber = computed(() => {
|
|
62
|
+
const { grid } = props.data;
|
|
63
|
+
return grid.mainYCell * grid.subYCell + grid.surplusYCell;
|
|
64
|
+
});
|
|
65
|
+
const endX = computed(() => {
|
|
66
|
+
var _a;
|
|
67
|
+
const { width, right = null, top } = props.data;
|
|
68
|
+
if (!right)
|
|
69
|
+
return width;
|
|
70
|
+
const endWidth = (_a = right.width) != null ? _a : 0;
|
|
71
|
+
return width - endWidth;
|
|
72
|
+
});
|
|
73
|
+
const endXLimit = computed(() => {
|
|
74
|
+
const { grid } = props.data;
|
|
75
|
+
return endX.value - grid.surplusXCell * xCellWidth.value;
|
|
76
|
+
});
|
|
77
|
+
const originX = computed(() => {
|
|
78
|
+
const { top, left } = props.data;
|
|
79
|
+
const originX2 = top.titleWidth + iconsWidth.value;
|
|
80
|
+
return originX2;
|
|
81
|
+
});
|
|
82
|
+
const endY = computed(() => {
|
|
83
|
+
const { bottom = null, height } = props.data;
|
|
84
|
+
if (!bottom)
|
|
85
|
+
return height;
|
|
86
|
+
const endHeight = bottom.height || 30;
|
|
87
|
+
return height - endHeight;
|
|
88
|
+
});
|
|
89
|
+
const originY = computed(() => {
|
|
90
|
+
var _a;
|
|
91
|
+
const { top } = props.data;
|
|
92
|
+
const dayHeight = top.xScalevalue.show && ((_a = top.dayHeight) != null ? _a : 0) || 0;
|
|
93
|
+
const xScaleHeight = top.xScalevalue.show && (top.xScalevalue.height || defaultHeight) || 0;
|
|
94
|
+
const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value;
|
|
95
|
+
return topHeight;
|
|
96
|
+
});
|
|
97
|
+
const originYLimit = computed(() => {
|
|
98
|
+
const { grid } = props.data;
|
|
99
|
+
return originY.value + grid.surplusYCell * yCellHeight.value;
|
|
100
|
+
});
|
|
101
|
+
const xCellWidth = computed(() => {
|
|
102
|
+
return (endX.value - originX.value) / gridXNumber.value;
|
|
103
|
+
});
|
|
104
|
+
const yCellHeight = computed(() => {
|
|
105
|
+
return (endY.value - originY.value) / gridYNumber.value;
|
|
106
|
+
});
|
|
107
|
+
const iconsWidth = computed(() => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
const { left } = props.data;
|
|
110
|
+
return ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
|
|
111
|
+
});
|
|
112
|
+
const xScaleList = computed(() => {
|
|
113
|
+
const { top } = props.data;
|
|
114
|
+
const dateList = top.date.list;
|
|
115
|
+
const times = top.xScalevalue.times;
|
|
116
|
+
let left = originX.value - xCellWidth.value;
|
|
117
|
+
function getDate(date) {
|
|
118
|
+
const [year = "2022", month = "01", day = "01"] = String(date).match(/\d+/g) || [];
|
|
119
|
+
return `20${year}`.slice(-4) + "-" + `00${month}`.slice(-2) + "-" + `00${day}`.slice(-2);
|
|
120
|
+
}
|
|
121
|
+
const timeList = dateList.map((item) => {
|
|
122
|
+
return times.map((v) => {
|
|
123
|
+
left += xCellWidth.value;
|
|
124
|
+
const start = new Date(`${getDate(item)} ${v.start}`).getTime();
|
|
125
|
+
const end = new Date(`${getDate(item)} ${v.end}`).getTime();
|
|
126
|
+
return {
|
|
127
|
+
start,
|
|
128
|
+
end,
|
|
129
|
+
left,
|
|
130
|
+
center: left + xCellWidth.value / 2,
|
|
131
|
+
scaleCell: (end - start) / xCellWidth.value
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
return timeList.flat();
|
|
136
|
+
});
|
|
137
|
+
const breatheYCell = computed(() => {
|
|
138
|
+
return computedYCell("breathe");
|
|
139
|
+
});
|
|
140
|
+
const pulseYCell = computed(() => {
|
|
141
|
+
return computedYCell("pulse");
|
|
142
|
+
});
|
|
143
|
+
const temperatureYCell = computed(() => {
|
|
144
|
+
return computedYCell("temperature");
|
|
145
|
+
});
|
|
146
|
+
const painYCell = computed(() => {
|
|
147
|
+
return computedYCell("pain");
|
|
148
|
+
});
|
|
149
|
+
const event = computed(() => {
|
|
150
|
+
var _a;
|
|
151
|
+
return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
|
|
152
|
+
});
|
|
153
|
+
const itemList = computed(() => {
|
|
154
|
+
const { left } = props.data;
|
|
155
|
+
return left.yScaleValue.map((item) => {
|
|
156
|
+
return item.dataList.map((v, dataIndex) => {
|
|
157
|
+
return {
|
|
158
|
+
...v,
|
|
159
|
+
bigType: item.type,
|
|
160
|
+
unit: item.unit,
|
|
161
|
+
dataIndex
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}).flat();
|
|
165
|
+
});
|
|
166
|
+
const painIndex = computed(() => {
|
|
167
|
+
const { left } = props.data;
|
|
168
|
+
return left.yScaleValue.findIndex((v) => v.type === "pain");
|
|
169
|
+
});
|
|
170
|
+
const painHeight = computed(() => {
|
|
171
|
+
const { grid } = props.data;
|
|
172
|
+
return painIndex.value === -1 ? 0 : yCellHeight.value * grid.subYCell;
|
|
173
|
+
});
|
|
174
|
+
const painOriginY = computed(() => {
|
|
175
|
+
const { left } = props.data;
|
|
176
|
+
const obj = {
|
|
177
|
+
originY: endY.value,
|
|
178
|
+
endY: endY.value
|
|
179
|
+
};
|
|
180
|
+
if (painIndex.value === 0 && left.yScaleValue.length > 1) {
|
|
181
|
+
obj.originY = originYLimit.value;
|
|
182
|
+
obj.endY = originYLimit.value + painHeight.value;
|
|
183
|
+
} else if (painIndex.value === left.yScaleValue.length - 1) {
|
|
184
|
+
obj.originY = endY.value - painHeight.value;
|
|
185
|
+
obj.endY = endY.value;
|
|
186
|
+
}
|
|
187
|
+
return obj;
|
|
188
|
+
});
|
|
189
|
+
const vitalSignsOriginY = computed(() => {
|
|
190
|
+
const { left } = props.data;
|
|
191
|
+
const obj = {
|
|
192
|
+
originY: originY.value,
|
|
193
|
+
endY: endY.value
|
|
194
|
+
};
|
|
195
|
+
if (painIndex.value === 0 && left.yScaleValue.length > 1) {
|
|
196
|
+
obj.originY = originYLimit.value + painHeight.value;
|
|
197
|
+
obj.endY = endY.value;
|
|
198
|
+
} else if (painIndex.value === left.yScaleValue.length - 1) {
|
|
199
|
+
obj.originY = originYLimit.value;
|
|
200
|
+
obj.endY = endY.value - painHeight.value;
|
|
201
|
+
}
|
|
202
|
+
return obj;
|
|
203
|
+
});
|
|
204
|
+
const topList = computed(() => {
|
|
205
|
+
const { top } = props.data;
|
|
206
|
+
const topList2 = [];
|
|
207
|
+
for (const i in top) {
|
|
208
|
+
if (top[i].show) {
|
|
209
|
+
topList2.push({
|
|
210
|
+
...top[i],
|
|
211
|
+
key: i
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return topList2.sort((a, b) => a.seq - b.seq);
|
|
216
|
+
});
|
|
217
|
+
const getRightInfo = computed(() => {
|
|
218
|
+
var _a;
|
|
219
|
+
const { left, right } = props.data;
|
|
220
|
+
const temperatureObj = left.yScaleValue.find((v) => v.type === "temperature");
|
|
221
|
+
const yScaleValue = (right == null ? void 0 : right.yScaleValue) || {};
|
|
222
|
+
if ((_a = temperatureObj == null ? void 0 : temperatureObj.list) == null ? void 0 : _a.length) {
|
|
223
|
+
Object.assign(yScaleValue, {
|
|
224
|
+
list: temperatureObj.list.map((v) => Math.floor((1.8 * v + 32) * 100) / 100),
|
|
225
|
+
spaceGridNumber: temperatureObj.spaceGridNumber
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
return yScaleValue;
|
|
229
|
+
});
|
|
230
|
+
const propItems = reactive({
|
|
231
|
+
canvasWidth: props.data.width,
|
|
232
|
+
canvasHeight: props.data.height,
|
|
233
|
+
borderStyle: props.data.borderStyle || defaultBorderStyle,
|
|
234
|
+
selectionStyle: props.data.selectionStyle || {},
|
|
235
|
+
dateHeight: dateHeight.value,
|
|
236
|
+
hospitalDaysHeight: hospitalDaysHeight.value,
|
|
237
|
+
operationDaysHeight: operationDaysHeight.value,
|
|
238
|
+
xScalevalueHeight: xScalevalueHeight.value,
|
|
239
|
+
topList: topList.value,
|
|
240
|
+
breathingHeight: breathingHeight.value,
|
|
241
|
+
hospitalizationDate: props.data.hospitalizationDate,
|
|
242
|
+
grid: props.data.grid,
|
|
243
|
+
top: props.data.top,
|
|
244
|
+
left: props.data.left,
|
|
245
|
+
right: props.data.right,
|
|
246
|
+
bottom: props.data.bottom,
|
|
247
|
+
other: props.data.other,
|
|
248
|
+
painIndex: painIndex.value,
|
|
249
|
+
painHeight: painHeight.value,
|
|
250
|
+
painOriginY: painOriginY.value,
|
|
251
|
+
vitalSignsOriginY: vitalSignsOriginY.value,
|
|
252
|
+
gridXNumber: gridXNumber.value,
|
|
253
|
+
gridYNumber: gridYNumber.value,
|
|
254
|
+
iconsWidth: iconsWidth.value,
|
|
255
|
+
originX: originX.value,
|
|
256
|
+
originY: originY.value,
|
|
257
|
+
originYLimit: originYLimit.value,
|
|
258
|
+
endX: endX.value,
|
|
259
|
+
endXLimit: endXLimit.value,
|
|
260
|
+
endY: endY.value,
|
|
261
|
+
xCellWidth: xCellWidth.value,
|
|
262
|
+
yCellHeight: yCellHeight.value,
|
|
263
|
+
xScaleList: xScaleList.value,
|
|
264
|
+
breatheYCell: breatheYCell.value,
|
|
265
|
+
pulseYCell: pulseYCell.value,
|
|
266
|
+
temperatureYCell: temperatureYCell.value,
|
|
267
|
+
painYCell: painYCell.value,
|
|
268
|
+
event: event.value,
|
|
269
|
+
itemList: itemList.value,
|
|
270
|
+
getRightInfo: getRightInfo.value,
|
|
271
|
+
config: props.data.config || {}
|
|
272
|
+
});
|
|
273
|
+
function computedYCell(type) {
|
|
274
|
+
const { yScaleValue } = props.data.left;
|
|
275
|
+
const item = yScaleValue.find((v) => v.type === type);
|
|
276
|
+
const list = (item == null ? void 0 : item.list) || [];
|
|
277
|
+
if (!list.length)
|
|
278
|
+
return 0;
|
|
279
|
+
return yCellHeight.value / ((list[1] - list[0]) / item.spaceGridNumber);
|
|
280
|
+
}
|
|
281
|
+
const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
|
|
282
|
+
const commonFunc = useCommon(canvas);
|
|
283
|
+
onMounted(() => {
|
|
284
|
+
nextTick(() => {
|
|
285
|
+
useTop(canvas, propItems);
|
|
286
|
+
const {
|
|
287
|
+
setPopup,
|
|
288
|
+
isAddPoint,
|
|
289
|
+
updateData,
|
|
290
|
+
redrawPoints: _redrawPoints,
|
|
291
|
+
clickMenu: _clickMenu
|
|
292
|
+
} = useCenter(
|
|
293
|
+
canvas,
|
|
294
|
+
propItems,
|
|
295
|
+
emits,
|
|
296
|
+
cumputedX,
|
|
297
|
+
cumputedY,
|
|
298
|
+
getXValue,
|
|
299
|
+
getYValue,
|
|
300
|
+
props.addRenderItem,
|
|
301
|
+
pointTipProps,
|
|
302
|
+
pointMenuProps,
|
|
303
|
+
commonFunc
|
|
304
|
+
);
|
|
305
|
+
redrawPoints.value = _redrawPoints;
|
|
306
|
+
clickMenu.value = _clickMenu;
|
|
307
|
+
const { drawScaleValue } = useLeft(
|
|
308
|
+
canvas,
|
|
309
|
+
propItems,
|
|
310
|
+
emits,
|
|
311
|
+
setPopup,
|
|
312
|
+
pointTipProps,
|
|
313
|
+
cumputedX,
|
|
314
|
+
cumputedY,
|
|
315
|
+
getXValue,
|
|
316
|
+
getYValue,
|
|
317
|
+
isAddPoint,
|
|
318
|
+
updateData,
|
|
319
|
+
commonFunc
|
|
320
|
+
);
|
|
321
|
+
useRight(canvas, propItems, drawScaleValue);
|
|
322
|
+
useBottom(canvas, propItems);
|
|
323
|
+
useOther(canvas, propItems, cumputedX);
|
|
324
|
+
useEvent(canvasRef.value);
|
|
325
|
+
const { select: _select } = useCanvasEvent(canvas, propItems, emits);
|
|
326
|
+
select.value = _select;
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
return {
|
|
330
|
+
propItems,
|
|
331
|
+
redrawPoints,
|
|
332
|
+
select,
|
|
333
|
+
pointTipProps,
|
|
334
|
+
pointMenuProps,
|
|
335
|
+
clickMenu
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export { useTemperatureChart as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { onMounted, nextTick } from 'vue';
|
|
2
1
|
import { fabric } from '../utils/index.js';
|
|
3
2
|
import { defaultBorderStyle, defaultStyle, drawTextGroup, defaultTextStyle, defaultRectStyle } from './useDraw.js';
|
|
4
3
|
|
|
@@ -149,11 +148,7 @@ function useTop(canvas, propItems) {
|
|
|
149
148
|
list.push(textGroup);
|
|
150
149
|
});
|
|
151
150
|
}
|
|
152
|
-
|
|
153
|
-
nextTick(() => {
|
|
154
|
-
drawTop();
|
|
155
|
-
});
|
|
156
|
-
});
|
|
151
|
+
drawTop();
|
|
157
152
|
}
|
|
158
153
|
|
|
159
154
|
export { useTop };
|
|
@@ -2076,6 +2076,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2076
2076
|
onActiveCellChangeStart?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeStartEventParams) => void) | undefined;
|
|
2077
2077
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
|
2078
2078
|
uuid?: string | undefined;
|
|
2079
|
+
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2080
|
+
isSort?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2081
|
+
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2079
2082
|
showSeq?: boolean | undefined;
|
|
2080
2083
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2081
2084
|
rowGroupSetting?: {
|
|
@@ -4464,6 +4467,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4464
4467
|
} | undefined;
|
|
4465
4468
|
params?: any;
|
|
4466
4469
|
uuid?: string | undefined;
|
|
4470
|
+
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4471
|
+
isSort?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4472
|
+
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4467
4473
|
showSeq?: boolean | undefined;
|
|
4468
4474
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4469
4475
|
rowGroupSetting?: {
|
|
@@ -2,8 +2,8 @@ import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
|
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index.js';
|
|
3
3
|
import script from './src/IhoTable.vue.js';
|
|
4
4
|
import PluginPresets from './src/plugins/index.js';
|
|
5
|
-
import 'vue';
|
|
6
5
|
import 'lodash-es';
|
|
6
|
+
import 'vue';
|
|
7
7
|
import './src/constants/index.js';
|
|
8
8
|
import '../../shared/utils/tapable/SyncHook.js';
|
|
9
9
|
import '../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -2075,6 +2075,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2075
2075
|
onActiveCellChangeStart?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeStartEventParams) => void) | undefined;
|
|
2076
2076
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
|
2077
2077
|
uuid?: string | undefined;
|
|
2078
|
+
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2079
|
+
isSort?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2080
|
+
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2078
2081
|
showSeq?: boolean | undefined;
|
|
2079
2082
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2080
2083
|
rowGroupSetting?: {
|
|
@@ -4463,6 +4466,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4463
4466
|
} | undefined;
|
|
4464
4467
|
params?: any;
|
|
4465
4468
|
uuid?: string | undefined;
|
|
4469
|
+
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4470
|
+
isSort?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4471
|
+
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4466
4472
|
showSeq?: boolean | undefined;
|
|
4467
4473
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4468
4474
|
rowGroupSetting?: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, provide, ref, computed, watch, resolveComponent, openBlock, createElementBlock, unref, createBlock, resolveDynamicComponent, createVNode, mergeProps, createSlots, withCtx, Fragment, renderList, renderSlot } from 'vue';
|
|
2
2
|
import { uuidGenerator } from '../../../shared/utils/index.js';
|
|
3
3
|
import { useDebounceFn } from '@vueuse/core';
|
|
4
|
+
import { promiseTimeout } from '@vueuse/shared';
|
|
4
5
|
import { VxeEventListenerNameList, InjectionIhoTableEmits, InjectionIhoTableUUID, InjectionIhoTableInstance, InjectionIhoTableConfig, InjectionIhoTableFieldList, InjectionIhoTableHandler } from './constants/index.js';
|
|
5
6
|
import { createTableHooks, applyTableConfigHooks, applyTableFieldHooks, createTableEventHandlers, createDomInsertComponent, createDataTransfer } from './hooks/tapHooks/index.js';
|
|
6
7
|
import 'lodash-es';
|
|
@@ -87,7 +88,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
88
|
},
|
|
88
89
|
{ deep: true }
|
|
89
90
|
);
|
|
90
|
-
watch(() => props.tableData,
|
|
91
|
+
watch([() => props.tableData, () => {
|
|
92
|
+
var _a2;
|
|
93
|
+
return (_a2 = props.tableData) == null ? void 0 : _a2.length;
|
|
94
|
+
}], async () => {
|
|
95
|
+
var _a2, _b2;
|
|
96
|
+
if (!((_a2 = configRef.value.treeConfig) == null ? void 0 : _a2.expandAll))
|
|
97
|
+
return;
|
|
98
|
+
await promiseTimeout(11);
|
|
99
|
+
(_b2 = $table.value) == null ? void 0 : _b2.setAllTreeExpand(true);
|
|
100
|
+
});
|
|
101
|
+
watch(() => [...props.tableData], updateTableDataRef);
|
|
91
102
|
_updateConfigRef();
|
|
92
103
|
_updateFieldListRef();
|
|
93
104
|
_updateTableDataRef();
|
|
@@ -27,7 +27,7 @@ const ColumnComponent = defineComponent({
|
|
|
27
27
|
"class": "iho-table__headerWrapper"
|
|
28
28
|
}, [createVNode("section", {
|
|
29
29
|
"style": {
|
|
30
|
-
width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20))
|
|
30
|
+
width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20) - (props.field.sortable ? 24 : 0))
|
|
31
31
|
}
|
|
32
32
|
}, [[...arrayed(customHeader != null ? customHeader : createVNode(NEllipsis, {
|
|
33
33
|
"style": {
|
|
@@ -57,6 +57,16 @@ export declare enum IHO_TABLE_STRING_STATUS {
|
|
|
57
57
|
NEGATIVE = "0",
|
|
58
58
|
POSITIVE = "1"
|
|
59
59
|
}
|
|
60
|
+
export declare enum IHO_TABLE_TREE_TYPE {
|
|
61
|
+
NOT_TREE = 0,
|
|
62
|
+
UNKNOWN = 1,
|
|
63
|
+
UNKNOWN2 = 2,
|
|
64
|
+
TRANSFORM_TREE_TYPE = 3
|
|
65
|
+
}
|
|
66
|
+
export declare enum IHO_TABLE_FIXED_STATUS {
|
|
67
|
+
left = 1,
|
|
68
|
+
right = 2
|
|
69
|
+
}
|
|
60
70
|
export declare const IhoTableCustomEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard"];
|
|
61
71
|
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", ...("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[]];
|
|
62
72
|
export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
|
|
@@ -128,12 +128,19 @@ var IHO_TABLE_STRING_STATUS = /* @__PURE__ */ ((IHO_TABLE_STRING_STATUS2) => {
|
|
|
128
128
|
IHO_TABLE_STRING_STATUS2["POSITIVE"] = "1";
|
|
129
129
|
return IHO_TABLE_STRING_STATUS2;
|
|
130
130
|
})(IHO_TABLE_STRING_STATUS || {});
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
|
|
131
|
+
var IHO_TABLE_TREE_TYPE = /* @__PURE__ */ ((IHO_TABLE_TREE_TYPE2) => {
|
|
132
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["NOT_TREE"] = 0] = "NOT_TREE";
|
|
133
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["UNKNOWN"] = 1] = "UNKNOWN";
|
|
134
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["UNKNOWN2"] = 2] = "UNKNOWN2";
|
|
135
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["TRANSFORM_TREE_TYPE"] = 3] = "TRANSFORM_TREE_TYPE";
|
|
136
|
+
return IHO_TABLE_TREE_TYPE2;
|
|
137
|
+
})(IHO_TABLE_TREE_TYPE || {});
|
|
138
|
+
var IHO_TABLE_FIXED_STATUS = /* @__PURE__ */ ((IHO_TABLE_FIXED_STATUS2) => {
|
|
139
|
+
IHO_TABLE_FIXED_STATUS2[IHO_TABLE_FIXED_STATUS2["left"] = 1] = "left";
|
|
140
|
+
IHO_TABLE_FIXED_STATUS2[IHO_TABLE_FIXED_STATUS2["right"] = 2] = "right";
|
|
141
|
+
return IHO_TABLE_FIXED_STATUS2;
|
|
142
|
+
})(IHO_TABLE_FIXED_STATUS || {});
|
|
143
|
+
const IhoTableCustomEventNameTuple = ["formChange", "settingClick", "formClick", "keyboard"];
|
|
137
144
|
const IhoTableEventNameTuple = [...IhoTableCustomEventNameTuple, ...VxeTableEventNameList];
|
|
138
145
|
const InjectionIhoTableConfig = Symbol("injectionIhoTableConfig");
|
|
139
146
|
const InjectionIhoTableFieldList = Symbol("injectionIhoTableFieldList");
|
|
@@ -145,4 +152,4 @@ const InjectionIhoTableEventListener = Symbol(
|
|
|
145
152
|
"InjectionIhoTableEventListener"
|
|
146
153
|
);
|
|
147
154
|
|
|
148
|
-
export { EDITABLE_WIDGET_TYPE, HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, InjectionIhoTableConfig, InjectionIhoTableEmits, InjectionIhoTableEventListener, InjectionIhoTableFieldList, InjectionIhoTableHandler, InjectionIhoTableInstance, InjectionIhoTableUUID, VxeEventListenerNameList, VxeTableEventNameList, WIDGET_TYPE };
|
|
155
|
+
export { EDITABLE_WIDGET_TYPE, HIGHEST_PRIORITY, IHO_TABLE_FIXED_STATUS, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS, IHO_TABLE_TREE_TYPE, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, InjectionIhoTableConfig, InjectionIhoTableEmits, InjectionIhoTableEventListener, InjectionIhoTableFieldList, InjectionIhoTableHandler, InjectionIhoTableInstance, InjectionIhoTableUUID, VxeEventListenerNameList, VxeTableEventNameList, WIDGET_TYPE };
|
|
@@ -2,8 +2,8 @@ import { AnyObject, Nullable } from '../../../../../../es/shared/types';
|
|
|
2
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { VxeTableInstance } from 'vxe-table';
|
|
5
|
-
import { IhoTableEventListener } from '../../../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks';
|
|
6
5
|
import { IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler, TableHooks } from '../../../../../../es/components/iho-table/src/types';
|
|
6
|
+
import { IhoTableEventListener } from './useEventHooks';
|
|
7
7
|
export declare const createTableHooks: () => Readonly<{
|
|
8
8
|
configHooks: import("../../../../../../es/components/iho-table/src/types").AbstractConfigHooks;
|
|
9
9
|
fieldHooks: import("../../../../../../es/components/iho-table/src/types").AbstractFieldHooks;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { arrayed } from '../../../../../shared/utils/index.js';
|
|
2
|
-
import { unref, defineComponent } from 'vue';
|
|
3
2
|
import { cloneDeep, isArray, isFunction } from 'lodash-es';
|
|
3
|
+
import { unref, defineComponent } from 'vue';
|
|
4
4
|
import { VxeEventListenerNameList } from '../../constants/index.js';
|
|
5
|
+
import { getEventName } from '../../utils/index.js';
|
|
6
|
+
import { useConfigHooks } from './useConfigHooks.js';
|
|
5
7
|
import { useDataHooks } from './useDataHooks.js';
|
|
6
8
|
import { useDomInsertHooks } from './useDomInsertHooks.js';
|
|
7
9
|
import { useEventHooks } from './useEventHooks.js';
|
|
8
10
|
import { useExposeHooks } from './useExposeHooks.js';
|
|
9
|
-
import { useSetupHooks } from './useSetupHooks.js';
|
|
10
|
-
import { getEventName } from '../../utils/index.js';
|
|
11
|
-
import { useConfigHooks } from './useConfigHooks.js';
|
|
12
11
|
import { useFieldHooks } from './useFieldHooks.js';
|
|
12
|
+
import { useSetupHooks } from './useSetupHooks.js';
|
|
13
13
|
|
|
14
14
|
const createTableHooks = (() => {
|
|
15
15
|
let tapHooks = null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { mergeWith } from 'lodash-es';
|
|
2
|
-
import { HIGHEST_PRIORITY } from '../../constants/index.js';
|
|
1
|
+
import { mergeWith, isFunction, isObject } from 'lodash-es';
|
|
2
|
+
import { HIGHEST_PRIORITY, IHO_TABLE_TREE_TYPE } from '../../constants/index.js';
|
|
3
3
|
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
4
|
+
import { IhoTableStatusHelper } from '../../utils/index.js';
|
|
4
5
|
|
|
5
6
|
function defaultConfigPlugin() {
|
|
6
7
|
const pluginName = "defaultTablePlugin";
|
|
@@ -8,26 +9,50 @@ function defaultConfigPlugin() {
|
|
|
8
9
|
name: pluginName,
|
|
9
10
|
apply(hooks) {
|
|
10
11
|
hooks.configHooks.config.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (config) => {
|
|
11
|
-
|
|
12
|
+
const result = mergeWith(
|
|
12
13
|
{
|
|
13
14
|
height: "100%",
|
|
14
15
|
border: true,
|
|
15
16
|
showSeq: true,
|
|
16
|
-
selectType: "checkbox",
|
|
17
17
|
columnConfig: { resizable: true },
|
|
18
18
|
rowConfig: { height: 36, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
|
|
19
|
-
mouseConfig: { selected: true },
|
|
20
19
|
showOverflow: "tooltip",
|
|
21
20
|
editConfig: {
|
|
22
21
|
trigger: "click",
|
|
23
22
|
mode: "cell",
|
|
24
23
|
autoClear: false,
|
|
25
24
|
showIcon: false
|
|
26
|
-
}
|
|
27
|
-
keyboardConfig: { isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true }
|
|
25
|
+
}
|
|
28
26
|
},
|
|
29
27
|
config
|
|
30
28
|
);
|
|
29
|
+
if (IhoTableStatusHelper.isPositive(config.isBatchSelect) || config.selectType) {
|
|
30
|
+
result.selectType = config.selectType || "checkbox";
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
});
|
|
34
|
+
hooks.configHooks.editConfig.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (editConfig = {}, _) => {
|
|
35
|
+
const beforeEditMethod = editConfig.beforeEditMethod;
|
|
36
|
+
editConfig.beforeEditMethod = (payload) => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const checkEditStatus = (_b = (_a = payload.column.editRender) == null ? void 0 : _a.props) == null ? void 0 : _b.checkEditStatus;
|
|
39
|
+
if (isFunction(checkEditStatus))
|
|
40
|
+
return checkEditStatus(payload);
|
|
41
|
+
return isFunction(beforeEditMethod) ? beforeEditMethod(payload) : true;
|
|
42
|
+
};
|
|
43
|
+
return editConfig;
|
|
44
|
+
});
|
|
45
|
+
hooks.configHooks.treeConfig.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (treeConfig, config) => {
|
|
46
|
+
if (config.isTree === IHO_TABLE_TREE_TYPE.TRANSFORM_TREE_TYPE) {
|
|
47
|
+
return Object.assign({ transform: true, expandAll: true, lazy: true, reserve: true }, treeConfig);
|
|
48
|
+
}
|
|
49
|
+
return treeConfig;
|
|
50
|
+
});
|
|
51
|
+
hooks.configHooks.mouseConfig.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (mouseConfig, config) => {
|
|
52
|
+
if (isObject(config.keyboardConfig)) {
|
|
53
|
+
return Object.assign({ selected: !!config.keyboardConfig.isEdit }, mouseConfig);
|
|
54
|
+
}
|
|
55
|
+
return mouseConfig;
|
|
31
56
|
});
|
|
32
57
|
}
|
|
33
58
|
});
|
|
@@ -6,6 +6,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
7
7
|
required: true;
|
|
8
8
|
};
|
|
9
|
+
sortable: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
9
12
|
options: {
|
|
10
13
|
type: PropType<AnyObject[]>;
|
|
11
14
|
default: () => never[];
|
|
@@ -23,6 +26,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
26
|
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
24
27
|
required: true;
|
|
25
28
|
};
|
|
29
|
+
sortable: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
};
|
|
26
32
|
options: {
|
|
27
33
|
type: PropType<AnyObject[]>;
|
|
28
34
|
default: () => never[];
|
|
@@ -62,6 +68,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
68
|
marginTop: string;
|
|
63
69
|
};
|
|
64
70
|
}>;
|
|
71
|
+
indeterminate: import("vue").ComputedRef<boolean>;
|
|
72
|
+
checkAll: import("vue").WritableComputedRef<boolean>;
|
|
65
73
|
containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
66
74
|
confirmFilter: () => void;
|
|
67
75
|
sortStatusList: {
|
|
@@ -134,6 +142,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
134
142
|
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
135
143
|
required: true;
|
|
136
144
|
};
|
|
145
|
+
sortable: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
};
|
|
137
148
|
options: {
|
|
138
149
|
type: PropType<AnyObject[]>;
|
|
139
150
|
default: () => never[];
|
|
@@ -150,5 +161,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
150
161
|
"onUpdate:sortStatus"?: ((...args: any[]) => any) | undefined;
|
|
151
162
|
}, {
|
|
152
163
|
options: AnyObject[];
|
|
164
|
+
sortable: boolean;
|
|
153
165
|
}>;
|
|
154
166
|
export default _default;
|