xy-map 1.1.39 → 1.1.40
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/package.json +1 -1
- package/xy-map.common.js +242 -249
- package/xy-map.umd.js +242 -249
- package/xy-map.umd.min.js +3 -3
package/xy-map.umd.js
CHANGED
|
@@ -11,27 +11,6 @@
|
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/ 3371:
|
|
15
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
16
|
-
|
|
17
|
-
"use strict";
|
|
18
|
-
__webpack_require__.r(__webpack_exports__);
|
|
19
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1371);
|
|
20
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
21
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6527);
|
|
22
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
23
|
-
// Imports
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
27
|
-
// Module
|
|
28
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".el-scrollbar .el-scrollbar__view .el-select-dropdown__item[data-v-5a009b74]{height:auto;max-height:274px;padding:0;overflow:hidden;overflow-y:auto}.el-select-dropdown__item.selected[data-v-5a009b74]{font-weight:400}ul li[data-v-5a009b74] .el-tree .el-tree-node__content{height:auto;padding:0 20px}.el-tree-node__label[data-v-5a009b74]{font-weight:400}.el-tree[data-v-5a009b74] .is-current .el-tree-node__label{color:#409eff;font-weight:700}.el-tree[data-v-5a009b74] .is-current .el-tree-node__children .el-tree-node__label{color:#606266;font-weight:400}.selectInput[data-v-5a009b74]{padding:0 5px;box-sizing:border-box}", ""]);
|
|
29
|
-
// Exports
|
|
30
|
-
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/***/ }),
|
|
34
|
-
|
|
35
14
|
/***/ 1927:
|
|
36
15
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
37
16
|
|
|
@@ -42810,22 +42789,6 @@ function defaultCompare(a, b) {
|
|
|
42810
42789
|
|
|
42811
42790
|
/***/ }),
|
|
42812
42791
|
|
|
42813
|
-
/***/ 380:
|
|
42814
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
42815
|
-
|
|
42816
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
42817
|
-
|
|
42818
|
-
// load the styles
|
|
42819
|
-
var content = __webpack_require__(3371);
|
|
42820
|
-
if(content.__esModule) content = content.default;
|
|
42821
|
-
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
42822
|
-
if(content.locals) module.exports = content.locals;
|
|
42823
|
-
// add the styles to the DOM
|
|
42824
|
-
var add = (__webpack_require__(208)/* ["default"] */ .Z)
|
|
42825
|
-
var update = add("70cbfb65", content, true, {"sourceMap":false,"shadowMode":false});
|
|
42826
|
-
|
|
42827
|
-
/***/ }),
|
|
42828
|
-
|
|
42829
42792
|
/***/ 5620:
|
|
42830
42793
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
42831
42794
|
|
|
@@ -43700,7 +43663,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
43700
43663
|
"drawPoint": function() { return /* reexport */ draw_point; },
|
|
43701
43664
|
"drawPolygon": function() { return /* reexport */ draw_polygon; },
|
|
43702
43665
|
"drawTools": function() { return /* reexport */ draw; },
|
|
43703
|
-
"elTreeSelect": function() { return /* reexport */ el_tree_select; },
|
|
43704
43666
|
"jsonFile": function() { return /* reexport */ jsonFile; },
|
|
43705
43667
|
"mapDraw": function() { return /* reexport */ mapDraw; },
|
|
43706
43668
|
"mapEvent": function() { return /* reexport */ mapEvent; },
|
|
@@ -43800,7 +43762,6 @@ __webpack_require__.d(package_namespaceObject, {
|
|
|
43800
43762
|
"Qd": function() { return draw_point; },
|
|
43801
43763
|
"is": function() { return draw_polygon; },
|
|
43802
43764
|
"Cx": function() { return draw; },
|
|
43803
|
-
"FC": function() { return el_tree_select; },
|
|
43804
43765
|
"tP": function() { return jsonFile; },
|
|
43805
43766
|
"Gx": function() { return mapDraw; },
|
|
43806
43767
|
"A": function() { return mapEvent; },
|
|
@@ -43968,6 +43929,245 @@ const setHigh = (id, filter) => {
|
|
|
43968
43929
|
} = package_map;
|
|
43969
43930
|
map.setFilter(id + '-high', filter);
|
|
43970
43931
|
};
|
|
43932
|
+
;// CONCATENATED MODULE: ./src/package/util/mapboxgl-control-minimap.js
|
|
43933
|
+
|
|
43934
|
+
function Minimap(options) {
|
|
43935
|
+
Object.assign(this.options, options);
|
|
43936
|
+
this._ticking = false;
|
|
43937
|
+
this._lastMouseMoveEvent = null;
|
|
43938
|
+
this._parentMap = null;
|
|
43939
|
+
this._isDragging = false;
|
|
43940
|
+
this._isCursorOverFeature = false;
|
|
43941
|
+
this._previousPoint = [0, 0];
|
|
43942
|
+
this._currentPoint = [0, 0];
|
|
43943
|
+
this._trackingRectCoordinates = [[[], [], [], [], []]];
|
|
43944
|
+
}
|
|
43945
|
+
Minimap.prototype = Object.assign({}, (mapbox_gl_default()).NavigationControl.prototype, {
|
|
43946
|
+
options: {
|
|
43947
|
+
id: 'mapboxgl-minimap',
|
|
43948
|
+
width: '320px',
|
|
43949
|
+
height: '180px',
|
|
43950
|
+
style: 'mapbox://styles/mapbox/satellite-v9',
|
|
43951
|
+
center: [0, 0],
|
|
43952
|
+
zoom: 6,
|
|
43953
|
+
// should be a function; will be bound to Minimap
|
|
43954
|
+
zoomAdjust: null,
|
|
43955
|
+
// if parent map zoom >= 18 and minimap zoom >= 14, set minimap zoom to 16
|
|
43956
|
+
zoomLevels: [[18, 14, 16], [16, 12, 14], [14, 10, 12], [12, 8, 10], [10, 6, 8]],
|
|
43957
|
+
lineColor: '#ff0000',
|
|
43958
|
+
lineWidth: 1,
|
|
43959
|
+
lineOpacity: 1,
|
|
43960
|
+
fillColor: '#fff',
|
|
43961
|
+
fillOpacity: 0.1,
|
|
43962
|
+
dragPan: false,
|
|
43963
|
+
scrollZoom: false,
|
|
43964
|
+
boxZoom: false,
|
|
43965
|
+
dragRotate: false,
|
|
43966
|
+
keyboard: false,
|
|
43967
|
+
doubleClickZoom: false,
|
|
43968
|
+
touchZoomRotate: false
|
|
43969
|
+
},
|
|
43970
|
+
onAdd: function (parentMap) {
|
|
43971
|
+
this._parentMap = parentMap;
|
|
43972
|
+
var opts = this.options;
|
|
43973
|
+
var container = this._container = this._createContainer(parentMap);
|
|
43974
|
+
var miniMap = this._miniMap = new (mapbox_gl_default()).Map({
|
|
43975
|
+
attributionControl: false,
|
|
43976
|
+
container: container,
|
|
43977
|
+
style: opts.style,
|
|
43978
|
+
zoom: opts.zoom,
|
|
43979
|
+
center: opts.center
|
|
43980
|
+
});
|
|
43981
|
+
if (opts.maxBounds) miniMap.setMaxBounds(opts.maxBounds);
|
|
43982
|
+
miniMap.on('load', this._load.bind(this));
|
|
43983
|
+
return this._container;
|
|
43984
|
+
},
|
|
43985
|
+
_load: function () {
|
|
43986
|
+
var opts = this.options;
|
|
43987
|
+
var parentMap = this._parentMap;
|
|
43988
|
+
var miniMap = this._miniMap;
|
|
43989
|
+
var interactions = ['dragPan', 'scrollZoom', 'boxZoom', 'dragRotate', 'keyboard', 'doubleClickZoom', 'touchZoomRotate'];
|
|
43990
|
+
interactions.forEach(function (i) {
|
|
43991
|
+
if (opts[i] !== true) {
|
|
43992
|
+
miniMap[i].disable();
|
|
43993
|
+
}
|
|
43994
|
+
});
|
|
43995
|
+
if (typeof opts.zoomAdjust === 'function') {
|
|
43996
|
+
this.options.zoomAdjust = opts.zoomAdjust.bind(this);
|
|
43997
|
+
} else if (opts.zoomAdjust === null) {
|
|
43998
|
+
this.options.zoomAdjust = this._zoomAdjust.bind(this);
|
|
43999
|
+
}
|
|
44000
|
+
var bounds = miniMap.getBounds();
|
|
44001
|
+
this._convertBoundsToPoints(bounds);
|
|
44002
|
+
miniMap.addSource('trackingRect', {
|
|
44003
|
+
'type': 'geojson',
|
|
44004
|
+
'data': {
|
|
44005
|
+
'type': 'Feature',
|
|
44006
|
+
'properties': {
|
|
44007
|
+
'name': 'trackingRect'
|
|
44008
|
+
},
|
|
44009
|
+
'geometry': {
|
|
44010
|
+
'type': 'Polygon',
|
|
44011
|
+
'coordinates': this._trackingRectCoordinates
|
|
44012
|
+
}
|
|
44013
|
+
}
|
|
44014
|
+
});
|
|
44015
|
+
miniMap.addLayer({
|
|
44016
|
+
'id': 'trackingRectOutline',
|
|
44017
|
+
'type': 'line',
|
|
44018
|
+
'source': 'trackingRect',
|
|
44019
|
+
'layout': {},
|
|
44020
|
+
'paint': {
|
|
44021
|
+
'line-color': opts.lineColor,
|
|
44022
|
+
'line-width': opts.lineWidth,
|
|
44023
|
+
'line-opacity': opts.lineOpacity
|
|
44024
|
+
}
|
|
44025
|
+
});
|
|
44026
|
+
|
|
44027
|
+
// needed for dragging
|
|
44028
|
+
miniMap.addLayer({
|
|
44029
|
+
'id': 'trackingRectFill',
|
|
44030
|
+
'type': 'fill',
|
|
44031
|
+
'source': 'trackingRect',
|
|
44032
|
+
'layout': {},
|
|
44033
|
+
'paint': {
|
|
44034
|
+
'fill-color': opts.fillColor,
|
|
44035
|
+
'fill-opacity': opts.fillOpacity
|
|
44036
|
+
}
|
|
44037
|
+
});
|
|
44038
|
+
this._trackingRect = this._miniMap.getSource('trackingRect');
|
|
44039
|
+
this._update();
|
|
44040
|
+
parentMap.on('move', this._update.bind(this));
|
|
44041
|
+
miniMap.on('mousemove', this._mouseMove.bind(this));
|
|
44042
|
+
miniMap.on('mousedown', this._mouseDown.bind(this));
|
|
44043
|
+
miniMap.on('mouseup', this._mouseUp.bind(this));
|
|
44044
|
+
miniMap.on('touchmove', this._mouseMove.bind(this));
|
|
44045
|
+
miniMap.on('touchstart', this._mouseDown.bind(this));
|
|
44046
|
+
miniMap.on('touchend', this._mouseUp.bind(this));
|
|
44047
|
+
this._miniMapCanvas = miniMap.getCanvasContainer();
|
|
44048
|
+
this._miniMapCanvas.addEventListener('wheel', this._preventDefault);
|
|
44049
|
+
this._miniMapCanvas.addEventListener('mousewheel', this._preventDefault);
|
|
44050
|
+
},
|
|
44051
|
+
_mouseDown: function (e) {
|
|
44052
|
+
if (this._isCursorOverFeature) {
|
|
44053
|
+
this._isDragging = true;
|
|
44054
|
+
this._previousPoint = this._currentPoint;
|
|
44055
|
+
this._currentPoint = [e.lngLat.lng, e.lngLat.lat];
|
|
44056
|
+
}
|
|
44057
|
+
},
|
|
44058
|
+
_mouseMove: function (e) {
|
|
44059
|
+
this._ticking = false;
|
|
44060
|
+
var miniMap = this._miniMap;
|
|
44061
|
+
var features = miniMap.queryRenderedFeatures(e.point, {
|
|
44062
|
+
layers: ['trackingRectFill']
|
|
44063
|
+
});
|
|
44064
|
+
|
|
44065
|
+
// don't update if we're still hovering the area
|
|
44066
|
+
if (!(this._isCursorOverFeature && features.length > 0)) {
|
|
44067
|
+
this._isCursorOverFeature = features.length > 0;
|
|
44068
|
+
this._miniMapCanvas.style.cursor = this._isCursorOverFeature ? 'move' : '';
|
|
44069
|
+
}
|
|
44070
|
+
if (this._isDragging) {
|
|
44071
|
+
this._previousPoint = this._currentPoint;
|
|
44072
|
+
this._currentPoint = [e.lngLat.lng, e.lngLat.lat];
|
|
44073
|
+
var offset = [this._previousPoint[0] - this._currentPoint[0], this._previousPoint[1] - this._currentPoint[1]];
|
|
44074
|
+
var newBounds = this._moveTrackingRect(offset);
|
|
44075
|
+
this._parentMap.fitBounds(newBounds, {
|
|
44076
|
+
duration: 80,
|
|
44077
|
+
noMoveStart: true
|
|
44078
|
+
});
|
|
44079
|
+
}
|
|
44080
|
+
},
|
|
44081
|
+
_mouseUp: function () {
|
|
44082
|
+
this._isDragging = false;
|
|
44083
|
+
this._ticking = false;
|
|
44084
|
+
},
|
|
44085
|
+
_moveTrackingRect: function (offset) {
|
|
44086
|
+
var source = this._trackingRect;
|
|
44087
|
+
var data = source._data;
|
|
44088
|
+
var bounds = data.properties.bounds;
|
|
44089
|
+
bounds._ne.lat -= offset[1];
|
|
44090
|
+
bounds._ne.lng -= offset[0];
|
|
44091
|
+
bounds._sw.lat -= offset[1];
|
|
44092
|
+
bounds._sw.lng -= offset[0];
|
|
44093
|
+
this._convertBoundsToPoints(bounds);
|
|
44094
|
+
source.setData(data);
|
|
44095
|
+
return bounds;
|
|
44096
|
+
},
|
|
44097
|
+
_setTrackingRectBounds: function (bounds) {
|
|
44098
|
+
var source = this._trackingRect;
|
|
44099
|
+
var data = source._data;
|
|
44100
|
+
data.properties.bounds = bounds;
|
|
44101
|
+
this._convertBoundsToPoints(bounds);
|
|
44102
|
+
source.setData(data);
|
|
44103
|
+
},
|
|
44104
|
+
_convertBoundsToPoints: function (bounds) {
|
|
44105
|
+
var ne = bounds._ne;
|
|
44106
|
+
var sw = bounds._sw;
|
|
44107
|
+
var trc = this._trackingRectCoordinates;
|
|
44108
|
+
trc[0][0][0] = ne.lng;
|
|
44109
|
+
trc[0][0][1] = ne.lat;
|
|
44110
|
+
trc[0][1][0] = sw.lng;
|
|
44111
|
+
trc[0][1][1] = ne.lat;
|
|
44112
|
+
trc[0][2][0] = sw.lng;
|
|
44113
|
+
trc[0][2][1] = sw.lat;
|
|
44114
|
+
trc[0][3][0] = ne.lng;
|
|
44115
|
+
trc[0][3][1] = sw.lat;
|
|
44116
|
+
trc[0][4][0] = ne.lng;
|
|
44117
|
+
trc[0][4][1] = ne.lat;
|
|
44118
|
+
},
|
|
44119
|
+
_update: function (e) {
|
|
44120
|
+
if (this._isDragging) {
|
|
44121
|
+
return;
|
|
44122
|
+
}
|
|
44123
|
+
var parentBounds = this._parentMap.getBounds();
|
|
44124
|
+
this._setTrackingRectBounds(parentBounds);
|
|
44125
|
+
if (typeof this.options.zoomAdjust === 'function') {
|
|
44126
|
+
this.options.zoomAdjust();
|
|
44127
|
+
}
|
|
44128
|
+
},
|
|
44129
|
+
_zoomAdjust: function () {
|
|
44130
|
+
var miniMap = this._miniMap;
|
|
44131
|
+
var parentMap = this._parentMap;
|
|
44132
|
+
var miniZoom = parseInt(miniMap.getZoom(), 10);
|
|
44133
|
+
var parentZoom = parseInt(parentMap.getZoom(), 10);
|
|
44134
|
+
var levels = this.options.zoomLevels;
|
|
44135
|
+
var found = false;
|
|
44136
|
+
levels.forEach(function (zoom) {
|
|
44137
|
+
if (!found && parentZoom >= zoom[0]) {
|
|
44138
|
+
if (miniZoom >= zoom[1]) {
|
|
44139
|
+
miniMap.setZoom(zoom[2]);
|
|
44140
|
+
}
|
|
44141
|
+
miniMap.setCenter(parentMap.getCenter());
|
|
44142
|
+
found = true;
|
|
44143
|
+
}
|
|
44144
|
+
});
|
|
44145
|
+
if (!found && miniZoom !== this.options.zoom) {
|
|
44146
|
+
if (typeof this.options.bounds === 'object') {
|
|
44147
|
+
miniMap.fitBounds(this.options.bounds, {
|
|
44148
|
+
duration: 50
|
|
44149
|
+
});
|
|
44150
|
+
}
|
|
44151
|
+
miniMap.setZoom(this.options.zoom);
|
|
44152
|
+
}
|
|
44153
|
+
},
|
|
44154
|
+
_createContainer: function (parentMap) {
|
|
44155
|
+
var opts = this.options;
|
|
44156
|
+
var container = document.createElement('div');
|
|
44157
|
+
container.className = 'mapboxgl-ctrl-minimap mapboxgl-ctrl';
|
|
44158
|
+
container.setAttribute('style', 'width: ' + opts.width + '; height: ' + opts.height + ';');
|
|
44159
|
+
container.addEventListener('contextmenu', this._preventDefault);
|
|
44160
|
+
parentMap.getContainer().appendChild(container);
|
|
44161
|
+
if (opts.id !== '') {
|
|
44162
|
+
container.id = opts.id;
|
|
44163
|
+
}
|
|
44164
|
+
return container;
|
|
44165
|
+
},
|
|
44166
|
+
_preventDefault: function (e) {
|
|
44167
|
+
e.preventDefault();
|
|
44168
|
+
}
|
|
44169
|
+
});
|
|
44170
|
+
(mapbox_gl_default()).Minimap = Minimap;
|
|
43971
44171
|
;// CONCATENATED MODULE: ./src/package/map.js
|
|
43972
44172
|
// 天地图token
|
|
43973
44173
|
const tdtToken = (/* unused pure expression or super */ null && (['150bad890e9d004885a4b2a94062a46e', '337996a733e1ea41cd73124f67f4795d', '48282c15cce091a1154a674512372eec', 'f3c2ca3a170f5712abd7b6858e038f18']));
|
|
@@ -44059,6 +44259,7 @@ class mapSdk {
|
|
|
44059
44259
|
this.accessToken = 'pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg';
|
|
44060
44260
|
this.options = defaultOptions; // 初始参数
|
|
44061
44261
|
this.map = null;
|
|
44262
|
+
(mapbox_gl_default()).miniMap = Minimap;
|
|
44062
44263
|
this.mapBoxGl = (mapbox_gl_default());
|
|
44063
44264
|
this.setInterval = ''; // 定时器
|
|
44064
44265
|
}
|
|
@@ -118929,215 +119130,6 @@ var mapFullScreen_component = normalizeComponent(
|
|
|
118929
119130
|
)
|
|
118930
119131
|
|
|
118931
119132
|
/* harmony default export */ var mapFullScreen = (mapFullScreen_component.exports);
|
|
118932
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/components/el-tree-select.vue?vue&type=template&id=5a009b74&scoped=true&
|
|
118933
|
-
var el_tree_selectvue_type_template_id_5a009b74_scoped_true_render = function render() {
|
|
118934
|
-
var _vm = this,
|
|
118935
|
-
_c = _vm._self._c;
|
|
118936
|
-
return _c('el-select', _vm._b({
|
|
118937
|
-
ref: "treeSelect",
|
|
118938
|
-
staticStyle: {
|
|
118939
|
-
"width": "100%"
|
|
118940
|
-
},
|
|
118941
|
-
attrs: {
|
|
118942
|
-
"size": "small",
|
|
118943
|
-
"value": _vm.valueTitle,
|
|
118944
|
-
"clearable": _vm.clearable,
|
|
118945
|
-
"popper-append-to-body": false
|
|
118946
|
-
},
|
|
118947
|
-
on: {
|
|
118948
|
-
"clear": _vm.clearHandle
|
|
118949
|
-
}
|
|
118950
|
-
}, 'el-select', _vm.$attrs, false), [_c('div', [_c('el-input', _vm._b({
|
|
118951
|
-
staticClass: "selectInput",
|
|
118952
|
-
attrs: {
|
|
118953
|
-
"size": "small",
|
|
118954
|
-
"placeholder": _vm.placeholder
|
|
118955
|
-
},
|
|
118956
|
-
model: {
|
|
118957
|
-
value: _vm.filterText,
|
|
118958
|
-
callback: function ($$v) {
|
|
118959
|
-
_vm.filterText = $$v;
|
|
118960
|
-
},
|
|
118961
|
-
expression: "filterText"
|
|
118962
|
-
}
|
|
118963
|
-
}, 'el-input', _vm.$attrs, false)), _c('el-option', {
|
|
118964
|
-
staticClass: "options",
|
|
118965
|
-
attrs: {
|
|
118966
|
-
"value": _vm.valueTitle,
|
|
118967
|
-
"label": _vm.valueTitle
|
|
118968
|
-
}
|
|
118969
|
-
}, [_c('el-tree', _vm._b({
|
|
118970
|
-
ref: "selectTree",
|
|
118971
|
-
attrs: {
|
|
118972
|
-
"id": "tree-option",
|
|
118973
|
-
"size": "small",
|
|
118974
|
-
"accordion": _vm.accordion,
|
|
118975
|
-
"data": _vm.options,
|
|
118976
|
-
"props": _vm.props,
|
|
118977
|
-
"node-key": _vm.props.value,
|
|
118978
|
-
"default-expanded-keys": _vm.defaultExpandedKey,
|
|
118979
|
-
"filter-node-method": _vm.filterNode
|
|
118980
|
-
},
|
|
118981
|
-
on: {
|
|
118982
|
-
"node-click": _vm.handleNodeClick
|
|
118983
|
-
}
|
|
118984
|
-
}, 'el-tree', _vm.$attrs, false))], 1)], 1)]);
|
|
118985
|
-
};
|
|
118986
|
-
var el_tree_selectvue_type_template_id_5a009b74_scoped_true_staticRenderFns = [];
|
|
118987
|
-
|
|
118988
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/components/el-tree-select.vue?vue&type=script&lang=js&
|
|
118989
|
-
/* harmony default export */ var el_tree_selectvue_type_script_lang_js_ = ({
|
|
118990
|
-
name: 'el-tree-select',
|
|
118991
|
-
props: {
|
|
118992
|
-
/* 配置项 */
|
|
118993
|
-
props: {
|
|
118994
|
-
type: Object,
|
|
118995
|
-
default: () => {
|
|
118996
|
-
return {
|
|
118997
|
-
value: 'id',
|
|
118998
|
-
// ID字段名
|
|
118999
|
-
label: 'title',
|
|
119000
|
-
// 显示名称
|
|
119001
|
-
children: 'children' // 子级字段名
|
|
119002
|
-
};
|
|
119003
|
-
}
|
|
119004
|
-
},
|
|
119005
|
-
|
|
119006
|
-
/* 选项列表数据(树形结构的对象数组) */
|
|
119007
|
-
options: {
|
|
119008
|
-
type: Array,
|
|
119009
|
-
default: () => {
|
|
119010
|
-
return [];
|
|
119011
|
-
}
|
|
119012
|
-
},
|
|
119013
|
-
/* 初始值 */
|
|
119014
|
-
value: {
|
|
119015
|
-
type: Number,
|
|
119016
|
-
default: () => {
|
|
119017
|
-
return null;
|
|
119018
|
-
}
|
|
119019
|
-
},
|
|
119020
|
-
/* 可清空选项 */
|
|
119021
|
-
clearable: {
|
|
119022
|
-
type: Boolean,
|
|
119023
|
-
default: () => {
|
|
119024
|
-
return true;
|
|
119025
|
-
}
|
|
119026
|
-
},
|
|
119027
|
-
/* 自动收起 */
|
|
119028
|
-
accordion: {
|
|
119029
|
-
type: Boolean,
|
|
119030
|
-
default: () => {
|
|
119031
|
-
return false;
|
|
119032
|
-
}
|
|
119033
|
-
},
|
|
119034
|
-
placeholder: {
|
|
119035
|
-
type: String,
|
|
119036
|
-
default: () => {
|
|
119037
|
-
return '搜索关键字';
|
|
119038
|
-
}
|
|
119039
|
-
}
|
|
119040
|
-
},
|
|
119041
|
-
data() {
|
|
119042
|
-
return {
|
|
119043
|
-
filterText: '',
|
|
119044
|
-
valueId: this.value,
|
|
119045
|
-
// 初始值
|
|
119046
|
-
valueTitle: '',
|
|
119047
|
-
defaultExpandedKey: []
|
|
119048
|
-
};
|
|
119049
|
-
},
|
|
119050
|
-
mounted() {
|
|
119051
|
-
this.initHandle();
|
|
119052
|
-
},
|
|
119053
|
-
methods: {
|
|
119054
|
-
// 初始化值
|
|
119055
|
-
initHandle() {
|
|
119056
|
-
if (this.valueId) {
|
|
119057
|
-
this.valueTitle = this.$refs.selectTree.getNode(this.valueId).data[this.props.label]; // 初始化显示
|
|
119058
|
-
this.$refs.selectTree.setCurrentKey(this.valueId); // 设置默认选中
|
|
119059
|
-
this.defaultExpandedKey = [this.valueId]; // 设置默认展开
|
|
119060
|
-
}
|
|
119061
|
-
|
|
119062
|
-
this.initScroll();
|
|
119063
|
-
},
|
|
119064
|
-
// 初始化滚动条
|
|
119065
|
-
initScroll() {
|
|
119066
|
-
this.$nextTick(() => {
|
|
119067
|
-
let scrollWrap = document.querySelectorAll('.el-scrollbar .el-select-dropdown__wrap')[0];
|
|
119068
|
-
let scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar');
|
|
119069
|
-
scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;';
|
|
119070
|
-
scrollBar.forEach(ele => ele.style.width = 0);
|
|
119071
|
-
});
|
|
119072
|
-
},
|
|
119073
|
-
// 切换选项
|
|
119074
|
-
handleNodeClick(node) {
|
|
119075
|
-
this.valueTitle = node[this.props.label];
|
|
119076
|
-
this.valueId = node[this.props.value];
|
|
119077
|
-
this.$emit('getValue', this.valueId);
|
|
119078
|
-
this.$emit('input', this.valueId);
|
|
119079
|
-
// console.log(this.valueId)
|
|
119080
|
-
this.defaultExpandedKey = [];
|
|
119081
|
-
if (!node.children || !node.children.length) {
|
|
119082
|
-
//补录选择完选项弹框不能收起
|
|
119083
|
-
this.$refs.treeSelect.blur();
|
|
119084
|
-
}
|
|
119085
|
-
},
|
|
119086
|
-
// 清除选中
|
|
119087
|
-
clearHandle() {
|
|
119088
|
-
this.valueTitle = '';
|
|
119089
|
-
this.valueId = null;
|
|
119090
|
-
this.defaultExpandedKey = [];
|
|
119091
|
-
this.clearSelected();
|
|
119092
|
-
this.$emit('getValue', null);
|
|
119093
|
-
},
|
|
119094
|
-
/* 清空选中样式 */
|
|
119095
|
-
clearSelected() {
|
|
119096
|
-
let allNode = document.querySelectorAll('#tree-option .el-tree-node');
|
|
119097
|
-
allNode.forEach(element => element.classList.remove('is-current'));
|
|
119098
|
-
},
|
|
119099
|
-
filterNode(value, data) {
|
|
119100
|
-
if (!value) return true;
|
|
119101
|
-
return data.name.indexOf(value) !== -1;
|
|
119102
|
-
}
|
|
119103
|
-
},
|
|
119104
|
-
watch: {
|
|
119105
|
-
value() {
|
|
119106
|
-
this.valueId = this.value;
|
|
119107
|
-
this.initHandle();
|
|
119108
|
-
},
|
|
119109
|
-
filterText(val) {
|
|
119110
|
-
this.$refs.selectTree.filter(val);
|
|
119111
|
-
}
|
|
119112
|
-
}
|
|
119113
|
-
});
|
|
119114
|
-
;// CONCATENATED MODULE: ./src/package/components/el-tree-select.vue?vue&type=script&lang=js&
|
|
119115
|
-
/* harmony default export */ var components_el_tree_selectvue_type_script_lang_js_ = (el_tree_selectvue_type_script_lang_js_);
|
|
119116
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/components/el-tree-select.vue?vue&type=style&index=0&id=5a009b74&prod&scoped=true&lang=css&
|
|
119117
|
-
var el_tree_selectvue_type_style_index_0_id_5a009b74_prod_scoped_true_lang_css_ = __webpack_require__(380);
|
|
119118
|
-
;// CONCATENATED MODULE: ./src/package/components/el-tree-select.vue?vue&type=style&index=0&id=5a009b74&prod&scoped=true&lang=css&
|
|
119119
|
-
|
|
119120
|
-
;// CONCATENATED MODULE: ./src/package/components/el-tree-select.vue
|
|
119121
|
-
|
|
119122
|
-
|
|
119123
|
-
|
|
119124
|
-
;
|
|
119125
|
-
|
|
119126
|
-
|
|
119127
|
-
/* normalize component */
|
|
119128
|
-
|
|
119129
|
-
var el_tree_select_component = normalizeComponent(
|
|
119130
|
-
components_el_tree_selectvue_type_script_lang_js_,
|
|
119131
|
-
el_tree_selectvue_type_template_id_5a009b74_scoped_true_render,
|
|
119132
|
-
el_tree_selectvue_type_template_id_5a009b74_scoped_true_staticRenderFns,
|
|
119133
|
-
false,
|
|
119134
|
-
null,
|
|
119135
|
-
"5a009b74",
|
|
119136
|
-
null
|
|
119137
|
-
|
|
119138
|
-
)
|
|
119139
|
-
|
|
119140
|
-
/* harmony default export */ var el_tree_select = (el_tree_select_component.exports);
|
|
119141
119133
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/components/mapStyle.vue?vue&type=template&id=1a040aed&scoped=true&
|
|
119142
119134
|
var mapStylevue_type_template_id_1a040aed_scoped_true_render = function render() {
|
|
119143
119135
|
var _vm = this,
|
|
@@ -120553,6 +120545,7 @@ const mapTools = {
|
|
|
120553
120545
|
loadImage: loadImage,
|
|
120554
120546
|
ranging: ranging,
|
|
120555
120547
|
drawArea: drawArea,
|
|
120548
|
+
spArray: spArray,
|
|
120556
120549
|
clearDraw: clearDraw,
|
|
120557
120550
|
distance: mapTools_distance,
|
|
120558
120551
|
lineCenter: lineCenter,
|
|
@@ -120576,7 +120569,7 @@ const mapEvent = {
|
|
|
120576
120569
|
|
|
120577
120570
|
|
|
120578
120571
|
|
|
120579
|
-
// 选择树组件
|
|
120572
|
+
// import elTreeSelect from './components/el-tree-select.vue' // 选择树组件
|
|
120580
120573
|
// 修改地图风格
|
|
120581
120574
|
|
|
120582
120575
|
|