@supermapgis/vue-iclient-leaflet 11.2.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/LICENSE +201 -0
- package/README.md +31 -0
- package/dist/iclient-leaflet-vue.css +24471 -0
- package/dist/iclient-leaflet-vue.js +190317 -0
- package/dist/iclient-leaflet-vue.min.css +9 -0
- package/dist/iclient-leaflet-vue.min.js +517 -0
- package/dist/index.js +15 -0
- package/lib/_assets/iconfont/icon-sm-components.css +245 -0
- package/lib/_assets/iconfont/icon-sm-components.eot +0 -0
- package/lib/_assets/iconfont/icon-sm-components.svg +197 -0
- package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/lib/_lang/en.js +446 -0
- package/lib/_lang/index.js +385 -0
- package/lib/_lang/zh.js +445 -0
- package/lib/_mixin/AntdRender.js +686 -0
- package/lib/_mixin/Card.js +197 -0
- package/lib/_mixin/GridLayer.js +153 -0
- package/lib/_mixin/Layer.js +140 -0
- package/lib/_mixin/Options.js +114 -0
- package/lib/_mixin/Popper.js +134 -0
- package/lib/_mixin/Theme.js +441 -0
- package/lib/_mixin/ThirdService.js +243 -0
- package/lib/_mixin/TileLayer.js +138 -0
- package/lib/_mixin/Timer.js +230 -0
- package/lib/_mixin/VmUpdater.js +204 -0
- package/lib/_mixin/WebMapBase.js +3467 -0
- package/lib/_mixin/map-events.js +200 -0
- package/lib/_mixin/map-getter.js +341 -0
- package/lib/_types/AddressMatchParameter.js +118 -0
- package/lib/_types/GeoJSONParamter.js +113 -0
- package/lib/_types/RestDataParameter.js +141 -0
- package/lib/_types/RestMapParameter.js +141 -0
- package/lib/_types/RestParameter.js +121 -0
- package/lib/_types/event/BaseTypes.js +124 -0
- package/lib/_types/event/Event.js +442 -0
- package/lib/_types/event/Events.js +484 -0
- package/lib/_types/event/Pixel.js +295 -0
- package/lib/_types/event/Util.js +305 -0
- package/lib/_types/iPortalDataParameter.js +121 -0
- package/lib/_types/iServerBaseParameter.js +111 -0
- package/lib/_types/iServerDataParameter.js +154 -0
- package/lib/_types/iServerMapParameter.js +154 -0
- package/lib/_types/index.js +231 -0
- package/lib/_types/map-event.js +163 -0
- package/lib/_utils/EchartsDataService.js +843 -0
- package/lib/_utils/RestService.js +7096 -0
- package/lib/_utils/WebMapService.js +1607 -0
- package/lib/_utils/epsg-define.js +181 -0
- package/lib/_utils/get-features.js +232 -0
- package/lib/_utils/global-event.js +134 -0
- package/lib/_utils/iPortalDataService.js +7459 -0
- package/lib/_utils/iServerRestService.js +7603 -0
- package/lib/_utils/props-binder.js +129 -0
- package/lib/_utils/statistics.js +147 -0
- package/lib/_utils/style/color/colorPalette.js +192 -0
- package/lib/_utils/style/color/serialColors.js +352 -0
- package/lib/_utils/style/common/common.css +1 -0
- package/lib/_utils/style/mixins/config.css +0 -0
- package/lib/_utils/style/mixins/mixins.css +0 -0
- package/lib/_utils/style/theme/antd.css +25242 -0
- package/lib/_utils/style/theme/antdVar.css +0 -0
- package/lib/_utils/style/theme/chart.js +7477 -0
- package/lib/_utils/style/theme/set-theme.js +200 -0
- package/lib/_utils/style/theme/theme.css +0 -0
- package/lib/_utils/style/theme/theme.json +356 -0
- package/lib/_utils/util.js +484 -0
- package/lib/_utils/vue-types/index.js +396 -0
- package/lib/_utils/vue-types/utils.js +318 -0
- package/lib/avatar/index.js +656 -0
- package/lib/avatar/style/avatar.css +1 -0
- package/lib/avatar/style/css.js +9 -0
- package/lib/avatar/style/index.css +2135 -0
- package/lib/avatar/style/index.js +9 -0
- package/lib/border/index.js +642 -0
- package/lib/border/style/border.css +1 -0
- package/lib/border/style/css.js +7 -0
- package/lib/border/style/index.js +7 -0
- package/lib/breadcrumb/index.js +813 -0
- package/lib/breadcrumb/style/breadcrumb.css +1 -0
- package/lib/breadcrumb/style/css.js +9 -0
- package/lib/breadcrumb/style/index.css +2102 -0
- package/lib/breadcrumb/style/index.js +9 -0
- package/lib/button/index.js +758 -0
- package/lib/button/style/button.css +1 -0
- package/lib/button/style/css.js +9 -0
- package/lib/button/style/index.css +3571 -0
- package/lib/button/style/index.js +9 -0
- package/lib/card/index.js +824 -0
- package/lib/card/style/card.css +1 -0
- package/lib/card/style/css.js +9 -0
- package/lib/card/style/index.css +2379 -0
- package/lib/card/style/index.js +9 -0
- package/lib/chart/index.js +9471 -0
- package/lib/chart/style/chart.css +1 -0
- package/lib/chart/style/css.js +11 -0
- package/lib/chart/style/index.js +11 -0
- package/lib/checkbox/index.js +756 -0
- package/lib/checkbox/style/checkbox.css +1 -0
- package/lib/checkbox/style/css.js +9 -0
- package/lib/checkbox/style/index.css +2286 -0
- package/lib/checkbox/style/index.js +9 -0
- package/lib/collapse/index.js +446 -0
- package/lib/collapse/style/collapse.css +1 -0
- package/lib/collapse/style/css.js +9 -0
- package/lib/collapse/style/index.css +2187 -0
- package/lib/collapse/style/index.js +9 -0
- package/lib/collapse-card/index.js +588 -0
- package/lib/collapse-card/style/collapse-card.css +1 -0
- package/lib/collapse-card/style/css.js +7 -0
- package/lib/collapse-card/style/index.js +7 -0
- package/lib/color-picker/index.js +521 -0
- package/lib/color-picker/style/color-picker.css +1 -0
- package/lib/color-picker/style/css.js +7 -0
- package/lib/color-picker/style/index.js +7 -0
- package/lib/date-picker/index.js +680 -0
- package/lib/date-picker/style/css.js +9 -0
- package/lib/date-picker/style/date-picker.css +1 -0
- package/lib/date-picker/style/index.css +4236 -0
- package/lib/date-picker/style/index.js +9 -0
- package/lib/dropdown/index.js +347 -0
- package/lib/dropdown/style/css.js +9 -0
- package/lib/dropdown/style/dropdown.css +1 -0
- package/lib/dropdown/style/index.css +2344 -0
- package/lib/dropdown/style/index.js +9 -0
- package/lib/empty/index.js +643 -0
- package/lib/empty/style/css.js +9 -0
- package/lib/empty/style/empty.css +1 -0
- package/lib/empty/style/index.css +2095 -0
- package/lib/empty/style/index.js +9 -0
- package/lib/icon/index.js +681 -0
- package/lib/icon/style/css.js +9 -0
- package/lib/icon/style/icon.css +1 -0
- package/lib/icon/style/index.css +2058 -0
- package/lib/icon/style/index.js +9 -0
- package/lib/identify/index.js +1081 -0
- package/lib/identify/style/css.js +9 -0
- package/lib/identify/style/identify.css +1 -0
- package/lib/identify/style/index.js +9 -0
- package/lib/iframe/index.js +344 -0
- package/lib/iframe/style/css.js +7 -0
- package/lib/iframe/style/iframe.css +1 -0
- package/lib/iframe/style/index.js +7 -0
- package/lib/image/index.js +446 -0
- package/lib/image/style/css.js +7 -0
- package/lib/image/style/image.css +1 -0
- package/lib/image/style/index.js +7 -0
- package/lib/index.js +1040 -0
- package/lib/indicator/index.js +996 -0
- package/lib/indicator/style/countTo.css +1 -0
- package/lib/indicator/style/css.js +7 -0
- package/lib/indicator/style/index.js +7 -0
- package/lib/indicator/style/indicator.css +1 -0
- package/lib/init.js +207 -0
- package/lib/input/index.js +1151 -0
- package/lib/input/style/css.js +9 -0
- package/lib/input/style/index.css +2549 -0
- package/lib/input/style/index.js +9 -0
- package/lib/input/style/input.css +1 -0
- package/lib/input-number/index.js +739 -0
- package/lib/input-number/style/css.js +9 -0
- package/lib/input-number/style/index.css +2360 -0
- package/lib/input-number/style/index.js +9 -0
- package/lib/input-number/style/input-number.css +1 -0
- package/lib/layout/index.js +700 -0
- package/lib/layout/style/css.js +9 -0
- package/lib/layout/style/index.css +2185 -0
- package/lib/layout/style/index.js +9 -0
- package/lib/layout/style/layout.css +0 -0
- package/lib/liquid-fill/index.js +983 -0
- package/lib/liquid-fill/style/css.js +7 -0
- package/lib/liquid-fill/style/index.js +7 -0
- package/lib/liquid-fill/style/liquid-fill.css +1 -0
- package/lib/marker/index.js +649 -0
- package/lib/marker/style/css.js +0 -0
- package/lib/marker/style/index.js +0 -0
- package/lib/menu/index.js +858 -0
- package/lib/menu/style/css.js +9 -0
- package/lib/menu/style/index.css +2777 -0
- package/lib/menu/style/index.js +9 -0
- package/lib/menu/style/menu.css +0 -0
- package/lib/message/index.js +174 -0
- package/lib/message/style/css.js +9 -0
- package/lib/message/style/index.css +2143 -0
- package/lib/message/style/index.js +9 -0
- package/lib/message/style/message.css +1 -0
- package/lib/modal/index.js +742 -0
- package/lib/modal/style/css.js +9 -0
- package/lib/modal/style/index.css +2289 -0
- package/lib/modal/style/index.js +9 -0
- package/lib/modal/style/modal.css +1 -0
- package/lib/nav/style/css.js +9 -0
- package/lib/nav/style/index.js +9 -0
- package/lib/nav/style/nav.css +1 -0
- package/lib/notification/index.js +151 -0
- package/lib/notification/style/css.js +9 -0
- package/lib/notification/style/index.css +2285 -0
- package/lib/notification/style/index.js +9 -0
- package/lib/notification/style/notification.css +1 -0
- package/lib/pagination/index.js +352 -0
- package/lib/pagination/style/css.js +9 -0
- package/lib/pagination/style/index.css +2529 -0
- package/lib/pagination/style/index.js +9 -0
- package/lib/pagination/style/pagination.css +1 -0
- package/lib/popup/index.js +800 -0
- package/lib/popup/style/css.js +0 -0
- package/lib/popup/style/index.js +0 -0
- package/lib/progress/index.js +1146 -0
- package/lib/progress/style/css.js +9 -0
- package/lib/progress/style/index.css +2226 -0
- package/lib/progress/style/index.js +9 -0
- package/lib/progress/style/progress.css +1 -0
- package/lib/radio/index.js +852 -0
- package/lib/radio/style/css.js +9 -0
- package/lib/radio/style/index.css +2381 -0
- package/lib/radio/style/index.js +9 -0
- package/lib/radio/style/radio.css +1 -0
- package/lib/select/index.js +836 -0
- package/lib/select/style/css.js +9 -0
- package/lib/select/style/index.css +2655 -0
- package/lib/select/style/index.js +9 -0
- package/lib/select/style/select.css +1 -0
- package/lib/slider/index.js +347 -0
- package/lib/slider/style/css.js +9 -0
- package/lib/slider/style/index.css +2233 -0
- package/lib/slider/style/index.js +9 -0
- package/lib/slider/style/slider.css +1 -0
- package/lib/slideshow/index.js +913 -0
- package/lib/slideshow/style/css.js +9 -0
- package/lib/slideshow/style/index.js +9 -0
- package/lib/slideshow/style/slideshow.css +1 -0
- package/lib/spin/index.js +357 -0
- package/lib/spin/style/css.js +9 -0
- package/lib/spin/style/index.css +2268 -0
- package/lib/spin/style/index.js +9 -0
- package/lib/spin/style/spin.css +1 -0
- package/lib/steps/index.js +748 -0
- package/lib/steps/style/css.js +9 -0
- package/lib/steps/style/index.css +2724 -0
- package/lib/steps/style/index.js +9 -0
- package/lib/steps/style/steps.css +1 -0
- package/lib/style.js +7 -0
- package/lib/switch/index.js +654 -0
- package/lib/switch/style/css.js +9 -0
- package/lib/switch/style/index.css +2241 -0
- package/lib/switch/style/index.js +9 -0
- package/lib/switch/style/switch.css +1 -0
- package/lib/table/index.js +810 -0
- package/lib/table/style/css.js +9 -0
- package/lib/table/style/index.css +2909 -0
- package/lib/table/style/index.js +9 -0
- package/lib/table/style/table.css +1 -0
- package/lib/table-popup/index.js +438 -0
- package/lib/table-popup/style/css.js +9 -0
- package/lib/table-popup/style/index.js +9 -0
- package/lib/table-popup/style/table-popup.css +1 -0
- package/lib/tabs/index.js +743 -0
- package/lib/tabs/style/css.js +9 -0
- package/lib/tabs/style/index.css +2692 -0
- package/lib/tabs/style/index.js +9 -0
- package/lib/tabs/style/tabs.css +1 -0
- package/lib/text/index.js +434 -0
- package/lib/text/style/css.js +7 -0
- package/lib/text/style/index.js +7 -0
- package/lib/text/style/text.css +1 -0
- package/lib/tile-layer/index.js +535 -0
- package/lib/tile-layer/style/css.js +0 -0
- package/lib/tile-layer/style/index.js +0 -0
- package/lib/time-line/index.js +654 -0
- package/lib/time-line/style/css.js +7 -0
- package/lib/time-line/style/index.js +7 -0
- package/lib/time-line/style/time-line.css +1 -0
- package/lib/time-picker/index.js +669 -0
- package/lib/time-picker/style/css.js +9 -0
- package/lib/time-picker/style/index.css +2418 -0
- package/lib/time-picker/style/index.js +9 -0
- package/lib/time-picker/style/time-picker.css +1 -0
- package/lib/time-range/index.js +526 -0
- package/lib/time-range/style/css.js +7 -0
- package/lib/time-range/style/index.js +7 -0
- package/lib/time-range/style/time-range.css +1 -0
- package/lib/time-slider/index.js +1169 -0
- package/lib/time-slider/style/css.js +7 -0
- package/lib/time-slider/style/index.js +7 -0
- package/lib/time-slider/style/time-slider.css +1 -0
- package/lib/time-text/index.js +393 -0
- package/lib/time-text/style/css.js +7 -0
- package/lib/time-text/style/index.js +7 -0
- package/lib/time-text/style/time-text.css +1 -0
- package/lib/tooltip/index.js +635 -0
- package/lib/tooltip/style/css.js +9 -0
- package/lib/tooltip/style/index.css +2231 -0
- package/lib/tooltip/style/index.js +9 -0
- package/lib/tooltip/style/tooltip.css +0 -0
- package/lib/transfer/index.js +636 -0
- package/lib/transfer/style/css.js +9 -0
- package/lib/transfer/style/index.css +2302 -0
- package/lib/transfer/style/index.js +9 -0
- package/lib/transfer/style/transfer.css +1 -0
- package/lib/tree/index.js +857 -0
- package/lib/tree/style/css.js +9 -0
- package/lib/tree/style/index.css +2644 -0
- package/lib/tree/style/index.js +9 -0
- package/lib/tree/style/tree.css +1 -0
- package/lib/tree-select/index.js +765 -0
- package/lib/tree-select/style/css.js +9 -0
- package/lib/tree-select/style/index.css +2508 -0
- package/lib/tree-select/style/index.js +9 -0
- package/lib/tree-select/style/tree-select.css +1 -0
- package/lib/video-player/index.js +1472 -0
- package/lib/video-player/style/css.js +11 -0
- package/lib/video-player/style/index.js +11 -0
- package/lib/video-player/style/video-player.css +1 -0
- package/lib/web-map/index.js +2241 -0
- package/lib/web-map/style/css.js +15 -0
- package/lib/web-map/style/index.js +15 -0
- package/lib/web-map/style/web-map.css +1 -0
- package/package.json +97 -0
- package/src/common/_assets/iconfont/icon-sm-components.css +245 -0
- package/src/common/_assets/iconfont/icon-sm-components.eot +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.svg +197 -0
- package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/src/common/_lang/en.js +355 -0
- package/src/common/_lang/index.js +177 -0
- package/src/common/_lang/zh.js +342 -0
- package/src/common/_mixin/AntdRender.ts +114 -0
- package/src/common/_mixin/Card.ts +22 -0
- package/src/common/_mixin/Theme.ts +222 -0
- package/src/common/_mixin/ThirdService.ts +58 -0
- package/src/common/_mixin/Timer.ts +58 -0
- package/src/common/_mixin/VmUpdater.ts +46 -0
- package/src/common/_types/AddressMatchParameter.js +9 -0
- package/src/common/_types/GeoJSONParamter.ts +17 -0
- package/src/common/_types/RestDataParameter.js +8 -0
- package/src/common/_types/RestMapParameter.js +8 -0
- package/src/common/_types/RestParameter.js +12 -0
- package/src/common/_types/event/BaseTypes.js +24 -0
- package/src/common/_types/event/Event.js +315 -0
- package/src/common/_types/event/Events.js +353 -0
- package/src/common/_types/event/Pixel.js +177 -0
- package/src/common/_types/event/Util.js +173 -0
- package/src/common/_types/iPortalDataParameter.js +12 -0
- package/src/common/_types/iServerBaseParameter.ts +28 -0
- package/src/common/_types/iServerDataParameter.ts +13 -0
- package/src/common/_types/iServerMapParameter.ts +13 -0
- package/src/common/_utils/EchartsDataService.js +527 -0
- package/src/common/_utils/RestService.js +130 -0
- package/src/common/_utils/WebMapService.ts +1292 -0
- package/src/common/_utils/epsg-define.js +55 -0
- package/src/common/_utils/get-features.js +92 -0
- package/src/common/_utils/global-event.js +6 -0
- package/src/common/_utils/iPortalDataService.js +444 -0
- package/src/common/_utils/iServerRestService.js +487 -0
- package/src/common/_utils/statistics.js +36 -0
- package/src/common/_utils/style/color/colorPalette.ts +63 -0
- package/src/common/_utils/style/color/serialColors.ts +207 -0
- package/src/common/_utils/style/common/common.scss +39 -0
- package/src/common/_utils/style/mixins/config.scss +4 -0
- package/src/common/_utils/style/mixins/mixins.scss +48 -0
- package/src/common/_utils/style/theme/antd.less +2 -0
- package/src/common/_utils/style/theme/antdVar.less +371 -0
- package/src/common/_utils/style/theme/chart.js +548 -0
- package/src/common/_utils/style/theme/set-theme.ts +43 -0
- package/src/common/_utils/style/theme/theme.json +356 -0
- package/src/common/_utils/style/theme/theme.scss +495 -0
- package/src/common/_utils/util.js +251 -0
- package/src/common/_utils/vue-types/index.js +267 -0
- package/src/common/_utils/vue-types/utils.js +194 -0
- package/src/common/avatar/Avatar.vue +41 -0
- package/src/common/avatar/index.js +9 -0
- package/src/common/avatar/style/avatar.scss +8 -0
- package/src/common/avatar/style/index.js +4 -0
- package/src/common/avatar/style/index.less +3 -0
- package/src/common/border/Border.vue +121 -0
- package/src/common/border/assets/border.config.json +67 -0
- package/src/common/border/assets/image/border1.png +0 -0
- package/src/common/border/assets/image/border10.png +0 -0
- package/src/common/border/assets/image/border11.png +0 -0
- package/src/common/border/assets/image/border12.png +0 -0
- package/src/common/border/assets/image/border13.png +0 -0
- package/src/common/border/assets/image/border2.png +0 -0
- package/src/common/border/assets/image/border3.png +0 -0
- package/src/common/border/assets/image/border4.png +0 -0
- package/src/common/border/assets/image/border5.png +0 -0
- package/src/common/border/assets/image/border6.png +0 -0
- package/src/common/border/assets/image/border7.png +0 -0
- package/src/common/border/assets/image/border8.png +0 -0
- package/src/common/border/assets/image/border9.png +0 -0
- package/src/common/border/index.js +9 -0
- package/src/common/border/style/border.scss +19 -0
- package/src/common/border/style/index.js +4 -0
- package/src/common/breadcrumb/Breadcrumb.vue +21 -0
- package/src/common/breadcrumb/BreadcrumbItem.vue +21 -0
- package/src/common/breadcrumb/BreadcrumbSeparator.vue +19 -0
- package/src/common/breadcrumb/index.js +13 -0
- package/src/common/breadcrumb/style/breadcrumb.scss +21 -0
- package/src/common/breadcrumb/style/index.js +4 -0
- package/src/common/breadcrumb/style/index.less +3 -0
- package/src/common/button/Button.vue +34 -0
- package/src/common/button/Group.vue +31 -0
- package/src/common/button/index.js +11 -0
- package/src/common/button/style/button.scss +91 -0
- package/src/common/button/style/index.js +4 -0
- package/src/common/button/style/index.less +3 -0
- package/src/common/button/style/mixin.scss +56 -0
- package/src/common/card/Card.vue +32 -0
- package/src/common/card/Grid.vue +20 -0
- package/src/common/card/Meta.vue +20 -0
- package/src/common/card/index.js +13 -0
- package/src/common/card/style/card.scss +43 -0
- package/src/common/card/style/index.js +4 -0
- package/src/common/card/style/index.less +3 -0
- package/src/common/chart/ChartMixin.vue +1572 -0
- package/src/common/chart/index.js +9 -0
- package/src/common/chart/style/chart.scss +10 -0
- package/src/common/chart/style/index.js +5 -0
- package/src/common/checkbox/Checkbox.vue +37 -0
- package/src/common/checkbox/Group.vue +36 -0
- package/src/common/checkbox/index.js +11 -0
- package/src/common/checkbox/style/checkbox.scss +40 -0
- package/src/common/checkbox/style/index.js +4 -0
- package/src/common/checkbox/style/index.less +3 -0
- package/src/common/collapse/Collapse.vue +32 -0
- package/src/common/collapse/Panel.vue +26 -0
- package/src/common/collapse/index.js +11 -0
- package/src/common/collapse/style/collapse.scss +10 -0
- package/src/common/collapse/style/index.js +4 -0
- package/src/common/collapse/style/index.less +3 -0
- package/src/common/collapse-card/CollapseCard.vue +150 -0
- package/src/common/collapse-card/index.js +9 -0
- package/src/common/collapse-card/style/collapse-card.scss +176 -0
- package/src/common/collapse-card/style/index.js +4 -0
- package/src/common/color-picker/ColorPicker.vue +106 -0
- package/src/common/color-picker/index.js +9 -0
- package/src/common/color-picker/style/color-picker.scss +37 -0
- package/src/common/color-picker/style/index.js +4 -0
- package/src/common/config-provider/ConfigProvider.vue +31 -0
- package/src/common/config-provider/index.js +9 -0
- package/src/common/date-picker/BaseMixin.vue +23 -0
- package/src/common/date-picker/DatePicker.vue +20 -0
- package/src/common/date-picker/MonthPicker.vue +20 -0
- package/src/common/date-picker/RangePicker.vue +20 -0
- package/src/common/date-picker/WeekPicker.vue +20 -0
- package/src/common/date-picker/index.js +15 -0
- package/src/common/date-picker/style/date-picker.scss +290 -0
- package/src/common/date-picker/style/index.js +4 -0
- package/src/common/date-picker/style/index.less +3 -0
- package/src/common/date-picker/style/mixin.scss +75 -0
- package/src/common/dropdown/Dropdown.vue +31 -0
- package/src/common/dropdown/index.js +9 -0
- package/src/common/dropdown/style/dropdown.scss +22 -0
- package/src/common/dropdown/style/index.js +4 -0
- package/src/common/dropdown/style/index.less +3 -0
- package/src/common/empty/Empty.vue +26 -0
- package/src/common/empty/RenderEmpty.ts +50 -0
- package/src/common/empty/assets/image/empty.png +0 -0
- package/src/common/empty/index.js +9 -0
- package/src/common/empty/style/empty.scss +31 -0
- package/src/common/empty/style/index.js +4 -0
- package/src/common/empty/style/index.less +3 -0
- package/src/common/icon/Icon.vue +66 -0
- package/src/common/icon/index.js +9 -0
- package/src/common/icon/style/icon.scss +12 -0
- package/src/common/icon/style/index.js +4 -0
- package/src/common/icon/style/index.less +3 -0
- package/src/common/iframe/Iframe.vue +17 -0
- package/src/common/iframe/index.js +9 -0
- package/src/common/iframe/style/iframe.scss +7 -0
- package/src/common/iframe/style/index.js +4 -0
- package/src/common/image/Image.vue +83 -0
- package/src/common/image/index.js +9 -0
- package/src/common/image/style/image.scss +33 -0
- package/src/common/image/style/index.js +4 -0
- package/src/common/indicator/CountTo.vue +92 -0
- package/src/common/indicator/Indicator.vue +308 -0
- package/src/common/indicator/index.js +11 -0
- package/src/common/indicator/style/countTo.scss +7 -0
- package/src/common/indicator/style/index.js +4 -0
- package/src/common/indicator/style/indicator.scss +47 -0
- package/src/common/input/BaseMixin.vue +24 -0
- package/src/common/input/Group.vue +31 -0
- package/src/common/input/Input.vue +41 -0
- package/src/common/input/Password.vue +41 -0
- package/src/common/input/Search.vue +40 -0
- package/src/common/input/TextArea.vue +25 -0
- package/src/common/input/index.js +17 -0
- package/src/common/input/style/index.js +4 -0
- package/src/common/input/style/index.less +3 -0
- package/src/common/input/style/input.scss +72 -0
- package/src/common/input/style/mixin.scss +42 -0
- package/src/common/input-number/InputNumber.vue +44 -0
- package/src/common/input-number/index.js +9 -0
- package/src/common/input-number/style/index.js +4 -0
- package/src/common/input-number/style/index.less +3 -0
- package/src/common/input-number/style/input-number.scss +43 -0
- package/src/common/layout/Content.vue +25 -0
- package/src/common/layout/Footer.vue +25 -0
- package/src/common/layout/Header.vue +25 -0
- package/src/common/layout/Layout.vue +25 -0
- package/src/common/layout/Sider.vue +33 -0
- package/src/common/layout/index.js +17 -0
- package/src/common/layout/style/index.js +4 -0
- package/src/common/layout/style/index.less +3 -0
- package/src/common/layout/style/layout.scss +5 -0
- package/src/common/liquid-fill/LiquidFill.vue +209 -0
- package/src/common/liquid-fill/index.js +9 -0
- package/src/common/liquid-fill/style/index.js +4 -0
- package/src/common/liquid-fill/style/liquid-fill.scss +6 -0
- package/src/common/menu/Menu.vue +31 -0
- package/src/common/menu/MenuItem.vue +37 -0
- package/src/common/menu/SubMenu.vue +51 -0
- package/src/common/menu/index.js +13 -0
- package/src/common/menu/style/index.js +4 -0
- package/src/common/menu/style/index.less +3 -0
- package/src/common/menu/style/menu.scss +0 -0
- package/src/common/message/Message.js +12 -0
- package/src/common/message/index.js +3 -0
- package/src/common/message/style/index.js +4 -0
- package/src/common/message/style/index.less +3 -0
- package/src/common/message/style/message.scss +16 -0
- package/src/common/modal/Modal.vue +64 -0
- package/src/common/modal/index.js +9 -0
- package/src/common/modal/main.ts +49 -0
- package/src/common/modal/style/index.js +4 -0
- package/src/common/modal/style/index.less +3 -0
- package/src/common/modal/style/modal.scss +23 -0
- package/src/common/nav/Nav.vue +158 -0
- package/src/common/nav/assets/image/background_image.png +0 -0
- package/src/common/nav/assets/image/item_active.png +0 -0
- package/src/common/nav/index.js +9 -0
- package/src/common/nav/style/index.js +5 -0
- package/src/common/nav/style/nav.scss +55 -0
- package/src/common/notification/Notification.js +10 -0
- package/src/common/notification/index.js +3 -0
- package/src/common/notification/style/index.js +4 -0
- package/src/common/notification/style/index.less +3 -0
- package/src/common/notification/style/notification.scss +30 -0
- package/src/common/pagination/Pagination.vue +32 -0
- package/src/common/pagination/index.js +9 -0
- package/src/common/pagination/style/index.js +4 -0
- package/src/common/pagination/style/index.less +3 -0
- package/src/common/pagination/style/pagination.scss +131 -0
- package/src/common/progress/Progress.vue +98 -0
- package/src/common/progress/index.js +9 -0
- package/src/common/progress/style/index.js +4 -0
- package/src/common/progress/style/index.less +3 -0
- package/src/common/progress/style/progress.scss +43 -0
- package/src/common/radio/Button.vue +18 -0
- package/src/common/radio/Group.vue +48 -0
- package/src/common/radio/Radio.vue +36 -0
- package/src/common/radio/index.js +13 -0
- package/src/common/radio/style/index.js +4 -0
- package/src/common/radio/style/index.less +3 -0
- package/src/common/radio/style/radio.scss +127 -0
- package/src/common/select/OptGroup.vue +20 -0
- package/src/common/select/Option.vue +22 -0
- package/src/common/select/Select.vue +49 -0
- package/src/common/select/index.js +13 -0
- package/src/common/select/style/index.js +4 -0
- package/src/common/select/style/index.less +3 -0
- package/src/common/select/style/select.scss +140 -0
- package/src/common/slider/Slider.vue +31 -0
- package/src/common/slider/index.js +9 -0
- package/src/common/slider/style/index.js +4 -0
- package/src/common/slider/style/index.less +3 -0
- package/src/common/slider/style/slider.scss +8 -0
- package/src/common/slideshow/Slideshow.vue +354 -0
- package/src/common/slideshow/SlideshowItem.vue +17 -0
- package/src/common/slideshow/Swiper.js +29 -0
- package/src/common/slideshow/index.js +11 -0
- package/src/common/slideshow/style/index.js +5 -0
- package/src/common/slideshow/style/slideshow.scss +48 -0
- package/src/common/spin/Spin.vue +17 -0
- package/src/common/spin/index.js +9 -0
- package/src/common/spin/main.ts +13 -0
- package/src/common/spin/style/index.js +4 -0
- package/src/common/spin/style/index.less +3 -0
- package/src/common/spin/style/spin.scss +14 -0
- package/src/common/steps/Step.vue +33 -0
- package/src/common/steps/Steps.vue +39 -0
- package/src/common/steps/index.js +11 -0
- package/src/common/steps/style/index.js +4 -0
- package/src/common/steps/style/index.less +3 -0
- package/src/common/steps/style/mixin.scss +67 -0
- package/src/common/steps/style/steps.scss +98 -0
- package/src/common/switch/Switch.vue +41 -0
- package/src/common/switch/index.js +9 -0
- package/src/common/switch/style/index.js +4 -0
- package/src/common/switch/style/index.less +3 -0
- package/src/common/switch/style/switch.scss +20 -0
- package/src/common/table/Column.vue +18 -0
- package/src/common/table/ColumnGroup.vue +19 -0
- package/src/common/table/Table.vue +18 -0
- package/src/common/table/index.js +13 -0
- package/src/common/table/style/index.js +4 -0
- package/src/common/table/style/index.less +3 -0
- package/src/common/table/style/table.scss +138 -0
- package/src/common/table-popup/TablePopup.vue +73 -0
- package/src/common/table-popup/index.js +9 -0
- package/src/common/table-popup/style/index.js +5 -0
- package/src/common/table-popup/style/table-popup.scss +52 -0
- package/src/common/tabs/TabPane.vue +26 -0
- package/src/common/tabs/Tabs.vue +41 -0
- package/src/common/tabs/index.js +11 -0
- package/src/common/tabs/style/index.js +4 -0
- package/src/common/tabs/style/index.less +3 -0
- package/src/common/tabs/style/tabs.scss +95 -0
- package/src/common/text/Text.vue +69 -0
- package/src/common/text/index.js +9 -0
- package/src/common/text/style/index.js +4 -0
- package/src/common/text/style/text.scss +23 -0
- package/src/common/time-line/TimeLine.vue +260 -0
- package/src/common/time-line/index.js +9 -0
- package/src/common/time-line/style/index.js +4 -0
- package/src/common/time-line/style/time-line.scss +10 -0
- package/src/common/time-picker/TimePicker.vue +47 -0
- package/src/common/time-picker/index.js +9 -0
- package/src/common/time-picker/style/index.js +4 -0
- package/src/common/time-picker/style/index.less +3 -0
- package/src/common/time-picker/style/time-picker.scss +69 -0
- package/src/common/time-range/TimeRange.vue +122 -0
- package/src/common/time-range/index.js +9 -0
- package/src/common/time-range/style/index.js +4 -0
- package/src/common/time-range/style/time-range.scss +10 -0
- package/src/common/time-slider/TimeSlider.vue +591 -0
- package/src/common/time-slider/index.js +9 -0
- package/src/common/time-slider/style/index.js +4 -0
- package/src/common/time-slider/style/mixin.scss +36 -0
- package/src/common/time-slider/style/time-slider.scss +147 -0
- package/src/common/time-text/TimeText.vue +51 -0
- package/src/common/time-text/index.js +9 -0
- package/src/common/time-text/style/index.js +4 -0
- package/src/common/time-text/style/time-text.scss +14 -0
- package/src/common/tooltip/Tooltip.vue +21 -0
- package/src/common/tooltip/index.js +9 -0
- package/src/common/tooltip/style/index.js +4 -0
- package/src/common/tooltip/style/index.less +3 -0
- package/src/common/tooltip/style/tooltip.scss +5 -0
- package/src/common/transfer/Transfer.vue +19 -0
- package/src/common/transfer/index.js +9 -0
- package/src/common/transfer/style/index.js +4 -0
- package/src/common/transfer/style/index.less +3 -0
- package/src/common/transfer/style/transfer.scss +52 -0
- package/src/common/tree/DirectoryTree.vue +32 -0
- package/src/common/tree/Tree.vue +32 -0
- package/src/common/tree/TreeNode.vue +49 -0
- package/src/common/tree/index.js +13 -0
- package/src/common/tree/style/index.js +4 -0
- package/src/common/tree/style/index.less +3 -0
- package/src/common/tree/style/tree.scss +16 -0
- package/src/common/tree-select/TreeSelect.vue +43 -0
- package/src/common/tree-select/TreeSelectNode.vue +49 -0
- package/src/common/tree-select/index.js +11 -0
- package/src/common/tree-select/style/index.js +4 -0
- package/src/common/tree-select/style/index.less +3 -0
- package/src/common/tree-select/style/tree-select.scss +38 -0
- package/src/common/video-player/VideoPlayer.vue +423 -0
- package/src/common/video-player/index.js +9 -0
- package/src/common/video-player/style/index.js +5 -0
- package/src/common/video-player/style/video-player.scss +266 -0
- package/src/common/web-map/WebMapBase.ts +1178 -0
- package/src/common/web-map/config/MunicipalCenter.json +1 -0
- package/src/common/web-map/config/ProvinceCenter.json +1 -0
- package/src/image.d.ts +7 -0
- package/src/init.js +38 -0
- package/src/leaflet/README.md +31 -0
- package/src/leaflet/_mixin/GridLayer.js +33 -0
- package/src/leaflet/_mixin/Layer.js +26 -0
- package/src/leaflet/_mixin/Options.js +10 -0
- package/src/leaflet/_mixin/Popper.js +25 -0
- package/src/leaflet/_mixin/TileLayer.js +18 -0
- package/src/leaflet/_mixin/map-getter.ts +122 -0
- package/src/leaflet/_types/index.js +17 -0
- package/src/leaflet/_types/map-event.js +34 -0
- package/src/leaflet/_utils/props-binder.js +23 -0
- package/src/leaflet/chart/Chart.vue +25 -0
- package/src/leaflet/chart/ChartViewModel.js +44 -0
- package/src/leaflet/chart/index.js +9 -0
- package/src/leaflet/components.ts +206 -0
- package/src/leaflet/css.js +3 -0
- package/src/leaflet/entrys.json +106 -0
- package/src/leaflet/identify/Identify.vue +233 -0
- package/src/leaflet/identify/IdentifyViewModel.js +114 -0
- package/src/leaflet/identify/index.js +9 -0
- package/src/leaflet/identify/style/identify.scss +30 -0
- package/src/leaflet/identify/style/index.js +4 -0
- package/src/leaflet/index.ts +5 -0
- package/src/leaflet/leaflet-wrapper.js +125 -0
- package/src/leaflet/marker/Marker.vue +46 -0
- package/src/leaflet/marker/MarkerViewModel.js +31 -0
- package/src/leaflet/marker/index.js +9 -0
- package/src/leaflet/package.json +97 -0
- package/src/leaflet/popup/Popup.vue +93 -0
- package/src/leaflet/popup/PopupViewModel.js +75 -0
- package/src/leaflet/popup/index.js +9 -0
- package/src/leaflet/style.js +3 -0
- package/src/leaflet/style.scss +52 -0
- package/src/leaflet/web-map/WebMap.vue +213 -0
- package/src/leaflet/web-map/WebMapViewModel.ts +1102 -0
- package/src/leaflet/web-map/_mixin/map-events.ts +65 -0
- package/src/leaflet/web-map/index.js +9 -0
- package/src/leaflet/web-map/layer/tile/TileLayer.vue +88 -0
- package/src/leaflet/web-map/layer/tile/TileLayerViewModel.js +66 -0
- package/src/leaflet/web-map/layer/tile/index.js +9 -0
- package/src/leaflet/web-map/style/index.js +7 -0
- package/src/leaflet/web-map/style/web-map.scss +32 -0
- package/src/sfc.d.ts +50 -0
- package/src/vue-i18n.d.ts +26 -0
- package/src/vue-options.d.ts +18 -0
- package/static/libs/echarts-layer/EchartsLayer.js +390 -0
- package/static/libs/geostats/geostats.js +1227 -0
- package/static/libs/iclient-common/iclient-common.js +2 -0
- package/static/libs/iclient-leaflet/iclient-leaflet.min.css +8 -0
- package/static/libs/iclient-leaflet/iclient-leaflet.min.js +1741 -0
- package/static/libs/json-sql/jsonsql.js +125 -0
- package/tsconfig.json +43 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { registerProjection } from 'vue-iclient/src/common/_utils/epsg-define';
|
|
2
|
+
import { lang, setLocale, initi18n } from 'vue-iclient/src/common/_lang/index';
|
|
3
|
+
import * as commontypes from 'vue-iclient/src/leaflet/_types/index';
|
|
4
|
+
import { setTheme } from 'vue-iclient/src/common/_utils/style/theme/set-theme';
|
|
5
|
+
|
|
6
|
+
/** common */
|
|
7
|
+
import { default as Avatar } from 'vue-iclient/src/common/avatar/index.js';
|
|
8
|
+
import { default as Border } from 'vue-iclient/src/common/border/index.js';
|
|
9
|
+
import { default as Breadcrumb } from 'vue-iclient/src/common/breadcrumb/index.js';
|
|
10
|
+
import { default as Button } from 'vue-iclient/src/common/button/index.js';
|
|
11
|
+
import { default as Card } from 'vue-iclient/src/common/card/index.js';
|
|
12
|
+
import { default as Checkbox } from 'vue-iclient/src/common/checkbox/index.js';
|
|
13
|
+
import { default as Collapse } from 'vue-iclient/src/common/collapse/index.js';
|
|
14
|
+
import { default as CollapseCard } from 'vue-iclient/src/common/collapse-card/index.js';
|
|
15
|
+
import { default as ColorPicker } from 'vue-iclient/src/common/color-picker/index.js';
|
|
16
|
+
import { default as DatePicker } from 'vue-iclient/src/common/date-picker/index.js';
|
|
17
|
+
import { default as Dropdown } from 'vue-iclient/src/common/dropdown/index.js';
|
|
18
|
+
import { default as Empty } from 'vue-iclient/src/common/empty/index.js';
|
|
19
|
+
import { default as Icon } from 'vue-iclient/src/common/icon/index.js';
|
|
20
|
+
import { default as Iframe } from 'vue-iclient/src/common/iframe/index.js';
|
|
21
|
+
import { default as Image } from 'vue-iclient/src/common/image/index.js';
|
|
22
|
+
import { default as Indicator } from 'vue-iclient/src/common/indicator/index.js';
|
|
23
|
+
import { default as Input } from 'vue-iclient/src/common/input/index.js';
|
|
24
|
+
import { default as InputNumber } from 'vue-iclient/src/common/input-number/index.js';
|
|
25
|
+
import { default as Layout } from 'vue-iclient/src/common/layout/index.js';
|
|
26
|
+
import { default as LiquidFill } from 'vue-iclient/src/common/liquid-fill/index.js';
|
|
27
|
+
import { default as Menu } from 'vue-iclient/src/common/menu/index.js';
|
|
28
|
+
import { default as Message } from 'vue-iclient/src/common/message/index.js';
|
|
29
|
+
import { default as Modal } from 'vue-iclient/src/common/modal/index.js';
|
|
30
|
+
import { default as Notification } from 'vue-iclient/src/common/notification/index.js';
|
|
31
|
+
import { default as Pagination } from 'vue-iclient/src/common/pagination/index.js';
|
|
32
|
+
import { default as Progress } from 'vue-iclient/src/common/progress/index.js';
|
|
33
|
+
import { default as Radio } from 'vue-iclient/src/common/radio/index.js';
|
|
34
|
+
import { default as Select } from 'vue-iclient/src/common/select/index.js';
|
|
35
|
+
import { default as Slider } from 'vue-iclient/src/common/slider/index.js';
|
|
36
|
+
import { default as Slideshow } from 'vue-iclient/src/common/slideshow/index.js';
|
|
37
|
+
import { default as Spin } from 'vue-iclient/src/common/spin/index.js';
|
|
38
|
+
import { default as Steps } from 'vue-iclient/src/common/steps/index.js';
|
|
39
|
+
import { default as Switch } from 'vue-iclient/src/common/switch/index.js';
|
|
40
|
+
import { default as Table } from 'vue-iclient/src/common/table/index.js';
|
|
41
|
+
import { default as TablePopup } from 'vue-iclient/src/common/table-popup/index.js';
|
|
42
|
+
import { default as Tabs } from 'vue-iclient/src/common/tabs/index.js';
|
|
43
|
+
import { default as Text } from 'vue-iclient/src/common/text/index.js';
|
|
44
|
+
import { default as TimeLine } from 'vue-iclient/src/common/time-line/index.js';
|
|
45
|
+
import { default as TimeRange } from 'vue-iclient/src/common/time-range/index.js';
|
|
46
|
+
import { default as TimeSlider } from 'vue-iclient/src/common/time-slider/index.js';
|
|
47
|
+
import { default as TimeText } from 'vue-iclient/src/common/time-text/index.js';
|
|
48
|
+
import { default as TimePicker } from 'vue-iclient/src/common/time-picker/index.js';
|
|
49
|
+
import { default as Tooltip } from 'vue-iclient/src/common/tooltip/index.js';
|
|
50
|
+
import { default as Transfer } from 'vue-iclient/src/common/transfer/index.js';
|
|
51
|
+
import { default as Tree } from 'vue-iclient/src/common/tree/index.js';
|
|
52
|
+
import { default as TreeSelect } from 'vue-iclient/src/common/tree-select/index.js';
|
|
53
|
+
import { default as VideoPlayer } from 'vue-iclient/src/common/video-player/index.js';
|
|
54
|
+
|
|
55
|
+
/** layer */
|
|
56
|
+
import { default as TileLayer } from 'vue-iclient/src/leaflet/web-map/layer/tile/index.js';
|
|
57
|
+
|
|
58
|
+
import { default as Chart } from 'vue-iclient/src/leaflet/chart/index.js';
|
|
59
|
+
import { default as Identify } from 'vue-iclient/src/leaflet/identify/index.js';
|
|
60
|
+
import { default as Marker } from 'vue-iclient/src/leaflet/marker/index.js';
|
|
61
|
+
import { default as Popup } from 'vue-iclient/src/leaflet/popup/index.js';
|
|
62
|
+
import { default as WebMap } from 'vue-iclient/src/leaflet/web-map/index.js';
|
|
63
|
+
|
|
64
|
+
const components = {
|
|
65
|
+
Avatar,
|
|
66
|
+
Border,
|
|
67
|
+
Breadcrumb,
|
|
68
|
+
Button,
|
|
69
|
+
Card,
|
|
70
|
+
Checkbox,
|
|
71
|
+
Collapse,
|
|
72
|
+
CollapseCard,
|
|
73
|
+
ColorPicker,
|
|
74
|
+
DatePicker,
|
|
75
|
+
Dropdown,
|
|
76
|
+
Empty,
|
|
77
|
+
Icon,
|
|
78
|
+
Iframe,
|
|
79
|
+
Image,
|
|
80
|
+
Indicator,
|
|
81
|
+
Input,
|
|
82
|
+
InputNumber,
|
|
83
|
+
Layout,
|
|
84
|
+
LiquidFill,
|
|
85
|
+
Menu,
|
|
86
|
+
Message,
|
|
87
|
+
Modal,
|
|
88
|
+
Notification,
|
|
89
|
+
Pagination,
|
|
90
|
+
Progress,
|
|
91
|
+
Radio,
|
|
92
|
+
Select,
|
|
93
|
+
Slider,
|
|
94
|
+
Slideshow,
|
|
95
|
+
Spin,
|
|
96
|
+
Steps,
|
|
97
|
+
Switch,
|
|
98
|
+
Table,
|
|
99
|
+
TablePopup,
|
|
100
|
+
Tabs,
|
|
101
|
+
Text,
|
|
102
|
+
TimeLine,
|
|
103
|
+
TimeRange,
|
|
104
|
+
TimeSlider,
|
|
105
|
+
TimeText,
|
|
106
|
+
TimePicker,
|
|
107
|
+
Tooltip,
|
|
108
|
+
Transfer,
|
|
109
|
+
Tree,
|
|
110
|
+
TreeSelect,
|
|
111
|
+
VideoPlayer,
|
|
112
|
+
Chart,
|
|
113
|
+
Identify,
|
|
114
|
+
Marker,
|
|
115
|
+
Popup,
|
|
116
|
+
WebMap,
|
|
117
|
+
TileLayer
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const install = function (Vue, opts: any = {}) {
|
|
121
|
+
Vue.prototype.$message = components.Message;
|
|
122
|
+
Vue.prototype.$notification = components.Notification;
|
|
123
|
+
Vue.prototype.$info = (components.Modal as any).info;
|
|
124
|
+
Vue.prototype.$success = (components.Modal as any).success;
|
|
125
|
+
Vue.prototype.$error = (components.Modal as any).error;
|
|
126
|
+
Vue.prototype.$warning = (components.Modal as any).warning;
|
|
127
|
+
Vue.prototype.$confirm = (components.Modal as any).confirm;
|
|
128
|
+
Vue.prototype.$destroyAll = (components.Modal as any).destroyAll;
|
|
129
|
+
for (let component in components) {
|
|
130
|
+
if (!['Notification', 'Message'].includes(component)) {
|
|
131
|
+
const com = components[component];
|
|
132
|
+
Vue.use(com, opts);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
137
|
+
install(window.Vue, {
|
|
138
|
+
theme: 'light'
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
setTheme,
|
|
143
|
+
commontypes,
|
|
144
|
+
lang,
|
|
145
|
+
initi18n,
|
|
146
|
+
registerProjection,
|
|
147
|
+
Message as message,
|
|
148
|
+
Notification as notification,
|
|
149
|
+
Avatar,
|
|
150
|
+
Border,
|
|
151
|
+
Breadcrumb,
|
|
152
|
+
Button,
|
|
153
|
+
Card,
|
|
154
|
+
Checkbox,
|
|
155
|
+
Collapse,
|
|
156
|
+
CollapseCard,
|
|
157
|
+
ColorPicker,
|
|
158
|
+
DatePicker,
|
|
159
|
+
Dropdown,
|
|
160
|
+
Empty,
|
|
161
|
+
Icon,
|
|
162
|
+
Iframe,
|
|
163
|
+
Image,
|
|
164
|
+
Indicator,
|
|
165
|
+
Input,
|
|
166
|
+
InputNumber,
|
|
167
|
+
Layout,
|
|
168
|
+
LiquidFill,
|
|
169
|
+
Menu,
|
|
170
|
+
Modal,
|
|
171
|
+
Pagination,
|
|
172
|
+
Progress,
|
|
173
|
+
Radio,
|
|
174
|
+
Select,
|
|
175
|
+
Slider,
|
|
176
|
+
Slideshow,
|
|
177
|
+
Spin,
|
|
178
|
+
Steps,
|
|
179
|
+
Switch,
|
|
180
|
+
Table,
|
|
181
|
+
TablePopup,
|
|
182
|
+
Tabs,
|
|
183
|
+
Text,
|
|
184
|
+
TimeLine,
|
|
185
|
+
TimeRange,
|
|
186
|
+
TimeSlider,
|
|
187
|
+
TimeText,
|
|
188
|
+
Tooltip,
|
|
189
|
+
Transfer,
|
|
190
|
+
Tree,
|
|
191
|
+
TreeSelect,
|
|
192
|
+
VideoPlayer,
|
|
193
|
+
Chart,
|
|
194
|
+
Identify,
|
|
195
|
+
Marker,
|
|
196
|
+
Popup,
|
|
197
|
+
WebMap,
|
|
198
|
+
TileLayer
|
|
199
|
+
};
|
|
200
|
+
export default {
|
|
201
|
+
setTheme,
|
|
202
|
+
commontypes,
|
|
203
|
+
lang,
|
|
204
|
+
locale: setLocale,
|
|
205
|
+
install
|
|
206
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"init": "vue-iclient/src/init.js",
|
|
3
|
+
"avatar": "vue-iclient/src/common/avatar/index.js",
|
|
4
|
+
"border": "vue-iclient/src/common/border/index.js",
|
|
5
|
+
"breadcrumb": "vue-iclient/src/common/breadcrumb/index.js",
|
|
6
|
+
"button": "vue-iclient/src/common/button/index.js",
|
|
7
|
+
"card": "vue-iclient/src/common/card/index.js",
|
|
8
|
+
"checkbox": "vue-iclient/src/common/checkbox/index.js",
|
|
9
|
+
"collapse": "vue-iclient/src/common/collapse/index.js",
|
|
10
|
+
"collapse-card": "vue-iclient/src/common/collapse-card/index.js",
|
|
11
|
+
"color-picker": "vue-iclient/src/common/color-picker/index.js",
|
|
12
|
+
"date-picker": "vue-iclient/src/common/date-picker/index.js",
|
|
13
|
+
"dropdown": "vue-iclient/src/common/dropdown/index.js",
|
|
14
|
+
"empty": "vue-iclient/src/common/empty/index.js",
|
|
15
|
+
"icon": "vue-iclient/src/common/icon/index.js",
|
|
16
|
+
"iframe": "vue-iclient/src/common/iframe/index.js",
|
|
17
|
+
"image": "vue-iclient/src/common/image/index.js",
|
|
18
|
+
"indicator": "vue-iclient/src/common/indicator/index.js",
|
|
19
|
+
"input": "vue-iclient/src/common/input/index.js",
|
|
20
|
+
"input-number": "vue-iclient/src/common/input-number/index.js",
|
|
21
|
+
"layout": "vue-iclient/src/common/layout/index.js",
|
|
22
|
+
"liquid-fill": "vue-iclient/src/common/liquid-fill/index.js",
|
|
23
|
+
"menu": "vue-iclient/src/common/menu/index.js",
|
|
24
|
+
"message": "vue-iclient/src/common/message/index.js",
|
|
25
|
+
"modal": "vue-iclient/src/common/modal/index.js",
|
|
26
|
+
"notification": "vue-iclient/src/common/notification/index.js",
|
|
27
|
+
"pagination": "vue-iclient/src/common/pagination/index.js",
|
|
28
|
+
"progress": "vue-iclient/src/common/progress/index.js",
|
|
29
|
+
"radio": "vue-iclient/src/common/radio/index.js",
|
|
30
|
+
"select": "vue-iclient/src/common/select/index.js",
|
|
31
|
+
"slider": "vue-iclient/src/common/slider/index.js",
|
|
32
|
+
"slideshow": "vue-iclient/src/common/slideshow/index.js",
|
|
33
|
+
"spin": "vue-iclient/src/common/spin/index.js",
|
|
34
|
+
"steps": "vue-iclient/src/common/steps/index.js",
|
|
35
|
+
"switch": "vue-iclient/src/common/switch/index.js",
|
|
36
|
+
"table": "vue-iclient/src/common/table/index.js",
|
|
37
|
+
"table-popup": "vue-iclient/src/common/table-popup/index.js",
|
|
38
|
+
"tabs": "vue-iclient/src/common/tabs/index.js",
|
|
39
|
+
"text": "vue-iclient/src/common/text/index.js",
|
|
40
|
+
"time-line": "vue-iclient/src/common/time-line/index.js",
|
|
41
|
+
"time-range": "vue-iclient/src/common/time-range/index.js",
|
|
42
|
+
"time-slider": "vue-iclient/src/common/time-slider/index.js",
|
|
43
|
+
"time-text": "vue-iclient/src/common/time-text/index.js",
|
|
44
|
+
"time-picker": "vue-iclient/src/common/time-picker/index.js",
|
|
45
|
+
"tooltip": "vue-iclient/src/common/tooltip/index.js",
|
|
46
|
+
"transfer": "vue-iclient/src/common/transfer/index.js",
|
|
47
|
+
"tree": "vue-iclient/src/common/tree/index.js",
|
|
48
|
+
"tree-select": "vue-iclient/src/common/tree-select/index.js",
|
|
49
|
+
"video-player": "vue-iclient/src/common/video-player/index.js",
|
|
50
|
+
"chart": "vue-iclient/src/leaflet/chart/index.js",
|
|
51
|
+
"identify": "vue-iclient/src/leaflet/identify/index.js",
|
|
52
|
+
"marker": "vue-iclient/src/leaflet/marker/index.js",
|
|
53
|
+
"popup": "vue-iclient/src/leaflet/popup/index.js",
|
|
54
|
+
"web-map": "vue-iclient/src/leaflet/web-map/index.js",
|
|
55
|
+
"tile-layer": "vue-iclient/src/leaflet/web-map/layer/tile/index.js",
|
|
56
|
+
"_mixin/AntdRender": "vue-iclient/src/common/_mixin/AntdRender.ts",
|
|
57
|
+
"_mixin/Card": "vue-iclient/src/common/_mixin/Card.ts",
|
|
58
|
+
"_mixin/Theme": "vue-iclient/src/common/_mixin/Theme.ts",
|
|
59
|
+
"_mixin/ThirdService": "vue-iclient/src/common/_mixin/ThirdService.ts",
|
|
60
|
+
"_mixin/Timer": "vue-iclient/src/common/_mixin/Timer.ts",
|
|
61
|
+
"_mixin/VmUpdater": "vue-iclient/src/common/_mixin/VmUpdater.ts",
|
|
62
|
+
"_mixin/WebMapBase": "vue-iclient/src/common/web-map/WebMapBase.ts",
|
|
63
|
+
"_mixin/GridLayer": "vue-iclient/src/leaflet/_mixin/GridLayer.js",
|
|
64
|
+
"_mixin/Layer": "vue-iclient/src/leaflet/_mixin/Layer.js",
|
|
65
|
+
"_mixin/map-getter": "vue-iclient/src/leaflet/_mixin/map-getter.ts",
|
|
66
|
+
"_mixin/Options": "vue-iclient/src/leaflet/_mixin/Options.js",
|
|
67
|
+
"_mixin/Popper": "vue-iclient/src/leaflet/_mixin/Popper.js",
|
|
68
|
+
"_mixin/TileLayer": "vue-iclient/src/leaflet/_mixin/TileLayer.js",
|
|
69
|
+
"_mixin/map-events": "vue-iclient/src/leaflet/web-map/_mixin/map-events.ts",
|
|
70
|
+
"_lang/en": "vue-iclient/src/common/_lang/en.js",
|
|
71
|
+
"_lang/index": "vue-iclient/src/common/_lang/index.js",
|
|
72
|
+
"_lang/zh": "vue-iclient/src/common/_lang/zh.js",
|
|
73
|
+
"_types/AddressMatchParameter": "vue-iclient/src/common/_types/AddressMatchParameter.js",
|
|
74
|
+
"_types/GeoJSONParamter": "vue-iclient/src/common/_types/GeoJSONParamter.ts",
|
|
75
|
+
"_types/iPortalDataParameter": "vue-iclient/src/common/_types/iPortalDataParameter.js",
|
|
76
|
+
"_types/iServerBaseParameter": "vue-iclient/src/common/_types/iServerBaseParameter.ts",
|
|
77
|
+
"_types/iServerDataParameter": "vue-iclient/src/common/_types/iServerDataParameter.ts",
|
|
78
|
+
"_types/iServerMapParameter": "vue-iclient/src/common/_types/iServerMapParameter.ts",
|
|
79
|
+
"_types/RestDataParameter": "vue-iclient/src/common/_types/RestDataParameter.js",
|
|
80
|
+
"_types/RestMapParameter": "vue-iclient/src/common/_types/RestMapParameter.js",
|
|
81
|
+
"_types/RestParameter": "vue-iclient/src/common/_types/RestParameter.js",
|
|
82
|
+
"_types/event/BaseTypes": "vue-iclient/src/common/_types/event/BaseTypes.js",
|
|
83
|
+
"_types/event/Event": "vue-iclient/src/common/_types/event/Event.js",
|
|
84
|
+
"_types/event/Events": "vue-iclient/src/common/_types/event/Events.js",
|
|
85
|
+
"_types/event/Pixel": "vue-iclient/src/common/_types/event/Pixel.js",
|
|
86
|
+
"_types/event/Util": "vue-iclient/src/common/_types/event/Util.js",
|
|
87
|
+
"_utils/EchartsDataService": "vue-iclient/src/common/_utils/EchartsDataService.js",
|
|
88
|
+
"_utils/epsg-define": "vue-iclient/src/common/_utils/epsg-define.js",
|
|
89
|
+
"_utils/get-features": "vue-iclient/src/common/_utils/get-features.js",
|
|
90
|
+
"_utils/global-event": "vue-iclient/src/common/_utils/global-event.js",
|
|
91
|
+
"_utils/iPortalDataService": "vue-iclient/src/common/_utils/iPortalDataService.js",
|
|
92
|
+
"_utils/iServerRestService": "vue-iclient/src/common/_utils/iServerRestService.js",
|
|
93
|
+
"_utils/RestService": "vue-iclient/src/common/_utils/RestService.js",
|
|
94
|
+
"_utils/statistics": "vue-iclient/src/common/_utils/statistics.js",
|
|
95
|
+
"_utils/util": "vue-iclient/src/common/_utils/util.js",
|
|
96
|
+
"_utils/WebMapService": "vue-iclient/src/common/_utils/WebMapService.ts",
|
|
97
|
+
"_utils/vue-types/index": "vue-iclient/src/common/_utils/vue-types/index.js",
|
|
98
|
+
"_utils/vue-types/utils": "vue-iclient/src/common/_utils/vue-types/utils.js",
|
|
99
|
+
"_utils/style/theme/chart": "vue-iclient/src/common/_utils/style/theme/chart.js",
|
|
100
|
+
"_utils/style/theme/set-theme": "vue-iclient/src/common/_utils/style/theme/set-theme.ts",
|
|
101
|
+
"_utils/style/color/colorPalette": "vue-iclient/src/common/_utils/style/color/colorPalette.ts",
|
|
102
|
+
"_utils/style/color/serialColors": "vue-iclient/src/common/_utils/style/color/serialColors.ts",
|
|
103
|
+
"_types/index": "vue-iclient/src/leaflet/_types/index.js",
|
|
104
|
+
"_types/map-event": "vue-iclient/src/leaflet/_types/map-event.js",
|
|
105
|
+
"_utils/props-binder": "vue-iclient/src/leaflet/_utils/props-binder.js"
|
|
106
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul v-show="false" ref="Popup" :style="[getTextColorStyle]" :class="['sm-component-identify']">
|
|
3
|
+
<li v-for="(value, key, index) in popupProps" :key="index" class="sm-component-identify__body">
|
|
4
|
+
<div class="sm-component-identify__left" :title="key">{{ key }}</div>
|
|
5
|
+
<div class="sm-component-identify__right" :title="value">{{ value }}</div>
|
|
6
|
+
</li>
|
|
7
|
+
</ul>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import MapGetter from 'vue-iclient/src/leaflet/_mixin/map-getter';
|
|
12
|
+
import Theme from 'vue-iclient/src/common/_mixin/Theme';
|
|
13
|
+
import IdentifyViewModel from './IdentifyViewModel';
|
|
14
|
+
import isEqual from 'lodash.isequal';
|
|
15
|
+
import { getFeatureCenter } from 'vue-iclient/src/common/_utils/util';
|
|
16
|
+
import Message from 'vue-iclient/src/common/message/index.js';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: 'SmIdentify',
|
|
20
|
+
mixins: [MapGetter, Theme],
|
|
21
|
+
props: {
|
|
22
|
+
layerNames: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default() {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
fields: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default() {
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
layerStyle: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default() {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
popupProps: {},
|
|
44
|
+
layers: [],
|
|
45
|
+
layerType: false,
|
|
46
|
+
popupLayers: []
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
watch: {
|
|
50
|
+
layerNames(val, oldval) {
|
|
51
|
+
if (val && !isEqual(val, oldval)) {
|
|
52
|
+
this.$options.removed.call(this);
|
|
53
|
+
this.setLayers();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
getBackground() {
|
|
57
|
+
this.changeStyle();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
loaded() {
|
|
61
|
+
this.setViewModel();
|
|
62
|
+
this.setLayers();
|
|
63
|
+
},
|
|
64
|
+
removed() {
|
|
65
|
+
// 清除点击事件和popup
|
|
66
|
+
this.popupLayers &&
|
|
67
|
+
this.popupLayers.forEach(layer => {
|
|
68
|
+
layer.closePopup();
|
|
69
|
+
layer.off('click');
|
|
70
|
+
layer.off('popupclose');
|
|
71
|
+
});
|
|
72
|
+
this.layers &&
|
|
73
|
+
this.layers.forEach(layer => {
|
|
74
|
+
layer.off('click');
|
|
75
|
+
});
|
|
76
|
+
// 清除高亮的图层
|
|
77
|
+
this.viewModel && this.viewModel.removed();
|
|
78
|
+
// 重置
|
|
79
|
+
this.popupLayers = [];
|
|
80
|
+
this.layers = [];
|
|
81
|
+
},
|
|
82
|
+
beforeDestroy() {
|
|
83
|
+
this.$options.removed.call(this);
|
|
84
|
+
},
|
|
85
|
+
methods: {
|
|
86
|
+
setViewModel() {
|
|
87
|
+
this.viewModel = new IdentifyViewModel(this.map, {
|
|
88
|
+
mapTarget: this.getTargetName(),
|
|
89
|
+
layerNames: this.layerNames,
|
|
90
|
+
layerStyle: this.layerStyle
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
// 通过layerName设置layers
|
|
94
|
+
setLayers() {
|
|
95
|
+
// 重置layers
|
|
96
|
+
this.layers = [];
|
|
97
|
+
this.layerNames.forEach(layerName => {
|
|
98
|
+
let layer = this.getLayerByName(layerName);
|
|
99
|
+
layer && this.layers.push(layer);
|
|
100
|
+
});
|
|
101
|
+
if (this.layers && this.layers.length > 0) {
|
|
102
|
+
this.layers.forEach(layer => {
|
|
103
|
+
let layerType = this.viewModel.getLayerType(layer);
|
|
104
|
+
this.bindLayerClick(layer, layerType);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
// 通过layerName获取layer
|
|
109
|
+
getLayerByName(layerName) {
|
|
110
|
+
let layer = this.viewModel.getLayerByName(layerName);
|
|
111
|
+
if (!layer) {
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
Message.error(this.$t('identify.layerNotExit', { layer: layerName }));
|
|
114
|
+
}
|
|
115
|
+
return layer;
|
|
116
|
+
},
|
|
117
|
+
// 给选中图层绑定click
|
|
118
|
+
bindLayerClick(layer, layerType) {
|
|
119
|
+
if (layerType) {
|
|
120
|
+
// 如果是geojson
|
|
121
|
+
this.bindGeojsonLayer(layer);
|
|
122
|
+
} else if (layer.TFEvents) {
|
|
123
|
+
// 如果是客户端专题图
|
|
124
|
+
this.bindThemeLayer(layer);
|
|
125
|
+
} else {
|
|
126
|
+
// 如果是其他的图层(marker,polygon,polyline,隐藏的客户端专题图)
|
|
127
|
+
this.bindOtherLayer(layer);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
// geojsonlayer绑定click事件
|
|
131
|
+
bindGeojsonLayer(geojsonLayer) {
|
|
132
|
+
geojsonLayer.on('click', e => {
|
|
133
|
+
// e.layer是被选中的某个要素
|
|
134
|
+
this.bindPopupLayer(e.layer.feature, e.layer);
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
// 给客户端专题图绑定click事件
|
|
138
|
+
bindThemeLayer(themeLayer) {
|
|
139
|
+
themeLayer.on('click', e => {
|
|
140
|
+
if (e.target && e.target.refDataID) {
|
|
141
|
+
let themeFeature = themeLayer.getFeatureById(e.target.refDataID);
|
|
142
|
+
// 将矢量要素转换成geojson
|
|
143
|
+
let feature = this.viewModel.formatGeoJSON(themeFeature);
|
|
144
|
+
// 因为线坐标等要素不准确,所以用地图的点击的坐标点
|
|
145
|
+
this.bindPopupLayer(feature, themeLayer);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
// 其他layer(layergroup等)绑定click事件
|
|
150
|
+
bindOtherLayer(otherLayer) {
|
|
151
|
+
if (otherLayer._layers) {
|
|
152
|
+
for (let key in otherLayer._layers) {
|
|
153
|
+
let layer = otherLayer._layers[key];
|
|
154
|
+
if (layer.TFEvents) {
|
|
155
|
+
// 说明是客户端专题图
|
|
156
|
+
this.bindThemeLayer(otherLayer._layers[key]);
|
|
157
|
+
} else if (this.viewModel.getLayerType(layer)) {
|
|
158
|
+
this.bindGeojsonLayer(layer);
|
|
159
|
+
} else {
|
|
160
|
+
// 普通图层
|
|
161
|
+
let popupLayer;
|
|
162
|
+
let feature;
|
|
163
|
+
layer.on('click', e => {
|
|
164
|
+
// geojson点线面图层marker,image-marker、 RANK_SYMBOL:等级符号专题图(返回的是layergroup);
|
|
165
|
+
let coordinates =
|
|
166
|
+
(e.sourceTarget && e.sourceTarget._point && this.map.layerPointToLatLng(e.sourceTarget._point)) ||
|
|
167
|
+
(e.target && e.target._latlng) ||
|
|
168
|
+
e.latlng;
|
|
169
|
+
feature = {
|
|
170
|
+
type: 'Feature',
|
|
171
|
+
properties: coordinates,
|
|
172
|
+
geometry: { type: 'Point', coordinates: [coordinates.lng, coordinates.lat] }
|
|
173
|
+
};
|
|
174
|
+
e.sourceTarget.feature = feature;
|
|
175
|
+
popupLayer = e.sourceTarget;
|
|
176
|
+
this.bindPopupLayer(feature, popupLayer);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
// 绑定popup
|
|
183
|
+
bindPopupLayer(feature, popupLayer) {
|
|
184
|
+
if (!feature) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
this.filterFeature(feature);
|
|
188
|
+
const latlng = (getFeatureCenter(feature) || []).reverse();
|
|
189
|
+
this.$nextTick(() => {
|
|
190
|
+
// 这个定时器是避免和专题图的点击事件(要清空popup)冲突
|
|
191
|
+
setTimeout(() => {
|
|
192
|
+
let popupDom = this.$refs.Popup;
|
|
193
|
+
popupDom.style.display = 'block';
|
|
194
|
+
popupLayer.bindPopup(popupDom);
|
|
195
|
+
popupLayer.openPopup(latlng);
|
|
196
|
+
// popupclose(点击地图的时候,清除最后一次的高亮)
|
|
197
|
+
popupLayer.on('popupclose', () => this.viewModel.removed());
|
|
198
|
+
if (!popupLayer.feature) {
|
|
199
|
+
popupLayer.feature = feature;
|
|
200
|
+
}
|
|
201
|
+
this.viewModel.addOverlayToMap(popupLayer, feature, this.layerStyle);
|
|
202
|
+
this.popupLayers.push(popupLayer);
|
|
203
|
+
}, 0);
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
// 过滤用户传入的字段
|
|
207
|
+
filterFeature(feature) {
|
|
208
|
+
// 重置popupProps
|
|
209
|
+
this.popupProps = {};
|
|
210
|
+
if (feature.properties) {
|
|
211
|
+
// 过滤字段
|
|
212
|
+
if (this.fields.length > 0) {
|
|
213
|
+
this.fields.forEach(field => {
|
|
214
|
+
if (Object.prototype.hasOwnProperty.call(feature.properties, field)) {
|
|
215
|
+
this.popupProps[field] = feature.properties[field];
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
} else {
|
|
219
|
+
// 默认是读取layer的全部字段
|
|
220
|
+
this.popupProps = feature.properties;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
// 根据主题改变样式
|
|
225
|
+
changeStyle() {
|
|
226
|
+
const wrapper = document.querySelector('.leaflet-popup-content-wrapper');
|
|
227
|
+
const tip = document.querySelector('.leaflet-popup-tip');
|
|
228
|
+
wrapper && (wrapper.style.background = this.getBackground);
|
|
229
|
+
tip && (tip.style.background = this.getBackground);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
</script>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import L from 'vue-iclient/src/leaflet/leaflet-wrapper';
|
|
2
|
+
import 'vue-iclient/static/libs/iclient-leaflet/iclient-leaflet.min';
|
|
3
|
+
import cloneDeep from 'lodash.clonedeep';
|
|
4
|
+
/**
|
|
5
|
+
* @class IdentifyViewModel
|
|
6
|
+
* @description 点选 viewModel.
|
|
7
|
+
* @param {Object} map - map 对象。
|
|
8
|
+
* @param {String} [options.layerName] - 图层名。
|
|
9
|
+
* @param {Object} [options.layerStyle] - 查询结果图层样式配置。
|
|
10
|
+
* @extends L.Evented
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export default class IdentifyViewModel extends L.Evented {
|
|
14
|
+
constructor(map, options) {
|
|
15
|
+
super();
|
|
16
|
+
this.map = map;
|
|
17
|
+
this.layerNames = options.layerNames;
|
|
18
|
+
this.layerStyle = options.layerStyle || {};
|
|
19
|
+
this.popup = null;
|
|
20
|
+
this.lastLayerName = '';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @function IdentifyViewModel.prototype.getLayerByName
|
|
25
|
+
* @desc 获取。
|
|
26
|
+
* @param {Array} name - 图层名。
|
|
27
|
+
*/
|
|
28
|
+
getLayerByName(name) {
|
|
29
|
+
return this.map.getLayerByName(name);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @function IdentifyViewModel.prototype.getLayerById
|
|
34
|
+
* @desc 获取。
|
|
35
|
+
* @param {Array} id - 图层名。
|
|
36
|
+
*/
|
|
37
|
+
getLayerById(id) {
|
|
38
|
+
return this.map.getLayerById(id);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @function IdentifyViewModel.prototype.getLayerType
|
|
43
|
+
* @desc 判断是否是geojson
|
|
44
|
+
* @param {Array} layer - 图层名。
|
|
45
|
+
*/
|
|
46
|
+
getLayerType(layer) {
|
|
47
|
+
return layer instanceof L.GeoJSON;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @function IdentifyViewModel.prototype.addOverlayToMap
|
|
52
|
+
* @desc 添加高亮图层。
|
|
53
|
+
* @param {Object} layer - layer。
|
|
54
|
+
* @param {Object} feature - geojson
|
|
55
|
+
* @param {Object} customStyle - 用户自定义样式
|
|
56
|
+
*/
|
|
57
|
+
addOverlayToMap(layer, feature, customStyle = this.layerStyle) {
|
|
58
|
+
// 高亮前,清除之前的高亮
|
|
59
|
+
this.lastLayerName && this.removed(this.lastLayerName);
|
|
60
|
+
// 默认样式
|
|
61
|
+
let defaultStyle = {
|
|
62
|
+
color: '#409eff',
|
|
63
|
+
fillColor: '#409eff',
|
|
64
|
+
fillOpacity: 1,
|
|
65
|
+
opacity: 0.6,
|
|
66
|
+
renderer: L.svg()
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// new layer
|
|
70
|
+
let styleOptions = Object.assign(cloneDeep(layer.options), defaultStyle, customStyle);
|
|
71
|
+
let overlayer;
|
|
72
|
+
let type = feature.geometry.type;
|
|
73
|
+
if (type === 'Point' || type === 'MultiPoint') {
|
|
74
|
+
let geoCoordinates = cloneDeep(feature.geometry.coordinates);
|
|
75
|
+
overlayer = L.circleMarker(geoCoordinates.reverse(), styleOptions);
|
|
76
|
+
} else {
|
|
77
|
+
overlayer = L.geoJSON(feature, {
|
|
78
|
+
style: function() {
|
|
79
|
+
return styleOptions;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 上图,记录图层名
|
|
85
|
+
this.map.addLayer(overlayer, layer.name + '-SM-highlighted');
|
|
86
|
+
this.lastLayerName = layer.name;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @function IdentifyViewModel.prototype.removed
|
|
91
|
+
* @desc 将客户端专题图的矢量要素转换成geojson。
|
|
92
|
+
* @param {Object} themeFeature - themeFeature。
|
|
93
|
+
*/
|
|
94
|
+
formatGeoJSON(themeFeature) {
|
|
95
|
+
let formatObj = new SuperMap.Format.GeoJSON();
|
|
96
|
+
let serverGeometry = SuperMap.ServerGeometry.fromGeometry(themeFeature.geometry);
|
|
97
|
+
let geojson = formatObj.toGeoJSON(serverGeometry);
|
|
98
|
+
geojson.properties = themeFeature.attributes;
|
|
99
|
+
return geojson;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @function IdentifyViewModel.prototype.removed
|
|
104
|
+
* @desc 清除高亮图层。
|
|
105
|
+
* @param {String} lastLayerName - 图层名。
|
|
106
|
+
*/
|
|
107
|
+
removed(lastLayerName = this.lastLayerName) {
|
|
108
|
+
// 移除高亮图层
|
|
109
|
+
if (lastLayerName && this.getLayerByName(lastLayerName + '-SM-highlighted')) {
|
|
110
|
+
this.map.removeLayer(this.getLayerByName(lastLayerName + '-SM-highlighted'));
|
|
111
|
+
this.lastLayerName = '';
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|