hy-dispatch-ui-v3 0.2.59 → 0.2.61

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 (102) hide show
  1. package/dist/tailwind.css +131 -6
  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/hyMenu/menu.vue.mjs +38 -23
  18. package/es/components/hyMenu/style/menu.scss +3 -1
  19. package/es/components/hyOrgCascader/js/index.mjs +2 -2
  20. package/es/components/hyRadioGroup/index.mjs +6 -0
  21. package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
  22. package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
  23. package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
  24. package/es/components/hySearch/js/useAppSearch.mjs +3 -33
  25. package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
  26. package/es/components/hyTable/js/index.mjs +6 -3
  27. package/es/components/hyTable/js/search.mjs +1 -0
  28. package/es/components/hyTable/table.vue.mjs +11 -4
  29. package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
  30. package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
  31. package/es/components/hyTree/js/index.mjs +69 -53
  32. package/es/components/hyTree/tree.vue.mjs +36 -1
  33. package/es/components/hyVideoPlayer/js/index.mjs +0 -1
  34. package/es/components/index.mjs +1 -0
  35. package/es/hooks/useApi.mjs +2 -2
  36. package/es/hooks/useGlobalConfig.mjs +1 -1
  37. package/es/index.mjs +4 -1
  38. package/es/locale/en.mjs +17 -1
  39. package/es/locale/zh_CN.mjs +17 -1
  40. package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  41. package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  42. package/es/style/index.scss +53 -0
  43. package/es/style/theme.scss +0 -53
  44. package/es/utils/form.mjs +56 -7
  45. package/es/utils/handler.mjs +5 -0
  46. package/es/utils/index.mjs +2 -1
  47. package/es/utils/map/hook/bigMap.mjs +4 -0
  48. package/es/utils/map/hook/gaode.mjs +3 -0
  49. package/es/utils/map/hook/leafletjs.mjs +10 -10
  50. package/es/utils/map/index.mjs +27 -7
  51. package/es/utils/tree.mjs +1 -0
  52. package/es/version.mjs +1 -1
  53. package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
  54. package/lib/api/index.js +147 -0
  55. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
  56. package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
  57. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  58. package/lib/bussiness/index.js +5 -0
  59. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
  60. package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
  61. package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
  62. package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
  63. package/lib/components/hyForm/form.vue.js +79 -27
  64. package/lib/components/hyForm/js/index.js +9 -1
  65. package/lib/components/hyForm/js/useAppForm.js +5 -35
  66. package/lib/components/hyMap/map.vue.js +3 -3
  67. package/lib/components/hyMenu/menu.vue.js +37 -22
  68. package/lib/components/hyMenu/style/menu.scss +3 -1
  69. package/lib/components/hyOrgCascader/js/index.js +2 -2
  70. package/lib/components/hyRadioGroup/index.js +11 -0
  71. package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
  72. package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
  73. package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
  74. package/lib/components/hySearch/js/useAppSearch.js +2 -32
  75. package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
  76. package/lib/components/hyTable/js/index.js +6 -3
  77. package/lib/components/hyTable/js/search.js +1 -0
  78. package/lib/components/hyTable/table.vue.js +43 -36
  79. package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
  80. package/lib/components/hyTableForm/tableForm.vue.js +6 -0
  81. package/lib/components/hyTree/js/index.js +69 -53
  82. package/lib/components/hyTree/tree.vue.js +36 -1
  83. package/lib/components/hyVideoPlayer/js/index.js +0 -1
  84. package/lib/components/index.js +14 -12
  85. package/lib/hooks/useApi.js +2 -2
  86. package/lib/index.js +61 -49
  87. package/lib/locale/en.js +17 -1
  88. package/lib/locale/zh_CN.js +17 -1
  89. package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  90. package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  91. package/lib/style/index.scss +53 -0
  92. package/lib/style/theme.scss +0 -53
  93. package/lib/utils/form.js +57 -5
  94. package/lib/utils/handler.js +5 -0
  95. package/lib/utils/index.js +8 -0
  96. package/lib/utils/map/hook/bigMap.js +4 -0
  97. package/lib/utils/map/hook/gaode.js +3 -0
  98. package/lib/utils/map/hook/leafletjs.js +10 -10
  99. package/lib/utils/map/index.js +26 -6
  100. package/lib/utils/tree.js +10 -0
  101. package/lib/version.js +1 -1
  102. package/package.json +2 -2
@@ -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
  }
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var hyVirtualTree = require('hy-virtual-tree');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "setGlobalTreeConfig", {
8
+ enumerable: true,
9
+ get: function () { return hyVirtualTree.setGlobalTreeConfig; }
10
+ });
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.60";
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.61",
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",