qy-vue-plugins 0.0.3 → 0.1.0
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/README.md +37 -3
- package/dist/buildTime/index.d.ts +3 -0
- package/dist/checkBuildTime/index.d.ts +4 -0
- package/dist/index.d.ts +226 -0
- package/dist/mapbox/EventKeys.d.ts +47 -0
- package/dist/mapbox/MapView.vue.d.ts +85 -0
- package/dist/mapbox/ProvideKeys.d.ts +13 -0
- package/dist/mapbox/components/MapLegend.vue.d.ts +2 -0
- package/dist/mapbox/components/MapTools.vue.d.ts +3 -0
- package/dist/mapbox/components/mapCompass.vue.d.ts +2 -0
- package/dist/mapbox/components/mapLayer.vue.d.ts +2 -0
- package/dist/mapbox/components/mapLevel.vue.d.ts +22 -0
- package/dist/mapbox/components/mapPitch.vue.d.ts +2 -0
- package/dist/mapbox/components/mapPos.vue.d.ts +11 -0
- package/dist/mapbox/components/mapTopic.vue.d.ts +32 -0
- package/dist/mapbox/constant.d.ts +17 -0
- package/dist/mapbox/utils.d.ts +112 -0
- package/dist/mapbox/widgets/CustomShapeDialog.vue.d.ts +12 -0
- package/dist/mapbox/widgets/IconPicker.vue.d.ts +95 -0
- package/dist/mapbox/widgets/LayerAttributeDialog.vue.d.ts +6 -0
- package/dist/mapbox/widgets/LayerDialog.vue.d.ts +6 -0
- package/dist/mapbox/widgets/LegendDialogLine.vue.d.ts +6 -0
- package/dist/mapbox/widgets/LegendDialogPoint.vue.d.ts +6 -0
- package/dist/mapbox/widgets/LegendLine.vue.d.ts +17 -0
- package/dist/mapbox/widgets/LegendPoint.vue.d.ts +19 -0
- package/dist/mapbox/widgets/LegendPopLine.vue.d.ts +6 -0
- package/dist/mapbox/widgets/LegendPopPoint.vue.d.ts +6 -0
- package/dist/mapbox/widgets/LegendShape.vue.d.ts +19 -0
- package/dist/mapbox/widgets/LegendSymbol.vue.d.ts +17 -0
- package/dist/mapbox/widgets/Point.vue.d.ts +15 -0
- package/dist/mapbox/widgets/ShapeDialog.vue.d.ts +6 -0
- package/dist/mapbox/widgets/TopicItemPop.vue.d.ts +6 -0
- package/dist/mapbox/widgets/TopicPop.vue.d.ts +7 -0
- package/dist/qy-vue-plugins.css +1 -0
- package/dist/store/mapStore.d.ts +58 -0
- package/dist/types/map.d.ts +231 -0
- package/dist/vue-plugins.es.js +28755 -39
- package/dist/vue-plugins.umd.js +41 -1
- package/package/assets/campass-outline.png +0 -0
- package/package/assets/campass-pointer.png +0 -0
- package/package/assets/color-block.png +0 -0
- package/package/assets/img_c.png +0 -0
- package/package/assets/ter_c.png +0 -0
- package/package/assets/vec_c.png +0 -0
- package/package/checkBuildTime/index.ts +13 -1
- package/package/css/common.scss +33 -0
- package/package/css/map.scss +42 -0
- package/package/index.ts +23 -2
- package/package/mapbox/EventKeys.ts +55 -0
- package/package/mapbox/MapView.vue +1497 -0
- package/package/mapbox/ProvideKeys.ts +23 -0
- package/package/mapbox/components/MapLegend.vue +185 -0
- package/package/mapbox/components/MapTools.vue +651 -0
- package/package/mapbox/components/mapCompass.vue +238 -0
- package/package/mapbox/components/mapLayer.vue +135 -0
- package/package/mapbox/components/mapLevel.vue +139 -0
- package/package/mapbox/components/mapPitch.vue +48 -0
- package/package/mapbox/components/mapPos.vue +36 -0
- package/package/mapbox/components/mapTopic.vue +520 -0
- package/package/mapbox/constant.ts +417 -0
- package/package/mapbox/utils.ts +591 -0
- package/package/mapbox/widgets/CustomShapeDialog.vue +143 -0
- package/package/mapbox/widgets/IconPicker.vue +274 -0
- package/package/mapbox/widgets/LayerAttributeDialog.vue +319 -0
- package/package/mapbox/widgets/LayerDialog.vue +228 -0
- package/package/mapbox/widgets/LegendDialogLine.vue +193 -0
- package/package/mapbox/widgets/LegendDialogPoint.vue +207 -0
- package/package/mapbox/widgets/LegendLine.vue +54 -0
- package/package/mapbox/widgets/LegendPoint.vue +63 -0
- package/package/mapbox/widgets/LegendPopLine.vue +414 -0
- package/package/mapbox/widgets/LegendPopPoint.vue +346 -0
- package/package/mapbox/widgets/LegendShape.vue +46 -0
- package/package/mapbox/widgets/LegendSymbol.vue +63 -0
- package/package/mapbox/widgets/Point.vue +39 -0
- package/package/mapbox/widgets/ShapeDialog.vue +626 -0
- package/package/mapbox/widgets/TopicItemPop.vue +162 -0
- package/package/mapbox/widgets/TopicPop.vue +184 -0
- package/package/store/mapStore.ts +304 -0
- package/package/types/map.ts +271 -0
- package/package.json +30 -5
package/README.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 青远生态内部项目
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 项目概述
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
这是青远生态的内部项目,基于 Vue 3 + TypeScript + Vite 构建。主要提供以下功能:
|
|
6
|
+
|
|
7
|
+
1. **页面更新提示** - 当应用页面有新版本更新时,提供用户通知和更新引导
|
|
8
|
+
2. **Mapbox 地图渲染功能** - 集成 Mapbox 地图渲染组件,提供地理数据可视化服务
|
|
9
|
+
|
|
10
|
+
## 技术栈
|
|
11
|
+
|
|
12
|
+
- Vue 3
|
|
13
|
+
- TypeScript
|
|
14
|
+
- Vite
|
|
15
|
+
|
|
16
|
+
该项目使用 Vue 3 的`<script setup>`语法,更多信息请参考[script setup 文档](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup)。
|
|
17
|
+
|
|
18
|
+
## 安装与使用
|
|
19
|
+
|
|
20
|
+
(此处添加项目安装和使用说明)
|
|
21
|
+
|
|
22
|
+
## 功能详情
|
|
23
|
+
|
|
24
|
+
### 页面更新提示
|
|
25
|
+
|
|
26
|
+
当应用有新版本发布时,该功能会提示用户刷新页面以获取最新内容,避免用户使用过时的页面版本。
|
|
27
|
+
|
|
28
|
+
### Mapbox 地图渲染
|
|
29
|
+
|
|
30
|
+
提供基于 Mapbox GL JS 的地图渲染组件,支持:
|
|
31
|
+
|
|
32
|
+
- 地理数据展示
|
|
33
|
+
- 自定义图层
|
|
34
|
+
- 交互式地图控件
|
|
35
|
+
- 地理数据分析功能
|
|
36
|
+
|
|
37
|
+
## 开发指南
|
|
38
|
+
|
|
39
|
+
更多关于项目设置和 IDE 支持的信息,请参考[Vue TypeScript 指南](https://vuejs.org/guide/typescript/overview.html#project-setup)。
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { default as compileTimePlugin } from './buildTime';
|
|
2
|
+
import { isNewVersion, setBaseUrl } from './checkBuildTime';
|
|
3
|
+
import { default as MapView } from './mapbox/MapView.vue';
|
|
4
|
+
import { default as MapLayer } from './mapbox/components/mapLayer.vue';
|
|
5
|
+
import { default as MapLevel } from './mapbox/components/mapLevel.vue';
|
|
6
|
+
import { default as MapPos } from './mapbox/components/mapPos.vue';
|
|
7
|
+
import { default as MapPitch } from './mapbox/components/mapPitch.vue';
|
|
8
|
+
import { default as MapCompass } from './mapbox/components/mapCompass.vue';
|
|
9
|
+
import { default as MapTopic } from './mapbox/components/mapTopic.vue';
|
|
10
|
+
import { default as MapTools } from './mapbox/components/MapTools.vue';
|
|
11
|
+
import { default as MapLegend } from './mapbox/components/MapLegend.vue';
|
|
12
|
+
import { mapStyleChangedBus } from './mapbox/EventKeys';
|
|
13
|
+
|
|
14
|
+
export { compileTimePlugin, isNewVersion, setBaseUrl, MapView, MapLayer, MapLevel, MapPos, MapPitch, MapCompass, MapTopic, MapTools, MapLegend, mapStyleChangedBus };
|
|
15
|
+
declare const _default: {
|
|
16
|
+
compileTimePlugin: typeof compileTimePlugin;
|
|
17
|
+
isNewVersion: (localVueVersion: number, interval: number | undefined, cb: (newVersion: number) => void) => Promise<{
|
|
18
|
+
stop: () => void;
|
|
19
|
+
}>;
|
|
20
|
+
MapView: {
|
|
21
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
22
|
+
mapRootId: {
|
|
23
|
+
type: import('vue').PropType<string>;
|
|
24
|
+
};
|
|
25
|
+
tdtToken: {
|
|
26
|
+
type: import('vue').PropType<string>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
mapBoxToken: {
|
|
30
|
+
type: import('vue').PropType<string>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
maxZoom: {
|
|
34
|
+
type: import('vue').PropType<number>;
|
|
35
|
+
};
|
|
36
|
+
minZoom: {
|
|
37
|
+
type: import('vue').PropType<number>;
|
|
38
|
+
};
|
|
39
|
+
zoom: {
|
|
40
|
+
type: import('vue').PropType<number>;
|
|
41
|
+
};
|
|
42
|
+
pitch: {
|
|
43
|
+
type: import('vue').PropType<number>;
|
|
44
|
+
};
|
|
45
|
+
hasScale: {
|
|
46
|
+
type: import('vue').PropType<boolean>;
|
|
47
|
+
};
|
|
48
|
+
scalePosition: {
|
|
49
|
+
type: import('vue').PropType<import('mapbox-gl').ControlPosition>;
|
|
50
|
+
};
|
|
51
|
+
center: {
|
|
52
|
+
type: import('vue').PropType<import('mapbox-gl').LngLatLike>;
|
|
53
|
+
};
|
|
54
|
+
dbfDataRequest: {
|
|
55
|
+
type: import('vue').PropType<(topicId: number | string, page: number, pageSize: number) => Promise<any>>;
|
|
56
|
+
};
|
|
57
|
+
researchDataRequest: {
|
|
58
|
+
type: import('vue').PropType<(topic: import('./types/map').GeographicLayerEntity) => Promise<{
|
|
59
|
+
lineInfo: any[];
|
|
60
|
+
pointInfo: any;
|
|
61
|
+
}>>;
|
|
62
|
+
};
|
|
63
|
+
dialogConfig: {
|
|
64
|
+
type: import('vue').PropType<{
|
|
65
|
+
center: Boolean;
|
|
66
|
+
top: string;
|
|
67
|
+
customClass: string;
|
|
68
|
+
}>;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{
|
|
71
|
+
onMapReady?: ((mapInstance: import('mapbox-gl').Map) => any) | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
mapInstance: import('vue').Ref<import('mapbox-gl').Map | undefined, import('mapbox-gl').Map | undefined>;
|
|
74
|
+
initMap: () => void;
|
|
75
|
+
handleSetMapStyle: () => void;
|
|
76
|
+
resetMapView: () => void;
|
|
77
|
+
addThirdPartyLayer: (layer: import('./types/map').GeographicLayerEntity) => void;
|
|
78
|
+
addResearchMapLayer: (mapLayer: import('./types/map').GeographicLayerEntity) => void;
|
|
79
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
80
|
+
mapReady: (mapInstance: import('mapbox-gl').Map) => void;
|
|
81
|
+
}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
82
|
+
P: {};
|
|
83
|
+
B: {};
|
|
84
|
+
D: {};
|
|
85
|
+
C: {};
|
|
86
|
+
M: {};
|
|
87
|
+
Defaults: {};
|
|
88
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
89
|
+
mapRootId: {
|
|
90
|
+
type: import('vue').PropType<string>;
|
|
91
|
+
};
|
|
92
|
+
tdtToken: {
|
|
93
|
+
type: import('vue').PropType<string>;
|
|
94
|
+
required: true;
|
|
95
|
+
};
|
|
96
|
+
mapBoxToken: {
|
|
97
|
+
type: import('vue').PropType<string>;
|
|
98
|
+
required: true;
|
|
99
|
+
};
|
|
100
|
+
maxZoom: {
|
|
101
|
+
type: import('vue').PropType<number>;
|
|
102
|
+
};
|
|
103
|
+
minZoom: {
|
|
104
|
+
type: import('vue').PropType<number>;
|
|
105
|
+
};
|
|
106
|
+
zoom: {
|
|
107
|
+
type: import('vue').PropType<number>;
|
|
108
|
+
};
|
|
109
|
+
pitch: {
|
|
110
|
+
type: import('vue').PropType<number>;
|
|
111
|
+
};
|
|
112
|
+
hasScale: {
|
|
113
|
+
type: import('vue').PropType<boolean>;
|
|
114
|
+
};
|
|
115
|
+
scalePosition: {
|
|
116
|
+
type: import('vue').PropType<import('mapbox-gl').ControlPosition>;
|
|
117
|
+
};
|
|
118
|
+
center: {
|
|
119
|
+
type: import('vue').PropType<import('mapbox-gl').LngLatLike>;
|
|
120
|
+
};
|
|
121
|
+
dbfDataRequest: {
|
|
122
|
+
type: import('vue').PropType<(topicId: number | string, page: number, pageSize: number) => Promise<any>>;
|
|
123
|
+
};
|
|
124
|
+
researchDataRequest: {
|
|
125
|
+
type: import('vue').PropType<(topic: import('./types/map').GeographicLayerEntity) => Promise<{
|
|
126
|
+
lineInfo: any[];
|
|
127
|
+
pointInfo: any;
|
|
128
|
+
}>>;
|
|
129
|
+
};
|
|
130
|
+
dialogConfig: {
|
|
131
|
+
type: import('vue').PropType<{
|
|
132
|
+
center: Boolean;
|
|
133
|
+
top: string;
|
|
134
|
+
customClass: string;
|
|
135
|
+
}>;
|
|
136
|
+
};
|
|
137
|
+
}>> & Readonly<{
|
|
138
|
+
onMapReady?: ((mapInstance: import('mapbox-gl').Map) => any) | undefined;
|
|
139
|
+
}>, {
|
|
140
|
+
mapInstance: import('vue').Ref<import('mapbox-gl').Map | undefined, import('mapbox-gl').Map | undefined>;
|
|
141
|
+
initMap: () => void;
|
|
142
|
+
handleSetMapStyle: () => void;
|
|
143
|
+
resetMapView: () => void;
|
|
144
|
+
addThirdPartyLayer: (layer: import('./types/map').GeographicLayerEntity) => void;
|
|
145
|
+
addResearchMapLayer: (mapLayer: import('./types/map').GeographicLayerEntity) => void;
|
|
146
|
+
}, {}, {}, {}, {}>;
|
|
147
|
+
__isFragment?: never;
|
|
148
|
+
__isTeleport?: never;
|
|
149
|
+
__isSuspense?: never;
|
|
150
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
151
|
+
mapRootId: {
|
|
152
|
+
type: import('vue').PropType<string>;
|
|
153
|
+
};
|
|
154
|
+
tdtToken: {
|
|
155
|
+
type: import('vue').PropType<string>;
|
|
156
|
+
required: true;
|
|
157
|
+
};
|
|
158
|
+
mapBoxToken: {
|
|
159
|
+
type: import('vue').PropType<string>;
|
|
160
|
+
required: true;
|
|
161
|
+
};
|
|
162
|
+
maxZoom: {
|
|
163
|
+
type: import('vue').PropType<number>;
|
|
164
|
+
};
|
|
165
|
+
minZoom: {
|
|
166
|
+
type: import('vue').PropType<number>;
|
|
167
|
+
};
|
|
168
|
+
zoom: {
|
|
169
|
+
type: import('vue').PropType<number>;
|
|
170
|
+
};
|
|
171
|
+
pitch: {
|
|
172
|
+
type: import('vue').PropType<number>;
|
|
173
|
+
};
|
|
174
|
+
hasScale: {
|
|
175
|
+
type: import('vue').PropType<boolean>;
|
|
176
|
+
};
|
|
177
|
+
scalePosition: {
|
|
178
|
+
type: import('vue').PropType<import('mapbox-gl').ControlPosition>;
|
|
179
|
+
};
|
|
180
|
+
center: {
|
|
181
|
+
type: import('vue').PropType<import('mapbox-gl').LngLatLike>;
|
|
182
|
+
};
|
|
183
|
+
dbfDataRequest: {
|
|
184
|
+
type: import('vue').PropType<(topicId: number | string, page: number, pageSize: number) => Promise<any>>;
|
|
185
|
+
};
|
|
186
|
+
researchDataRequest: {
|
|
187
|
+
type: import('vue').PropType<(topic: import('./types/map').GeographicLayerEntity) => Promise<{
|
|
188
|
+
lineInfo: any[];
|
|
189
|
+
pointInfo: any;
|
|
190
|
+
}>>;
|
|
191
|
+
};
|
|
192
|
+
dialogConfig: {
|
|
193
|
+
type: import('vue').PropType<{
|
|
194
|
+
center: Boolean;
|
|
195
|
+
top: string;
|
|
196
|
+
customClass: string;
|
|
197
|
+
}>;
|
|
198
|
+
};
|
|
199
|
+
}>> & Readonly<{
|
|
200
|
+
onMapReady?: ((mapInstance: import('mapbox-gl').Map) => any) | undefined;
|
|
201
|
+
}>, {
|
|
202
|
+
mapInstance: import('vue').Ref<import('mapbox-gl').Map | undefined, import('mapbox-gl').Map | undefined>;
|
|
203
|
+
initMap: () => void;
|
|
204
|
+
handleSetMapStyle: () => void;
|
|
205
|
+
resetMapView: () => void;
|
|
206
|
+
addThirdPartyLayer: (layer: import('./types/map').GeographicLayerEntity) => void;
|
|
207
|
+
addResearchMapLayer: (mapLayer: import('./types/map').GeographicLayerEntity) => void;
|
|
208
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
209
|
+
mapReady: (mapInstance: import('mapbox-gl').Map) => void;
|
|
210
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
211
|
+
$slots: {
|
|
212
|
+
leftBar?(_: {}): any;
|
|
213
|
+
rightBar?(_: {}): any;
|
|
214
|
+
topBar?(_: {}): any;
|
|
215
|
+
bottomBar?(_: {}): any;
|
|
216
|
+
default?(_: {}): any;
|
|
217
|
+
};
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
export default _default;
|
|
221
|
+
export declare const VuePlugins: {
|
|
222
|
+
install(Vue: any, { pinia }: {
|
|
223
|
+
pinia: any;
|
|
224
|
+
}): void;
|
|
225
|
+
setBaseUrl: (url: string) => void;
|
|
226
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EventBusKey } from '@vueuse/core';
|
|
2
|
+
import { GeographicLayerEntity, GeographicLayerFormEntity } from '../types/map';
|
|
3
|
+
|
|
4
|
+
export declare const deleteTopicBus: import('@vueuse/core').UseEventBusReturn<GeographicLayerEntity, any>;
|
|
5
|
+
export declare const createTopicBus: import('@vueuse/core').UseEventBusReturn<GeographicLayerFormEntity, any>;
|
|
6
|
+
export declare const updateTopicBus: import('@vueuse/core').UseEventBusReturn<GeographicLayerFormEntity, any>;
|
|
7
|
+
export declare const topicPanelClickBus: import('@vueuse/core').UseEventBusReturn<unknown, any>;
|
|
8
|
+
export declare const renderGeographicDataKey: EventBusKey<{
|
|
9
|
+
mapRootId: string;
|
|
10
|
+
layer: GeographicLayerEntity;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const renderGeographicDataKeyBus: import('@vueuse/core').UseEventBusReturn<{
|
|
13
|
+
mapRootId: string;
|
|
14
|
+
layer: GeographicLayerEntity;
|
|
15
|
+
}, any>;
|
|
16
|
+
export declare const toggleGeographicLayerKey: EventBusKey<{
|
|
17
|
+
mapRootId: string;
|
|
18
|
+
topic: GeographicLayerEntity;
|
|
19
|
+
visible: boolean;
|
|
20
|
+
delLayer?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const toggleGeographicLayerKeyBus: import('@vueuse/core').UseEventBusReturn<{
|
|
23
|
+
mapRootId: string;
|
|
24
|
+
topic: GeographicLayerEntity;
|
|
25
|
+
visible: boolean;
|
|
26
|
+
delLayer?: boolean;
|
|
27
|
+
}, any>;
|
|
28
|
+
export declare const showLayerEditKeyBus: import('@vueuse/core').UseEventBusReturn<{
|
|
29
|
+
e: MouseEvent;
|
|
30
|
+
mapRootId: string;
|
|
31
|
+
layer: GeographicLayerEntity;
|
|
32
|
+
}, any>;
|
|
33
|
+
export declare const locateToLayerCenterKeyBus: import('@vueuse/core').UseEventBusReturn<{
|
|
34
|
+
mapRootId: string;
|
|
35
|
+
layer: GeographicLayerEntity;
|
|
36
|
+
}, any>;
|
|
37
|
+
export declare const showLayerDialogKeyBus: import('@vueuse/core').UseEventBusReturn<{
|
|
38
|
+
action: "add" | "edit";
|
|
39
|
+
pid: number | string;
|
|
40
|
+
layer?: GeographicLayerEntity;
|
|
41
|
+
}, any>;
|
|
42
|
+
export declare const mapLoadedBus: import('@vueuse/core').UseEventBusReturn<{
|
|
43
|
+
mapRootId: string;
|
|
44
|
+
}, any>;
|
|
45
|
+
export declare const mapStyleChangedBus: import('@vueuse/core').UseEventBusReturn<{
|
|
46
|
+
mapRootId: string;
|
|
47
|
+
}, any>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ControlPosition, LngLatLike } from 'mapbox-gl';
|
|
2
|
+
import { GeographicLayerEntity } from '../types/map';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 添加调查数据
|
|
6
|
+
* @param mapLayer
|
|
7
|
+
*/
|
|
8
|
+
declare function addResearchMapLayer(mapLayer: GeographicLayerEntity): void;
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
leftBar?(_: {}): any;
|
|
11
|
+
rightBar?(_: {}): any;
|
|
12
|
+
topBar?(_: {}): any;
|
|
13
|
+
bottomBar?(_: {}): any;
|
|
14
|
+
default?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
17
|
+
mapRootId?: string;
|
|
18
|
+
tdtToken: string;
|
|
19
|
+
mapBoxToken: string;
|
|
20
|
+
maxZoom?: number;
|
|
21
|
+
minZoom?: number;
|
|
22
|
+
zoom?: number;
|
|
23
|
+
pitch?: number;
|
|
24
|
+
hasScale?: boolean;
|
|
25
|
+
scalePosition?: ControlPosition;
|
|
26
|
+
center?: LngLatLike;
|
|
27
|
+
dbfDataRequest?: (topicId: number | string, page: number, pageSize: number) => Promise<any>;
|
|
28
|
+
researchDataRequest?: (topic: GeographicLayerEntity) => Promise<{
|
|
29
|
+
lineInfo: any[];
|
|
30
|
+
pointInfo: any;
|
|
31
|
+
}>;
|
|
32
|
+
dialogConfig?: {
|
|
33
|
+
center: Boolean;
|
|
34
|
+
top: string;
|
|
35
|
+
customClass: string;
|
|
36
|
+
};
|
|
37
|
+
}>>, {
|
|
38
|
+
mapInstance: import('vue').Ref<import('mapbox-gl').Map | undefined, import('mapbox-gl').Map | undefined>;
|
|
39
|
+
initMap: () => void;
|
|
40
|
+
handleSetMapStyle: () => void;
|
|
41
|
+
resetMapView: () => void;
|
|
42
|
+
addThirdPartyLayer: (layer: GeographicLayerEntity) => void;
|
|
43
|
+
addResearchMapLayer: typeof addResearchMapLayer;
|
|
44
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
+
mapReady: (mapInstance: import('mapbox-gl').Map) => void;
|
|
46
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
47
|
+
mapRootId?: string;
|
|
48
|
+
tdtToken: string;
|
|
49
|
+
mapBoxToken: string;
|
|
50
|
+
maxZoom?: number;
|
|
51
|
+
minZoom?: number;
|
|
52
|
+
zoom?: number;
|
|
53
|
+
pitch?: number;
|
|
54
|
+
hasScale?: boolean;
|
|
55
|
+
scalePosition?: ControlPosition;
|
|
56
|
+
center?: LngLatLike;
|
|
57
|
+
dbfDataRequest?: (topicId: number | string, page: number, pageSize: number) => Promise<any>;
|
|
58
|
+
researchDataRequest?: (topic: GeographicLayerEntity) => Promise<{
|
|
59
|
+
lineInfo: any[];
|
|
60
|
+
pointInfo: any;
|
|
61
|
+
}>;
|
|
62
|
+
dialogConfig?: {
|
|
63
|
+
center: Boolean;
|
|
64
|
+
top: string;
|
|
65
|
+
customClass: string;
|
|
66
|
+
};
|
|
67
|
+
}>>> & Readonly<{
|
|
68
|
+
onMapReady?: ((mapInstance: import('mapbox-gl').Map) => any) | undefined;
|
|
69
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
70
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
71
|
+
export default _default;
|
|
72
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
73
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
74
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
75
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
76
|
+
} : {
|
|
77
|
+
type: import('vue').PropType<T[K]>;
|
|
78
|
+
required: true;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
82
|
+
new (): {
|
|
83
|
+
$slots: S;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GeographicLayerEntity, MapTopicAction } from '../types/map';
|
|
2
|
+
import { InjectionKey, Ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
export declare const selectTopicsKey: InjectionKey<Readonly<Ref<(number | string)[]>>>;
|
|
5
|
+
export declare const dbfDataRequestKey: InjectionKey<(sourceId: number | string, page: number, pageSize: number) => Promise<any>>;
|
|
6
|
+
export declare const researchDataRequestKey: InjectionKey<(topic: GeographicLayerEntity) => Promise<{
|
|
7
|
+
lineInfo: any[];
|
|
8
|
+
pointInfo: any;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const geographicLayerListKey: InjectionKey<Readonly<Ref<GeographicLayerEntity[]>>>;
|
|
11
|
+
export declare const mapInstanceKey: InjectionKey<Ref<mapboxgl.Map | undefined>>;
|
|
12
|
+
export declare const thirdPartyLayersKey: InjectionKey<Ref<GeographicLayerEntity[]>>;
|
|
13
|
+
export declare const permissionCheckKey: InjectionKey<(action: MapTopicAction, topic: GeographicLayerEntity) => boolean>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
/**
|
|
3
|
+
* 缩放步长
|
|
4
|
+
* @default 1
|
|
5
|
+
*/
|
|
6
|
+
setup: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
11
|
+
/**
|
|
12
|
+
* 缩放步长
|
|
13
|
+
* @default 1
|
|
14
|
+
*/
|
|
15
|
+
setup: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
setup: number;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GeographicLayerEntity, MapTopicAction } from '../../types/map';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
onDelete?: (topic: GeographicLayerEntity) => void;
|
|
5
|
+
onUpdate?: (topic: GeographicLayerEntity) => void;
|
|
6
|
+
onDefaultTopicClick?: (topic: GeographicLayerEntity) => void;
|
|
7
|
+
checkPermissions?: (action: MapTopicAction, topic: GeographicLayerEntity) => boolean;
|
|
8
|
+
researchTypes: Record<string, string>;
|
|
9
|
+
shpUploadUrl?: string;
|
|
10
|
+
}>>, {
|
|
11
|
+
SetTopics: (topics: GeographicLayerEntity[]) => void;
|
|
12
|
+
SetDefaultTopicNames: (names: string[]) => void;
|
|
13
|
+
showTopicList: () => void;
|
|
14
|
+
hideTopicList: () => void;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
+
onDelete?: (topic: GeographicLayerEntity) => void;
|
|
17
|
+
onUpdate?: (topic: GeographicLayerEntity) => void;
|
|
18
|
+
onDefaultTopicClick?: (topic: GeographicLayerEntity) => void;
|
|
19
|
+
checkPermissions?: (action: MapTopicAction, topic: GeographicLayerEntity) => boolean;
|
|
20
|
+
researchTypes: Record<string, string>;
|
|
21
|
+
shpUploadUrl?: string;
|
|
22
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CircleBaseConfig, CircleConfig, DbfDataEntity, FillColor, MapStyleConfig, OutlineConfig, PointSettings, SpeciesGroupSettings } from '../types/map';
|
|
2
|
+
|
|
3
|
+
export declare const DefaultColor = "rgba(103, 194, 58, 0.6)";
|
|
4
|
+
export declare const DefaultIcon = "hiper-map-icon-1.png";
|
|
5
|
+
export declare const fillColorList: FillColor[];
|
|
6
|
+
export declare const outlineConfigList: OutlineConfig[];
|
|
7
|
+
export declare const circleConfigList: CircleConfig[];
|
|
8
|
+
export declare const circleBaseConfig: CircleBaseConfig;
|
|
9
|
+
export declare const defaultPointLayerPaintConfig: SpeciesGroupSettings | PointSettings;
|
|
10
|
+
export declare const defaultStyleConfig: MapStyleConfig;
|
|
11
|
+
export declare const mapIconBaseUrl = "https://shpfile-data-1314977817.cos.ap-guangzhou.myqcloud.com/geojson/beijihua-map-icon/";
|
|
12
|
+
export declare const mapIconNameList: {
|
|
13
|
+
fileName: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}[];
|
|
16
|
+
export declare const mapPointsColors: string[];
|
|
17
|
+
export declare const TestDbfData: DbfDataEntity[];
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { GeographicLayerEntity, LayerType, LineStyle, MapBoxLayerType, MapStyleConfig } from '../types/map';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 获取图例线条样式
|
|
5
|
+
* @param lineStyle 线条样式
|
|
6
|
+
* @param color 颜色
|
|
7
|
+
* @returns 样式对象
|
|
8
|
+
*/
|
|
9
|
+
export declare function getLineLegendStyle(lineStyle: LineStyle, color: string): Record<string, string | number>;
|
|
10
|
+
/**
|
|
11
|
+
* 解析layerPaintConfig
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* 解析图层绘制配置
|
|
15
|
+
* @param layerPaintConfig 图层绘制配置,可以是字符串、null或undefined
|
|
16
|
+
* @param layerType 图层类型,用于确定如何解析配置
|
|
17
|
+
* @returns 解析后的配置对象,类型为泛型T
|
|
18
|
+
* @description 根据不同的图层类型,解析相应的绘制配置。如果配置为空,则返回默认配置
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseLayerPaintConfig<T>(layerPaintConfig: string | null | undefined, layerType: LayerType): T;
|
|
21
|
+
/**
|
|
22
|
+
* 获取图层ID
|
|
23
|
+
* @param layer 地理数据图层实体
|
|
24
|
+
* @returns 图层ID,格式为"layer-id-{layer.id}"
|
|
25
|
+
* @description 根据图层实体生成唯一的图层ID,用于在地图中标识不同图层
|
|
26
|
+
*/
|
|
27
|
+
export declare function getLayerId(layer: GeographicLayerEntity): string;
|
|
28
|
+
/**
|
|
29
|
+
* 获取数据源ID
|
|
30
|
+
* @param layer 地理数据图层实体
|
|
31
|
+
* @returns 数据源ID,格式为"source-id-{layer.id}"
|
|
32
|
+
* @description 根据图层实体生成唯一的数据源ID,用于在地图中标识不同数据源
|
|
33
|
+
* 数据源是MapBox中用来存储地理数据的容器,每个图层都需要关联一个数据源
|
|
34
|
+
*/
|
|
35
|
+
export declare function getSourceId(layer: GeographicLayerEntity): string;
|
|
36
|
+
/**
|
|
37
|
+
* 获取图层样式配置
|
|
38
|
+
* @param layer 地理数据图层实体
|
|
39
|
+
* 解析图层样式配置
|
|
40
|
+
* @param layer.layerPaintConfig 图层样式配置
|
|
41
|
+
* @param defaultStyleConfig 默认样式配置
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
export declare function parseStyleConfig(layer: GeographicLayerEntity): MapStyleConfig;
|
|
45
|
+
/**
|
|
46
|
+
* 获取图层类型
|
|
47
|
+
* @param layer 地理数据图层实体
|
|
48
|
+
* 获取图层类型
|
|
49
|
+
* @description 根据图层类型返回对应的样式类型
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export declare function getLayerType(layer: GeographicLayerEntity): MapBoxLayerType;
|
|
53
|
+
/**
|
|
54
|
+
* 获取填充样式
|
|
55
|
+
* @param styleConfig 地图样式配置
|
|
56
|
+
* @returns 填充样式对象,包含fill-color、fill-opacity等属性
|
|
57
|
+
* @description 根据样式配置生成填充图层的样式对象,支持根据属性值动态设置不同颜色
|
|
58
|
+
*/
|
|
59
|
+
export declare function getFillStyle(styleConfig: MapStyleConfig): Record<string, any> | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* 获取轮廓线样式
|
|
62
|
+
* @param styleConfig 地图样式配置
|
|
63
|
+
* @returns 轮廓线样式对象,包含line-color、line-opacity、line-width等属性
|
|
64
|
+
* @description 根据样式配置生成线图层的样式对象,支持根据缩放级别动态调整线条样式
|
|
65
|
+
*/
|
|
66
|
+
export declare function getOutLineStyle(styleConfig: MapStyleConfig): Record<string, any>;
|
|
67
|
+
/**
|
|
68
|
+
* 获取圆点样式
|
|
69
|
+
* @param styleConfig 地图样式配置
|
|
70
|
+
* @returns 圆点样式对象,包含circle-radius、circle-color等属性
|
|
71
|
+
* @description 根据样式配置生成圆点图层的样式对象,用于点状要素的可视化
|
|
72
|
+
*/
|
|
73
|
+
export declare function getCircleStyle(styleConfig: MapStyleConfig): {
|
|
74
|
+
"circle-radius": any[];
|
|
75
|
+
"circle-stroke-width": any[];
|
|
76
|
+
"circle-color": any[];
|
|
77
|
+
"circle-stroke-color": any[];
|
|
78
|
+
"circle-opacity": any[];
|
|
79
|
+
"circle-stroke-opacity": any[];
|
|
80
|
+
"icon-image": any[];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* 获取符号样式
|
|
84
|
+
* @param styleConfig 地图样式配置
|
|
85
|
+
* @returns 符号样式对象,包含icon-image等属性
|
|
86
|
+
* @description 根据样式配置生成符号图层的样式对象,用于点状要素的可视化
|
|
87
|
+
*/
|
|
88
|
+
export declare function getSymbolStyle(styleConfig: MapStyleConfig): {
|
|
89
|
+
"icon-image": any[];
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 获取图层样式
|
|
93
|
+
* @param layer 地理数据图层实体
|
|
94
|
+
* @returns 根据图层类型返回相应的样式配置对象
|
|
95
|
+
* @description 解析图层实体,根据图层类型生成适合的样式配置,包括填充样式、线样式和圆点样式
|
|
96
|
+
*/
|
|
97
|
+
export declare function getLayerStyle(layer: GeographicLayerEntity): Record<string, any> | {
|
|
98
|
+
"icon-image": any[];
|
|
99
|
+
} | {
|
|
100
|
+
"fill-color": string;
|
|
101
|
+
"fill-opacity": number;
|
|
102
|
+
"fill-outline-color": string;
|
|
103
|
+
} | {
|
|
104
|
+
"line-width": number;
|
|
105
|
+
"line-color": string;
|
|
106
|
+
} | {
|
|
107
|
+
"circle-radius": (string | number | string[])[];
|
|
108
|
+
"circle-stroke-width": (string | number | string[])[];
|
|
109
|
+
"circle-stroke-color": (string | number | string[])[];
|
|
110
|
+
"circle-stroke-opacity": (string | number | string[])[];
|
|
111
|
+
"circle-color": string;
|
|
112
|
+
} | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GeographicLayerEntity } from '../../types/map';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
4
|
+
open: (_topic: GeographicLayerEntity, topics?: GeographicLayerEntity[]) => void;
|
|
5
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
cancel: (...args: any[]) => void;
|
|
7
|
+
confirm: (...args: any[]) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
9
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|