@mapgis/webclient-vue-cesium 10.5.5-1 → 10.5.5-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -49
- package/dist-libs/webclient-vue-cesium.common.js +191087 -0
- package/dist-libs/webclient-vue-cesium.css +1 -1
- package/dist-libs/webclient-vue-cesium.umd.js +191097 -0
- package/dist-libs/webclient-vue-cesium.umd.min.js +204 -194
- package/docs/.vuepress/config.js +47 -46
- package/docs/README.md +5 -4
- package/docs/api/analysis/Aspect.md +236 -0
- package/docs/api/analysis/Contour.md +240 -0
- package/docs/api/analysis/CutFill.md +306 -0
- package/docs/api/analysis/DynamicSection.md +336 -0
- package/docs/api/analysis/Excavate.md +3 -11
- package/docs/api/analysis/Flood.md +177 -200
- package/docs/api/analysis/HeightLimited.md +7 -4
- package/docs/api/analysis/ParticleEffects.md +549 -0
- package/docs/api/analysis/Profile.md +464 -0
- package/docs/api/analysis/Shadow.md +76 -13
- package/docs/api/analysis/Sightline.md +66 -13
- package/docs/api/analysis/Skyline.md +144 -29
- package/docs/api/analysis/Slope.md +236 -0
- package/docs/api/analysis/Viewshed.md +100 -21
- package/docs/api/layer/IGServer/IgsDocLayer.md +10 -0
- package/docs/api/layer/IGServer/IgsFeatureLayer.md +253 -0
- package/docs/api/layer/IGServer/IgsTileLayer.md +11 -0
- package/docs/api/layer/OGC/CesiumOgcWmsLayer.md +20 -19
- package/docs/api/layer/OGC/Wms.png +0 -0
- package/docs/api/layer/marker/DynamicMarker.md +81 -0
- package/docs/api/layer/marker/dynamicmarker.png +0 -0
- package/docs/api/layer/marker/selects.png +0 -0
- package/docs/api/layer/vectortile/vectortile.md +10 -0
- package/docs/api/m3d/image/layer_control_1.png +0 -0
- package/docs/api/m3d/image/layer_control_2.png +0 -0
- package/docs/api/m3d/image/layer_control_3.png +0 -0
- package/docs/api/m3d/m3d.md +13 -2
- package/docs/api/service/comprehensiveQuery/comprehensiveQuery.md +946 -0
- package/docs/api/ui/draw.md +68 -40
- package/docs/api/ui/link.md +8 -1
- package/docs/api/ui/marker.md +19 -1
- package/docs/api/ui/measure.md +82 -10
- package/docs/api/ui/table.md +6 -6
- package/docs/guide/README.md +26 -23
- package/docs/guide/basemap.md +35 -33
- package/docs/guide/markers&popups.md +46 -53
- package/docs/plugin_components/create_storybook.md +241 -0
- package/docs/plugin_components/img.png +0 -0
- package/docs/plugin_components/img_1.png +0 -0
- package/docs/plugin_components/img_10.png +0 -0
- package/docs/plugin_components/img_2.png +0 -0
- package/docs/plugin_components/img_3.png +0 -0
- package/docs/plugin_components/img_4.png +0 -0
- package/docs/plugin_components/img_5.png +0 -0
- package/docs/plugin_components/img_6.png +0 -0
- package/docs/plugin_components/img_7.png +0 -0
- package/docs/plugin_components/img_8.png +0 -0
- package/docs/version/diff.md +4 -4
- package/docs/version/version.md +81 -0
- package/package.json +5 -5
- package/src/cdn/cdn_component.js +62 -0
- package/src/component.js +20 -2
- package/src/components/Analysis/Aspect.vue +318 -0
- package/src/components/Analysis/Contour.vue +257 -0
- package/src/components/Analysis/CutFill.vue +581 -0
- package/src/components/Analysis/DynamicCutting.vue +98 -59
- package/src/components/Analysis/DynamicSection.vue +494 -0
- package/src/components/Analysis/Excavate.vue +133 -87
- package/src/components/Analysis/Flood.vue +395 -487
- package/src/components/Analysis/Flood.vue-- +630 -0
- package/src/components/Analysis/HeightLimited.vue +66 -47
- package/src/components/Analysis/ModelFlatten.vue +2 -2
- package/src/components/Analysis/Profile.vue +503 -0
- package/src/components/Analysis/Shadow.vue +220 -309
- package/src/components/Analysis/Sightline.vue +393 -375
- package/src/components/Analysis/SkyLine.vue +283 -93
- package/src/components/Analysis/Slope.vue +317 -0
- package/src/components/Analysis/Viewshed.vue +806 -373
- package/src/components/Analysis/skyline2dChartOptions.js +66 -0
- package/src/components/DataSource/Geojson/GeoJsonDataSource.vue +201 -3
- package/src/components/Layer/GeoJSON/GeoJsonLayer.vue +345 -0
- package/src/components/Layer/IGServer/IgsFeatureLayer.vue +227 -0
- package/src/components/Layer/Marker/DynamicMarkerLayer.vue +487 -0
- package/src/components/Layer/Marker/Marker3dPro.vue +196 -0
- package/src/components/Layer/Marker/Marker3dSetPro.vue +67 -0
- package/src/components/Layer/VectorTile/VectorTileLayer.vue +117 -33
- package/src/components/Layer/VectorTile/VectorTileOptions.js +1 -1
- package/src/components/M3D/3DTilesetOptions.js +23 -1
- package/src/components/M3D/G3D.vue +150 -0
- package/src/components/M3D/M3d.vue +142 -32
- package/src/components/M3D/M3dSet.vue +118 -0
- package/src/components/M3D/M3dType.js +24 -0
- package/src/components/Overlay/Mapv3dLayer.vue +2 -0
- package/src/components/Overlay/ParticleEffects.vue +545 -0
- package/src/components/Overlay/mapv/MapvBaseLayer.js +351 -172
- package/src/components/Overlay/mapv/MapvLayer.js +372 -324
- package/src/components/Overlay/mapv/SuperCluster.js +611 -0
- package/src/components/Overlay/themeLayer/heater/CesiumHeater.vue +152 -0
- package/src/components/Overlay/themeLayer/heater/MapvHeater.vue +161 -0
- package/src/components/UI/Controls/Draw/Draw.vue +320 -92
- package/src/components/UI/Controls/Legend/Legend.vue +55 -51
- package/src/components/UI/Controls/Link/Link.vue +59 -37
- package/src/components/UI/Controls/Measure/Measure.vue +75 -33
- package/src/components/UI/Controls/Measure/components/MeasureResult.vue +71 -0
- package/src/components/UI/Controls/Measure/components/MeasureSetting.vue +63 -0
- package/src/components/UI/Controls/Measure/components/MeasureTool.vue +155 -0
- package/src/components/UI/Geojson/Popup.vue +101 -0
- package/src/components/UI/Marker/Marker.vue +185 -48
- package/src/components/UI/Popup/Popup.vue +21 -64
- package/src/components/Utils/common/color-util.js +159 -0
- package/src/components/Utils/util.js +311 -231
- package/src/components/WebGlobe/manager.js +81 -3
- package/src/components/WebGlobe/mixins/withPrivateMethods.js +4 -2
- package/src/components/WebGlobe/util.js +173 -0
- package/src/components/service/comprehensive-query/ComprehensiveQuery.vue +156 -0
- package/src/components/service/comprehensive-query/PlaceNameCesium.vue +102 -0
- package/src/components/service/comprehensive-query/util/catalog/document.js +626 -0
- package/src/components/service/comprehensive-query/util/feature/arcgis-feature-query.js +448 -0
- package/src/components/service/comprehensive-query/util/feature/feature-convert.js +408 -0
- package/src/components/service/comprehensive-query/util/feature/feature-edit.js +50 -0
- package/src/components/service/comprehensive-query/util/feature/feature-geojson.js +100 -0
- package/src/components/service/comprehensive-query/util/feature/feature-query.js +723 -0
- package/src/components/service/comprehensive-query/util/feature/feature.js +1 -0
- package/src/components/service/comprehensive-query/util/feature/index.js +9 -0
- package/src/components/service/comprehensive-query/util/objects/geometry.js +58 -0
- package/src/components/Overlay/Mapv.vue +0 -142
- package/src/components/Overlay/MapvHeater.vue +0 -98
|
@@ -1,579 +1,487 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<slot>
|
|
4
|
-
<div class="
|
|
5
|
-
<mapgis-ui-
|
|
6
|
-
<mapgis-ui-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<mapgis-ui-input class="flood-input" v-model="amplitudeCopy"/>
|
|
54
|
-
</mapgis-ui-col>
|
|
55
|
-
</mapgis-ui-row>
|
|
56
|
-
<mapgis-ui-row>
|
|
57
|
-
<mapgis-ui-col :span="8">
|
|
58
|
-
<p class="flood-title">水纹速度:</p>
|
|
59
|
-
</mapgis-ui-col>
|
|
60
|
-
<mapgis-ui-col :span="12">
|
|
61
|
-
<mapgis-ui-input class="flood-input" v-model="animationSpeedCopy"/>
|
|
62
|
-
</mapgis-ui-col>
|
|
63
|
-
</mapgis-ui-row>
|
|
64
|
-
<mapgis-ui-row>
|
|
65
|
-
<mapgis-ui-col :span="8">
|
|
66
|
-
<p class="flood-title">水纹频率:</p>
|
|
67
|
-
</mapgis-ui-col>
|
|
68
|
-
<mapgis-ui-col :span="12">
|
|
69
|
-
<mapgis-ui-input class="flood-input" v-model="frequencyCopy"/>
|
|
70
|
-
</mapgis-ui-col>
|
|
71
|
-
</mapgis-ui-row>
|
|
72
|
-
<!-- <mapgis-ui-row>-->
|
|
73
|
-
<!-- <mapgis-ui-col :span="8">-->
|
|
74
|
-
<!-- <p class="flood-title">绘制工具:</p>-->
|
|
75
|
-
<!-- </mapgis-ui-col>-->
|
|
76
|
-
<!-- <mapgis-ui-col :span="8">-->
|
|
77
|
-
<!-- <mapgis-ui-select-->
|
|
78
|
-
<!-- class="flood-select"-->
|
|
79
|
-
<!-- :default-value="selectDefault"-->
|
|
80
|
-
<!-- @change="$_selectChange"-->
|
|
81
|
-
<!-- >-->
|
|
82
|
-
<!-- <mapgis-ui-select-option v-for="(tool,index) in tools" :key="tool.name">{{ tool.value }}</mapgis-ui-select-option>-->
|
|
83
|
-
<!-- </mapgis-ui-select>-->
|
|
84
|
-
<!-- </mapgis-ui-col>-->
|
|
85
|
-
<!-- </mapgis-ui-row>-->
|
|
86
|
-
<mapgis-ui-row>
|
|
87
|
-
<mapgis-ui-button class="flood-button start" type="primary" @click="$_startAnalyse" :disabled="!disabled">开始分析
|
|
88
|
-
</mapgis-ui-button>
|
|
89
|
-
</mapgis-ui-row>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="flood-analyse-box" style="height: 127px;" v-show="showResultPannel">
|
|
92
|
-
<mapgis-ui-row>
|
|
93
|
-
<mapgis-ui-col :span="8">
|
|
94
|
-
<p class="flood-title">最大淹没高度(米):</p>
|
|
95
|
-
</mapgis-ui-col>
|
|
96
|
-
<mapgis-ui-col :span="16">
|
|
97
|
-
<mapgis-ui-input v-model="maxHeightCopy"/>
|
|
98
|
-
</mapgis-ui-col>
|
|
99
|
-
</mapgis-ui-row>
|
|
100
|
-
<mapgis-ui-row>
|
|
101
|
-
<mapgis-ui-col :span="8">
|
|
102
|
-
<p class="flood-title">高度选择(米):</p>
|
|
103
|
-
</mapgis-ui-col>
|
|
104
|
-
<mapgis-ui-col :span="16">
|
|
105
|
-
<mapgis-ui-slider v-model="currentHeightCopy" :min="Number(startHeightCopyTwo)" :max="Number(maxHeightCopy)"
|
|
106
|
-
:disabled="disabled"/>
|
|
107
|
-
</mapgis-ui-col>
|
|
108
|
-
</mapgis-ui-row>
|
|
109
|
-
<mapgis-ui-row>
|
|
110
|
-
<mapgis-ui-button class="flood-button back" style="right: 168px;" type="primary" @click="$_up" :disabled="upDisabled">{{upTitle}}</mapgis-ui-button>
|
|
111
|
-
<mapgis-ui-button class="flood-button back" style="right: 95px;" type="primary" @click="$_down" :disabled="downDisabled">{{downTitle}}</mapgis-ui-button>
|
|
112
|
-
<mapgis-ui-button class="flood-button back" @click="$_stopAnalyseToStart">停止分析</mapgis-ui-button>
|
|
113
|
-
</mapgis-ui-row>
|
|
4
|
+
<div class="mapgis-widget-flood-analysis">
|
|
5
|
+
<mapgis-ui-group-tab title="参数设置">
|
|
6
|
+
<mapgis-ui-toolbar slot="handle" :bordered="false">
|
|
7
|
+
<mapgis-ui-toolbar-command
|
|
8
|
+
icon="mapgis-redo"
|
|
9
|
+
title="重新计算"
|
|
10
|
+
@click="refresh"
|
|
11
|
+
:disabled="!recalculate"
|
|
12
|
+
></mapgis-ui-toolbar-command>
|
|
13
|
+
</mapgis-ui-toolbar>
|
|
14
|
+
</mapgis-ui-group-tab>
|
|
15
|
+
<mapgis-ui-setting-form>
|
|
16
|
+
<mapgis-ui-form-item label="淹没最低高度">
|
|
17
|
+
<mapgis-ui-input
|
|
18
|
+
v-model.number="startHeightCopy"
|
|
19
|
+
type="number"
|
|
20
|
+
:max="maxHeightCopy"
|
|
21
|
+
addon-after="(米)"
|
|
22
|
+
/>
|
|
23
|
+
</mapgis-ui-form-item>
|
|
24
|
+
<mapgis-ui-form-item label="淹没最高高度">
|
|
25
|
+
<mapgis-ui-input
|
|
26
|
+
v-model.number="maxHeightCopy"
|
|
27
|
+
type="number"
|
|
28
|
+
:min="startHeightCopy"
|
|
29
|
+
addon-after="(米)"
|
|
30
|
+
/>
|
|
31
|
+
</mapgis-ui-form-item>
|
|
32
|
+
<mapgis-ui-form-item label="洪水上涨速度">
|
|
33
|
+
<mapgis-ui-input
|
|
34
|
+
v-model.number="floodSpeedCopy"
|
|
35
|
+
type="number"
|
|
36
|
+
min="0"
|
|
37
|
+
addon-after="(米/秒)"
|
|
38
|
+
/>
|
|
39
|
+
</mapgis-ui-form-item>
|
|
40
|
+
<mapgis-ui-form-item label="颜色">
|
|
41
|
+
<mapgis-ui-sketch-color-picker
|
|
42
|
+
:color.sync="floodColorCopy"
|
|
43
|
+
:disableAlpha="false"
|
|
44
|
+
></mapgis-ui-sketch-color-picker>
|
|
45
|
+
</mapgis-ui-form-item>
|
|
46
|
+
</mapgis-ui-setting-form>
|
|
47
|
+
<mapgis-ui-setting-footer>
|
|
48
|
+
<mapgis-ui-button type="primary" @click="analysis"
|
|
49
|
+
>分析</mapgis-ui-button
|
|
50
|
+
>
|
|
51
|
+
<mapgis-ui-button @click="remove">清除</mapgis-ui-button>
|
|
52
|
+
</mapgis-ui-setting-footer>
|
|
114
53
|
</div>
|
|
115
54
|
</slot>
|
|
116
55
|
</div>
|
|
117
56
|
</template>
|
|
118
57
|
|
|
119
58
|
<script>
|
|
120
|
-
import
|
|
59
|
+
import VueOptions from "../Base/Vue/VueOptions";
|
|
60
|
+
import {
|
|
61
|
+
colorToCesiumColor,
|
|
62
|
+
isDepthTestAgainstTerrainEnable,
|
|
63
|
+
setDepthTestAgainstTerrainEnable
|
|
64
|
+
} from "../WebGlobe/util";
|
|
121
65
|
|
|
122
66
|
export default {
|
|
123
|
-
name: "mapgis-3d-flood",
|
|
124
|
-
|
|
67
|
+
name: "mapgis-3d-analysis-flood",
|
|
68
|
+
inject: ["Cesium", "CesiumZondy", "webGlobe"],
|
|
125
69
|
props: {
|
|
70
|
+
...VueOptions,
|
|
71
|
+
/**
|
|
72
|
+
* @type Number
|
|
73
|
+
* @default 0
|
|
74
|
+
* @description 洪水淹没水体起始高度
|
|
75
|
+
*/
|
|
126
76
|
startHeight: {
|
|
127
77
|
type: Number,
|
|
128
78
|
default: 0
|
|
129
79
|
},
|
|
80
|
+
/**
|
|
81
|
+
* @type Number
|
|
82
|
+
* @default 0
|
|
83
|
+
* @description 淹没动画高度起始点
|
|
84
|
+
*/
|
|
130
85
|
minHeight: {
|
|
131
86
|
type: Number,
|
|
132
87
|
default: 0
|
|
133
88
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
89
|
+
/**
|
|
90
|
+
* @type Number
|
|
91
|
+
* @default 2000
|
|
92
|
+
* @description 最大淹没高度,淹没动画高度终止点
|
|
93
|
+
*/
|
|
138
94
|
maxHeight: {
|
|
139
95
|
type: Number,
|
|
140
|
-
default:
|
|
96
|
+
default: 2000
|
|
141
97
|
},
|
|
98
|
+
/**
|
|
99
|
+
* @type String
|
|
100
|
+
* @default "rgba(149,232,249,0.5)"
|
|
101
|
+
* @description 洪水颜色
|
|
102
|
+
*/
|
|
142
103
|
floodColor: {
|
|
143
104
|
type: String,
|
|
144
|
-
default: "
|
|
105
|
+
default: "rgba(149,232,249,0.5)"
|
|
145
106
|
},
|
|
107
|
+
/**
|
|
108
|
+
* @type Number
|
|
109
|
+
* @default 500
|
|
110
|
+
* @description 洪水淹没速度,单位 米/秒
|
|
111
|
+
*/
|
|
146
112
|
floodSpeed: {
|
|
147
113
|
type: Number,
|
|
148
|
-
default:
|
|
114
|
+
default: 500
|
|
149
115
|
},
|
|
116
|
+
/**
|
|
117
|
+
* @type Number
|
|
118
|
+
* @default 2
|
|
119
|
+
* @description 反射光线强度
|
|
120
|
+
*/
|
|
150
121
|
specularIntensity: {
|
|
151
122
|
type: Number,
|
|
152
|
-
default:
|
|
123
|
+
default: 2
|
|
153
124
|
},
|
|
125
|
+
/**
|
|
126
|
+
* @type Number
|
|
127
|
+
* @default 10
|
|
128
|
+
* @description 水波高度
|
|
129
|
+
*/
|
|
154
130
|
amplitude: {
|
|
155
131
|
type: Number,
|
|
156
132
|
default: 10
|
|
157
133
|
},
|
|
134
|
+
/**
|
|
135
|
+
* @type Number
|
|
136
|
+
* @default 0.01
|
|
137
|
+
* @description 水纹速度
|
|
138
|
+
*/
|
|
158
139
|
animationSpeed: {
|
|
159
140
|
type: Number,
|
|
160
141
|
default: 0.01
|
|
161
142
|
},
|
|
143
|
+
/**
|
|
144
|
+
* @type Number
|
|
145
|
+
* @default 500
|
|
146
|
+
* @description 水纹频率
|
|
147
|
+
*/
|
|
162
148
|
frequency: {
|
|
163
149
|
type: Number,
|
|
164
|
-
default:
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
150
|
+
default: 500
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
data() {
|
|
154
|
+
return {
|
|
155
|
+
startHeightCopy: 0, //洪水淹没水体起始高度
|
|
156
|
+
maxHeightCopy: 2000,
|
|
157
|
+
floodColorCopy: "rgba(149,232,249,0.5)",
|
|
158
|
+
floodSpeedCopy: 500,
|
|
159
|
+
positions: null,
|
|
160
|
+
recalculate: false,
|
|
161
|
+
isDepthTestAgainstTerrainEnable: undefined, // 深度检测是否已开启,默认为undefined,当这个值为undefined的时候,说明没有赋值,不做任何处理
|
|
162
|
+
mHeight: 2000, // 淹没最高高度变化前的值
|
|
163
|
+
timer: null
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
created() {},
|
|
167
|
+
mounted() {
|
|
168
|
+
this.mount();
|
|
169
|
+
},
|
|
170
|
+
destroyed() {
|
|
171
|
+
this.unmount();
|
|
172
|
+
},
|
|
173
|
+
computed: {
|
|
174
|
+
params() {
|
|
175
|
+
const { startHeightCopy, speedCopy, floodColorCopy } = this;
|
|
176
|
+
return { startHeightCopy, speedCopy, floodColorCopy };
|
|
169
177
|
}
|
|
170
178
|
},
|
|
171
179
|
watch: {
|
|
172
|
-
|
|
173
|
-
handler: function
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const {vueKey, vueIndex} = this;
|
|
177
|
-
let webGlobe = window.CesiumZondy.getWebGlobe(vueKey);
|
|
178
|
-
let floodAnalyse = window.floodAnalyse;
|
|
179
|
-
if (floodAnalyse) {
|
|
180
|
-
floodAnalyse.maxHeight = Number(this.currentHeightCopy);
|
|
181
|
-
floodAnalyse.floodSpeed = Number(this.floodSpeedCopy);
|
|
182
|
-
floodAnalyse.frequency = Number(this.frequencyCopy);
|
|
183
|
-
floodAnalyse.animationSpeed = Number(this.animationSpeedCopy);
|
|
184
|
-
floodAnalyse.amplitude = Number(this.amplitudeCopy);
|
|
185
|
-
floodAnalyse.specularIntensity = Number(this.specularIntensityCopy);
|
|
186
|
-
floodAnalyse.isDownFlood = Number(this.floodHeightCopyTwo) > Number(this.currentHeightCopy);
|
|
187
|
-
//存储高度,方便下一次比较
|
|
188
|
-
this.floodHeightCopyTwo = Number(this.currentHeightCopy);
|
|
189
|
-
}
|
|
190
|
-
if(this.currentHeightCopy === this.maxHeightCopy){
|
|
191
|
-
this.upTitle = "上升";
|
|
192
|
-
this.upDisabled = true;
|
|
193
|
-
this.downDisabled = false;
|
|
194
|
-
}else if(this.currentHeightCopy === parseInt(this.startHeightCopyTwo)){
|
|
195
|
-
this.downTitle = "下降";
|
|
196
|
-
this.upDisabled = false;
|
|
197
|
-
this.downDisabled = true;
|
|
198
|
-
}
|
|
180
|
+
params: {
|
|
181
|
+
handler: function(e) {
|
|
182
|
+
if (this.positions) {
|
|
183
|
+
this.recalculate = true;
|
|
199
184
|
}
|
|
200
|
-
}
|
|
185
|
+
},
|
|
186
|
+
deep: true,
|
|
187
|
+
immediate: true
|
|
201
188
|
},
|
|
202
189
|
startHeight: {
|
|
203
|
-
handler
|
|
190
|
+
handler() {
|
|
204
191
|
this.startHeightCopy = this.startHeight;
|
|
205
|
-
}
|
|
192
|
+
},
|
|
193
|
+
immediate: true
|
|
206
194
|
},
|
|
207
|
-
|
|
208
|
-
handler
|
|
209
|
-
this.
|
|
210
|
-
}
|
|
195
|
+
maxHeight: {
|
|
196
|
+
handler() {
|
|
197
|
+
this.maxHeightCopy = this.maxHeight;
|
|
198
|
+
},
|
|
199
|
+
immediate: true
|
|
211
200
|
},
|
|
212
201
|
floodColor: {
|
|
213
|
-
handler
|
|
202
|
+
handler() {
|
|
214
203
|
this.floodColorCopy = this.floodColor;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
maxHeight: {
|
|
218
|
-
handler: function () {
|
|
219
|
-
this.maxHeightCopy = this.maxHeight;
|
|
220
|
-
}
|
|
204
|
+
},
|
|
205
|
+
immediate: true
|
|
221
206
|
},
|
|
222
207
|
floodSpeed: {
|
|
223
|
-
handler
|
|
208
|
+
handler() {
|
|
224
209
|
this.floodSpeedCopy = this.floodSpeed;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
specularIntensity: {
|
|
228
|
-
handler: function () {
|
|
229
|
-
this.specularIntensityCopy = this.specularIntensity;
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
amplitude: {
|
|
233
|
-
handler: function () {
|
|
234
|
-
this.amplitudeCopy = this.amplitude;
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
animationSpeed: {
|
|
238
|
-
handler: function () {
|
|
239
|
-
this.animationSpeedCopy = this.animationSpeed;
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
frequency: {
|
|
243
|
-
handler: function () {
|
|
244
|
-
this.frequencyCopy = this.frequency;
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
currentHeight: {
|
|
248
|
-
handler: function () {
|
|
249
|
-
this.currentHeightCopy = parseInt(Number(this.currentHeight));
|
|
250
|
-
}
|
|
210
|
+
},
|
|
211
|
+
immediate: true
|
|
251
212
|
},
|
|
252
213
|
maxHeightCopy: {
|
|
253
|
-
handler: function
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
214
|
+
handler: function(e) {
|
|
215
|
+
const { webGlobe, CesiumZondy, vueKey, vueIndex } = this;
|
|
216
|
+
const options = this._getSourceOptions();
|
|
217
|
+
const { floodAnalysis } = options;
|
|
218
|
+
if (!floodAnalysis) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (!this.timer) {
|
|
222
|
+
this.timer = setTimeout(() => {
|
|
223
|
+
if (this.timer) clearTimeout(this.timer);
|
|
224
|
+
this.timer = null;
|
|
225
|
+
const { maxHeightCopy } = this;
|
|
226
|
+
floodAnalysis.maxHeight = maxHeightCopy;
|
|
227
|
+
if (this.mHeight > maxHeightCopy) {
|
|
228
|
+
// 下降
|
|
229
|
+
floodAnalysis.isDownFlood = true;
|
|
230
|
+
} else if (this.mHeight < maxHeightCopy) {
|
|
231
|
+
// 上升
|
|
232
|
+
floodAnalysis.isDownFlood = false;
|
|
233
|
+
}
|
|
234
|
+
this.mHeight = maxHeightCopy;
|
|
235
|
+
webGlobe.scene.requestRender();
|
|
236
|
+
}, 1000);
|
|
257
237
|
}
|
|
258
238
|
}
|
|
259
239
|
}
|
|
260
240
|
},
|
|
261
|
-
data() {
|
|
262
|
-
return {
|
|
263
|
-
selectDefault: 'startDrawingPolygon',
|
|
264
|
-
drawToolName: "startDrawingPolygon",
|
|
265
|
-
// tools: [{
|
|
266
|
-
// name: "startDrawingPolygon",
|
|
267
|
-
// value: "多边形工具"
|
|
268
|
-
// }, {
|
|
269
|
-
// name: "startDrawingExtent",
|
|
270
|
-
// value: "矩形工具"
|
|
271
|
-
// }],
|
|
272
|
-
showOptionsPannel: false,
|
|
273
|
-
showResultPannel: false,
|
|
274
|
-
startHeightCopy: 0,
|
|
275
|
-
minHeightCopy: 0,
|
|
276
|
-
startHeightCopyTwo: 0,
|
|
277
|
-
currentHeightCopy: 0,
|
|
278
|
-
currentHeightCopyTwo: 0,
|
|
279
|
-
maxHeightCopy: 0,
|
|
280
|
-
floodColorCopy: "#4e81bb",
|
|
281
|
-
floodSpeedCopy: 0,
|
|
282
|
-
specularIntensityCopy: 0,
|
|
283
|
-
amplitudeCopy: 0,
|
|
284
|
-
animationSpeedCopy: 0,
|
|
285
|
-
frequencyCopy: 0,
|
|
286
|
-
disabled: true,
|
|
287
|
-
isFlood: false,
|
|
288
|
-
isPlayer: false,
|
|
289
|
-
upTitle: "上升",
|
|
290
|
-
downTitle: "下降",
|
|
291
|
-
upDisabled: false,
|
|
292
|
-
downDisabled: false,
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
mounted() {
|
|
296
|
-
let vm = this;
|
|
297
|
-
window.CesiumZondy.getWebGlobeByInterval(function (webGlobe) {
|
|
298
|
-
vm.$_init();
|
|
299
|
-
vm.showOptionsPannel = true;
|
|
300
|
-
vm.$emit("load", vm, webGlobe);
|
|
301
|
-
}, this.vueKey)
|
|
302
|
-
},
|
|
303
241
|
methods: {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
242
|
+
async createCesiumObject() {
|
|
243
|
+
return new Promise(
|
|
244
|
+
resolve => {
|
|
245
|
+
resolve();
|
|
246
|
+
},
|
|
247
|
+
reject => {}
|
|
248
|
+
);
|
|
249
|
+
},
|
|
250
|
+
mount() {
|
|
251
|
+
const { webGlobe, CesiumZondy, vueKey, vueIndex } = this;
|
|
252
|
+
const { viewer } = webGlobe;
|
|
253
|
+
const vm = this;
|
|
254
|
+
let promise = this.createCesiumObject();
|
|
255
|
+
promise.then(function(dataSource) {
|
|
256
|
+
vm.$emit("load", vm);
|
|
257
|
+
CesiumZondy.FloodAnalysisManager.addSource(
|
|
258
|
+
vueKey,
|
|
259
|
+
vueIndex,
|
|
260
|
+
dataSource,
|
|
261
|
+
{
|
|
262
|
+
drawElement: null,
|
|
263
|
+
floodAnalysis: null
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
});
|
|
307
267
|
},
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
268
|
+
unmount() {
|
|
269
|
+
let { CesiumZondy, vueKey, vueIndex } = this;
|
|
270
|
+
let find = CesiumZondy.FloodAnalysisManager.findSource(vueKey, vueIndex);
|
|
271
|
+
if (find) {
|
|
272
|
+
this.remove();
|
|
273
|
+
}
|
|
274
|
+
CesiumZondy.FloodAnalysisManager.deleteSource(vueKey, vueIndex);
|
|
275
|
+
this.$emit("unload", this);
|
|
311
276
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
277
|
+
/**
|
|
278
|
+
* @description rgba值转cesium内部color对象
|
|
279
|
+
* @param rgba - {String} rgba值
|
|
280
|
+
* @return {Object} cesium内部color对象
|
|
281
|
+
*/
|
|
282
|
+
_getColor(rgba) {
|
|
283
|
+
return colorToCesiumColor(rgba, this.webGlobe);
|
|
315
284
|
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
285
|
+
/**
|
|
286
|
+
* @description 开始绘制并分析
|
|
287
|
+
*/
|
|
288
|
+
analysis() {
|
|
289
|
+
const { CesiumZondy, vueKey, vueIndex } = this;
|
|
290
|
+
const options = this._getSourceOptions();
|
|
291
|
+
let { drawElement } = options;
|
|
292
|
+
const { viewer } = this.webGlobe;
|
|
293
|
+
// 初始化交互式绘制控件
|
|
294
|
+
drawElement = drawElement || new Cesium.DrawElement(viewer);
|
|
295
|
+
CesiumZondy.FloodAnalysisManager.changeOptions(
|
|
296
|
+
vueKey,
|
|
297
|
+
vueIndex,
|
|
298
|
+
"drawElement",
|
|
299
|
+
drawElement
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
// 激活交互式绘制工具
|
|
303
|
+
drawElement.startDrawingPolygon({
|
|
304
|
+
// 绘制完成回调函数
|
|
305
|
+
callback: positions => {
|
|
306
|
+
this.remove();
|
|
307
|
+
this.positions = positions;
|
|
308
|
+
this._doAnalysis();
|
|
309
|
+
}
|
|
321
310
|
});
|
|
322
311
|
},
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
let {Cesium, vueKey, vueIndex} = this;
|
|
332
|
-
let vm = this;
|
|
333
|
-
if (!Cesium) {
|
|
334
|
-
Cesium = window.Cesium;
|
|
335
|
-
}
|
|
336
|
-
//开始分析前,删除上一次分析
|
|
337
|
-
if (webGlobe.scene.VisualAnalysisManager._visualAnalysisList.length > 0) {
|
|
338
|
-
webGlobe.scene.VisualAnalysisManager.removeAll();
|
|
339
|
-
window.CesiumZondy.FloodAnalyseManager.deleteSource(vueKey, vueIndex);
|
|
312
|
+
/**
|
|
313
|
+
* @description 进行洪水淹没分析
|
|
314
|
+
*/
|
|
315
|
+
_doAnalysis() {
|
|
316
|
+
const { positions } = this;
|
|
317
|
+
if (!positions) {
|
|
318
|
+
this.$message.warning("请绘制分析区域");
|
|
319
|
+
return;
|
|
340
320
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
321
|
+
const { CesiumZondy, vueKey, vueIndex } = this;
|
|
322
|
+
const options = this._getSourceOptions();
|
|
323
|
+
let { floodAnalysis } = options;
|
|
324
|
+
const { viewer } = this.webGlobe;
|
|
325
|
+
const {
|
|
326
|
+
startHeightCopy,
|
|
327
|
+
minHeight,
|
|
328
|
+
maxHeightCopy,
|
|
329
|
+
floodColorCopy,
|
|
330
|
+
floodSpeedCopy,
|
|
331
|
+
specularIntensity,
|
|
332
|
+
amplitude,
|
|
333
|
+
animationSpeed,
|
|
334
|
+
frequency
|
|
335
|
+
} = this;
|
|
336
|
+
// 初始化高级分析功能管理类
|
|
337
|
+
const advancedAnalysisManager = new this.CesiumZondy.Manager.AdvancedAnalysisManager(
|
|
338
|
+
{
|
|
339
|
+
viewer: viewer
|
|
357
340
|
}
|
|
341
|
+
);
|
|
342
|
+
// 初始化洪水淹没分析类
|
|
343
|
+
floodAnalysis =
|
|
344
|
+
floodAnalysis ||
|
|
345
|
+
advancedAnalysisManager.createFlood(positions, {
|
|
346
|
+
// 设置洪水淹没区域动画最低高度
|
|
347
|
+
minHeight: Number(minHeight), // 设置洪水淹没区域动画最低高度
|
|
348
|
+
// 设置洪水淹没区域最高高度
|
|
349
|
+
maxHeight: Number(maxHeightCopy),
|
|
350
|
+
// 设置洪水上涨速度
|
|
351
|
+
floodSpeed: Number(floodSpeedCopy)
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
// 洪水淹没区域最低高度
|
|
355
|
+
floodAnalysis.startHeight = Number(startHeightCopy);
|
|
356
|
+
// 洪水颜色
|
|
357
|
+
floodAnalysis.floodColor = this._getColor(floodColorCopy);
|
|
358
|
+
// 水纹频率 指波浪的个数
|
|
359
|
+
floodAnalysis.frequency = Number(frequency);
|
|
360
|
+
// 水纹速度
|
|
361
|
+
floodAnalysis.animationSpeed = Number(animationSpeed);
|
|
362
|
+
// 水波的高度
|
|
363
|
+
floodAnalysis.amplitude = Number(amplitude);
|
|
364
|
+
// 指定光线强度
|
|
365
|
+
floodAnalysis.specularIntensity = Number(specularIntensity);
|
|
366
|
+
|
|
367
|
+
this.isDepthTestAgainstTerrainEnable = isDepthTestAgainstTerrainEnable(
|
|
368
|
+
this.webGlobe
|
|
369
|
+
);
|
|
370
|
+
if (!this.isDepthTestAgainstTerrainEnable) {
|
|
371
|
+
// 如果深度检测没有开启,则开启
|
|
372
|
+
setDepthTestAgainstTerrainEnable(true, this.webGlobe);
|
|
358
373
|
}
|
|
359
|
-
|
|
360
|
-
this.
|
|
361
|
-
this.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
//设置洪水淹没区域最高高度
|
|
369
|
-
maxHeight: Number(this.currentHeightCopy),
|
|
370
|
-
//设置洪水上涨速度
|
|
371
|
-
floodSpeed: Number(this.floodSpeedCopy),
|
|
372
|
-
floodColor: Cesium.Color.fromCssColorString(this.floodColorCopy),
|
|
373
|
-
//水纹频率 指波浪的个数
|
|
374
|
-
frequency: Number(this.frequencyCopy),
|
|
375
|
-
//水纹速度
|
|
376
|
-
animationSpeed: Number(this.animationSpeedCopy),
|
|
377
|
-
//水波的高度
|
|
378
|
-
amplitude: Number(this.amplitudeCopy),
|
|
379
|
-
// 指定光线强度
|
|
380
|
-
specularIntensity: Number(this.specularIntensityCopy),
|
|
381
|
-
});
|
|
382
|
-
window.floodAnalyse = floodAnalyse;
|
|
383
|
-
//设置深度检测
|
|
384
|
-
webGlobe.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
385
|
-
//添加洪水淹没结果显示
|
|
386
|
-
webGlobe.scene.VisualAnalysisManager.add(floodAnalyse);
|
|
387
|
-
//一定是在下一帧,开启对currentHeightCopy的监听操作
|
|
388
|
-
this.$nextTick(function () {
|
|
389
|
-
this.showResultPannel = true;
|
|
390
|
-
this.showOptionsPannel = false;
|
|
391
|
-
//停止绘制
|
|
392
|
-
window.drawElement.stopDrawing();
|
|
393
|
-
this.isFlood = true;
|
|
394
|
-
})
|
|
374
|
+
// 添加洪水淹没结果显示
|
|
375
|
+
this.webGlobe.scene.VisualAnalysisManager.add(floodAnalysis);
|
|
376
|
+
this.mHeight = maxHeightCopy;
|
|
377
|
+
CesiumZondy.FloodAnalysisManager.changeOptions(
|
|
378
|
+
vueKey,
|
|
379
|
+
vueIndex,
|
|
380
|
+
"floodAnalysis",
|
|
381
|
+
floodAnalysis
|
|
382
|
+
);
|
|
395
383
|
},
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
384
|
+
/**
|
|
385
|
+
* @description 获取SourceOptions,以方便获取洪水淹没分析对象和绘制对象
|
|
386
|
+
* @return SourceOptions对象
|
|
387
|
+
*/
|
|
388
|
+
_getSourceOptions() {
|
|
389
|
+
const { CesiumZondy, vueKey, vueIndex } = this;
|
|
390
|
+
const find = CesiumZondy.FloodAnalysisManager.findSource(
|
|
391
|
+
vueKey,
|
|
392
|
+
vueIndex
|
|
393
|
+
);
|
|
394
|
+
const { options } = find;
|
|
395
|
+
return options;
|
|
401
396
|
},
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
408
|
-
this.$nextTick(function () {
|
|
409
|
-
this.downDisabled = false;
|
|
410
|
-
});
|
|
397
|
+
/**
|
|
398
|
+
* @description 重新进行洪水淹没分析
|
|
399
|
+
*/
|
|
400
|
+
refresh() {
|
|
401
|
+
this._removeFlood();
|
|
402
|
+
this._doAnalysis();
|
|
411
403
|
},
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
this.
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
break;
|
|
404
|
+
/**
|
|
405
|
+
* @description 恢复深度检测设置
|
|
406
|
+
*/
|
|
407
|
+
_restoreDepthTestAgainstTerrain() {
|
|
408
|
+
if (
|
|
409
|
+
this.isDepthTestAgainstTerrainEnable !== undefined &&
|
|
410
|
+
this.isDepthTestAgainstTerrainEnable !==
|
|
411
|
+
isDepthTestAgainstTerrainEnable(this.webGlobe)
|
|
412
|
+
) {
|
|
413
|
+
setDepthTestAgainstTerrainEnable(
|
|
414
|
+
this.isDepthTestAgainstTerrainEnable,
|
|
415
|
+
this.webGlobe
|
|
416
|
+
);
|
|
426
417
|
}
|
|
427
418
|
},
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
419
|
+
/**
|
|
420
|
+
* @description 移除洪水淹没分析结果
|
|
421
|
+
*/
|
|
422
|
+
_removeFlood() {
|
|
423
|
+
const { CesiumZondy, vueKey, vueIndex } = this;
|
|
424
|
+
const options = this._getSourceOptions();
|
|
425
|
+
const { floodAnalysis } = options;
|
|
426
|
+
|
|
427
|
+
// 判断是否已有洪水淹没分析结果
|
|
428
|
+
if (floodAnalysis) {
|
|
429
|
+
// 移除洪水淹没分析显示结果
|
|
430
|
+
this.webGlobe.scene.VisualAnalysisManager.remove(floodAnalysis);
|
|
431
|
+
CesiumZondy.FloodAnalysisManager.changeOptions(
|
|
432
|
+
vueKey,
|
|
433
|
+
vueIndex,
|
|
434
|
+
"floodAnalysis",
|
|
435
|
+
null
|
|
436
|
+
);
|
|
442
437
|
}
|
|
443
|
-
|
|
444
|
-
$_pause(){
|
|
445
|
-
this.isPlayer = false;
|
|
446
|
-
},
|
|
447
|
-
//对外的playAnalyse
|
|
448
|
-
playAnalyse(start,end,forward,rate,timeDiff){
|
|
449
|
-
this.$_playAnalyse(start,end,forward,rate,timeDiff);
|
|
450
|
-
},
|
|
451
|
-
//对外的上升方法
|
|
452
|
-
up(){
|
|
453
|
-
this.$_playAnalyse(this.currentHeightCopy,this.maxHeightCopy,1);
|
|
454
|
-
},
|
|
455
|
-
//对外的下降方法
|
|
456
|
-
down(){
|
|
457
|
-
this.$_playAnalyse(this.startHeightCopyTwo,this.currentHeightCopy,-1);
|
|
458
|
-
},
|
|
459
|
-
//对外暂停听方法
|
|
460
|
-
pause(){
|
|
461
|
-
this.$_pause();
|
|
438
|
+
this._restoreDepthTestAgainstTerrain();
|
|
462
439
|
},
|
|
463
440
|
/**
|
|
464
|
-
*
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
this.
|
|
484
|
-
|
|
485
|
-
i++;
|
|
486
|
-
vm.currentHeightCopy = parseInt(Number((vm.currentHeightCopy + speed * forward).toFixed(4)));
|
|
487
|
-
if(!vm.isPlayer){
|
|
488
|
-
vm.isPlayer = true;
|
|
489
|
-
clearInterval(interval);
|
|
490
|
-
}
|
|
491
|
-
if(i === time){
|
|
492
|
-
vm.currentHeightCopy = parseInt(forward > 0 ? Number(end) : Number(start));
|
|
493
|
-
clearInterval(interval);
|
|
494
|
-
}
|
|
495
|
-
},timeOut)
|
|
496
|
-
},
|
|
497
|
-
//停止洪水淹没分析
|
|
498
|
-
$_stopAnalyse() {
|
|
499
|
-
const {vueKey, vyeIndex} = this;
|
|
500
|
-
//删除淹没分析
|
|
501
|
-
webGlobe.scene.VisualAnalysisManager.removeAll();
|
|
502
|
-
//停止绘制
|
|
503
|
-
window.drawElement.stopDrawing();
|
|
504
|
-
//删除管理对象
|
|
505
|
-
window.CesiumZondy.FloodAnalyseManager.deleteSource(vueKey, vyeIndex);
|
|
506
|
-
//启用开始分析按钮
|
|
507
|
-
this.disabled = true;
|
|
508
|
-
//高度置零
|
|
509
|
-
this.currentHeight = 0;
|
|
510
|
-
this.currentHeightCopy = 0;
|
|
441
|
+
* @description 移除洪水淹没分析结果,取消交互式绘制事件激活状态,恢复深度检测设置
|
|
442
|
+
*/
|
|
443
|
+
remove() {
|
|
444
|
+
this._removeFlood();
|
|
445
|
+
const { CesiumZondy, vueKey, vueIndex } = this;
|
|
446
|
+
const options = this._getSourceOptions();
|
|
447
|
+
const { drawElement } = options;
|
|
448
|
+
|
|
449
|
+
if (drawElement) {
|
|
450
|
+
// 取消交互式绘制事件激活状态
|
|
451
|
+
drawElement.stopDrawing();
|
|
452
|
+
CesiumZondy.FloodAnalysisManager.changeOptions(
|
|
453
|
+
vueKey,
|
|
454
|
+
vueIndex,
|
|
455
|
+
"drawElement",
|
|
456
|
+
null
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
this.positions = null;
|
|
461
|
+
this.recalculate = false;
|
|
511
462
|
}
|
|
512
463
|
}
|
|
513
|
-
}
|
|
464
|
+
};
|
|
514
465
|
</script>
|
|
515
|
-
|
|
516
466
|
<style scoped>
|
|
517
|
-
.flood-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
left: 10px;
|
|
521
|
-
width: 376px;
|
|
522
|
-
height: 364px;
|
|
523
|
-
background: white;
|
|
524
|
-
border-radius: 5px;
|
|
525
|
-
padding: 10px;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
.flood-title {
|
|
529
|
-
text-align: left;
|
|
530
|
-
margin-top: 0.3em;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
.flood-input {
|
|
534
|
-
width: 235px;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.flood-color-picker {
|
|
538
|
-
position: absolute;
|
|
539
|
-
right: 10px;
|
|
540
|
-
top: 8px;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.flood-button {
|
|
544
|
-
position: absolute;
|
|
545
|
-
right: -140px;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.flood-button-stop {
|
|
549
|
-
right: -117px;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.flood-select {
|
|
553
|
-
position: absolute;
|
|
554
|
-
left: 0;
|
|
555
|
-
width: 235px;
|
|
467
|
+
.mapgis-widget-flood-analysis {
|
|
468
|
+
max-height: calc(50vh);
|
|
469
|
+
overflow-y: auto;
|
|
556
470
|
}
|
|
557
471
|
|
|
558
|
-
|
|
559
|
-
margin:
|
|
472
|
+
::v-deep .mapgis-ui-form-item {
|
|
473
|
+
margin-bottom: 0;
|
|
560
474
|
}
|
|
561
475
|
|
|
562
|
-
.
|
|
563
|
-
|
|
564
|
-
padding-left: 0.5em;
|
|
565
|
-
text-align: left;
|
|
476
|
+
::v-deep .mapgis-ui-form label {
|
|
477
|
+
font-size: 12px;
|
|
566
478
|
}
|
|
567
479
|
|
|
568
|
-
.
|
|
569
|
-
|
|
570
|
-
right: 1px;
|
|
571
|
-
bottom: -32px;
|
|
480
|
+
::v-deep .mapgis-ui-form-item-label {
|
|
481
|
+
line-height: 40px;
|
|
572
482
|
}
|
|
573
483
|
|
|
574
|
-
.
|
|
575
|
-
|
|
576
|
-
right: -1px;
|
|
577
|
-
bottom: -28px;
|
|
484
|
+
::v-deep .mapgis-ui-input {
|
|
485
|
+
padding: 4px 11px;
|
|
578
486
|
}
|
|
579
|
-
</style>
|
|
487
|
+
</style>
|