hy-dispatch-ui-v3 0.2.61 → 0.2.62

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 (66) hide show
  1. package/dist/tailwind.css +66 -0
  2. package/es/api/device.mjs +18 -0
  3. package/es/api/index.mjs +1 -1
  4. package/es/api/sypct.mjs +18 -0
  5. package/es/api/task.mjs +18 -0
  6. package/es/bussiness/hyMapAearchPlace/index.mjs +6 -0
  7. package/es/bussiness/hyMapAearchPlace/js/index.mjs +653 -0
  8. package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +347 -0
  9. package/es/bussiness/hyMapAearchPlace/mapAearchPlaceItem.vue.mjs +99 -0
  10. package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +71 -0
  11. package/es/bussiness/index.mjs +1 -0
  12. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +22 -3
  13. package/es/components/hyButton/style/button.scss +1 -1
  14. package/es/components/hyConfigProvider/configProvider.vue.mjs +4 -0
  15. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +2 -2
  16. package/es/components/hyDialog/dialog.vue.mjs +24 -4
  17. package/es/components/hyForm/cpns/locationSelect.vue.mjs +3 -1
  18. package/es/components/hyMap/map.vue.mjs +10 -3
  19. package/es/components/hySearch/cpns/searchItem.vue.mjs +17 -1
  20. package/es/components/hyTable/table.vue.mjs +8 -1
  21. package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -59
  22. package/es/components/hyTableForm/js/index.mjs +8 -58
  23. package/es/components/hyTableForm/tableForm.vue.mjs +9 -3
  24. package/es/hooks/index.mjs +1 -0
  25. package/es/hooks/useGlobalConfig.mjs +5 -0
  26. package/es/hooks/useMapConfig.mjs +18 -0
  27. package/es/index.mjs +2 -0
  28. package/es/static/hy-svg-icons/hy-icon-ops-list-editorialdownsizing.js +14 -0
  29. package/es/static/hy-svg-icons/hy-icon-ops-list-suoxiao.js +14 -0
  30. package/es/style/element/hy-element.scss +10 -1
  31. package/es/utils/form.mjs +5 -1
  32. package/es/utils/map/js/webgis.mjs +1 -1
  33. package/es/version.mjs +1 -1
  34. package/lib/api/device.js +20 -0
  35. package/lib/api/index.js +1 -1
  36. package/lib/api/sypct.js +20 -0
  37. package/lib/api/task.js +20 -0
  38. package/lib/bussiness/hyMapAearchPlace/index.js +11 -0
  39. package/lib/bussiness/hyMapAearchPlace/js/index.js +655 -0
  40. package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +351 -0
  41. package/lib/bussiness/hyMapAearchPlace/mapAearchPlaceItem.vue.js +103 -0
  42. package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +71 -0
  43. package/lib/bussiness/index.js +2 -0
  44. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +22 -3
  45. package/lib/components/hyButton/style/button.scss +1 -1
  46. package/lib/components/hyConfigProvider/configProvider.vue.js +4 -0
  47. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +2 -2
  48. package/lib/components/hyDialog/dialog.vue.js +23 -3
  49. package/lib/components/hyForm/cpns/locationSelect.vue.js +3 -1
  50. package/lib/components/hyMap/map.vue.js +10 -3
  51. package/lib/components/hySearch/cpns/searchItem.vue.js +16 -0
  52. package/lib/components/hyTable/table.vue.js +8 -1
  53. package/lib/components/hyTableForm/batchTableForm.vue.js +33 -56
  54. package/lib/components/hyTableForm/js/index.js +7 -58
  55. package/lib/components/hyTableForm/tableForm.vue.js +8 -2
  56. package/lib/hooks/index.js +3 -0
  57. package/lib/hooks/useGlobalConfig.js +5 -0
  58. package/lib/hooks/useMapConfig.js +21 -0
  59. package/lib/index.js +31 -26
  60. package/lib/static/hy-svg-icons/hy-icon-ops-list-editorialdownsizing.js +14 -0
  61. package/lib/static/hy-svg-icons/hy-icon-ops-list-suoxiao.js +14 -0
  62. package/lib/style/element/hy-element.scss +10 -1
  63. package/lib/utils/form.js +4 -0
  64. package/lib/utils/map/js/webgis.js +1 -0
  65. package/lib/version.js +1 -1
  66. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { useModel, computed, ref, openBlock, createElementBlock, Fragment, createCommentVNode, createVNode, unref, mergeProps, withCtx, createElementVNode, renderSlot, normalizeClass, createBlock, withModifiers, createTextVNode, toDisplayString, mergeModels, defineComponent } from 'vue';
1
+ import { useModel, computed, ref, resolveDirective, openBlock, createElementBlock, Fragment, createCommentVNode, createVNode, unref, mergeProps, withCtx, withDirectives, renderSlot, createElementVNode, normalizeClass, createBlock, withModifiers, createTextVNode, toDisplayString, mergeModels, defineComponent } from 'vue';
2
2
  import { ElDialog } from 'element-plus';
3
3
  import { useLocale } from '../../hooks/useLocale.mjs';
4
4
  import { HyButton } from '../hyButton/index.mjs';
@@ -9,6 +9,16 @@ import "./style/dialog.scss";
9
9
  const __default__ = defineComponent({
10
10
  name: "HyDialog"
11
11
  });
12
+ const svg = `
13
+ <path class="path" d="
14
+ M 30 15
15
+ L 28 17
16
+ M 25.61 25.61
17
+ A 15 15, 0, 0, 1, 15 30
18
+ A 15 15, 0, 1, 1, 27.99 7.5
19
+ L 15 15
20
+ " style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/>
21
+ `;
12
22
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
13
23
  props: /* @__PURE__ */ mergeModels({
14
24
  title: { type: String, default: "\u6807\u9898" },
@@ -186,6 +196,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
186
196
  hideToWorkspace
187
197
  });
188
198
  return (_ctx, _cache) => {
199
+ const _directive_loading = resolveDirective("loading");
189
200
  return openBlock(), createElementBlock(
190
201
  Fragment,
191
202
  null,
@@ -206,6 +217,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
206
217
  "close-on-click-modal": false,
207
218
  "close-on-press-escape": false,
208
219
  "show-close": false,
220
+ "destroy-on-close": true,
209
221
  "modal-class": modalClass.value,
210
222
  modelValue: visible.value,
211
223
  "onUpdate:modelValue": ($event) => visible.value = $event,
@@ -251,7 +263,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
251
263
  )
252
264
  ]),
253
265
  default: withCtx(() => [
254
- createElementVNode("div", { class: "h-full flex flex-col text-main" }, [
266
+ withDirectives((openBlock(), createElementBlock("div", {
267
+ "element-loading-text": "\u52A0\u8F7D\u4E2D...",
268
+ "element-loading-svg": svg,
269
+ "element-loading-svg-view-box": "-10, -10, 50, 50",
270
+ "element-loading-background": "rgba(0, 0, 0, 0.8)",
271
+ class: "h-full flex flex-col text-main"
272
+ }, [
255
273
  renderSlot(_ctx.$slots, "before-content"),
256
274
  renderSlot(_ctx.$slots, "content", {}, () => [
257
275
  createElementVNode(
@@ -300,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
300
318
  __props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
301
319
  key: 1,
302
320
  type: __props.submitType,
303
- disabled: loading.value,
321
+ loading: loading.value,
304
322
  class: "!min-w-[120px]",
305
323
  onClick: onSubmitHandler
306
324
  }, {
@@ -313,7 +331,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
313
331
  ]),
314
332
  _: 1
315
333
  /* STABLE */
316
- }, 8, ["type", "disabled"])) : createCommentVNode("v-if", true)
334
+ }, 8, ["type", "loading"])) : createCommentVNode("v-if", true)
317
335
  ]),
318
336
  renderSlot(_ctx.$slots, "operate-right-box")
319
337
  ],
@@ -322,6 +340,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
322
340
  ),
323
341
  renderSlot(_ctx.$slots, "operate-left-box")
324
342
  ])) : createCommentVNode("v-if", true)
343
+ ])), [
344
+ [_directive_loading, loading.value]
325
345
  ])
326
346
  ]),
327
347
  _: 3
@@ -238,7 +238,9 @@ const _sfc_main = {
238
238
  if (marker) {
239
239
  marker.remove();
240
240
  }
241
- map.removeMap();
241
+ if (map) {
242
+ map.removeMap();
243
+ }
242
244
  map = null;
243
245
  hyMap = null;
244
246
  });
@@ -1,6 +1,7 @@
1
1
  import { ref, onMounted, openBlock, createElementBlock, createElementVNode } from 'vue';
2
2
  import { useAppMapWrapper } from './js/index.mjs';
3
3
  import { useMixins } from '../../hooks/useMixins.mjs';
4
+ import { useMapConfig } from '../../hooks/useMapConfig.mjs';
4
5
 
5
6
  import "../../static/map/bigemap.css";
6
7
 
@@ -14,12 +15,18 @@ const _sfc_main = {
14
15
  // 地图配置
15
16
  mapConfig: {
16
17
  type: Object,
17
- default: () => ({})
18
+ default: () => {
19
+ const { mapConfig } = useMapConfig();
20
+ return mapConfig.value || {};
21
+ }
18
22
  },
19
- // 地图类型 gaode leafletjs bugMap
23
+ // 地图类型 gaode leafletjs bigMap
20
24
  mapType: {
21
25
  type: String,
22
- default: "gaode"
26
+ default: () => {
27
+ const { mapConfig } = useMapConfig();
28
+ return mapConfig.value?.mapType || "gaode";
29
+ }
23
30
  }
24
31
  },
25
32
  emits: ["complete"],
@@ -1,5 +1,5 @@
1
1
  import { computed, unref, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, createCommentVNode, normalizeClass, renderSlot, createElementBlock, toDisplayString, Fragment, createVNode, mergeProps, withKeys, renderList } from 'vue';
2
- import { ElFormItem, ElSelect } from 'element-plus';
2
+ import { ElFormItem, ElSelect, ElCascader } from 'element-plus';
3
3
  import { columnShowHandler, columnItemStyle, columnItemInputStyle, isDisabled, optionsHandler, isSelectedTimeRange, timeRangeHandler } from '../js/index.mjs';
4
4
  import { isArray } from '../../../utils/is.mjs';
5
5
  import { setValueByProp, getValueByProp, columnPlaceholderHandler, columnLabelHandler } from '../../../utils/form.mjs';
@@ -239,6 +239,22 @@ const _sfc_main = {
239
239
  ],
240
240
  2112
241
241
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
242
+ )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
243
+ Fragment,
244
+ { key: 6 },
245
+ [
246
+ createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
247
+ createVNode(unref(ElCascader), mergeProps({
248
+ modelValue: bindValue.value,
249
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
250
+ }, columnAttrs.value, {
251
+ disabled: unref(isDisabled)(props, __props.column),
252
+ options: unref(optionsHandler)(props, __props.column),
253
+ onChange: onChangeHandler
254
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
255
+ ],
256
+ 2112
257
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
242
258
  )) : createCommentVNode("v-if", true)
243
259
  ],
244
260
  6
@@ -239,6 +239,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
239
239
  // 表单查询
240
240
  totalElements,
241
241
  showFilter,
242
+ selectedList,
242
243
  getData,
243
244
  setData,
244
245
  resetFields,
@@ -741,7 +742,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
741
742
  "hide-on-single-page": "",
742
743
  onSizeChange: unref(onSizeChangeHandler),
743
744
  onCurrentChange: unref(onCurrentChangeHandler)
744
- }, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"])
745
+ }, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"]),
746
+ unref(selectedList) && unref(selectedList).length > 0 ? (openBlock(), createElementBlock("div", {
747
+ key: 0,
748
+ class: "absolute right-4 top-1/2 transform -translate-y-1/2"
749
+ }, [
750
+ renderSlot(_ctx.$slots, "multiple-operator-slot")
751
+ ])) : createCommentVNode("v-if", true)
745
752
  ])) : createCommentVNode("v-if", true)
746
753
  ]),
747
754
  createCommentVNode(" \u8868\u683C\u884C\u53F3\u952E\u5C55\u793A\u64CD\u4F5C\u5217\u8868 "),
@@ -1,8 +1,8 @@
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';
1
+ import { defineComponent, useTemplateRef, useModel, ref, nextTick, openBlock, createElementBlock, withDirectives, createElementVNode, createVNode, unref, withCtx, Fragment, renderList, createCommentVNode, toDisplayString, renderSlot, vShow, createTextVNode, 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';
5
- import { downloadTemplateHandler, doReadExcel } from './js/index.mjs';
5
+ import { doReadExcel } from './js/index.mjs';
6
6
  import { useApi } from '../../hooks/useApi.mjs';
7
7
  import { useLocale } from '../../hooks/useLocale.mjs';
8
8
  import { isArray } from '../../utils/is.mjs';
@@ -64,21 +64,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
64
64
  onExpandRowChange: {
65
65
  type: Function
66
66
  },
67
- templateConfig: {
68
- type: Object,
69
- default: () => ({
70
- title: "\u4E0B\u8F7D\u6A21\u677F",
71
- url: "",
72
- fileName: ""
73
- })
74
- },
75
- url: {
76
- type: String
67
+ submitHandler: {
68
+ type: Function
77
69
  },
78
- submitParams: {
79
- type: Object
70
+ // 是否显示添加按钮
71
+ showAddBtn: {
72
+ type: Boolean,
73
+ default: true
80
74
  },
81
- submitHandler: {
75
+ // 外部整体数据处理
76
+ beforeDataListHandle: {
82
77
  type: Function
83
78
  }
84
79
  }, {
@@ -142,6 +137,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
142
137
  return tableRef.value.validate();
143
138
  }
144
139
  async function onUploadChange(file) {
140
+ const { beforeDataListHandle } = props;
145
141
  const type = file.raw.type;
146
142
  if (file.raw.size > 1024 * 1024 * 10) {
147
143
  ElMessage.error(`\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710M\uFF01`);
@@ -149,31 +145,32 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
149
145
  } else {
150
146
  if (type.indexOf("application") !== -1) {
151
147
  const files = { 0: file.raw };
148
+ isUploading.value = true;
149
+ emits("uploading");
152
150
  try {
153
- isUploading.value = true;
154
- emits("uploading");
155
151
  const data = await doReadExcel(files, props);
156
152
  if (!data) {
157
153
  ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
158
- isUploading.value = false;
159
- return;
154
+ throw Error("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
160
155
  }
161
156
  if (!data.length) {
162
157
  ElMessage.warning("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
163
- isUploading.value = false;
164
- return;
158
+ throw Error("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
165
159
  }
166
160
  active.value++;
167
- isUploading.value = false;
168
- emits("uploaded");
169
161
  await nextTick();
170
- setData(data);
162
+ if (beforeDataListHandle) {
163
+ const processData = await beforeDataListHandle(data);
164
+ setData(processData);
165
+ } else {
166
+ setData(data);
167
+ }
171
168
  templateFileName.value = file.name;
172
169
  } catch (err) {
173
- isUploading.value = false;
174
170
  console.error(err);
175
- return;
176
171
  }
172
+ isUploading.value = false;
173
+ emits("uploaded");
177
174
  } else {
178
175
  ElMessage.error("\u6587\u4EF6\u683C\u5F0F\u6709\u8BEF");
179
176
  }
@@ -205,8 +202,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
205
202
  uploadRef.value.click();
206
203
  }
207
204
  async function submitDataSource() {
208
- if (!props.url && !props.submitHandler) {
209
- ElMessage.warning("\u8BF7\u914D\u7F6E\u63D0\u4EA4\u8868\u5355\u5730\u5740");
205
+ if (!props.submitHandler) {
206
+ ElMessage.warning("\u8BF7\u914D\u7F6E\u63D0\u4EA4\u903B\u8F91");
210
207
  return Promise.reject();
211
208
  }
212
209
  if (submitting.value) {
@@ -250,13 +247,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
250
247
  if (errorMsg) {
251
248
  continue;
252
249
  }
253
- let res2;
254
250
  try {
255
- if (props.submitHandler) {
256
- res2 = await props.submitHandler(data);
257
- } else {
258
- res2 = await unref(api).post(props.url, props.submitParams);
259
- }
251
+ const res2 = await props.submitHandler(data);
260
252
  if (res2.code === 200) {
261
253
  submitNumber.value++;
262
254
  submitList.push(target);
@@ -342,7 +334,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
342
334
  { class: "max-h-full overflow-y-auto scroll-body" },
343
335
  [
344
336
  createElementVNode("div", { class: "hy-batch-table-form-upload-box" }, [
345
- createVNode(unref$1(ElUpload), {
337
+ createVNode(unref(ElUpload), {
346
338
  accept: ".xls,.xlsx",
347
339
  drag: "",
348
340
  multiple: false,
@@ -352,7 +344,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
352
344
  "on-change": onUploadChange
353
345
  }, {
354
346
  default: withCtx(() => [
355
- createVNode(unref$1(HyIcon), {
347
+ createVNode(unref(HyIcon), {
356
348
  "svg-name": "ops-file-xls",
357
349
  "class-name": "!w-[58px] !h-[66px] mb-4"
358
350
  }),
@@ -361,9 +353,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
361
353
  class: "flex items-center gap-2 text-auxiliary"
362
354
  }, [
363
355
  createElementVNode("span", { class: "text-xs" }, "\u6587\u4EF6\u4E0A\u4F20\u4E2D"),
364
- createVNode(unref$1(ElIcon), { class: "is-loading" }, {
356
+ createVNode(unref(ElIcon), { class: "is-loading" }, {
365
357
  default: withCtx(() => [
366
- createVNode(unref$1(Loading))
358
+ createVNode(unref(Loading))
367
359
  ]),
368
360
  _: 1
369
361
  /* STABLE */
@@ -442,23 +434,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
442
434
  innerHTML: item.description,
443
435
  class: "text-auxiliary text-center mb-3 whitespace-nowrap"
444
436
  }, null, 8, ["innerHTML"]),
445
- index === 0 ? renderSlot(_ctx.$slots, "template-down", {}, () => [
446
- createVNode(unref$1(HyButton), {
447
- type: "primary",
448
- link: "",
449
- onClick: () => unref$1(downloadTemplateHandler)(props)
450
- }, {
451
- default: withCtx(() => [
452
- createTextVNode(
453
- toDisplayString(__props.templateConfig ? __props.templateConfig.title : "\u4E0B\u8F7D\u6A21\u677F"),
454
- 1
455
- /* TEXT */
456
- )
457
- ]),
458
- _: 1
459
- /* STABLE */
460
- }, 8, ["onClick"])
461
- ], void 0, 1) : createCommentVNode("v-if", true)
437
+ index === 0 ? renderSlot(_ctx.$slots, "template-down", {}, void 0, void 0, 1) : createCommentVNode("v-if", true)
462
438
  ]);
463
439
  }),
464
440
  64
@@ -478,7 +454,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
478
454
  }, [
479
455
  createElementVNode("div", { class: "hy-batch-table-form-template-box mb-4" }, [
480
456
  createElementVNode("div", { class: "flex items-center gap-2" }, [
481
- createVNode(unref$1(HyIcon), {
457
+ createVNode(unref(HyIcon), {
482
458
  "svg-name": "ops-file-xls",
483
459
  "class-name": "!w-[18px] !h-[22px]"
484
460
  }),
@@ -502,7 +478,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
502
478
  class: "text-auxiliary"
503
479
  }, "\u6682\u672A\u5BFC\u5165\u6587\u4EF6"))
504
480
  ]),
505
- createVNode(unref$1(HyButton), {
481
+ createVNode(unref(HyButton), {
506
482
  type: "primary",
507
483
  link: "",
508
484
  size: "small",
@@ -530,6 +506,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
530
506
  rowClickExpand: __props.rowClickExpand,
531
507
  columnNum: __props.columnNum,
532
508
  size: __props.size,
509
+ showAddBtn: __props.showAddBtn,
533
510
  class: "h-0 flex-1"
534
511
  }), createSlots({
535
512
  _: 2
@@ -543,7 +520,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
543
520
  ])
544
521
  };
545
522
  })
546
- ]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size"])
523
+ ]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size", "showAddBtn"])
547
524
  ])) : createCommentVNode("v-if", true),
548
525
  submitting.value ? (openBlock(), createElementBlock("div", {
549
526
  key: 1,
@@ -551,7 +528,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
551
528
  }, [
552
529
  createElementVNode("div", { class: "w-full h-full absolute bg-[rgba(var(--hy-background-4),0.9)] backdrop-blur-sm" }),
553
530
  createElementVNode("div", { class: "flex flex-col items-center text-theme text-xs relative" }, [
554
- createVNode(unref$1(HyIcon), {
531
+ createVNode(unref(HyIcon), {
555
532
  "svg-name": "ops-file-xls",
556
533
  "class-name": "!w-[58px] !h-[66px] mb-[18px]"
557
534
  }),
@@ -1,10 +1,6 @@
1
1
  import XLSX from 'xlsx';
2
- import dayjs from 'dayjs';
3
- import { unref } from 'vue';
4
2
  import AsyncValidator from 'async-validator';
5
- import { ElMessage } from 'element-plus';
6
3
  import { columnShowHandler } from '../../hyForm/js/index.mjs';
7
- import { useApi } from '../../../hooks/useApi.mjs';
8
4
  import { columnRuleHandler, setValueByProp, getValueByProp } from '../../../utils/form.mjs';
9
5
  import { isArray } from '../../../utils/is.mjs';
10
6
 
@@ -39,7 +35,7 @@ const doValidate = async (target = {}, columns = [], ruleList = {}) => {
39
35
  });
40
36
  };
41
37
  const doReadExcel = (files, props) => {
42
- return new Promise((resolve2, reject) => {
38
+ return new Promise((resolve, reject) => {
43
39
  const { formColumns, beforeDataHandle } = props;
44
40
  const fileReader = new FileReader();
45
41
  fileReader.onload = (ev) => {
@@ -59,9 +55,13 @@ const doReadExcel = (files, props) => {
59
55
  }, JSON.stringify(ws1));
60
56
  let dataSource = JSON.parse(content);
61
57
  if (beforeDataHandle) {
62
- dataSource = dataSource.map((item) => beforeDataHandle(item));
58
+ const handlePromises = dataSource.map(
59
+ (item) => Promise.resolve().then(() => beforeDataHandle(item)).catch(() => item)
60
+ );
61
+ Promise.all(handlePromises).then(resolve, reject);
62
+ return;
63
63
  }
64
- resolve2(dataSource);
64
+ resolve(dataSource);
65
65
  } catch (err) {
66
66
  reject(err);
67
67
  }
@@ -69,55 +69,5 @@ const doReadExcel = (files, props) => {
69
69
  fileReader.readAsBinaryString(files[0]);
70
70
  });
71
71
  };
72
- const downloadTemplateHandler = async (props) => {
73
- const { templateConfig } = props;
74
- const { url, fileName } = templateConfig;
75
- if (!url) {
76
- ElMessage.warning("\u8BF7\u914D\u7F6E\u4E0B\u8F7D\u6A21\u677F\u5730\u5740");
77
- return;
78
- }
79
- const { api } = useApi();
80
- try {
81
- const blob = await unref(api).get(url, {
82
- responseType: "blob"
83
- });
84
- blobDownloadFn(blob, fileName).then(() => {
85
- resolve();
86
- });
87
- } catch (err) {
88
- console.error(err);
89
- }
90
- };
91
- function blobDownloadFn(blob, name) {
92
- return new Promise((resolve2, reject) => {
93
- ElMessage.warning("\u5F00\u59CB\u4E0B\u8F7D");
94
- const today = dayjs().format("YYYY-MM-DD HH:mm:ss");
95
- const reader = new FileReader();
96
- reader.readAsDataURL(blob);
97
- reader.onload = function(ev) {
98
- let url = null;
99
- try {
100
- if (window.navigator.msSaveOrOpenBlob) {
101
- const blobObject = new Blob([blob]);
102
- window.navigator.msSaveOrOpenBlob(blobObject, `${name}_${today}.xls`);
103
- } else {
104
- url = URL.createObjectURL(new Blob([blob]));
105
- const a = document.createElement("a");
106
- document.body.appendChild(a);
107
- a.href = url;
108
- a.download = `${name}_${today}.xls`;
109
- a.target = "_blank";
110
- a.click();
111
- a.remove();
112
- }
113
- resolve2();
114
- } catch (error) {
115
- reject(error);
116
- } finally {
117
- if (url) URL.revokeObjectURL(url);
118
- }
119
- };
120
- });
121
- }
122
72
 
123
- export { doReadExcel, doValidate, downloadTemplateHandler };
73
+ export { doReadExcel, doValidate };
@@ -1,4 +1,4 @@
1
- import { defineComponent, useTemplateRef, ref, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createVNode, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, createBlock, nextTick } from 'vue';
1
+ import { defineComponent, useTemplateRef, ref, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createBlock, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createVNode, mergeProps, createSlots, renderSlot, normalizeProps, guardReactiveProps, nextTick } from 'vue';
2
2
  import { ElIcon } from 'element-plus';
3
3
  import { Warning } from '@element-plus/icons-vue';
4
4
  import { doValidate } from './js/index.mjs';
@@ -59,6 +59,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
59
59
  type: String,
60
60
  default: "default"
61
61
  // 'large' | 'default' | 'small'
62
+ },
63
+ // 是否显示添加按钮
64
+ showAddBtn: {
65
+ type: Boolean,
66
+ default: true
62
67
  }
63
68
  },
64
69
  emits: ["validate"],
@@ -330,7 +335,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
330
335
  ])) : createCommentVNode("v-if", true)
331
336
  ]),
332
337
  createElementVNode("div", { class: "flex items-center gap-3" }, [
333
- createVNode(unref(HyButton), {
338
+ __props.showAddBtn ? (openBlock(), createBlock(unref(HyButton), {
339
+ key: 0,
334
340
  type: "success",
335
341
  size: "small",
336
342
  "svg-name": "ops-button-add",
@@ -341,7 +347,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
341
347
  ]),
342
348
  _: 1
343
349
  /* STABLE */
344
- }),
350
+ })) : createCommentVNode("v-if", true),
345
351
  createElementVNode("div", { class: "hy-table-form-tabs" }, [
346
352
  (openBlock(true), createElementBlock(
347
353
  Fragment,
@@ -11,3 +11,4 @@ export { localVideoPlayerConfigKey, useVideoPlayerConfig } from './useVideoPlaye
11
11
  export { localEnsureHyIconMapKey, useEnsureHyIcon } from './useEnsureHyIcon.mjs';
12
12
  export { localTooltipConfigKey, useTooltipConfig } from './useTooltipConfig.mjs';
13
13
  export { usePublish, useSubscribe } from './useSubscribe.mjs';
14
+ export { localMapConfigKey, useMapConfig } from './useMapConfig.mjs';
@@ -8,6 +8,7 @@ import { localAudioPlayerConfigKey } from './useAudioPlayerConfig.mjs';
8
8
  import { localVideoPlayerConfigKey } from './useVideoPlayerConfig.mjs';
9
9
  import { localEnsureHyIconMapKey } from './useEnsureHyIcon.mjs';
10
10
  import { localTooltipConfigKey } from './useTooltipConfig.mjs';
11
+ import { localMapConfigKey } from './useMapConfig.mjs';
11
12
  import zh_CN from '../locale/zh_CN.mjs';
12
13
 
13
14
  const globalConfig = ref();
@@ -77,6 +78,10 @@ const provideGlobalConfig = (config, app, global = false) => {
77
78
  localTooltipConfigKey,
78
79
  computed(() => context.value.tooltip)
79
80
  );
81
+ provideFn(
82
+ localMapConfigKey,
83
+ computed(() => context.value.mapConfig)
84
+ );
80
85
  if (global || !globalConfig.value) {
81
86
  globalConfig.value = context.value;
82
87
  }
@@ -0,0 +1,18 @@
1
+ import { getCurrentInstance, inject, ref, unref, computed } from 'vue';
2
+ import { useGlobalConfig } from './useGlobalConfig.mjs';
3
+
4
+ const localMapConfigKey = /* @__PURE__ */ Symbol("mapConfig");
5
+ const useMapConfig = () => {
6
+ if (getCurrentInstance()) {
7
+ const mapConfig = inject(localMapConfigKey, ref());
8
+ return {
9
+ mapConfig: unref(mapConfig) ? mapConfig : computed(() => unref(useGlobalConfig()).mapConfig || {})
10
+ };
11
+ } else {
12
+ return {
13
+ mapConfig: computed(() => unref(useGlobalConfig()).mapConfig || {})
14
+ };
15
+ }
16
+ };
17
+
18
+ export { localMapConfigKey, useMapConfig };
package/es/index.mjs CHANGED
@@ -16,6 +16,7 @@ export { HyForm } from './components/hyForm/index.mjs';
16
16
  export { HyIcon } from './components/hyIcon/index.mjs';
17
17
  export { HyIconBox } from './components/hyIconBox/index.mjs';
18
18
  export { HyMap } from './components/hyMap/index.mjs';
19
+ export { HyMapAearchPlace } from './bussiness/hyMapAearchPlace/index.mjs';
19
20
  export { HyMenu } from './components/hyMenu/index.mjs';
20
21
  export { HyNoPermissions } from './components/hyNoPermissions/index.mjs';
21
22
  export { HyNoPermissionsMap } from './components/hyNoPermissionsMap/index.mjs';
@@ -42,6 +43,7 @@ export { formatDuration, getDefaultValueFormatByType } from './utils/date.mjs';
42
43
  export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isPermission, isString, isSupportH265, isSymbol, isUndefined, isVueProxy } from './utils/is.mjs';
43
44
  export { localAudioPlayerConfigKey, useAudioPlayerConfig } from './hooks/useAudioPlayerConfig.mjs';
44
45
  export { localEnsureHyIconMapKey, useEnsureHyIcon } from './hooks/useEnsureHyIcon.mjs';
46
+ export { localMapConfigKey, useMapConfig } from './hooks/useMapConfig.mjs';
45
47
  export { localPermissionMapKey, usePermissionMap } from './hooks/usePermissionMap.mjs';
46
48
  export { localTooltipConfigKey, useTooltipConfig } from './hooks/useTooltipConfig.mjs';
47
49
  export { localUserAvatarMapKey, useUserAvatarMap } from './hooks/useUserAvatarMap.mjs';
@@ -0,0 +1,14 @@
1
+ export default {
2
+ id: 'hy-icon-ops-list-editorialdownsizing',
3
+ defs: `<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="hy-icon-ops-list-editorialdownsizing-linearGradient-1">
4
+ <stop stop-color="#FFFFFF" offset="0%"></stop>
5
+ <stop stop-color="#73F6FF" offset="100%"></stop>
6
+ </linearGradient>`,
7
+ symbol: `<symbol id="hy-icon-ops-list-editorialdownsizing" viewBox="0 0 30 30">
8
+ <g id="hy-icon-ops-list-editorialdownsizing-部门管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
+ <g id="hy-icon-ops-list-editorialdownsizing-缩小化-组件说明" transform="translate(-412, -357)" fill="url(#hy-icon-ops-list-editorialdownsizing-linearGradient-1)" fill-rule="nonzero">
10
+ <path d="M434.75,372.6 C435.1696,372.6 435.580875,372.6354 435.980961,372.703357 L435.423544,374.441021 C435.202853,374.413944 434.978066,374.4 434.75,374.4 C431.746952,374.4 429.3125,376.817662 429.3125,379.8 C429.3125,382.782338 431.746952,385.2 434.75,385.2 C437.753048,385.2 440.1875,382.782338 440.1875,379.8 C440.1875,379.726583 440.186025,379.653509 440.183102,379.580804 L441.954084,378.985159 C441.984419,379.252611 442,379.524498 442,379.8 C442,383.77645 438.754064,387 434.75,387 C430.745936,387 427.5,383.77645 427.5,379.8 C427.5,375.82355 430.745936,372.6 434.75,372.6 Z M412.232921,373.864066 L412.546358,373.973967 C416.62104,375.60417 420.677284,377.25269 424.751965,378.864576 C424.929045,378.916249 425.044797,379.084908 425.028527,379.267547 C424.993962,379.79031 425.030668,380.313196 425.136041,380.822367 C425.33636,382.687313 426.072725,384.392673 427.189839,385.783025 C426.313438,385.724916 425.453782,385.497114 424.659778,385.110634 C421.599157,383.755184 418.575412,382.399735 415.533229,381.044285 C414.657622,380.704068 413.874562,380.164531 413.246982,379.469033 C412.31459,378.334694 411.876554,376.877529 412.030109,375.421001 C412.030109,374.926445 412.159171,374.413573 412.232921,373.864066 Z M438.274059,374.598087 L440.347255,376.668104 C439.477024,377.537 439.306609,377.698453 438.589949,378.403793 C438.282809,378.700239 437.983347,378.994131 437.691564,379.285467 C437.399781,379.576802 437.133593,379.837471 436.893,380.067473 C436.652407,380.297475 436.455326,380.489143 436.301755,380.642478 L436.025329,380.91848 C435.953663,380.990036 435.871759,381.061592 435.779617,381.133148 C435.687475,381.204705 435.585095,381.266038 435.472477,381.31715 C435.359859,381.368261 435.20373,381.429595 435.004089,381.501151 C434.804448,381.572708 434.597128,381.641708 434.38213,381.708153 C434.167132,381.774598 433.962372,381.835932 433.76785,381.892155 C433.573328,381.948377 433.424877,381.9816 433.322497,381.991822 C433.127975,382.012267 433.023036,381.994378 433.007679,381.938155 C432.992321,381.881932 433,381.756709 433.030714,381.562485 C433.040952,381.460262 433.066547,381.309483 433.107499,381.110148 C433.148451,380.910813 433.189403,380.708923 433.230355,380.504477 C433.271307,380.30003 433.314819,380.108362 433.36089,379.929472 C433.406961,379.750581 433.445353,379.625358 433.476067,379.553802 C433.527257,379.441357 433.581007,379.344245 433.637316,379.262466 C433.693625,379.180688 433.772969,379.088687 433.875349,378.986464 L436.516754,376.349109 L438.274059,374.598087 Z M424.954778,373.864066 L426.723633,374.448186 C426.300615,375.072653 425.949537,375.749182 425.682191,376.466063 L424.180404,375.970508 C423.695689,375.798751 423.386257,375.326392 423.424467,374.816544 C423.481438,374.315817 423.879192,373.920664 424.383216,373.864066 C424.572004,373.827963 424.76599,373.827963 424.954778,373.864066 Z M440.377969,373.003407 C440.613443,373.023852 440.802846,373.069852 440.946178,373.141409 C441.099748,373.223187 441.271234,373.366299 441.460637,373.570745 C441.65004,373.775192 441.795932,373.98986 441.898312,374.214751 C441.949502,374.357863 441.982775,374.526531 441.998132,374.720755 C442.013489,374.914979 441.934145,375.09898 441.760099,375.272759 C441.678195,375.36476 441.60141,375.446539 441.529744,375.518095 L441.34546,375.702096 C441.284032,375.76343 441.227723,375.814542 441.176533,375.855431 L439.103337,373.77008 C439.185241,373.688302 439.287621,373.59119 439.410477,373.478745 C439.533333,373.366299 439.635713,373.27941 439.717617,373.218076 C439.922377,373.054519 440.142494,372.982963 440.377969,373.003407 Z M421.43322,372.636835 C421.742684,372.621907 422.044993,372.732413 422.270916,372.943046 C422.496839,373.153679 422.627023,373.446397 422.631656,373.754165 C422.634407,374.041825 422.5216,374.318703 422.318219,374.523474 C422.112605,374.714934 421.843941,374.825603 421.562283,374.834861 C421.243085,374.860018 420.927302,374.755223 420.687406,374.544529 C420.447511,374.333835 420.304103,374.035333 420.290097,373.717531 C420.294876,373.422785 420.418643,373.142303 420.633595,372.93909 C420.848547,372.735877 421.136662,372.62697 421.43322,372.636835 Z M423.719467,357.067482 L439.926006,360.25462 C440.301169,360.282799 440.639359,360.489753 440.833468,360.80994 C441.027578,361.130126 441.053562,361.523883 440.903192,361.866506 C439.978912,364.832406 439.003663,367.798306 437.970478,370.745745 C437.216038,370.480968 436.418354,370.306628 435.59087,370.235817 C436.356002,368.041374 437.094364,365.835285 437.824134,363.624927 C437.990071,363.167005 438.137571,362.709083 438.285071,362.232844 L438.43257,362.251161 L424.014466,359.393727 L423.350717,361.225415 L418.999474,373.003172 C418.892782,373.478179 418.50582,373.840849 418.022288,373.919017 C417.610104,373.969981 417.203202,373.791103 416.963972,373.453771 C416.724742,373.11644 416.692135,372.675578 416.879164,372.307131 L418.280412,368.497219 L422.170719,357.928376 C422.24144,357.598087 422.45209,357.314137 422.748716,357.149253 C423.045342,356.984369 423.399131,356.954568 423.719467,357.067482 Z M426.503525,369.43138 C427.05665,369.577915 427.572899,369.779401 428.107586,369.944253 L431.079143,370.916392 C430.163468,371.289961 429.318293,371.799095 428.568946,372.418644 L426.079463,371.574455 C425.788586,371.505501 425.5382,371.322491 425.385366,371.067133 C425.232532,370.811776 425.190271,370.505825 425.268215,370.219006 C425.396643,369.666953 425.944845,369.317423 426.503525,369.43138 Z M423.203218,368.405634 C423.854913,368.405634 424.383216,368.930482 424.383216,369.577915 C424.364063,370.176825 423.87982,370.657901 423.276968,370.676928 C422.631827,370.708214 422.081258,370.218392 422.041657,369.577915 C422.041657,368.970947 422.536941,368.478902 423.147905,368.478902 L423.203218,368.405634 Z M428.697585,365.035327 L432.034767,365.914538 L433.32539,366.262559 C433.769152,366.38234 434.090534,366.756487 434.146501,367.201848 L434.154,367.312 L434.15029,367.417558 C434.124739,367.673739 434.004475,367.913289 433.810197,368.088202 C433.58354,368.292266 433.278637,368.388099 432.975078,368.350684 C432.292892,368.222465 431.629143,368.02098 430.965394,367.837811 L428.015398,367.050185 C427.538077,366.959764 427.182127,366.560998 427.148837,366.07939 C427.095242,365.655464 427.307049,365.241877 427.683524,365.035327 C428.005442,364.888741 428.375666,364.888741 428.697585,365.035327 Z M425.811198,364.168613 C426.041804,364.383826 426.17231,364.684366 426.171651,364.998694 C426.178078,365.290544 426.05903,365.57129 425.844332,365.770597 C425.629635,365.969904 425.339627,366.06889 425.046965,366.042756 L425.046965,366.061073 C424.738857,366.070945 424.439436,365.958737 424.214651,365.749164 C423.989866,365.539592 423.858155,365.249845 423.848529,364.943743 C423.84402,364.652093 423.964709,364.372328 424.180404,364.174434 C424.386523,363.972383 424.665224,363.860313 424.954778,363.863047 C425.270516,363.842767 425.580593,363.953401 425.811198,364.168613 Z" id="hy-icon-ops-list-editorialdownsizing-Editorialdownsizing"></path>
11
+ </g>
12
+ </g>
13
+ </symbol>`,
14
+ };
@@ -0,0 +1,14 @@
1
+ export default {
2
+ id: 'hy-icon-ops-list-suoxiao',
3
+ symbol: `<symbol id="hy-icon-ops-list-suoxiao" viewBox="0 0 24 24">
4
+ <g id="hy-icon-ops-list-suoxiao-部门管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="hy-icon-ops-list-suoxiao-缩小化-组件说明" transform="translate(-483, -13)" fill="#FFFFFF" fill-rule="nonzero">
6
+ <g id="hy-icon-ops-list-suoxiao-suoxiao" transform="translate(483, 13)">
7
+ <path d="M12,0 C5.372583,0 0,5.372583 0,12 C0,18.6274169 5.372583,24 12,24 C18.6274169,24 24,18.6274169 24,12 C24,5.372583 18.6274169,0 12,0 Z" id="hy-icon-ops-list-suoxiao-hy-icon-dispatch-Adv-v3-monitor-close-形状备份-14" fill-opacity="0.2"></path>
8
+ <path d="M12.3468905,13.2127939 L12.4786761,13.2798602 L17.570391,16.4134259 C17.9742125,16.6489229 18.1169744,17.1425846 17.8967433,17.5419316 C17.6765123,17.9412787 17.168857,18.1092817 16.7362483,17.9259849 L16.5924823,17.8532108 L11.9904705,15.0178761 L7.38845872,17.8532108 C7.0234701,18.0779721 6.54206147,18.0221347 6.24432043,17.7205052 L6.14398369,17.5977881 C5.90831977,17.2504554 5.96693244,16.7922561 6.28325707,16.509031 L6.41204751,16.4134259 L11.5022649,13.2812872 C11.7544505,13.1261153 12.0712286,13.100962 12.3468905,13.2142209 L12.3468905,13.2127939 Z M12.3468905,8.07152021 L12.4786761,8.1385865 L17.570391,11.2721522 C17.9742125,11.5076492 18.1169744,12.0013108 17.8967433,12.4006579 C17.6765123,12.800005 17.168857,12.968008 16.7362483,12.7847112 L16.5924823,12.7105102 L11.9904705,9.87660243 L7.38845872,12.7105102 C7.0234701,12.9352714 6.54206147,12.8794341 6.24432043,12.5778045 L6.14398369,12.4550875 C5.90831977,12.1077547 5.96693244,11.6495554 6.28325707,11.3663304 L6.41204751,11.2707252 L11.5022649,8.13715956 C11.7544505,7.98198772 12.0712286,7.95683441 12.3468905,8.07009326 L12.3468905,8.07152021 Z" id="hy-icon-ops-list-suoxiao-形状备份-4" transform="translate(12, 13) scale(1, -1) translate(-12, -13)"></path>
9
+ <path d="M12,0 C18.6274169,0 24,5.372583 24,12 C24,18.6274169 18.6274169,24 12,24 C5.372583,24 0,18.6274169 0,12 C0,5.372583 5.372583,0 12,0 Z M12,0.952380947 C5.89856848,0.952380947 0.952380947,5.89856848 0.952380947,12 C0.952380947,18.1014315 5.89856848,23.0476191 12,23.0476191 C18.1014315,23.0476191 23.0476191,18.1014315 23.0476191,12 C23.0476191,5.89856848 18.1014315,0.952380947 12,0.952380947 Z" id="hy-icon-ops-list-suoxiao-hy-icon-dispatch-Adv-v3-monitor-close-形状备份-16" fill-opacity="0.6"></path>
10
+ </g>
11
+ </g>
12
+ </g>
13
+ </symbol>`,
14
+ };
@@ -1000,4 +1000,13 @@
1000
1000
  }
1001
1001
 
1002
1002
  }
1003
- }
1003
+ }
1004
+
1005
+
1006
+ // 指引
1007
+ .hy-el-tour__content{
1008
+ .hy-el-tour__body{
1009
+ color: rgba(var(--hy-main), 1);
1010
+ }
1011
+ }
1012
+