This commit is contained in:
fan 2020-05-09 20:25:18 +08:00
commit f57bf47c7c
5 changed files with 60 additions and 31 deletions

View File

@ -430,6 +430,13 @@ export const asyncRouter = [
}
]
},
{
path: '/displayBigScreen/:mapId',
component: BigScreen,
meta: {
},
hidden: true
},
{ // 综合演练室
path: '/trainroom',
component: TrainRoom,

View File

@ -234,6 +234,9 @@ export default {
console.log(error);
}
},
async enterScreen() {
this.$router.push({ path: `/displayBigScreen/${this.courseModel.mapId}` });
},
async start() {
if (this.courseModel.prdType == '05') {
this.jumpScheduling();
@ -241,6 +244,8 @@ export default {
this.createRoom();
} else if (this.courseModel.prdType == '06') {
this.enterISCS();
} else if (this.courseModel.prdType == '07') {
this.enterScreen();
} else {
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
this.jump();

View File

@ -17,7 +17,7 @@ export default {
props: {
widthLeft: {
type: Number,
required: true
default: 0
}
},
data() {
@ -99,18 +99,33 @@ export default {
},
setWindowSize() {
this.$nextTick(() => {
if (this.widthLeft) {
const width = this.$store.state.app.width - (this.widthLeft || 450) - 2;
const height = this.height;
this.$store.dispatch('config/resize', { width, height });
} else {
const width = this.$store.state.app.width - 2;
const height = this.$store.state.app.height;
this.$store.dispatch('config/resize', { width, height });
}
});
},
handleUpdateScreen() {
if (this.widthLeft) {
const size = {
width: this.$store.state.app.width - (this.widthLeft || 450) - 2,
height: this.height,
num: this.$theme.loadPropConvert(this.$store.state.map.map.skinVO.code).screenLine
};
this.$jlmap.setUpdateScreen(size);
} else {
const size = {
width: this.$store.state.app.width - 2,
height: this.$store.state.app.height,
num: this.$theme.loadPropConvert(this.$store.state.map.map.skinVO.code).screenLine
};
this.$jlmap.setUpdateScreen(size);
}
}
}
};

View File

@ -4,8 +4,8 @@
ref="routeEdit"
:selected="selected"
:map-info="mapInfo"
:route-data="routeData"
/>
<!-- :route-data="routeData" -->
<route-detail ref="routeDetail" :map-info="mapInfo" @routingSelected="routingSelected" />
</div>
</template>
@ -35,8 +35,8 @@ export default {
},
data() {
return {
enabledTab: 'Route',
routeData: null
enabledTab: 'Route'
// routeData: null
};
},
methods: {
@ -58,9 +58,9 @@ export default {
}
},
routingSelected: function (data) {
this.routeData = data;
// this.routeData = data;
if (this.$refs && this.$refs.routeEdit) {
this.$refs.routeEdit.editData();
this.$refs.routeEdit.editData(data);
}
},
previewRouteEvent: function () {

View File

@ -191,13 +191,13 @@ export default {
default() {
return null;
}
},
routeData: {
type: Object,
default() {
return null;
}
}
// routeData: {
// type: Object,
// default() {
// return null;
// }
// }
},
data() {
return {
@ -299,11 +299,12 @@ export default {
this.addModel.mapId = val.id;
}
},
routeData(val, old) {
if (val) {
this.addModel = val;
}
},
// routeData(val, old) {
// debugger;
// if (val) {
// this.addModel = val;
// }
// },
'addModel.parkSectionCodeList':function(val, old) {
this.changeSectionSelected(val, true);
},
@ -318,7 +319,6 @@ export default {
this.rowDrop();
},
beforeDestroy() {
// debugger;
},
methods: {
//
@ -363,11 +363,12 @@ export default {
}
});
},
editData() {
editData(data) {
this.isSave = false;
this.allowSelect = true;
this.isStartSelected = true;
this.editShow = true;
this.addModel = data;
},
changeStartStation() {
this.judgeAllowSelected();
@ -553,6 +554,7 @@ export default {
return model;
},
save() {
this.addModel;
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
@ -602,7 +604,7 @@ export default {
const list = section.logicSectionCodeList;
// if()
// relSwitchCode
if (list.length > 0) {
if (list && list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
this.oldsection.push(logicSection);
@ -617,7 +619,7 @@ export default {
selectedList.forEach(each=>{
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
const list = section.logicSectionCodeList;
if (list.length > 0) {
if (list && list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
logicSection.instance.drawBatchSelected(section, '');
@ -642,9 +644,9 @@ export default {
this.isSave = true;
this.allowSelect = false;
this.isStartSelected = false;
this.addModel.withLoop = false;
this.editShow = false;
this.field = '';
this.addModel.withLoop = false;
}
}
}