Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
554d2e994f
@ -43,6 +43,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from '../childDialog/confirmControl';
|
||||
@ -290,7 +291,8 @@ export default {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.cmdType
|
||||
// cmdType: data.cmdType
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
|
@ -127,7 +127,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -157,20 +158,22 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
|
||||
this.stationList.sort((a, b) => {
|
||||
return parseInt(a.kmRange) - parseInt(b.kmRange);
|
||||
});
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
if (!selected.right) { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right);
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,7 +189,7 @@ export default {
|
||||
if (!stationStand || !station) {
|
||||
this.treeData[2].children[0].value = `自动`;
|
||||
} else {
|
||||
this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动`;
|
||||
this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工(${selected.runLevelTime})` : `至${station.name}${stationStand.name}:自动`;
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
@ -247,7 +250,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-left{
|
||||
width: 46%;
|
||||
width: 34%;
|
||||
float: left;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
@ -255,7 +258,7 @@ export default {
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
.content-right{
|
||||
width: 54%;
|
||||
width: 66%;
|
||||
float: left;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
|
@ -198,22 +198,25 @@ export default {
|
||||
},
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
this.stationList.sort((a, b) => {
|
||||
return parseInt(a.kmRange) - parseInt(b.kmRange);
|
||||
});
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
if (selected.direction == '01') { // 下行
|
||||
let stationStand, station;
|
||||
if (!selected.right) { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: selected.runLevelTime ? this.getLevelByTime(selected.runLevelTime) : '0', time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeForever });
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
if (index != this.stationList.length - 1) {
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right);
|
||||
}
|
||||
}
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: selected.runLevelTime ? this.getLevelByTime(selected.runLevelTime) : '0', time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeForever });
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
|
@ -41,7 +41,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="this.$t('menu.controlState')" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic') }}</span>
|
||||
<span v-if="scope.row.atsControl == '01'">{{ $t('menu.automatic') }}</span>
|
||||
<span v-else>{{ $t('menu.artificial') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -69,7 +69,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -92,22 +93,24 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
this.stationList.sort((a, b) => {
|
||||
return parseInt(a.kmRange) - parseInt(b.kmRange);
|
||||
});
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (!selected.right) { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right);
|
||||
}
|
||||
}
|
||||
|
||||
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
|
||||
this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: selected.stationHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: selected.centerHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
@ -115,7 +118,7 @@ export default {
|
||||
if (!stationStand || !station) {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: this.$t('menu.automatic2') });
|
||||
} else {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: selected.runLevelTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: selected.runLevelTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') + '(' + selected.runLevelTime + ')' : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
|
||||
}
|
||||
this.tempData.push({ item: this.$t('menu.jumpStop'), status: selected.assignSkip || selected.allSkip ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : this.$t('menu.default') });
|
||||
|
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<!-- <menu-axle-reset ref="menuAxleReset" :selected="selected" /> -->
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<!-- <menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" /> -->
|
||||
<!-- <menu-station-control ref="menuStationControl" :selected="selected" /> -->
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<!-- <menu-limit ref="menuLimit" :selected="selected" /> -->
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<menu-request ref="menuRequest" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" @popMenuStationStand="popMenuStationStand" @totalMenuEvent="totalMenuEvent" />
|
||||
@ -20,41 +20,37 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
// import MenuAxleReset from './menuAxleReset';
|
||||
// import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
// import MenuStationControl from './menuStationControl';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuLimit from './menuLimit';
|
||||
// import MenuLimit from './menuLimit';
|
||||
import MenuCancel from './menuCancel';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import PopStationStand from './popStationStand';
|
||||
import MenuRequest from './menuRequest';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
// MenuAxleReset,
|
||||
// MenuAutoTrunRoute,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
// MenuStationControl,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuLimit,
|
||||
// MenuLimit,
|
||||
MenuStationStand,
|
||||
MenuCancel,
|
||||
// PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PopStationStand,
|
||||
MenuRequest
|
||||
// PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
|
@ -54,7 +54,7 @@ export default {
|
||||
trainingName: '设置跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5027', tip: '鼠标右键菜单选择【列车跳停本站】' },
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
trainingName: '取消跳停({10}-{12}站台)',
|
||||
trainingRemark: '设置取消跳停功能',
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5037', tip: '鼠标右键菜单选择【取消列车跳停本站】' },
|
||||
|
@ -168,6 +168,7 @@ export default {
|
||||
},
|
||||
clearForm() {
|
||||
this.chapterModel.trainingId = '';
|
||||
this.chapterModel.parentId = null;
|
||||
this.chapterModel.trainings = [];
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
|
@ -27,6 +27,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isInGennerate: true,
|
||||
mapIdList: [],
|
||||
trainingTypeList: [],
|
||||
trainingOperateTypeMap: {
|
||||
@ -183,21 +184,28 @@ export default {
|
||||
if (data.data) {
|
||||
this.queryList.actions.pop();
|
||||
this.queryList.actions.push({ text: this.$t('lesson.trainingGenerating'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:true });
|
||||
this.isInGennerate = true;
|
||||
this.queryList.data = [];
|
||||
this.queryList.total = 0;
|
||||
} else {
|
||||
this.queryList.actions.pop();
|
||||
this.queryList.actions.push({ text: this.$t('lesson.generateTraining'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:false });
|
||||
if (this.isInGennerate) {
|
||||
this.isInGennerate = false;
|
||||
this.reloadTable();
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!this.isLeaving) {
|
||||
this.interCheckGenerateStatus(this.$route.query.mapId, false);
|
||||
this.interCheckGenerateStatus();
|
||||
}
|
||||
}, 15000);
|
||||
}, 3000);
|
||||
}).catch(()=>{
|
||||
setTimeout(() => {
|
||||
if (!this.isLeaving) {
|
||||
this.interCheckGenerateStatus(this.$route.query.mapId, false);
|
||||
this.interCheckGenerateStatus();
|
||||
}
|
||||
}, 15000);
|
||||
}, 3000);
|
||||
});
|
||||
},
|
||||
async prdChoose(queryData) {
|
||||
@ -270,6 +278,9 @@ export default {
|
||||
this.queryList.actions.push({ text: this.$t('lesson.trainingGenerating'), btnCode: 'employee_auto', handler: this.autoMaticTrainging, disabled:true });
|
||||
try {
|
||||
const data = await createAllTrainingList(this.$route.query.mapId, true);
|
||||
this.isInGennerate = true;
|
||||
this.queryList.data = [];
|
||||
this.queryList.total = 0;
|
||||
this.$message.success('实训生成中...');
|
||||
instance.confirmButtonLoading = false;
|
||||
if (!data.data) {
|
||||
|
Loading…
Reference in New Issue
Block a user