调整ibp数据,调整道岔生成逻辑

This commit is contained in:
zyy 2020-09-16 10:10:13 +08:00
parent 10cae34098
commit 4264996520
7 changed files with 67 additions and 36 deletions

View File

@ -23,32 +23,34 @@ export default class ELimitLines extends Group {
let y = traingle.dricty * (style.Section.speedLimit.distance) * traingle.getCosRate();
if (x == Infinity) { x = 0; }
if (y == Infinity) { y = 0; }
// 上侧临时限速线
const speedLimitLeft = this.createLimit({
position: [x, -y],
switch: model.switch,
code: model.code,
isSwitchSection: model.switchSection,
relSwitchCode: model.relSwitchCode,
isCurve: model.curve, // 是否曲线
points: model.points
});
// 下侧临时限速线
const speedLimitRight = this.createLimit({
position: [-x, y],
switch: model.switch,
code: model.code,
isSwitchSection: model.switchSection,
relSwitchCode: model.relSwitchCode,
isCurve: model.curve, // 是否曲线
points: model.points
});
speedLimitLeft.forEach(item => {
this.add(item);
});
speedLimitRight.forEach(item => {
this.add(item);
});
if (model.switch) {
// 上侧临时限速线
const speedLimitLeft = this.createLimit({
position: [x, -y],
switch: model.switch,
code: model.code,
isSwitchSection: model.switchSection,
relSwitchCode: model.relSwitchCode,
isCurve: model.curve, // 是否曲线
points: model.points
});
// 下侧临时限速线
const speedLimitRight = this.createLimit({
position: [-x, y],
switch: model.switch,
code: model.code,
isSwitchSection: model.switchSection,
relSwitchCode: model.relSwitchCode,
isCurve: model.curve, // 是否曲线
points: model.points
});
speedLimitLeft.forEach(item => {
this.add(item);
});
speedLimitRight.forEach(item => {
this.add(item);
});
}
}
}

View File

@ -69,6 +69,7 @@ const PracticeDisplayNew = () => import('@/views/competitionManage/practiceList/
const IbpHome = () => import('@/views/ibp/home');
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
const IbpShow = () => import('@/views/ibp/ibpsystem/index');
const TeachDetail = () => import('@/views/teach/detail/index');
const TeachHome = () => import('@/views/teach/index');
@ -278,6 +279,11 @@ export const publicAsyncRoute = [
component: Display,
hidden: true
},
{
path: '/ibpShow',
computed: IbpShow,
hidden: true
},
{
path: '/displayNew/:mode',
component: DisplayNew,

View File

@ -54,12 +54,15 @@ export default {
buttonText: this.$t('ibp.createNow'),
showDeleteButton: false,
operateMeanList: [
{ label: '上行扣车', value: 'Up_Hold_Train' },
{ label: '下行扣车', value: 'Down_Hold_Train' },
{ label: '上行取消扣车', value: 'Up_Cancel_Hold_Train' },
{ label: '下行取消扣车', value: 'Down_Cancel_Hold_Train' },
{ label: '上行打开屏蔽门', value: 'Up_Open_Screen_Door' },
{ label: '下行打开屏蔽门', value: 'Down_Open_Screen_Door' }
{ label: '上行扣车', value: 'SXKC' },
{ label: '下行扣车', value: 'XXKC' },
{ label: '上行终止扣车', value: 'SXZZKC' },
{ label: '下行终止扣车', value: 'XXZZKC' },
{ label: '紧急停车', value: 'JJTC' },
{ label: '取消紧急停车', value: 'QXJJTC' },
{ label: '报警切除', value: 'BJQC' },
{ label: '下行屏蔽门开门', value: 'XXKM' },
{ label: '上行屏蔽门开门', value: 'SXKM' }
],
form: {
code: '',
@ -116,7 +119,7 @@ export default {
color: this.form.buttonColor,
status: 'off',
width: this.form.buttonWidth,
mean: this.from.mean
mean: this.form.mean
};
this.$emit('createData', buttonModel);
this.initPage();

View File

@ -66,8 +66,8 @@ export default {
bottomText:''
},
operateMeanList: [
{ label: '上行屏蔽门操作开关', value: 'Ban_Up_Open_Screen_Door' },
{ label: '下行屏蔽门操作开关', value: 'Ban_Down_Open_Screen_Door' }
{ label: '上行钥匙', value: 'SXYS' },
{ label: '下行钥匙', value: 'XXYS' }
],
rules: {
code: [

View File

@ -87,6 +87,7 @@ export default {
}
},
mounted() {
console.log(3333333);
this.setWindowSize();
this.initIbp();
},

View File

@ -5,6 +5,7 @@
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<el-button-group>
<!-- <el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button> -->
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
<el-button v-if="running && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
<template v-if="isAdmin">
@ -199,6 +200,18 @@ export default {
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
// ibp
goIbp() {
const routeData = this.$router.resolve({
path:`/ibpShow`,
query:{
lineCode: this.$route.query.lineCode,
mapId:this.$route.query.mapId,
group:this.$route.query.group
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
}
};

View File

@ -258,6 +258,7 @@ export default {
sectionb.parentCode = elem['uid'];
sectionc.parentCode = elem['uid'];
elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode];
elem['relSwitchCode'] = elem.code;
sectionList.push(elem);
switchList.forEach(ele => {
const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode);
@ -287,6 +288,9 @@ export default {
sectiona.relSwitchCode = elem.code;
sectionb.relSwitchCode = elem.code;
sectionc.relSwitchCode = elem.code;
sectiona.name = `${sectiona.name}-A`;
sectionb.name = `${sectionb.name}-B`;
sectionc.name = `${sectionc.name}-C`;
sectiona.switchSection = true;
sectionb.switchSection = true;
sectionc.switchSection = true;
@ -309,12 +313,14 @@ export default {
point = { x: sectiona.points[0].x, y: sectiona.points[0].y };
}
const sectionModel = getModel('Section');
const name = sectiona.name;
const data = {
code: elem.uid,
name: sectiona.name,
name: name.split('-')[0],
type: '04',
namePosition: point,
switchSection: true,
relSwitchCode: elem.relSwitchCode,
relevanceSectionList: elem.relevanceSectionList,
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
sepTypeLeft: '00',