hy-dispatch-ui-v3 0.2.52 → 0.2.54

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.
Files changed (116) hide show
  1. package/dist/tailwind.css +53 -0
  2. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -11
  3. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +12 -22
  4. package/es/components/hyDialog/dialog.vue.mjs +9 -7
  5. package/es/components/hyForm/cpns/arrayItem.vue.mjs +5 -5
  6. package/es/components/hyForm/cpns/extraItem.vue.mjs +6 -1
  7. package/es/components/hyForm/cpns/formItem.vue.mjs +29 -14
  8. package/es/components/hyForm/js/index.mjs +29 -25
  9. package/es/components/hyForm/js/useAppForm.mjs +15 -30
  10. package/es/components/hyIconBox/iconBox.vue.mjs +1 -1
  11. package/es/components/hyIconBox/style/iconBox.scss +1 -1
  12. package/es/components/hyMap/index.mjs +6 -0
  13. package/es/components/hyMap/js/index.mjs +59 -0
  14. package/es/components/hyMap/map.vue.mjs +59 -0
  15. package/es/components/hyOrgCascader/js/index.mjs +53 -0
  16. package/es/components/hyOrgCascader/orgCascader.vue.mjs +22 -25
  17. package/es/components/hySearch/search.vue.mjs +6 -8
  18. package/es/components/hyTable/cpns/columnSelect.vue.mjs +10 -18
  19. package/es/components/hyTable/table.vue.mjs +8 -11
  20. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +6 -3
  21. package/es/components/hyTableForm/batchTableForm.vue.mjs +182 -135
  22. package/es/components/hyTableForm/js/index.mjs +2 -2
  23. package/es/components/hyTableForm/tableForm.vue.mjs +29 -20
  24. package/es/components/hyTooltip/tooltip.vue.mjs +1 -1
  25. package/es/components/hyTree/js/index.mjs +6 -4
  26. package/es/components/hyTree/tree.vue.mjs +7 -1
  27. package/es/components/index.mjs +1 -0
  28. package/es/hooks/index.mjs +1 -0
  29. package/es/hooks/useApi.mjs +11 -5
  30. package/es/hooks/useAudioPlayerConfig.mjs +13 -5
  31. package/es/hooks/useEnsureHyIcon.mjs +11 -5
  32. package/es/hooks/useLocale.mjs +6 -5
  33. package/es/hooks/usePermissionMap.mjs +13 -5
  34. package/es/hooks/useSubscribe.mjs +28 -0
  35. package/es/hooks/useTooltipConfig.mjs +11 -5
  36. package/es/hooks/useUserAvatarMap.mjs +13 -5
  37. package/es/hooks/useVideoPlayerConfig.mjs +13 -5
  38. package/es/index.mjs +3 -2
  39. package/es/static/map/CFCASIPInput.min.js +258 -0
  40. package/es/static/map/MarkerCluster.css +75 -0
  41. package/es/static/map/bigemap.css +838 -0
  42. package/es/static/map/bigemap.js +5 -0
  43. package/es/static/map/bm.geometryutil.js +754 -0
  44. package/es/static/map/bmDraw.css +329 -0
  45. package/es/static/map/bmDraw.js +181 -0
  46. package/es/static/map/car.png +0 -0
  47. package/es/static/map/markercluster.js +2679 -0
  48. package/es/static/map/moveMarker.js +74 -0
  49. package/es/utils/form.mjs +38 -2
  50. package/es/utils/index.mjs +1 -2
  51. package/es/utils/map/hook/bigMap.mjs +1136 -0
  52. package/es/utils/map/hook/gaode.mjs +683 -0
  53. package/es/utils/map/hook/leafletjs.mjs +1336 -0
  54. package/es/utils/map/index.mjs +291 -0
  55. package/es/utils/map/js/mapProxy.mjs +38 -0
  56. package/es/utils/map/js/webgis.mjs +153 -0
  57. package/es/version.mjs +1 -1
  58. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +46 -12
  59. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +13 -23
  60. package/lib/components/hyDialog/dialog.vue.js +9 -7
  61. package/lib/components/hyForm/cpns/arrayItem.vue.js +4 -4
  62. package/lib/components/hyForm/cpns/extraItem.vue.js +6 -1
  63. package/lib/components/hyForm/cpns/formItem.vue.js +26 -11
  64. package/lib/components/hyForm/js/index.js +29 -23
  65. package/lib/components/hyForm/js/useAppForm.js +14 -29
  66. package/lib/components/hyIconBox/iconBox.vue.js +1 -1
  67. package/lib/components/hyIconBox/style/iconBox.scss +1 -1
  68. package/lib/components/hyMap/index.js +11 -0
  69. package/lib/components/hyMap/js/index.js +61 -0
  70. package/lib/components/hyMap/map.vue.js +63 -0
  71. package/lib/components/hyOrgCascader/js/index.js +56 -0
  72. package/lib/components/hyOrgCascader/orgCascader.vue.js +21 -24
  73. package/lib/components/hySearch/search.vue.js +4 -6
  74. package/lib/components/hyTable/cpns/columnSelect.vue.js +12 -20
  75. package/lib/components/hyTable/table.vue.js +17 -20
  76. package/lib/components/hyTableActionButton/tableActionButton.vue.js +5 -2
  77. package/lib/components/hyTableForm/batchTableForm.vue.js +181 -134
  78. package/lib/components/hyTableForm/js/index.js +1 -1
  79. package/lib/components/hyTableForm/tableForm.vue.js +29 -20
  80. package/lib/components/hyTooltip/tooltip.vue.js +1 -1
  81. package/lib/components/hyTree/js/index.js +6 -4
  82. package/lib/components/hyTree/tree.vue.js +7 -1
  83. package/lib/components/index.js +22 -20
  84. package/lib/hooks/index.js +3 -0
  85. package/lib/hooks/useApi.js +10 -4
  86. package/lib/hooks/useAudioPlayerConfig.js +12 -4
  87. package/lib/hooks/useEnsureHyIcon.js +10 -4
  88. package/lib/hooks/useLocale.js +5 -4
  89. package/lib/hooks/usePermissionMap.js +12 -4
  90. package/lib/hooks/useSubscribe.js +31 -0
  91. package/lib/hooks/useTooltipConfig.js +10 -4
  92. package/lib/hooks/useUserAvatarMap.js +12 -4
  93. package/lib/hooks/useVideoPlayerConfig.js +12 -4
  94. package/lib/index.js +27 -22
  95. package/lib/static/map/CFCASIPInput.min.js +258 -0
  96. package/lib/static/map/MarkerCluster.css +75 -0
  97. package/lib/static/map/bigemap.css +838 -0
  98. package/lib/static/map/bigemap.js +5 -0
  99. package/lib/static/map/bm.geometryutil.js +754 -0
  100. package/lib/static/map/bmDraw.css +329 -0
  101. package/lib/static/map/bmDraw.js +181 -0
  102. package/lib/static/map/car.png +0 -0
  103. package/lib/static/map/markercluster.js +2679 -0
  104. package/lib/static/map/moveMarker.js +74 -0
  105. package/lib/utils/form.js +38 -0
  106. package/lib/utils/index.js +2 -2
  107. package/lib/utils/map/hook/bigMap.js +1140 -0
  108. package/lib/utils/map/hook/gaode.js +687 -0
  109. package/lib/utils/map/hook/leafletjs.js +1360 -0
  110. package/lib/utils/map/index.js +298 -0
  111. package/lib/utils/map/js/mapProxy.js +44 -0
  112. package/lib/utils/map/js/webgis.js +162 -0
  113. package/lib/version.js +1 -1
  114. package/package.json +16 -1
  115. package/es/utils/bus.mjs +0 -5
  116. package/lib/utils/bus.js +0 -7
@@ -1,4 +1,4 @@
1
- import { defineComponent, useTemplateRef, ref, nextTick, openBlock, createElementBlock, createElementVNode, createVNode, unref as unref$1, withCtx, Fragment, renderList, createCommentVNode, toDisplayString, renderSlot, createTextVNode, mergeProps, createSlots, normalizeProps, guardReactiveProps, normalizeStyle } from 'vue';
1
+ import { defineComponent, useTemplateRef, useModel, ref, nextTick, openBlock, createElementBlock, withDirectives, createElementVNode, createVNode, unref as unref$1, withCtx, Fragment, renderList, createCommentVNode, toDisplayString, renderSlot, createTextVNode, vShow, mergeProps, createSlots, normalizeProps, guardReactiveProps, normalizeStyle, mergeModels } from 'vue';
2
2
  import { ElUpload, ElIcon, ElMessage } from 'element-plus';
3
3
  import { Loading } from '@element-plus/icons-vue';
4
4
  import _sfc_main$1 from './tableForm.vue.mjs';
@@ -16,7 +16,7 @@ const __default__ = defineComponent({
16
16
  name: "HyBatchTableForm"
17
17
  });
18
18
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
19
- props: {
19
+ props: /* @__PURE__ */ mergeModels({
20
20
  // 表格配置项
21
21
  tableColumns: {
22
22
  // 表格的列
@@ -78,22 +78,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
78
78
  submitHandler: {
79
79
  type: Function
80
80
  }
81
- },
82
- emits: [
81
+ }, {
82
+ "step": { type: Number, default: 1 },
83
+ "stepModifiers": {}
84
+ }),
85
+ emits: /* @__PURE__ */ mergeModels([
83
86
  "uploading",
84
87
  "uploaded",
85
88
  "reset",
86
89
  "submitting",
87
90
  "submit"
88
- ],
91
+ ], ["update:step"]),
89
92
  setup(__props, { expose: __expose, emit: __emit }) {
90
93
  const props = __props;
91
94
  const emits = __emit;
92
95
  const { api } = useApi();
93
96
  const { t } = useLocale();
94
97
  const containerRef = useTemplateRef("containerRef");
98
+ const uploadRef = useTemplateRef("uploadRef");
95
99
  const tableRef = useTemplateRef("tableRef");
96
- const active = ref(1);
100
+ const active = useModel(__props, "step");
97
101
  const stepList = [
98
102
  {
99
103
  title: "\u4E0A\u4F20\u5BFC\u5165\u6587\u4EF6",
@@ -145,6 +149,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
145
149
  try {
146
150
  isUploading.value = true;
147
151
  emits("uploading");
152
+ formColumns;
148
153
  const data = await doReadExcel(files, props);
149
154
  if (!data) {
150
155
  ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
@@ -194,6 +199,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
194
199
  active.value = 1;
195
200
  submitNumber.value = 0;
196
201
  emits("reset");
202
+ await nextTick();
203
+ uploadRef.value.click();
197
204
  }
198
205
  async function submitDataSource() {
199
206
  if (!props.url && !props.submitHandler) {
@@ -305,7 +312,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
305
312
  },
306
313
  getTableDataSource,
307
314
  validate,
308
- submitDataSource
315
+ submitDataSource,
316
+ prevStep: () => {
317
+ if (active.value > 1) {
318
+ active.value--;
319
+ }
320
+ return active.value;
321
+ },
322
+ nextStep: () => {
323
+ if (active.value < 2) {
324
+ active.value++;
325
+ }
326
+ return active.value;
327
+ }
309
328
  });
310
329
  return (_ctx, _cache) => {
311
330
  return openBlock(), createElementBlock(
@@ -316,146 +335,170 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
316
335
  class: "hy-batch-table-form"
317
336
  },
318
337
  [
319
- active.value === 1 ? (openBlock(), createElementBlock("div", {
320
- key: 0,
321
- class: "max-h-full overflow-y-auto scroll-body"
322
- }, [
323
- createElementVNode("div", { class: "hy-batch-table-form-upload-box" }, [
324
- createVNode(unref$1(ElUpload), {
325
- accept: ".xls,.xlsx",
326
- drag: "",
327
- multiple: false,
328
- "auto-upload": false,
329
- "show-file-list": false,
330
- class: "w-full h-full",
331
- "on-change": onUploadChange
332
- }, {
333
- default: withCtx(() => [
334
- createVNode(unref$1(HyIcon), {
335
- "svg-name": "analytics-echarts-sos",
336
- "class-name": "!w-[58px] !h-[66px] mb-4"
337
- }),
338
- isUploading.value ? (openBlock(), createElementBlock("div", {
339
- key: 0,
340
- class: "flex items-center gap-2 text-auxiliary"
341
- }, [
342
- createElementVNode("span", { class: "text-xs" }, "\u6587\u4EF6\u4E0A\u4F20\u4E2D"),
343
- createVNode(unref$1(ElIcon), { class: "is-loading" }, {
344
- default: withCtx(() => [
345
- createVNode(unref$1(Loading))
346
- ]),
347
- _: 1
348
- /* STABLE */
349
- })
350
- ])) : (openBlock(), createElementBlock(
351
- Fragment,
352
- { key: 1 },
353
- [
354
- createElementVNode("div", { class: "mb-1.5 text-main" }, [
355
- createElementVNode("span", null, "\u70B9\u51FB\u6216\u5C06 \u6587\u4EF6 \u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20")
356
- ]),
357
- createElementVNode("div", { class: "text-auxiliary text-xs" }, "\u4E00\u6B21\u4EC5\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6"),
358
- createElementVNode("div", { class: "w-full text-main absolute left-1/2 bottom-4 transform -translate-x-1/2" }, [
359
- createElementVNode("div", { class: "flex items-center justify-center text-xs text-auxiliary gap-2" }, [
360
- createElementVNode("span", null, "\u6587\u4EF6\u652F\u6301\uFF1A"),
361
- createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xls "),
362
- createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xlsx "),
363
- createElementVNode("span", null, "\u5355\u6587\u4EF6\u4E0D\u8D85\u8FC7 10 MB")
338
+ withDirectives(createElementVNode(
339
+ "div",
340
+ { class: "max-h-full overflow-y-auto scroll-body" },
341
+ [
342
+ createElementVNode("div", { class: "hy-batch-table-form-upload-box" }, [
343
+ createVNode(unref$1(ElUpload), {
344
+ accept: ".xls,.xlsx",
345
+ drag: "",
346
+ multiple: false,
347
+ "auto-upload": false,
348
+ "show-file-list": false,
349
+ class: "w-full h-full",
350
+ "on-change": onUploadChange
351
+ }, {
352
+ default: withCtx(() => [
353
+ createVNode(unref$1(HyIcon), {
354
+ "svg-name": "ops-file-xls",
355
+ "class-name": "!w-[58px] !h-[66px] mb-4"
356
+ }),
357
+ isUploading.value ? (openBlock(), createElementBlock("div", {
358
+ key: 0,
359
+ class: "flex items-center gap-2 text-auxiliary"
360
+ }, [
361
+ createElementVNode("span", { class: "text-xs" }, "\u6587\u4EF6\u4E0A\u4F20\u4E2D"),
362
+ createVNode(unref$1(ElIcon), { class: "is-loading" }, {
363
+ default: withCtx(() => [
364
+ createVNode(unref$1(Loading))
365
+ ]),
366
+ _: 1
367
+ /* STABLE */
368
+ })
369
+ ])) : (openBlock(), createElementBlock(
370
+ Fragment,
371
+ { key: 1 },
372
+ [
373
+ createElementVNode("div", { class: "mb-1.5 text-main" }, [
374
+ createElementVNode("span", null, "\u70B9\u51FB\u6216\u5C06 \u6587\u4EF6 \u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20")
375
+ ]),
376
+ createElementVNode("div", { class: "text-auxiliary text-xs" }, "\u4E00\u6B21\u4EC5\u652F\u6301\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6"),
377
+ createElementVNode("div", { class: "w-full text-main absolute left-1/2 bottom-4 transform -translate-x-1/2" }, [
378
+ createElementVNode("div", { class: "flex items-center justify-center text-xs text-auxiliary gap-2" }, [
379
+ createElementVNode("span", null, "\u6587\u4EF6\u652F\u6301\uFF1A"),
380
+ createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xls "),
381
+ createElementVNode("div", { class: "border border-border rounded py-1 px-2.5 bg-background-4" }, " .xlsx "),
382
+ createElementVNode("span", null, "\u5355\u6587\u4EF6\u4E0D\u8D85\u8FC7 10 MB")
383
+ ])
364
384
  ])
365
- ])
366
- ],
367
- 64
368
- /* STABLE_FRAGMENT */
369
- )),
370
- createElementVNode("div", { class: "hy-batch-table-form-upload-bg" })
371
- ]),
372
- _: 1
373
- /* STABLE */
374
- })
375
- ]),
376
- createElementVNode("div", { class: "hy-batch-table-form-step-box" }, [
377
- createElementVNode("div", { class: "text-auxiliary text-center mb-[30px]" }, [
378
- createElementVNode("span", null, "\u6279\u91CF\u6DFB\u52A0\u5BFC\u5165\u6D41\u7A0B\u8BF4\u660E")
385
+ ],
386
+ 64
387
+ /* STABLE_FRAGMENT */
388
+ )),
389
+ createElementVNode(
390
+ "div",
391
+ {
392
+ ref_key: "uploadRef",
393
+ ref: uploadRef,
394
+ class: "hy-batch-table-form-upload-bg"
395
+ },
396
+ null,
397
+ 512
398
+ /* NEED_PATCH */
399
+ )
400
+ ]),
401
+ _: 1
402
+ /* STABLE */
403
+ })
379
404
  ]),
380
- createElementVNode("div", { class: "w-full flex" }, [
381
- (openBlock(), createElementBlock(
382
- Fragment,
383
- null,
384
- renderList(stepList, (item, index) => {
385
- return createElementVNode("div", {
386
- key: index,
387
- class: "w-0 flex-1 flex flex-col items-center relative"
388
- }, [
389
- index < stepList.length - 1 ? (openBlock(), createElementBlock("div", {
390
- key: 0,
391
- class: "w-3/4 absolute top-[19px] left-full transform -translate-x-1/2",
392
- style: { "border-top": "2px dashed rgba(var(--hy-border))" }
393
- })) : createCommentVNode("v-if", true),
394
- createElementVNode("div", { class: "w-[38px] h-[38px] flex items-center justify-center border border-solid border-border rounded-full bg-background box-border" }, [
405
+ createElementVNode("div", { class: "hy-batch-table-form-step-box" }, [
406
+ createElementVNode("div", { class: "text-auxiliary text-center mb-[30px]" }, [
407
+ createElementVNode("span", null, "\u6279\u91CF\u6DFB\u52A0\u5BFC\u5165\u6D41\u7A0B\u8BF4\u660E")
408
+ ]),
409
+ createElementVNode("div", { class: "w-full flex" }, [
410
+ (openBlock(), createElementBlock(
411
+ Fragment,
412
+ null,
413
+ renderList(stepList, (item, index) => {
414
+ return createElementVNode("div", {
415
+ key: index,
416
+ class: "w-0 flex-1 flex flex-col items-center relative"
417
+ }, [
418
+ index < stepList.length - 1 ? (openBlock(), createElementBlock("div", {
419
+ key: 0,
420
+ class: "w-3/4 absolute top-[19px] left-full transform -translate-x-1/2",
421
+ style: { "border-top": "2px dashed rgba(var(--hy-border))" }
422
+ })) : createCommentVNode("v-if", true),
423
+ createElementVNode("div", { class: "w-[38px] h-[38px] flex items-center justify-center border border-solid border-border rounded-full bg-background box-border" }, [
424
+ createElementVNode(
425
+ "span",
426
+ { class: "text-base text-main" },
427
+ toDisplayString(index + 1),
428
+ 1
429
+ /* TEXT */
430
+ )
431
+ ]),
395
432
  createElementVNode(
396
433
  "span",
397
- { class: "text-base text-main" },
398
- toDisplayString(index + 1),
434
+ { class: "text-main font-bold text-sm mt-3 mb-2" },
435
+ toDisplayString(item.title),
399
436
  1
400
437
  /* TEXT */
401
- )
402
- ]),
403
- createElementVNode(
404
- "span",
405
- { class: "text-main font-bold text-sm mt-3 mb-2" },
406
- toDisplayString(item.title),
407
- 1
408
- /* TEXT */
409
- ),
410
- createElementVNode("div", {
411
- innerHTML: item.description,
412
- class: "text-auxiliary text-center mb-3 whitespace-nowrap"
413
- }, null, 8, ["innerHTML"]),
414
- index === 0 ? renderSlot(_ctx.$slots, "template-down", {}, () => [
415
- createVNode(unref$1(HyButton), {
416
- type: "primary",
417
- link: "",
418
- onClick: () => unref$1(downloadTemplateHandler)(props)
419
- }, {
420
- default: withCtx(() => [
421
- createTextVNode(
422
- toDisplayString(__props.templateConfig ? __props.templateConfig.title : "\u4E0B\u8F7D\u6A21\u677F"),
423
- 1
424
- /* TEXT */
425
- )
426
- ]),
427
- _: 1
428
- /* STABLE */
429
- }, 8, ["onClick"])
430
- ], void 0, 1) : createCommentVNode("v-if", true)
431
- ]);
432
- }),
433
- 64
434
- /* STABLE_FRAGMENT */
435
- ))
438
+ ),
439
+ createElementVNode("div", {
440
+ innerHTML: item.description,
441
+ class: "text-auxiliary text-center mb-3 whitespace-nowrap"
442
+ }, null, 8, ["innerHTML"]),
443
+ index === 0 ? renderSlot(_ctx.$slots, "template-down", {}, () => [
444
+ createVNode(unref$1(HyButton), {
445
+ type: "primary",
446
+ link: "",
447
+ onClick: () => unref$1(downloadTemplateHandler)(props)
448
+ }, {
449
+ default: withCtx(() => [
450
+ createTextVNode(
451
+ toDisplayString(__props.templateConfig ? __props.templateConfig.title : "\u4E0B\u8F7D\u6A21\u677F"),
452
+ 1
453
+ /* TEXT */
454
+ )
455
+ ]),
456
+ _: 1
457
+ /* STABLE */
458
+ }, 8, ["onClick"])
459
+ ], void 0, 1) : createCommentVNode("v-if", true)
460
+ ]);
461
+ }),
462
+ 64
463
+ /* STABLE_FRAGMENT */
464
+ ))
465
+ ])
436
466
  ])
437
- ])
438
- ])) : active.value === 2 ? (openBlock(), createElementBlock("div", {
439
- key: 1,
467
+ ],
468
+ 512
469
+ /* NEED_PATCH */
470
+ ), [
471
+ [vShow, active.value === 1]
472
+ ]),
473
+ active.value === 2 ? (openBlock(), createElementBlock("div", {
474
+ key: 0,
440
475
  class: "h-full flex flex-col"
441
476
  }, [
442
477
  createElementVNode("div", { class: "hy-batch-table-form-template-box mb-4" }, [
443
478
  createElementVNode("div", { class: "flex items-center gap-2" }, [
444
479
  createVNode(unref$1(HyIcon), {
445
- "svg-name": "analytics-echarts-sos",
480
+ "svg-name": "ops-file-xls",
446
481
  "class-name": "!w-[18px] !h-[22px]"
447
482
  }),
448
483
  templateFileName.value ? (openBlock(), createElementBlock(
449
- "span",
450
- {
451
- key: 0,
452
- class: "text-theme"
453
- },
454
- toDisplayString(templateFileName.value),
455
- 1
456
- /* TEXT */
457
- )) : createCommentVNode("v-if", true),
458
- createElementVNode("span", { class: "text-auxiliary" }, "\u89E3\u6790\u5B8C\u6210")
484
+ Fragment,
485
+ { key: 0 },
486
+ [
487
+ createElementVNode(
488
+ "span",
489
+ { class: "text-theme" },
490
+ toDisplayString(templateFileName.value),
491
+ 1
492
+ /* TEXT */
493
+ ),
494
+ createElementVNode("span", { class: "text-auxiliary" }, "\u89E3\u6790\u5B8C\u6210")
495
+ ],
496
+ 64
497
+ /* STABLE_FRAGMENT */
498
+ )) : (openBlock(), createElementBlock("span", {
499
+ key: 1,
500
+ class: "text-auxiliary"
501
+ }, "\u6682\u672A\u5BFC\u5165\u6587\u4EF6"))
459
502
  ]),
460
503
  createVNode(unref$1(HyButton), {
461
504
  type: "primary",
@@ -464,7 +507,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
464
507
  onClick: onResetUpload
465
508
  }, {
466
509
  default: withCtx(() => [
467
- createTextVNode("\u91CD\u65B0\u4E0A\u4F20\u6587\u4EF6")
510
+ createTextVNode(
511
+ toDisplayString(templateFileName.value ? "\u91CD\u65B0\u4E0A\u4F20\u6587\u4EF6" : "\u70B9\u51FB\u4E0A\u4F20\u6587\u4EF6"),
512
+ 1
513
+ /* TEXT */
514
+ )
468
515
  ]),
469
516
  _: 1
470
517
  /* STABLE */
@@ -496,13 +543,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
496
543
  ]), 1040, ["tableColumns", "formColumns", "rules", "rowClickExpand", "columnNum", "size"])
497
544
  ])) : createCommentVNode("v-if", true),
498
545
  submitting.value ? (openBlock(), createElementBlock("div", {
499
- key: 2,
546
+ key: 1,
500
547
  class: "absolute top-0 right-0 bottom-0 left-0 z-10 flex items-center justify-center"
501
548
  }, [
502
549
  createElementVNode("div", { class: "w-full h-full absolute bg-[rgba(var(--hy-background-4),0.9)] backdrop-blur-sm" }),
503
550
  createElementVNode("div", { class: "flex flex-col items-center text-theme text-xs relative" }, [
504
551
  createVNode(unref$1(HyIcon), {
505
- "svg-name": "analytics-echarts-sos",
552
+ "svg-name": "ops-file-xls",
506
553
  "class-name": "!w-[58px] !h-[66px] mb-[18px]"
507
554
  }),
508
555
  createElementVNode("div", { class: "flex items-center" }, [
@@ -5,7 +5,7 @@ import AsyncValidator from 'async-validator';
5
5
  import { ElMessage } from 'element-plus';
6
6
  import { columnShowHandler } from '../../hyForm/js/index.mjs';
7
7
  import { useApi } from '../../../hooks/useApi.mjs';
8
- import { setValueByProp, getValueByProp } from '../../../utils/form.mjs';
8
+ import { columnRuleHandler, setValueByProp, getValueByProp } from '../../../utils/form.mjs';
9
9
  import { isArray } from '../../../utils/is.mjs';
10
10
 
11
11
  const doValidate = async (target = {}, columns = [], ruleList = {}) => {
@@ -14,7 +14,7 @@ const doValidate = async (target = {}, columns = [], ruleList = {}) => {
14
14
  const columnMap = (columns || []).reduce((columnMap2, column) => {
15
15
  if (columnShowHandler({ model: data }, column)) {
16
16
  columnMap2[column.prop] = column;
17
- rules[column.prop] = column.rules || [];
17
+ rules[column.prop] = columnRuleHandler(column, target);
18
18
  setValueByProp(data, column.prop, getValueByProp(target, column.prop));
19
19
  }
20
20
  return columnMap2;
@@ -150,7 +150,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
150
150
  onlyId: /* @__PURE__ */ Symbol("onlyId")
151
151
  });
152
152
  await initValidateHandler([data]);
153
- dataSource.value.push(data);
153
+ if (!dataSource.value.length) {
154
+ dataSource.value = [data];
155
+ setData(dataSource.value);
156
+ } else {
157
+ dataSource.value.push(data);
158
+ }
159
+ emits("validate", {
160
+ ...statistics.value
161
+ });
154
162
  }
155
163
  async function initValidateHandler(dataSource2) {
156
164
  let promiseList = [];
@@ -158,13 +166,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
158
166
  promiseList.push(
159
167
  new Promise(async (resolve, reject) => {
160
168
  try {
161
- const res = await doValidate(data, props.formColumns, props.rules);
169
+ await doValidate(data, props.formColumns, props.rules);
162
170
  data.errorMsg = data.errorMsg && !data.errorMsg.prop ? data.errorMsg : null;
163
171
  data.errorMap = /* @__PURE__ */ new Map();
164
172
  resolve();
165
173
  } catch (error) {
166
174
  const errorMap = /* @__PURE__ */ new Map();
167
- error.forEach((item, index) => {
175
+ error.forEach((item) => {
168
176
  const errData = {
169
177
  prop: item.field,
170
178
  message: item.message || `${item.field} is required`
@@ -188,24 +196,25 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
188
196
  if (!row.errorMap) {
189
197
  row.errorMap = /* @__PURE__ */ new Map();
190
198
  }
191
- if (isValid) {
192
- row.errorMap.delete(prop);
193
- if (row.errorMsg && (row.errorMsg.prop === prop || !row.errorMap.has(prop))) {
194
- if (row.errorMap.size) {
195
- const [prop2, message2] = Array.from(row.errorMap.entries())[0];
196
- row.errorMsg = { prop: prop2, message: message2 };
197
- } else {
198
- row.errorMsg = null;
199
- }
200
- }
201
- } else {
202
- row.errorMap.set(prop, message);
203
- if (!row.errorMsg || !row.errorMsg.prop) {
204
- row.errorMsg = {
205
- prop,
206
- message
199
+ try {
200
+ await doValidate(row, props.formColumns, props.rules);
201
+ row.errorMsg = null;
202
+ row.errorMap = /* @__PURE__ */ new Map();
203
+ } catch (error) {
204
+ let errMsg = null;
205
+ const errorMap2 = /* @__PURE__ */ new Map();
206
+ error.forEach((item) => {
207
+ const errData = {
208
+ prop: item.field,
209
+ message: item.message || `${item.field} is required`
207
210
  };
208
- }
211
+ if (!errMsg) {
212
+ errMsg = errData;
213
+ }
214
+ errorMap2.set(errData.prop, errData.message);
215
+ });
216
+ row.errorMap = errorMap2;
217
+ row.errorMsg = errMsg;
209
218
  }
210
219
  const { onlyId, errorMsg, errorMap, children, ...data } = row;
211
220
  emits("validate", {
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
59
59
  }
60
60
  return (_ctx, _cache) => {
61
61
  return openBlock(), createBlock(unref(ElTooltip), mergeProps({
62
- "open-delay": 500,
62
+ "show-after": 500,
63
63
  class: "item",
64
64
  effect: "dark",
65
65
  placement: "top",
@@ -113,6 +113,7 @@ const useAppTreeWrapper = (hy) => {
113
113
  rowSelection: {
114
114
  type: props.showCheckbox ? "checkbox" : "radio",
115
115
  highlight: props.highlight,
116
+ checkStrictly: props.checkStrictly,
116
117
  // 是否显示选项 showSinglebox 单选为true时部门不显示其他节点显示选择框
117
118
  showSelect: (data) => {
118
119
  if (data.dataType === 1) {
@@ -297,6 +298,7 @@ const useAppTreeWrapper = (hy) => {
297
298
  hy.disableSelectionMap.value = map;
298
299
  }
299
300
  function refreshData() {
301
+ hy.loading.value = true;
300
302
  emits("on-refreshData");
301
303
  }
302
304
  function setRenderStatus(data) {
@@ -384,7 +386,7 @@ const useAppTreeWrapper = (hy) => {
384
386
  }
385
387
  function singleRemovalFn(row) {
386
388
  if (props.treeType === "device") {
387
- virtualTree.setChecked(row.deviceId, false, true);
389
+ virtualTree.setChecked(row.channelId || row.deviceId, false, true);
388
390
  } else if (props.treeType) {
389
391
  virtualTree.setChecked(row.id, false, true);
390
392
  } else if (!props.treeType && props.treeProps) {
@@ -392,9 +394,9 @@ const useAppTreeWrapper = (hy) => {
392
394
  }
393
395
  }
394
396
  function setCheckedKeys(dataList) {
395
- if (props.treeType === "device") {
397
+ if (props.treeType === "device" || props.treeType === "channel") {
396
398
  virtualTree?.setCheckedKeys(
397
- dataList.map((v) => v.deviceId),
399
+ dataList.map((v) => v.channelId || v.deviceId),
398
400
  true
399
401
  );
400
402
  } else if (props.treeType) {
@@ -416,7 +418,7 @@ const useAppTreeWrapper = (hy) => {
416
418
  }
417
419
  function setChecked(data, type) {
418
420
  if (props.treeType === "device") {
419
- virtualTree?.setChecked(data.deviceId, type, true);
421
+ virtualTree?.setChecked(data.channelId || data.deviceId, type, true);
420
422
  } else if (props.treeType) {
421
423
  virtualTree?.setChecked(data.id, type, true);
422
424
  } else if (!props.treeType && props.treeProps) {
@@ -137,6 +137,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
137
137
  highlight: {
138
138
  type: Boolean,
139
139
  default: false
140
+ },
141
+ // 是否严格的遵循父子不互相关联
142
+ checkStrictly: {
143
+ type: Boolean,
144
+ default: false
140
145
  }
141
146
  },
142
147
  emits: [
@@ -191,7 +196,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
191
196
  singleRemovalFn,
192
197
  setCheckedKeys,
193
198
  setChecked,
194
- getSelectedDataList
199
+ getSelectedDataList,
200
+ refreshData
195
201
  });
196
202
  return (_ctx, _cache) => {
197
203
  const _directive_loading = resolveDirective("loading");
@@ -23,6 +23,7 @@ export { ElTimePicker, HyTimePicker } from './hyTimePicker/index.mjs';
23
23
  export { HyBatchTableForm, HyTableForm } from './hyTableForm/index.mjs';
24
24
  export { HyTableActionButton } from './hyTableActionButton/index.mjs';
25
25
  export { HyBatchUploadDialog } from './hyBatchUploadDialog/index.mjs';
26
+ export { HyMap } from './hyMap/index.mjs';
26
27
  export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
27
28
  export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
28
29
  export { useAppTable } from './hyTable/js/useAppTable.mjs';
@@ -10,3 +10,4 @@ export { localAudioPlayerConfigKey, useAudioPlayerConfig } from './useAudioPlaye
10
10
  export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './useVideoPlayerConfig.mjs';
11
11
  export { localEnsureHyIconMapKey, useEnsureHyIcon } from './useEnsureHyIcon.mjs';
12
12
  export { localTooltipConfigKey, useTooltipConfig } from './useTooltipConfig.mjs';
13
+ export { usePublish, useSubscribe } from './useSubscribe.mjs';
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { ref, inject, unref } from 'vue';
2
+ import { ref, getCurrentInstance, inject, unref } from 'vue';
3
3
  import { useGlobalConfig } from './useGlobalConfig.mjs';
4
4
 
5
5
  const localApiKey = /* @__PURE__ */ Symbol("localApiKey");
@@ -20,10 +20,16 @@ defaultAxios.value.interceptors.response.use(
20
20
  }
21
21
  );
22
22
  const useApi = () => {
23
- const api = inject(localApiKey, ref());
24
- return {
25
- api: unref(api) ? api : unref(useGlobalConfig())?.api || defaultAxios
26
- };
23
+ if (getCurrentInstance()) {
24
+ const api = inject(localApiKey, ref());
25
+ return {
26
+ api: unref(api) ? api : unref(useGlobalConfig())?.api || defaultAxios
27
+ };
28
+ } else {
29
+ return {
30
+ api: unref(useGlobalConfig())?.api || defaultAxios
31
+ };
32
+ }
27
33
  };
28
34
 
29
35
  export { defaultAxios, localApiKey, useApi };