|
@@ -239,83 +239,21 @@ export function setStationData(data: any) {
|
|
|
|
|
|
let strategyMapState = false
|
|
let strategyMapState = false
|
|
|
|
|
|
-export function strategyMap(direction: any) {
|
|
|
|
- if (strategyMapState) {
|
|
|
|
- updateStrategyMapCoord(direction)
|
|
|
|
- } else {
|
|
|
|
- addStrategyMap(direction)
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * 添加太湖湖面图层
|
|
|
|
- * @param data
|
|
|
|
- */
|
|
|
|
-export function addStrategyMap(direction: any) {
|
|
|
|
- let descriptor = {
|
|
|
|
- "command": "AddStrategyMap",
|
|
|
|
- "data": {
|
|
|
|
- "id": "strategymap_id",
|
|
|
|
- "coord_type": "0",
|
|
|
|
- "cad_mapkey": "ea",
|
|
|
|
- "coord_z_type": "0",
|
|
|
|
- "type": "5",
|
|
|
|
- "is_gather": "true",
|
|
|
|
- "animation_type": "0",
|
|
|
|
- "start_coord": "119.938890, 31.106388",
|
|
|
|
- "start_coord_z": "600",
|
|
|
|
- "target_data": [
|
|
|
|
- {
|
|
|
|
- "target_coord": "120.405242, 31.444280",
|
|
|
|
- "target_coord_z": "600",
|
|
|
|
- "color": "ff0000"
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- Bus.emit('emitUIInteraction', descriptor);
|
|
|
|
- console.log("-- 添加太湖湖面图层:", JSON.stringify(descriptor));
|
|
|
|
- strategyMapState = true
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
- * 更新太湖湖面图层
|
|
|
|
- * @param data
|
|
|
|
|
|
+ * 设置太湖湖面图层
|
|
|
|
+ * @param direction
|
|
|
|
+ * @param slope
|
|
|
|
+ * @param show
|
|
*/
|
|
*/
|
|
-export function updateStrategyMapCoord(direction: any) {
|
|
|
|
|
|
+export function strategyMap(direction: string, slope: string, show = true) {
|
|
let descriptor = {
|
|
let descriptor = {
|
|
- "command": "UpdateStrategyMapCoord",
|
|
|
|
|
|
+ "command": "InclinedAngle",
|
|
"data": {
|
|
"data": {
|
|
- "id": "strategymap_id",
|
|
|
|
- "coord_type": "0",
|
|
|
|
- "cad_mapkey": "ea",
|
|
|
|
- "coord_z_type": "0",
|
|
|
|
- "start_coord": "120.243630, 30.9273",
|
|
|
|
- "start_coord_z": "100",
|
|
|
|
- "target_data": [
|
|
|
|
- {
|
|
|
|
- "target_coord": "120.405242, 31.444280",
|
|
|
|
- "target_coord_z": "200"
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- Bus.emit('emitUIInteraction', descriptor);
|
|
|
|
- console.log("-- 更新太湖湖面图层:", JSON.stringify(descriptor));
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * 删除太湖湖面图层
|
|
|
|
- */
|
|
|
|
-export function deleteStrategyMap() {
|
|
|
|
- let descriptor = {
|
|
|
|
- "command": "DelLevel",
|
|
|
|
- "data": {
|
|
|
|
- "id": "strategymap_id",
|
|
|
|
- "type": "3"
|
|
|
|
|
|
+ "Direction": direction,
|
|
|
|
+ "Slope": slope,
|
|
|
|
+ "Diaplay": show ? 'true' : 'false'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Bus.emit('emitUIInteraction', descriptor);
|
|
Bus.emit('emitUIInteraction', descriptor);
|
|
- console.log("-- 删除太湖湖面图层:", JSON.stringify(descriptor));
|
|
|
|
- strategyMapState = false
|
|
|
|
|
|
+ console.log("-- 太湖湖面图层:", JSON.stringify(descriptor));
|
|
}
|
|
}
|