hy-dispatch-ui-v3 0.2.59 → 0.2.60

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 (87) hide show
  1. package/dist/tailwind.css +129 -0
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  3. package/es/api/index.mjs +137 -0
  4. package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
  5. package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
  6. package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  7. package/es/bussiness/index.mjs +1 -1
  8. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
  9. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
  10. package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
  11. package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
  12. package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
  13. package/es/components/hyForm/form.vue.mjs +83 -31
  14. package/es/components/hyForm/js/index.mjs +9 -2
  15. package/es/components/hyForm/js/useAppForm.mjs +6 -36
  16. package/es/components/hyMap/map.vue.mjs +3 -3
  17. package/es/components/hyRadioGroup/index.mjs +6 -0
  18. package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
  19. package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
  20. package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
  21. package/es/components/hySearch/js/useAppSearch.mjs +3 -33
  22. package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
  23. package/es/components/hyTable/js/index.mjs +6 -3
  24. package/es/components/hyTable/js/search.mjs +1 -0
  25. package/es/components/hyTable/table.vue.mjs +11 -4
  26. package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
  27. package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
  28. package/es/components/hyTree/js/index.mjs +69 -53
  29. package/es/components/hyTree/tree.vue.mjs +36 -1
  30. package/es/components/index.mjs +1 -0
  31. package/es/index.mjs +3 -1
  32. package/es/locale/en.mjs +17 -1
  33. package/es/locale/zh_CN.mjs +17 -1
  34. package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  35. package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  36. package/es/style/index.scss +53 -0
  37. package/es/style/theme.scss +0 -53
  38. package/es/utils/form.mjs +56 -7
  39. package/es/utils/index.mjs +1 -1
  40. package/es/utils/map/hook/bigMap.mjs +4 -0
  41. package/es/utils/map/hook/gaode.mjs +3 -0
  42. package/es/utils/map/hook/leafletjs.mjs +10 -10
  43. package/es/utils/map/index.mjs +27 -7
  44. package/es/version.mjs +1 -1
  45. package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
  46. package/lib/api/index.js +147 -0
  47. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
  48. package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
  49. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  50. package/lib/bussiness/index.js +5 -0
  51. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
  52. package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
  53. package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
  54. package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
  55. package/lib/components/hyForm/form.vue.js +79 -27
  56. package/lib/components/hyForm/js/index.js +9 -1
  57. package/lib/components/hyForm/js/useAppForm.js +5 -35
  58. package/lib/components/hyMap/map.vue.js +3 -3
  59. package/lib/components/hyRadioGroup/index.js +11 -0
  60. package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
  61. package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
  62. package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
  63. package/lib/components/hySearch/js/useAppSearch.js +2 -32
  64. package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
  65. package/lib/components/hyTable/js/index.js +6 -3
  66. package/lib/components/hyTable/js/search.js +1 -0
  67. package/lib/components/hyTable/table.vue.js +43 -36
  68. package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
  69. package/lib/components/hyTableForm/tableForm.vue.js +6 -0
  70. package/lib/components/hyTree/js/index.js +69 -53
  71. package/lib/components/hyTree/tree.vue.js +36 -1
  72. package/lib/components/index.js +14 -12
  73. package/lib/index.js +56 -49
  74. package/lib/locale/en.js +17 -1
  75. package/lib/locale/zh_CN.js +17 -1
  76. package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  77. package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  78. package/lib/style/index.scss +53 -0
  79. package/lib/style/theme.scss +0 -53
  80. package/lib/utils/form.js +57 -5
  81. package/lib/utils/index.js +3 -0
  82. package/lib/utils/map/hook/bigMap.js +4 -0
  83. package/lib/utils/map/hook/gaode.js +3 -0
  84. package/lib/utils/map/hook/leafletjs.js +10 -10
  85. package/lib/utils/map/index.js +26 -6
  86. package/lib/version.js +1 -1
  87. package/package.json +2 -2
@@ -31,7 +31,8 @@ var zh_CN = {
31
31
  wednesday: "\u661F\u671F\u4E09",
32
32
  thursday: "\u661F\u671F\u56DB",
33
33
  friday: "\u661F\u671F\u4E94",
34
- saturday: "\u661F\u671F\u516D"
34
+ saturday: "\u661F\u671F\u516D",
35
+ help: "\u5E2E\u52A9"
35
36
  },
36
37
  form: {
37
38
  department: "\u6240\u5C5E\u90E8\u95E8",
@@ -144,6 +145,21 @@ var zh_CN = {
144
145
  endMonth: "\u7ED3\u675F\u6708\u4EFD",
145
146
  startYear: "\u5F00\u59CB\u5E74\u4EFD",
146
147
  endYear: "\u7ED3\u675F\u5E74\u4EFD"
148
+ },
149
+ departmentType: {
150
+ editDepartmentType: "\u7F16\u8F91\u90E8\u95E8\u7C7B\u578B",
151
+ addDepartmentType: "\u6DFB\u52A0\u90E8\u95E8\u7C7B\u578B",
152
+ departmentIcon: "\u90E8\u95E8\u56FE\u6807",
153
+ upload: "\u4E0A \u4F20",
154
+ pleaseUploadDepartmentTypeIcon: "\u8BF7\u4E0A\u4F20\u90E8\u95E8\u7C7B\u578B\u56FE\u6807",
155
+ iconSize44px: "\u56FE\u6807\u5C3A\u5BF844px",
156
+ ifNoIconUseTheDefaultIcon: "\u82E5\u65E0\u56FE\u6807\u5219\u4F7F\u7528\u9ED8\u8BA4\u56FE\u6807",
157
+ departmentTypeName: "\u90E8\u95E8\u7C7B\u578B\u540D\u79F0",
158
+ pleaseEnterTheDepartmentTypeName: "\u8BF7\u8F93\u5165\u90E8\u95E8\u7C7B\u578B\u540D\u79F0",
159
+ imageUploadFailedLogoSizeWithin2M: "\u56FE\u7247\u4E0A\u4F20\u5931\u8D25\uFF0Clogo\u5927\u5C0F2M\u4EE5\u5185\u3002",
160
+ editDeviceCover: "\u7F16\u8F91\u8BBE\u5907\u5C01\u9762",
161
+ close: "\u5173 \u95ED",
162
+ save: "\u4FDD \u5B58"
147
163
  }
148
164
  };
149
165
 
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-shouqi',
3
+ symbol: `<symbol id="hy-icon-ops-linear-shouqi" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-linear-shouqi-导航/shouqi" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M1,2 C1.55228475,2 2,2.44771525 2,3 L2,13 C2,13.5522847 1.55228475,14 1,14 C0.44771525,14 0,13.5522847 0,13 L0,3 C0,2.44771525 0.44771525,2 1,2 Z M14.9962476,6.99721351 L7.22134415,6.99721351 L7.22134415,6.99721351 L10.3410325,3.80591026 C10.6688751,3.47054177 10.6627742,2.93290294 10.3274057,2.60506033 C10.3232766,2.6010239 10.3191065,2.59702968 10.3148959,2.59307831 C9.96535062,2.26505074 9.41645109,2.28110608 9.08667668,2.62900381 L4.65060824,7.30886388 C4.28556459,7.69396911 4.2848692,8.29714332 4.64902391,8.68308924 L9.01892515,13.3144877 C9.35293318,13.668483 9.91067004,13.6846858 10.2646653,13.3506778 C10.2790116,13.3371414 10.2928995,13.3231273 10.3063053,13.308659 C10.6624129,12.9243285 10.6464065,12.3259543 10.2702613,11.9612115 L7.22134415,9.00471827 L7.22134415,9.00471827 L14.9962476,9.00471827 C15.5506048,9.00471827 16,8.55532302 16,8.00096589 C16,7.44660876 15.5506048,6.99721351 14.9962476,6.99721351 Z" id="hy-icon-ops-linear-shouqi-收起" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-zhankai',
3
+ symbol: `<symbol id="hy-icon-ops-linear-zhankai" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-linear-zhankai-导航/zhankai" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M15,2 C15.5522847,2 16,2.44771525 16,3 L16,13 C16,13.5522847 15.5522847,14 15,14 C14.4477153,14 14,13.5522847 14,13 L14,3 C14,2.44771525 14.4477153,2 15,2 Z M1.00375238,6.99721351 L8.77865585,6.99721351 L8.77865585,6.99721351 L5.65896747,3.80591026 C5.33112486,3.47054177 5.33722579,2.93290294 5.67259429,2.60506033 C5.67672338,2.6010239 5.68089354,2.59702968 5.68510411,2.59307831 C6.03464938,2.26505074 6.58354891,2.28110608 6.91332332,2.62900381 L11.3493918,7.30886388 C11.7144354,7.69396911 11.7151308,8.29714332 11.3509761,8.68308924 L6.98107485,13.3144877 C6.64706682,13.668483 6.08932996,13.6846858 5.73533471,13.3506778 C5.72098837,13.3371414 5.70710053,13.3231273 5.69369467,13.308659 C5.33758707,12.9243285 5.35359349,12.3259543 5.72973868,11.9612115 L8.77865585,9.00471827 L8.77865585,9.00471827 L1.00375238,9.00471827 C0.449395248,9.00471827 0,8.55532302 0,8.00096589 C0,7.44660876 0.449395248,6.99721351 1.00375238,6.99721351 Z" id="hy-icon-ops-linear-zhankai-形状结合" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -90,3 +90,56 @@ video {
90
90
  -ms-user-select: none; /*IE10*/
91
91
  user-select: none;
92
92
  }
93
+
94
+ .search_lightColor {
95
+ min-width: 254px;
96
+ line-height: 32px;
97
+ background: rgba(var(--hy-background), 1);
98
+ border-radius: 8px;
99
+ padding: 4px;
100
+ display: flex;
101
+ border: 1px solid rgba(var(--hy-border), 1);
102
+ transition: 0.3s;
103
+ position: relative;
104
+ z-index: 1;
105
+ }
106
+
107
+ .search_lightColor:focus,
108
+ .search_lightColor:hover {
109
+ border-color: rgba(var(--hy-theme), 1);
110
+ }
111
+ .search_lightColor .hy-el-input .hy-el-input__wrapper {
112
+ background: rgba(var(--hy-background), 1);
113
+ border-color: rgba(var(--hy-background), 1);
114
+ box-shadow: none;
115
+ padding: 0 26px 0 10px;
116
+ font-size: 12px;
117
+ color: rgba(var(--hy-main), 1);
118
+ }
119
+
120
+ .search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
121
+ .search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
122
+ border-color: rgba(var(--hy-background), 1);
123
+ box-shadow: none;
124
+ }
125
+
126
+ .search_lightColor .searchBox:active {
127
+ opacity: 0.6;
128
+ }
129
+ .search_lightColor .searchBox {
130
+ width: 42px;
131
+ height: 32px;
132
+ background: rgba(var(--hy-background-3), 1);
133
+ border-radius: 8px;
134
+ line-height: 30px;
135
+ text-align: center;
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ cursor: pointer;
140
+ }
141
+ .search_lightColor .searchBox .svgBox {
142
+ width: 18px;
143
+ height: 18px;
144
+ vertical-align: middle;
145
+ }
@@ -20,59 +20,6 @@
20
20
  --hy-border: 54, 93, 132;
21
21
  }
22
22
 
23
- .search_lightColor {
24
- min-width: 254px;
25
- line-height: 32px;
26
- background: rgba(var(--hy-background), 1);
27
- border-radius: 8px;
28
- padding: 4px;
29
- display: flex;
30
- border: 1px solid rgba(var(--hy-border), 1);
31
- transition: 0.3s;
32
- position: relative;
33
- z-index: 1;
34
- }
35
-
36
- .search_lightColor:focus,
37
- .search_lightColor:hover {
38
- border-color: rgba(var(--hy-theme), 1);
39
- }
40
- .search_lightColor .hy-el-input .hy-el-input__wrapper {
41
- background: rgba(var(--hy-background), 1);
42
- border-color: rgba(var(--hy-background), 1);
43
- box-shadow: none;
44
- padding: 0 26px 0 10px;
45
- font-size: 12px;
46
- color: rgba(var(--hy-main), 1);
47
- }
48
-
49
- .search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
50
- .search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
51
- border-color: rgba(var(--hy-background), 1);
52
- box-shadow: none;
53
- }
54
-
55
- .search_lightColor .searchBox:active {
56
- opacity: 0.6;
57
- }
58
- .search_lightColor .searchBox {
59
- width: 42px;
60
- height: 32px;
61
- background: rgba(var(--hy-background-3), 1);
62
- border-radius: 8px;
63
- line-height: 30px;
64
- text-align: center;
65
- display: flex;
66
- align-items: center;
67
- justify-content: center;
68
- cursor: pointer;
69
- }
70
- .search_lightColor .searchBox .svgBox {
71
- width: 18px;
72
- height: 18px;
73
- vertical-align: middle;
74
- }
75
-
76
23
  .deviceType-sos {
77
24
  font-size: 14px;
78
25
  font-weight: bold;
package/lib/utils/form.js CHANGED
@@ -52,9 +52,10 @@ function clearSpace(value, type = "between") {
52
52
  }
53
53
  return value;
54
54
  }
55
- const genRuleRequiredMsgHandler = (config) => {
55
+ const genRuleRequiredMsgHandler = (column, model) => {
56
56
  const { t } = useLocale.useLocale();
57
- const { type, prop, label } = config || {};
57
+ const { type, prop } = column || {};
58
+ const label = columnLabelHandler(column, model);
58
59
  if (!prop || !prop?.length) return "";
59
60
  switch (type) {
60
61
  case "input":
@@ -75,20 +76,71 @@ const requiredHandler = (column, model) => {
75
76
  if (is.isFunction(required)) return required(column, model);
76
77
  return false;
77
78
  };
79
+ const ruleHandler = (column, model) => {
80
+ const rules = vue.unref(column.rules);
81
+ if (is.isArray(rules)) return [...rules];
82
+ if (is.isObject(rules)) return [rules];
83
+ if (is.isFunction(rules)) {
84
+ return ruleHandler({ rules: rules(column, model) }, model);
85
+ }
86
+ return [];
87
+ };
78
88
  const columnRuleHandler = (column, model) => {
79
- let { rules } = column;
80
- rules = is.isArray(rules) ? [...rules] : is.isObject(rules) ? [rules] : [];
89
+ const rules = ruleHandler(column, model);
81
90
  if (column.required) {
82
91
  rules.unshift({
83
92
  required: requiredHandler(column, model),
84
- message: genRuleRequiredMsgHandler(column)
93
+ message: genRuleRequiredMsgHandler(column, model)
85
94
  });
86
95
  }
87
96
  return rules;
88
97
  };
98
+ const genColumnDefaultLabel = (column) => {
99
+ if (column.label) return vue.unref(column.label);
100
+ const { t } = useLocale.useLocale();
101
+ switch (column.type) {
102
+ // 部门级联选择框
103
+ case "org-cascader":
104
+ return t("form.department");
105
+ }
106
+ };
107
+ const columnLabelHandler = (column, model) => {
108
+ const label = vue.unref(column.label);
109
+ if (is.isEmpty(label)) return "";
110
+ if (is.isFunction(label)) {
111
+ return label(column, model);
112
+ }
113
+ return label;
114
+ };
115
+ function columnPlaceholderHandler(column, model) {
116
+ const { t } = useLocale.useLocale();
117
+ const { type, attrs = {} } = column || {};
118
+ const label = columnLabelHandler(column, model);
119
+ let placeholder = attrs.placeholder;
120
+ switch (type) {
121
+ case "input":
122
+ case "input-number":
123
+ case "lat":
124
+ case "lon":
125
+ placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
126
+ break;
127
+ case "select":
128
+ case "date-picker":
129
+ case "time-picker":
130
+ case "org-cascader":
131
+ placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
132
+ break;
133
+ default:
134
+ placeholder = placeholder || label;
135
+ }
136
+ return placeholder;
137
+ }
89
138
 
90
139
  exports.clearSpace = clearSpace;
140
+ exports.columnLabelHandler = columnLabelHandler;
141
+ exports.columnPlaceholderHandler = columnPlaceholderHandler;
91
142
  exports.columnRuleHandler = columnRuleHandler;
143
+ exports.genColumnDefaultLabel = genColumnDefaultLabel;
92
144
  exports.genRuleRequiredMsgHandler = genRuleRequiredMsgHandler;
93
145
  exports.genValueByProp = genValueByProp;
94
146
  exports.getValueByProp = getValueByProp;
@@ -50,7 +50,10 @@ exports.fileUpload = file.fileUpload;
50
50
  exports.presignedUrl = file.presignedUrl;
51
51
  exports.sizeToTextHandler = file.sizeToTextHandler;
52
52
  exports.clearSpace = form.clearSpace;
53
+ exports.columnLabelHandler = form.columnLabelHandler;
54
+ exports.columnPlaceholderHandler = form.columnPlaceholderHandler;
53
55
  exports.columnRuleHandler = form.columnRuleHandler;
56
+ exports.genColumnDefaultLabel = form.genColumnDefaultLabel;
54
57
  exports.genRuleRequiredMsgHandler = form.genRuleRequiredMsgHandler;
55
58
  exports.genValueByProp = form.genValueByProp;
56
59
  exports.getValueByProp = form.getValueByProp;
@@ -268,6 +268,10 @@ class bigMap extends events.EventEmitter {
268
268
  const center2 = target.getCenter();
269
269
  return latAndLngCheckExport(center2);
270
270
  },
271
+ // 自适应地图容器大小
272
+ invalidateSize: function(target) {
273
+ return target.invalidateSize();
274
+ },
271
275
  // 四个角
272
276
  getBounds: function(target) {
273
277
  const bounds = target.getBounds();
@@ -170,6 +170,9 @@ class Google extends events.EventEmitter {
170
170
  getCenter: function(target) {
171
171
  return target.getCenter();
172
172
  },
173
+ invalidateSize: function(target) {
174
+ return null;
175
+ },
173
176
  fitBounds: function(target, params) {
174
177
  if (!Array.isArray(params)) {
175
178
  params = [params];
@@ -369,6 +369,10 @@ class Leafletjs extends events.EventEmitter {
369
369
  const { lng: lng2, lat: lat2 } = latAndLngCheckExport(center2);
370
370
  return L.latLng(lat2, lng2);
371
371
  },
372
+ // 自适应地图容器大小
373
+ invalidateSize: function(target) {
374
+ return target.invalidateSize();
375
+ },
372
376
  // 四个角
373
377
  getBounds: function(target) {
374
378
  const bounds = target.getBounds();
@@ -427,24 +431,20 @@ class Leafletjs extends events.EventEmitter {
427
431
  return map;
428
432
  }
429
433
  // 设置地图瓦片地址
430
- setLayersUrl(map) {
434
+ setLayersUrl(map, changeColorType = true) {
431
435
  const layersUrlList = this.initParams.layersUrlList || [];
432
436
  const layersIndex = this.initParams.layersIndex || 0;
433
- const layersOption = layersUrlList[layersIndex];
434
- if (!layersOption) {
437
+ const layersUrls = layersUrlList[layersIndex];
438
+ if (!layersUrls) {
435
439
  return;
436
440
  }
437
441
  const { mapServerType } = this.initParams;
438
442
  if (mapServerType === "WMTS" || mapServerType === "Dynamic") {
439
- return this.createLayers(map, layersOption);
443
+ return this.createLayers(map, layersUrls);
440
444
  }
441
- const { layersUrls = "", filter, key } = layersOption;
442
445
  layersUrls.split(",").forEach((layersUrl) => {
443
- if (layersUrl.indexOf("{mapKey}") !== -1) {
444
- layersUrl = layersUrl.replace("{mapKey}", key);
445
- }
446
- if (filter) {
447
- this.createCustomLayers(map, layersUrl, { filter });
446
+ if (changeColorType) {
447
+ this.createCustomLayers(map, layersUrl);
448
448
  } else {
449
449
  this.createLayers(map, layersUrl);
450
450
  }
@@ -5,6 +5,7 @@ var leafletjs = require('./hook/leafletjs.js');
5
5
  var bigMap = require('./hook/bigMap.js');
6
6
  var events = require('events');
7
7
  var hyCommon = require('hy-common');
8
+ var useApi = require('../../hooks/useApi.js');
8
9
 
9
10
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
10
11
  const scriptPromises = new globalThis.Map();
@@ -54,17 +55,17 @@ function setMapServer(mapType, mapConfig = {}) {
54
55
  if (mapType === "gaode" && window.AMap?.Map) {
55
56
  return Promise.resolve();
56
57
  }
57
- if (mapType === "bigMap" && window.BM) {
58
+ if (mapType === "bigmap" && window.BM) {
58
59
  return Promise.resolve();
59
60
  }
60
- if (mapType !== "gaode" && mapType !== "bigMap") {
61
+ if (mapType !== "gaode" && mapType !== "bigmap") {
61
62
  return Promise.resolve();
62
63
  }
63
64
  if (mapServerPromises.has(mapType)) {
64
65
  return mapServerPromises.get(mapType);
65
66
  }
66
67
  const promise = (async () => {
67
- if (mapType === "bigMap") {
68
+ if (mapType === "bigmap") {
68
69
  const staticBaseUrl = mapConfig.staticBaseUrl;
69
70
  await loadScript(staticUrl("bigemap.js", staticBaseUrl));
70
71
  await Promise.all([
@@ -109,6 +110,8 @@ function setPoiServer(mapConfig) {
109
110
  projectCoordinate: data.projectPoiCoordinate,
110
111
  mapSk: data.mapSk
111
112
  };
113
+ const { api } = useApi.useApi();
114
+ hyCommon.Common.setAxios(api.value);
112
115
  return new hyCommon.Map({
113
116
  poiServer
114
117
  });
@@ -166,6 +169,22 @@ class InitMap extends events.EventEmitter {
166
169
  }
167
170
  // 初始化地图
168
171
  NewMap(params = {}) {
172
+ const leftletjsObj = {};
173
+ if (params.mapType === "leafletjs") {
174
+ const { layersServer, layersUrl, mapKey, mapServerType } = params;
175
+ if (layersUrl && mapServerType !== "WMTS") {
176
+ const layersUrlList = (layersUrl || "").split(",").filter(Boolean);
177
+ leftletjsObj.layersUrlList = layersUrlList.map((url) => {
178
+ const index = url.indexOf("{mapKey}");
179
+ if (index !== -1) {
180
+ return url.replace("{mapKey}", mapKey);
181
+ }
182
+ return url;
183
+ });
184
+ } else {
185
+ leftletjsObj.layersUrlList = params.mapServerList;
186
+ }
187
+ }
169
188
  params = {
170
189
  mapType: "gaode",
171
190
  // 地图类型
@@ -184,13 +203,14 @@ class InitMap extends events.EventEmitter {
184
203
  // 地图瓦片地址
185
204
  zoomOffset: params.zoomOffset || 0,
186
205
  // 缩放偏移量
187
- ...params
206
+ ...params,
207
+ ...leftletjsObj
188
208
  };
189
209
  if (params.mapType === "gaode") {
190
210
  this.map = new gaode.default(params);
191
- } else if (params.mapType === "leaflet") {
211
+ } else if (params.mapType === "leafletjs") {
192
212
  this.map = new leafletjs.default(params);
193
- } else if (params.mapType === "bigMap") {
213
+ } else if (params.mapType === "bigmap") {
194
214
  this.map = new bigMap.default(params);
195
215
  }
196
216
  }
package/lib/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "0.2.58";
3
+ const version = "0.2.59";
4
4
 
5
5
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-dispatch-ui-v3",
3
- "version": "0.2.59",
3
+ "version": "0.2.60",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  "events": "^3.3.0",
31
31
  "express": "^5.2.1",
32
32
  "hy-common": "^0.0.39",
33
- "hy-virtual-tree": "^2.4.4",
33
+ "hy-virtual-tree": "^2.4.5",
34
34
  "leaflet": "^1.5.1",
35
35
  "leaflet-pip": "^1.1.0",
36
36
  "leaflet-polylinedecorator": "^1.6.0",