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
@@ -13,6 +13,16 @@ import "./style/dialog.scss";
13
13
  const __default__ = vue.defineComponent({
14
14
  name: "HyDialog"
15
15
  });
16
+ const svg = `
17
+ <path class="path" d="
18
+ M 30 15
19
+ L 28 17
20
+ M 25.61 25.61
21
+ A 15 15, 0, 0, 1, 15 30
22
+ A 15 15, 0, 1, 1, 27.99 7.5
23
+ L 15 15
24
+ " style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/>
25
+ `;
16
26
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
17
27
  props: /* @__PURE__ */ vue.mergeModels({
18
28
  title: { type: String, default: "\u6807\u9898" },
@@ -190,6 +200,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
190
200
  hideToWorkspace
191
201
  });
192
202
  return (_ctx, _cache) => {
203
+ const _directive_loading = vue.resolveDirective("loading");
193
204
  return vue.openBlock(), vue.createElementBlock(
194
205
  vue.Fragment,
195
206
  null,
@@ -210,6 +221,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
210
221
  "close-on-click-modal": false,
211
222
  "close-on-press-escape": false,
212
223
  "show-close": false,
224
+ "destroy-on-close": true,
213
225
  "modal-class": modalClass.value,
214
226
  modelValue: visible.value,
215
227
  "onUpdate:modelValue": ($event) => visible.value = $event,
@@ -255,7 +267,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
255
267
  )
256
268
  ]),
257
269
  default: vue.withCtx(() => [
258
- vue.createElementVNode("div", { class: "h-full flex flex-col text-main" }, [
270
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
271
+ "element-loading-text": "\u52A0\u8F7D\u4E2D...",
272
+ "element-loading-svg": svg,
273
+ "element-loading-svg-view-box": "-10, -10, 50, 50",
274
+ "element-loading-background": "rgba(0, 0, 0, 0.8)",
275
+ class: "h-full flex flex-col text-main"
276
+ }, [
259
277
  vue.renderSlot(_ctx.$slots, "before-content"),
260
278
  vue.renderSlot(_ctx.$slots, "content", {}, () => [
261
279
  vue.createElementVNode(
@@ -304,7 +322,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
304
322
  __props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
305
323
  key: 1,
306
324
  type: __props.submitType,
307
- disabled: loading.value,
325
+ loading: loading.value,
308
326
  class: "!min-w-[120px]",
309
327
  onClick: onSubmitHandler
310
328
  }, {
@@ -317,7 +335,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
317
335
  ]),
318
336
  _: 1
319
337
  /* STABLE */
320
- }, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true)
338
+ }, 8, ["type", "loading"])) : vue.createCommentVNode("v-if", true)
321
339
  ]),
322
340
  vue.renderSlot(_ctx.$slots, "operate-right-box")
323
341
  ],
@@ -326,6 +344,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
326
344
  ),
327
345
  vue.renderSlot(_ctx.$slots, "operate-left-box")
328
346
  ])) : vue.createCommentVNode("v-if", true)
347
+ ])), [
348
+ [_directive_loading, loading.value]
329
349
  ])
330
350
  ]),
331
351
  _: 3
@@ -242,7 +242,9 @@ const _sfc_main = {
242
242
  if (marker) {
243
243
  marker.remove();
244
244
  }
245
- map.removeMap();
245
+ if (map) {
246
+ map.removeMap();
247
+ }
246
248
  map = null;
247
249
  hyMap = null;
248
250
  });
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var index = require('./js/index.js');
7
7
  var useMixins = require('../../hooks/useMixins.js');
8
+ var useMapConfig = require('../../hooks/useMapConfig.js');
8
9
 
9
10
  import "../../static/map/bigemap.css";
10
11
 
@@ -18,12 +19,18 @@ const _sfc_main = {
18
19
  // 地图配置
19
20
  mapConfig: {
20
21
  type: Object,
21
- default: () => ({})
22
+ default: () => {
23
+ const { mapConfig } = useMapConfig.useMapConfig();
24
+ return mapConfig.value || {};
25
+ }
22
26
  },
23
- // 地图类型 gaode leafletjs bugMap
27
+ // 地图类型 gaode leafletjs bigMap
24
28
  mapType: {
25
29
  type: String,
26
- default: "gaode"
30
+ default: () => {
31
+ const { mapConfig } = useMapConfig.useMapConfig();
32
+ return mapConfig.value?.mapType || "gaode";
33
+ }
27
34
  }
28
35
  },
29
36
  emits: ["complete"],
@@ -243,6 +243,22 @@ const _sfc_main = {
243
243
  ],
244
244
  2112
245
245
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
246
+ )) : __props.column.type === "cascader" ? (vue.openBlock(), vue.createElementBlock(
247
+ vue.Fragment,
248
+ { key: 6 },
249
+ [
250
+ vue.createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
251
+ vue.createVNode(vue.unref(elementPlus.ElCascader), vue.mergeProps({
252
+ modelValue: bindValue.value,
253
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
254
+ }, columnAttrs.value, {
255
+ disabled: vue.unref(index.isDisabled)(props, __props.column),
256
+ options: vue.unref(index.optionsHandler)(props, __props.column),
257
+ onChange: onChangeHandler
258
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
259
+ ],
260
+ 2112
261
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
246
262
  )) : vue.createCommentVNode("v-if", true)
247
263
  ],
248
264
  6
@@ -243,6 +243,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
243
243
  // 表单查询
244
244
  totalElements,
245
245
  showFilter,
246
+ selectedList,
246
247
  getData,
247
248
  setData,
248
249
  resetFields,
@@ -745,7 +746,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
745
746
  "hide-on-single-page": "",
746
747
  onSizeChange: vue.unref(onSizeChangeHandler),
747
748
  onCurrentChange: vue.unref(onCurrentChangeHandler)
748
- }, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"])
749
+ }, null, 8, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total", "pager-count", "layout", "onSizeChange", "onCurrentChange"]),
750
+ vue.unref(selectedList) && vue.unref(selectedList).length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
751
+ key: 0,
752
+ class: "absolute right-4 top-1/2 transform -translate-y-1/2"
753
+ }, [
754
+ vue.renderSlot(_ctx.$slots, "multiple-operator-slot")
755
+ ])) : vue.createCommentVNode("v-if", true)
749
756
  ])) : vue.createCommentVNode("v-if", true)
750
757
  ]),
751
758
  vue.createCommentVNode(" \u8868\u683C\u884C\u53F3\u952E\u5C55\u793A\u64CD\u4F5C\u5217\u8868 "),
@@ -6,13 +6,13 @@ var vue = require('vue');
6
6
  var elementPlus = require('element-plus');
7
7
  var iconsVue = require('@element-plus/icons-vue');
8
8
  var tableForm = require('./tableForm.vue.js');
9
- var index$2 = require('./js/index.js');
9
+ var index$3 = require('./js/index.js');
10
10
  var useApi = require('../../hooks/useApi.js');
11
11
  var useLocale = require('../../hooks/useLocale.js');
12
12
  var is = require('../../utils/is.js');
13
13
  var index = require('../hyIcon/index.js');
14
14
  var index$1 = require('../hyButton/index.js');
15
- var index$3 = require('../hyConfirmDialog/index.js');
15
+ var index$2 = require('../hyConfirmDialog/index.js');
16
16
 
17
17
  import "./style/batchTableForm.scss";
18
18
 
@@ -68,21 +68,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
68
68
  onExpandRowChange: {
69
69
  type: Function
70
70
  },
71
- templateConfig: {
72
- type: Object,
73
- default: () => ({
74
- title: "\u4E0B\u8F7D\u6A21\u677F",
75
- url: "",
76
- fileName: ""
77
- })
78
- },
79
- url: {
80
- type: String
71
+ submitHandler: {
72
+ type: Function
81
73
  },
82
- submitParams: {
83
- type: Object
74
+ // 是否显示添加按钮
75
+ showAddBtn: {
76
+ type: Boolean,
77
+ default: true
84
78
  },
85
- submitHandler: {
79
+ // 外部整体数据处理
80
+ beforeDataListHandle: {
86
81
  type: Function
87
82
  }
88
83
  }, {
@@ -146,6 +141,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
146
141
  return tableRef.value.validate();
147
142
  }
148
143
  async function onUploadChange(file) {
144
+ const { beforeDataListHandle } = props;
149
145
  const type = file.raw.type;
150
146
  if (file.raw.size > 1024 * 1024 * 10) {
151
147
  elementPlus.ElMessage.error(`\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710M\uFF01`);
@@ -153,31 +149,32 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
153
149
  } else {
154
150
  if (type.indexOf("application") !== -1) {
155
151
  const files = { 0: file.raw };
152
+ isUploading.value = true;
153
+ emits("uploading");
156
154
  try {
157
- isUploading.value = true;
158
- emits("uploading");
159
- const data = await index$2.doReadExcel(files, props);
155
+ const data = await index$3.doReadExcel(files, props);
160
156
  if (!data) {
161
157
  elementPlus.ElMessage.warning("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
162
- isUploading.value = false;
163
- return;
158
+ throw Error("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25");
164
159
  }
165
160
  if (!data.length) {
166
161
  elementPlus.ElMessage.warning("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
167
- isUploading.value = false;
168
- return;
162
+ throw Error("\u8BE5\u6587\u4EF6\u6CA1\u6709\u6570\u636E");
169
163
  }
170
164
  active.value++;
171
- isUploading.value = false;
172
- emits("uploaded");
173
165
  await vue.nextTick();
174
- setData(data);
166
+ if (beforeDataListHandle) {
167
+ const processData = await beforeDataListHandle(data);
168
+ setData(processData);
169
+ } else {
170
+ setData(data);
171
+ }
175
172
  templateFileName.value = file.name;
176
173
  } catch (err) {
177
- isUploading.value = false;
178
174
  console.error(err);
179
- return;
180
175
  }
176
+ isUploading.value = false;
177
+ emits("uploaded");
181
178
  } else {
182
179
  elementPlus.ElMessage.error("\u6587\u4EF6\u683C\u5F0F\u6709\u8BEF");
183
180
  }
@@ -189,7 +186,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
189
186
  if (total) {
190
187
  try {
191
188
  await new Promise((resolve, reject) => {
192
- index$3.HyConfirmDialog.confirm({
189
+ index$2.HyConfirmDialog.confirm({
193
190
  content: submitNumber.value ? `\u672C\u6B21\u5DF2\u6210\u529F\u5BFC\u5165 ${submitNumber.value} \u6761\u6570\u636E\uFF0C\u91CD\u65B0\u4E0A\u4F20\u5C06\u4E0D\u4F1A\u64A4\u9500\u8FD9\u4E9B\u6570\u636E\u3002\u5269\u4F59\u672A\u5BFC\u5165\u6570\u636E\u5C06\u4F1A\u88AB\u6E05\u7A7A` : `\u91CD\u65B0\u4E0A\u4F20\u5C06\u6E05\u7A7A\u5F53\u524D ${total} \u6761\u6570\u636E, <br />\u662F\u5426\u786E\u8BA4\u91CD\u65B0\u4E0A\u4F20`,
194
191
  onClose: reject,
195
192
  onCancel: reject,
@@ -209,12 +206,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
209
206
  uploadRef.value.click();
210
207
  }
211
208
  async function submitDataSource() {
212
- if (!props.url && !props.submitHandler) {
213
- elementPlus.ElMessage.warning("\u8BF7\u914D\u7F6E\u63D0\u4EA4\u8868\u5355\u5730\u5740");
209
+ if (!props.submitHandler) {
210
+ elementPlus.ElMessage.warning("\u8BF7\u914D\u7F6E\u63D0\u4EA4\u903B\u8F91");
214
211
  return Promise.reject();
215
212
  }
216
213
  if (submitting.value) {
217
- index$3.HyConfirmDialog.tip({
214
+ index$2.HyConfirmDialog.tip({
218
215
  content: `\u6570\u636E\u6B63\u5728\u5904\u7406\u4E2D\uFF0C<br/>\u8BF7\u7B49\u5F85\u6570\u636E\u5904\u7406\u5B8C\u6210\u540E\u518D\u5173\u95ED\u5F39\u7A97`
219
216
  });
220
217
  return Promise.reject();
@@ -232,7 +229,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
232
229
  if (failed) {
233
230
  try {
234
231
  await new Promise((resolve, reject) => {
235
- index$3.HyConfirmDialog.confirm({
232
+ index$2.HyConfirmDialog.confirm({
236
233
  content: `\u5F53\u524D\u5B58\u5728<span class="text-danger-2"> ${failed} \u6761\u6570\u636E\u5F02\u5E38</span>\uFF0C\u672C\u6B21\u5C06\u4EC5\u5BFC\u5165 ${success} \u6761\u5BFC\u5165\u5C31\u7EEA\u6570\u636E\uFF0C\u5F02\u5E38\u6570\u636E\u5C06\u88AB\u5FFD\u7565`,
237
234
  onClose: reject,
238
235
  onCancel: reject,
@@ -254,13 +251,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
254
251
  if (errorMsg) {
255
252
  continue;
256
253
  }
257
- let res2;
258
254
  try {
259
- if (props.submitHandler) {
260
- res2 = await props.submitHandler(data);
261
- } else {
262
- res2 = await unref(api).post(props.url, props.submitParams);
263
- }
255
+ const res2 = await props.submitHandler(data);
264
256
  if (res2.code === 200) {
265
257
  submitNumber.value++;
266
258
  submitList.push(target);
@@ -446,23 +438,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
446
438
  innerHTML: item.description,
447
439
  class: "text-auxiliary text-center mb-3 whitespace-nowrap"
448
440
  }, null, 8, ["innerHTML"]),
449
- index === 0 ? vue.renderSlot(_ctx.$slots, "template-down", {}, () => [
450
- vue.createVNode(vue.unref(index$1.HyButton), {
451
- type: "primary",
452
- link: "",
453
- onClick: () => vue.unref(index$2.downloadTemplateHandler)(props)
454
- }, {
455
- default: vue.withCtx(() => [
456
- vue.createTextVNode(
457
- vue.toDisplayString(__props.templateConfig ? __props.templateConfig.title : "\u4E0B\u8F7D\u6A21\u677F"),
458
- 1
459
- /* TEXT */
460
- )
461
- ]),
462
- _: 1
463
- /* STABLE */
464
- }, 8, ["onClick"])
465
- ], void 0, 1) : vue.createCommentVNode("v-if", true)
441
+ index === 0 ? vue.renderSlot(_ctx.$slots, "template-down", {}, void 0, void 0, 1) : vue.createCommentVNode("v-if", true)
466
442
  ]);
467
443
  }),
468
444
  64
@@ -534,6 +510,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
534
510
  rowClickExpand: __props.rowClickExpand,
535
511
  columnNum: __props.columnNum,
536
512
  size: __props.size,
513
+ showAddBtn: __props.showAddBtn,
537
514
  class: "h-0 flex-1"
538
515
  }), vue.createSlots({
539
516
  _: 2
@@ -547,7 +524,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
547
524
  ])
548
525
  };
549
526
  })
550
- ]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size"])
527
+ ]), 1040, ["tableColumns", "formColumns", "onExpandRowChange", "rules", "rowClickExpand", "columnNum", "size", "showAddBtn"])
551
528
  ])) : vue.createCommentVNode("v-if", true),
552
529
  submitting.value ? (vue.openBlock(), vue.createElementBlock("div", {
553
530
  key: 1,
@@ -1,12 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var XLSX = require('xlsx');
4
- var dayjs = require('dayjs');
5
- var vue = require('vue');
6
4
  var AsyncValidator = require('async-validator');
7
- var elementPlus = require('element-plus');
8
5
  var index = require('../../hyForm/js/index.js');
9
- var useApi = require('../../../hooks/useApi.js');
10
6
  var form = require('../../../utils/form.js');
11
7
  var is = require('../../../utils/is.js');
12
8
 
@@ -41,7 +37,7 @@ const doValidate = async (target = {}, columns = [], ruleList = {}) => {
41
37
  });
42
38
  };
43
39
  const doReadExcel = (files, props) => {
44
- return new Promise((resolve2, reject) => {
40
+ return new Promise((resolve, reject) => {
45
41
  const { formColumns, beforeDataHandle } = props;
46
42
  const fileReader = new FileReader();
47
43
  fileReader.onload = (ev) => {
@@ -61,9 +57,13 @@ const doReadExcel = (files, props) => {
61
57
  }, JSON.stringify(ws1));
62
58
  let dataSource = JSON.parse(content);
63
59
  if (beforeDataHandle) {
64
- dataSource = dataSource.map((item) => beforeDataHandle(item));
60
+ const handlePromises = dataSource.map(
61
+ (item) => Promise.resolve().then(() => beforeDataHandle(item)).catch(() => item)
62
+ );
63
+ Promise.all(handlePromises).then(resolve, reject);
64
+ return;
65
65
  }
66
- resolve2(dataSource);
66
+ resolve(dataSource);
67
67
  } catch (err) {
68
68
  reject(err);
69
69
  }
@@ -71,57 +71,6 @@ const doReadExcel = (files, props) => {
71
71
  fileReader.readAsBinaryString(files[0]);
72
72
  });
73
73
  };
74
- const downloadTemplateHandler = async (props) => {
75
- const { templateConfig } = props;
76
- const { url, fileName } = templateConfig;
77
- if (!url) {
78
- elementPlus.ElMessage.warning("\u8BF7\u914D\u7F6E\u4E0B\u8F7D\u6A21\u677F\u5730\u5740");
79
- return;
80
- }
81
- const { api } = useApi.useApi();
82
- try {
83
- const blob = await vue.unref(api).get(url, {
84
- responseType: "blob"
85
- });
86
- blobDownloadFn(blob, fileName).then(() => {
87
- resolve();
88
- });
89
- } catch (err) {
90
- console.error(err);
91
- }
92
- };
93
- function blobDownloadFn(blob, name) {
94
- return new Promise((resolve2, reject) => {
95
- elementPlus.ElMessage.warning("\u5F00\u59CB\u4E0B\u8F7D");
96
- const today = dayjs().format("YYYY-MM-DD HH:mm:ss");
97
- const reader = new FileReader();
98
- reader.readAsDataURL(blob);
99
- reader.onload = function(ev) {
100
- let url = null;
101
- try {
102
- if (window.navigator.msSaveOrOpenBlob) {
103
- const blobObject = new Blob([blob]);
104
- window.navigator.msSaveOrOpenBlob(blobObject, `${name}_${today}.xls`);
105
- } else {
106
- url = URL.createObjectURL(new Blob([blob]));
107
- const a = document.createElement("a");
108
- document.body.appendChild(a);
109
- a.href = url;
110
- a.download = `${name}_${today}.xls`;
111
- a.target = "_blank";
112
- a.click();
113
- a.remove();
114
- }
115
- resolve2();
116
- } catch (error) {
117
- reject(error);
118
- } finally {
119
- if (url) URL.revokeObjectURL(url);
120
- }
121
- };
122
- });
123
- }
124
74
 
125
75
  exports.doReadExcel = doReadExcel;
126
76
  exports.doValidate = doValidate;
127
- exports.downloadTemplateHandler = downloadTemplateHandler;
@@ -63,6 +63,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
63
63
  type: String,
64
64
  default: "default"
65
65
  // 'large' | 'default' | 'small'
66
+ },
67
+ // 是否显示添加按钮
68
+ showAddBtn: {
69
+ type: Boolean,
70
+ default: true
66
71
  }
67
72
  },
68
73
  emits: ["validate"],
@@ -334,7 +339,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
334
339
  ])) : vue.createCommentVNode("v-if", true)
335
340
  ]),
336
341
  vue.createElementVNode("div", { class: "flex items-center gap-3" }, [
337
- vue.createVNode(vue.unref(index.HyButton), {
342
+ __props.showAddBtn ? (vue.openBlock(), vue.createBlock(vue.unref(index.HyButton), {
343
+ key: 0,
338
344
  type: "success",
339
345
  size: "small",
340
346
  "svg-name": "ops-button-add",
@@ -345,7 +351,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
345
351
  ]),
346
352
  _: 1
347
353
  /* STABLE */
348
- }),
354
+ })) : vue.createCommentVNode("v-if", true),
349
355
  vue.createElementVNode("div", { class: "hy-table-form-tabs" }, [
350
356
  (vue.openBlock(true), vue.createElementBlock(
351
357
  vue.Fragment,
@@ -13,6 +13,7 @@ var useVideoPlayerConfig = require('./useVideoPlayerConfig.js');
13
13
  var useEnsureHyIcon = require('./useEnsureHyIcon.js');
14
14
  var useTooltipConfig = require('./useTooltipConfig.js');
15
15
  var useSubscribe = require('./useSubscribe.js');
16
+ var useMapConfig = require('./useMapConfig.js');
16
17
 
17
18
 
18
19
 
@@ -46,3 +47,5 @@ exports.localTooltipConfigKey = useTooltipConfig.localTooltipConfigKey;
46
47
  exports.useTooltipConfig = useTooltipConfig.useTooltipConfig;
47
48
  exports.usePublish = useSubscribe.usePublish;
48
49
  exports.useSubscribe = useSubscribe.useSubscribe;
50
+ exports.localMapConfigKey = useMapConfig.localMapConfigKey;
51
+ exports.useMapConfig = useMapConfig.useMapConfig;
@@ -10,6 +10,7 @@ var useAudioPlayerConfig = require('./useAudioPlayerConfig.js');
10
10
  var useVideoPlayerConfig = require('./useVideoPlayerConfig.js');
11
11
  var useEnsureHyIcon = require('./useEnsureHyIcon.js');
12
12
  var useTooltipConfig = require('./useTooltipConfig.js');
13
+ var useMapConfig = require('./useMapConfig.js');
13
14
  var zh_CN = require('../locale/zh_CN.js');
14
15
 
15
16
  const globalConfig = vue.ref();
@@ -79,6 +80,10 @@ const provideGlobalConfig = (config, app, global = false) => {
79
80
  useTooltipConfig.localTooltipConfigKey,
80
81
  vue.computed(() => context.value.tooltip)
81
82
  );
83
+ provideFn(
84
+ useMapConfig.localMapConfigKey,
85
+ vue.computed(() => context.value.mapConfig)
86
+ );
82
87
  if (global || !globalConfig.value) {
83
88
  globalConfig.value = context.value;
84
89
  }
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var useGlobalConfig = require('./useGlobalConfig.js');
5
+
6
+ const localMapConfigKey = /* @__PURE__ */ Symbol("mapConfig");
7
+ const useMapConfig = () => {
8
+ if (vue.getCurrentInstance()) {
9
+ const mapConfig = vue.inject(localMapConfigKey, vue.ref());
10
+ return {
11
+ mapConfig: vue.unref(mapConfig) ? mapConfig : vue.computed(() => vue.unref(useGlobalConfig.useGlobalConfig()).mapConfig || {})
12
+ };
13
+ } else {
14
+ return {
15
+ mapConfig: vue.computed(() => vue.unref(useGlobalConfig.useGlobalConfig()).mapConfig || {})
16
+ };
17
+ }
18
+ };
19
+
20
+ exports.localMapConfigKey = localMapConfigKey;
21
+ exports.useMapConfig = useMapConfig;
package/lib/index.js CHANGED
@@ -20,18 +20,19 @@ var index$d = require('./components/hyForm/index.js');
20
20
  var index$e = require('./components/hyIcon/index.js');
21
21
  var index$f = require('./components/hyIconBox/index.js');
22
22
  var index$g = require('./components/hyMap/index.js');
23
- var index$h = require('./components/hyMenu/index.js');
24
- var index$i = require('./components/hyNoPermissions/index.js');
25
- var index$j = require('./components/hyNoPermissionsMap/index.js');
26
- var index$k = require('./components/hyOrgCascader/index.js');
27
- var index$l = require('./components/hyRadioGroup/index.js');
28
- var index$m = require('./components/hySearch/index.js');
29
- var index$n = require('./components/hyTable/index.js');
30
- var index$o = require('./components/hyTableActionButton/index.js');
31
- var index$p = require('./components/hyTree/index.js');
32
- var index$q = require('./components/hyUserAvatar/index.js');
33
- var index$r = require('./components/hyVideoPlayer/index.js');
34
- var index$s = require('./utils/map/index.js');
23
+ var index$h = require('./bussiness/hyMapAearchPlace/index.js');
24
+ var index$i = require('./components/hyMenu/index.js');
25
+ var index$j = require('./components/hyNoPermissions/index.js');
26
+ var index$k = require('./components/hyNoPermissionsMap/index.js');
27
+ var index$l = require('./components/hyOrgCascader/index.js');
28
+ var index$m = require('./components/hyRadioGroup/index.js');
29
+ var index$n = require('./components/hySearch/index.js');
30
+ var index$o = require('./components/hyTable/index.js');
31
+ var index$p = require('./components/hyTableActionButton/index.js');
32
+ var index$q = require('./components/hyTree/index.js');
33
+ var index$r = require('./components/hyUserAvatar/index.js');
34
+ var index$s = require('./components/hyVideoPlayer/index.js');
35
+ var index$t = require('./utils/map/index.js');
35
36
  var permission = require('./utils/permission.js');
36
37
  var crypto = require('./utils/crypto.js');
37
38
  var file = require('./utils/file.js');
@@ -46,6 +47,7 @@ var date = require('./utils/date.js');
46
47
  var is = require('./utils/is.js');
47
48
  var useAudioPlayerConfig = require('./hooks/useAudioPlayerConfig.js');
48
49
  var useEnsureHyIcon = require('./hooks/useEnsureHyIcon.js');
50
+ var useMapConfig = require('./hooks/useMapConfig.js');
49
51
  var usePermissionMap = require('./hooks/usePermissionMap.js');
50
52
  var useTooltipConfig = require('./hooks/useTooltipConfig.js');
51
53
  var useUserAvatarMap = require('./hooks/useUserAvatarMap.js');
@@ -87,20 +89,21 @@ exports.HyForm = index$d.HyForm;
87
89
  exports.HyIcon = index$e.HyIcon;
88
90
  exports.HyIconBox = index$f.HyIconBox;
89
91
  exports.HyMap = index$g.HyMap;
90
- exports.HyMenu = index$h.HyMenu;
91
- exports.HyNoPermissions = index$i.HyNoPermissions;
92
- exports.HyNoPermissionsMap = index$j.HyNoPermissionsMap;
93
- exports.HyOrgCascader = index$k.HyOrgCascader;
94
- exports.HyRadioGroup = index$l.HyRadioGroup;
95
- exports.HySearch = index$m.HySearch;
96
- exports.HyTable = index$n.HyTable;
97
- exports.HyTableActionButton = index$o.HyTableActionButton;
98
- exports.HyTree = index$p.HyTree;
99
- exports.HyUserAvatar = index$q.HyUserAvatar;
100
- exports.HyVideoPlayer = index$r.HyVideoPlayer;
101
- exports.InitMap = index$s.InitMap;
102
- exports.setMapServer = index$s.setMapServer;
103
- exports.setPoiServer = index$s.setPoiServer;
92
+ exports.HyMapAearchPlace = index$h.HyMapAearchPlace;
93
+ exports.HyMenu = index$i.HyMenu;
94
+ exports.HyNoPermissions = index$j.HyNoPermissions;
95
+ exports.HyNoPermissionsMap = index$k.HyNoPermissionsMap;
96
+ exports.HyOrgCascader = index$l.HyOrgCascader;
97
+ exports.HyRadioGroup = index$m.HyRadioGroup;
98
+ exports.HySearch = index$n.HySearch;
99
+ exports.HyTable = index$o.HyTable;
100
+ exports.HyTableActionButton = index$p.HyTableActionButton;
101
+ exports.HyTree = index$q.HyTree;
102
+ exports.HyUserAvatar = index$r.HyUserAvatar;
103
+ exports.HyVideoPlayer = index$s.HyVideoPlayer;
104
+ exports.InitMap = index$t.InitMap;
105
+ exports.setMapServer = index$t.setMapServer;
106
+ exports.setPoiServer = index$t.setPoiServer;
104
107
  exports.PERMISSION = permission.PERMISSION;
105
108
  exports.base64Decrypt = crypto.base64Decrypt;
106
109
  exports.encryptToBase64 = crypto.encryptToBase64;
@@ -170,6 +173,8 @@ exports.localAudioPlayerConfigKey = useAudioPlayerConfig.localAudioPlayerConfigK
170
173
  exports.useAudioPlayerConfig = useAudioPlayerConfig.useAudioPlayerConfig;
171
174
  exports.localEnsureHyIconMapKey = useEnsureHyIcon.localEnsureHyIconMapKey;
172
175
  exports.useEnsureHyIcon = useEnsureHyIcon.useEnsureHyIcon;
176
+ exports.localMapConfigKey = useMapConfig.localMapConfigKey;
177
+ exports.useMapConfig = useMapConfig.useMapConfig;
173
178
  exports.localPermissionMapKey = usePermissionMap.localPermissionMapKey;
174
179
  exports.usePermissionMap = usePermissionMap.usePermissionMap;
175
180
  exports.localTooltipConfigKey = useTooltipConfig.localTooltipConfigKey;
@@ -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
+ };