hy-dispatch-ui-v3 0.2.60 → 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 (80) hide show
  1. package/dist/tailwind.css +70 -8
  2. package/es/api/device.mjs +18 -0
  3. package/es/api/sypct.mjs +18 -0
  4. package/es/api/task.mjs +18 -0
  5. package/es/bussiness/hyMapAearchPlace/index.mjs +6 -0
  6. package/es/bussiness/hyMapAearchPlace/js/index.mjs +653 -0
  7. package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +347 -0
  8. package/es/bussiness/hyMapAearchPlace/mapAearchPlaceItem.vue.mjs +99 -0
  9. package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +71 -0
  10. package/es/bussiness/index.mjs +1 -0
  11. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +22 -3
  12. package/es/components/hyButton/style/button.scss +1 -1
  13. package/es/components/hyConfigProvider/configProvider.vue.mjs +4 -0
  14. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +2 -2
  15. package/es/components/hyDialog/dialog.vue.mjs +24 -4
  16. package/es/components/hyForm/cpns/locationSelect.vue.mjs +3 -1
  17. package/es/components/hyMap/map.vue.mjs +10 -3
  18. package/es/components/hyMenu/menu.vue.mjs +38 -23
  19. package/es/components/hyMenu/style/menu.scss +3 -1
  20. package/es/components/hyOrgCascader/js/index.mjs +2 -2
  21. package/es/components/hySearch/cpns/searchItem.vue.mjs +17 -1
  22. package/es/components/hyTable/table.vue.mjs +8 -1
  23. package/es/components/hyTableForm/batchTableForm.vue.mjs +36 -59
  24. package/es/components/hyTableForm/js/index.mjs +8 -58
  25. package/es/components/hyTableForm/tableForm.vue.mjs +9 -3
  26. package/es/components/hyVideoPlayer/js/index.mjs +0 -1
  27. package/es/hooks/index.mjs +1 -0
  28. package/es/hooks/useApi.mjs +2 -2
  29. package/es/hooks/useGlobalConfig.mjs +6 -1
  30. package/es/hooks/useMapConfig.mjs +18 -0
  31. package/es/index.mjs +3 -0
  32. package/es/static/hy-svg-icons/hy-icon-ops-list-editorialdownsizing.js +14 -0
  33. package/es/static/hy-svg-icons/hy-icon-ops-list-suoxiao.js +14 -0
  34. package/es/style/element/hy-element.scss +10 -1
  35. package/es/utils/form.mjs +5 -1
  36. package/es/utils/handler.mjs +5 -0
  37. package/es/utils/index.mjs +1 -0
  38. package/es/utils/map/js/webgis.mjs +1 -1
  39. package/es/utils/tree.mjs +1 -0
  40. package/es/version.mjs +1 -1
  41. package/lib/api/device.js +20 -0
  42. package/lib/api/sypct.js +20 -0
  43. package/lib/api/task.js +20 -0
  44. package/lib/bussiness/hyMapAearchPlace/index.js +11 -0
  45. package/lib/bussiness/hyMapAearchPlace/js/index.js +655 -0
  46. package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +351 -0
  47. package/lib/bussiness/hyMapAearchPlace/mapAearchPlaceItem.vue.js +103 -0
  48. package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +71 -0
  49. package/lib/bussiness/index.js +2 -0
  50. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +22 -3
  51. package/lib/components/hyButton/style/button.scss +1 -1
  52. package/lib/components/hyConfigProvider/configProvider.vue.js +4 -0
  53. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +2 -2
  54. package/lib/components/hyDialog/dialog.vue.js +23 -3
  55. package/lib/components/hyForm/cpns/locationSelect.vue.js +3 -1
  56. package/lib/components/hyMap/map.vue.js +10 -3
  57. package/lib/components/hyMenu/menu.vue.js +37 -22
  58. package/lib/components/hyMenu/style/menu.scss +3 -1
  59. package/lib/components/hyOrgCascader/js/index.js +2 -2
  60. package/lib/components/hySearch/cpns/searchItem.vue.js +16 -0
  61. package/lib/components/hyTable/table.vue.js +8 -1
  62. package/lib/components/hyTableForm/batchTableForm.vue.js +33 -56
  63. package/lib/components/hyTableForm/js/index.js +7 -58
  64. package/lib/components/hyTableForm/tableForm.vue.js +8 -2
  65. package/lib/components/hyVideoPlayer/js/index.js +0 -1
  66. package/lib/hooks/index.js +3 -0
  67. package/lib/hooks/useApi.js +2 -2
  68. package/lib/hooks/useGlobalConfig.js +5 -0
  69. package/lib/hooks/useMapConfig.js +21 -0
  70. package/lib/index.js +36 -26
  71. package/lib/static/hy-svg-icons/hy-icon-ops-list-editorialdownsizing.js +14 -0
  72. package/lib/static/hy-svg-icons/hy-icon-ops-list-suoxiao.js +14 -0
  73. package/lib/style/element/hy-element.scss +10 -1
  74. package/lib/utils/form.js +4 -0
  75. package/lib/utils/handler.js +5 -0
  76. package/lib/utils/index.js +5 -0
  77. package/lib/utils/map/js/webgis.js +1 -0
  78. package/lib/utils/tree.js +10 -0
  79. package/lib/version.js +1 -1
  80. 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"],
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var elementPlus = require('element-plus');
7
- var iconsVue = require('@element-plus/icons-vue');
8
6
  var index = require('../hyTooltip/index.js');
9
7
  var index$1 = require('../hyIcon/index.js');
10
8
 
@@ -25,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
25
23
  },
26
24
  showShrink: {
27
25
  type: Boolean,
28
- default: false
26
+ default: true
29
27
  }
30
28
  }, {
31
29
  "expand": { type: Boolean, default: true },
@@ -70,18 +68,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
70
68
  }, [
71
69
  vue.createElementVNode("div", { class: "operator-label clickBox" }, [
72
70
  vue.createVNode(vue.unref(index$1.HyIcon), {
73
- "svg-name": `${item.iconName}`,
74
- "class-name": "!w-5 !h-5 flex-shrink-0"
71
+ "svg-name": `${item.iconNameV3 || item.iconName}`,
72
+ "class-name": "!w-4 !h-4 flex-shrink-0"
75
73
  }, null, 8, ["svg-name"]),
76
74
  vue.createElementVNode(
77
75
  "div",
78
76
  {
79
- class: vue.normalizeClass([{ "ml-3": expand.value }, "over_one_line w-full px-2"])
77
+ class: vue.normalizeClass([{
78
+ "ml-4 mr-3": expand.value,
79
+ "text-center mt-1": !expand.value
80
+ }, "over_one_line w-full"])
80
81
  },
81
82
  vue.toDisplayString(expand.value ? item.label : item.tip || item.label),
82
83
  3
83
84
  /* TEXT, CLASS */
84
- )
85
+ ),
86
+ expand.value && __props.modelValue === item.path ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
87
+ key: 0,
88
+ "svg-name": "analytics-v3-card-bili",
89
+ class: "text-theme",
90
+ "class-name": "!w-3 !h-3 flex-shrink-0"
91
+ })) : vue.createCommentVNode("v-if", true)
85
92
  ])
86
93
  ], 10, ["onClick"])
87
94
  ]),
@@ -95,23 +102,31 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
95
102
  ]),
96
103
  __props.showShrink ? (vue.openBlock(), vue.createElementBlock("div", {
97
104
  key: 0,
98
- class: vue.normalizeClass(["w-full h-[44px] border-t border-border box-border cursor-pointer relative", { "justify-end pr-3": expand.value, "justify-center": !expand.value }]),
105
+ class: vue.normalizeClass(["w-full h-[44px] border-t border-border box-border cursor-pointer relative flex items-center", { "justify-end pr-3": expand.value, "justify-center": !expand.value }]),
99
106
  onClick: ($event) => onExpandHandler()
100
107
  }, [
101
- vue.createVNode(vue.unref(elementPlus.ElIcon), {
102
- size: "20",
103
- style: vue.normalizeStyle({
104
- transform: expand.value ? "translate(0px, -50%) rotateY(0deg) rotateZ(90deg)" : "translate(50%, -50%) rotateY(-180deg) rotateZ(90deg)",
105
- transition: "all 0.3s linear"
106
- }),
107
- class: vue.normalizeClass(["absolute top-1/2", { "right-3": expand.value, "right-1/2": !expand.value }])
108
- }, {
109
- default: vue.withCtx(() => [
110
- vue.createVNode(vue.unref(iconsVue.Download))
111
- ]),
112
- _: 1
113
- /* STABLE */
114
- }, 8, ["style", "class"])
108
+ expand.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
109
+ key: 0,
110
+ "svg-name": "ops-linear-shouqi",
111
+ "class-name": "!w-4 !h-4 flex-shrink-0"
112
+ })) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
113
+ key: 1,
114
+ "svg-name": "ops-linear-zhankai",
115
+ "class-name": "!w-4 !h-4 flex-shrink-0"
116
+ })),
117
+ vue.createCommentVNode(" <el-icon"),
118
+ vue.createCommentVNode(' size="20"'),
119
+ vue.createCommentVNode(' :style="{'),
120
+ vue.createCommentVNode(" transform: expand"),
121
+ vue.createCommentVNode(" ? 'translate(0px, -50%) rotateY(0deg) rotateZ(90deg)'"),
122
+ vue.createCommentVNode(" : 'translate(50%, -50%) rotateY(-180deg) rotateZ(90deg)',"),
123
+ vue.createCommentVNode(" transition: 'all 0.3s linear',"),
124
+ vue.createCommentVNode(' }"'),
125
+ vue.createCommentVNode(' class="absolute top-1/2"'),
126
+ vue.createCommentVNode(` :class="{ 'right-3': expand, 'right-1/2': !expand }"`),
127
+ vue.createCommentVNode(" >"),
128
+ vue.createCommentVNode(" <Download />"),
129
+ vue.createCommentVNode(" </el-icon>")
115
130
  ], 10, ["onClick"])) : vue.createCommentVNode("v-if", true)
116
131
  ],
117
132
  2
@@ -53,6 +53,7 @@
53
53
  left: 0;
54
54
  top: 50%;
55
55
  transform: translateY(-50%);
56
+ border-radius: 10px;
56
57
  background-color: rgba(var(--hy-theme));
57
58
  }
58
59
  .operator-label {
@@ -115,6 +116,7 @@
115
116
  left: 0;
116
117
  top: 50%;
117
118
  transform: translateY(-50%);
119
+ border-radius: 10px;
118
120
  background-color: rgba(var(--hy-theme));
119
121
  }
120
122
  .operator-label {
@@ -138,7 +140,7 @@
138
140
  rgba(var(--hy-theme), 0) 2%,
139
141
  rgba(var(--hy-theme), 0.4) 100%
140
142
  );
141
- border-radius: 0px 4px 4px 0px;
143
+ //border-radius: 0px 4px 4px 0px;
142
144
  }
143
145
  }
144
146
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var axios = require('axios');
3
+ var Axios = require('axios');
4
4
  var vue = require('vue');
5
5
  var useApi = require('../../../hooks/useApi.js');
6
6
 
@@ -12,7 +12,7 @@ function getOrgTreeSimple() {
12
12
  if (cancelSource) {
13
13
  cancelSource.cancel("\u4E2D\u65AD\u8BF7\u6C42");
14
14
  }
15
- cancelSource = axios.CancelToken.source();
15
+ cancelSource = Axios.CancelToken.source();
16
16
  throttleFn = new Promise((resolve, reject) => {
17
17
  vue.unref(api).post(
18
18
  "organization/orgTreeSimple",
@@ -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,
@@ -342,7 +342,6 @@ const useVideoPlayer = (hy) => {
342
342
  submitText: t("videoPlayer.copyLink"),
343
343
  onSubmit: async () => {
344
344
  await handler.copyText(props.vlcAddress);
345
- elementPlus.ElMessage.success(t("hy.copySuccessfully"));
346
345
  }
347
346
  });
348
347
  }
@@ -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;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var axios = require('axios');
3
+ var Axios = require('axios');
4
4
  var vue = require('vue');
5
5
  var useGlobalConfig = require('./useGlobalConfig.js');
6
6
 
7
7
  const localApiKey = /* @__PURE__ */ Symbol("localApiKey");
8
8
  const defaultAxios = vue.ref(
9
- axios.create({
9
+ Axios.create({
10
10
  baseURL: "/api/admin",
11
11
  withCredentials: false,
12
12
  timeout: 6e4