hy-dispatch-ui-v3 0.2.59 → 0.2.61
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 +131 -6
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/api/index.mjs +137 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
- package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/es/bussiness/index.mjs +1 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
- package/es/components/hyForm/form.vue.mjs +83 -31
- package/es/components/hyForm/js/index.mjs +9 -2
- package/es/components/hyForm/js/useAppForm.mjs +6 -36
- package/es/components/hyMap/map.vue.mjs +3 -3
- package/es/components/hyMenu/menu.vue.mjs +38 -23
- package/es/components/hyMenu/style/menu.scss +3 -1
- package/es/components/hyOrgCascader/js/index.mjs +2 -2
- package/es/components/hyRadioGroup/index.mjs +6 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
- package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
- package/es/components/hySearch/js/useAppSearch.mjs +3 -33
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
- package/es/components/hyTable/js/index.mjs +6 -3
- package/es/components/hyTable/js/search.mjs +1 -0
- package/es/components/hyTable/table.vue.mjs +11 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
- package/es/components/hyTree/js/index.mjs +69 -53
- package/es/components/hyTree/tree.vue.mjs +36 -1
- package/es/components/hyVideoPlayer/js/index.mjs +0 -1
- package/es/components/index.mjs +1 -0
- package/es/hooks/useApi.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +1 -1
- package/es/index.mjs +4 -1
- package/es/locale/en.mjs +17 -1
- package/es/locale/zh_CN.mjs +17 -1
- package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/es/style/index.scss +53 -0
- package/es/style/theme.scss +0 -53
- package/es/utils/form.mjs +56 -7
- package/es/utils/handler.mjs +5 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/map/hook/bigMap.mjs +4 -0
- package/es/utils/map/hook/gaode.mjs +3 -0
- package/es/utils/map/hook/leafletjs.mjs +10 -10
- package/es/utils/map/index.mjs +27 -7
- package/es/utils/tree.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/api/index.js +147 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
- package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/lib/bussiness/index.js +5 -0
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
- package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
- package/lib/components/hyForm/form.vue.js +79 -27
- package/lib/components/hyForm/js/index.js +9 -1
- package/lib/components/hyForm/js/useAppForm.js +5 -35
- package/lib/components/hyMap/map.vue.js +3 -3
- package/lib/components/hyMenu/menu.vue.js +37 -22
- package/lib/components/hyMenu/style/menu.scss +3 -1
- package/lib/components/hyOrgCascader/js/index.js +2 -2
- package/lib/components/hyRadioGroup/index.js +11 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
- package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
- package/lib/components/hySearch/js/useAppSearch.js +2 -32
- package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
- package/lib/components/hyTable/js/index.js +6 -3
- package/lib/components/hyTable/js/search.js +1 -0
- package/lib/components/hyTable/table.vue.js +43 -36
- package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
- package/lib/components/hyTableForm/tableForm.vue.js +6 -0
- package/lib/components/hyTree/js/index.js +69 -53
- package/lib/components/hyTree/tree.vue.js +36 -1
- package/lib/components/hyVideoPlayer/js/index.js +0 -1
- package/lib/components/index.js +14 -12
- package/lib/hooks/useApi.js +2 -2
- package/lib/index.js +61 -49
- package/lib/locale/en.js +17 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/lib/style/index.scss +53 -0
- package/lib/style/theme.scss +0 -53
- package/lib/utils/form.js +57 -5
- package/lib/utils/handler.js +5 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/map/hook/bigMap.js +4 -0
- package/lib/utils/map/hook/gaode.js +3 -0
- package/lib/utils/map/hook/leafletjs.js +10 -10
- package/lib/utils/map/index.js +26 -6
- package/lib/utils/tree.js +10 -0
- package/lib/version.js +1 -1
- package/package.json +2 -2
|
@@ -5,18 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
-
var index
|
|
8
|
+
var index = require('./js/index.js');
|
|
9
9
|
var search = require('./js/search.js');
|
|
10
10
|
var headerItem = require('./cpns/headerItem.vue.js');
|
|
11
11
|
var columnSelect = require('./cpns/columnSelect.vue.js');
|
|
12
12
|
var virtualTable = require('./cpns/virtualTable.vue.js');
|
|
13
13
|
var useLocale = require('../../hooks/useLocale.js');
|
|
14
14
|
var useMixins = require('../../hooks/useMixins.js');
|
|
15
|
-
var index = require('../hyIcon/index.js');
|
|
16
|
-
var index$
|
|
17
|
-
var index$
|
|
18
|
-
var index$
|
|
19
|
-
var index$
|
|
15
|
+
var index$1 = require('../hyIcon/index.js');
|
|
16
|
+
var index$2 = require('../hyTooltip/index.js');
|
|
17
|
+
var index$3 = require('../hyInput/index.js');
|
|
18
|
+
var index$4 = require('../hyButton/index.js');
|
|
19
|
+
var index$5 = require('../hySearch/index.js');
|
|
20
20
|
var adaptive = require('../../utils/adaptive.js');
|
|
21
21
|
var is = require('../../utils/is.js');
|
|
22
22
|
|
|
@@ -252,7 +252,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
252
252
|
getTableDataSource,
|
|
253
253
|
onSizeChangeHandler,
|
|
254
254
|
onCurrentChangeHandler,
|
|
255
|
-
onSearchQueryHandler
|
|
255
|
+
onSearchQueryHandler,
|
|
256
|
+
showAppTableLoading,
|
|
257
|
+
closeAppTableLoading
|
|
256
258
|
} = useMixins.useMixins(
|
|
257
259
|
{
|
|
258
260
|
props,
|
|
@@ -264,7 +266,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
264
266
|
operatorDropdownRef,
|
|
265
267
|
appSearchRef
|
|
266
268
|
},
|
|
267
|
-
[index
|
|
269
|
+
[index.useAppTableWrapper, search.useAppTableSearch]
|
|
268
270
|
);
|
|
269
271
|
if (props.defaultGetData) {
|
|
270
272
|
getData(1);
|
|
@@ -279,7 +281,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
279
281
|
getTableDataSource,
|
|
280
282
|
clearSelection,
|
|
281
283
|
clearSelectedList,
|
|
282
|
-
toggleRowExpansion
|
|
284
|
+
toggleRowExpansion,
|
|
285
|
+
showAppTableLoading,
|
|
286
|
+
closeAppTableLoading
|
|
283
287
|
});
|
|
284
288
|
return (_ctx, _cache) => {
|
|
285
289
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -308,7 +312,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
308
312
|
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2",
|
|
309
313
|
onClick: vue.unref(switchShowFilter)
|
|
310
314
|
}, [
|
|
311
|
-
vue.createVNode(vue.unref(index.HyIcon), {
|
|
315
|
+
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
312
316
|
"svg-name": "ops-button-screen",
|
|
313
317
|
"class-name": "!w-3 !h-3"
|
|
314
318
|
}),
|
|
@@ -320,7 +324,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
320
324
|
/* TEXT */
|
|
321
325
|
)
|
|
322
326
|
], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
|
|
323
|
-
vue.unref(searchPlaceholder) ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
327
|
+
vue.unref(searchPlaceholder) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
324
328
|
key: 2,
|
|
325
329
|
"is-always": "",
|
|
326
330
|
overLine: 1,
|
|
@@ -332,7 +336,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
332
336
|
}, null, 8, ["innerHTML"])
|
|
333
337
|
]),
|
|
334
338
|
default: vue.withCtx(() => [
|
|
335
|
-
vue.createVNode(vue.unref(index$
|
|
339
|
+
vue.createVNode(vue.unref(index$3.HyInputSearch), {
|
|
336
340
|
modelValue: __props.filterModel.query,
|
|
337
341
|
"onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
|
|
338
342
|
placeholder: vue.unref(t)("table.searchFor", [__props.controllerText || ""]),
|
|
@@ -341,13 +345,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
341
345
|
]),
|
|
342
346
|
_: 1
|
|
343
347
|
/* STABLE */
|
|
344
|
-
})) : (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
348
|
+
})) : (vue.openBlock(), vue.createBlock(vue.unref(index$4.HyButton), {
|
|
345
349
|
key: 3,
|
|
346
350
|
type: "primary",
|
|
347
351
|
onClick: ($event) => vue.unref(getData)()
|
|
348
352
|
}, {
|
|
349
353
|
default: vue.withCtx(() => [
|
|
350
|
-
vue.createVNode(vue.unref(index.HyIcon), {
|
|
354
|
+
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
351
355
|
class: "w-[12px] h-[12px]",
|
|
352
356
|
"svg-name": "ops-button-icon-refres-v2"
|
|
353
357
|
})
|
|
@@ -365,7 +369,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
365
369
|
])) : vue.createCommentVNode("v-if", true)
|
|
366
370
|
])) : vue.createCommentVNode("v-if", true),
|
|
367
371
|
vue.createCommentVNode(" \u67E5\u8BE2\u8FC7\u6EE4 "),
|
|
368
|
-
__props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
372
|
+
__props.filterColumns.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.HySearch), {
|
|
369
373
|
key: 1,
|
|
370
374
|
ref_key: "appSearchRef",
|
|
371
375
|
ref: appSearchRef,
|
|
@@ -449,11 +453,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
449
453
|
}, {
|
|
450
454
|
default: vue.withCtx(() => [
|
|
451
455
|
vue.renderSlot(_ctx.$slots, column.headerSlot, vue.mergeProps({ ref_for: true }, { column, $index: scope.$index }), () => [
|
|
452
|
-
!vue.unref(is.isEmpty)(vue.unref(index
|
|
456
|
+
!vue.unref(is.isEmpty)(vue.unref(index.renderHeaderHandler)(column, scope)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
453
457
|
key: 0,
|
|
454
458
|
"is-always": false,
|
|
455
459
|
"over-line": 1,
|
|
456
|
-
content: vue.unref(index
|
|
460
|
+
content: vue.unref(index.renderHeaderHandler)(column, scope)
|
|
457
461
|
}, null, 8, ["content"])) : vue.createCommentVNode("v-if", true)
|
|
458
462
|
])
|
|
459
463
|
]),
|
|
@@ -469,12 +473,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
469
473
|
(vue.openBlock(true), vue.createElementBlock(
|
|
470
474
|
vue.Fragment,
|
|
471
475
|
null,
|
|
472
|
-
vue.renderList(vue.unref(index
|
|
476
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
473
477
|
column,
|
|
474
478
|
scope,
|
|
475
479
|
"default"
|
|
476
480
|
), (citem, cindex) => {
|
|
477
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
481
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
478
482
|
key: cindex,
|
|
479
483
|
"is-always": "",
|
|
480
484
|
overLine: 1,
|
|
@@ -482,12 +486,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
482
486
|
}, {
|
|
483
487
|
default: vue.withCtx(() => [
|
|
484
488
|
vue.createElementVNode("div", {
|
|
485
|
-
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border
|
|
486
|
-
|
|
489
|
+
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border", [
|
|
490
|
+
citem.className,
|
|
491
|
+
vue.unref(index.operatorDisabledHandler)(citem, scope) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
|
|
492
|
+
]]),
|
|
493
|
+
onClick: vue.withModifiers(($event) => vue.unref(index.operatorClickHandler)(cindex, column, scope, "default"), ["stop"]),
|
|
487
494
|
onContextmenu: vue.withModifiers(() => {
|
|
488
495
|
}, ["stop"])
|
|
489
496
|
}, [
|
|
490
|
-
vue.createVNode(vue.unref(index.HyIcon), {
|
|
497
|
+
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
491
498
|
"svg-name": citem.svgName,
|
|
492
499
|
"class-name": "!w-4 !h-4"
|
|
493
500
|
}, null, 8, ["svg-name"]),
|
|
@@ -513,7 +520,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
513
520
|
128
|
|
514
521
|
/* KEYED_FRAGMENT */
|
|
515
522
|
)),
|
|
516
|
-
vue.unref(index
|
|
523
|
+
vue.unref(index.operatorFilterHandler)(column, scope, "more")?.length ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdown), {
|
|
517
524
|
key: 0,
|
|
518
525
|
ref_for: true,
|
|
519
526
|
ref_key: "operatorDropdownRef",
|
|
@@ -521,7 +528,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
521
528
|
trigger: "click",
|
|
522
529
|
"popper-style": "min-width: 150px",
|
|
523
530
|
placement: "bottom",
|
|
524
|
-
onCommand: ($event) => vue.unref(index
|
|
531
|
+
onCommand: ($event) => vue.unref(index.operatorClickHandler)($event, column, scope, "more")
|
|
525
532
|
}, {
|
|
526
533
|
dropdown: vue.withCtx(() => [
|
|
527
534
|
vue.createVNode(
|
|
@@ -532,7 +539,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
532
539
|
(vue.openBlock(true), vue.createElementBlock(
|
|
533
540
|
vue.Fragment,
|
|
534
541
|
null,
|
|
535
|
-
vue.renderList(vue.unref(index
|
|
542
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
536
543
|
column,
|
|
537
544
|
scope,
|
|
538
545
|
"more"
|
|
@@ -540,7 +547,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
540
547
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
541
548
|
key: cindex,
|
|
542
549
|
command: cindex,
|
|
543
|
-
disabled: vue.unref(index
|
|
550
|
+
disabled: vue.unref(index.operatorDisabledHandler)(citem, scope)
|
|
544
551
|
}, {
|
|
545
552
|
default: vue.withCtx(() => [
|
|
546
553
|
vue.createElementVNode("span", null, [
|
|
@@ -551,13 +558,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
551
558
|
1
|
|
552
559
|
/* TEXT */
|
|
553
560
|
),
|
|
554
|
-
vue.unref(index
|
|
561
|
+
vue.unref(index.operatorDisabledHandler)(citem, scope) ? (vue.openBlock(), vue.createElementBlock(
|
|
555
562
|
"span",
|
|
556
563
|
{
|
|
557
564
|
key: 0,
|
|
558
565
|
class: "text-xs leading-1"
|
|
559
566
|
},
|
|
560
|
-
"\uFF08" + vue.toDisplayString(vue.unref(index
|
|
567
|
+
"\uFF08" + vue.toDisplayString(vue.unref(index.operatorDisableTextdHandler)(citem, scope)) + "\uFF09",
|
|
561
568
|
1
|
|
562
569
|
/* TEXT */
|
|
563
570
|
)) : vue.createCommentVNode("v-if", true)
|
|
@@ -585,7 +592,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
585
592
|
onContextmenu: vue.withModifiers(() => {
|
|
586
593
|
}, ["stop"])
|
|
587
594
|
}, [
|
|
588
|
-
vue.createVNode(vue.unref(index$
|
|
595
|
+
vue.createVNode(vue.unref(index$2.HyTooltip), {
|
|
589
596
|
"is-always": "",
|
|
590
597
|
overLine: 1,
|
|
591
598
|
content: vue.unref(t)("table.moreOperations")
|
|
@@ -623,11 +630,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
623
630
|
vue.Fragment,
|
|
624
631
|
{ key: 2 },
|
|
625
632
|
[
|
|
626
|
-
!vue.unref(is.isEmpty)(vue.unref(index
|
|
633
|
+
!vue.unref(is.isEmpty)(vue.unref(index.renderContentHandler)(column, scope)) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyTooltip), {
|
|
627
634
|
key: 0,
|
|
628
635
|
"over-line": 2,
|
|
629
636
|
"is-always": false,
|
|
630
|
-
content: vue.unref(index
|
|
637
|
+
content: vue.unref(index.renderContentHandler)(column, scope)
|
|
631
638
|
}, null, 8, ["content"])) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
632
639
|
key: 1,
|
|
633
640
|
class: "text-auxiliary"
|
|
@@ -754,7 +761,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
754
761
|
"virtual-triggering": "",
|
|
755
762
|
trigger: "contextmenu",
|
|
756
763
|
placement: "bottom",
|
|
757
|
-
onCommand: ($event) => vue.unref(index
|
|
764
|
+
onCommand: ($event) => vue.unref(index.operatorClickHandler)(
|
|
758
765
|
$event,
|
|
759
766
|
vue.unref(tableTriggerRef).column,
|
|
760
767
|
vue.unref(tableTriggerRef).scope
|
|
@@ -766,14 +773,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
766
773
|
(vue.openBlock(true), vue.createElementBlock(
|
|
767
774
|
vue.Fragment,
|
|
768
775
|
null,
|
|
769
|
-
vue.renderList(vue.unref(index
|
|
776
|
+
vue.renderList(vue.unref(index.operatorFilterHandler)(
|
|
770
777
|
vue.unref(tableTriggerRef).column,
|
|
771
778
|
vue.unref(tableTriggerRef).scope
|
|
772
779
|
), (citem, cindex) => {
|
|
773
780
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDropdownItem), {
|
|
774
781
|
key: cindex,
|
|
775
782
|
command: cindex,
|
|
776
|
-
disabled: vue.unref(index
|
|
783
|
+
disabled: vue.unref(index.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope)
|
|
777
784
|
}, {
|
|
778
785
|
default: vue.withCtx(() => [
|
|
779
786
|
vue.createElementVNode("span", null, [
|
|
@@ -784,13 +791,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
784
791
|
1
|
|
785
792
|
/* TEXT */
|
|
786
793
|
),
|
|
787
|
-
vue.unref(index
|
|
794
|
+
vue.unref(index.operatorDisabledHandler)(citem, vue.unref(tableTriggerRef).scope) ? (vue.openBlock(), vue.createElementBlock(
|
|
788
795
|
"span",
|
|
789
796
|
{
|
|
790
797
|
key: 0,
|
|
791
798
|
class: "text-xs leading-1"
|
|
792
799
|
},
|
|
793
|
-
"\uFF08" + vue.toDisplayString(vue.unref(index
|
|
800
|
+
"\uFF08" + vue.toDisplayString(vue.unref(index.operatorDisableTextdHandler)(citem, vue.unref(tableTriggerRef).scope)) + "\uFF09",
|
|
794
801
|
1
|
|
795
802
|
/* TEXT */
|
|
796
803
|
)) : vue.createCommentVNode("v-if", true)
|
|
@@ -65,6 +65,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
65
65
|
beforeDataHandle: {
|
|
66
66
|
type: Function
|
|
67
67
|
},
|
|
68
|
+
onExpandRowChange: {
|
|
69
|
+
type: Function
|
|
70
|
+
},
|
|
68
71
|
templateConfig: {
|
|
69
72
|
type: Object,
|
|
70
73
|
default: () => ({
|
|
@@ -153,7 +156,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
153
156
|
try {
|
|
154
157
|
isUploading.value = true;
|
|
155
158
|
emits("uploading");
|
|
156
|
-
formColumns;
|
|
157
159
|
const data = await index$2.doReadExcel(files, props);
|
|
158
160
|
if (!data) {
|
|
159
161
|
elementPlus.ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
|
|
@@ -527,6 +529,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
527
529
|
}, _ctx.$attrs, {
|
|
528
530
|
tableColumns: __props.tableColumns,
|
|
529
531
|
formColumns: __props.formColumns,
|
|
532
|
+
onExpandRowChange: __props.onExpandRowChange,
|
|
530
533
|
rules: __props.rules,
|
|
531
534
|
rowClickExpand: __props.rowClickExpand,
|
|
532
535
|
columnNum: __props.columnNum,
|
|
@@ -544,7 +547,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
544
547
|
])
|
|
545
548
|
};
|
|
546
549
|
})
|
|
547
|
-
]), 1040, ["tableColumns", "formColumns", "rules", "rowClickExpand", "columnNum", "size"])
|
|
550
|
+
]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size"])
|
|
548
551
|
])) : vue.createCommentVNode("v-if", true),
|
|
549
552
|
submitting.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
550
553
|
key: 1,
|
|
@@ -21,6 +21,9 @@ const __default__ = vue.defineComponent({
|
|
|
21
21
|
});
|
|
22
22
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
23
23
|
props: {
|
|
24
|
+
onExpandRowChange: {
|
|
25
|
+
type: Function
|
|
26
|
+
},
|
|
24
27
|
// 表格配置项
|
|
25
28
|
tableColumns: {
|
|
26
29
|
// 表格的列
|
|
@@ -135,6 +138,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
140
|
async function onExpandRowChange(row) {
|
|
141
|
+
if (props.onExpandRowChange) {
|
|
142
|
+
props.onExpandRowChange(row);
|
|
143
|
+
}
|
|
138
144
|
await vue.nextTick();
|
|
139
145
|
if (!formRef.value) return;
|
|
140
146
|
const valid = await initValidateHandler([row]);
|
|
@@ -16,7 +16,7 @@ const deviceStatus = {
|
|
|
16
16
|
1: "\u5728\u7EBF"
|
|
17
17
|
};
|
|
18
18
|
const useAppTreeWrapper = (hy) => {
|
|
19
|
-
const { props, emits, slots, treeRef, VirtualTree } = hy;
|
|
19
|
+
const { props: props2, emits, slots, treeRef, VirtualTree } = hy;
|
|
20
20
|
const instance = vue.getCurrentInstance();
|
|
21
21
|
const slotAppContext = instance ? {
|
|
22
22
|
...instance.appContext,
|
|
@@ -35,17 +35,17 @@ const useAppTreeWrapper = (hy) => {
|
|
|
35
35
|
const selectFilterList = vue.ref([]);
|
|
36
36
|
const loading = vue.ref(true);
|
|
37
37
|
vue.watch(
|
|
38
|
-
() =>
|
|
38
|
+
() => props2.showCheckbox,
|
|
39
39
|
(newVal) => {
|
|
40
40
|
virtualTree?.setRowSelection({
|
|
41
|
-
type:
|
|
41
|
+
type: props2.showCheckbox ? "checkbox" : "radio"
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
function getData(dataList) {
|
|
46
46
|
return new Promise((resolve) => {
|
|
47
47
|
hy.loading.value = true;
|
|
48
|
-
if (
|
|
48
|
+
if (props2.disableSelection?.length) {
|
|
49
49
|
setDisAbleSelectionMap();
|
|
50
50
|
}
|
|
51
51
|
if (!virtualTree) {
|
|
@@ -61,9 +61,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
61
61
|
// 可视区域外的缓冲项数量
|
|
62
62
|
indent: 16,
|
|
63
63
|
emptyText: "\u6682\u65E0\u6570\u636E",
|
|
64
|
-
business:
|
|
64
|
+
business: props2.treeType,
|
|
65
65
|
// 自定义整体的插槽
|
|
66
|
-
renderItem:
|
|
66
|
+
renderItem: props2.treeType === treeConfig.treeTypeConfig.user ? (data, node) => setUserSlot(data) : setSlot("treeParentSlot"),
|
|
67
67
|
// // 自定义状态右侧插槽
|
|
68
68
|
renderRight: (data) => {
|
|
69
69
|
let renderRight = setSlot("renderRight");
|
|
@@ -89,9 +89,9 @@ const useAppTreeWrapper = (hy) => {
|
|
|
89
89
|
return true;
|
|
90
90
|
},
|
|
91
91
|
// // 自定义状态模块
|
|
92
|
-
renderStatus:
|
|
92
|
+
renderStatus: props2.treeType === treeConfig.treeTypeConfig.device || props2.treeType === treeConfig.treeTypeConfig.channel ? (data) => setRenderStatus(data) : null,
|
|
93
93
|
renderEmpty: () => {
|
|
94
|
-
if (!
|
|
94
|
+
if (!props2.showCustomEmpty || hy.filterValue.value) return true;
|
|
95
95
|
let renderEmpty = setSlot("renderEmpty");
|
|
96
96
|
if (renderEmpty) {
|
|
97
97
|
const target = renderEmpty();
|
|
@@ -102,29 +102,31 @@ const useAppTreeWrapper = (hy) => {
|
|
|
102
102
|
props: {
|
|
103
103
|
showStatus: true,
|
|
104
104
|
disabled: (data) => {
|
|
105
|
-
if (data.dataType ===
|
|
105
|
+
if (data.dataType === 5 || data.dataType === 3) {
|
|
106
106
|
if (hy.disableSelectionMap.value) {
|
|
107
|
-
return hy.disableSelectionMap.value.get(data.id);
|
|
107
|
+
return data.dataType === 3 ? hy.disableSelectionMap.value.get(data.deviceId) : hy.disableSelectionMap.value.get(data.id);
|
|
108
108
|
}
|
|
109
109
|
return false;
|
|
110
110
|
}
|
|
111
111
|
return false;
|
|
112
112
|
},
|
|
113
|
-
...
|
|
113
|
+
...props2.treeProps
|
|
114
114
|
},
|
|
115
115
|
rowSelection: {
|
|
116
|
-
type:
|
|
117
|
-
highlight:
|
|
118
|
-
checkStrictly:
|
|
116
|
+
type: props2.showCheckbox ? "checkbox" : "radio",
|
|
117
|
+
highlight: props2.highlight,
|
|
118
|
+
checkStrictly: props2.checkStrictly,
|
|
119
119
|
// 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
|
|
120
120
|
showSelect: (data) => {
|
|
121
121
|
if (data.dataType === 1) {
|
|
122
|
-
return
|
|
122
|
+
return props2.showCheckbox;
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return props2.showCheckbox || props2.showSinglebox;
|
|
125
125
|
},
|
|
126
126
|
// 单选时是否可以取消选择
|
|
127
|
-
cancelable:
|
|
127
|
+
cancelable: props2.cancelable,
|
|
128
|
+
// 是否显示多选框或单选框
|
|
129
|
+
showSelectBox: props2.showSelectBox,
|
|
128
130
|
// 选中回调
|
|
129
131
|
onCheckChange: (data, info, checked) => {
|
|
130
132
|
console.log("onCheckChange", info);
|
|
@@ -141,25 +143,35 @@ const useAppTreeWrapper = (hy) => {
|
|
|
141
143
|
);
|
|
142
144
|
}
|
|
143
145
|
},
|
|
146
|
+
// 是否在点击节点的时候展开或者收缩节点
|
|
147
|
+
expandOnClickNode: props2.expandOnClickNode,
|
|
148
|
+
// 是否在点击节点的时候选中节点
|
|
149
|
+
checkOnClickNode: props2.checkOnClickNode,
|
|
150
|
+
// 点击叶节点(最后一个子节点)时是否检查或取消节点
|
|
151
|
+
checkOnClickLeaf: props2.checkOnClickLeaf,
|
|
152
|
+
// 双击父节点会触发选中功能
|
|
153
|
+
checkOnDblclickParentNode: props2.checkOnDblclickParentNode,
|
|
144
154
|
// 筛选方法
|
|
145
155
|
filterMethod: ({ filterValue: filterValue2 }, data) => {
|
|
146
156
|
let isFilter = true;
|
|
147
157
|
if (filterValue2) {
|
|
148
158
|
isFilter = isFilter && !!filterNodeMethod(data, filterValue2, {
|
|
149
|
-
treeFilterParam:
|
|
159
|
+
treeFilterParam: props2.treeFilterParam
|
|
150
160
|
});
|
|
151
161
|
}
|
|
152
162
|
return isFilter;
|
|
153
163
|
},
|
|
154
164
|
businessConfig: {
|
|
155
165
|
// 是否开启按在线离线状态排序
|
|
156
|
-
sortByStatus:
|
|
166
|
+
sortByStatus: props2.deviceOrderSort,
|
|
157
167
|
// 是否只显示在线设备
|
|
158
|
-
showOnlineState:
|
|
168
|
+
showOnlineState: props2.showOnlineOnly,
|
|
159
169
|
// 是否清空没有业务项(设备、用户、采集器)的部门和群组
|
|
160
|
-
clearEmptyBusiness:
|
|
170
|
+
clearEmptyBusiness: props2.clearEmptyBusiness,
|
|
161
171
|
// 是否显示通道节点的选择框
|
|
162
|
-
isShowChannelSelect:
|
|
172
|
+
isShowChannelSelect: props2.isShowChannelSelect,
|
|
173
|
+
// 初始化过滤数据
|
|
174
|
+
filterConfig: props2.filterConfig
|
|
163
175
|
},
|
|
164
176
|
// 初始化时处理数据,想回显必须return值,若想要过滤,可不return
|
|
165
177
|
handleMethod: (data) => {
|
|
@@ -180,7 +192,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
180
192
|
},
|
|
181
193
|
// 双击事件
|
|
182
194
|
onNodeDblClick: (data, node, event) => {
|
|
183
|
-
if (
|
|
195
|
+
if (props2.treeType !== "channel") {
|
|
184
196
|
emits("on-dblclick", [{ ...data }]);
|
|
185
197
|
} else {
|
|
186
198
|
if (data.channelId) {
|
|
@@ -220,13 +232,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
220
232
|
document.body.click();
|
|
221
233
|
},
|
|
222
234
|
onLoad: () => {
|
|
223
|
-
if (
|
|
235
|
+
if (props2.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
224
236
|
elementPlus.ElMessage.warning("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
225
237
|
}
|
|
226
|
-
if (
|
|
238
|
+
if (props2.defaultSelectedOrgID && props2.showCheckbox && props2.treeType === "device") {
|
|
227
239
|
setSelectedOrg(dataList);
|
|
228
|
-
} else if (
|
|
229
|
-
setCheckedKeys(
|
|
240
|
+
} else if (props2.selectedByDefault?.length) {
|
|
241
|
+
setCheckedKeys(props2.selectedByDefault);
|
|
230
242
|
}
|
|
231
243
|
if (hy.filterValue.value) {
|
|
232
244
|
getFilterValue();
|
|
@@ -242,13 +254,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
242
254
|
{
|
|
243
255
|
data: dataList,
|
|
244
256
|
businessConfig: {
|
|
245
|
-
sortByStatus:
|
|
246
|
-
showOnlineState:
|
|
247
|
-
clearEmptyBusiness:
|
|
257
|
+
sortByStatus: props2.deviceOrderSort,
|
|
258
|
+
showOnlineState: props2.showOnlineOnly,
|
|
259
|
+
clearEmptyBusiness: props2.clearEmptyBusiness
|
|
248
260
|
}
|
|
249
261
|
},
|
|
250
262
|
() => {
|
|
251
|
-
if (
|
|
263
|
+
if (props2.showOnlineOnly && !virtualTree._flattenTree?.length && !hy.filterValue.value) {
|
|
252
264
|
elementPlus.ElMessage.success("\u6682\u65E0\u8BBE\u5907\u5904\u4E8E\u5728\u7EBF\u72B6\u6001");
|
|
253
265
|
}
|
|
254
266
|
if (hy.filterValue.value) {
|
|
@@ -265,7 +277,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
265
277
|
}
|
|
266
278
|
function setEmpty() {
|
|
267
279
|
let content = ``;
|
|
268
|
-
if (!
|
|
280
|
+
if (!props2.showOnlineOnly) {
|
|
269
281
|
setTimeout(() => {
|
|
270
282
|
if (hy.addDeviceDom.value) {
|
|
271
283
|
hy.addDeviceDom.value.removeEventListener("click", addDevice);
|
|
@@ -294,7 +306,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
294
306
|
}
|
|
295
307
|
function setDisAbleSelectionMap() {
|
|
296
308
|
const map = /* @__PURE__ */ new Map();
|
|
297
|
-
|
|
309
|
+
props2.disableSelection.forEach((v) => {
|
|
298
310
|
map.set(v.id, true);
|
|
299
311
|
});
|
|
300
312
|
hy.disableSelectionMap.value = map;
|
|
@@ -318,7 +330,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
318
330
|
container.style.display = "flex";
|
|
319
331
|
container.style.width = "100%";
|
|
320
332
|
const dutyHtml = `<div class="flex treeDeviceBox">
|
|
321
|
-
${
|
|
333
|
+
${props2.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"
|
|
322
334
|
style="border-color: ${data.rosterContentColor};background-color: ${data.rosterContentColor}70;">
|
|
323
335
|
${data.rosterContentSimple}
|
|
324
336
|
</span>` : ""}
|
|
@@ -387,31 +399,35 @@ const useAppTreeWrapper = (hy) => {
|
|
|
387
399
|
emits("on-addDevice");
|
|
388
400
|
}
|
|
389
401
|
function singleRemovalFn(row) {
|
|
390
|
-
if (
|
|
402
|
+
if (props2.treeType === "device") {
|
|
391
403
|
virtualTree.setChecked(row.channelId || row.deviceId, false, true);
|
|
392
|
-
} else if (
|
|
404
|
+
} else if (props2.treeType) {
|
|
393
405
|
virtualTree.setChecked(row.id, false, true);
|
|
394
|
-
} else if (!
|
|
395
|
-
virtualTree.setChecked(row[`${
|
|
406
|
+
} else if (!props2.treeType && props2.treeProps) {
|
|
407
|
+
virtualTree.setChecked(row[`${props2.treeProps.value}`], false, true);
|
|
396
408
|
}
|
|
397
409
|
}
|
|
398
410
|
function setCheckedKeys(dataList) {
|
|
399
|
-
if (
|
|
411
|
+
if (props2.treeType === "device" || props2.treeType === "channel") {
|
|
400
412
|
virtualTree?.setCheckedKeys(
|
|
401
413
|
dataList.map((v) => v.channelId || v.deviceId),
|
|
402
414
|
true
|
|
403
415
|
);
|
|
404
|
-
} else if (
|
|
416
|
+
} else if (props2.treeType) {
|
|
405
417
|
virtualTree?.setCheckedKeys(
|
|
406
418
|
dataList.map((v) => v.id),
|
|
407
419
|
true
|
|
408
420
|
);
|
|
409
|
-
} else if (!
|
|
421
|
+
} else if (!props2.treeType && props2.treeProps) {
|
|
422
|
+
console.log(
|
|
423
|
+
"\u9009\u4E2D\u56DE\u8C03",
|
|
424
|
+
dataList.map((v) => v[`${props2.treeProps.value}`])
|
|
425
|
+
);
|
|
410
426
|
virtualTree?.setCheckedKeys(
|
|
411
|
-
dataList.map((v) => v[`${
|
|
427
|
+
dataList.map((v) => v[`${props2.treeProps.value}`])
|
|
412
428
|
);
|
|
413
429
|
}
|
|
414
|
-
if (
|
|
430
|
+
if (props2.isBackDefaultSelected) {
|
|
415
431
|
setTimeout(() => {
|
|
416
432
|
const deviceList = virtualTree?.getCheckedBusinessNodes(true) || [];
|
|
417
433
|
emits("on-selectedDataList", deviceList);
|
|
@@ -419,17 +435,17 @@ const useAppTreeWrapper = (hy) => {
|
|
|
419
435
|
}
|
|
420
436
|
}
|
|
421
437
|
function setChecked(data, type) {
|
|
422
|
-
if (
|
|
438
|
+
if (props2.treeType === "device") {
|
|
423
439
|
virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
|
|
424
|
-
} else if (
|
|
440
|
+
} else if (props2.treeType) {
|
|
425
441
|
virtualTree?.setChecked(data.id, type, true);
|
|
426
|
-
} else if (!
|
|
427
|
-
virtualTree?.setChecked(data[`${
|
|
442
|
+
} else if (!props2.treeType && props2.treeProps) {
|
|
443
|
+
virtualTree?.setChecked(data[`${props2.treeProps.value}`], type, true);
|
|
428
444
|
}
|
|
429
445
|
}
|
|
430
446
|
function setSelectedOrg(deviceList) {
|
|
431
447
|
for (let i = 0; i < deviceList.length; i++) {
|
|
432
|
-
if (
|
|
448
|
+
if (props2.defaultSelectedOrgID === deviceList[i].id) {
|
|
433
449
|
if (deviceList[i].deviceList?.length) {
|
|
434
450
|
setCheckedKeys(deviceList[i].deviceList);
|
|
435
451
|
}
|
|
@@ -445,13 +461,13 @@ const useAppTreeWrapper = (hy) => {
|
|
|
445
461
|
return virtualTree?.getCheckedBusinessNodes(true) || [];
|
|
446
462
|
}
|
|
447
463
|
function setFilterListType(type) {
|
|
448
|
-
if (
|
|
464
|
+
if (props2.selectFilterList?.length) {
|
|
449
465
|
hy.selectFilterList.value = JSON.parse(
|
|
450
|
-
JSON.stringify(
|
|
466
|
+
JSON.stringify(props2.selectFilterList)
|
|
451
467
|
);
|
|
452
468
|
return;
|
|
453
469
|
}
|
|
454
|
-
if (
|
|
470
|
+
if (props2.treeType === "device") {
|
|
455
471
|
hy.selectFilterList.value = [
|
|
456
472
|
{
|
|
457
473
|
label: "\u5168\u90E8",
|
|
@@ -469,7 +485,7 @@ const useAppTreeWrapper = (hy) => {
|
|
|
469
485
|
placeholder: "\u8BBE\u5907\u53F7\u3001\u8BBE\u5907\u540D\u79F0\u8FDB\u884C\u7B5B\u9009"
|
|
470
486
|
}
|
|
471
487
|
];
|
|
472
|
-
} else if (
|
|
488
|
+
} else if (props2.treeType === "user") {
|
|
473
489
|
hy.selectFilterList.value = [
|
|
474
490
|
{
|
|
475
491
|
label: "\u5168\u90E8",
|
|
@@ -531,7 +547,7 @@ function filterNodeMethod(data, value, { selectFilterType, treeFilterParam = []
|
|
|
531
547
|
const includesValue = (field) => {
|
|
532
548
|
return field && field.toString().includes(value.toString());
|
|
533
549
|
};
|
|
534
|
-
if (!
|
|
550
|
+
if (!props.treeType) {
|
|
535
551
|
let filterType = false;
|
|
536
552
|
for (let i = 0; i < treeFilterParam.length; i++) {
|
|
537
553
|
const item = treeFilterParam[i];
|