调整地图绘制逻辑
This commit is contained in:
parent
a229051584
commit
a6feabd406
@ -314,7 +314,7 @@ export default {
|
||||
this.deviceShow = false;
|
||||
}
|
||||
},
|
||||
/* 设置仿真初始时间以及运行状态 */
|
||||
/* 地图根据仿真group获取仿真基础信息 */
|
||||
async loadSimulationInfo() {
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
|
||||
|
@ -5,26 +5,28 @@
|
||||
<!-- @mouseenter="btnBoxEnter" @mouseleave.stop="btnBoxLeave" -->
|
||||
<div class="display-draft" :class="{'display-type-hb': $route.query.lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group class="button-group-box">
|
||||
<el-button v-if="project==='refereeJsxt'" type="success" size="small" @click="refeeEndCompetition">退出</el-button>
|
||||
<el-button v-if="project!=='jsxt'&&project!=='refereeJsxt'" type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
||||
<el-button v-if="project==='refereeJsxt'" type="success" size="small" @click="refeeEndCompetition">退出</el-button> <!-- 竞赛退出 -->
|
||||
<el-button v-if="project!=='jsxt' && project!=='refereeJsxt'" type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
||||
<template v-if="!dataError"> <!-- 地图错误判断 -->
|
||||
<template v-if="isAdmin && project != 'refereeJsxt'">
|
||||
<el-button type="danger" :disabled="dataError" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
<el-button type="danger" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
</template>
|
||||
<template v-if="project==='jsxt'">
|
||||
<template v-if="project == 'jsxt'">
|
||||
<div style="background: #FFF;display: inline-block;height: 40px;line-height: 40px;padding: 0 5px;border: 2px solid #F00;border-radius: 6px;margin-right: 8px;">{{ '剩余时间:' + countdownTime }}</div>
|
||||
<el-button :disabled="!jsStart" type="success" size="small" @click="startCompetition">开始</el-button>
|
||||
<el-button :disabled="jsStart" type="danger" size="small" @click="endCompetition">提交</el-button>
|
||||
</template>
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && isShowScheduling && !dataError" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
||||
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
||||
<!-- 三维视图 / 司机视角 -->
|
||||
<el-button v-if="(isShowScheduling && !dataError) || (isDriver && !dataError)" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<el-button v-if="isShowScheduling || isDriver" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="(isShowScheduling && !dataError) || (isStationSupervisor && !dataError)" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
|
||||
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
|
||||
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" size="small" @click="generateQrCode">生成二维码</el-button>
|
||||
<el-button v-if="isAdmin" size="small" @click="memberManage">成员管理</el-button>
|
||||
<el-button v-if="isAdmin && isProject" size="small" @click="handleEquipment">设备管理</el-button>
|
||||
</template>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<qr-code ref="qrCode" />
|
||||
|
@ -285,7 +285,7 @@ export default {
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
|
||||
{ prop: 'interlockStationCode', label: '所属联锁站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.ciStationList},
|
||||
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
|
||||
{ prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList },
|
||||
{ prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList, hover: this.hover, buttonType: 'signalSection', buttonShowType: this.signalSectionShow },
|
||||
{ prop: 'sectionOffset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') }
|
||||
|
||||
]
|
||||
@ -326,6 +326,9 @@ export default {
|
||||
{ required: true, message: this.$t('rules.signalGuidePositionY'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
},
|
||||
signalSectionShow() {
|
||||
return this.field == 'signalSection';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -344,6 +347,10 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
this.signalSectionCode(this.field);
|
||||
},
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
@ -363,6 +370,11 @@ export default {
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('deviceSelect', '');
|
||||
} else if (selected && selected._type === 'Section' && this.field == 'signalSection') {
|
||||
this.editModel.sectionCode = selected.code;
|
||||
this.activeName = 'first';
|
||||
this.field = '';
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
updateMapModel(data) {
|
||||
|
@ -124,7 +124,7 @@ export default {
|
||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, disabled: true},
|
||||
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'stationStandCode', buttonShowType: this.stationStandCodeShow },
|
||||
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
|
||||
{ prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.reentryStrategyList },
|
||||
{ prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true },
|
||||
@ -260,6 +260,9 @@ export default {
|
||||
},
|
||||
PhysicalSectionList() {
|
||||
return this.sectionList.filter(elem => elem.type === '01');
|
||||
},
|
||||
stationStandCodeShow() {
|
||||
return this.field === 'stationStandCode';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -312,6 +315,11 @@ export default {
|
||||
this.activeName = 'first';
|
||||
this.field = '';
|
||||
this.hover(this.field);
|
||||
} else if (selected && selected._type === 'Section' && this.field == 'stationStandCode') {
|
||||
this.editModel.standTrackCode = selected.code;
|
||||
this.activeName = 'first';
|
||||
this.field = '';
|
||||
this.hover(this.field);
|
||||
}
|
||||
},
|
||||
create() {
|
||||
|
Loading…
Reference in New Issue
Block a user