|
@@ -2,7 +2,7 @@
|
|
<div class="container">
|
|
<div class="container">
|
|
<div class="select-map" :class="{'no-interaction': isDisabled}">
|
|
<div class="select-map" :class="{'no-interaction': isDisabled}">
|
|
地图选择:
|
|
地图选择:
|
|
- <el-select class="select-content" v-model="openDrive.mapId" placeholder="请选择">
|
|
|
|
|
|
+ <el-select class="select-content" v-model="openDrive.mapId" placeholder="请选择" @change="changeMapId">
|
|
<el-option v-for="(item, index) in mapList" :key="item.id" :label="item.mapName" :value="item.id">
|
|
<el-option v-for="(item, index) in mapList" :key="item.id" :label="item.mapName" :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -11,7 +11,7 @@
|
|
<open-drive class="map" ref="openDrive" :mapId="openDrive.mapId" :startPoint="openDrive.pathStartJson"
|
|
<open-drive class="map" ref="openDrive" :mapId="openDrive.mapId" :startPoint="openDrive.pathStartJson"
|
|
:endPoint="openDrive.pathEndJson" :sections="openDrive.sections"></open-drive>
|
|
:endPoint="openDrive.pathEndJson" :sections="openDrive.sections"></open-drive>
|
|
<SimulationTable ref="table" @simulationBtnCallBack="settingSimulation" @openDialog="showDialog"
|
|
<SimulationTable ref="table" @simulationBtnCallBack="settingSimulation" @openDialog="showDialog"
|
|
- class="table" :sceneId="sceneId" :class="{'no-interaction': isDisabled}"/>
|
|
|
|
|
|
+ class="table" :sceneId="sceneId" :mapId="openDrive.mapId" :class="{'no-interaction': isDisabled}" />
|
|
</div>
|
|
</div>
|
|
<div class="operate" :class="{'no-interaction': isDisabled}">
|
|
<div class="operate" :class="{'no-interaction': isDisabled}">
|
|
<el-button @click="saveAll" class="btn" type="primary">保存</el-button>
|
|
<el-button @click="saveAll" class="btn" type="primary">保存</el-button>
|
|
@@ -60,8 +60,29 @@
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.getMapList();
|
|
this.getMapList();
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getDefaultMap() {
|
|
|
|
+ this.$axios({
|
|
|
|
+ method: "post",
|
|
|
|
+ url: this.$api.workManagement.getMultiSimulationSceneDetail,
|
|
|
|
+ data: {
|
|
|
|
+ "sceneId": this.sceneId
|
|
|
|
+ }
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ console.log("阿数据",res)
|
|
|
|
+ let data = res.info;
|
|
|
|
+ if(data.mapId){
|
|
|
|
+ this.openDrive.mapId = data.mapId;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ changeMapId() {
|
|
|
|
+ console.log(this.openDrive.mapId);
|
|
|
|
+ },
|
|
getMapList() {
|
|
getMapList() {
|
|
this.$axios({
|
|
this.$axios({
|
|
method: "post",
|
|
method: "post",
|
|
@@ -86,6 +107,7 @@
|
|
this.mapList = res.info;
|
|
this.mapList = res.info;
|
|
if (this.mapList.length > 0) {
|
|
if (this.mapList.length > 0) {
|
|
this.openDrive.mapId = this.mapList[0].id;
|
|
this.openDrive.mapId = this.mapList[0].id;
|
|
|
|
+ this.getDefaultMap();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -112,12 +134,12 @@
|
|
"sceneCarId": row.id,
|
|
"sceneCarId": row.id,
|
|
}
|
|
}
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- if(res.code == 200){
|
|
|
|
|
|
+ if (res.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '设为仿真视角成功',
|
|
message: '设为仿真视角成功',
|
|
type: 'success'
|
|
type: 'success'
|
|
});
|
|
});
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.$message({
|
|
this.$message({
|
|
message: '设为仿真视角失败',
|
|
message: '设为仿真视角失败',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -154,11 +176,11 @@
|
|
this.$refs.table.updateRow(data);
|
|
this.$refs.table.updateRow(data);
|
|
this.reloadMap();
|
|
this.reloadMap();
|
|
},
|
|
},
|
|
- saveAll(){
|
|
|
|
|
|
+ saveAll() {
|
|
this.$refs.table.saveAll(this.openDrive.mapId);
|
|
this.$refs.table.saveAll(this.openDrive.mapId);
|
|
},
|
|
},
|
|
- back(){
|
|
|
|
-
|
|
|
|
|
|
+ back() {
|
|
|
|
+
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -166,11 +188,12 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang='less' scoped>
|
|
<style lang='less' scoped>
|
|
- *{
|
|
|
|
|
|
+ * {
|
|
margin: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
padding: 0;
|
|
box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
}
|
|
}
|
|
|
|
+
|
|
.mainBox {
|
|
.mainBox {
|
|
padding-bottom: 0px !important
|
|
padding-bottom: 0px !important
|
|
}
|
|
}
|
|
@@ -272,12 +295,13 @@
|
|
top: 0 !important;
|
|
top: 0 !important;
|
|
right: 10rem !important;
|
|
right: 10rem !important;
|
|
}
|
|
}
|
|
|
|
+
|
|
.no-interaction {
|
|
.no-interaction {
|
|
- pointer-events: none;
|
|
|
|
- /* 其他样式,比如背景色、边框等 */
|
|
|
|
-/* background-color: #f0f0f0;
|
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ /* 其他样式,比如背景色、边框等 */
|
|
|
|
+ /* background-color: #f0f0f0;
|
|
border: 1px solid #ccc; */
|
|
border: 1px solid #ccc; */
|
|
-/* padding: 10px;
|
|
|
|
|
|
+ /* padding: 10px;
|
|
margin: 10px; */
|
|
margin: 10px; */
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|