hy-dispatch-ui-v3 0.2.65 → 0.2.66
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/dist/tailwind.css +26 -12
- package/es/api/organization.mjs +43 -0
- package/es/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.mjs +245 -0
- package/es/bussiness/hyAcquisitionStationTree/index.mjs +7 -0
- package/es/bussiness/hyAcquisitionStationTree/js/index.mjs +124 -0
- package/es/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
- package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +249 -0
- package/es/bussiness/hyDeviceTree/index.mjs +7 -0
- package/es/bussiness/hyDeviceTree/js/index.mjs +126 -0
- package/es/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
- package/es/bussiness/hyOrgGroupTree/index.mjs +7 -0
- package/es/bussiness/hyOrgGroupTree/js/index.mjs +124 -0
- package/es/bussiness/hyOrgGroupTree/orgGroupTree.vue.mjs +245 -0
- package/es/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
- package/es/bussiness/hyPlanGroupDeviceTree/index.mjs +7 -0
- package/es/bussiness/hyPlanGroupDeviceTree/js/index.mjs +124 -0
- package/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.mjs +245 -0
- package/es/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
- package/es/bussiness/hyUserTree/index.mjs +7 -0
- package/es/bussiness/hyUserTree/js/index.mjs +126 -0
- package/es/bussiness/hyUserTree/style/userTree.scss +0 -0
- package/es/bussiness/hyUserTree/userTree.vue.mjs +239 -0
- package/es/bussiness/index.mjs +5 -0
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +18 -16
- package/es/components/hyButton/button.vue.mjs +3 -2
- package/es/components/hyButton/style/button.scss +70 -0
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +198 -26
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +8 -1
- package/es/components/hyForm/form.vue.mjs +74 -19
- package/es/components/hyForm/js/index.mjs +2 -1
- package/es/components/hyForm/js/useAppForm.mjs +2 -2
- package/es/components/hyIcon/style/icon.scss +1 -0
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +69 -14
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +5 -4
- package/es/components/hySearch/cpns/searchItem.vue.mjs +167 -11
- package/es/components/hySearch/js/index.mjs +2 -1
- package/es/components/hySearch/search.vue.mjs +60 -9
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +21 -22
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +10 -15
- package/es/components/hyTable/js/index.mjs +5 -12
- package/es/components/hyTable/js/search.mjs +3 -1
- package/es/components/hyTable/style/table.scss +13 -0
- package/es/components/hyTable/table.vue.mjs +21 -9
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +8 -10
- package/es/components/hyTableForm/batchTableForm.vue.mjs +13 -3
- package/es/components/hyTableForm/tableForm.vue.mjs +17 -11
- package/es/components/hyTour/index.mjs +7 -0
- package/es/components/hyTour/style/tour.scss +0 -0
- package/es/components/hyTour/tour.vue.mjs +23 -0
- package/es/components/hyTree/config/tree-config.mjs +5 -2
- package/es/components/hyTree/js/index.mjs +11 -7
- package/es/components/hyTree/tree.vue.mjs +18 -35
- package/es/components/index.mjs +1 -0
- package/es/index.mjs +6 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
- package/es/style/element/hy-element.scss +24 -3
- package/es/style/theme.scss +1 -0
- package/es/utils/map/hook/bigMap.mjs +9 -1
- package/es/utils/map/hook/gaode.mjs +9 -1
- package/es/utils/map/hook/leafletjs.mjs +10 -1
- package/es/version.mjs +1 -1
- package/lib/api/organization.js +47 -0
- package/lib/bussiness/hyAcquisitionStationTree/acquisitionStationTree.vue.js +249 -0
- package/lib/bussiness/hyAcquisitionStationTree/index.js +12 -0
- package/lib/bussiness/hyAcquisitionStationTree/js/index.js +126 -0
- package/lib/bussiness/hyAcquisitionStationTree/style/acquisitionStationTree.scss +0 -0
- package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +253 -0
- package/lib/bussiness/hyDeviceTree/index.js +12 -0
- package/lib/bussiness/hyDeviceTree/js/index.js +128 -0
- package/lib/bussiness/hyDeviceTree/style/deviceTree.scss +0 -0
- package/lib/bussiness/hyOrgGroupTree/index.js +12 -0
- package/lib/bussiness/hyOrgGroupTree/js/index.js +126 -0
- package/lib/bussiness/hyOrgGroupTree/orgGroupTree.vue.js +249 -0
- package/lib/bussiness/hyOrgGroupTree/style/orgGroupTree.scss +0 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/index.js +12 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/js/index.js +126 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree.vue.js +249 -0
- package/lib/bussiness/hyPlanGroupDeviceTree/style/planGroupDeviceTree.scss +0 -0
- package/lib/bussiness/hyUserTree/index.js +12 -0
- package/lib/bussiness/hyUserTree/js/index.js +128 -0
- package/lib/bussiness/hyUserTree/style/userTree.scss +0 -0
- package/lib/bussiness/hyUserTree/userTree.vue.js +243 -0
- package/lib/bussiness/index.js +14 -4
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +18 -16
- package/lib/components/hyButton/button.vue.js +3 -2
- package/lib/components/hyButton/style/button.scss +70 -0
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +0 -1
- package/lib/components/hyForm/cpns/formItem.vue.js +195 -23
- package/lib/components/hyForm/cpns/locationSelect.vue.js +8 -1
- package/lib/components/hyForm/form.vue.js +72 -17
- package/lib/components/hyForm/js/index.js +2 -0
- package/lib/components/hyForm/js/useAppForm.js +2 -2
- package/lib/components/hyIcon/style/icon.scss +1 -0
- package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
- package/lib/components/hyOrgCascader/orgCascader.vue.js +67 -12
- package/lib/components/hyRadioGroup/radioGroup.vue.js +5 -4
- package/lib/components/hySearch/cpns/searchItem.vue.js +164 -8
- package/lib/components/hySearch/js/index.js +2 -0
- package/lib/components/hySearch/search.vue.js +58 -7
- package/lib/components/hyTable/cpns/columnSelect.vue.js +20 -21
- package/lib/components/hyTable/cpns/virtualTable.vue.js +27 -32
- package/lib/components/hyTable/js/index.js +5 -12
- package/lib/components/hyTable/js/search.js +3 -1
- package/lib/components/hyTable/style/table.scss +13 -0
- package/lib/components/hyTable/table.vue.js +20 -8
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +7 -9
- package/lib/components/hyTableForm/batchTableForm.vue.js +13 -3
- package/lib/components/hyTableForm/tableForm.vue.js +18 -12
- package/lib/components/hyTour/index.js +12 -0
- package/lib/components/hyTour/style/tour.scss +0 -0
- package/lib/components/hyTour/tour.vue.js +27 -0
- package/lib/components/hyTree/config/tree-config.js +5 -2
- package/lib/components/hyTree/js/index.js +11 -7
- package/lib/components/hyTree/tree.vue.js +18 -35
- package/lib/components/index.js +8 -6
- package/lib/index.js +67 -55
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-arrow.js +10 -0
- package/lib/style/element/hy-element.scss +24 -3
- package/lib/style/theme.scss +1 -0
- package/lib/utils/map/hook/bigMap.js +9 -1
- package/lib/utils/map/hook/gaode.js +9 -1
- package/lib/utils/map/hook/leafletjs.js +10 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useModel, computed, ref, openBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, Fragment, renderList, normalizeStyle, withModifiers, normalizeClass, createVNode, mergeProps, createTextVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
|
|
2
|
-
import { ElTableV2,
|
|
3
|
-
import {
|
|
2
|
+
import { ElTableV2, ElCheckbox, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem } from 'element-plus';
|
|
3
|
+
import { MoreFilled } from '@element-plus/icons-vue';
|
|
4
4
|
import '../../index.mjs';
|
|
5
5
|
import '../../../hooks/index.mjs';
|
|
6
6
|
import '../../../utils/index.mjs';
|
|
@@ -8,8 +8,8 @@ import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, o
|
|
|
8
8
|
import _sfc_main$1 from './headerItem.vue.mjs';
|
|
9
9
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
10
10
|
import { isNumber, isString, isFunction, isArray, isBoolean, isEmpty } from '../../../utils/is.mjs';
|
|
11
|
-
import { HyTooltip } from '../../hyTooltip/index.mjs';
|
|
12
11
|
import { HyIcon } from '../../hyIcon/index.mjs';
|
|
12
|
+
import { HyTooltip } from '../../hyTooltip/index.mjs';
|
|
13
13
|
|
|
14
14
|
const _sfc_main = {
|
|
15
15
|
__name: "virtualTable",
|
|
@@ -372,16 +372,11 @@ const _sfc_main = {
|
|
|
372
372
|
rowKey: getRowKey(row)
|
|
373
373
|
}), ["stop"])
|
|
374
374
|
}, [
|
|
375
|
-
createVNode(unref(
|
|
376
|
-
|
|
375
|
+
createVNode(unref(HyIcon), {
|
|
376
|
+
"svg-name": "dispatch-linear-arrow-down-bold",
|
|
377
|
+
"class-name": "!w-3 !h-3 text-main",
|
|
377
378
|
style: normalizeStyle({ "margin-inline-start": `${depth * 12}px` })
|
|
378
|
-
},
|
|
379
|
-
default: withCtx(() => [
|
|
380
|
-
createVNode(unref(ArrowRight))
|
|
381
|
-
]),
|
|
382
|
-
_: 1
|
|
383
|
-
/* STABLE */
|
|
384
|
-
}, 8, ["style"])
|
|
379
|
+
}, null, 8, ["style"])
|
|
385
380
|
], 10, ["onClick"])) : (openBlock(), createElementBlock(
|
|
386
381
|
"div",
|
|
387
382
|
{
|
|
@@ -502,7 +497,7 @@ const _sfc_main = {
|
|
|
502
497
|
dropdown: withCtx(() => [
|
|
503
498
|
createVNode(
|
|
504
499
|
unref(ElDropdownMenu),
|
|
505
|
-
|
|
500
|
+
{ class: "hy-table-dropdown-menu" },
|
|
506
501
|
{
|
|
507
502
|
default: withCtx(() => [
|
|
508
503
|
(openBlock(true), createElementBlock(
|
|
@@ -623,10 +618,10 @@ const _sfc_main = {
|
|
|
623
618
|
"is-always": false,
|
|
624
619
|
"over-line": 2,
|
|
625
620
|
content: unref(renderContentHandler)(column, { column, row, $index, cellIndex })
|
|
626
|
-
}, null, 8, ["content"])) : (openBlock(), createElementBlock("span", {
|
|
621
|
+
}, null, 8, ["content"])) : column.type !== "expand" ? (openBlock(), createElementBlock("span", {
|
|
627
622
|
key: 1,
|
|
628
623
|
class: "text-auxiliary"
|
|
629
|
-
}, "- -"))
|
|
624
|
+
}, "- -")) : createCommentVNode("v-if", true)
|
|
630
625
|
],
|
|
631
626
|
64
|
|
632
627
|
/* STABLE_FRAGMENT */
|
|
@@ -349,6 +349,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
349
349
|
}
|
|
350
350
|
function clearSelection() {
|
|
351
351
|
tableRef.value?.clearSelection();
|
|
352
|
+
selectedList.value = [];
|
|
352
353
|
}
|
|
353
354
|
function getSelectedList() {
|
|
354
355
|
return selectedList.value;
|
|
@@ -372,12 +373,15 @@ const useAppTableWrapper = (hy) => {
|
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
|
-
function onTableSelectHandler(selectList = [], row) {
|
|
376
|
+
function onTableSelectHandler(selectList = [], row, isAll = false) {
|
|
376
377
|
if (selectList.length === 0 && tableDataSource.value.length === 0) {
|
|
377
378
|
clearSelection();
|
|
378
379
|
}
|
|
379
380
|
selectedList.value = [...selectList];
|
|
380
381
|
emits("on-select-checkbox", [...selectList], row);
|
|
382
|
+
if (isAll) {
|
|
383
|
+
emits("select-all", selectList);
|
|
384
|
+
}
|
|
381
385
|
}
|
|
382
386
|
function clearSelectedList(list = []) {
|
|
383
387
|
selectedList.value = list || [];
|
|
@@ -404,13 +408,6 @@ const useAppTableWrapper = (hy) => {
|
|
|
404
408
|
}
|
|
405
409
|
return className.filter(Boolean).join(" ");
|
|
406
410
|
}
|
|
407
|
-
const isSearchFocus = ref(false);
|
|
408
|
-
function onSearchInputHandler() {
|
|
409
|
-
isSearchFocus.value = true;
|
|
410
|
-
}
|
|
411
|
-
function onSearchBlurHandler() {
|
|
412
|
-
isSearchFocus.value = false;
|
|
413
|
-
}
|
|
414
411
|
watchEffect(() => {
|
|
415
412
|
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(
|
|
416
413
|
props.tableColumns,
|
|
@@ -444,10 +441,6 @@ const useAppTableWrapper = (hy) => {
|
|
|
444
441
|
onTableRowContextmenuHandler,
|
|
445
442
|
onTableRowClickHandler,
|
|
446
443
|
onTableColumnsSelectHandler,
|
|
447
|
-
// 搜索选中
|
|
448
|
-
isSearchFocus,
|
|
449
|
-
onSearchInputHandler,
|
|
450
|
-
onSearchBlurHandler,
|
|
451
444
|
showAppTableLoading,
|
|
452
445
|
closeAppTableLoading
|
|
453
446
|
};
|
|
@@ -51,6 +51,7 @@ function useAppTableSearch(hy) {
|
|
|
51
51
|
tableDataSource.value = data;
|
|
52
52
|
}
|
|
53
53
|
totalElements.value = res.data.totalElements;
|
|
54
|
+
hy.expandRowKeys.value = [];
|
|
54
55
|
emits("reqSuccess", tableDataSource.value);
|
|
55
56
|
}
|
|
56
57
|
}
|
|
@@ -64,7 +65,7 @@ function useAppTableSearch(hy) {
|
|
|
64
65
|
async function resetFn() {
|
|
65
66
|
await resetFields();
|
|
66
67
|
props.filterModel.query = null;
|
|
67
|
-
getData(1);
|
|
68
|
+
await getData(1);
|
|
68
69
|
}
|
|
69
70
|
function getParametersFn() {
|
|
70
71
|
return Object.assign(
|
|
@@ -84,6 +85,7 @@ function useAppTableSearch(hy) {
|
|
|
84
85
|
function setData(dataSource) {
|
|
85
86
|
tableDataSource.value = dataSource || [];
|
|
86
87
|
hy.loading.value = false;
|
|
88
|
+
emits("reqSuccess", tableDataSource.value);
|
|
87
89
|
}
|
|
88
90
|
function onSizeChangeHandler(val) {
|
|
89
91
|
props.filterModel.page = 1;
|
|
@@ -25,6 +25,14 @@
|
|
|
25
25
|
.hy-el-table-v2__row-cell {
|
|
26
26
|
padding: 8px 12px;
|
|
27
27
|
}
|
|
28
|
+
.hy-el-table-v2__expand-icon {
|
|
29
|
+
&:not(.is-expanded) svg {
|
|
30
|
+
transform: rotate(-90deg) !important;
|
|
31
|
+
}
|
|
32
|
+
&.is-expanded svg {
|
|
33
|
+
transform: rotate(0deg) !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
37
|
.hy-table-search {
|
|
30
38
|
width: 160px;
|
|
@@ -46,6 +54,7 @@
|
|
|
46
54
|
|
|
47
55
|
.hy-table-dropdown-menu.hy-el-dropdown-menu {
|
|
48
56
|
--hy-el-text-color-regular: rgba(var(--hy-main));
|
|
57
|
+
--hy-el-dropdown-menuItem-hover-color: rgba(var(--hy-main));
|
|
49
58
|
border: 1px solid rgba(var(--hy-main));
|
|
50
59
|
padding: 0px;
|
|
51
60
|
.hy-el-dropdown-menu__item {
|
|
@@ -54,5 +63,9 @@
|
|
|
54
63
|
&:last-child {
|
|
55
64
|
border-bottom: none;
|
|
56
65
|
}
|
|
66
|
+
&:not(.is-disabled):focus,
|
|
67
|
+
&:not(.is-disabled):hover {
|
|
68
|
+
font-weight: bold;
|
|
69
|
+
}
|
|
57
70
|
}
|
|
58
71
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useModel, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, toDisplayString, withCtx, renderSlot, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers, isRef, mergeModels } from 'vue';
|
|
1
|
+
import { defineComponent, useModel, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, toDisplayString, withCtx, renderSlot, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers, normalizeStyle, isRef, mergeModels } from 'vue';
|
|
2
2
|
import { ElTable, ElTableColumn, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem, ElAutoResizer, ElPagination } from 'element-plus';
|
|
3
3
|
import { MoreFilled } from '@element-plus/icons-vue';
|
|
4
4
|
import '../index.mjs';
|
|
@@ -235,9 +235,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
235
235
|
onTableRowContextmenuHandler,
|
|
236
236
|
onTableRowExpandChangeHandler,
|
|
237
237
|
onTableSelectHandler,
|
|
238
|
-
isSearchFocus,
|
|
239
|
-
onSearchInputHandler,
|
|
240
|
-
onSearchBlurHandler,
|
|
241
238
|
// useAppTableSearch
|
|
242
239
|
// 表单查询
|
|
243
240
|
totalElements,
|
|
@@ -411,8 +408,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
411
408
|
"font-size": `${unref(parseRem)(__props.fontSize)}rem`
|
|
412
409
|
},
|
|
413
410
|
"expand-row-keys": unref(expandRowKeys),
|
|
414
|
-
onSelect: unref(onTableSelectHandler),
|
|
415
|
-
onSelectAll: unref(onTableSelectHandler),
|
|
411
|
+
onSelect: (list, row) => unref(onTableSelectHandler)(list, row),
|
|
412
|
+
onSelectAll: (list) => unref(onTableSelectHandler)(list, null, true),
|
|
416
413
|
onRowClick: unref(onTableRowClickHandler),
|
|
417
414
|
onRowContextmenu: unref(onTableRowContextmenuHandler),
|
|
418
415
|
onExpandChange: unref(onTableRowExpandChangeHandler)
|
|
@@ -445,7 +442,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
445
442
|
key: 0,
|
|
446
443
|
ref_for: true
|
|
447
444
|
}, column, { "render-header": null }),
|
|
448
|
-
{
|
|
445
|
+
createSlots({
|
|
449
446
|
header: withCtx((scope) => [
|
|
450
447
|
createVNode(_sfc_main$2, {
|
|
451
448
|
type: "default",
|
|
@@ -535,7 +532,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
535
532
|
dropdown: withCtx(() => [
|
|
536
533
|
createVNode(
|
|
537
534
|
unref(ElDropdownMenu),
|
|
538
|
-
|
|
535
|
+
{ class: "hy-table-dropdown-menu" },
|
|
539
536
|
{
|
|
540
537
|
default: withCtx(() => [
|
|
541
538
|
(openBlock(true), createElementBlock(
|
|
@@ -648,7 +645,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
648
645
|
]),
|
|
649
646
|
_: 2
|
|
650
647
|
/* DYNAMIC */
|
|
651
|
-
},
|
|
648
|
+
}, [
|
|
649
|
+
column.type === "expand" ? {
|
|
650
|
+
name: "expand",
|
|
651
|
+
fn: withCtx(({ expandable, expanded }) => [
|
|
652
|
+
expandable ? (openBlock(), createBlock(unref(HyIcon), {
|
|
653
|
+
key: 0,
|
|
654
|
+
"svg-name": "dispatch-linear-arrow-down-bold",
|
|
655
|
+
"class-name": "!w-3 !h-3 text-main transition",
|
|
656
|
+
style: normalizeStyle({
|
|
657
|
+
transform: expanded ? "rotate(0deg)" : "rotate(-90deg)"
|
|
658
|
+
})
|
|
659
|
+
}, null, 8, ["style"])) : createCommentVNode("v-if", true)
|
|
660
|
+
]),
|
|
661
|
+
key: "0"
|
|
662
|
+
} : void 0
|
|
663
|
+
]),
|
|
652
664
|
1040
|
|
653
665
|
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
654
666
|
)) : createCommentVNode("v-if", true)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, unref, watch, openBlock, createElementBlock, createBlock, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createCommentVNode, normalizeStyle } from 'vue';
|
|
2
2
|
import { ElPopover, ElIcon } from 'element-plus';
|
|
3
|
-
import {
|
|
3
|
+
import { ArrowDown } from '@element-plus/icons-vue';
|
|
4
4
|
import '../../hooks/index.mjs';
|
|
5
5
|
import '../../utils/index.mjs';
|
|
6
6
|
import '../index.mjs';
|
|
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
20
20
|
type: {
|
|
21
21
|
type: String,
|
|
22
22
|
default: "default"
|
|
23
|
-
// default 默认 primary 亮色 success 添加 danger 删除
|
|
23
|
+
// default 默认 primary 亮色 success 添加 danger 删除 operate 操作
|
|
24
24
|
},
|
|
25
25
|
size: {
|
|
26
26
|
type: String,
|
|
@@ -50,7 +50,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
50
50
|
buttonClass: {
|
|
51
51
|
type: String,
|
|
52
52
|
default: () => {
|
|
53
|
-
return "
|
|
53
|
+
return "";
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
// 操作数据
|
|
@@ -193,7 +193,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
193
193
|
"bg-auxiliary": __props.type === "default",
|
|
194
194
|
"bg-success": __props.type === "success",
|
|
195
195
|
"bg-theme": __props.type === "primary",
|
|
196
|
-
"bg-danger-2": __props.type === "danger"
|
|
196
|
+
"bg-danger-2": __props.type === "danger",
|
|
197
|
+
"bg-success-3": __props.type === "operate"
|
|
197
198
|
}])
|
|
198
199
|
},
|
|
199
200
|
null,
|
|
@@ -283,12 +284,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
283
284
|
placement: "top"
|
|
284
285
|
}, {
|
|
285
286
|
default: withCtx(() => [
|
|
286
|
-
createVNode(unref(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
]),
|
|
290
|
-
_: 1
|
|
291
|
-
/* STABLE */
|
|
287
|
+
createVNode(unref(HyIcon), {
|
|
288
|
+
"svg-name": "dispatch-share1-prompt",
|
|
289
|
+
class: "!w-3 !h-3 ml-2 text-auxiliary"
|
|
292
290
|
})
|
|
293
291
|
]),
|
|
294
292
|
_: 1
|
|
@@ -88,7 +88,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
88
88
|
"uploaded",
|
|
89
89
|
"reset",
|
|
90
90
|
"submitting",
|
|
91
|
-
"submit"
|
|
91
|
+
"submit",
|
|
92
|
+
"submitProgress",
|
|
93
|
+
"tableDataChange"
|
|
92
94
|
], ["update:step"]),
|
|
93
95
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
94
96
|
const props = __props;
|
|
@@ -123,6 +125,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
123
125
|
const submitting = ref(false);
|
|
124
126
|
const submitProgress = ref(0);
|
|
125
127
|
const submitModel = ref("default");
|
|
128
|
+
function tableDataChange(e) {
|
|
129
|
+
emits("tableDataChange", e);
|
|
130
|
+
}
|
|
131
|
+
function setSubmitProgress(newSubmitProgress = 0) {
|
|
132
|
+
submitProgress.value = newSubmitProgress;
|
|
133
|
+
emits("submitProgress", newSubmitProgress);
|
|
134
|
+
}
|
|
126
135
|
function setData(data = []) {
|
|
127
136
|
if (!tableRef.value) return;
|
|
128
137
|
tableRef.value.setData(data);
|
|
@@ -240,13 +249,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
240
249
|
}
|
|
241
250
|
}
|
|
242
251
|
const submitList = [];
|
|
243
|
-
|
|
252
|
+
setSubmitProgress(0);
|
|
244
253
|
submitting.value = true;
|
|
245
254
|
emits("submitting");
|
|
246
255
|
for (let i = 0; i <= dataSource.length - 1; i++) {
|
|
247
256
|
const target = dataSource[i];
|
|
248
257
|
const { onlyId, errorMsg, errorMap, children, ...data } = target;
|
|
249
|
-
|
|
258
|
+
setSubmitProgress(Math.floor((i + 1) / total * 100));
|
|
250
259
|
if (errorMsg) {
|
|
251
260
|
continue;
|
|
252
261
|
}
|
|
@@ -510,6 +519,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
510
519
|
columnNum: __props.columnNum,
|
|
511
520
|
size: __props.size,
|
|
512
521
|
showAddBtn: __props.showAddBtn,
|
|
522
|
+
onTableDataChange: tableDataChange,
|
|
513
523
|
class: "h-0 flex-1"
|
|
514
524
|
}), createSlots({
|
|
515
525
|
_: 2
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, computed, nextTick, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
|
-
import { ElIcon } from 'element-plus';
|
|
3
|
-
import { Warning } from '@element-plus/icons-vue';
|
|
1
|
+
import { defineComponent, onMounted, watch, useTemplateRef, ref, computed, nextTick, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
4
2
|
import '../index.mjs';
|
|
5
3
|
import '../../utils/index.mjs';
|
|
6
4
|
import { doValidate } from './js/index.mjs';
|
|
@@ -10,6 +8,7 @@ import { isArray, isObject } from '../../utils/is.mjs';
|
|
|
10
8
|
import { cloneDeep } from '../../utils/handler.mjs';
|
|
11
9
|
import { HyButton } from '../hyButton/index.mjs';
|
|
12
10
|
import { HyTable } from '../hyTable/index.mjs';
|
|
11
|
+
import { HyIcon } from '../hyIcon/index.mjs';
|
|
13
12
|
import { HyForm } from '../hyForm/index.mjs';
|
|
14
13
|
|
|
15
14
|
import "./style/tableForm.scss";
|
|
@@ -68,10 +67,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
68
67
|
default: true
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
|
-
emits: ["validate"],
|
|
70
|
+
emits: ["validate", "tableDataChange"],
|
|
72
71
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
73
72
|
const props = __props;
|
|
74
73
|
const emits = __emit;
|
|
74
|
+
onMounted(() => {
|
|
75
|
+
watch(
|
|
76
|
+
() => dataSource.value,
|
|
77
|
+
() => {
|
|
78
|
+
emits("tableDataChange", dataSource.value);
|
|
79
|
+
},
|
|
80
|
+
{ deep: true, immediate: true }
|
|
81
|
+
);
|
|
82
|
+
});
|
|
75
83
|
const tableRef = useTemplateRef("tableRef");
|
|
76
84
|
const formRef = useTemplateRef("formRef");
|
|
77
85
|
const dataSource = ref([]);
|
|
@@ -165,10 +173,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
165
173
|
await initValidateHandler([data]);
|
|
166
174
|
if (!dataSource.value.length) {
|
|
167
175
|
dataSource.value = [data];
|
|
168
|
-
setData(dataSource.value);
|
|
169
176
|
} else {
|
|
170
177
|
dataSource.value.push(data);
|
|
171
178
|
}
|
|
179
|
+
setData(dataSource.value);
|
|
172
180
|
emits("validate", {
|
|
173
181
|
...statistics.value
|
|
174
182
|
});
|
|
@@ -435,12 +443,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
435
443
|
class: normalizeClass(["flex items-center gap-1.5 text-danger-2 transition-all duration-300 overflow-hidden", [row.errorMsg ? "h-full" : "h-0"]])
|
|
436
444
|
},
|
|
437
445
|
[
|
|
438
|
-
row.errorMsg ? (openBlock(), createBlock(unref(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
_: 1
|
|
443
|
-
/* STABLE */
|
|
446
|
+
row.errorMsg ? (openBlock(), createBlock(unref(HyIcon), {
|
|
447
|
+
key: 0,
|
|
448
|
+
"svg-name": "dispatch-share1-prompt",
|
|
449
|
+
class: "!w-3 !h-3"
|
|
444
450
|
})) : createCommentVNode("v-if", true),
|
|
445
451
|
createElementVNode(
|
|
446
452
|
"span",
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createCommentVNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
import "./style/tour.scss";
|
|
4
|
+
|
|
5
|
+
const __default__ = defineComponent({
|
|
6
|
+
name: "HyTour"
|
|
7
|
+
});
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
9
|
+
props: {},
|
|
10
|
+
emits: [],
|
|
11
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const emits = __emit;
|
|
14
|
+
__expose({});
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createElementBlock("div", null, [
|
|
17
|
+
createCommentVNode(" HyTour \u5185\u5BB9 ")
|
|
18
|
+
]);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { _sfc_main as default };
|
|
@@ -9,13 +9,16 @@ const treeTypeConfig = {
|
|
|
9
9
|
// 群组设备树形
|
|
10
10
|
group: "group",
|
|
11
11
|
// 群组树形
|
|
12
|
-
|
|
12
|
+
planGroupDevice: "planGroupDevice",
|
|
13
13
|
// 预案分组树形
|
|
14
14
|
cs: "cs",
|
|
15
15
|
// 采集站树形
|
|
16
16
|
teamUser: "teamUser",
|
|
17
17
|
// 队伍树形
|
|
18
|
-
userMail: "userMail"
|
|
18
|
+
userMail: "userMail",
|
|
19
|
+
// 用户通讯录树形
|
|
20
|
+
mapRail: "mapRail"
|
|
21
|
+
// 电子围栏树形
|
|
19
22
|
};
|
|
20
23
|
const searchTypeConfig = {
|
|
21
24
|
fullSearch: 1,
|
|
@@ -56,9 +56,10 @@ const useAppTreeWrapper = (hy) => {
|
|
|
56
56
|
itemHeight: 30,
|
|
57
57
|
// 可视区域外的缓冲项数量
|
|
58
58
|
bufferSize: 10,
|
|
59
|
-
//
|
|
59
|
+
// 相邻级节点间的水平缩进,单位为像素
|
|
60
60
|
indent: 16,
|
|
61
61
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
62
|
+
// 树形业务类型
|
|
62
63
|
business: props.treeType,
|
|
63
64
|
// 自定义整体的插槽
|
|
64
65
|
renderItem: props.treeType === treeTypeConfig.user ? (data, node) => setUserSlot(data, node) : setSlot("treeParentSlot"),
|
|
@@ -88,6 +89,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
88
89
|
},
|
|
89
90
|
// // 自定义状态模块
|
|
90
91
|
renderStatus: props.treeType === treeTypeConfig.device || props.treeType === treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
|
|
92
|
+
// 暂无数据插槽
|
|
91
93
|
renderEmpty: () => {
|
|
92
94
|
if (!props.showCustomEmpty || hy.filterValue.value) return true;
|
|
93
95
|
let renderEmpty = setSlot("renderEmpty");
|
|
@@ -98,7 +100,8 @@ const useAppTreeWrapper = (hy) => {
|
|
|
98
100
|
return setEmpty();
|
|
99
101
|
},
|
|
100
102
|
props: {
|
|
101
|
-
|
|
103
|
+
// 是否显示右侧业务状态
|
|
104
|
+
showStatus: props.showStatus,
|
|
102
105
|
disabled: (data) => {
|
|
103
106
|
if (data.dataType === 5 || data.dataType === 3) {
|
|
104
107
|
if (hy.disableSelectionMap.value) {
|
|
@@ -112,7 +115,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
112
115
|
},
|
|
113
116
|
rowSelection: {
|
|
114
117
|
type: props.showCheckbox ? "checkbox" : "radio",
|
|
118
|
+
// 是否高亮选中项
|
|
115
119
|
highlight: props.highlight,
|
|
120
|
+
// 是否严格遵循父子不互相关联
|
|
116
121
|
checkStrictly: props.checkStrictly,
|
|
117
122
|
// 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
|
|
118
123
|
showSelect: (data) => {
|
|
@@ -157,7 +162,6 @@ const useAppTreeWrapper = (hy) => {
|
|
|
157
162
|
// 筛选方法
|
|
158
163
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
159
164
|
let isFilter = true;
|
|
160
|
-
console.log("111111111", isFilter, props.filterMethod);
|
|
161
165
|
if (props.filterMethod) {
|
|
162
166
|
isFilter = props.filterMethod(data, {
|
|
163
167
|
filterValue: filterValue2
|
|
@@ -298,13 +302,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
298
302
|
}
|
|
299
303
|
});
|
|
300
304
|
content = `<div class="w-full h-full flex flex-col justify-center items-center">
|
|
301
|
-
<svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="
|
|
305
|
+
<svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="ops-list-no-data" class="svg-icon" style="width: 40px; height: 48px"><use data-v-19e5a669="" xlink:href="#icon-ops-list-no-data"></use></svg>
|
|
302
306
|
<span class="text-auxiliary text-sm mt-2">\u60A8\u5C1A\u672A\u6DFB\u52A0\u4EFB\u52A1\u8BBE\u5907</span>
|
|
303
307
|
${permissionIdList.includes("operator_deviceManage") ? '<span id="dispatch-add-device" class="inline-block border-b border-theme text-theme text-sm mt-2 cursor-pointer">\u53BB\u6DFB\u52A0</span>' : ""}
|
|
304
308
|
</div>`;
|
|
305
309
|
} else {
|
|
306
310
|
content = `<div class="w-full h-full flex flex-col justify-center items-center">
|
|
307
|
-
<svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="
|
|
311
|
+
<svg data-v-19e5a669="" data-v-56505d40="" aria-hidden="true" svgName="analytics-v3-card-device-offline" class="svg-icon" style="width: 40px; height: 40px"><use data-v-19e5a669="" xlink:href="#icon-analytics-v3-card-device-offline"></use></svg>
|
|
308
312
|
<span class="text-auxiliary text-sm mt-2">\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001</span>
|
|
309
313
|
<span class="text-auxiliary text-sm whitespace-nowrap">\u8BF7\u68C0\u67E5\u8BBE\u5907\u72B6\u6001\u6216\u7F51\u7EDC\u8FDE\u63A5</span>
|
|
310
314
|
</div>`;
|
|
@@ -463,13 +467,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
463
467
|
});
|
|
464
468
|
}
|
|
465
469
|
}
|
|
466
|
-
function setChecked(data, type) {
|
|
470
|
+
function setChecked(data, type = true) {
|
|
467
471
|
if (props.treeType === "device") {
|
|
468
472
|
virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
|
|
469
473
|
} else if (props.treeType) {
|
|
470
474
|
virtualTree?.setChecked(data.id, type, true);
|
|
471
475
|
} else if (!props.treeType && props.treeProps) {
|
|
472
|
-
virtualTree?.setChecked(data[`${props.treeProps.value}`], type,
|
|
476
|
+
virtualTree?.setChecked(data[`${props.treeProps.value}`], type, false);
|
|
473
477
|
}
|
|
474
478
|
}
|
|
475
479
|
function setSelectedOrg(deviceList) {
|
|
@@ -18,9 +18,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
18
18
|
/* 禁止选择 */
|
|
19
19
|
disableSelection: {
|
|
20
20
|
type: Array,
|
|
21
|
-
default: () =>
|
|
22
|
-
return [];
|
|
23
|
-
}
|
|
21
|
+
default: () => []
|
|
24
22
|
},
|
|
25
23
|
// 是否开启按照设备在线和离线状态排序,仅支持 device 和 groupDevice 业务类型
|
|
26
24
|
deviceOrderSort: {
|
|
@@ -30,37 +28,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
30
28
|
// 当前群组
|
|
31
29
|
orgGroupId: {
|
|
32
30
|
type: [Number, String],
|
|
33
|
-
default:
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
31
|
+
default: null
|
|
36
32
|
},
|
|
37
33
|
// 设置勤务状态
|
|
38
34
|
getDutyRoster: {
|
|
39
35
|
type: Boolean,
|
|
40
|
-
default:
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
36
|
+
default: false
|
|
43
37
|
},
|
|
44
38
|
// 仅展示在线数据
|
|
45
39
|
showOnlineOnly: {
|
|
46
40
|
type: Boolean,
|
|
47
|
-
default:
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
41
|
+
default: false
|
|
50
42
|
},
|
|
51
43
|
/* 是否开启多选框 */
|
|
52
44
|
showCheckbox: {
|
|
53
45
|
type: Boolean,
|
|
54
|
-
default:
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
46
|
+
default: true
|
|
57
47
|
},
|
|
58
48
|
/* 是否开启单选框 */
|
|
59
49
|
showSinglebox: {
|
|
60
50
|
type: Boolean,
|
|
61
|
-
default:
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
51
|
+
default: false
|
|
64
52
|
},
|
|
65
53
|
// 是否清除无数据的部门
|
|
66
54
|
clearEmptyBusiness: {
|
|
@@ -75,28 +63,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
75
63
|
// 树形类型
|
|
76
64
|
treeType: {
|
|
77
65
|
type: String,
|
|
78
|
-
default:
|
|
79
|
-
return treeTypeConfig.device;
|
|
80
|
-
}
|
|
66
|
+
default: treeTypeConfig.device
|
|
81
67
|
},
|
|
82
68
|
// 树形 props 类型 (treeType null时生效)
|
|
83
69
|
treeProps: {
|
|
84
70
|
type: Object,
|
|
85
|
-
default: () => {
|
|
86
|
-
return {};
|
|
87
|
-
}
|
|
71
|
+
default: () => ({})
|
|
88
72
|
},
|
|
89
73
|
// 树形 过滤参数 类型 (treeType null时生效)
|
|
90
74
|
treeFilterParam: {
|
|
91
75
|
type: Array,
|
|
92
|
-
default: () =>
|
|
93
|
-
return [];
|
|
94
|
-
}
|
|
76
|
+
default: () => []
|
|
95
77
|
},
|
|
96
78
|
// 是否显示通道节点的选择框
|
|
97
79
|
isShowChannelSelect: {
|
|
98
80
|
type: Boolean,
|
|
99
|
-
default:
|
|
81
|
+
default: false
|
|
100
82
|
},
|
|
101
83
|
// 是否显示自定义空数据显示
|
|
102
84
|
showCustomEmpty: {
|
|
@@ -105,9 +87,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
105
87
|
},
|
|
106
88
|
placeholder: {
|
|
107
89
|
type: String,
|
|
108
|
-
default:
|
|
109
|
-
return "\u8BF7\u8F93\u5165";
|
|
110
|
-
}
|
|
90
|
+
default: "\u8BF7\u8F93\u5165"
|
|
111
91
|
},
|
|
112
92
|
// 是否返回默认选择的数据
|
|
113
93
|
isBackDefaultSelected: {
|
|
@@ -117,13 +97,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
117
97
|
/* 默认选中列表 */
|
|
118
98
|
selectedByDefault: {
|
|
119
99
|
type: Array,
|
|
120
|
-
default: () =>
|
|
121
|
-
return [];
|
|
122
|
-
}
|
|
100
|
+
default: () => []
|
|
123
101
|
},
|
|
124
102
|
// 默认需要选中的部门ID
|
|
125
103
|
defaultSelectedOrgID: {
|
|
126
|
-
default:
|
|
104
|
+
default: null
|
|
127
105
|
},
|
|
128
106
|
// 搜索类型
|
|
129
107
|
searchType: {
|
|
@@ -184,6 +162,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
184
162
|
filterMethod: {
|
|
185
163
|
type: Function,
|
|
186
164
|
default: null
|
|
165
|
+
},
|
|
166
|
+
// 是否显示右侧业务状态
|
|
167
|
+
showStatus: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: true
|
|
187
170
|
}
|
|
188
171
|
},
|
|
189
172
|
emits: [
|