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.
- package/dist/tailwind.css +131 -6
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/api/index.mjs +137 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
- package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/es/bussiness/index.mjs +1 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
- package/es/components/hyForm/form.vue.mjs +83 -31
- package/es/components/hyForm/js/index.mjs +9 -2
- package/es/components/hyForm/js/useAppForm.mjs +6 -36
- package/es/components/hyMap/map.vue.mjs +3 -3
- package/es/components/hyMenu/menu.vue.mjs +38 -23
- package/es/components/hyMenu/style/menu.scss +3 -1
- package/es/components/hyOrgCascader/js/index.mjs +2 -2
- package/es/components/hyRadioGroup/index.mjs +6 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
- package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
- package/es/components/hySearch/js/useAppSearch.mjs +3 -33
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
- package/es/components/hyTable/js/index.mjs +6 -3
- package/es/components/hyTable/js/search.mjs +1 -0
- package/es/components/hyTable/table.vue.mjs +11 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
- package/es/components/hyTree/js/index.mjs +69 -53
- package/es/components/hyTree/tree.vue.mjs +36 -1
- package/es/components/hyVideoPlayer/js/index.mjs +0 -1
- package/es/components/index.mjs +1 -0
- package/es/hooks/useApi.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +1 -1
- package/es/index.mjs +4 -1
- package/es/locale/en.mjs +17 -1
- package/es/locale/zh_CN.mjs +17 -1
- package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/es/style/index.scss +53 -0
- package/es/style/theme.scss +0 -53
- package/es/utils/form.mjs +56 -7
- package/es/utils/handler.mjs +5 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/map/hook/bigMap.mjs +4 -0
- package/es/utils/map/hook/gaode.mjs +3 -0
- package/es/utils/map/hook/leafletjs.mjs +10 -10
- package/es/utils/map/index.mjs +27 -7
- package/es/utils/tree.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/api/index.js +147 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
- package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/lib/bussiness/index.js +5 -0
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
- package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
- package/lib/components/hyForm/form.vue.js +79 -27
- package/lib/components/hyForm/js/index.js +9 -1
- package/lib/components/hyForm/js/useAppForm.js +5 -35
- package/lib/components/hyMap/map.vue.js +3 -3
- package/lib/components/hyMenu/menu.vue.js +37 -22
- package/lib/components/hyMenu/style/menu.scss +3 -1
- package/lib/components/hyOrgCascader/js/index.js +2 -2
- package/lib/components/hyRadioGroup/index.js +11 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
- package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
- package/lib/components/hySearch/js/useAppSearch.js +2 -32
- package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
- package/lib/components/hyTable/js/index.js +6 -3
- package/lib/components/hyTable/js/search.js +1 -0
- package/lib/components/hyTable/table.vue.js +43 -36
- package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
- package/lib/components/hyTableForm/tableForm.vue.js +6 -0
- package/lib/components/hyTree/js/index.js +69 -53
- package/lib/components/hyTree/tree.vue.js +36 -1
- package/lib/components/hyVideoPlayer/js/index.js +0 -1
- package/lib/components/index.js +14 -12
- package/lib/hooks/useApi.js +2 -2
- package/lib/index.js +61 -49
- package/lib/locale/en.js +17 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/lib/style/index.scss +53 -0
- package/lib/style/theme.scss +0 -53
- package/lib/utils/form.js +57 -5
- package/lib/utils/handler.js +5 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/map/hook/bigMap.js +4 -0
- package/lib/utils/map/hook/gaode.js +3 -0
- package/lib/utils/map/hook/leafletjs.js +10 -10
- package/lib/utils/map/index.js +26 -6
- package/lib/utils/tree.js +10 -0
- package/lib/version.js +1 -1
- 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
|
|
434
|
-
if (!
|
|
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,
|
|
443
|
+
return this.createLayers(map, layersUrls);
|
|
440
444
|
}
|
|
441
|
-
const { layersUrls = "", filter, key } = layersOption;
|
|
442
445
|
layersUrls.split(",").forEach((layersUrl) => {
|
|
443
|
-
if (
|
|
444
|
-
|
|
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
|
}
|
package/lib/utils/map/index.js
CHANGED
|
@@ -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 === "
|
|
58
|
+
if (mapType === "bigmap" && window.BM) {
|
|
58
59
|
return Promise.resolve();
|
|
59
60
|
}
|
|
60
|
-
if (mapType !== "gaode" && mapType !== "
|
|
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 === "
|
|
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 === "
|
|
211
|
+
} else if (params.mapType === "leafletjs") {
|
|
192
212
|
this.map = new leafletjs.default(params);
|
|
193
|
-
} else if (params.mapType === "
|
|
213
|
+
} else if (params.mapType === "bigmap") {
|
|
194
214
|
this.map = new bigMap.default(params);
|
|
195
215
|
}
|
|
196
216
|
}
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-dispatch-ui-v3",
|
|
3
|
-
"version": "0.2.
|
|
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.
|
|
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",
|