zhihao-ui 1.3.3 → 1.3.4-alpha.1

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 (99) hide show
  1. package/dist/es/{BaseInfo-BqJWKOdd.js → BaseInfo-DjMoCl6q.js} +1 -1
  2. package/dist/es/{BaseItem-BQbkTxt9.js → BaseItem-4-tfe2b_.js} +3 -3
  3. package/dist/es/{Button-1UUC8v6b.js → Button-CvmMyXpk.js} +2 -2
  4. package/dist/es/{DatePicker-ByP3ZkhE.js → DatePicker-BJ-uEY5y.js} +3 -3
  5. package/dist/es/{DetailHeader-CnZCthjX.js → DetailHeader-RmOylZsk.js} +3 -3
  6. package/dist/es/{DetailSubTitle-COQCdb8X.js → DetailSubTitle-CZ94UNJm.js} +2 -2
  7. package/dist/es/{Dialog-DFQIVnQP.js → Dialog-BR5jfGEM.js} +3 -3
  8. package/dist/es/{DiyDataTable-D0gTwPB4.js → DiyDataTable-DEjYnC6P.js} +4 -4
  9. package/dist/es/{EditInfoPair-CZpQKhX6.js → EditInfoPair-BrrQYpFp.js} +3 -3
  10. package/dist/es/{FileWrapper-C9Cqt-L8.js → FileWrapper-B7CH1kBr.js} +4 -4
  11. package/dist/es/{Grid-CfwiS54k.js → Grid-D8kjRsYq.js} +2 -2
  12. package/dist/es/{InfoPair-ZKRxEmIC.js → InfoPair-D3rzhvxY.js} +3 -3
  13. package/dist/es/{Input-CloA0e6h.js → Input-Z4JEw_7x.js} +3 -3
  14. package/dist/es/{Loading-BXtzvylk.js → Loading-pR0mL-Hq.js} +2 -2
  15. package/dist/es/Map-DKkSq-bX.js +2267 -0
  16. package/dist/es/{MessageBox-BNOuww77.js → MessageBox-DjwiajIV.js} +2 -2
  17. package/dist/es/{MoneyInput-CuHL7bEc.js → MoneyInput-K4LEAm4x.js} +8 -8
  18. package/dist/es/{PageHeadPanel-BroYHTD8.js → PageHeadPanel-DHbOvTJN.js} +2 -2
  19. package/dist/es/{Table-DFGzUqS3.js → Table-DXSMi34f.js} +5 -5
  20. package/dist/es/{ToolTips-BBi5iPOb.js → ToolTips-B_bFypmj.js} +6 -6
  21. package/dist/es/index.js +22 -22
  22. package/dist/es/{utils-BbOeFn3W.js → utils-Dm3IAG7S.js} +3 -3
  23. package/dist/es/{vendor-D-B7bNnH.js → vendor-Cu-tp_n1.js} +8448 -8041
  24. package/dist/index.css +1 -1
  25. package/dist/types/components/CascaderLoadMore/CascaderLoadMore.vue.d.ts +197 -0
  26. package/dist/types/components/CascaderLoadMore/index.d.ts +369 -0
  27. package/dist/types/components/CascaderLoadMore/types.d.ts +7 -0
  28. package/dist/types/components/Map/Map.vue.d.ts +119 -0
  29. package/dist/types/components/Map/components/copyright.vue.d.ts +36 -0
  30. package/dist/types/components/Map/components/measure.vue.d.ts +23 -0
  31. package/dist/types/components/Map/components/scaleLine.vue.d.ts +2 -1
  32. package/dist/types/components/Map/components/toolPanel.vue.d.ts +40 -0
  33. package/dist/types/components/Map/components/zoomControl.vue.d.ts +13 -1
  34. package/dist/types/components/Map/config.d.ts +32 -0
  35. package/dist/types/components/Map/enum/car.d.ts +5 -0
  36. package/dist/types/components/Map/enum/device.d.ts +8 -0
  37. package/dist/types/components/Map/enum/index.d.ts +5 -0
  38. package/dist/types/components/Map/enum/openLayers.d.ts +10 -0
  39. package/dist/types/components/Map/enum/ship.d.ts +50 -0
  40. package/dist/types/components/Map/function/carTrack.d.ts +7 -14
  41. package/dist/types/components/Map/function/drawLine.d.ts +4 -4
  42. package/dist/types/components/Map/function/drawPolygon.d.ts +5 -2
  43. package/dist/types/components/Map/function/event.d.ts +9 -0
  44. package/dist/types/components/Map/function/layers.d.ts +8 -5
  45. package/dist/types/components/Map/function/map.d.ts +14 -10
  46. package/dist/types/components/Map/function/port.d.ts +7 -6
  47. package/dist/types/components/Map/function/position.d.ts +8 -0
  48. package/dist/types/components/Map/function/props.d.ts +5 -2
  49. package/dist/types/components/Map/function/ship/index.d.ts +14 -29
  50. package/dist/types/components/Map/function/ship/style.d.ts +14 -6
  51. package/dist/types/components/Map/function/shipTrack.d.ts +14 -20
  52. package/dist/types/components/Map/index.d.ts +373 -0
  53. package/dist/types/components/Map/interface/common/BaseEntity.d.ts +29 -0
  54. package/dist/types/components/Map/interface/common/page.d.ts +34 -0
  55. package/dist/types/components/Map/interface/entity/dashboard.d.ts +16 -0
  56. package/dist/types/components/Map/interface/entity/map.d.ts +36 -0
  57. package/dist/types/components/Map/interface/entity/point.d.ts +10 -0
  58. package/dist/types/components/Map/interface/entity/queryLicenseResponse.d.ts +86 -0
  59. package/dist/types/components/Map/interface/entity/render.d.ts +57 -0
  60. package/dist/types/components/Map/interface/entity/ship.d.ts +361 -0
  61. package/dist/types/components/Map/interface/entity/shipInfoVo.d.ts +210 -0
  62. package/dist/types/components/Map/interface/entity/shipMapData.d.ts +27 -0
  63. package/dist/types/components/Map/interface/entity/shipMarker.d.ts +8 -0
  64. package/dist/types/components/Map/interface/entity/shipTrack.d.ts +56 -0
  65. package/dist/types/components/Map/interface/entity/vehicle.d.ts +345 -0
  66. package/dist/types/components/Map/interface/index.d.ts +1 -0
  67. package/dist/types/components/Map/interface/mapProps.d.ts +7 -7
  68. package/dist/types/components/Map/interface/position.d.ts +7 -0
  69. package/dist/types/components/Map/interface/shipInfoVo.d.ts +2 -0
  70. package/dist/types/components/Map/interface/vo/vehicleVo.d.ts +20 -0
  71. package/dist/types/components/Map/meta/index.d.ts +5 -0
  72. package/dist/types/components/Map/render/canvasRender/canvasRender.d.ts +15 -0
  73. package/dist/types/components/Map/render/canvasRender/geometry.d.ts +22 -0
  74. package/dist/types/components/Map/render/canvasRender/renderCustomOverlay.d.ts +5 -0
  75. package/dist/types/components/Map/render/canvasRender/renderPointStyle.d.ts +10 -0
  76. package/dist/types/components/Map/render/canvasRender/renderShipStyle.d.ts +5 -0
  77. package/dist/types/components/Map/render/canvasRender/renderTrackStyle.d.ts +12 -0
  78. package/dist/types/components/Map/render/canvasRender/renderTruckStyle.d.ts +3 -0
  79. package/dist/types/components/Map/render/drawPolygon.d.ts +10 -0
  80. package/dist/types/components/Map/render/renderDashboard.d.ts +12 -0
  81. package/dist/types/components/Map/render/renderMarker.d.ts +7 -0
  82. package/dist/types/components/Map/render/renderPoint.d.ts +80 -0
  83. package/dist/types/components/Map/render/renderShip.d.ts +20 -0
  84. package/dist/types/components/Map/render/renderTrack.d.ts +12 -0
  85. package/dist/types/components/Map/render/renderTruck.d.ts +10 -0
  86. package/dist/types/components/Map/useMap.d.ts +17 -0
  87. package/dist/types/components/Map/utils/common.d.ts +27 -0
  88. package/dist/types/components/Map/utils/cursor.d.ts +3 -2
  89. package/dist/types/components/Map/utils/events.d.ts +4 -2
  90. package/dist/types/components/Map/utils/format.d.ts +10 -0
  91. package/dist/types/components/Map/{function → utils}/shipOverlay.d.ts +4 -4
  92. package/dist/types/components/Map/utils/store.d.ts +32 -0
  93. package/dist/types/components/Map/utils/track.d.ts +44 -0
  94. package/dist/types/components/Map/utils/transform.d.ts +44 -0
  95. package/dist/umd/index.css +1 -1
  96. package/dist/umd/index.umd.cjs +91 -103
  97. package/package.json +1 -1
  98. package/dist/es/Map-Ce0s7g5Z.js +0 -1700
  99. package/dist/types/components/Map/utils/util.d.ts +0 -42
@@ -0,0 +1,36 @@
1
+ import { BaseMapType, COPY_RIGHT_TYPE } from '../types.ts';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ type?: number;
5
+ mapTile: number;
6
+ }>, {
7
+ type: COPY_RIGHT_TYPE;
8
+ mapTile: BaseMapType;
9
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
10
+ type?: number;
11
+ mapTile: number;
12
+ }>, {
13
+ type: COPY_RIGHT_TYPE;
14
+ mapTile: BaseMapType;
15
+ }>>> & Readonly<{}>, {
16
+ type: number;
17
+ mapTile: number;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ export default _default;
20
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
+ type __VLS_TypePropsToRuntimeProps<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
23
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
+ } : {
25
+ type: import('vue').PropType<T[K]>;
26
+ required: true;
27
+ };
28
+ };
29
+ type __VLS_WithDefaults<P, D> = {
30
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
31
+ default: D[K];
32
+ }> : P[K];
33
+ };
34
+ type __VLS_Prettify<T> = {
35
+ [K in keyof T]: T[K];
36
+ } & {};
@@ -0,0 +1,23 @@
1
+ declare function removeInteraction(): void;
2
+ declare function addInteraction(): void;
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ visible: import('vue').PropType<boolean>;
5
+ viewMode: {
6
+ type: import('vue').PropType<"PC" | "WxMiniprogram" | "APP" | "findShip" | "markerPosition">;
7
+ required: true;
8
+ };
9
+ }>, {
10
+ addInteraction: typeof addInteraction;
11
+ removeInteraction: typeof removeInteraction;
12
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ close: (...args: any[]) => void;
14
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
+ visible: import('vue').PropType<boolean>;
16
+ viewMode: {
17
+ type: import('vue').PropType<"PC" | "WxMiniprogram" | "APP" | "findShip" | "markerPosition">;
18
+ required: true;
19
+ };
20
+ }>> & Readonly<{
21
+ onClose?: ((...args: any[]) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
23
+ export default _default;
@@ -1,6 +1,7 @@
1
1
  import { Units } from 'ol/control/ScaleLine';
2
+ import { Map } from 'ol';
2
3
 
3
4
  declare const _default: import('vue').DefineComponent<{}, {
4
- setScaleLine: (units: Units) => void;
5
+ setScaleLine: (mapInstall: Map, units: Units) => void;
5
6
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
7
  export default _default;
@@ -0,0 +1,40 @@
1
+ import { BaseMapType } from '../types.ts';
2
+
3
+ declare function __VLS_template(): {
4
+ toolPanel?(_: {}): any;
5
+ };
6
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ vehicleMode: "truck" | "ship";
8
+ viewMode: "PC" | "WxMiniprogram" | "APP" | "findShip" | "markerPosition";
9
+ disableGreenDot: boolean;
10
+ showTrackLayer: boolean;
11
+ mapTileMode: BaseMapType;
12
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ switchGreenDot: (...args: any[]) => void;
14
+ switchMapTile: (...args: any[]) => void;
15
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
16
+ vehicleMode: "truck" | "ship";
17
+ viewMode: "PC" | "WxMiniprogram" | "APP" | "findShip" | "markerPosition";
18
+ disableGreenDot: boolean;
19
+ showTrackLayer: boolean;
20
+ mapTileMode: BaseMapType;
21
+ }>>> & Readonly<{
22
+ onSwitchGreenDot?: ((...args: any[]) => any) | undefined;
23
+ onSwitchMapTile?: ((...args: any[]) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
26
+ export default _default;
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToRuntimeProps<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: import('vue').PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -1,2 +1,14 @@
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>;
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ mapInstance: {
3
+ type: ObjectConstructor;
4
+ default: () => null;
5
+ };
6
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
+ mapInstance: {
8
+ type: ObjectConstructor;
9
+ default: () => null;
10
+ };
11
+ }>> & Readonly<{}>, {
12
+ mapInstance: Record<string, any>;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
14
  export default _default;
@@ -0,0 +1,32 @@
1
+ export declare const CDN_URL = "https://static.zhihaoscm.cn/";
2
+ export declare const tiandituKey = "a6e8f78974f2581f2ca00485b40c948f";
3
+ export declare const zhongkeKey = "15c81cc0a191a232e0a0ca1a51c3ca81";
4
+ export declare const baseMap: {
5
+ tiandituTile: string;
6
+ tiandituTileMark: string;
7
+ tiandituImgTile: string;
8
+ tiandituImgTileMark: string;
9
+ greenTile: string;
10
+ };
11
+ export declare const mapZoom: {
12
+ default: number;
13
+ min: number;
14
+ max: number;
15
+ findShipMin: number;
16
+ findShip: number;
17
+ findTruck: number;
18
+ shipGreenDotMax: number;
19
+ truckDefault: number;
20
+ truckStatistics: number;
21
+ shipModelMin: number;
22
+ shipModelMax: number;
23
+ markerPosition: number;
24
+ };
25
+ export declare const renderShipsLimit = 200;
26
+ export declare const mapDefaultCenter: [number, number];
27
+ export declare const projection: {
28
+ data: string;
29
+ mercator: string;
30
+ };
31
+ export declare const LOG_DATE_FORMAT = "YYYY-MM-DD HH:mm:ss";
32
+ export declare const DEFAULT_VALUE = "--";
@@ -0,0 +1,5 @@
1
+ export declare enum CAR_COLOR {
2
+ BLUE = 1,// 蓝色
3
+ YELLOW = 2,// 黄色
4
+ Y_GREEN = 3
5
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum DEVICE_TYPE {
2
+ HOST = 1,//主机
3
+ TALK = 2,//对讲机
4
+ STORAGE = 3,//存储卡
5
+ INTERNET = 4,//物联网卡
6
+ CAMERA = 5,//尾厢摄像机
7
+ LOAD = 6
8
+ }
@@ -0,0 +1,5 @@
1
+ export { CAR_COLOR } from './car';
2
+ export { DEVICE_TYPE } from './device';
3
+ export { LENGTH_UNIT } from './openLayers';
4
+ export { LENGTH_UNIT_LABEL } from './openLayers';
5
+ export { SEARCH_TYPE, SWITCH_BTN } from './ship';
@@ -0,0 +1,10 @@
1
+ export declare enum LENGTH_UNIT {
2
+ M = 1,// m
3
+ KM = 2,// km
4
+ NM = 3
5
+ }
6
+ export declare const LENGTH_UNIT_LABEL: {
7
+ 1: string;
8
+ 2: string;
9
+ 3: string;
10
+ };
@@ -0,0 +1,50 @@
1
+ export declare enum SEARCH_TYPE {
2
+ SEARCH_SHIP = 0,
3
+ SEARCH_PORT = 1,
4
+ SEARCH_CUSTOM = 2
5
+ }
6
+ export declare enum SWITCH_BTN {
7
+ Camera = "camera",
8
+ Mobile = "mobile",
9
+ WaterGauge = "waterGauge"
10
+ }
11
+ export declare enum SHIP_SAIL_STATUS {
12
+ "发动机使用中" = 0,
13
+ "锚泊" = 1,
14
+ "未操作" = 2,
15
+ "操纵能力受限" = 3,
16
+ "吃水受限" = 4,
17
+ "系泊" = 5,
18
+ "搁浅" = 6,
19
+ "从事捕捞" = 7,
20
+ "航行中" = 8,
21
+ "留作将来修正导航状态" = 9,
22
+ "高速船留用" = 10,
23
+ "机动船尾推作业" = 11,
24
+ "机动船顶推或侧推作业" = 12,
25
+ "飞翼船留用" = 13,
26
+ "现行的" = 14,
27
+ "未定义" = 15
28
+ }
29
+ export declare enum SHIP_TYPE {
30
+ "飞翼船" = 1,
31
+ "捕捞船" = 2,
32
+ "拖带船" = 3,
33
+ "帆船" = 4,
34
+ "游艇" = 5,
35
+ "高速船" = 6,
36
+ "领航船" = 7,
37
+ "搜救船" = 8,
38
+ "拖轮" = 9,
39
+ "港口供应" = 10,
40
+ "防污船舶" = 11,
41
+ "执法船" = 12,
42
+ "医疗运输" = 13,
43
+ "特殊船" = 14,
44
+ "客轮" = 15,
45
+ "货轮" = 16,
46
+ "油轮" = 17,
47
+ "集装箱船" = 18,
48
+ "其他" = 19,
49
+ "未知" = 20
50
+ }
@@ -1,18 +1,11 @@
1
1
  import { VehicleInfo } from '../interface';
2
+ import { ShipTrack } from '../interface/shipTrack';
2
3
 
3
- export declare const locationTruck: (vehicleInfo?: VehicleInfo) => Promise<void>;
4
- export declare const drawTruckIcon: (vehicleInfo: VehicleInfo, centerPixel: number[]) => void;
5
- export declare const renderTruckTrack: (vclN: string, list: any[], color: string, threshold?: number) => void;
6
- export declare const closeTruckTrack: () => void;
7
- export declare const removeTruckIcon: () => void;
8
- export declare const resetTrackView: (id: string | number) => void;
9
- export declare const playTrack: (id: number | string, speed: number) => void;
10
- declare const _default: {
11
- locationTruck: (vehicleInfo?: VehicleInfo) => Promise<void>;
12
- renderTruckTrack: (vclN: string, list: any[], color: string, threshold?: number) => void;
13
- removeTruckIcon: () => void;
14
- closeTruckTrack: () => void;
15
- resetTrackView: (id: string | number) => void;
4
+ export declare const useCarTrackManager: (mapInstance: any, trackManager: any) => {
5
+ location: (vehicleInfo?: VehicleInfo) => Promise<void>;
6
+ remove: () => void;
7
+ renderTrack: (vclN: string, list: ShipTrack[], color: string) => void;
8
+ setCenter: (id: string | number) => void;
9
+ closeTrack: () => void;
16
10
  playTrack: (id: number | string, speed: number) => void;
17
11
  };
18
- export default _default;
@@ -1,12 +1,12 @@
1
+ import { Map } from 'ol';
1
2
  import { LineString } from 'ol/geom';
3
+ import { PropsManager } from './props';
2
4
 
3
- export declare const setUnit: (unitValue: string) => void;
4
- export declare const computedDistance: (line: LineString, unit: string) => string;
5
- declare const _default: {
5
+ export declare const useDrawLineManager: (mapInstance: Map, propsManager: PropsManager) => {
6
6
  open: () => void;
7
7
  close: () => void;
8
8
  deleteLine: (id: string) => void;
9
9
  setUnit: (unitValue: string) => void;
10
10
  getState: () => boolean;
11
11
  };
12
- export default _default;
12
+ export declare const computedDistance: (line: LineString, unit: string) => string;
@@ -1,6 +1,9 @@
1
- declare const _default: {
1
+ import { Map } from 'ol';
2
+ import { PropsManager } from './props';
3
+
4
+ export declare const useDrawPolygonManager: (mapInstance: Map, propsManager: PropsManager) => {
2
5
  open: () => void;
3
6
  close: () => void;
4
7
  reset: () => void;
8
+ getState: () => "close" | "open";
5
9
  };
6
- export default _default;
@@ -0,0 +1,9 @@
1
+ import { useMapInitializer } from './map';
2
+ import { PropsManager } from './props';
3
+ import { useTrackManager } from './shipTrack';
4
+ import { useShipManager } from './ship';
5
+ import { usePortManager } from './port';
6
+ import { useDrawLineManager } from './drawLine';
7
+ import { useDrawPolygonManager } from './drawPolygon';
8
+
9
+ export declare const useEventManager: (mapManager: ReturnType<typeof useMapInitializer>, propsManager: PropsManager, trackManager: ReturnType<typeof useTrackManager>, shipManager: ReturnType<typeof useShipManager>, portManager: ReturnType<typeof usePortManager>, drawLineManager: ReturnType<typeof useDrawLineManager>, drawPolygonManager: ReturnType<typeof useDrawPolygonManager>) => void;
@@ -1,7 +1,10 @@
1
1
  import { Props } from '../interface';
2
+ import { Map } from 'ol';
2
3
 
3
- export declare const getLayers: () => import('ol').Collection<import('ol/layer/Base').default>;
4
- export declare const getShowLayerType: () => "vector" | "satellite" | undefined;
5
- export declare const setShowLayerType: (type: Props["layerType"]) => void;
6
- export declare const getGreenTileVisible: () => any;
7
- export declare const setGreenTileVisible: (show: boolean) => void;
4
+ export declare const useLayerManager: (mapInstance: Map) => {
5
+ getLayers: () => import('ol').Collection<import('ol/layer/Base').default>;
6
+ getGreenTileVisible: () => boolean;
7
+ setGreenTileVisible: (show: boolean) => void;
8
+ getShowLayerType: () => "vector" | "satellite" | undefined;
9
+ setShowLayerType: (type: Props["layerType"]) => void;
10
+ };
@@ -2,13 +2,17 @@ import { Map, View } from 'ol';
2
2
  import { Coordinate } from 'ol/coordinate';
3
3
  import { Props } from '../interface';
4
4
 
5
- export declare const getInstall: () => Map;
6
- export declare const setInstall: (map: Map) => void;
7
- export declare const getView: () => View;
8
- export declare const getZoom: () => number;
9
- export declare const setZoom: (zoom: number) => void;
10
- export declare const setCenter: (lon: number, lat: number) => void;
11
- export declare const getCenter: () => Coordinate;
12
- export declare const getSize: () => number[];
13
- export declare const BASE_LAYER_MAP: Map;
14
- export declare const initMap: (props: Props) => void;
5
+ /**
6
+ * 地图工具类
7
+ */
8
+ export declare function useMapInitializer(): {
9
+ getInstall: () => Map;
10
+ getView: () => View;
11
+ getZoom: () => number;
12
+ setZoom: (zoom: number) => void;
13
+ setCenter: (lon: number, lat: number) => void;
14
+ getCenter: () => Coordinate;
15
+ getSize: () => number[];
16
+ initMap: (element: HTMLDivElement, props: Props) => void;
17
+ setBaseLayerMap: (props: Props) => void;
18
+ };
@@ -1,9 +1,10 @@
1
1
  import { WharfEntity } from '../interface';
2
- import { Pixel } from 'ol/pixel';
2
+ import { Feature, Map } from 'ol';
3
3
 
4
4
  export declare const PORT_LAYER_CLASS_NAME = "zh-map-port-layer";
5
- export declare const renderPortList: (portList: WharfEntity[]) => void;
6
- export declare const clearPortList: () => void;
7
- export declare const clearSelectedPort: () => void;
8
- export declare const selectedPort: (portData?: WharfEntity) => void;
9
- export declare const handlePortHover: (pixel: Pixel) => void;
5
+ export declare const usePortManager: (mapInstance: Map) => {
6
+ render: (portList: WharfEntity[], showTitle?: boolean) => void;
7
+ clear: () => void;
8
+ selected: (portData?: WharfEntity) => void;
9
+ handlePortHover: (portFeature: Feature | null) => void;
10
+ };
@@ -0,0 +1,8 @@
1
+ import { LocationEntity } from '../interface';
2
+
3
+ export declare const usePositionManager: (mapInstance: any) => {
4
+ render: (portList: LocationEntity[]) => void;
5
+ selected: (loactionData?: LocationEntity) => void;
6
+ clearSelected: () => void;
7
+ clear: () => void;
8
+ };
@@ -1,4 +1,7 @@
1
1
  import { Props } from '../interface';
2
2
 
3
- export declare const setProps: (propsValue: Props) => void;
4
- export declare const getProps: () => Props | undefined;
3
+ export interface PropsManager {
4
+ setProps: (propsValue: Props) => void;
5
+ getProps: () => Props;
6
+ }
7
+ export declare const usePropsManager: () => PropsManager;
@@ -1,31 +1,16 @@
1
1
  import { ShipInfoVo } from '../../interface';
2
- import { Feature } from 'ol';
2
+ import { Feature, Map as MapOl } from 'ol';
3
3
 
4
- export declare const renderShipList: (shipList: ShipInfoVo[]) => void;
5
- /**
6
- * 清除所有船只 除选中之外
7
- */
8
- export declare const clearShipList: () => void;
9
- /**
10
- * 船只label闪烁
11
- */
12
- export declare const renderShipBlink: (ships: Record<string, boolean>, colors: Record<string, boolean>) => void;
13
- /**
14
- * 显示符合条件的船只
15
- * @param shipList
16
- */
17
- export declare const filterShipShow: (shipList: ShipInfoVo[]) => void;
18
- /**
19
- * 选中的船只
20
- * @param ship
21
- */
22
- export declare const renderShipSelected: (ship: ShipInfoVo) => void;
23
- /**
24
- * 只渲染选中船只和选中效果
25
- */
26
- export declare const renderShipSelectedChange: () => void;
27
- export declare const handleShipMapEvent: import('lodash-es').DebouncedFunc<(shipsFeature: Feature, type: string, callback?: (id: string) => void) => void>;
28
- /**
29
- * 移除选中overlay效果船只
30
- */
31
- export declare const removeSelectedOverlay: () => void;
4
+ export declare const useShipManager: (mapInstance: MapOl) => {
5
+ render: (shipList: ShipInfoVo[]) => void;
6
+ selected: (ship: ShipInfoVo) => void;
7
+ filter: (shipList: ShipInfoVo[]) => void;
8
+ blinking: (ships: Record<string, boolean>, colors: Record<string, {
9
+ blinkColors: string[];
10
+ shipState: string;
11
+ }>) => void;
12
+ clear: () => void;
13
+ handleShipMapEvent: import('lodash-es').DebouncedFunc<(shipsFeature: Feature | null, type: string, callback?: (id: string) => void) => void>;
14
+ changeShipScale: (status: string) => void;
15
+ changeSelectedScale: () => void;
16
+ };
@@ -1,15 +1,23 @@
1
1
  import { ShipInfoVo } from '../../interface';
2
2
  import { SHIP_DIRECT } from '../../meta/ship';
3
- import { Feature, Overlay } from 'ol';
3
+ import { Feature, Map as MapOl, Overlay } from 'ol';
4
4
  import { Style } from 'ol/style';
5
5
 
6
6
  export declare const getShipDirectPath: (ship: ShipInfoVo) => "" | SHIP_DIRECT.left | SHIP_DIRECT.right | SHIP_DIRECT.front;
7
- export declare const createShipStyle: (feature: Feature) => Style;
8
- export declare const selectedShipStyle: (shipData: ShipInfoVo) => Overlay;
7
+ type ShipType = 'ship' | 'triangle';
8
+ export declare const createShipStyle: (mapInstance: MapOl, feature: Feature) => Style;
9
+ export declare const getShipType: (mapInstance: MapOl) => ShipType;
10
+ export declare const getShipScale: (mapInstance: MapOl, shipData: ShipInfoVo, shipType: ShipType) => number;
11
+ export declare const selectedShipStyle: (mapInstance: MapOl, shipData: ShipInfoVo) => Overlay;
9
12
  /**
10
13
  * 生成船只元素
11
14
  * @param shipData
12
15
  */
13
- export declare const selectedShipElement: (shipData: ShipInfoVo) => HTMLDivElement;
14
- export declare const createLabelStyle: (feature: Feature) => void;
15
- export declare const createLabelElement: (feature: Feature) => HTMLDivElement;
16
+ export declare const selectedShipElement: (mapInstance: MapOl, shipData: ShipInfoVo) => HTMLDivElement;
17
+ export declare const createLabelStyle: (mapInstance: MapOl, shipData: ShipInfoVo) => void;
18
+ export declare const createLabelElement: (shipData: ShipInfoVo) => HTMLDivElement;
19
+ export declare const getRightIcons: (ship: ShipInfoVo) => string[];
20
+ export declare function getRandomLineDirection(): LineDirection;
21
+ type LineDirection = 'left-top' | 'left-middle' | 'left-bottom' | 'right-top' | 'right-middle' | 'right-bottom';
22
+ export declare const createLabelFeatureStyle: (feature: Feature, lenNum: number) => Style;
23
+ export {};
@@ -1,22 +1,16 @@
1
- import { Feature, MapBrowserEvent } from 'ol';
1
+ import { Feature, MapBrowserEvent, Map as MapOl } from 'ol';
2
2
  import { ShipTrack } from '../interface/shipTrack';
3
3
 
4
- interface TrackExtend {
5
- id: string;
6
- mmsi?: string;
7
- length: string;
8
- }
9
- export declare const reRenderTrackLine: () => void;
10
- export declare const renderTrackLine: (id: string, list: ShipTrack[], color: string, unit?: number, type?: string, threshold?: number) => Promise<void>;
11
- export declare const handleTrackMapEvent: (trunkFeature: Feature, type: string, event: MapBrowserEvent<PointerEvent>) => void;
12
- /**
13
- * 使用轨迹区域自动缩放地图层级
14
- * @param id
15
- */
16
- export declare const setTrackViewCenter: (id?: number | string) => void;
17
- export declare const playShipTrack: (id: number | string, speed: number) => void;
18
- export declare const removeAllTrackLayer: () => void;
19
- export declare const closeTrack: (clearAll?: boolean) => void;
20
- export declare const getShowTracks: () => TrackExtend[];
21
- export declare const stopAnimation: () => void;
22
- export {};
4
+ export declare const useTrackManager: (mapInstance: MapOl) => {
5
+ render: (id: string, list: ShipTrack[], color: string, type?: string, threshold?: number) => Promise<void>;
6
+ remove: () => void;
7
+ play: (id: number | string, speed: number) => void;
8
+ setCenter: (id?: number | string) => void;
9
+ close: (id?: string) => void;
10
+ getLength: (id: string, unit?: number) => {
11
+ id: string;
12
+ length: string;
13
+ };
14
+ handleTrackMapEvent: (trunkFeature: Feature | null, type: string, event?: MapBrowserEvent<PointerEvent>) => void;
15
+ reRenderTrackLine: import('lodash-es').DebouncedFunc<() => void>;
16
+ };