UNPKG

@ykcl/smart-ui-oversea

Version:

A Component Library for Vue.js.

1,472 lines (1,428 loc) 87.5 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/dist/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 186); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier /* server only */, shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functional component in vue file var originalRender = options.render options.render = function renderWithStyleInjection(h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } /***/ }), /***/ 100: /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABeCAYAAACq0qNuAAAAAXNSR0IArs4c6QAAEKpJREFUeF7tmwtwXNV5x79zH3v3rV3JK3llPSxZkm3JeoCNIUPADjUxJhAIg8g0TafTFPB7XAgJGdIk605bSJkaE+zQ0NAh0/KYiEBjHNIAptjOJGDqYEuWTGuBhWx5ZcnS6rG72t177zmdc869q5UwZCPdsEx912PfkXTuOfbv/O///31n1wjsV0EIoIKsai8KNvgCicAGb4MvEIECLWsr3gZfIAIFWtZWvA2+QAQKtKyteBt8gQgUaFlb8Tb4AhEo0LK24m3wBSJQoGVtxdvgC0SgQMvairfBF4hAgZa1FW+DLxCBAi1rK94GXyACBVrWVrwNvkAECrSsrXgbfIEIFGhZW/E2+AIRKNCytuI/BjwhhPFBCBGr98cGDwAm4HzgWrUJlwz4XPXOBh2JRBBAhHHvaepAW0IhVFVbvyYaPZ949crLj0AkApFIJKt6K+D/vwOfr3ojEUAUcju0Q3f3GwjWAkT/14fC595Hn1n/Ga861vNkQ0PdF5AofePpp97fC7AWRyLA4F/y4C8GebZ6Tfto7G4nXNURpurG7hCKlvtQOOhEo4MKKvadRRMxBSU8jqwYK8cOf76hvmZ9ka/oZwSh8TcPrzlK4V9S4POBPFu9sXPvo0ZohGh5itvEUQBYCRA750QLSyhsCaHMiBB3yWiZ58KCkFta6fU6Gs9Hz60cOHumdXT0QtXqK68SV11xBQ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2C9mcDKtEV2cwqWSDxNHCQvAtDKOww0rSc8wkD9WAM4LzO+52RLF0zWo3QRjtYqs6i5EZOWvb1n4nFNxXAMAsYymd6sq7kyk1BPnx9SuXx2PvSdhWadKppCx6MSpDCYUMpG8OJ6KEk3y4TCDfJKklVIcbpgkPcNryScZgJ9q8NMBS+3ml3JaKXWWyIJjfEoTr2oIBI/2jY7SyiKtuohDGSdYVDARXVjJ6IRIKYxHfXjCr5KwYxKDJ4SzftzEIVv5QdE/Jsg/dO55K94ET6+fi7whNpT7HO6k6EC+KQEmqM24cNJ9gQQkF4ec6CcrVi/TR+I5odc0TOiHSvk7Op8+P/5DoeYz3hLw06rnXh92lIj0w6DjiQzRloVw8SUO+WIbYRn4XOXfcUeHQBuSmaF3aSg5H7UzEvkOtMdZS8AGby3PvGezweeNytqBNnhreeY9mw0+b1TWDrTBW8sz79ls8HmjsnagDd5annnPZoPPG5W1A23w1vLMezYbfN6orB1og7eWZ96z2eDzRmXtQBu8tTzzns0Gnzcqawfa4K3lmfdsNvi8UVk70AZvLc+8Z7PB543K2oE2eGt55j2bDT5vVNYOtMFbyzPv2WzweaOydqAN3lqeec9mg88blbUDbfDW8sx7Nht83qisHWiDt5Zn3rPZ4PNGZe3A/wNkuVbmcrbYkwAAAABJRU5ErkJggg==" /***/ }), /***/ 101: /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACBBJREFUaEPNWn1wVFcVP+e+9/IBAUJKgUlNye4mAcRKEauNlLgfgZpapiC+ZndTtLbTojMOWuuA2qmmOu2U1spU/6AfMx0sw+6mK6USNEqzHwOBVG3tVCdTyGZ3A7GhDW2AEEiy2XePc1fD0OTt7suSIdl/77nnnN+75+v+7iJMwa/DqhblyVIlKFK0smXfQJfVtZUxKFOU5G/K/urvj9ncjwMDzbS26mlsbOQxh+vzRVoytjDsH7xW85irgt4ND88aGjqnWFr9F6I212YONA9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hNPJh3KUPL1svb0ZdaIrnQyPXeqJaMJubZ/YM6BdBT/pHLgamExbnzBLn8VOSQsYW+boCSNvqEZBSWSlRPGLUFvONNrTU4nMN6JLrv7+wzpvHI5uT9Tz8jkfK/VtWBYgq9x4p9UBJtajAKdEgDizx6XLw3cagn62kFVWfxjpQEYj4vSK07nP9VqwWfuXDHi7+jA287OVsTgJaoKjhSvAeD5wmEBYFSGZcq5wX+WvqN/ocoGKmsSZ1Mg1kW5NcmLb9E0KBEz+qk73PO1PHoUEM4B4WICPmgJ+p7oUNW8Wf3yXQnO40tDTe8Z0Z1N5r/PbiZtQCmBzwAAAABJRU5ErkJggg==" /***/ }), /***/ 186: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external "vue-slider-component" var external_vue_slider_component_ = __webpack_require__(42); var external_vue_slider_component_default = /*#__PURE__*/__webpack_require__.n(external_vue_slider_component_); // EXTERNAL MODULE: external "vue-slider-component/theme/default.css" var default_css_ = __webpack_require__(46); // EXTERNAL MODULE: ./packages/table/src/store/current.js var current = __webpack_require__(43); // CONCATENATED MODULE: ./packages/routebook-multi/src/mapStyle.js /* harmony default export */ var mapStyle = ({ styleJson: [{ 'featureType': 'land', 'elementType': 'geometry', 'stylers': { 'color': '#fcfcfc' } }, { 'featureType': 'water', 'elementType': 'geometry', 'stylers': { 'color': '#d5e2f8' } }, { 'featureType': 'label', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#585d99' } }, { 'featureType': 'highway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'highway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#94ad79ff' } }, { 'featureType': 'nationalway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'arterial', 'elementType': 'geometry.fill', 'stylers': { 'color': '#d4e2c6ff' } }, { 'featureType': 'cityhighway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#d4e2c6ff' } }, { 'featureType': 'provincialway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#d4e2c6ff' } }, { 'featureType': 'provincialway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'tertiaryway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#ffffffff' } }, { 'featureType': 'tertiaryway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'fourlevelway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#ffffffff' } }, { 'featureType': 'fourlevelway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'subway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'railway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'highwaysign', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'highwaysign', 'elementType': 'labels.icon', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'nationalwaysign', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'nationalwaysign', 'elementType': 'labels.icon', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'provincialwaysign', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'provincialwaysign', 'elementType': 'labels.icon', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'tertiarywaysign', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'tertiarywaysign', 'elementType': 'labels.icon', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'subwaylabel', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'subwaylabel', 'elementType': 'labels.icon', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'nationalway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#94ad79ff' } }, { 'featureType': 'cityhighway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'arterial', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#b5caa0ff' } }, { 'featureType': 'highway', 'stylers': { 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'stylers': { 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'stylers': { 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'stylers': { 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'highway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'stylers': { 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'stylers': { 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'stylers': { 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'stylers': { 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'nationalway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'provincialway', 'stylers': { 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '8-9' } }, { 'featureType': 'provincialway', 'stylers': { 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '8-9' } }, { 'featureType': 'provincialway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '8-9' } }, { 'featureType': 'provincialway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '8-9' } }, { 'featureType': 'provincialway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '8-9' } }, { 'featureType': 'provincialway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '8-9' } }, { 'featureType': 'cityhighway', 'stylers': { 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'stylers': { 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'stylers': { 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'stylers': { 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '6', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '7', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '8', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'cityhighway', 'elementType': 'labels', 'stylers': { 'visibility': 'off', 'level': '9', 'curZoomRegionId': '0', 'curZoomRegion': '6-9' } }, { 'featureType': 'entertainment', 'elementType': 'geometry', 'stylers': { 'color': '#e4f0d7ff' } }, { 'featureType': 'manmade', 'elementType': 'geometry', 'stylers': { 'color': '#effcf0ff' } }, { 'featureType': 'education', 'elementType': 'geometry', 'stylers': { 'color': '#e3f7e4ff' } }, { 'featureType': 'building', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#a1cfa4ff' } }, { 'featureType': 'poilabel', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'poilabel', 'elementType': 'labels.icon', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'education', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#7a7a7aff' } }, { 'featureType': 'education', 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#ffffffff' } }, { 'featureType': 'education', 'elementType': 'labels.text', 'stylers': { 'fontsize': '26' } }, { 'featureType': 'manmade', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#afafafff' } }, { 'featureType': 'manmade', 'elementType': 'labels.text', 'stylers': { 'fontsize': '26' } }, { 'featureType': 'scenicspotslabel', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#376b6dff' } }, { 'featureType': 'scenicspots', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'scenicspotslabel', 'elementType': 'labels', 'stylers': { 'visibility': 'on' } }, { 'featureType': 'scenicspotslabel', 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#ffffffff', 'weight': '4' } }, { 'featureType': 'country', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#376b6dff' } }, { 'featureType': 'country', 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#ffffffff', 'weight': '3' } }, { 'featureType': 'water', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#ffffffff' } }, { 'featureType': 'water', 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#ffffff00' } }, { 'featureType': 'water', 'elementType': 'labels.text', 'stylers': { 'fontsize': '24' } }] }); // CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@15.11.1@vue-loader/lib??vue-loader-options!./packages/routebook-multi/src/main.vue?vue&type=script&lang=js // // import BMap from 'BMap' var BMap = null; var ComplexCustomOverlay = null; /* harmony default export */ var mainvue_type_script_lang_js = ({ name: "YkRoutebookMulti", components: { VueSlider: external_vue_slider_component_default.a }, props: { longitudeKey: { type: String, default: "lon" }, latitudeKey: { type: String, default: "lat" }, initPoint: { // 初始化中心点位置。如果points有数据。就取第一个 type: Object, default: function _default() { return { lon: 116.403984, lat: 39.914034 }; } }, height: { type: String, default: "600px" }, /* * point格式{lat: , lng: , color: } * */ points: { type: Array, default: function _default() { return []; }, required: true }, pointsArr: { // 地图打点,停留点,事件点等 type: Array, default: function _default() { return []; } }, pointsColor: { type: String, default: "#DD425A" }, play: { // 播放状态 type: Boolean, default: false }, zoom: { // 地图缩放等级 type: Number, default: 6 }, speed: { // 倍数 type: Number, default: 1 }, speedArr: { type: Array, default: function _default() { return [1, 2, 5, 10, 20, 50, 100]; } }, speedBase: { // 速度 type: Number, default: 100 }, lineWidth: { // 路径线宽度 type: Number, default: 4 }, progress: { // 进度 type: Number, default: 0 }, direction: { // Icon偏离角度 type: Number, default: -60 }, showPoints: Boolean, // 是否显示途经点 showMarkerBg: { type: Boolean, default: false }, // 是否显示标记点的背景图 poylineClickable: { type: Boolean, default: false }, // 是否开启轨迹线点击功能,点击后车辆和轨迹进度条跟随 popcardPosition: { type: String, default: 'auto' }, // 弹窗位置 auto:随着地图移动 fixed:固定在点的上方 triggerType: { type: String, default: "hover" }, //弹窗触发事件 hover-鼠标经过;click-鼠标点击 multiPopCard: { type: Boolean, default: false }, // 弹窗同时存在的个数 false-单个;true 多个 showInfoWin: { // 始终显示infoWindow(如果设置了landmarkPois,必须为true,两者只能生效一个) type: Boolean, default: false }, autoCenter: { // 实时刷新中心点。 type: Boolean, default: true }, colorsArrResource: { type: Array, default: function _default() { return [ // 速度颜色数组 { key: "#F4D035", name: "0~30km/h", min: 0, max: 30 }, { key: "#4CAF50", name: "30~60km/h", min: 30, max: 60 }, { key: "#2E63FD", name: "60~80km/h", min: 60, max: 80 }, { key: "#5D3FE4", name: "80~100km/h", min: 80, max: 100 }, { key: "#DD425A", name: ">100km/h", min: 100 }]; } }, ctrlIcons: { type: Object, default: function _default() { return { left: __webpack_require__(93), play: { active: __webpack_require__(94), inactive: __webpack_require__(95) }, right: __webpack_require__(96) }; } } }, data: function data() { return { map: null, startIndex: 0, car: null, timeId: null, angle: 60, // 旋转角度 myCompOverlay: null, myPopOverlay: null, showInfoWindow: this.showInfoWin, // 是否显示info弹窗 curPlay: this.play, // 播放状态 curProgress: 0, // 当前播放进度 curSpeed: 1, // 倍数 parsedPoints: [], // 处理点分组 value: 0, pointsBMap: [], pointOverlays: [], pointPopCards: [], newZIndex: 1, currentPopCardIndex: null // 当面操作的弹窗的默认索引 }; }, computed: { beginEndTime: function beginEndTime() { return this.points.length > 0 ? { startTime: this.points[0].reportTime, endTime: this.points[this.points.length - 1].reportTime } : {}; }, colorsArr: function colorsArr() { return this.colorsArrResource.filter(function (item) { return item.min > 0 || item.max > 0; }); } }, watch: { play: function play(newv) { this.curPlay = newv; if (newv) { if (!this.car) this.$emit("update:play", false);else this.start(); } else { this.pause(); } }, pointsArr: function pointsArr(newVal) { // console.log("新的数据源", newVal); if (this.showPoints) this.initPoints(); }, points: function points(newv) { // console.log("newv", newv); this.clearMap(); this.initLinesArr(); // this.initLine() // let lon = this.points.length > 0 ? this.points[0].lon : this.initPoint.lon // let lat = this.points.length > 0 ? this.points[0].lat : this.initPoint.lat if (this.points.length > 0) { this.initCar(this.points[0][this.longitudeKey], this.points[0][this.latitudeKey]); // 画车 this.initStartEndPoint(); // 画开始结束的点 } }, curSpeed: function curSpeed() { if (this.timeId) this.start(); }, curProgress: function curProgress(newv) { if (this.points.length > 0) { this.startIndex = newv; if (newv < 0) { this.startIndex = 0; } if (newv < this.points.length - 1) { this.angle = Number(this.points[this.startIndex].direction) + this.direction; } else { this.startIndex = this.points.length - 1; } this.initCar(this.points[this.startIndex][this.longitudeKey], this.points[this.startIndex][this.latitudeKey]); } }, colorsArr: function colorsArr(newv) { this.parsedPoints = []; // 清空已有数组 this.pointsBMap.forEach(function (item) { item.enableMassClear(); }); if (this.points.length > 0) { this.initLinesArr(); } }, showPoints: function showPoints(newv) { if (newv && this.pointsArr.length > 0) this.initPoints();else { this.map.clearOverlays(); } } }, mounted: function mounted() { BMap = window.BMap; ComplexCustomOverlay = function ComplexCustomOverlay(point, el) { this._point = point; this._div = el; }; ComplexCustomOverlay.prototype = new BMap.Overlay(); ComplexCustomOverlay.prototype.initialize = function (map) { this._map = map; // console.log('labelPane',map.getPanes().labelPane); map.getPanes().labelPane.appendChild(this._div); return this._div; }; ComplexCustomOverlay.prototype.draw = function () { var map = this._map; var pixel = map.pointToOverlayPixel(this._point); /* 获取地图东北与西南角*/ var NorthEast = map.getBounds().getNorthEast(); // 东北 - 上右 var SouthWest = map.getBounds().getSouthWest(); // 西南 - 下左 var o = 32; // 距离边缘和小车的偏移值 // console.log('this._div.offsetWidth',this._div.offsetWidth,pixel.x ); var offsetLeft = this._div.offsetWidth / 2; var offsetTop = this._div.offsetHeight + o; var lng = void 0, lat = void 0; if (this.popcardPosition === 'auto') { var northEastX = map.pointToOverlayPixel(NorthEast).x; var northEastY = map.pointToOverlayPixel(NorthEast).y; if (pixel.x + this._div.offsetWidth >= northEastX) { // console.log('到右边了') lng = NorthEast.lng; lat = this._point.lat; offsetLeft = -this._div.offsetWidth - o; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); } if (pixel.y - this._div.offsetHeight - o <= northEastY) { // console.log('到上边了') lng = this._point.lng; lat = NorthEast.lat; offsetTop = -30; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); } // 超出下边/左边范围 if (this._point.lng < SouthWest.lng || this._point.lat < SouthWest.lat) { // console.log('左下') lng = this._point.lng < SouthWest.lng ? SouthWest.lng : this._point.lng; lat = this._point.lat < SouthWest.lat ? SouthWest.lat : this._point.lat; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); if (this._point.lng < SouthWest.lng) { offsetLeft = o; } } if (this._point.lat > NorthEast.lat) { // console.log('上.....') lng = this._point.lng; lat = NorthEast.lat; offsetTop = -o; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); } if (this._point.lng < SouthWest.lng && this._point.lat > NorthEast.lat) { // console.log('左上。。。。') lng = SouthWest.lng; lat = NorthEast.lat; offsetTop = -o; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); } if (pixel.y - this._div.offsetHeight - o <= northEastY && pixel.x + this._div.offsetWidth >= northEastX) { // console.log('上右') lng = NorthEast.lng; lat = NorthEast.lat; offsetLeft = -this._div.offsetWidth - o; offsetTop = -o; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); } if (pixel.x + this._div.offsetWidth >= northEastX && this._point.lat < SouthWest.lat) { // console.log('右下角') lng = NorthEast.lng; lat = SouthWest.lat; offsetLeft = -this._div.offsetWidth - o; pixel = map.pointToOverlayPixel(new BMap.Point(lng, lat)); } } this._div.style.left = pixel.x - offsetLeft + "px"; this._div.style.top = pixel.y - offsetTop + "px"; }; ComplexCustomOverlay.prototype.setZIndex = function (zindex) { // console.log('设置overlay的zindex',zindex); this._div.style.zIndex = zindex; }; this.initMap(); this.curSpeed = this.speedArr[0]; }, methods: { initMap: function initMap() { var that = this; var map = new BMap.Map(this.$refs.mapInner, { enableMapClick: false, minZoom: 6, maxZoom: 18 }); map.enableScrollWheelZoom(new BMap.Point(this.points[0] ? this.points[0][this.longitudeKey] : this.initPoint[this.longitudeKey] || this.initPoint.lon, this.points[0] ? this.points[0][this.latitudeKey] : this.initPoint[this.latitudeKey] || this.initPoint.lat), this.zoom); map.centerAndZoom(new BMap.Point(this.points[0] ? this.points[0][this.longitudeKey] : this.initPoint[this.longitudeKey] || this.initPoint.lon, this.points[0] ? this.points[0][this.latitudeKey] : this.initPoint[this.latitudeKey] || this.initPoint.lat), this.zoom); this.map = map; if (this.points.length > 0) { this.clearMap(); this.initLinesArr(); this.initLine(); this.initCar(this.points[0][this.longitudeKey], this.points[0][this.latitudeKey]); // 画车 this.initStartEndPoint(); // 画开始结束的点 } this.map.setMapStyle(mapStyle); this.map.addEventListener("zoomend", function () { that.initInfoWindow("zoomend"); }); }, // 根据索引控制打点的显示隐藏 togglePoint: function togglePoint(index) { var position = new BMap.Point(this.pointsArr[index][this.longitudeKey], this.pointsArr[index][this.latitudeKey]); // console.log('toggle得到的positon', position); if (this.triggerType === "hover") { this.handlePopCard(position, index); } else if (this.triggerType === "click") { this.handlePopCard(position, index); // 单个模式下,隐藏当前索引对应的弹窗 // console.log('this.currentPopCardIndex', this.currentPopCardIndex,index); if (!this.multiPopCard && this.showInfoWin && this.currentPopCardIndex !== null && this.currentPopCardIndex !== index) { // console.log('执行关闭'); this.pointPopCards[this.currentPopCardIndex].hide(); } this.currentPopCardIndex = index; } // 移动地图中心点到当前点 this.map.panTo(position); }, initPoints: function initPoints() { var _this2 = this; var _this = this; // 如果已存在打点,清空原先的打点 // console.log('this.pointOverlays',this.pointOverlays); if (this.pointOverlays.length > 0) { this.pointOverlays.forEach(function (item) { // console.log('已存在打点,清空',item.pointMarkerBg); item.pointMarker && _this2.map.removeOverlay(item.pointMarker); item.pointMarkerBg && _this2.map.removeOverlay(item.pointMarkerBg); }); } this.pointOverlays = []; // 清空所有已存在弹窗 if (this.pointPopCards.length > 0) { this.pointPopCards.forEach(function (item) { // console.log('已存在弹窗,清空',item); item && _this2.map.removeOverlay(item); }); } this.pointPopCards = []; // 地图打点 this.pointsArr.forEach(function (item, index) { var pointOverlay = {}; var p = new BMap.Point(item[_this2.longitudeKey], item[_this2.latitudeKey]); var pointMarker = new BMap.Marker(p, { icon: new BMap.Icon(__webpack_require__(97), new BMap.Size(32, 32)) }); pointMarker.setZIndex(99); // 处理鼠标事件-弹窗 // 处理单个显示和多个显示弹窗, 默认是单个显示 if (_this2.triggerType === "hover") { pointMarker.addEventListener("mouseover", function (e) { var point = e.currentTarget; _this.handlePopCard(point.getPosition(), index); // _this.$emit("clickPoint", item); }); // 单个模式下,鼠标离开隐藏当前弹窗 if (!_this2.multiPopCard && _this2.showInfoWin) { pointMarker.addEventListener("mouseout", function (e) { _this.pointPopCards[index].hide(); }); } } else if (_this2.triggerType === "click") { pointMarker.addEventListener("click", function (e) { var point = e.currentTarget; _this.handlePopCard(point.getPosition(), index); // 单个模式下,隐藏当前索引对应的弹窗 // console.log('_this.currentPopCardIndex', _this.currentPopCardIndex,index); if (!_this.multiPopCard && this.showInfoWin && _this.currentPopCardIndex !== null && _this.currentPopCardIndex !== index) { // console.log('执行关闭'); _this.pointPopCards[_this.currentPopCardIndex].hide(); } _this.currentPopCardIndex = index; // _this.$emit("clickPoint", item); }); } pointOverlay.pointMarker = pointMarker; _this2.map.addOverlay(pointMarker); // console.log('判断是否存在pointOverlays[index]',this.pointOverlays[index]); if (_this2.pointOverlays[index]) { _this2.$set(_this2.pointOverlays[index], 'pointMarker', pointMarker); } else { _this2.pointOverlays[index] = { pointMarker: pointMarker }; } }); }, initLinesArr: function initLinesArr() { var _this3 = this; // 初始化分段数组 this.points.forEach(function (item) { var speed = parseInt(item.speed); for (var i = 0; i < _this3.colorsArr.length; i++) { var element = _this3.colorsArr[i]; if (element.max ? speed < element.max && speed > element.min : speed > element.min) { _this3.pushData(element.min, item, element); } else if (element.min === 0 && element.max === 0) { _this3.pushData(element.min, item, _this3.colorsArr[i + 1]); } } }); this.initLine(); }, pushData: function pushData(tag, value, color) { if (this.parsedPoints.length === 0 || this.parsedPoints[this.parsedPoints.length - 1].tag !== tag) { this.parsedPoints.push({ tag: tag, color: color.key, points: [] }); } this.parsedPoints[this.parsedPoints.length - 1].points.push(value); }, initLine: function initLine() { var _this4 = this; // 清除已有的线 var allLines = this.map.getOverlays(); allLines.forEach(function (item) { _this4.map.removeOverlay(item); }); // console.log("initLine", allLines); // 画轨迹 // 画不同颜色的路线 this.parsedPoints.forEach(function (item, index, arr) { // 解决断点情况。每个首尾相连 if (index + 1 < arr.length) { item.points.push(arr[index + 1].points[0]); } var polyLine = new BMap.Polyline(item.points.map(function (it) { return new BMap.Point(it[_this4.longitudeKey], it[_this4.latitudeKey]); }), { strokeColor: item.color, // 设置颜色 strokeWeight: _this4.lineWidth, // 宽度 strokeOpacity: 1 }); polyLine.disableMassClear(); _this4.pointsBMap.push(polyLine); _this4.map.addOverlay(polyLine); // 增加点击轨迹显示小车以及相应进度条的功能 if (_this4.poylineClickable) { polyLine.addEventListener('click', function (res) { // 获取点击的经纬度 var dot = res.point; var index = 0; var dist = 0; // 获取距离最近的一个点 拿到点的下标 // console.log('点击了轨迹',dot); for (var i = 0; i < item.points.length; i++) { var e = item.points[i]; var newDist = _this4.getGreatCircleDistance(dot.lat, dot.lng, e.latitude, e.longitude); if (dist === 0) dist = newDist; if (dist > newDist) { dist = newDist; index = i; } } var _index = item.points[index].indexKey; // 设置小车位置 _this4.curProgress = _this4.startIndex = _index; // this.CHANGE_PLAY_INDEX(this.play_index, 0); // console.log('this.points[_index]',_index,item.points[index]) var lng = _this4.points[_index][_this4.longitudeKey]; var lat = _this4.points[_index][_this4.latitudeKey]; _this4.angle = Number(_this4.points[_index].direction) + _this4.direction; _this4.initCar(lng, lat); _this4.pause(); }); } }); // 添加途经点 if (this.pointsArr.length > 0 && this.showPoints) this.initPoints(); console.timeEnd(); }, // 两个经纬度计算距离 getGreatCircleDistance: function getGreatCircleDistance(lat1, lng1, lat2, lng2) { var PI = Math.PI; function getRad(d) { return d * PI / 180.0; } var radLat1 = getRad(lat1); var radLat2 = getRad(lat2); var a = radLat1 - radLat2; var b = getRad(lng1) - getRad(lng2); var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))); s = s * 6378.137; // EARTH_RADIUS; s = Math.round(s * 10000) / 10000; return s; }, initStartEndPoint: function initStartEndPoint() { var startIcon = new BMap.Icon(__webpack_require__(98), new BMap.Size(40, 40)); var endIcon = new BMap.Icon(__webpack_require__(99), new BMap.Size(40, 40)); var startPoint = new BMap.Point(this.points[0][this.longitudeKey], this.points[0][this.latitudeKey]); var start = new BMap.Marker(startPoint, { icon: startIcon }); var endPoint = new BMap.Point(this.points[this.points.length - 1][this.longitudeKey], this.points[this.points.length - 1][this.latitudeKey]); var end = new BMap.Marker(endPoint, { icon: endIcon }); start.disableMassClear(); end.disableMassClear(); this.map.addOverlay(start); this.map.addOverlay(end); }, initCar: function initCar(lng, lat) { this.car && this.map.removeOverlay(this.car); var that = this; // 创建小车图标 var myIcon = new BMap.Icon(__webpack_require__(100), new BMap.Size(94, 94)); // 创建Marker标注,使用小车图标 var pt = new BMap.Point(lng, lat); this.car = new BMap.Marker(pt, { icon: myIcon, rotation: that.angle, zIndex: 99 }); this.car.disableMassClear(); if (this.showInfoWindow) this.initInfoWindow(); // 将标注添加到地图 this.map.addOverlay(this.car);