فهرست منبع

再次添加切换到地图刷新编辑界面数据功能

guolei 1 سال پیش
والد
کامیت
fdf2d15690

+ 2 - 1
src/api/workManagement.js

@@ -37,7 +37,7 @@ const sceneCarList = basePart + '/simulationProject/getMultiSimulationSceneCarLi
 const deleteRecord = basePart + '/simulationProject/deleteMultiSimulationSceneCar';//删除记录
 const settingsSimulation = basePart + '/simulationProject/setMultiSimulationSceneCarView';//设置仿真视角
 const saveOrUpdateSceneCarList = basePart + '/simulationProject/addOrUpdateMultiSimulationSceneCarList';//设置仿真视角
-
+const getMultiSimulationSceneDetail = basePart + '/simulationProject/getMultiSimulationSceneDetail';//获取多模式仿真场景详情
 export default {
     addOrUpdateProject,
     selectProjectById,
@@ -60,6 +60,7 @@ export default {
 	deleteRecord,
 	settingsSimulation,
 	saveOrUpdateSceneCarList,
+	getMultiSimulationSceneDetail,
 
     selectProjectDetailsById,
     selectProjectTaskList,

+ 9 - 9
src/views/workManagement/components/pathDialog.vue

@@ -120,10 +120,10 @@
 			},
 			switchStartPoint(newVal) {
 				let currentSelectPath = this.dataParams.selectedPoints[this.selectTrack.id];
-				if(!currentSelectPath){
+				if (!currentSelectPath) {
 					currentSelectPath = {
-						'start':[],
-						'end':[]
+						'start': [],
+						'end': []
 					};
 				}
 				let pointNames = currentSelectPath["start"];
@@ -137,14 +137,14 @@
 			},
 			switchEndPoint(newVal) {
 				let currentSelectPath = this.dataParams.selectedPoints[this.selectTrack.id];
-				if(!currentSelectPath){
+				if (!currentSelectPath) {
 					currentSelectPath = {
-						'start':[],
-						'end':[]
+						'start': [],
+						'end': []
 					};
 				}
 				let pointNames = currentSelectPath["end"];
-				
+
 				let searchIndex = pointNames.indexOf(this.preEndPointName);
 				if (searchIndex != -1) {
 					pointNames.splice(searchIndex, 1);
@@ -174,8 +174,8 @@
 		watch: {
 			params: {
 				handler(newVal, oldVal) {
-					this.selectTrack = {},
-						this.dataParams = JSON.parse(JSON.stringify(newVal));
+					this.selectTrack = {};
+					this.dataParams = JSON.parse(JSON.stringify(newVal));
 					this.preStartPointName = this.dataParams.pathStartJson.name;
 					this.preEndPointName = this.dataParams.pathEndJson.name;
 					this.getMapDetails(newVal.mapId);

+ 12 - 0
src/views/workManagement/components/simulationTable.vue

@@ -92,6 +92,10 @@
 			sceneId: {
 				type: String,
 				default: _ => ""
+			},
+			mapId: {
+				type: String,
+				default: _ => ""
 			}
 		},
 		computed: {
@@ -142,6 +146,7 @@
 					url: this.$api.workManagement.sceneCarList,
 					data: {
 						"sceneId": this.sceneId,
+						"mapId": this.mapId,
 						"pageNum": "1",
 						"pageSize": 999999
 					}
@@ -303,6 +308,13 @@
 					.S4() +
 					this.S4() + this.S4());
 			}
+		},
+		watch: {
+			mapId: {
+				handler(newVal, oldVal) {
+					this.getSceneCarList();
+				}
+			}
 		}
 	}
 </script>

+ 2 - 4
src/views/workManagement/multimodeSimulationEdit.vue

@@ -72,10 +72,8 @@
 					}
 				}).then((res) => {
 					if (res.code == 200) {
-						console.log("阿数据",res)
-						let data = res.info;
-						if(data.mapId){
-							this.openDrive.mapId = data.mapId;
+						if(res.info.mapId){
+							this.openDrive.mapId = res.info.mapId;
 						}
 					}
 				})