Merge branch 'test'
This commit is contained in:
commit
0736685241
@ -291,7 +291,7 @@ export default {
|
|||||||
self.prepareExportData().then(data => {
|
self.prepareExportData().then(data => {
|
||||||
excel.export_json_to_excel(tHeader, data, self.queryForm.exportConfig.filename);
|
excel.export_json_to_excel(tHeader, data, self.queryForm.exportConfig.filename);
|
||||||
self.enableQuery();
|
self.enableQuery();
|
||||||
}).catch(error => {
|
}).catch((error) => {
|
||||||
self.enableQuery();
|
self.enableQuery();
|
||||||
self.$message.error(`${this.$t('error.exportFailed')}: ${error.message}`);
|
self.$message.error(`${this.$t('error.exportFailed')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
@ -417,7 +417,7 @@ export default {
|
|||||||
const resultData = response.data;
|
const resultData = response.data;
|
||||||
this.$set(this.queryList, 'data', resultData.list);
|
this.$set(this.queryList, 'data', resultData.list);
|
||||||
this.$set(this.queryList, 'total', resultData.total);
|
this.$set(this.queryList, 'total', resultData.total);
|
||||||
}).catch(error => {
|
}).catch((error) => {
|
||||||
self.enableQuery();
|
self.enableQuery();
|
||||||
this.$message.error(`${this.$t('error.getListFailed')}:${error.message}`);
|
this.$message.error(`${this.$t('error.getListFailed')}:${error.message}`);
|
||||||
});
|
});
|
||||||
|
@ -1,414 +1,442 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
class="beijing-01__systerm alxe-effective"
|
||||||
<span class="base-label">准备</span>
|
:title="title"
|
||||||
<div style="margin-top: 10px">
|
:visible.sync="show"
|
||||||
<el-row type="flex" justify="left">
|
width="420px"
|
||||||
<el-col :span="9">车站</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="9">轨道/计轴</el-col>
|
:z-index="2000"
|
||||||
</el-row>
|
:modal="false"
|
||||||
<el-row type="flex" justify="left">
|
:close-on-click-modal="false"
|
||||||
<el-col :span="9">
|
>
|
||||||
<el-input :type="type" v-model="model.stationName" size="mini" :disabled="true"></el-input>
|
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||||
</el-col>
|
<span class="base-label">准备</span>
|
||||||
<el-col :span="9">
|
<div style="margin-top: 10px">
|
||||||
<el-input :type="type" v-model="model.sectionName" size="mini" :disabled="true"></el-input>
|
<el-row type="flex" justify="left">
|
||||||
</el-col>
|
<el-col :span="9">车站</el-col>
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="9">轨道/计轴</el-col>
|
||||||
<el-button :id="domIdConfirm1" size="mini" @click="commitOnce" :disabled="type==='password'">确认
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
|
||||||
<span class="base-label">确认</span>
|
|
||||||
<div>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="9">车站</el-col>
|
|
||||||
<el-col :span="9">轨道/计轴</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="9">
|
|
||||||
<el-select :id="domIdChoose1" v-model="model.confirmStationName" filterable size="mini"
|
|
||||||
@change="stationSelectChange" :disabled="type==='text'">
|
|
||||||
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name"
|
|
||||||
:value="option.name">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable size="mini"
|
|
||||||
@change="sectionSelectChange" :disabled="type==='text'">
|
|
||||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name"
|
|
||||||
:value="option.name">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm2" size="mini" :loading="loading" @click="commit"
|
|
||||||
:disabled="type==='text'">确认</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
|
||||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<el-input v-model="model.time" size="mini" :readonly="true"></el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row type="flex" justify="left">
|
||||||
<el-col :offset="1"> 状态</el-col>
|
<el-col :span="9">
|
||||||
|
<el-input v-model="model.stationName" :type="type" size="mini" :disabled="true" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" :offset="1">
|
||||||
|
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
</div>
|
||||||
<el-col :offset="1" :span="23">
|
</div>
|
||||||
<el-input type="textarea" :rows="2" placeholder="" v-model="model.status">
|
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||||
</el-input>
|
<span class="base-label">确认</span>
|
||||||
</el-col>
|
<div>
|
||||||
|
<el-row type="flex" justify="left">
|
||||||
|
<el-col :span="9">车站</el-col>
|
||||||
|
<el-col :span="9">轨道/计轴</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="botton-group" style="margin-top:20px">
|
<el-row type="flex" justify="left">
|
||||||
<el-col :span="4" :offset="10">
|
<el-col :span="9">
|
||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
<el-select
|
||||||
</el-col>
|
:id="domIdChoose1"
|
||||||
|
v-model="model.confirmStationName"
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
:disabled="type==='text'"
|
||||||
|
@change="stationSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(option,index) in filterStationList"
|
||||||
|
:key="index"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.name"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-select
|
||||||
|
:id="domIdChoose2"
|
||||||
|
v-model="model.confirmSectionName"
|
||||||
|
filterable
|
||||||
|
size="mini"
|
||||||
|
:disabled="type==='text'"
|
||||||
|
@change="sectionSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(option,index) in randomSectionList"
|
||||||
|
:key="index"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.name"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" :offset="1">
|
||||||
|
<el-button
|
||||||
|
:id="domIdConfirm2"
|
||||||
|
size="mini"
|
||||||
|
:loading="loading"
|
||||||
|
:disabled="type==='text'"
|
||||||
|
@click="commit"
|
||||||
|
>确认</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</div>
|
||||||
<popup-alarm ref="popupAlarm"></popup-alarm>
|
</div>
|
||||||
</el-dialog>
|
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||||
|
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1"> 状态</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1" :span="23">
|
||||||
|
<el-input v-model="model.status" type="textarea" :rows="2" placeholder="" />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="botton-group" style="margin-top:20px">
|
||||||
|
<el-col :span="4" :offset="10">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<popup-alarm ref="popupAlarm" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import PopupAlarm from './childDialog/popupAlarm';
|
import PopupAlarm from './childDialog/popupAlarm';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlxeEffective',
|
name: 'AlxeEffective',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
PopupAlarm
|
PopupAlarm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
type: 'text',
|
type: 'text',
|
||||||
timeout: 1000,
|
timeout: 1000,
|
||||||
timenum: 30,
|
timenum: 30,
|
||||||
stepNum: 0,
|
stepNum: 0,
|
||||||
task: null,
|
task: null,
|
||||||
model: {
|
model: {
|
||||||
stationName: '',
|
stationName: '',
|
||||||
sectionName: '',
|
sectionName: '',
|
||||||
confirmStationName: '',
|
confirmStationName: '',
|
||||||
confirmSectionName: '',
|
confirmSectionName: '',
|
||||||
status: '',
|
status: '',
|
||||||
time: 0,
|
time: 0
|
||||||
},
|
},
|
||||||
selected: null,
|
selected: null,
|
||||||
operate: null,
|
operate: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
randomSectionList: []
|
randomSectionList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'stationList',
|
||||||
|
'sectionList'
|
||||||
|
]),
|
||||||
|
filterStationList() {
|
||||||
|
const i = 0; const list = [];
|
||||||
|
if (this.stationList) {
|
||||||
|
this.stationList.forEach(elem => {
|
||||||
|
if (list.findIndex(it => { return it.name == elem.name; }) < 0) {
|
||||||
|
list.push({ name: elem.name });
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
return list;
|
||||||
},
|
},
|
||||||
computed: {
|
show() {
|
||||||
...mapGetters('map', [
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
'stationList',
|
},
|
||||||
'sectionList'
|
domIdConfirm1() {
|
||||||
]),
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
filterStationList() {
|
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
||||||
let i = 0, list = [];
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
if (this.stationList) {
|
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
||||||
this.stationList.forEach(elem => {
|
}
|
||||||
if (list.findIndex(it => { return it.name == elem.name }) < 0) {
|
return '';
|
||||||
list.push({ name: elem.name });
|
},
|
||||||
}
|
domIdConfirm2() {
|
||||||
});
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
}
|
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
||||||
return list;
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
},
|
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
||||||
show() {
|
}
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdChoose1() {
|
||||||
if (this.dialogShow) {
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
return OperationEvent.Section.alxeEffective.choose1.domId;
|
||||||
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
||||||
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
}
|
||||||
}
|
return '';
|
||||||
}
|
},
|
||||||
},
|
domIdChoose2() {
|
||||||
domIdConfirm2() {
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
if (this.dialogShow) {
|
return OperationEvent.Section.alxeEffective.choose2.domId;
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
}
|
||||||
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
return '';
|
||||||
}
|
},
|
||||||
}
|
domIdCancel() {
|
||||||
},
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
domIdChoose1() {
|
},
|
||||||
if (this.dialogShow) {
|
title() {
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
this.earlyDepar = false;
|
||||||
return OperationEvent.Section.alxeEffective.choose1.domId;
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdChoose2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Section.alxeEffective.choose2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
this.earlyDepar = false;
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
|
|
||||||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
return '确认计轴恢复工作';
|
return '确认计轴恢复工作';
|
||||||
}
|
}
|
||||||
},
|
return '';
|
||||||
},
|
}
|
||||||
watch: {
|
},
|
||||||
'model.sectionName': function (name) {
|
watch: {
|
||||||
let index = Math.floor(Math.random(1) * 5);
|
'model.sectionName': function (name) {
|
||||||
for (var i = 0; i < 5; i++) {
|
const index = Math.floor(Math.random(1) * 5);
|
||||||
if (i == index) {
|
for (var i = 0; i < 5; i++) {
|
||||||
this.randomSectionList.push({ name });
|
if (i == index) {
|
||||||
} else {
|
this.randomSectionList.push({ name });
|
||||||
let section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
|
} else {
|
||||||
if (section.type != '02') {
|
const section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
|
||||||
if (this.randomSectionList.findIndex(it => { return it.name == section.name }) < 0) {
|
if (section.type != '02') {
|
||||||
this.randomSectionList.push({ name: section.name });
|
if (this.randomSectionList.findIndex(it => { return it.name == section.name; }) < 0) {
|
||||||
} else {
|
this.randomSectionList.push({ name: section.name });
|
||||||
i--;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
i--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
mounted() {
|
},
|
||||||
this.$nextTick(() => {
|
mounted() {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$nextTick(() => {
|
||||||
})
|
this.$store.dispatch('training/tipReload');
|
||||||
},
|
});
|
||||||
methods: {
|
},
|
||||||
stopTask() {
|
methods: {
|
||||||
if (this.task) {
|
stopTask() {
|
||||||
clearInterval(this.task);
|
if (this.task) {
|
||||||
this.task = null;
|
clearInterval(this.task);
|
||||||
}
|
this.task = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.stepNum < 3) {
|
if (this.stepNum < 3) {
|
||||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
this.$store.dispatch('training/backSteps', this.stepNum);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.model.name = '';
|
this.model.name = '';
|
||||||
this.model.time = '';
|
this.model.time = '';
|
||||||
this.type = 'text';
|
this.type = 'text';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
this.status = '';
|
this.status = '';
|
||||||
this.model.stationName = '';
|
this.model.stationName = '';
|
||||||
this.model.sectionName = '';
|
this.model.sectionName = '';
|
||||||
this.model.confirmStationName = '';
|
this.model.confirmStationName = '';
|
||||||
this.model.confirmSectionName = '';
|
this.model.confirmSectionName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (selected.isSwitchSection) {
|
if (selected.isSwitchSection) {
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
|
||||||
} else {
|
|
||||||
this.model.sectionName = `${selected.name}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
|
||||||
if (section) {
|
if (section) {
|
||||||
this.model.sectionName = section.name;
|
this.model.sectionName = section.name;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
if (section) {
|
||||||
if (station) {
|
this.model.sectionName = section.name;
|
||||||
this.model.stationName = station.name;
|
this.model.sectionName = `${section.name}-${selected.name}`;
|
||||||
}
|
} else {
|
||||||
}
|
this.model.sectionName = `${selected.name}`;
|
||||||
|
|
||||||
this.stepNum = 0;
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.stopTask();
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
waitSelectEvent() {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
this.model.time -= 1;
|
|
||||||
if (this.model.time <= 0) {
|
|
||||||
this.stopTask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commitOnce() {
|
|
||||||
this.stepNum = 1;
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: ''
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.type = 'password';
|
|
||||||
this.model.time = this.timenum;
|
|
||||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
stationSelectChange(val) {
|
|
||||||
if (this.model.confirmStationName === this.model.stationName) {
|
|
||||||
this.stepNum = 2;
|
|
||||||
} else {
|
|
||||||
this.model.time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: '',
|
|
||||||
val: val
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
sectionSelectChange(val) {
|
|
||||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
|
||||||
this.stepNum = 2;
|
|
||||||
} else {
|
|
||||||
this.model.time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: '',
|
|
||||||
val: val
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 确认计轴恢复工作*/
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: '',
|
|
||||||
val: this.selected.code
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
|
||||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.model.status = '';
|
|
||||||
if (this.model.stationName == this.model.confirmStationName &&
|
|
||||||
this.model.sectionName == this.model.confirmSectionName) {
|
|
||||||
this.stepNum = 3;
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.type = 'text';
|
|
||||||
this.stopTask();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
|
|
||||||
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
if (this.model.stationName != this.model.confirmStationName) {
|
|
||||||
this.model.status = '车站选择错误';
|
|
||||||
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
|
||||||
this.model.status = '区段选择错误';
|
|
||||||
}
|
}
|
||||||
|
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
}
|
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||||
},
|
if (section) {
|
||||||
cancel() {
|
this.model.sectionName = section.name;
|
||||||
let operate = {
|
}
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (valid) {
|
if (station) {
|
||||||
this.doClose();
|
this.model.stationName = station.name;
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.stepNum = 0;
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.stopTask();
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
waitSelectEvent() {
|
||||||
|
if (!this.$store.state.menuOperation.break) {
|
||||||
|
this.model.time -= 1;
|
||||||
|
if (this.model.time <= 0) {
|
||||||
|
this.stopTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
commitOnce() {
|
||||||
|
this.stepNum = 1;
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.type = 'password';
|
||||||
|
this.model.time = this.timenum;
|
||||||
|
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
stationSelectChange(val) {
|
||||||
|
if (this.model.confirmStationName === this.model.stationName) {
|
||||||
|
this.stepNum = 2;
|
||||||
|
} else {
|
||||||
|
this.model.time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: '',
|
||||||
|
val: val
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
sectionSelectChange(val) {
|
||||||
|
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||||
|
this.stepNum = 2;
|
||||||
|
} else {
|
||||||
|
this.model.time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: '',
|
||||||
|
val: val
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 确认计轴恢复工作*/
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: '',
|
||||||
|
val: this.selected.code
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.status = '';
|
||||||
|
if (this.model.stationName == this.model.confirmStationName &&
|
||||||
|
this.model.sectionName == this.model.confirmSectionName) {
|
||||||
|
this.stepNum = 3;
|
||||||
|
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.type = 'text';
|
||||||
|
this.stopTask();
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
|
||||||
|
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.model.stationName != this.model.confirmStationName) {
|
||||||
|
this.model.status = '车站选择错误';
|
||||||
|
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
||||||
|
this.model.status = '区段选择错误';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.alxe-effective .context {
|
.alxe-effective .context {
|
||||||
height: 80px !important;
|
height: 80px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -258,8 +258,6 @@ export default {
|
|||||||
};
|
};
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
this.$refs.ConfirmTip.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
closeMessage() {
|
closeMessage() {
|
||||||
@ -278,8 +276,6 @@ export default {
|
|||||||
this.disabledConfirm2 = false;
|
this.disabledConfirm2 = false;
|
||||||
this.timeCountConfirm = -1; // 倒计时
|
this.timeCountConfirm = -1; // 倒计时
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,387 +27,387 @@ import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItem
|
|||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionCmdControl,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
SpeedCmdControl,
|
SpeedCmdControl,
|
||||||
TrainCreate,
|
TrainCreate,
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
{
|
||||||
label: '区段故障解锁',
|
label: '区段故障解锁',
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Section.fault,
|
disabledCallback: MenuDisabledState.Section.fault,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段激活',
|
label: '区段激活',
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Section.active,
|
disabledCallback: MenuDisabledState.Section.active,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段切除',
|
label: '区段切除',
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Section.split,
|
disabledCallback: MenuDisabledState.Section.split,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段计轴预复位',
|
label: '区段计轴预复位',
|
||||||
handler: this.axlePreReset,
|
handler: this.axlePreReset,
|
||||||
disabledCallback: MenuDisabledState.Section.axlePreReset,
|
disabledCallback: MenuDisabledState.Section.axlePreReset,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段封锁',
|
label: '区段封锁',
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
disabledCallback: MenuDisabledState.Section.lock,
|
disabledCallback: MenuDisabledState.Section.lock,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段解封',
|
label: '区段解封',
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Section.unlock,
|
disabledCallback: MenuDisabledState.Section.unlock,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区段设置限速',
|
label: '区段设置限速',
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
{
|
{
|
||||||
label: '轨道激活',
|
label: '轨道激活',
|
||||||
handler: this.active,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Section.active,
|
disabledCallback: MenuDisabledState.Section.active,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '轨道切除',
|
label: '轨道切除',
|
||||||
handler: this.split,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Section.split,
|
disabledCallback: MenuDisabledState.Section.split,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '确认计轴有效',
|
label: '确认计轴有效',
|
||||||
handler: this.alxeEffective,
|
handler: this.alxeEffective,
|
||||||
disabledCallback: MenuDisabledState.Section.alxeEffective,
|
disabledCallback: MenuDisabledState.Section.alxeEffective,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置临时限速',
|
label: '设置临时限速',
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查看站场设备状态',
|
label: '查看站场设备状态',
|
||||||
handler: this.undeveloped,
|
handler: this.undeveloped,
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuTrain: [
|
menuTrain: [
|
||||||
{
|
{
|
||||||
label: '新建列车',
|
label: '新建列车',
|
||||||
handler: this.newTrain,
|
handler: this.newTrain,
|
||||||
disabledCallback: MenuDisabledState.Section.newTrain
|
disabledCallback: MenuDisabledState.Section.newTrain
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置计轴失效',
|
label: '设置计轴失效',
|
||||||
handler: this.alxeFailure,
|
handler: this.alxeFailure,
|
||||||
disabledCallback: MenuDisabledState.Section.alxeFailure
|
disabledCallback: MenuDisabledState.Section.alxeFailure
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
'mode',
|
'mode',
|
||||||
'operatemode'
|
'operatemode'
|
||||||
]),
|
]),
|
||||||
...mapGetters('menuOperation', [
|
...mapGetters('menuOperation', [
|
||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
const self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置计轴失效
|
// 设置计轴失效
|
||||||
alxeFailure() {
|
alxeFailure() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.alxeFailure.menu.operation
|
operation: OperationEvent.Section.alxeFailure.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 故障解锁
|
// 故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.fault.menu.operation
|
operation: OperationEvent.Section.fault.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
undeveloped() {
|
undeveloped() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$alert('实现中......', '提示', {
|
this.$alert('实现中......', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
callback: action => {
|
callback: action => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 切除
|
// 切除
|
||||||
split() {
|
split() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.split.menu.operation
|
operation: OperationEvent.Section.split.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
alxeEffective() {
|
alxeEffective() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.alxeEffective.menu.operation
|
operation: OperationEvent.Section.alxeEffective.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 激活
|
// 激活
|
||||||
active() {
|
active() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.active.menu.operation
|
operation: OperationEvent.Section.active.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段计轴预复位
|
// 区段计轴预复位
|
||||||
axlePreReset() {
|
axlePreReset() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.axlePreReset.menu.operation
|
operation: OperationEvent.Section.axlePreReset.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段解锁
|
// 区段解锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.lock.menu.operation
|
operation: OperationEvent.Section.lock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 区段封锁
|
// 区段封锁
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.unlock.menu.operation
|
operation: OperationEvent.Section.unlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置速度
|
// 设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
// let operate = {
|
// let operate = {
|
||||||
// start: true,
|
// start: true,
|
||||||
// code: this.selected.code,
|
// code: this.selected.code,
|
||||||
// type: MapDeviceType.Section.type,
|
// type: MapDeviceType.Section.type,
|
||||||
// label: MapDeviceType.Section.label,
|
// label: MapDeviceType.Section.label,
|
||||||
// operation: OperationEvent.Section.setLimitSpeed.menu.operation
|
// operation: OperationEvent.Section.setLimitSpeed.menu.operation
|
||||||
// };
|
// };
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// if (valid) {
|
// if (valid) {
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.setSpeed.menu.operation
|
operation: OperationEvent.Section.setSpeed.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消速度
|
// 取消速度
|
||||||
// cancelSpeed() {
|
// cancelSpeed() {
|
||||||
// let operate = {
|
// let operate = {
|
||||||
// start: true,
|
// start: true,
|
||||||
// send: true,
|
// send: true,
|
||||||
// code: this.selected.code,
|
// code: this.selected.code,
|
||||||
// type: MapDeviceType.Section.type,
|
// type: MapDeviceType.Section.type,
|
||||||
// label: MapDeviceType.Section.label,
|
// label: MapDeviceType.Section.label,
|
||||||
// operation: OperationEvent.Section.cancelSpeed.menu.operation
|
// operation: OperationEvent.Section.cancelSpeed.menu.operation
|
||||||
// };
|
// };
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
// if (valid) {
|
// if (valid) {
|
||||||
// let tempData = response.data;
|
// let tempData = response.data;
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
// 新建列车
|
// 新建列车
|
||||||
newTrain() {
|
newTrain() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation
|
operation: OperationEvent.Section.newtrain.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -27,474 +27,474 @@ import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItem
|
|||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
RouteControl,
|
RouteControl,
|
||||||
RouteSelection,
|
RouteSelection,
|
||||||
RouteLock,
|
RouteLock,
|
||||||
RouteCmdControl,
|
RouteCmdControl,
|
||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
{
|
||||||
label: '排列进路',
|
label: '排列进路',
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消进路',
|
label: '取消进路',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号重开',
|
label: '信号重开',
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '进路交人工控',
|
label: '进路交人工控',
|
||||||
handler: this.humanControl,
|
handler: this.humanControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '进路交自动控',
|
label: '进路交自动控',
|
||||||
handler: this.atsAutoControl,
|
handler: this.atsAutoControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查询进路控制状态',
|
label: '查询进路控制状态',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.Signal.detail,
|
disabledCallback: MenuDisabledState.Signal.detail,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
{
|
{
|
||||||
label: '排列进路',
|
label: '排列进路',
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消进路',
|
label: '取消进路',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号重开',
|
label: '信号重开',
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '进路交人工控',
|
label: '进路交人工控',
|
||||||
handler: this.humanControl,
|
handler: this.humanControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '进路交自动控',
|
label: '进路交自动控',
|
||||||
handler: this.atsAutoControl,
|
handler: this.atsAutoControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查询进路控制状态',
|
label: '查询进路控制状态',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.Signal.detail,
|
disabledCallback: MenuDisabledState.Signal.detail,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '信号关灯',
|
label: '信号关灯',
|
||||||
handler: this.signalClose,
|
handler: this.signalClose,
|
||||||
disabledCallback: ''
|
disabledCallback: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Signal.setStoppage
|
disabledCallback: MenuDisabledState.Signal.setStoppage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
'mode',
|
'mode',
|
||||||
'operatemode'
|
'operatemode'
|
||||||
]),
|
]),
|
||||||
...mapGetters('menuOperation', [
|
...mapGetters('menuOperation', [
|
||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
const self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.stoppage.menu.operation
|
operation: OperationEvent.Signal.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置进路
|
// 设置进路
|
||||||
arrangementRoute() {
|
arrangementRoute() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
var tempData = null;
|
var tempData = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempData = response.data;
|
tempData = response.data;
|
||||||
}
|
}
|
||||||
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
|
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号封锁
|
// 信号封锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.lock.menu.operation
|
operation: OperationEvent.Signal.lock.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeLock.doShow(operate.operation, this.selected);
|
this.$refs.routeLock.doShow(operate.operation, this.selected);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号解封
|
// 信号解封
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation
|
operation: OperationEvent.Signal.unlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路引导
|
// 进路引导
|
||||||
guide() {
|
guide() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.guide.menu.operation
|
operation: OperationEvent.Signal.guide.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置联锁自动进路
|
// 设置联锁自动进路
|
||||||
setAutoInterlock() {
|
setAutoInterlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消联锁自动进路
|
// 取消联锁自动进路
|
||||||
cancelAutoInterlock() {
|
cancelAutoInterlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置联锁自动触发
|
// 设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消联锁自动触发
|
// 取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation
|
operation: OperationEvent.Signal.signalClose.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交人工控
|
// 进路交人工控
|
||||||
humanControl() {
|
humanControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = null;
|
let tempData = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempData = response.data;
|
tempData = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路交自动控
|
// 进路交自动控
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = null;
|
let tempData = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempData = response.data;
|
tempData = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 查询进路状态
|
// 查询进路状态
|
||||||
detail() {
|
detail() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
operation: OperationEvent.Signal.detail.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeDetail.doShow(operate, this.selected, response.data);
|
this.$refs.routeDetail.doShow(operate, this.selected, response.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -21,287 +21,287 @@ import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItem
|
|||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationMenu',
|
name: 'StationMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
StationCmdControl,
|
StationCmdControl,
|
||||||
StationHumanControlAll,
|
StationHumanControlAll,
|
||||||
StationSetRouteControlAll,
|
StationSetRouteControlAll,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
{
|
||||||
label: '全站设置联锁自动触发',
|
label: '全站设置联锁自动触发',
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '全站取消联锁自动触发',
|
label: '全站取消联锁自动触发',
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '上电解锁',
|
label: '上电解锁',
|
||||||
handler: this.powerUnLock,
|
handler: this.powerUnLock,
|
||||||
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '执行关键操作测试',
|
label: '执行关键操作测试',
|
||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
{
|
{
|
||||||
label: '所有进路自排关',
|
label: '所有进路自排关',
|
||||||
handler: this.humanControlALL,
|
handler: this.humanControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所有进路自排开',
|
label: '所有进路自排开',
|
||||||
handler: this.atsAutoControlALL,
|
handler: this.atsAutoControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '执行关键操作测试',
|
label: '执行关键操作测试',
|
||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置ZC故障',
|
label: '设置ZC故障',
|
||||||
handler: this.setStoppage,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
disabledCallback: MenuDisabledState.Station.setStoppage
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消ZC故障',
|
label: '取消ZC故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
'mode',
|
'mode',
|
||||||
'operatemode'
|
'operatemode'
|
||||||
]),
|
]),
|
||||||
...mapGetters('menuOperation', [
|
...mapGetters('menuOperation', [
|
||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
const self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selected.centralized) {
|
if (this.selected.centralized) {
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = [...this.menuForce];
|
this.menu = [...this.menuForce];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.stoppage.menu.operation
|
operation: OperationEvent.Station.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 全站设置联锁自动触发
|
// 全站设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 全站取消联锁自动触发
|
// 全站取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 上电解锁
|
// 上电解锁
|
||||||
powerUnLock() {
|
powerUnLock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 执行关键操作测试
|
// 执行关键操作测试
|
||||||
execKeyOperationTest() {
|
execKeyOperationTest() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 所有进路自排关
|
// 所有进路自排关
|
||||||
humanControlALL() {
|
humanControlALL() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 所有进路自排开
|
// 所有进路自排开
|
||||||
atsAutoControlALL() {
|
atsAutoControlALL() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
|||||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
||||||
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true},
|
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true},
|
||||||
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true},
|
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true},
|
||||||
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 是否站台轨
|
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isLogicSectionNameSort }, // 是否站台轨
|
||||||
|
|
||||||
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
|
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
|
||||||
{ prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
{ prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
||||||
@ -205,8 +205,8 @@ export default {
|
|||||||
item: [
|
item: [
|
||||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled},
|
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled},
|
||||||
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.isSwitchSectionType },
|
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.isSwitchSectionType },
|
||||||
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
|
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset }, // 左向停车点偏移量
|
||||||
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
|
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset }, // 右向停车点偏移量
|
||||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
||||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow },
|
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow },
|
||||||
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
|
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
|
||||||
@ -324,9 +324,6 @@ export default {
|
|||||||
isRelevanceSwitchShow() {
|
isRelevanceSwitchShow() {
|
||||||
return this.editModel.type == '04' && this.editModel.type == '03';
|
return this.editModel.type == '04' && this.editModel.type == '03';
|
||||||
},
|
},
|
||||||
isStandTrackShow() {
|
|
||||||
return this.editModel.type != '04' && this.editModel.type != '03';
|
|
||||||
},
|
|
||||||
hasAssociatedSection() {
|
hasAssociatedSection() {
|
||||||
return this.editModel.type == '01' || this.editModel.type == '03';
|
return this.editModel.type == '01' || this.editModel.type == '03';
|
||||||
},
|
},
|
||||||
@ -334,22 +331,22 @@ export default {
|
|||||||
return this.editModel.type == '02' || this.editModel.type == '03';
|
return this.editModel.type == '02' || this.editModel.type == '03';
|
||||||
},
|
},
|
||||||
isstandTrackNameShow() {
|
isstandTrackNameShow() {
|
||||||
return this.editModel.type !== '04' && this.editModel.standTrack;
|
return this.editModel.type == '01' && this.editModel.standTrack;
|
||||||
},
|
},
|
||||||
isreentryTrackName() {
|
isreentryTrackName() {
|
||||||
return this.editModel.type !== '04' && this.editModel.reentryTrack;
|
return this.editModel.type == '01' && this.editModel.reentryTrack;
|
||||||
},
|
},
|
||||||
istransferTrackName() {
|
istransferTrackName() {
|
||||||
return this.editModel.type !== '04' && this.editModel.transferTrack;
|
return this.editModel.type != '02' && this.editModel.type != '03' && this.editModel.transferTrack;
|
||||||
},
|
},
|
||||||
isTransferTrackShow() {
|
isTransferTrackShow() {
|
||||||
return this.editModel.type != '04' && this.editModel.type != '03' && !this.editModel.reentryTrack;
|
return this.editModel.type != '02' && this.editModel.type != '03' && !this.editModel.reentryTrack;
|
||||||
},
|
},
|
||||||
isReentryTrackShow() {
|
isReentryTrackShow() {
|
||||||
return this.editModel.type != '04' && this.editModel.type != '03' && !this.editModel.transferTrack;
|
return this.editModel.type == '01' && !this.editModel.transferTrack;
|
||||||
},
|
},
|
||||||
isdestinationCode() {
|
isdestinationCode() {
|
||||||
return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.transferTrack);
|
return this.editModel.type != '02' && this.editModel.type != '03' && (this.editModel.reentryTrack || this.editModel.transferTrack);
|
||||||
},
|
},
|
||||||
isStopPointOffset() {
|
isStopPointOffset() {
|
||||||
return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);
|
return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);
|
||||||
|
Loading…
Reference in New Issue
Block a user