调整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(); let y = traingle.dricty * (style.Section.speedLimit.distance) * traingle.getCosRate();
if (x == Infinity) { x = 0; } if (x == Infinity) { x = 0; }
if (y == Infinity) { y = 0; } if (y == Infinity) { y = 0; }
// 上侧临时限速线 if (model.switch) {
const speedLimitLeft = this.createLimit({ // 上侧临时限速线
position: [x, -y], const speedLimitLeft = this.createLimit({
switch: model.switch, position: [x, -y],
code: model.code, switch: model.switch,
isSwitchSection: model.switchSection, code: model.code,
relSwitchCode: model.relSwitchCode, isSwitchSection: model.switchSection,
isCurve: model.curve, // 是否曲线 relSwitchCode: model.relSwitchCode,
points: model.points isCurve: model.curve, // 是否曲线
}); points: model.points
// 下侧临时限速线 });
const speedLimitRight = this.createLimit({ // 下侧临时限速线
position: [-x, y], const speedLimitRight = this.createLimit({
switch: model.switch, position: [-x, y],
code: model.code, switch: model.switch,
isSwitchSection: model.switchSection, code: model.code,
relSwitchCode: model.relSwitchCode, isSwitchSection: model.switchSection,
isCurve: model.curve, // 是否曲线 relSwitchCode: model.relSwitchCode,
points: model.points isCurve: model.curve, // 是否曲线
}); points: model.points
speedLimitLeft.forEach(item => { });
this.add(item); speedLimitLeft.forEach(item => {
}); this.add(item);
speedLimitRight.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 IbpHome = () => import('@/views/ibp/home');
const IbpDraw = () => import('@/views/ibp/ibpDraw/index'); const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
const IbpShow = () => import('@/views/ibp/ibpsystem/index');
const TeachDetail = () => import('@/views/teach/detail/index'); const TeachDetail = () => import('@/views/teach/detail/index');
const TeachHome = () => import('@/views/teach/index'); const TeachHome = () => import('@/views/teach/index');
@ -278,6 +279,11 @@ export const publicAsyncRoute = [
component: Display, component: Display,
hidden: true hidden: true
}, },
{
path: '/ibpShow',
computed: IbpShow,
hidden: true
},
{ {
path: '/displayNew/:mode', path: '/displayNew/:mode',
component: DisplayNew, component: DisplayNew,

View File

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

View File

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

View File

@ -87,6 +87,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(3333333);
this.setWindowSize(); this.setWindowSize();
this.initIbp(); 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-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
</el-select> </el-select>
<el-button-group> <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="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> <el-button v-if="running && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
<template v-if="isAdmin"> <template v-if="isAdmin">
@ -199,6 +200,18 @@ export default {
} }
}); });
window.open(routeData.href, '_blank', 'noopener noreferrer'); 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']; sectionb.parentCode = elem['uid'];
sectionc.parentCode = elem['uid']; sectionc.parentCode = elem['uid'];
elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode]; elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode];
elem['relSwitchCode'] = elem.code;
sectionList.push(elem); sectionList.push(elem);
switchList.forEach(ele => { switchList.forEach(ele => {
const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode); const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode);
@ -287,6 +288,9 @@ export default {
sectiona.relSwitchCode = elem.code; sectiona.relSwitchCode = elem.code;
sectionb.relSwitchCode = elem.code; sectionb.relSwitchCode = elem.code;
sectionc.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; sectiona.switchSection = true;
sectionb.switchSection = true; sectionb.switchSection = true;
sectionc.switchSection = true; sectionc.switchSection = true;
@ -309,12 +313,14 @@ export default {
point = { x: sectiona.points[0].x, y: sectiona.points[0].y }; point = { x: sectiona.points[0].x, y: sectiona.points[0].y };
} }
const sectionModel = getModel('Section'); const sectionModel = getModel('Section');
const name = sectiona.name;
const data = { const data = {
code: elem.uid, code: elem.uid,
name: sectiona.name, name: name.split('-')[0],
type: '04', type: '04',
namePosition: point, namePosition: point,
switchSection: true, switchSection: true,
relSwitchCode: elem.relSwitchCode,
relevanceSectionList: elem.relevanceSectionList, relevanceSectionList: elem.relevanceSectionList,
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }], points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
sepTypeLeft: '00', sepTypeLeft: '00',