hy-dispatch-ui-v3 0.2.63 → 0.2.65
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/hyBatchUploadDialog/batchUploadDialog.vue.mjs +3 -0
- package/es/components/hyDialog/dialog.vue.mjs +9 -2
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +2 -1
- package/es/components/hyForm/form.vue.mjs +6 -3
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +20 -43
- package/es/components/hyTable/js/index.mjs +71 -19
- package/es/components/hyTable/js/useAppTable.mjs +4 -3
- package/es/components/hyTable/table.vue.mjs +13 -8
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -6
- package/es/components/hyTree/js/index.mjs +95 -70
- package/es/components/hyTree/tree.vue.mjs +5 -3
- package/es/static/hy-svg-icons/hy-icon-ops-list-lod.js +14 -0
- package/es/version.mjs +1 -1
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +3 -0
- package/lib/components/hyDialog/dialog.vue.js +8 -1
- package/lib/components/hyForm/cpns/locationSelect.vue.js +2 -1
- package/lib/components/hyForm/form.vue.js +6 -3
- package/lib/components/hyTable/cpns/virtualTable.vue.js +19 -42
- package/lib/components/hyTable/js/index.js +71 -19
- package/lib/components/hyTable/js/useAppTable.js +4 -3
- package/lib/components/hyTable/table.vue.js +12 -7
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +3 -5
- package/lib/components/hyTree/js/index.js +95 -70
- package/lib/components/hyTree/tree.vue.js +5 -3
- package/lib/static/hy-svg-icons/hy-icon-ops-list-lod.js +14 -0
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ const deviceStatus = {
|
|
|
14
14
|
1: "\u5728\u7EBF"
|
|
15
15
|
};
|
|
16
16
|
const useAppTreeWrapper = (hy) => {
|
|
17
|
-
const { props
|
|
17
|
+
const { props, emits, slots, treeRef, VirtualTree } = hy;
|
|
18
18
|
const instance = getCurrentInstance();
|
|
19
19
|
const slotAppContext = instance ? {
|
|
20
20
|
...instance.appContext,
|
|
@@ -33,17 +33,17 @@ const useAppTreeWrapper = (hy) => {
|
|
|
33
33
|
const selectFilterList = ref([]);
|
|
34
34
|
const loading = ref(true);
|
|
35
35
|
watch(
|
|
36
|
-
() =>
|
|
36
|
+
() => props.showCheckbox,
|
|
37
37
|
(newVal) => {
|
|
38
38
|
virtualTree?.setRowSelection({
|
|
39
|
-
type:
|
|
39
|
+
type: props.showCheckbox ? "checkbox" : "radio"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
function getData(dataList) {
|
|
44
44
|
return new Promise((resolve) => {
|
|
45
45
|
hy.loading.value = true;
|
|
46
|
-
if (
|
|
46
|
+
if (props.disableSelection?.length) {
|
|
47
47
|
setDisAbleSelectionMap();
|
|
48
48
|
}
|
|
49
49
|
if (!virtualTree) {
|
|
@@ -59,9 +59,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
59
59
|
// 可视区域外的缓冲项数量
|
|
60
60
|
indent: 16,
|
|
61
61
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
62
|
-
business:
|
|
62
|
+
business: props.treeType,
|
|
63
63
|
// 自定义整体的插槽
|
|
64
|
-
renderItem:
|
|
64
|
+
renderItem: props.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
|
|
65
65
|
// // 自定义状态右侧插槽
|
|
66
66
|
renderRight: (data) => {
|
|
67
67
|
let renderRight = setSlot("renderRight");
|
|
@@ -87,9 +87,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
87
87
|
return true;
|
|
88
88
|
},
|
|
89
89
|
// // 自定义状态模块
|
|
90
|
-
renderStatus:
|
|
90
|
+
renderStatus: props.treeType === treeTypeConfig.device || props.treeType === treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
|
|
91
91
|
renderEmpty: () => {
|
|
92
|
-
if (!
|
|
92
|
+
if (!props.showCustomEmpty || hy.filterValue.value) return true;
|
|
93
93
|
let renderEmpty = setSlot("renderEmpty");
|
|
94
94
|
if (renderEmpty) {
|
|
95
95
|
const target = renderEmpty();
|
|
@@ -108,23 +108,23 @@ const useAppTreeWrapper = (hy) => {
|
|
|
108
108
|
}
|
|
109
109
|
return false;
|
|
110
110
|
},
|
|
111
|
-
...
|
|
111
|
+
...props.treeProps
|
|
112
112
|
},
|
|
113
113
|
rowSelection: {
|
|
114
|
-
type:
|
|
115
|
-
highlight:
|
|
116
|
-
checkStrictly:
|
|
114
|
+
type: props.showCheckbox ? "checkbox" : "radio",
|
|
115
|
+
highlight: props.highlight,
|
|
116
|
+
checkStrictly: props.checkStrictly,
|
|
117
117
|
// 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
|
|
118
118
|
showSelect: (data) => {
|
|
119
119
|
if (data.dataType === 1) {
|
|
120
|
-
return
|
|
120
|
+
return props.showCheckbox;
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return props.showCheckbox || props.showSinglebox;
|
|
123
123
|
},
|
|
124
124
|
// 单选时是否可以取消选择
|
|
125
|
-
cancelable:
|
|
125
|
+
cancelable: props.cancelable,
|
|
126
126
|
// 是否显示多选框或单选框
|
|
127
|
-
showSelectBox:
|
|
127
|
+
showSelectBox: props.showSelectBox,
|
|
128
128
|
// 选中回调
|
|
129
129
|
onCheckChange: (data, info, checked) => {
|
|
130
130
|
console.log("onCheckChange", info);
|
|
@@ -137,42 +137,51 @@ const useAppTreeWrapper = (hy) => {
|
|
|
137
137
|
"on-check-tree",
|
|
138
138
|
JSON.parse(
|
|
139
139
|
JSON.stringify(info.checkedBusinessNodes || info.checkedNodes)
|
|
140
|
-
)
|
|
140
|
+
),
|
|
141
|
+
{
|
|
142
|
+
data,
|
|
143
|
+
info,
|
|
144
|
+
checked
|
|
145
|
+
}
|
|
141
146
|
);
|
|
142
147
|
}
|
|
143
148
|
},
|
|
144
149
|
// 是否在点击节点的时候展开或者收缩节点
|
|
145
|
-
expandOnClickNode:
|
|
150
|
+
expandOnClickNode: props.expandOnClickNode,
|
|
146
151
|
// 是否在点击节点的时候选中节点
|
|
147
|
-
checkOnClickNode:
|
|
152
|
+
checkOnClickNode: props.checkOnClickNode,
|
|
148
153
|
// 点击叶节点(最后一个子节点)时是否检查或取消节点
|
|
149
|
-
checkOnClickLeaf:
|
|
154
|
+
checkOnClickLeaf: props.checkOnClickLeaf,
|
|
150
155
|
// 双击父节点会触发选中功能
|
|
151
|
-
checkOnDblclickParentNode:
|
|
156
|
+
checkOnDblclickParentNode: props.checkOnDblclickParentNode,
|
|
152
157
|
// 筛选方法
|
|
153
158
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
154
159
|
let isFilter = true;
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
console.log("111111111", isFilter, props.filterMethod);
|
|
161
|
+
if (props.filterMethod) {
|
|
162
|
+
isFilter = props.filterMethod(data, {
|
|
163
|
+
filterValue: filterValue2
|
|
164
|
+
});
|
|
157
165
|
}
|
|
158
166
|
if (filterValue2) {
|
|
159
167
|
isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
|
|
160
|
-
treeFilterParam:
|
|
168
|
+
treeFilterParam: props.treeFilterParam,
|
|
169
|
+
treeType: props.treeType
|
|
161
170
|
});
|
|
162
171
|
}
|
|
163
172
|
return isFilter;
|
|
164
173
|
},
|
|
165
174
|
businessConfig: {
|
|
166
175
|
// 是否开启按在线离线状态排序
|
|
167
|
-
sortByStatus:
|
|
176
|
+
sortByStatus: props.deviceOrderSort,
|
|
168
177
|
// 是否只显示在线设备
|
|
169
|
-
showOnlineState:
|
|
178
|
+
showOnlineState: props.showOnlineOnly,
|
|
170
179
|
// 是否清空没有业务项(设备、用户、采集器)的部门和群组
|
|
171
|
-
clearEmptyBusiness:
|
|
180
|
+
clearEmptyBusiness: props.clearEmptyBusiness,
|
|
172
181
|
// 是否显示通道节点的选择框
|
|
173
|
-
isShowChannelSelect:
|
|
182
|
+
isShowChannelSelect: props.isShowChannelSelect,
|
|
174
183
|
// 初始化过滤数据
|
|
175
|
-
filterConfig:
|
|
184
|
+
filterConfig: props.filterConfig
|
|
176
185
|
},
|
|
177
186
|
// 初始化时处理数据,想回显必须return值,若想要过滤,可不return
|
|
178
187
|
handleMethod: (data) => {
|
|
@@ -193,7 +202,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
193
202
|
},
|
|
194
203
|
// 双击事件
|
|
195
204
|
onNodeDblClick: (data, node, event) => {
|
|
196
|
-
if (
|
|
205
|
+
if (props.treeType !== "channel") {
|
|
197
206
|
emits("on-dblclick", [{ ...data }]);
|
|
198
207
|
} else {
|
|
199
208
|
if (data.channelId) {
|
|
@@ -233,13 +242,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
233
242
|
document.body.click();
|
|
234
243
|
},
|
|
235
244
|
onLoad: () => {
|
|
236
|
-
if (
|
|
245
|
+
if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
237
246
|
ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
238
247
|
}
|
|
239
|
-
if (
|
|
248
|
+
if (props.defaultSelectedOrgID && props.showCheckbox && props.treeType === "device") {
|
|
240
249
|
setSelectedOrg(dataList);
|
|
241
|
-
} else if (
|
|
242
|
-
setCheckedKeys(
|
|
250
|
+
} else if (props.selectedByDefault?.length) {
|
|
251
|
+
setCheckedKeys(props.selectedByDefault);
|
|
243
252
|
}
|
|
244
253
|
if (hy.filterValue.value) {
|
|
245
254
|
getFilterValue();
|
|
@@ -255,13 +264,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
255
264
|
{
|
|
256
265
|
data: dataList,
|
|
257
266
|
businessConfig: {
|
|
258
|
-
sortByStatus:
|
|
259
|
-
showOnlineState:
|
|
260
|
-
clearEmptyBusiness:
|
|
267
|
+
sortByStatus: props.deviceOrderSort,
|
|
268
|
+
showOnlineState: props.showOnlineOnly,
|
|
269
|
+
clearEmptyBusiness: props.clearEmptyBusiness
|
|
261
270
|
}
|
|
262
271
|
},
|
|
263
272
|
() => {
|
|
264
|
-
if (
|
|
273
|
+
if (props.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
265
274
|
ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
266
275
|
}
|
|
267
276
|
if (hy.filterValue.value) {
|
|
@@ -278,7 +287,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
278
287
|
}
|
|
279
288
|
function setEmpty() {
|
|
280
289
|
let content = ``;
|
|
281
|
-
if (!
|
|
290
|
+
if (!props.showOnlineOnly) {
|
|
282
291
|
setTimeout(() => {
|
|
283
292
|
if (hy.addDeviceDom.value) {
|
|
284
293
|
hy.addDeviceDom.value.removeEventListener("click", addDevice);
|
|
@@ -307,7 +316,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
307
316
|
}
|
|
308
317
|
function setDisAbleSelectionMap() {
|
|
309
318
|
const map = /* @__PURE__ */ new Map();
|
|
310
|
-
|
|
319
|
+
props.disableSelection.forEach((v) => {
|
|
311
320
|
map.set(v.id, true);
|
|
312
321
|
});
|
|
313
322
|
hy.disableSelectionMap.value = map;
|
|
@@ -331,7 +340,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
331
340
|
container.style.display = "flex";
|
|
332
341
|
container.style.width = "100%";
|
|
333
342
|
const dutyHtml = `<div class="flex treeDeviceBox">
|
|
334
|
-
${
|
|
343
|
+
${props.getDutyRoster === 1 && data.rosterContent ? `<span class="w-[22px] h-[22px] text-xs rounded border box-border text-main flex justify-center items-center mr-1"
|
|
335
344
|
style="border-color: ${data.rosterContentColor};background-color: ${data.rosterContentColor}70;">
|
|
336
345
|
${data.rosterContentSimple}
|
|
337
346
|
</span>` : ""}
|
|
@@ -409,36 +418,45 @@ const useAppTreeWrapper = (hy) => {
|
|
|
409
418
|
function setDeviceStatus(payload) {
|
|
410
419
|
virtualTree?.updateData([payload]);
|
|
411
420
|
}
|
|
412
|
-
function singleRemovalFn(row) {
|
|
413
|
-
if (
|
|
421
|
+
function singleRemovalFn(row, isForce = false) {
|
|
422
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
414
423
|
virtualTree.setChecked(row.channelId || row.deviceId, false, true);
|
|
415
|
-
} else if (
|
|
416
|
-
virtualTree.setChecked(row.id, false, true);
|
|
417
|
-
} else if (!
|
|
418
|
-
virtualTree.setChecked(
|
|
424
|
+
} else if (props.treeType) {
|
|
425
|
+
virtualTree.setChecked(row.id, false, true, isForce);
|
|
426
|
+
} else if (!props.treeType && props.treeProps) {
|
|
427
|
+
virtualTree.setChecked(
|
|
428
|
+
row[`${props.treeProps.value}`],
|
|
429
|
+
false,
|
|
430
|
+
true,
|
|
431
|
+
isForce
|
|
432
|
+
);
|
|
419
433
|
}
|
|
420
434
|
}
|
|
421
|
-
function setCheckedKeys(dataList) {
|
|
422
|
-
if (
|
|
435
|
+
function setCheckedKeys(dataList, isForce = false) {
|
|
436
|
+
if (props.treeType === "device" || props.treeType === "channel") {
|
|
423
437
|
virtualTree?.setCheckedKeys(
|
|
424
438
|
dataList.map((v) => v.channelId || v.deviceId),
|
|
425
|
-
true
|
|
439
|
+
true,
|
|
440
|
+
isForce
|
|
426
441
|
);
|
|
427
|
-
} else if (
|
|
442
|
+
} else if (props.treeType) {
|
|
428
443
|
virtualTree?.setCheckedKeys(
|
|
429
444
|
dataList.map((v) => v.id),
|
|
430
|
-
true
|
|
445
|
+
true,
|
|
446
|
+
isForce
|
|
431
447
|
);
|
|
432
|
-
} else if (!
|
|
448
|
+
} else if (!props.treeType && props.treeProps) {
|
|
433
449
|
console.log(
|
|
434
450
|
"\u9009\u4E2D\u56DE\u8C03",
|
|
435
|
-
dataList.map((v) => v[`${
|
|
451
|
+
dataList.map((v) => v[`${props.treeProps.value}`])
|
|
436
452
|
);
|
|
437
453
|
virtualTree?.setCheckedKeys(
|
|
438
|
-
dataList.map((v) => v[`${
|
|
454
|
+
dataList.map((v) => v[`${props.treeProps.value}`]),
|
|
455
|
+
false,
|
|
456
|
+
isForce
|
|
439
457
|
);
|
|
440
458
|
}
|
|
441
|
-
if (
|
|
459
|
+
if (props.isBackDefaultSelected) {
|
|
442
460
|
setTimeout(() => {
|
|
443
461
|
const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
|
|
444
462
|
emits("on-selectedDataList", deviceList);
|
|
@@ -446,17 +464,17 @@ const useAppTreeWrapper = (hy) => {
|
|
|
446
464
|
}
|
|
447
465
|
}
|
|
448
466
|
function setChecked(data, type) {
|
|
449
|
-
if (
|
|
467
|
+
if (props.treeType === "device") {
|
|
450
468
|
virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
|
|
451
|
-
} else if (
|
|
469
|
+
} else if (props.treeType) {
|
|
452
470
|
virtualTree?.setChecked(data.id, type, true);
|
|
453
|
-
} else if (!
|
|
454
|
-
virtualTree?.setChecked(data[`${
|
|
471
|
+
} else if (!props.treeType && props.treeProps) {
|
|
472
|
+
virtualTree?.setChecked(data[`${props.treeProps.value}`], type, true);
|
|
455
473
|
}
|
|
456
474
|
}
|
|
457
475
|
function setSelectedOrg(deviceList) {
|
|
458
476
|
for (let i = 0; i < deviceList.length; i++) {
|
|
459
|
-
if (
|
|
477
|
+
if (props.defaultSelectedOrgID === deviceList[i].id) {
|
|
460
478
|
if (deviceList[i].deviceList?.length) {
|
|
461
479
|
setCheckedKeys(deviceList[i].deviceList);
|
|
462
480
|
}
|
|
@@ -468,17 +486,20 @@ const useAppTreeWrapper = (hy) => {
|
|
|
468
486
|
}
|
|
469
487
|
}
|
|
470
488
|
}
|
|
471
|
-
function getSelectedDataList() {
|
|
472
|
-
|
|
489
|
+
function getSelectedDataList(leafOnly = false) {
|
|
490
|
+
if (props.treeType) {
|
|
491
|
+
return virtualTree?.getCheckedBusinessNodes(leafOnly) || [];
|
|
492
|
+
}
|
|
493
|
+
return virtualTree?.getCheckedNodes(leafOnly) || [];
|
|
473
494
|
}
|
|
474
495
|
function setFilterListType(type) {
|
|
475
|
-
if (
|
|
496
|
+
if (props.selectFilterList?.length) {
|
|
476
497
|
hy.selectFilterList.value = JSON.parse(
|
|
477
|
-
JSON.stringify(
|
|
498
|
+
JSON.stringify(props.selectFilterList)
|
|
478
499
|
);
|
|
479
500
|
return;
|
|
480
501
|
}
|
|
481
|
-
if (
|
|
502
|
+
if (props.treeType === "device") {
|
|
482
503
|
hy.selectFilterList.value = [
|
|
483
504
|
{
|
|
484
505
|
label: "\u5168\u90E8",
|
|
@@ -496,7 +517,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
496
517
|
placeholder: "\u8BBE\u5907\u53F7\u3001\u8BBE\u5907\u540D\u79F0\u8FDB\u884C\u7B5B\u9009"
|
|
497
518
|
}
|
|
498
519
|
];
|
|
499
|
-
} else if (
|
|
520
|
+
} else if (props.treeType === "user") {
|
|
500
521
|
hy.selectFilterList.value = [
|
|
501
522
|
{
|
|
502
523
|
label: "\u5168\u90E8",
|
|
@@ -530,6 +551,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
530
551
|
refreshData();
|
|
531
552
|
}
|
|
532
553
|
}
|
|
554
|
+
function getNode(id) {
|
|
555
|
+
return virtualTree.getNode(id);
|
|
556
|
+
}
|
|
533
557
|
return {
|
|
534
558
|
filterValue,
|
|
535
559
|
virtualTree,
|
|
@@ -549,16 +573,17 @@ const useAppTreeWrapper = (hy) => {
|
|
|
549
573
|
selectFilterType,
|
|
550
574
|
selectedDataList,
|
|
551
575
|
getSelectedDataList,
|
|
552
|
-
loading
|
|
576
|
+
loading,
|
|
577
|
+
getNode
|
|
553
578
|
};
|
|
554
579
|
};
|
|
555
|
-
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [] }) {
|
|
580
|
+
function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = [], treeType }) {
|
|
556
581
|
let type = data.dataType;
|
|
557
582
|
if (selectFilterType) type = selectFilterType;
|
|
558
583
|
const includesValue = (field) => {
|
|
559
584
|
return field && field.toString().includes(value.toString());
|
|
560
585
|
};
|
|
561
|
-
if (!
|
|
586
|
+
if (!treeType) {
|
|
562
587
|
let filterType = false;
|
|
563
588
|
for (let i = 0; i < treeFilterParam.length; i++) {
|
|
564
589
|
const item = treeFilterParam[i];
|
|
@@ -183,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
183
183
|
// 外部自定义过滤函数
|
|
184
184
|
filterMethod: {
|
|
185
185
|
type: Function,
|
|
186
|
-
default:
|
|
186
|
+
default: null
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
emits: [
|
|
@@ -218,7 +218,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
218
218
|
getInputPlaceholder,
|
|
219
219
|
onChange,
|
|
220
220
|
getSelectedDataList,
|
|
221
|
-
loading
|
|
221
|
+
loading,
|
|
222
|
+
getNode
|
|
222
223
|
} = useMixins(
|
|
223
224
|
{
|
|
224
225
|
props,
|
|
@@ -240,7 +241,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
240
241
|
setCheckedKeys,
|
|
241
242
|
setChecked,
|
|
242
243
|
getSelectedDataList,
|
|
243
|
-
refreshData
|
|
244
|
+
refreshData,
|
|
245
|
+
getNode
|
|
244
246
|
});
|
|
245
247
|
return (_ctx, _cache) => {
|
|
246
248
|
const _directive_loading = resolveDirective("loading");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'hy-icon-ops-list-lod',
|
|
3
|
+
defs: `<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="hy-icon-ops-list-lod-linearGradient-1">
|
|
4
|
+
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
|
5
|
+
<stop stop-color="#73F6FF" offset="100%"></stop>
|
|
6
|
+
</linearGradient>`,
|
|
7
|
+
symbol: `<symbol id="hy-icon-ops-list-lod" viewBox="0 0 28 7">
|
|
8
|
+
<g id="hy-icon-ops-list-lod-部门管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
9
|
+
<g id="hy-icon-ops-list-lod-缩小化-自适应说明" transform="translate(-1263, -986)" fill="url(#hy-icon-ops-list-lod-linearGradient-1)" fill-rule="nonzero">
|
|
10
|
+
<path d="M1267.42105,986.85 C1268.23495,986.85 1268.89474,987.535564 1268.89474,988.38125 L1268.89474,991.44375 C1268.89474,992.289436 1268.23495,992.975 1267.42105,992.975 L1264.47368,992.975 C1263.65979,992.975 1263,992.289436 1263,991.44375 L1263,988.38125 C1263,987.535564 1263.65979,986.85 1264.47368,986.85 L1267.42105,986.85 L1267.42105,986.85 Z M1278.47368,986.85 C1279.28758,986.85 1279.94737,987.535564 1279.94737,988.38125 L1279.94737,991.44375 C1279.94737,992.289436 1279.28758,992.975 1278.47368,992.975 L1275.52632,992.975 C1274.71242,992.975 1274.05263,992.289436 1274.05263,991.44375 L1274.05263,988.38125 C1274.05263,987.535564 1274.71242,986.85 1275.52632,986.85 L1278.47368,986.85 L1278.47368,986.85 Z M1289.52632,986.85 C1290.34021,986.85 1291,987.535564 1291,988.38125 L1291,991.44375 C1291,992.289436 1290.34021,992.975 1289.52632,992.975 L1286.57895,992.975 C1285.76505,992.975 1285.10526,992.289436 1285.10526,991.44375 L1285.10526,988.38125 C1285.10526,987.535564 1285.76505,986.85 1286.57895,986.85 L1289.52632,986.85 L1289.52632,986.85 Z" id="hy-icon-ops-list-lod-lod"></path>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</symbol>`,
|
|
14
|
+
};
|
package/es/version.mjs
CHANGED
|
@@ -212,6 +212,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
212
212
|
},
|
|
213
213
|
setData: (source) => {
|
|
214
214
|
batchTableFormRef.value.setData(source);
|
|
215
|
+
},
|
|
216
|
+
setDragLevelIndex: (dragLevel) => {
|
|
217
|
+
HyDialogRef.value.setDragLevelIndex(dragLevel);
|
|
215
218
|
}
|
|
216
219
|
});
|
|
217
220
|
return (_ctx, _cache) => {
|
|
@@ -6,8 +6,10 @@ var vue = require('vue');
|
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
require('../index.js');
|
|
8
8
|
require('../../hooks/index.js');
|
|
9
|
+
require('../../utils/index.js');
|
|
9
10
|
var useLocale = require('../../hooks/useLocale.js');
|
|
10
11
|
var index = require('../hyButton/index.js');
|
|
12
|
+
var is = require('../../utils/is.js');
|
|
11
13
|
var index$1 = require('../hyIcon/index.js');
|
|
12
14
|
|
|
13
15
|
import "./style/dialog.scss";
|
|
@@ -283,7 +285,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
283
285
|
vue.Fragment,
|
|
284
286
|
null,
|
|
285
287
|
vue.renderList(__props.titleBasicInfoList, (basicInfoItem, index) => {
|
|
286
|
-
return vue.openBlock(), vue.createElementBlock("li", {
|
|
288
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
287
289
|
key: index,
|
|
288
290
|
class: "flex px-2 py-1 text-xs"
|
|
289
291
|
}, [
|
|
@@ -301,6 +303,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
301
303
|
1
|
|
302
304
|
/* TEXT */
|
|
303
305
|
)
|
|
306
|
+
])), [
|
|
307
|
+
[
|
|
308
|
+
vue.vShow,
|
|
309
|
+
vue.unref(is.isFunction)(basicInfoItem.show) ? basicInfoItem.show() : true
|
|
310
|
+
]
|
|
304
311
|
]);
|
|
305
312
|
}),
|
|
306
313
|
128
|
|
@@ -56,7 +56,7 @@ const _sfc_main = {
|
|
|
56
56
|
default: false
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
emits: ["setMapSize"],
|
|
59
|
+
emits: ["setMapSize", "complete"],
|
|
60
60
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
61
61
|
const props = __props;
|
|
62
62
|
const emits = __emit;
|
|
@@ -212,6 +212,7 @@ const _sfc_main = {
|
|
|
212
212
|
setMarker(res.latlng);
|
|
213
213
|
throughCoordinatePosition(latlng.lng, latlng.lat);
|
|
214
214
|
});
|
|
215
|
+
emits("complete");
|
|
215
216
|
}
|
|
216
217
|
function setMarker({ lat, lng }) {
|
|
217
218
|
if (marker) {
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
57
57
|
// 'large' | 'default' | 'small'
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
emits: ["on-allMapSelect"],
|
|
60
|
+
emits: ["on-allMapSelect", "complete"],
|
|
61
61
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
62
62
|
const emit = __emit;
|
|
63
63
|
const props = __props;
|
|
@@ -85,6 +85,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
85
85
|
allMapSelect.value = !allMapSelect.value;
|
|
86
86
|
emit("on-allMapSelect", allMapSelect.value);
|
|
87
87
|
}
|
|
88
|
+
function complete() {
|
|
89
|
+
emit("complete");
|
|
90
|
+
}
|
|
88
91
|
__expose({
|
|
89
92
|
validate: async (callback) => {
|
|
90
93
|
await vue.nextTick();
|
|
@@ -135,7 +138,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
135
138
|
rules: __props.rules,
|
|
136
139
|
"label-position": "top",
|
|
137
140
|
size: __props.size,
|
|
138
|
-
class: "px-2",
|
|
139
141
|
"hide-required-asterisk": ""
|
|
140
142
|
}, _ctx.$attrs), {
|
|
141
143
|
default: vue.withCtx(() => [
|
|
@@ -277,7 +279,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
277
279
|
size: __props.size,
|
|
278
280
|
style: vue.normalizeStyle(vue.unref(index.columnItemStyle)(props, column)),
|
|
279
281
|
allMapSelect: allMapSelect.value,
|
|
280
|
-
onSetMapSize: setMapSize
|
|
282
|
+
onSetMapSize: setMapSize,
|
|
283
|
+
onComplete: complete
|
|
281
284
|
}, null, 8, ["model", "column", "rules", "columnNum", "loading", "disabled", "readonly", "size", "style", "allMapSelect"])) : vue.createCommentVNode("v-if", true)
|
|
282
285
|
],
|
|
283
286
|
64
|
|
@@ -17,7 +17,7 @@ var index$2 = require('../../hyIcon/index.js');
|
|
|
17
17
|
|
|
18
18
|
const _sfc_main = {
|
|
19
19
|
__name: "virtualTable",
|
|
20
|
-
props: {
|
|
20
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
21
21
|
rowKey: {
|
|
22
22
|
type: [String, Number],
|
|
23
23
|
default: "id"
|
|
@@ -66,12 +66,23 @@ const _sfc_main = {
|
|
|
66
66
|
type: String,
|
|
67
67
|
default: "default"
|
|
68
68
|
// deafult-默认 accordion-手风琴
|
|
69
|
+
},
|
|
70
|
+
expandRowKeyMap: {
|
|
71
|
+
type: Map,
|
|
72
|
+
default: () => /* @__PURE__ */ new Map()
|
|
69
73
|
}
|
|
70
|
-
},
|
|
71
|
-
|
|
74
|
+
}, {
|
|
75
|
+
"expandedRowKeys": {
|
|
76
|
+
type: Array,
|
|
77
|
+
default: () => []
|
|
78
|
+
},
|
|
79
|
+
"expandedRowKeysModifiers": {}
|
|
80
|
+
}),
|
|
81
|
+
emits: /* @__PURE__ */ vue.mergeModels(["search", "select", "select-all", "expand-click"], ["update:expandedRowKeys"]),
|
|
72
82
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
73
83
|
const props = __props;
|
|
74
84
|
const emits = __emit;
|
|
85
|
+
const expandedRowKeys = vue.useModel(__props, "expandedRowKeys");
|
|
75
86
|
const { t } = useLocale.useLocale();
|
|
76
87
|
const avgWidth = vue.computed(() => {
|
|
77
88
|
const { total, totalWidth } = props.columns.reduce(
|
|
@@ -260,46 +271,12 @@ const _sfc_main = {
|
|
|
260
271
|
const { allChecked } = handler(list, checkedNodeMap, indeterminateKeys2);
|
|
261
272
|
return { checkedNodeMap, indeterminateKeys: indeterminateKeys2, allChecked };
|
|
262
273
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return expandedKeys.value.reduce((keyMap, key, index) => {
|
|
266
|
-
keyMap.set(key, index);
|
|
267
|
-
return keyMap;
|
|
268
|
-
}, /* @__PURE__ */ new Map());
|
|
269
|
-
});
|
|
270
|
-
function toggleRowExpansion(row, expanded) {
|
|
271
|
-
const index = expandedMap.value.get(getRowKey(row));
|
|
272
|
-
const isExpanded = is.isBoolean(expanded) ? expanded : !is.isNumber(index);
|
|
273
|
-
if (isExpanded) {
|
|
274
|
-
if (!is.isNumber(index)) {
|
|
275
|
-
if (props.expandMode === "accordion" && isExpandTable.value) {
|
|
276
|
-
expandedKeys.value = [getRowKey(row)];
|
|
277
|
-
} else {
|
|
278
|
-
expandedKeys.value.push(getRowKey(row));
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
} else {
|
|
282
|
-
if (is.isNumber(index)) {
|
|
283
|
-
expandedKeys.value.splice(index, 1);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
if (isExpandTable.value) {
|
|
287
|
-
const expandedList = expandedKeys.value.reduce((list, key) => {
|
|
288
|
-
list.push(dataSourceMap.value.get(key));
|
|
289
|
-
return list;
|
|
290
|
-
}, []);
|
|
291
|
-
emits("expand-change", row, expandedList);
|
|
292
|
-
} else {
|
|
293
|
-
emits("expand-change", row, isExpanded);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
function onRowExpandSwitch({ row, rowKey }) {
|
|
297
|
-
toggleRowExpansion(row, !expandedMap.value.has(rowKey));
|
|
274
|
+
function onRowExpandSwitch({ row, rowKey, ...args }) {
|
|
275
|
+
emits("expand-click", row, !props.expandRowKeyMap.has(rowKey));
|
|
298
276
|
}
|
|
299
277
|
__expose({
|
|
300
278
|
toggleRowSelection,
|
|
301
279
|
toggleAllSelection,
|
|
302
|
-
toggleRowExpansion,
|
|
303
280
|
clearSelection: () => {
|
|
304
281
|
isAllChecked.value = false;
|
|
305
282
|
selectedMap.value.clear();
|
|
@@ -308,8 +285,8 @@ const _sfc_main = {
|
|
|
308
285
|
});
|
|
309
286
|
return (_ctx, _cache) => {
|
|
310
287
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTableV2), {
|
|
311
|
-
"expanded-row-keys":
|
|
312
|
-
"onUpdate:expandedRowKeys": ($event) =>
|
|
288
|
+
"expanded-row-keys": expandedRowKeys.value,
|
|
289
|
+
"onUpdate:expandedRowKeys": ($event) => expandedRowKeys.value = $event,
|
|
313
290
|
"row-key": __props.rowKey,
|
|
314
291
|
data: dataSource.value,
|
|
315
292
|
columns: tableColumns.value,
|
|
@@ -391,7 +368,7 @@ const _sfc_main = {
|
|
|
391
368
|
type: "button",
|
|
392
369
|
"aria-label": "\u5C55\u5F00\u5F53\u524D\u884C",
|
|
393
370
|
"aria-expanded": "false",
|
|
394
|
-
class: vue.normalizeClass(["hy-el-table-v2__expand-icon", { "is-expanded":
|
|
371
|
+
class: vue.normalizeClass(["hy-el-table-v2__expand-icon", { "is-expanded": __props.expandRowKeyMap.has(getRowKey(row)) }]),
|
|
395
372
|
onClick: vue.withModifiers(($event) => onRowExpandSwitch({
|
|
396
373
|
rowData: _ctx.rowData,
|
|
397
374
|
row,
|