Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
773522b8f0
BIN
src/assets/teleRing.mp3
Normal file
BIN
src/assets/teleRing.mp3
Normal file
Binary file not shown.
@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm alxe-effective"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||
<span class="base-label">准备</span>
|
||||
<div style="margin-top: 10px">
|
||||
<div style="margin-top: -10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
@ -25,15 +15,14 @@
|
||||
<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-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</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>
|
||||
<div style="margin-top: -10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
@ -42,35 +31,27 @@
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose1"
|
||||
v-model="model.confirmStationName"
|
||||
ref="chooseStation"
|
||||
v-model="model.confirmStationCode"
|
||||
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-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose2"
|
||||
v-model="model.confirmSectionName"
|
||||
ref="chooseSection"
|
||||
v-model="model.confirmSectionCode"
|
||||
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-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
@ -85,18 +66,18 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||
<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-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-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="botton-group" style="margin-top:20px">
|
||||
@ -104,24 +85,21 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<popup-alarm ref="popupAlarm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -129,14 +107,15 @@ export default {
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
timenum: 30,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
confirmStationName: '',
|
||||
confirmSectionName: '',
|
||||
stationCode: '',
|
||||
sectionCode: '',
|
||||
confirmStationCode: '',
|
||||
confirmSectionCode: '',
|
||||
status: '',
|
||||
time: 0
|
||||
},
|
||||
@ -147,16 +126,17 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'sectionList'
|
||||
]),
|
||||
...mapGetters('map', ['stationList', 'sectionList']),
|
||||
filterStationList() {
|
||||
const list = [];
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(elem => {
|
||||
if (list.findIndex(it => { return it.name == elem.name; }) < 0) {
|
||||
list.push({ name: elem.name });
|
||||
if (
|
||||
list.findIndex(it => {
|
||||
return it.name == elem.name;
|
||||
}) < 0
|
||||
) {
|
||||
list.push({ name: elem.name, code: elem.code });
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -201,30 +181,16 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
return '';
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.sectionName': function (name) {
|
||||
const index = Math.floor(Math.random(1) * 5);
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (i == index) {
|
||||
this.randomSectionList.push({ name });
|
||||
} else {
|
||||
const section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
|
||||
if (section.type != '02') {
|
||||
if (this.randomSectionList.findIndex(it => { return it.name == section.name; }) < 0) {
|
||||
this.randomSectionList.push({ name: section.name });
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
if (this.type !== 'password') {
|
||||
this.commitOnce();
|
||||
} else if (this.type !== 'text') {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -256,35 +222,31 @@ export default {
|
||||
this.status = '';
|
||||
this.model.stationName = '';
|
||||
this.model.sectionName = '';
|
||||
this.model.confirmStationName = '';
|
||||
this.model.confirmSectionName = '';
|
||||
this.model.confirmStationCode = '';
|
||||
this.model.confirmSectionCode = '';
|
||||
this.model.sectionCode = '';
|
||||
this.model.stationCode = '';
|
||||
if (selected) {
|
||||
this.model.sectionCode = selected.code;
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type == '03') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
const hasParentCode = (this.selected.type == '02');
|
||||
if (section && hasParentCode) {
|
||||
this.model.sectionName = `${section.name}-${selected.name}(${selected.code})`;
|
||||
} else {
|
||||
const hasParentCode = (this.selected.type == '02');
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section && hasParentCode) {
|
||||
this.model.sectionName = section.name;
|
||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
||||
} else {
|
||||
this.model.sectionName = `${selected.name}`;
|
||||
}
|
||||
this.model.sectionName = `${selected.name}(${selected.code})`;
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionParentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
this.model.sectionName = `${section.name}(${section.code})`;
|
||||
this.model.sectionCode = section.code;
|
||||
}
|
||||
}
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
this.model.stationCode = station.code;
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +254,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.stopTask();
|
||||
this.$nextTick(function () {
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
@ -301,6 +263,19 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
getSectionList(code) {
|
||||
this.randomSectionList = [];
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.stationCode == code) {
|
||||
let name = `${section.name}(${section.code})`;
|
||||
if (section.type == '02') {
|
||||
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
|
||||
name = `${sectionParent.name}-${section.name}(${section.code})`;
|
||||
}
|
||||
this.randomSectionList.push({ name: `${name}`, code: section.code });
|
||||
}
|
||||
});
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
@ -312,7 +287,6 @@ export default {
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: ''
|
||||
};
|
||||
|
||||
@ -326,23 +300,17 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = this.timenum;
|
||||
this.model.time = 60;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
});
|
||||
},
|
||||
stationSelectChange(val) {
|
||||
if (this.model.confirmStationName === this.model.stationName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
stationSelectChange(code) {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
val: code
|
||||
};
|
||||
this.getSectionList(code);
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||
@ -352,19 +320,13 @@ export default {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseStation.blur();
|
||||
});
|
||||
},
|
||||
sectionSelectChange(val) {
|
||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
sectionSelectChange(code) {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
val: code
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
@ -375,68 +337,70 @@ export default {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseSection.blur();
|
||||
});
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
const operate = {
|
||||
over:true,
|
||||
val: this.selected.code,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_COMFIRMATION_AXLE;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE;
|
||||
}
|
||||
|
||||
this.model.status = '';
|
||||
if (this.model.stationName == this.model.confirmStationName &&
|
||||
this.model.sectionName == this.model.confirmSectionName) {
|
||||
if (this.model.stationCode == this.model.confirmStationCode && this.model.sectionCode == this.model.confirmSectionCode) {
|
||||
this.stepNum = 3;
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', 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) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
if (this.model.stationName != this.model.confirmStationName) {
|
||||
if (this.model.stationCode != this.model.confirmStationCode) {
|
||||
this.model.status = '车站选择错误';
|
||||
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
||||
} else if (
|
||||
this.model.sectionCode != this.model.confirmSectionCode
|
||||
) {
|
||||
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.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
.then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.alxe-effective .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control"
|
||||
class="ningbo-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -12,8 +12,8 @@
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span :key="message">{{ message }}</span>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -24,14 +24,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
@ -54,24 +54,23 @@ export default {
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
} else {
|
||||
return '';
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return '设置折返策略';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -102,27 +101,18 @@ export default {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
this.setBackStrategy();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
this.sendCommand(menuOperate.Signal.signalClose);
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
this.sendCommand(menuOperate.StationStand.setBackStrategy);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
@ -137,14 +127,26 @@ export default {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,47 +1,41 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-human-control-all"
|
||||
class="ningbo-01__systerm route-unlock-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<span>{{ title }}</span>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>在{{ stationName }}【{{ signalName }}】信号机,信号解锁,确认下达吗?</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationHumanControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -49,13 +43,13 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '全集中站进路交人工控';
|
||||
return '信号解封';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -65,12 +59,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -80,36 +79,37 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.station-human-control-all .context {
|
||||
.route-unlock-confirm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
@ -1,59 +1,67 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{message}}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button type="primary" :id="confirmId" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: '',
|
||||
}
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
return "提示";
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
title() {
|
||||
return '提示';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.message = operate.message;
|
||||
this.dialogShow = true;
|
||||
this.confirmId = operate.confirmId;
|
||||
},
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
confirm() {
|
||||
this.$emit('close');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
@ -61,8 +69,8 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.beijing-01__systerm .el-dialog .el-button{
|
||||
.ningbo-01__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,178 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
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>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,198 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
title="密码校验"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showMistake">
|
||||
<el-col :span="22" :offset="1">
|
||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">7</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">8</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">9</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">4</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">5</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">6</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">1</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">2</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">3</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">0</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputClear">C</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="backSpace"> < </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '1',
|
||||
dialogShow: false,
|
||||
operation: null,
|
||||
checkHasInput: false,
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel: {
|
||||
get: function () {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
set: function () {
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operate.operateNext) : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.showMistake = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() { // 确定
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
},
|
||||
/* 软键盘输入*/
|
||||
inputNum(e) {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck += e.path[0].innerText;
|
||||
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
||||
},
|
||||
/* 软键盘清除*/
|
||||
inputClear() {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck = '';
|
||||
this.encryptionPassword = '';
|
||||
},
|
||||
/* 软键盘回退*/
|
||||
backSpace() {
|
||||
this.showMistake = false;
|
||||
const password = this.passwordCheck;
|
||||
if (password !== '') {
|
||||
this.passwordCheck = password.substring(0, password.length - 1);
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
send: false,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
.password-error {
|
||||
|
||||
color: red;
|
||||
}
|
||||
</style>
|
@ -1,90 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="message in messages">{{message}}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'Popup-Alarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '弹出式告警';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.messages = messages || [];
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
// 确认计轴有效
|
||||
this.alxeEffective();
|
||||
}
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="350px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
||||
@ -28,44 +18,28 @@
|
||||
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="160"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>确定</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
@ -90,6 +64,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'overlapData'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -113,28 +90,19 @@ export default {
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.commitDisabled) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
@ -151,8 +119,14 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
const routeList = JSON.parse(JSON.stringify(tempData || []));
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.tempData = routeList;
|
||||
this.tempData.forEach(route => {
|
||||
if (route.turnBack) {
|
||||
route.name = `${route.name}(Z)`;
|
||||
}
|
||||
});
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -186,7 +160,7 @@ export default {
|
||||
this.row.canSetting = true;
|
||||
this.restoreBeforeDevices();
|
||||
const containSectionList = [];
|
||||
if (row.canSetting) {
|
||||
if (!row.setting) {
|
||||
// 设置选中区段为切除状态
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
@ -204,7 +178,25 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList && this.overlapData[row.overlapCode].pathList.length) {
|
||||
this.overlapData[row.overlapCode].pathList.forEach(item => {
|
||||
if (item.sectionList && item.sectionList.length) {
|
||||
item.sectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(logicSectionCode => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCode));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
@ -219,6 +211,8 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -241,6 +235,7 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
144
src/jmapNew/theme/race_01/menus/dialog/routerCommand.vue
Normal file
144
src/jmapNew/theme/race_01/menus/dialog/routerCommand.vue
Normal file
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm route-lock"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header" style="line-height: 44px;">
|
||||
{{ message }}
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'RouteLock',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
message: '',
|
||||
selected: null,
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.cancelGuide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
return '人解进路';
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, message) {
|
||||
this.selected = selected;
|
||||
this.operate = operate.operation;
|
||||
this.message = message;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
this.cancelGuide();
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
this.guide();
|
||||
}
|
||||
},
|
||||
// 人解进路 / 取消进路引导
|
||||
cancelGuide() {
|
||||
this.sendCommand(menuOperate.Signal.cancelGuide);
|
||||
},
|
||||
// 引导进路
|
||||
guide() {
|
||||
this.sendCommand(menuOperate.Signal.guide);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
164
src/jmapNew/theme/race_01/menus/dialog/sectionAlxeReset.vue
Normal file
164
src/jmapNew/theme/race_01/menus/dialog/sectionAlxeReset.vue
Normal file
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="24">
|
||||
<span style="margin-right: 10px;">区段:</span>
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="sectionCode"
|
||||
filterable
|
||||
size="mini"
|
||||
@change="sectionSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in switchAndPhySicalSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
sectionCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
switchAndPhySicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '03'; });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.AxleReset.SetAxleReset.choose.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '计轴复位';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionCode = '';
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
sectionSelectChange() {
|
||||
const operate = {
|
||||
operation: OperationEvent.AxleReset.SetAxleReset.choose.operation,
|
||||
val: this.sectionCode
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET,
|
||||
param: {
|
||||
sectionCode: this.sectionCode
|
||||
}
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
280
src/jmapNew/theme/race_01/menus/dialog/standBulkBuckleTrain.vue
Normal file
280
src/jmapNew/theme/race_01/menus/dialog/standBulkBuckleTrain.vue
Normal file
@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="'批量设置' + title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row :id="chooseId" style="margin-top: -13px; padding: 20px 0px 5px 0;">
|
||||
<el-col :span="11">
|
||||
<span>上行线路设置{{ title }}</span>
|
||||
<el-table ref="tableUp" :data="upStandList" tooltip-effect="dark" height="400" style="width: 100%;margin: 5px 0;" @selection-change="handleSelectionChangeUp">
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column label="站台名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="upForward" style="display: block; text-align: left;margin-bottom: 5px;">正向{{ title }}</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<span>下行线路设置{{ title }}</span>
|
||||
<el-table ref="tableDown" :data="downStandList" tooltip-effect="dark" height="400" style="width: 100%;margin: 5px 0;" @selection-change="handleSelectionChangeDown">
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column label="站台名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="downForward" style="display: block; text-align: left;margin-bottom: 5px;">正向{{ title }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
standCode: '',
|
||||
radio: '1',
|
||||
upSelectList: [],
|
||||
downSelectList: [],
|
||||
upStandList: [],
|
||||
downStandList: [],
|
||||
upForward: true, // 上行
|
||||
downForward: false // 下行
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
chooseId() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
return OperationEvent.StationStand.setBulkBuckleTrain.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
return OperationEvent.StationStand.cancelBulkBuckleTrain.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
return '取消扣车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.initList();
|
||||
this.upSelectList = [];
|
||||
this.downSelectList = [];
|
||||
|
||||
this.operation = operate.operation;
|
||||
this.standCode = operate.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
initList() {
|
||||
this.upStandList = [];
|
||||
this.downStandList = [];
|
||||
if (this.stationStandList && this.stationStandList.length) {
|
||||
this.stationStandList.filter(elem => { return !elem.small; }).forEach(item => {
|
||||
if (item.right) {
|
||||
this.upStandList.push(item);
|
||||
} else {
|
||||
this.downStandList.push(item);
|
||||
}
|
||||
});
|
||||
this.upForward = false;
|
||||
this.downForward = false;
|
||||
this.$nextTick(() => {
|
||||
this.upStandList.forEach(item => {
|
||||
if (item.code == this.selected.code) {
|
||||
this.$refs.tableUp && this.$refs.tableUp.toggleRowSelection(item);
|
||||
this.upForward = true;
|
||||
}
|
||||
});
|
||||
this.downStandList.forEach(item => {
|
||||
if (item.code == this.selected.code) {
|
||||
this.$refs.tableDown && this.$refs.tableDown.toggleRowSelection(item);
|
||||
this.downForward = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.operation = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleSelectionChangeUp(val) {
|
||||
this.upSelectList = val;
|
||||
},
|
||||
handleSelectionChangeDown(val) {
|
||||
this.downSelectList = val;
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
}
|
||||
},
|
||||
// 批量扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL,
|
||||
param: {
|
||||
rightHoldTrain: { standCodes: [], forward: this.upForward },
|
||||
leftHoldTrain: { standCodes: [], forward: this.downForward }
|
||||
}
|
||||
};
|
||||
this.upSelectList.forEach(item => {
|
||||
operate.param.rightHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
this.downSelectList.forEach(item => {
|
||||
operate.param.leftHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
if (!operate.param.rightHoldTrain.forward) {
|
||||
operate.param.rightHoldTrain.standCodes = [];
|
||||
}
|
||||
if (!operate.param.leftHoldTrain.forward) {
|
||||
operate.param.leftHoldTrain.standCodes = [];
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 批量取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL,
|
||||
param: {
|
||||
rightHoldTrain: { standCodes: [], forward: this.upForward },
|
||||
leftHoldTrain: { standCodes: [], forward: this.downForward }
|
||||
}
|
||||
};
|
||||
this.upSelectList.forEach(item => {
|
||||
operate.param.rightHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
this.downSelectList.forEach(item => {
|
||||
operate.param.leftHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
if (!operate.param.rightHoldTrain.forward) {
|
||||
operate.param.rightHoldTrain.standCodes = [];
|
||||
}
|
||||
if (!operate.param.leftHoldTrain.forward) {
|
||||
operate.param.leftHoldTrain.standCodes = [];
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
|
||||
</style>
|
@ -1,275 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
:lazy="false"
|
||||
class="tree-height-max"
|
||||
:default-expand-all="true"
|
||||
style="background: #f0f0f0;"
|
||||
>
|
||||
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
|
||||
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
|
||||
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
|
||||
<div
|
||||
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;"
|
||||
>
|
||||
{{ data.name }}</div>
|
||||
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
|
||||
{{ data.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
<!-- <el-row class="header">
|
||||
<el-col :span="10"><span>车站名称</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>站台状态</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
||||
<el-table-column prop="item" :width="140" label="项目">
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div> -->
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
treeData: [
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '车站',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '站台',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '停站时间',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '跳停',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '站台基本信息',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '中心扣车',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '车站扣车',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '扣车',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '上行站台',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '下行站台',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '运行等级',
|
||||
level: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站台详细信息';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
}
|
||||
|
||||
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
|
||||
// this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||
// this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||
// 中心扣车
|
||||
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
|
||||
// 车站扣车
|
||||
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
||||
// 停站时间
|
||||
this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动';
|
||||
// 跳停
|
||||
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||
if (!stationStand || !station) {
|
||||
this.tempData.push({ item: '运行等级', status: `自动` });
|
||||
} else {
|
||||
this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
||||
}
|
||||
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
||||
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
// this.standName = '';
|
||||
// this.stationName = '';
|
||||
this.treeData[0].children[0].value = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
// this.standName = selected.name;
|
||||
this.treeData[0].children[1].value = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
// this.stationName = station.name;
|
||||
this.treeData[0].children[0].value = station.name;
|
||||
// this.treeData[0].children[1].value = station.runPlanName
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-run-level"
|
||||
class="ningbo-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
@ -26,7 +26,7 @@
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="120"
|
||||
height="180"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
@ -42,15 +42,12 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -58,37 +55,18 @@ import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'StandBackStrategy',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyList: [
|
||||
{
|
||||
value: '01',
|
||||
label: '无折返'
|
||||
},
|
||||
{
|
||||
value: '02',
|
||||
label: '无人折返'
|
||||
},
|
||||
{
|
||||
value: '03',
|
||||
label: '自动换端'
|
||||
},
|
||||
{
|
||||
value: '04',
|
||||
label: '关闭'
|
||||
}
|
||||
],
|
||||
strategyList: [],
|
||||
stationName: '',
|
||||
stationStrategy: '',
|
||||
selection: [],
|
||||
isConfirm: false,
|
||||
strategy: '',
|
||||
strategyId: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
@ -105,13 +83,20 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Station.setBackStrategy.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Station.setBackStrategy.choose.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '变通策略管理';
|
||||
return '策略选择';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading && this.isConfirm) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -120,31 +105,13 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.setCurrentRow(null);
|
||||
});
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.stationName = '';
|
||||
this.stationStrategy = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
this.strategyList.forEach(item => {
|
||||
if (item.value == opts.reentryStrategy) {
|
||||
this.stationStrategy = item.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
const name = selected.optionList.find(ele => ele.id == selected.tbStrategyId).label;
|
||||
this.stationName = selected.name || '';
|
||||
this.stationStrategy = selected.tbStrategyId ? name : '无策略折返'; // 当前默认折返策略
|
||||
this.strategyList = selected.optionList; // 策略列表
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -154,11 +121,11 @@ export default {
|
||||
},
|
||||
clickEvent(row, column, event) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation
|
||||
operation: OperationEvent.Station.setBackStrategy.choose.operation
|
||||
};
|
||||
this.strategy = row.value;
|
||||
this.strategyId = row.id;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -183,20 +150,19 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then(({valid})=>{
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {id: this.strategyId}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
@ -1,400 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-cmd-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车站名称" label-width="100px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { now } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'StationCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: null,
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: '上电解锁' },
|
||||
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: '执行关键操作测试' }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
return '执行关键操作测试';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.dialogShow = true;
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
|
||||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
313
src/jmapNew/theme/race_01/menus/dialog/stationControl.vue
Normal file
313
src/jmapNew/theme/race_01/menus/dialog/stationControl.vue
Normal file
@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row style="margin-bottom: 10px;">
|
||||
<el-col :span="17">
|
||||
<el-table ref="table" :data="stationLists" border style="width: 100%;" size="mini" height="260" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column label="选择" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.checked" :disabled="scope.row.disable" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车站名">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.controlMode == 'Center'">遥控</span>
|
||||
<span v-else-if="scope.row.controlMode == 'Local'">站控</span>
|
||||
<!-- <span v-else-if="scope.row.controlMode == 'Local' && $route.query.prdType == '02'">中心请求站控</span>
|
||||
<span v-else-if="scope.row.controlMode == 'Center' && $route.query.prdType == '01'">现地请求遥控</span> -->
|
||||
<span v-else>获取状态中...</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-radio v-model="controlMode" label="center" :disabled="disabledAll" style="margin-bottom: 8px;">请求站控</el-radio>
|
||||
<el-radio v-model="controlMode" label="local" :disabled="disabledAll">请求遥控</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 15px;">
|
||||
<el-col :span="17">
|
||||
<el-col :span="11" style="text-align: center;"><el-checkbox v-model="checkedAll" size="medium" :disabled="disabledAll" @change="selectAll">全部选择</el-checkbox></el-col>
|
||||
<el-col :span="11" :offset="2"><el-checkbox v-model="checked2" :disabled="disabledAll" size="medium">全部确认</el-checkbox></el-col>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1" style="margin-top: -56px;">
|
||||
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" style="margin-left: 0; margin-bottom: 10px; width: 100%;" @click="commit">应 用</el-button>
|
||||
<el-button :id="domIdCancel" style="margin-left: 0; width: 100%;" @click="cancel">关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'StationControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
controlMode: 'center',
|
||||
beforeSectionList: [],
|
||||
checkedAll: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
stationLists: [],
|
||||
disabledAll: false,
|
||||
checked2: false,
|
||||
commitDisabled:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
return '站遥控转换';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.controlTransfer':function (controlTransferList) {
|
||||
controlTransferList.forEach(controlTransfer=>{
|
||||
this.updateTableValue(controlTransfer);
|
||||
});
|
||||
},
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getStationList(disable) {
|
||||
this.stationLists = [];
|
||||
if (this.stationList && this.stationList.length) {
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||
let checked = false;
|
||||
if (station.code == this.selected.code) {
|
||||
checked = true;
|
||||
}
|
||||
const param = {
|
||||
checked: checked,
|
||||
disable: disable,
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
controlMode: station.controlMode
|
||||
};
|
||||
this.stationLists.push(param);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
updateTableValue(controlTransfer) {
|
||||
this.stationLists.forEach((row, index) => {
|
||||
if (row.code == controlTransfer.code) {
|
||||
if (controlTransfer.applicantId) {
|
||||
this.commitDisabled = true;
|
||||
} else {
|
||||
this.commitDisabled = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
// this.tableData.forEach((row, index) => {
|
||||
// if (row.code == controlTransfer.code) {
|
||||
// if (controlTransfer.applicantId) {
|
||||
// row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDuration + this.$t('menu.menuDialog.senedMessageTwo');
|
||||
// row.disabled = true;
|
||||
// row.check = false;
|
||||
// } else {
|
||||
// if (row.control != this.controlProps[controlTransfer.controlMode]) {
|
||||
// row.result = this.$t('menu.menuDialog.controlModeTransfersuccees');
|
||||
// row.control = this.controlProps[controlTransfer.controlMode];
|
||||
// this.removeSelection(controlTransfer.code);
|
||||
// row.disabled = true;
|
||||
// row.check = false;
|
||||
// } else {
|
||||
// row.result = this.$t('menu.menuDialog.controlModeTransferFailed');
|
||||
// this.removeSelection(controlTransfer.code);
|
||||
// row.disabled = false;
|
||||
// row.check = false;
|
||||
// }
|
||||
// this.disabledClose = false;
|
||||
// this.disabledSure = false;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
},
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
if (selected) {
|
||||
this.getStationList(true);
|
||||
this.disabledAll = true;
|
||||
} else {
|
||||
this.getStationList(false);
|
||||
this.disabledAll = false;
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
this.controlMode = 'local';
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
this.controlMode = 'center';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
selectAll() {
|
||||
this.stationLists.forEach(row => {
|
||||
if (this.checkedAll) {
|
||||
row.checked = true;
|
||||
} else {
|
||||
row.checked = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
const list = [];
|
||||
this.stationLists.forEach(row => {
|
||||
if (row.checked) {
|
||||
list.push(row.code);
|
||||
}
|
||||
});
|
||||
if (list && list.length) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: '',
|
||||
param: {
|
||||
stationCodes: list
|
||||
}
|
||||
};
|
||||
if (this.controlMode == 'center') {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (this.controlMode == 'local') {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,147 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-set-route-control-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="padding: 0px 10px">
|
||||
<el-form ref="form" size="small" label-width="90px" label-position="left">
|
||||
<el-form-item label="集中站名称:" prop="stationName">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-radio-group v-model="mode">
|
||||
<el-row>
|
||||
<el-radio :label="true">检查冲突</el-radio>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-radio :label="false">不检查冲突</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationSetRouteControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
mode: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '全集中站设置进路控制模式';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
val: this.mode
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.station-set-route-control-all .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-define"
|
||||
class="ningbo-01__systerm train-define"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -38,15 +38,15 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainDefine',
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '定义车组号';
|
||||
return '设置车体号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -170,7 +170,7 @@ export default {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-stop-time"
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
@ -24,7 +24,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
@ -145,7 +145,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1,167 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 98%; float: left; padding: 10px 15px; margin: 20px 0px; height: 120px;">
|
||||
<!-- <span class="base-label">目的</span> -->
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal" style="width:280px">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.deletePlanTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou_01 .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -1,160 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-flag"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 15px; margin-bottom: 30px">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="addModel.type" :disabled="true">
|
||||
<el-radio label="01">备选项</el-radio>
|
||||
<el-radio label="02">备选项</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainFlag',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
type: '01',
|
||||
groupNumber: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'ATP切除功能';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-move"
|
||||
class="ningbo-01__systerm train-move"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -38,15 +38,15 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移车组号';
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -165,13 +165,13 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
|
@ -1,175 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
|
||||
<span class="base-label">源</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 次 号:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou_01 .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-head"
|
||||
class="ningbo-01__systerm train-set-head"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -40,7 +40,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
class="ningbo-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -40,7 +40,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-work"
|
||||
class="ningbo-01__systerm train-set-work"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
@ -24,7 +24,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,33 +1,29 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-edit"
|
||||
class="ningbo-01__systerm train-set-work"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">新车组号</el-col>
|
||||
<el-col :span="6">车组号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
<el-col :span="18">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="01">标记ATP切除</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="radio" label="02">标记APT恢复</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -38,18 +34,18 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainEdit',
|
||||
name: 'TrainSetWork',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
@ -58,10 +54,9 @@ export default {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: ''
|
||||
},
|
||||
radio: '01',
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
@ -83,7 +78,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改计划车';
|
||||
return 'ATP切除功能';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -121,7 +116,7 @@ export default {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -135,7 +130,7 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -147,7 +142,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -165,13 +160,13 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
// background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
181
src/jmapNew/theme/race_01/menus/dialog/turnBackControl.vue
Normal file
181
src/jmapNew/theme/race_01/menus/dialog/turnBackControl.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm signal-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>折返</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 12px 0;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
passRadio: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||
return OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.domId;
|
||||
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||
return OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
title() {
|
||||
return '自动折返';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'AutoTurnBack'.toUpperCase()) {
|
||||
const autoReentryData = this.$store.getters['map/autoReentryData'];
|
||||
this.signalName = autoReentryData[selected.cycleCode].name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation;
|
||||
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||
this.passRadio = '1';
|
||||
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||
this.passRadio = '2';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||
this.singalPassModel(); // 设置自动折返
|
||||
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||
this.singalCancelPassModel(); // 取消自动折返
|
||||
}
|
||||
},
|
||||
// 设置自动折返
|
||||
singalPassModel() {
|
||||
this.sendCommand(menuOperate.Signal.setAutoTurnBack);
|
||||
},
|
||||
// 取消自动折返
|
||||
singalCancelPassModel() {
|
||||
this.sendCommand(menuOperate.Signal.cancelAutoTurnBack);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,17 +2,20 @@
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-station-control ref="menuStationControl" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
<!--<passive-alarm ref="passiveAlarm" />-->
|
||||
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
||||
<!--<passive-Timeout ref="passiveTimeout" />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,34 +23,40 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationStand,
|
||||
MenuStationControl,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuStationTurnBack,
|
||||
MenuLimit,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
// PassiveAlarm,
|
||||
PassiveContorl
|
||||
// PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -73,13 +82,15 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
this.$refs['menuSignal'].setRouteSignal();
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus{
|
||||
height:0px;
|
||||
}
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
@ -92,29 +103,29 @@ export default {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.beijing-01__systerm {
|
||||
.ningbo-01__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog {
|
||||
.ningbo-01__systerm .el-dialog {
|
||||
background: rgba(100, 100, 100, 0.3);
|
||||
border: 2px solid rgb(144, 144, 144, 0.8);
|
||||
border: 2px solid rgba(144, 144, 144, 0.8);
|
||||
border-radius: 6px;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__header {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__header {
|
||||
padding: 10px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__footer {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__footer {
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__body {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__body {
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
@ -123,7 +134,7 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__title {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__title {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
color: #000;
|
||||
@ -133,7 +144,7 @@ export default {
|
||||
line-height: 20px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__title::before {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -145,7 +156,7 @@ export default {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
@ -154,15 +165,15 @@ export default {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button {
|
||||
.ningbo-01__systerm .el-dialog .el-button {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0px;
|
||||
@ -173,31 +184,31 @@ export default {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .expand {
|
||||
.ningbo-01__systerm .el-dialog .expand {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:focus span {
|
||||
.ningbo-01__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:active {
|
||||
.ningbo-01__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:disabled {
|
||||
.ningbo-01__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:disabled span {
|
||||
.ningbo-01__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input {
|
||||
.ningbo-01__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
@ -205,16 +216,16 @@ export default {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-textarea {
|
||||
.ningbo-01__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
@ -222,24 +233,24 @@ export default {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
|
||||
.ningbo-01__systerm .el-dialog .el-table--border th.gutter {
|
||||
background: #EBEADB !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table {
|
||||
.ningbo-01__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table .cell {
|
||||
.ningbo-01__systerm .el-dialog .el-table .cell {
|
||||
line-height: unset !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
.ningbo-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
@ -248,42 +259,57 @@ export default {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table tr td {
|
||||
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table th.is-leaf {
|
||||
background: #fff !important;
|
||||
border-right: 1px solid #fff !important;
|
||||
border-bottom: 1px solid #EBEEF5 !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
|
||||
border-right: 1px solid #e2e2e2 !important;
|
||||
}
|
||||
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table .el-table__body-wrapper .el-table__row .el-table-column--selection {
|
||||
border-right: 1px solid #e2e2e2 !important;
|
||||
}
|
||||
|
||||
.ningbo-01__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
.ningbo-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .current-row>td {
|
||||
.ningbo-01__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__label {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
@ -296,20 +322,20 @@ export default {
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__label {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
@ -319,42 +345,43 @@ export default {
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: #F0F0F0;
|
||||
padding: 0 5px;
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-form-item label {
|
||||
.ningbo-01__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .context {
|
||||
.ningbo-01__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .table {
|
||||
.ningbo-01__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .notice {
|
||||
.ningbo-01__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .button-group {
|
||||
.ningbo-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
125
src/jmapNew/theme/race_01/menus/menuAutoTrunRoute.vue
Normal file
125
src/jmapNew/theme/race_01/menus/menuAutoTrunRoute.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<turn-back-control ref="turnBackControl" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import TurnBackControl from './dialog/turnBackControl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
TurnBackControl
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置自动折返',
|
||||
handler: this.handlerTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
{
|
||||
label: '取消自动折返',
|
||||
handler: this.cancelTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置自动折返',
|
||||
handler: this.handlerTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
{
|
||||
label: '取消自动折返',
|
||||
handler: this.cancelTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AutoTurnBack) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置自动折返
|
||||
handlerTurnBack() {
|
||||
commitOperate(menuOperate.Signal.setAutoTurnBack, {cycleCode:this.selected.cycleCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消自动折返
|
||||
cancelTurnBack() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoTurnBack, {cycleCode:this.selected.cycleCode, cancelRoute:false}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
103
src/jmapNew/theme/race_01/menus/menuAxleReset.vue
Normal file
103
src/jmapNew/theme/race_01/menus/menuAxleReset.vue
Normal file
@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-alxe-reset ref="sectionAlxeReset" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionAlxeReset from './dialog/sectionAlxeReset';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionAlxeReset
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '计轴复位',
|
||||
handler: this.handleAxleReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AxleReset) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置计轴复位
|
||||
handleAxleReset() {
|
||||
commitOperate(menuOperate.AxleReset.SetAxleReset, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionAlxeReset.doShow(operate);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -89,7 +89,7 @@
|
||||
<station-control ref="stationControl" />
|
||||
<detain-train-contorl ref="detainTrainContorl" />
|
||||
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
@ -379,6 +379,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '关于ITS GPC 工作站',
|
||||
@ -585,22 +586,22 @@ export default {
|
||||
{
|
||||
title: '全线扣车',
|
||||
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
|
||||
click: this.setDetainTrainAll
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消全线扣车',
|
||||
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
|
||||
click: this.cancelDetainTrainAll
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消上行全线扣车',
|
||||
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
|
||||
click: this.cancelUpDetainTrainAll
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消下行全线扣车',
|
||||
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
|
||||
click: this.cancelDownDetainTrainAll
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -703,8 +704,8 @@ export default {
|
||||
initMenu(menu) {
|
||||
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
|
||||
if (this.menu[3]) {
|
||||
this.menu[3].children = this.initStationList();
|
||||
if (this.menu[2]) {
|
||||
this.menu[2].children = this.initStationList();
|
||||
}
|
||||
this.clickEvent();
|
||||
this.closeMenu(true);
|
||||
@ -771,7 +772,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
selectedClassB(item, index) {
|
||||
const order = this.order || 0;
|
||||
if (this.mode !== TrainingMode.TEACH) { // 编辑模式下可显示
|
||||
this.popupMenuB(item, index);
|
||||
} else if (this.steps[order] && this.steps[order].type == 'bar') { // 操作步骤没有顶部操作顶部菜单都不可显示
|
||||
this.popupMenuB(item, index);
|
||||
}
|
||||
},
|
||||
popupMenuB(item, index) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
const operate = {
|
||||
|
@ -1,468 +0,0 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height:45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<button
|
||||
:id="Signal.arrangementRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.arrangementRoute.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>进</b>
|
||||
<b>路</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>建</b>
|
||||
<b>立</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="MixinCommand.totalCancel.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(MixinCommand.totalCancel.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>总</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>取</b>
|
||||
<b>消</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.humanTrainRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.humanTrainRoute.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>总</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>人</b>
|
||||
<b>解</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.reopenSignal.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.reopenSignal.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>信</b>
|
||||
<b>号</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>重</b>
|
||||
<b>开</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.guide.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.guide.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Station.guideLock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Station.guideLock.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.locate.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.locate.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>定</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.reverse.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.reverse.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>反</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.lock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.lock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>单</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Switch.unlock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.unlock.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>道</b>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>解</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.setAutoInterlock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.setAutoInterlock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>自</b>
|
||||
<b>动</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>进</b>
|
||||
<b>路</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Section.fault.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Section.fault.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>区</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>故</b>
|
||||
<b>解</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Section.axlePreReset.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Section.axlePreReset.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>计</b>
|
||||
<b>轴</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>复</b>
|
||||
<b>位</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="MixinCommand.functionButton.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(MixinCommand.functionButton.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b style="color:deepskyblue">功</b>
|
||||
<b style="color:burlywood">能</b>
|
||||
</center>
|
||||
<center>
|
||||
<b style="color: red">按</b>
|
||||
<b style="color:forestgreen">钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_12"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.turnoutForce.menu.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>强</b>
|
||||
<b>扳</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>授</b>
|
||||
<b>权</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import { deepAssign } from '@/utils/index';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 15
|
||||
},
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
buttonDownColor: '#A8A8A8',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 58,
|
||||
tempData: null,
|
||||
offset: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.canvasOffsetCount': function (val) {
|
||||
this.resetPosition();
|
||||
},
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.resetPosition();
|
||||
},
|
||||
methods: {
|
||||
resetPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonDown(operation) {
|
||||
const operate = {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
operation: data.operation,
|
||||
over:true,
|
||||
cmdType:data.cmdType
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
selectedChange() {
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (model && model._type) {
|
||||
switch (this.$store.state.menuOperation.buttonOperation) {
|
||||
case OperationEvent.Station.guideLock.button.operation : {
|
||||
if (model && model._type == 'GuideLock') {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Station.guideLock.button.operation,
|
||||
param:{
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (model.totalGuideLock) {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK;
|
||||
} else {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
}
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.functionButton.button.operation : {
|
||||
|
||||
if (model && model._type == 'AutoTurnBack' && !model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Station.guideLock.button.operation,
|
||||
param:{
|
||||
cycleCode:model.cycleCode
|
||||
},
|
||||
cmdType : CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
if (model && model._type == 'AutoTurnBack' && model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Station.guideLock.button.operation,
|
||||
param:{
|
||||
cycleCode:model.cycleCode,
|
||||
cancelRoute:false
|
||||
},
|
||||
cmdType : CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Handler.clear();
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #f5f7fa;
|
||||
|
||||
.menu {
|
||||
background-color: $bg;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -79,9 +79,6 @@ export default {
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
// else {
|
||||
// this.menu = [...this.menuNormal];
|
||||
// }
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm two-confirmation"
|
||||
class="ningbo-01__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -25,14 +25,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
@ -73,6 +73,13 @@ export default {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -118,13 +125,13 @@ export default {
|
||||
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
}
|
||||
this.doClose();
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}, 1000).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
<el-dialog class="ningbo-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
@ -151,7 +151,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
<el-dialog class="ningbo-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -123,7 +123,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
<el-dialog class="ningbo-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
@ -167,7 +167,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
class="ningbo-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -21,7 +21,7 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -45,6 +45,10 @@ export default {
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
@ -61,18 +65,25 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@ -80,6 +91,13 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.disabledCommit) {
|
||||
this.handleCommit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -95,9 +113,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -141,17 +163,17 @@ export default {
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -165,16 +187,17 @@ export default {
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
class="ningbo-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -21,7 +21,7 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -45,8 +45,11 @@ export default {
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -61,18 +64,22 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@ -80,6 +87,13 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.disabledCommit) {
|
||||
this.handleCommit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -95,9 +109,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -144,14 +162,14 @@ export default {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -168,13 +186,14 @@ export default {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
<el-dialog class="ningbo-01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="height: 70px;">
|
||||
<div style="position: relative; left: 10px;">
|
||||
@ -120,7 +120,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
<el-dialog class="ningbo-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
||||
<span class="base-label">用户列表</span>
|
||||
@ -279,7 +279,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
class="ningbo-01__systerm station-control"
|
||||
title="控制模式转换"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -15,6 +15,7 @@
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<el-select
|
||||
:id="domIdChooseStation"
|
||||
ref="chooseStation"
|
||||
v-model="station"
|
||||
value-key="code"
|
||||
filterable
|
||||
@ -24,6 +25,7 @@
|
||||
>
|
||||
<el-option v-for="item in concertrateStationList" :key="item.code" :label="item.name" :value="item" />
|
||||
</el-select>
|
||||
|
||||
</el-row>
|
||||
<el-radio-group :id="domIdChooseControl" v-model="stationType">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px">
|
||||
@ -37,14 +39,15 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<two-confirmation ref="twoConfirmation" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
@ -61,7 +64,7 @@ export default {
|
||||
stationType: '01',
|
||||
station:{},
|
||||
stationCode: '',
|
||||
stationName: '',
|
||||
stationName:'',
|
||||
message:'',
|
||||
controlProps: {
|
||||
'03': '紧急站控',
|
||||
@ -88,14 +91,19 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.stationType == '01') {
|
||||
return OperationEvent.StationControl.requestCentralControl.menu.domId;
|
||||
} else if (this.stationType == '02') {
|
||||
return OperationEvent.StationControl.requestStationControl.menu.domId;
|
||||
} else if (this.stationType == '03') {
|
||||
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
|
||||
if (this.dialogShow) {
|
||||
if (this.stationType == '01') {
|
||||
return OperationEvent.StationControl.requestCentralControl.menu.domId;
|
||||
} else if (this.stationType == '02') {
|
||||
return OperationEvent.StationControl.requestStationControl.menu.domId;
|
||||
} else if (this.stationType == '03') {
|
||||
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
@ -106,6 +114,18 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.disabledCommit) {
|
||||
this.handleCommit();
|
||||
}
|
||||
},
|
||||
'$store.state.map.controlTransfer':function (controlTransferList) {
|
||||
controlTransferList.forEach(controlTransfer=>{
|
||||
this.updateTableValue(controlTransfer);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -119,11 +139,29 @@ export default {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
// if (this.$store.state.training.prdType == '01') {
|
||||
// this.controlProps = {
|
||||
// '03': '紧急站控',
|
||||
// '02': '站控'
|
||||
// };
|
||||
// }
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
updateTableValue(controlTransfer) {
|
||||
this.concertrateStationList.forEach((row, index) => {
|
||||
if (row.code == controlTransfer.code) {
|
||||
if (controlTransfer.applicantId) {
|
||||
this.disabledCommit = true;
|
||||
} else {
|
||||
this.disabledCommit = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
@ -131,19 +169,21 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChooseChangeStation(data) {
|
||||
this.message = '';
|
||||
this.stationCode = data.code;
|
||||
this.stationName = data.name;
|
||||
this.message = '';
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.order.choose1.operation
|
||||
operation: OperationEvent.Command.order.choose1.operation,
|
||||
val: this.stationCode
|
||||
};
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
|
||||
// } else if (this.stationType == '02') {
|
||||
@ -155,12 +195,14 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseStation.blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChooseChangeControl() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.order.choose.operation
|
||||
operation: OperationEvent.Command.order.choose.operation,
|
||||
val: this.stationCode
|
||||
};
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
@ -198,35 +240,29 @@ export default {
|
||||
},
|
||||
// 请求遥控
|
||||
conterCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName);
|
||||
}
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由站控转为遥控:\n' + this.stationName);
|
||||
});
|
||||
},
|
||||
// 请求站控
|
||||
requestCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
});
|
||||
},
|
||||
// 紧急站控
|
||||
emergencyCommit() {
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-radio {
|
||||
|
@ -1,157 +1,166 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车'
|
||||
}
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
@ -159,4 +168,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,144 +1,149 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车'
|
||||
}
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
@ -146,4 +151,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,152 +1,161 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车'
|
||||
}
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -31,7 +31,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
systemName:'beijing-01__systerm',
|
||||
systemName:'ningbo-01__systerm',
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
@ -51,6 +51,10 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
|
@ -1,41 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="beijing-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="beijing-01__systerm" />
|
||||
<section-control ref="sectionControl" pop-class="ningbo-01__systerm" />
|
||||
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo,
|
||||
SetFault,
|
||||
TrainAddPlan
|
||||
TrainAddPlan,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -50,26 +51,48 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '轨道激活',
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '区段跟踪激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '轨道切除',
|
||||
label: '区段跟踪切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '区段跟踪激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段跟踪切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
// },
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
@ -78,18 +101,18 @@ export default {
|
||||
{
|
||||
label: '取消临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
@ -117,11 +140,6 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Section') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -144,7 +162,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -162,25 +179,7 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Section.fault.button.operation: {
|
||||
// 区故解
|
||||
if (selectType.fault) {
|
||||
this.faultUnlock(selectType);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `该区段[${selectType.name}(${selectType.code})]没有故障`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Section.axlePreReset.button.operation: {
|
||||
// 计轴复位
|
||||
this.axlePreReset(selectType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加计划车(开发专用)
|
||||
// 新建计划车(开发专用)
|
||||
addPlanTrain() {
|
||||
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -190,39 +189,17 @@ export default {
|
||||
},
|
||||
// // 设置计轴失效
|
||||
// alxeFailure() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// param: {
|
||||
// sectionCode: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// this.mouseCancelState(this.selected);
|
||||
// commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
// }).catch(()=>{
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -236,6 +213,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -243,7 +221,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
// 区段激活
|
||||
active() {
|
||||
const hasParentCode = (this.selected.type == '02' || this.selected.type == '03');
|
||||
const sectionCode = hasParentCode ? this.selected.parentCode : this.selected.code;
|
||||
@ -253,35 +231,50 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset(selectType) {
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
// 区段封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
// axlePreReset() {
|
||||
// this.commitOperate(menuOperate.Section.axlePreReset, {sectionCode:this.selected.code},0).then((data)=>{
|
||||
// this.$refs.sectionCmdControl.doShow(data.operate, this.selected);
|
||||
// });
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const hasParentCode = (this.selected.type == '02' || this.selected.type == '03');
|
||||
const sectionCode = hasParentCode ? this.selected.parentCode : this.selected.code;
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelSpeed() {
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.SetFault, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -295,17 +288,6 @@ export default {
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
cancelSpeed() {
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,12 +2,13 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" :pop-class="systemName" />
|
||||
<route-hand-control ref="routeHandControl" :system-name="systemName" />
|
||||
<route-detail ref="routeDetail" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" :pop-class="systemName" />
|
||||
<route-un-lock ref="routeUnLock" pop-class="ningbo-01__systerm" />
|
||||
<route-control ref="routeControl" pop-class="ningbo-01__systerm" />
|
||||
<route-hand-control ref="routeHandControl" system-name="ningbo-01__systerm" />
|
||||
<route-detail ref="routeDetail" system-name="ningbo-01__systerm" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -16,17 +17,16 @@ import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandControl';
|
||||
import RouterCommand from './dialog/routerCommand';
|
||||
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -34,10 +34,11 @@ export default {
|
||||
PopMenu,
|
||||
RouteControl,
|
||||
RouteSelection,
|
||||
RouteUnLock,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouterCommand,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
@ -51,13 +52,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
clickNum:0,
|
||||
systemName:'beijing-01__systerm',
|
||||
oldSelected:null,
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
@ -74,7 +70,34 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '信号机引导办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: 'Fleet进路办理',
|
||||
handler: this.singalPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: 'Fleet进路取消',
|
||||
handler: this.singalCancelPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
@ -91,6 +114,53 @@ export default {
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '设置通过模式',
|
||||
handler: this.singalPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消通过模式',
|
||||
handler: this.singalCancelPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -122,7 +192,10 @@ export default {
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
])
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
@ -131,14 +204,8 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Signal') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
@ -147,12 +214,7 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -171,137 +233,17 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
setRouteSignal() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
let signalList = [];
|
||||
this.routeList.forEach(route=>{
|
||||
signalList.push(route.startSignalCode);
|
||||
signalList.push(route.endSignalCode);
|
||||
});
|
||||
signalList = Array.from(new Set(signalList));
|
||||
signalList.forEach(signal=>{
|
||||
const signalDevice = this.$store.getters['map/getDeviceByCode'](signal);
|
||||
const signalModel = Object.assign({_type: 'Signal'}, signalDevice);
|
||||
signalModel.isRouteSignal = true;
|
||||
this.$store.dispatch('map/updateMapDevices', signalModel);
|
||||
});
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Signal.arrangementRoute.button.operation: {
|
||||
// 进路建立
|
||||
if (this.clickNum >= 1) {
|
||||
let route = null;
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.oldSelected.code) {
|
||||
if (elem.endSignalCode === selectType.code) {
|
||||
route = elem;
|
||||
}
|
||||
const signalCode = this.$store.getters['map/getDeviceByCode'](elem.endSignalCode);
|
||||
const data = Object.assign({_type: 'Signal'}, signalCode);
|
||||
data.isRouteActive = false;
|
||||
this.$store.dispatch('map/updateMapDevices', data);
|
||||
}
|
||||
});
|
||||
if (route) {
|
||||
this.setRoute(route);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `没有以[${this.oldSelected.name}(${this.oldSelected.code})]为始端信号机,以[${selectType.name}(${selectType.code})] 为终端信号机的进路`);
|
||||
}
|
||||
this.clickNum = 0;
|
||||
} else {
|
||||
this.oldSelected = selectType;
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.oldSelected.code) {
|
||||
const signalCode = this.$store.getters['map/getDeviceByCode'](elem.endSignalCode);
|
||||
const data = Object.assign({_type: 'Signal'}, signalCode);
|
||||
data.isRouteActive = true;
|
||||
this.$store.dispatch('map/updateMapDevices', data);
|
||||
}
|
||||
});
|
||||
this.clickNum++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
// 总取消
|
||||
const occupy = this.isTrainOccupy(selectType);
|
||||
if (occupy) {
|
||||
// 关闭信号
|
||||
this.signalCloseByLow(selectType);
|
||||
} else {
|
||||
// 取消进路
|
||||
this.cancelTrainRouteByLow(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.humanTrainRoute.button.operation: {
|
||||
// 总人解
|
||||
this.humanTrainRoute(selectType);
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.reopenSignal.button.operation: {
|
||||
// 信号重开
|
||||
if (selectType.greenOpen) {
|
||||
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
|
||||
} else {
|
||||
// 开放进路信号机因故关闭
|
||||
this.reopenSignalByRoute(selectType);
|
||||
// 开放非进路信号机因故关闭
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.guide.button.operation: {
|
||||
// 引导按钮
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.setAutoInterlock.button.operation: {
|
||||
// 自动进路
|
||||
if (selectType.fleetMode != undefined) {
|
||||
if (selectType.fleetMode) {
|
||||
this.singalCancelPassModel(selectType);
|
||||
} else {
|
||||
this.singalPassModel(selectType);
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]没有已锁闭进路,不能设置联锁自动进路`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
isTrainOccupy(selectType) {
|
||||
const data = this.$store.getters['map/getApproachSectionByCode'](selectType.code);
|
||||
if (data && data.routeSectionList.length > 0) {
|
||||
let isTrainOccupy = false;
|
||||
data.routeSectionList.forEach(sectionCode=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
if (section && (section.ctOccupied || section.nctOccupied) ) {
|
||||
isTrainOccupy = isTrainOccupy || true;
|
||||
}
|
||||
});
|
||||
return isTrainOccupy;
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
// 排列进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -309,13 +251,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
setRoute(route) {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -324,27 +259,20 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地取消进路
|
||||
cancelTrainRouteByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地总人解
|
||||
humanTrainRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
@ -363,13 +291,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号关灯
|
||||
signalCloseByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -387,17 +308,19 @@ export default {
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
singalPassModel() {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
singalCancelPassModel() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
@ -408,28 +331,36 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
operation: data.operation,
|
||||
over:true,
|
||||
cmdType:data.cmdType
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
|
@ -1,37 +1,35 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-cmd-control ref="stationCmdControl" />
|
||||
<station-human-control-all ref="stationHumanControlAll" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<station-cmd-control ref="stationCmdControl" pop-class="ningbo-01__systerm" />
|
||||
<station-human-control-all ref="stationHumanControlAll" pop-class="ningbo-01__systerm" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationCmdControl from './dialog/stationCmdControl';
|
||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||
import StationCmdControl from '@/jmapNew/theme/components/menus/dialog/stationCmdControl';
|
||||
import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
StationCmdControl,
|
||||
StationHumanControlAll,
|
||||
SetFault,
|
||||
StationSetRouteControlAll,
|
||||
NoticeInfo
|
||||
},
|
||||
@ -51,49 +49,40 @@ export default {
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
auth: { station: true, center: false }
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
auth: { station: true, center: false }
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
}
|
||||
// 暂时没有该操作-------等后端后续添加
|
||||
// {
|
||||
// label: '上电解锁',
|
||||
// handler: this.powerUnLock,
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: true, center: false }
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '所有进路自排关',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
auth: { station: false, center: true }
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '所有进路自排开',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
auth: { station: false, center: true }
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
}
|
||||
// 暂时没有该操作-------等后端后续添加
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: false, center: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -141,20 +130,10 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.centralized) {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
if (this.selected.centralized) {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
@ -187,92 +166,58 @@ export default {
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.Station.setAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.Station.cancelAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
powerUnLock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.powerUnLock, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.execKeyOperationTest, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排关
|
||||
humanControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.humanControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.atsAutoControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
|
131
src/jmapNew/theme/race_01/menus/menuStationControl.vue
Normal file
131
src/jmapNew/theme/race_01/menus/menuStationControl.vue
Normal file
@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-control ref="stationControl" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationControl from './dialog/stationControl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StationControl
|
||||
},
|
||||
// props: {
|
||||
// selected: {
|
||||
// type: Object,
|
||||
// default() {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '请求站控',
|
||||
handler: this.setStationControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
{
|
||||
label: '请求遥控',
|
||||
handler: this.setCenterControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '请求站控',
|
||||
handler: this.setStationControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
{
|
||||
label: '请求遥控',
|
||||
handler: this.setCenterControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
this.getCurrentStateObject();
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
getCurrentStateObject() {
|
||||
this.selected = this.$store.getters['menuOperation/selected'];
|
||||
},
|
||||
setCenterControl() {
|
||||
// 请求中控(遥控)
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
setStationControl() {
|
||||
// 请求站控
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,34 +1,32 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" :system-name="systemName" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<stand-run-level ref="standRunLevel" :system-name="systemName" />
|
||||
<stand-stop-time ref="standStopTime" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<stand-control ref="standControl" system-name="ningbo-01__systerm" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
|
||||
<stand-detail ref="standDetail" pop-class="ningbo-01__systerm" />
|
||||
<stand-run-level ref="standRunLevel" system-name="ningbo-01__systerm" />
|
||||
<stand-stop-time ref="standStopTime" system-name="ningbo-01__systerm" />
|
||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||
import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import StandDetail from '@/jmapNew/theme/components/menus/dialog/standDetail';
|
||||
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
|
||||
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
|
||||
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -36,10 +34,10 @@ export default {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandJumpStopControl,
|
||||
StandBulkBuckleTrain,
|
||||
StandDetail,
|
||||
StandRunLevel,
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
SetFault
|
||||
},
|
||||
@ -54,61 +52,89 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
systemName:'beijing-01__systerm',
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
label: '扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '停站时间控制',
|
||||
handler: this.setStopTime,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: '运行时间控制',
|
||||
handler: this.setRunLevel,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: '变通策略管理',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '站台信息',
|
||||
label: '查看站台信息',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '批量扣车',
|
||||
handler: this.setBulkBuckleTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||
},
|
||||
{
|
||||
label: '批量取消扣车',
|
||||
handler: this.cancelBulkBuckleTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
},
|
||||
{
|
||||
label: '提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: '设置运行等级',
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: '区间列车数量限制',
|
||||
handler: this.setDetainTrainAll,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消区间列车数量限制',
|
||||
handler: this.cancelDetainTrainAll,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
||||
},
|
||||
{
|
||||
label: '查看站台信息',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -116,12 +142,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
@ -147,11 +173,6 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'StationStand') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -164,9 +185,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
@ -185,24 +203,6 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.MixinCommand.functionButton.button.operation: {
|
||||
// 扣车
|
||||
if (!selectType.stationHoldTrain || !selectType.centerHoldTrain) {
|
||||
this.setDetainTrainByLow(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
if (selectType.stationHoldTrain || selectType.centerHoldTrain) {
|
||||
// 取消扣车
|
||||
this.cancleDetainTrainByLow(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
@ -219,20 +219,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地设置扣车
|
||||
setDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
/** 取消扣车 */
|
||||
cancleDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -249,25 +235,41 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
// cancelDetainTrainForce() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.StationStand.type,
|
||||
// label: MapDeviceType.StationStand.label,
|
||||
// operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.standControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 区间列车数量限制
|
||||
setDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消区间列车数量限制
|
||||
cancelDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 批量扣车
|
||||
setBulkBuckleTrain() {
|
||||
commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 批量取消扣车
|
||||
cancelBulkBuckleTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
@ -281,7 +283,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -289,11 +291,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 运行时间控制
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected, []);
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -305,19 +307,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
this.$refs.standDetail.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
111
src/jmapNew/theme/race_01/menus/menuStationTurnBack.vue
Normal file
111
src/jmapNew/theme/race_01/menus/menuStationTurnBack.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-back-strategy ref="stationBackStrategy" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationBackStrategy from './dialog/stationBackStrategy';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuStationTurnBack',
|
||||
components: {
|
||||
PopMenu,
|
||||
StationBackStrategy
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationTurnBack) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.stationCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,39 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="beijing-01__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="beijing-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="beijing-01__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="ningbo-01__systerm" />
|
||||
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="ningbo-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SwitchControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo,
|
||||
@ -53,51 +52,114 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '轨道切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '轨道激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE,
|
||||
// auth: { station: false, center: true }
|
||||
// },
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
// {
|
||||
// type: 'separator'
|
||||
// label: '道岔单锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
// },
|
||||
// {
|
||||
// label: '查看站场设备状态',
|
||||
// handler: this.undeveloped,
|
||||
// disabledCallback: MenuDisabledState.Switch.setSpeed,
|
||||
// auth: { station: false, center: true }
|
||||
// }
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '查看公里标',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
@ -123,11 +185,6 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -140,10 +197,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
@ -169,99 +222,52 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Switch.locate.button.operation: {
|
||||
// 道岔总定
|
||||
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||
this.locate(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.reverse.button.operation: {
|
||||
// 道岔总反
|
||||
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||
this.reverse(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.lock.button.operation: {
|
||||
// 道岔单锁
|
||||
if (!selectType.singleLock) {
|
||||
this.lock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.unlock.button.operation: {
|
||||
// 道岔解锁
|
||||
if (selectType.singleLock) {
|
||||
this.unlock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.turnoutForce.menu.operation: {
|
||||
// 道岔强扳授权
|
||||
// this.switchTurnoutForce(selectType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
// 定操定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
// 定操反位
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
lock() {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
// 道岔单解
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
@ -288,6 +294,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
commitOperate(menuOperate.Switch.cancelSpeed, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -296,10 +310,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
@ -308,6 +318,26 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
|
@ -1,202 +0,0 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time v-if="isShowSystemTime" class="time" :time="time" :zoom="2" :width="180" :height="48" :fine="2" :top="6" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
$height: 50px;
|
||||
|
||||
#menuTool {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
top: $top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
color: #0000;
|
||||
background: #ECE9D8;
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tool {
|
||||
background: #808080;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: left;
|
||||
height: $height - 2;
|
||||
width: $width + 15;
|
||||
margin: 1px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
height: $height - 10;
|
||||
width: $width - 10;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
margin: 1px 10px;
|
||||
height: $height - 4;
|
||||
width: $width - 4;
|
||||
}
|
||||
</style>
|
@ -1,18 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<train-define ref="trainDefine" />
|
||||
<train-move ref="trainMove" />
|
||||
<train-edit ref="trainEdit" />
|
||||
<train-set-plan ref="trainSetPlan" />
|
||||
<train-move-evently ref="trainMoveEvently" />
|
||||
<train-delete-plan ref="trainDeletePlan" />
|
||||
<train-set-head ref="trainSetHead" />
|
||||
<train-set-work ref="trainSetWork" />
|
||||
<train-flag ref="trainFlag" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<trainSetWorkATP ref="trainSetWorkATP" />
|
||||
<SpeedLimit ref="speedLimit" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,25 +18,21 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
import TrainEdit from './dialog/trainEdit';
|
||||
import TrainSetPlan from './dialog/trainSetPlan';
|
||||
import TrainMoveEvently from './dialog/trainMoveEvently';
|
||||
import TrainDeletePlan from './dialog/trainDeletePlan';
|
||||
import TrainSetHead from './dialog/trainSetHead';
|
||||
import TrainSetWork from './dialog/trainSetWork';
|
||||
import TrainFlag from './dialog/trainFlag';
|
||||
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import trainSetWorkATP from './dialog/trainSetWorkATP';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -48,14 +42,12 @@ export default {
|
||||
TrainDelete,
|
||||
TrainDefine,
|
||||
TrainMove,
|
||||
TrainEdit,
|
||||
TrainSetPlan,
|
||||
TrainMoveEvently,
|
||||
TrainDeletePlan,
|
||||
TrainSetHead,
|
||||
TrainSetWork,
|
||||
TrainFlag,
|
||||
SetFault
|
||||
trainSetWorkATP,
|
||||
SetFault,
|
||||
SpeedLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -71,161 +63,94 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '定义车组号',
|
||||
// handler: this.addTrainId,
|
||||
// label: '设置车组号',
|
||||
// handler: this.addTrainId,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '添加计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.addPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '删除计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.deletePlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '平移计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.moveEventlyTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记重点列车',
|
||||
// handler: this.trainToFlag,
|
||||
// },
|
||||
// {
|
||||
// label: '取消标记重点列车',
|
||||
// handler: this.trainUnFlag,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// }
|
||||
{
|
||||
label: '设置计划车',
|
||||
handler: this.setPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
},
|
||||
{
|
||||
label: '设置头码车',
|
||||
handler: this.setHeadTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
|
||||
},
|
||||
{
|
||||
label: '设置人工车',
|
||||
handler: this.setWorkTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '定义车组号',
|
||||
// handler: this.addTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '添加计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.addPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '删除计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.deletePlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '平移计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.moveEventlyTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记重点列车',
|
||||
// handler: this.trainToFlag,
|
||||
// },
|
||||
// {
|
||||
// label: '取消标记重点列车',
|
||||
// handler: this.trainUnFlag,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '新建计划车',
|
||||
// handler: this.addPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '设乘务组号',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记ATP切除',
|
||||
// handler: this.setTrainATPdel,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '标记ATP恢复',
|
||||
// handler: this.setTrainATPRec,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '旅行冲突列车',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置车组号',
|
||||
handler: this.addTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '删除车组号',
|
||||
handler: this.delTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '移动车组号',
|
||||
handler: this.moveTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '设置计划车',
|
||||
handler: this.setPlanTrain,
|
||||
@ -240,6 +165,37 @@ export default {
|
||||
label: '设置人工车',
|
||||
handler: this.setWorkTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||
},
|
||||
{
|
||||
label: '设乘务组号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '标记ATP切除',
|
||||
handler: this.setTrainATPdel,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '标记ATP恢复',
|
||||
handler: this.setTrainATPRec,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '旅行冲突列车',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '列车信息',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -262,18 +218,30 @@ export default {
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: 'URM模式驾驶',
|
||||
handler: this.handleURMTrain
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
{
|
||||
label: '开/关门',
|
||||
handler: this.handleOpenCloseDoor
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
label: '限速行驶',
|
||||
handler: this.limitSpeed
|
||||
}
|
||||
]
|
||||
@ -307,12 +275,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = trainMenuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
@ -327,8 +290,6 @@ export default {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
|
||||
// this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -416,6 +377,34 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
handleURMTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_In_Urm_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 操作列车 开/关门
|
||||
handleOpenCloseDoor() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Open_Or_Close_Door',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
@ -424,14 +413,14 @@ export default {
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
@ -442,62 +431,58 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加列车识别号
|
||||
// 设置车体号
|
||||
addTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDefine.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除列车识别号
|
||||
// 删除车组号
|
||||
delTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动列车识别号
|
||||
// 移动车组号
|
||||
moveTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMove.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改列车识别号
|
||||
editTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEdit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置计划车
|
||||
setPlanTrain() {
|
||||
const operate = {
|
||||
@ -513,34 +498,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 平移计划车
|
||||
moveEventlyTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMoveEvently.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除计划车
|
||||
deletePlanTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.deletePlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDeletePlan.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置头码车
|
||||
setHeadTrain() {
|
||||
const operate = {
|
||||
@ -573,31 +530,37 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 标记重点车
|
||||
trainToFlag() {
|
||||
// 标记ATP切除
|
||||
setTrainATPdel() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainFlag.doShow(operate, this.selected);
|
||||
this.$refs.trainSetWorkATP.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消标记重点车
|
||||
trainUnFlag() {
|
||||
// 标记ATP恢复
|
||||
setTrainATPRec() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainFlag.doShow(operate, this.selected);
|
||||
this.$refs.trainSetWorkATP.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm alarm-detail"
|
||||
class="ningbo-01__systerm alarm-detail"
|
||||
:title="level+'级告警详细信息'"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm cmd-notice"
|
||||
class="ningbo-01__systerm cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -95,9 +95,10 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -3,6 +3,8 @@ import deviceType from '../../constant/deviceType';
|
||||
class Model {
|
||||
constructor() {
|
||||
this.screenLine = 3;
|
||||
this.screenSplit = ['5165', '10303'];
|
||||
this.screenDifference = 180;
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
@ -37,10 +39,19 @@ class Model {
|
||||
this['private'][deviceType.Train] = {
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
trainWindowShow: false
|
||||
};
|
||||
}
|
||||
|
||||
handleScreenProps(viewModel) { // 大屏隐藏元素
|
||||
const model = viewModel.model;
|
||||
if (model._type == deviceType.OutFrame ||
|
||||
model._type == deviceType.Text ||
|
||||
model._type == deviceType.AutoTurnBack) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,6 @@ const LessonHome = () => import('@/views/lesson/home');
|
||||
const LessonDetail = () => import('@/views/lesson/details');
|
||||
|
||||
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
||||
const PracticeDisplayNew = () => import('@/views/competitionManage/practiceList/display/index');
|
||||
|
||||
const IbpHome = () => import('@/views/ibp/home');
|
||||
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
|
||||
@ -93,8 +92,6 @@ const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
|
||||
const BigScreen = () => import('@/views/designPlatform/bigScreen');
|
||||
const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
|
||||
|
||||
// const DesignPlatformUser = () => import('@/views/designUser/index');
|
||||
|
||||
const Package = () => import('@/views/package/index');
|
||||
|
||||
const PublishMap = () => import('@/views/publish/publishMap/index');
|
||||
@ -123,15 +120,12 @@ const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
const StudentManage = () => import('@/views/studentManage');
|
||||
const RaceManage = () => import('@/views/competitionManage/competition/index');
|
||||
const BankManage = () => import('@/views/competitionManage/bankList/index');
|
||||
|
||||
const Scene = () => import('@/views/drts/scene/index');
|
||||
|
||||
// const PracticeManage = () => import('@/views/competitionManage/practiceList/index');
|
||||
const QuestionCreatePage = () => import('@/views/competitionManage/bankList/question-create-page');
|
||||
const QuestionUpdatePage = () => import('@/views/competitionManage/bankList/question-update-page');
|
||||
const GeneratePaper = () => import('@/views/competitionManage/generatePaper');
|
||||
|
||||
const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
|
||||
const CompetitionManage = () => import('@/views/jsxt/competition/index');
|
||||
@ -321,11 +315,6 @@ export const publicAsyncRoute = [
|
||||
component: DisplayNew,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实操试题编辑 战场图
|
||||
path: '/practiceDisplayNew/:mode',
|
||||
component: PracticeDisplayNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayBigScreen/:mapId',
|
||||
component: BigScreen,
|
||||
@ -1006,14 +995,6 @@ export const asyncRouter = [
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'manage',
|
||||
component: RaceManage,
|
||||
meta: {
|
||||
i18n: 'router.raceManage',
|
||||
icon: 'design'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'bank',
|
||||
component: BankManage,
|
||||
@ -1022,14 +1003,6 @@ export const asyncRouter = [
|
||||
icon: 'design'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'practice',
|
||||
// component: PracticeManage,
|
||||
// meta: {
|
||||
// i18n: 'router.practiceManage',
|
||||
// icon: 'design'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'scene',
|
||||
component: Scene,
|
||||
@ -1047,11 +1020,6 @@ export const asyncRouter = [
|
||||
path: 'questionUpdate/:questionId',
|
||||
component: QuestionUpdatePage,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'generate',
|
||||
component: GeneratePaper,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ export function loadMapDataById(mapId) {
|
||||
export function loadNewMapDataByMapId(mapId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getNewMapDataByMapId(mapId).then(resp => {
|
||||
covertData(resp, resolve);
|
||||
covertData(resp, 'mapId', resolve);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
@ -49,23 +49,26 @@ export function loadNewMapDataByMapId(mapId) {
|
||||
export function loadNewMapDataByGroup(group) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getNewMapDataByGroup(group).then(resp => {
|
||||
covertData(resp, resolve);
|
||||
covertData(resp, 'Group', resolve);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function covertData(resp, resolve) {
|
||||
export function covertData(resp, type, resolve) {
|
||||
resp.data.graphDataNew && resp.data.graphDataNew.trainList && resp.data.graphDataNew.trainList.forEach(item => {
|
||||
item.code = item.groupNumber;
|
||||
});
|
||||
const mapData = resp.data.graphDataNew;
|
||||
store.dispatch('map/setMapData', mapData).then(() => {
|
||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||
resolve();
|
||||
if (type == 'Group') {
|
||||
store.dispatch('map/setMapData', mapData).then(() => {
|
||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
|
||||
const overlapData = resp.data.logicDataNew.overlapList;
|
||||
const autoReentryData = resp.data.logicDataNew.autoReentryList; // 自动折返数据
|
||||
|
@ -1,165 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="创建竞赛" :visible.sync="dialogVisible" width="500px" center :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form ref="form" :model="formModel" :rules="rules" label-width="90px">
|
||||
<el-form-item label="竞赛名称:" prop="name">
|
||||
<el-input v-model="formModel.name" style="width: 220px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="竞赛地图:" prop="mapId">
|
||||
<el-select v-model="formModel.mapId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始日期:" prop="startDate">
|
||||
<el-date-picker
|
||||
v-model="formModel.startDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期:" prop="endDate">
|
||||
<el-date-picker
|
||||
v-model="formModel.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-if="!isUpdate" v-loading="loading" type="primary" @click="doSave">创建</el-button>
|
||||
<el-button v-if="isUpdate" v-loading="loading" type="primary" @click="doUpdate">修改</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateRace, createRace } from '@/api/race';
|
||||
export default {
|
||||
name: 'CreateRace',
|
||||
props: {
|
||||
mapList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var validatePass = (rule, value, callback) => {
|
||||
if (this.formModel.startDate && this.formModel.endDate) {
|
||||
if (new Date(this.formModel.startDate).valueOf() > new Date(this.formModel.endDate).valueOf()) {
|
||||
callback(new Error('竞赛开始日期不得在结束日期之后'));
|
||||
} else {
|
||||
this.$refs.form.clearValidate('startDate');
|
||||
this.$refs.form.clearValidate('endDate');
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
name: '',
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
mapId: '',
|
||||
optionalTypes: ['DISPATCHER']
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now();
|
||||
}
|
||||
},
|
||||
raceId: '',
|
||||
loading: false,
|
||||
isUpdate: false,
|
||||
mapId: '',
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入竞赛名称', trigger: 'blur' }
|
||||
],
|
||||
mapId: [
|
||||
{ required: true, message: '请输入竞赛地图', trigger: 'change'}
|
||||
],
|
||||
startDate: [
|
||||
{ required: true, message: '请输入竞赛开始日期', trigger: 'change' },
|
||||
{validator: validatePass, trigger: 'change' }
|
||||
],
|
||||
endDate: [
|
||||
{ required: true, message: '请输入竞赛开始日期', trigger: 'change' },
|
||||
{validator: validatePass, trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.dialogVisible = true;
|
||||
this.loading = false;
|
||||
this.isUpdate = false;
|
||||
this.raceId = '';
|
||||
if (row) {
|
||||
this.isUpdate = true;
|
||||
this.raceId = row.id;
|
||||
this.formModel.name = row.name;
|
||||
this.formModel.startDate = row.startDate;
|
||||
this.formModel.endDate = row.endDate;
|
||||
this.formModel.mapId = row.mapId + '';
|
||||
}
|
||||
},
|
||||
doSave() {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
createRace(this.formModel).then(resp => {
|
||||
this.$message.success('创建竞赛成功!');
|
||||
this.$emit('refresh');
|
||||
}).catch(()=> {
|
||||
this.$message.error('创建竞赛失败!');
|
||||
}).finally(()=> {
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
},
|
||||
doUpdate() {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
const params = {
|
||||
id: this.raceId,
|
||||
name: this.formModel.name,
|
||||
startDate: this.formModel.startDate,
|
||||
endDate: this.formModel.endDate,
|
||||
mapId: this.formModel.mapId
|
||||
};
|
||||
updateRace(this.raceId, params).then(resp => {
|
||||
this.$message.success('修改竞赛成功!');
|
||||
this.$emit('refresh');
|
||||
}).catch(()=> {
|
||||
this.$message.error('修改竞赛失败!');
|
||||
}).finally(() => {
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$refs.form.resetFields();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,184 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<create-race ref="createRace" :map-list="mapList" @refresh="refresh" />
|
||||
<input id="competition-manage-url" v-model="url" style="opacity: 0;">
|
||||
<div id="bm" ref="bm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRaceList } from '@/api/race';
|
||||
import CreateRace from './create';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'PublishMap',
|
||||
components: {
|
||||
CreateRace
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cityList: [],
|
||||
lineCodeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
raceName: {
|
||||
type: 'text',
|
||||
label: '竞赛名称'
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getRaceList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '竞赛名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '竞赛地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '开始日期',
|
||||
prop: 'startDate'
|
||||
},
|
||||
{
|
||||
title: '结束日期',
|
||||
prop: 'endDate'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: 580,
|
||||
buttons: [
|
||||
{
|
||||
name: '修改',
|
||||
handleClick: this.update,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '报名地址',
|
||||
handleClick: this.showApplyUrl,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '参赛地址',
|
||||
handleClick: this.showJoinUrl
|
||||
},
|
||||
{
|
||||
name: '裁判地址',
|
||||
handleClick: this.showRefereeUrl
|
||||
},
|
||||
{
|
||||
name: '生成试卷',
|
||||
handleClick: this.generatePaper
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '创建竞赛', handler: this.createRace }
|
||||
]
|
||||
},
|
||||
mapList: [],
|
||||
currentModel: {},
|
||||
url: ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.cityList = [];
|
||||
this.lineCodeList = [];
|
||||
},
|
||||
createRace() {
|
||||
this.$refs.createRace.doShow();
|
||||
},
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
update(index, row) {
|
||||
this.$refs.createRace.doShow(row);
|
||||
},
|
||||
showJoinUrl(index, row) {
|
||||
const url = `${window.location.protocol}//${window.location.host}/jsxt/login?raceId=${row.id}`;
|
||||
this.url = url;
|
||||
this.$messageBox();
|
||||
this.$confirm(`${row.name}参赛路径:${url}`, '参赛路径', {
|
||||
confirmButtonText: '复制路径',
|
||||
cancelButtonText: '关闭',
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
const inputText = document.getElementById('competition-manage-url');
|
||||
inputText.select(); // 选择对象
|
||||
document.execCommand('Copy'); // 执行浏览器复制命令
|
||||
this.$message.success('参赛路径已经复制到粘贴板');
|
||||
});
|
||||
},
|
||||
showApplyUrl(index, row) {
|
||||
// this.$messageBox(`${row.name}报名路径:${window.location.protocol}//${window.location.host}/jsxtApply?raceId=${row.id}`);
|
||||
const url = `${window.location.protocol}//${window.location.host}/jsxtApply?raceId=${row.id}`;
|
||||
this.url = url;
|
||||
this.$messageBox();
|
||||
this.$confirm(`${row.name}报名路径:${url}`, '报名路径', {
|
||||
confirmButtonText: '复制路径',
|
||||
cancelButtonText: '关闭',
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
const inputText = document.getElementById('competition-manage-url');
|
||||
inputText.select(); // 选择对象
|
||||
document.execCommand('Copy'); // 执行浏览器复制命令
|
||||
this.$message.success('报名路径已经复制到粘贴板');
|
||||
});
|
||||
},
|
||||
showRefereeUrl(index, row) {
|
||||
const url = `${window.location.protocol}//${window.location.host}/refereeJsxt/login?raceId=${row.id}`;
|
||||
this.url = url;
|
||||
this.$messageBox();
|
||||
this.$confirm(`${row.name}裁判地址:${url}`, '报名路径', {
|
||||
confirmButtonText: '复制路径',
|
||||
cancelButtonText: '关闭',
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
const inputText = document.getElementById('competition-manage-url');
|
||||
inputText.select(); // 选择对象
|
||||
document.execCommand('Copy'); // 执行浏览器复制命令
|
||||
this.$message.success('报名路径已经复制到粘贴板');
|
||||
});
|
||||
},
|
||||
generatePaper(index, row) {
|
||||
this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id, mapId: row.mapId} });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-button+.el-button{
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
@ -1,230 +0,0 @@
|
||||
<template>
|
||||
<div style="width: 100%;height: 100%;">
|
||||
<div style="margin-top: 10px;position: absolute; right: 50px;">
|
||||
<el-button size="small" type="primary" @click="exportPaper">导出试题</el-button>
|
||||
<el-button size="small" type="primary" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
<el-card style="width: 45%;margin-left: 50px;margin-top: 60px;display: inline-block;height: calc(100% - 100px);">
|
||||
<div slot="header">
|
||||
<span>理论试题列表</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="addTheoryQuestion">添加试题</el-button>
|
||||
<el-button style="float: right; padding: 3px 0;margin-right: 5px" type="text" @click="theoryReview">预览</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="theoryQuestionList"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
:summary-method="getSummaries"
|
||||
:show-summary="showSummary"
|
||||
:row-style="handleRowStyle"
|
||||
>
|
||||
<el-table-column prop="type" label="类型" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="primary" disable-transitions>{{ QuestionTypeMap[scope.row.type] }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="topic" label="题目" show-overflow-tooltip="">
|
||||
<template slot-scope="scope">
|
||||
<span v-html="scope.row.topic" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="score" label="分值" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
|
||||
<i v-if="!scope.row.editScope" class="el-icon-edit" @click="editScope(scope.row)" />
|
||||
<el-input-number v-if="scope.row.editScope" v-model="scope.row.score" v-focus="scope.row.editFocus" :controls="noControls" :min="0" size="mini" style="width: 90px" @blur="editScopeBlur(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="warning" size="mini" @click="removeTheoryQuestion(scope.row)">移出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card style="width: 45%;margin-left: calc(10% - 100px);margin-top: 60px;display: inline-block;height: calc(100% - 100px);">
|
||||
<div slot="header">
|
||||
<span>实操试题列表</span>
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="addOperateQuestion">添加试题</el-button>
|
||||
<el-button style="float: right; padding: 3px 0;margin-right: 5px" type="text" @click="operateReview">预览</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="operateQuestionList"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
:row-style="handleRowStyle"
|
||||
:summary-method="getSummaries"
|
||||
:show-summary="showSummary"
|
||||
>
|
||||
<el-table-column prop="question" label="实操名称">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.question.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="question" label="实操描述">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.question.description }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="score" label="分值">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
|
||||
<i v-if="!scope.row.editScope" class="el-icon-edit" @click="editScope(scope.row)" />
|
||||
<el-input-number v-if="scope.row.editScope" v-model="scope.row.score" v-focus="scope.row.editFocus" :controls="noControls" :min="0" size="mini" @blur="editScopeBlur(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="warning" size="mini" @click="removeOperateQuestion(scope.row)">移出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<set-exam-time ref="setExamTime" :theory-question-list="theoryQuestionList" :operate-question-list="operateQuestionList" />
|
||||
<theory-review ref="theoryReview" :theory-question-list="theoryQuestionList" />
|
||||
<theory-question ref="theoryQuestion" :theory-index-list="theoryIndexList" @addQuestion="addTheoryQuestionList" @removeQuestion="removeTheoryQuestion" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TheoryReview from './theoryReview';
|
||||
import TheoryQuestion from './theoryQuestion';
|
||||
import SetExamTime from './setExamTime';
|
||||
export default {
|
||||
name: 'GeneratPaper',
|
||||
components: {
|
||||
SetExamTime,
|
||||
TheoryReview,
|
||||
TheoryQuestion
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
QuestionTypeMap: {
|
||||
select: '选择题',
|
||||
judge: '判断题'
|
||||
},
|
||||
showSummary: true,
|
||||
noControls: false,
|
||||
theoryQuestionList: [], // 理论试卷试题列表
|
||||
operateQuestionList: [], // 实操试卷试题列表
|
||||
theoryIndexList: [], // 理论试卷试题索引列表
|
||||
operateIndexList: []// 实操试卷试题索引列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
removeOperateQuestion(row) {
|
||||
const index = this.operateIndexList.indexOf(row.id);
|
||||
this.operateIndexList.splice(index, 1);
|
||||
this.operateQuestionList.splice(index, 1);
|
||||
},
|
||||
removeTheoryQuestion(row) {
|
||||
const index = this.theoryIndexList.indexOf(row.id);
|
||||
this.theoryIndexList.splice(index, 1);
|
||||
this.theoryQuestionList.splice(index, 1);
|
||||
},
|
||||
addTheoryQuestionList(row) {
|
||||
if (this.theoryQuestionList.length) {
|
||||
this.theoryIndexList.push(row.id);
|
||||
this.theoryQuestionList.push(row);
|
||||
} else {
|
||||
this.theoryIndexList = [row.id];
|
||||
this.theoryQuestionList = [row];
|
||||
}
|
||||
},
|
||||
addOperateQuestionList(row) {
|
||||
const length = this.operateQuestionList.length;
|
||||
if (length) {
|
||||
this.operateIndexList.push(row.id);
|
||||
this.operateQuestionList.push({id:length + 1, score:0, question: row});
|
||||
} else {
|
||||
this.operateIndexList = [row.id];
|
||||
this.operateQuestionList = [{id:1, score:0, question: row}];
|
||||
}
|
||||
},
|
||||
addTheoryQuestion() {
|
||||
this.$refs.theoryQuestion.doShow();
|
||||
},
|
||||
addOperateQuestion() {
|
||||
},
|
||||
goBack() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
theoryReview() {
|
||||
this.$refs.theoryReview.doShow();
|
||||
},
|
||||
operateReview() {
|
||||
},
|
||||
editScope(row) {
|
||||
this.$set(row, 'editScope', true);
|
||||
this.$nextTick(() => {
|
||||
this.$set(row, 'editFocus', true);
|
||||
});
|
||||
},
|
||||
editScopeBlur(row) {
|
||||
this.$set(row, 'editScope', false);
|
||||
this.$set(row, 'editFocus', true);
|
||||
if (row.score > 0) {
|
||||
this.$set(row, 'isError', false);
|
||||
}
|
||||
this.showSummary = false;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getSummaries({data: this.theoryQuestionList});
|
||||
});
|
||||
},
|
||||
handleRowStyle({row, rowIndex}) {
|
||||
return row.isError ? {background: '#F00'} : {background: '#FFF'};
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { data } = param;
|
||||
const sums = [];
|
||||
sums[0] = '总分';
|
||||
const values = data.map(item => Number(item.score));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[2] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[2] += ' 分';
|
||||
}
|
||||
this.showSummary = true;
|
||||
return sums;
|
||||
},
|
||||
exportPaper() {
|
||||
let flag = false;
|
||||
this.theoryQuestionList.forEach((item) => {
|
||||
if (item.score <= 0) {
|
||||
flag = true;
|
||||
this.$set(item, 'isError', true);
|
||||
}
|
||||
});
|
||||
this.operateQuestionList.forEach((item) => {
|
||||
if (item.score <= 0) {
|
||||
flag = true;
|
||||
this.$set(item, 'isError', true);
|
||||
}
|
||||
});
|
||||
if (flag) {
|
||||
this.$message.error('试题分分值不得为0');
|
||||
} else {
|
||||
this.$refs.setExamTime.doShow();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/
|
||||
.el-card__body{
|
||||
height: calc(100% - 47px);
|
||||
}
|
||||
/deep/
|
||||
.el-table__body-wrapper {
|
||||
height: calc(100% - 97px) !important;
|
||||
}
|
||||
</style>
|
@ -1,120 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getScriptByIdBasic} from '@/api/script';
|
||||
|
||||
export default {
|
||||
name: 'ScriptDraft',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mapList:{
|
||||
type: Array,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
isEdit:false,
|
||||
formModel: {
|
||||
name: '',
|
||||
mapId: '',
|
||||
description:''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'name', label: '实操名称', type: 'text' },
|
||||
{ prop:'mapId', label:'实操地图', type:'select', options:this.mapList, disabled:this.isEdit},
|
||||
{ prop: 'description', label: '实操描述', type: 'textarea' }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const crules = {
|
||||
name: [
|
||||
{ validator: this.validateScriptName, trigger: 'blur' },
|
||||
{ validator: this.validateScriptName, trigger: 'change' }
|
||||
],
|
||||
description: [
|
||||
{ validator: this.validateDescription, trigger: 'blur' },
|
||||
{ validator: this.validateDescription, trigger: 'change' }
|
||||
],
|
||||
mapId:[
|
||||
{ required: true, message: '请选择地图', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateScriptName(rule, value, callback) {
|
||||
if (value.trim().length === 0) {
|
||||
this.formModel.name = this.formModel.name.replace(/\s/g, '');
|
||||
return callback(new Error('请输入实操名称'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
},
|
||||
validateDescription(rule, value, callback) {
|
||||
if (value.trim().length === 0) {
|
||||
this.formModel.description = this.formModel.description.replace(/\s/g, '');
|
||||
return callback(new Error('请输入实操描述'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
},
|
||||
doShow(questid) {
|
||||
if (questid) {
|
||||
getScriptByIdBasic(questid).then(resp=>{
|
||||
const data = {'name':resp.data.name, 'description':resp.data.description, 'mapId':resp.data.mapId, isRace:resp.data.isRace};
|
||||
this.formModel = data;
|
||||
this.formModel.id = questid;
|
||||
this.dialogVisible = true;
|
||||
this.isEdit = true;
|
||||
});
|
||||
} else {
|
||||
this.formModel.isRace = true;
|
||||
this.dialogVisible = true;
|
||||
this.isEdit = false;
|
||||
}
|
||||
},
|
||||
doCreate() {
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
padding: 25px 65px 30px 10px;
|
||||
}
|
||||
</style>
|
@ -1,59 +0,0 @@
|
||||
<template>
|
||||
<div class="script-parent">
|
||||
<div class="script-card" :style="{width: widthLeft+'px'}">
|
||||
<practice-record ref="tipTaskRecord" :group="group" :width="widthLeft" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" :min="480" :max="580" @drapWidth="drapWidth" />
|
||||
<div class="script-display">
|
||||
<display ref="display" :size="size" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Display from '@/views/newMap/displayNew/index';
|
||||
import PracticeRecord from './practiceRecord';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
|
||||
export default {
|
||||
name: 'ScriptDisplayNew',
|
||||
components: {
|
||||
Display,
|
||||
PracticeRecord,
|
||||
drapLeft
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
widthLeft: 480,
|
||||
size: {
|
||||
width: document.documentElement.clientWidth - 480,
|
||||
height: document.documentElement.clientHeight
|
||||
},
|
||||
group: this.$route.query.group
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.size = { width: this.$store.state.app.width - 480, height: this.$store.state.app.height};
|
||||
},
|
||||
widthLeft: function(val) {
|
||||
this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.script-parent {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
.script-card {
|
||||
width: 780px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,10 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
111
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
};
|
||||
</script>
|
@ -1,201 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<create-practice ref="createPractice" :map-list="mapList" title="创建实操" @reloadTable="reloadTable" @create="handleConfirmCreate" />
|
||||
<create-practice ref="modifyPractice" :map-list="mapList" title="修改实操" @reloadTable="reloadTable" @create="handleConfirmModify" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
import { getPublishMapListOnline, getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getPracticeList } from '@/api/race';
|
||||
import {updateScript, deleteScript, createScript} from '@/api/script';
|
||||
import { scriptRecordNotifyNew } from '@/api/simulation';
|
||||
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import CreatePractice from './create';
|
||||
export default {
|
||||
name:'PracticeManage',
|
||||
components:{
|
||||
CreatePractice
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mapList:[],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
reset: true,
|
||||
labelWidth: '80px',
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: '实操地图',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '实操名称'
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: getPracticeList,
|
||||
// data:[
|
||||
// {id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
||||
// {id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
||||
// {id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
||||
// ],
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '实操地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
width: '320',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '实操名称',
|
||||
prop: 'name',
|
||||
width: '400'
|
||||
},
|
||||
{
|
||||
title: '实操描述',
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操 作',
|
||||
width: '420',
|
||||
buttons: [
|
||||
{
|
||||
name: '录 制',
|
||||
handleClick: this.doRecord,
|
||||
type: 'success'
|
||||
},
|
||||
{
|
||||
name: '更 新',
|
||||
handleClick: this.doUpdate,
|
||||
type: 'primary'
|
||||
},
|
||||
{
|
||||
name: '删 除',
|
||||
handleClick: this.doDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
// {
|
||||
// name: '预 览',
|
||||
// handleClick: this.doDetail
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '添 加', handler: this.doCreate }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
getPublishMapListOnline().then(response=>{
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
doCreate() {
|
||||
this.$refs.createPractice.doShow(null);
|
||||
},
|
||||
doDetail() {
|
||||
|
||||
},
|
||||
doDelete(index, row) {
|
||||
this.$confirm('此操作将删除此实操, 是否继续?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteScript(row.id).then(response => {
|
||||
this.$message.success('删除实操试题成功');
|
||||
this.reloadTable();
|
||||
}).catch((error) => {
|
||||
this.$messageBox(`删除实操试题失败: ${error.message}`);
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
doRecord(index, row) {
|
||||
getPublishMapInfo(row.mapId).then(response=>{
|
||||
const lineCode = response.data.lineCode;
|
||||
scriptRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, drawWay:true, lineCode:lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
});
|
||||
});
|
||||
// row.id
|
||||
// let raceInfo;
|
||||
// this.raceList.forEach(each=>{
|
||||
// if (each.id == row.raceId) {
|
||||
// raceInfo = each;
|
||||
// }
|
||||
// });
|
||||
// practiceRecordNotify(83).then(resp => {
|
||||
// const query = { mapId: raceInfo.mapId, group: resp.data, scriptId: row.id, lineCode:raceInfo.lineCode};
|
||||
// this.$router.push({ path: `${UrlConfig.practiceDisplayNew}/practice`, query });
|
||||
// launchFullscreen();
|
||||
// }).catch(error => {
|
||||
// this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
// });
|
||||
},
|
||||
// 修改
|
||||
doUpdate(index, row) {
|
||||
this.$refs.modifyPractice.doShow(row.id);
|
||||
},
|
||||
getRaceName(raceId) {
|
||||
let raceName = '';
|
||||
this.raceList.forEach(each=>{
|
||||
if (each.id == raceId) {
|
||||
raceName = each.name;
|
||||
}
|
||||
});
|
||||
return raceName;
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
handleConfirmCreate(data) {
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data.lang = 'en';
|
||||
} else {
|
||||
data.lang = 'zh';
|
||||
}
|
||||
createScript(data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success('创建实操试题成功');
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建实操试题失败: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleConfirmModify(data) {
|
||||
updateScript(data.id, data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success('修改实操试题成功');
|
||||
}).catch(error => {
|
||||
this.$messageBox(`修改实操试题失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,238 +0,0 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="joylink-card map-list-main">
|
||||
<div class="clearfix">
|
||||
<span>{{ $t('map.myMapList') }}</span>
|
||||
</div>
|
||||
<div class="text_item">
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div class="tree_box">
|
||||
<el-tree ref="tree" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent" @node-contextmenu="showContextMenu">
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
||||
<span> {{ tnode.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="buttonList">
|
||||
<el-button size="small" type="primary" class="eachButton uploadDemo ">
|
||||
<input ref="files" type="file" class="file_box" accept=".json, application/json" @change="importf">
|
||||
{{ $t('map.importMap') }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" class="eachButton" @click="createMap">{{ $t('map.newConstruction') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<map-operate-menu
|
||||
ref="menu"
|
||||
:point="point"
|
||||
:edit-model="editModel"
|
||||
:line-code="lineCode"
|
||||
@refresh="loadInitData"
|
||||
@jlmap3d="jlmap3d"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { postBuildMapImport, listMap } from '@/api/jmap/mapdraft';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { removeSessionStorage } from '@/utils/auth';
|
||||
import MapOperateMenu from './mapmanage/operateMenu';
|
||||
|
||||
export default {
|
||||
name: 'UserMapList',
|
||||
components: {
|
||||
MapOperateMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
defaultShowKeys: [],
|
||||
filterText: '',
|
||||
treeData: [],
|
||||
treeList: [],
|
||||
selected: {},
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
editModel: {},
|
||||
lineCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// role() {
|
||||
// return this.$store.state.user.roles.includes('04') ||
|
||||
// this.$store.state.user.roles.includes('05') ||
|
||||
// this.$store.state.user.roles.includes('01');
|
||||
// }
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
removeSessionStorage('demonList');
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
createMap() {
|
||||
this.$emit('createMap');
|
||||
},
|
||||
async loadInitData() {
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await listMap({ drawWay:false});
|
||||
res.data && res.data.forEach(elem=>{
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
{
|
||||
id: '1',
|
||||
name: this.$t('designPlatform.mapDesign'),
|
||||
type: 'mapDesign',
|
||||
mapId: elem.id,
|
||||
mapName: elem.name,
|
||||
lineCode: elem.lineCode
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
name: this.$t('designPlatform.runPlanDesign'),
|
||||
type: 'runPlanDesign',
|
||||
mapId: elem.id,
|
||||
mapName: elem.name,
|
||||
lineCode: elem.lineCode
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
this.treeData = res.data;
|
||||
this.treeList = this.filterText
|
||||
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
|
||||
: res.data;
|
||||
this.loading = false;
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
switch (obj.type) {
|
||||
case 'mapDesign': {
|
||||
this.$router.push({ path: `${UrlConfig.designUser.mapDraw}/${obj.mapId}/draft`, query: { name: obj.mapName } });
|
||||
break;
|
||||
}
|
||||
case 'runPlanDesign': {
|
||||
this.$router.push({ path: `${UrlConfig.designUser.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` });
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$refs.menu.doClose();
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
if (obj && obj.type == 'map') {
|
||||
e.preventDefault();
|
||||
const menu = DeviceMenu.Map;
|
||||
|
||||
this.point = {
|
||||
x: e.clientX,
|
||||
y: e.clientY
|
||||
};
|
||||
this.editModel = obj;
|
||||
this.editModel.lineCode = obj.lineCode;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
jlmap3d() {
|
||||
this.$router.push({ path: '/design/jlmap3d/edit', query: { mapid: this.editModel.id } });
|
||||
},
|
||||
importf() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在导入中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
setTimeout(() => {
|
||||
const obj = this.$refs.files;
|
||||
if (!obj.files) return;
|
||||
const f = obj.files[0];
|
||||
const reader = new FileReader();
|
||||
const that = this;
|
||||
reader.readAsText(f, 'utf-8');
|
||||
reader.onload = function(e) {
|
||||
const data = e.target.result;
|
||||
postBuildMapImport(JSON.parse(data)).then(res => {
|
||||
loading.close();
|
||||
that.$message.success('导入成功!');
|
||||
that.loadInitData();
|
||||
loading.close();
|
||||
}).catch(error => {
|
||||
loading.close();
|
||||
that.$message.error('导入失败' + error.message);
|
||||
});
|
||||
obj.value = '';
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.clearfix{
|
||||
padding: 0 20px;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
box-sizing: border-box;
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
position: absolute;
|
||||
width:100%;
|
||||
}
|
||||
.text_item{
|
||||
height: 100%;
|
||||
padding-top: 47px;
|
||||
.tree_box{
|
||||
height: calc(100% - 89px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.buttonList{
|
||||
padding: 8px 0px 8px 0px;
|
||||
border-top: 1px #ccc solid;
|
||||
}
|
||||
.eachButton{
|
||||
margin-left:10px;
|
||||
}
|
||||
.uploadDemo {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
// float: right;
|
||||
padding: 9px 15px;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.map-list-main{
|
||||
text-align:left;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
@ -1,100 +0,0 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<map-create ref="mapCreate" :line-code="lineCode" @refresh="refresh1" />
|
||||
<div class="examList" :style="{width: widthLeft+'px'}">
|
||||
<demon-list ref="demonList" @createMap="createMap" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view :product-list="productList" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demonList from './demonList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import MapCreate from './mapmanage/create';
|
||||
|
||||
export default {
|
||||
name: 'DesignPlatform',
|
||||
components: {
|
||||
demonList,
|
||||
drapLeft,
|
||||
MapCreate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
||||
productList: [],
|
||||
lineCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
widthLeft(val) {
|
||||
this.setMapResize(val);
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.resize();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const againEnter = getSessionStorage('againEnter') || null;
|
||||
if (!againEnter) {
|
||||
launchFullscreen();
|
||||
setSessionStorage('againEnter', true);
|
||||
}
|
||||
this.resize();
|
||||
this.widthLeft = Number(localStore.get('LeftWidth'));
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.$refs && this.$refs.demonList && this.$refs.demonList.loadInitData();
|
||||
},
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
createMap() {
|
||||
this.$refs.mapCreate.show();
|
||||
},
|
||||
refresh1() {
|
||||
this.$refs.demonList.loadInitData();
|
||||
},
|
||||
resize() {
|
||||
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
||||
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
||||
const height = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||
},
|
||||
setMapResize(LeftWidth) {
|
||||
const widths = this.$store.state.app.width - 521 - LeftWidth;
|
||||
const heights = this.$store.state.app.height - 90;
|
||||
this.$store.dispatch('config/resize', { width: widths, height: heights });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.examList {
|
||||
float: left;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -1,310 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag v-dialogLoading="loadingUpload" :title="$t('map.createNewMap')" :visible.sync="dialogShow" width="30%" :close-on-click-modal="false" :before-close="handleClose">
|
||||
<div>
|
||||
<el-tabs v-model="activeTab" type="card">
|
||||
<el-tab-pane :label="$t('map.normalCreate')" name="first">
|
||||
<el-form ref="newForm" label-position="right" :model="newModel" label-width="140px" size="mini" :rules="newRules" @submit.native.prevent>
|
||||
<el-form-item :label="$t('map.lineCode')" prop="lineCode">
|
||||
<el-select v-model="newModel.lineCode" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in lineCodeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model.trim="newModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.publishMapCreation')" name="second">
|
||||
<el-form ref="pullForm" label-position="right" :model="pullModel" :rules="pullRules" label-width="140px" size="mini">
|
||||
<el-form-item :label="$t('map.publishMap')+ ':'" prop="id">
|
||||
<el-select v-model="pullModel.id" :placeholder="$t('map.pleaseSelect')" @change="handlePullModel">
|
||||
<el-option
|
||||
v-for="item in publishMapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model.trim="pullModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="create">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { newMap, newUsePublishMap } from '@/api/jmap/mapdraft';
|
||||
// import XLSX from 'xlsx';
|
||||
// import { translate, translateSheetTitle } from '@/scripts/translate';
|
||||
// import { sheet_to_json } from '@/utils/Export2Excel';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import { getMapListByProject } from '@/utils/mapList';
|
||||
|
||||
export default {
|
||||
name: 'MapCreate',
|
||||
props: {
|
||||
lineCode: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
file: null,
|
||||
rABS: false,
|
||||
loadingUpload: false,
|
||||
resultJSON: {},
|
||||
activeTab: 'first',
|
||||
lineCodeList: [],
|
||||
publishMapList: [],
|
||||
newModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
lineCode: ''
|
||||
},
|
||||
pullModel: {
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
newRules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
],
|
||||
lineCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseChooseLineCode'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
pullRules: {
|
||||
id: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectMapSource'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
cityList: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
lineCode(val) {
|
||||
this.newModel.lineCode = val;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.dialogShow = true;
|
||||
this.initLoadData();
|
||||
},
|
||||
close() {
|
||||
if (this.$refs.newForm) {
|
||||
this.$refs.newForm.resetFields();
|
||||
}
|
||||
if (this.$refs.pullForm) {
|
||||
this.$refs.pullForm.resetFields();
|
||||
}
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handlePullModel(id) {
|
||||
const obj = this.publishMapList.find(ele => ele.id == id);
|
||||
this.pullModel.name = obj.name;
|
||||
},
|
||||
handleClose() {
|
||||
this.close();
|
||||
},
|
||||
initLoadData() {
|
||||
this.lineCodeList = [];
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
this.cityList = list;
|
||||
});
|
||||
|
||||
getLineCodeList().then(response => {
|
||||
this.lineCodeList = response.data;
|
||||
});
|
||||
|
||||
const drawWay = false;
|
||||
getMapListByProject(drawWay).then(response => {
|
||||
this.publishMapList = response.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.failedLoadListPublishedMaps'));
|
||||
});
|
||||
},
|
||||
create() {
|
||||
if (this.activeTab === 'first') {
|
||||
this.$refs['newForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.newModel['drawWay'] = false;
|
||||
newMap(this.newModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
this.$message.success(this.$t('map.creatingSuccessful'));
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.createFailure'));
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs['pullForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
newUsePublishMap(this.pullModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
this.$message.success(this.$t('map.creatingSuccessful'));
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.createFailure'));
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// importf() { // 导入
|
||||
// const obj = this.$refs.files;
|
||||
// let wb;
|
||||
// if (!obj.files) return;
|
||||
// const f = obj.files[0];
|
||||
// this.loadingUpload = true;
|
||||
// const reader = new FileReader();
|
||||
// const that = this;
|
||||
// reader.onload = function (e) {
|
||||
// const data = e.target.result;
|
||||
// if (that.rABS) {
|
||||
// wb = XLSX.read(btoa(that.fixdata(data)), {// 手动转化
|
||||
// type: 'base64'
|
||||
// });
|
||||
// } else {
|
||||
// wb = XLSX.read(data, {
|
||||
// type: 'binary'
|
||||
// });
|
||||
// }
|
||||
// const resultJSONData = {};
|
||||
// for (const index in wb.Sheets) {
|
||||
|
||||
// const titleNum = that.formatSheetTitle(index);
|
||||
// const key = translateSheetTitle.sheetName[titleNum];
|
||||
|
||||
// const filterVal = that.handelData(key);
|
||||
// const jsonData = sheet_to_json(wb.Sheets[index]);
|
||||
// const data = that.formatJson(filterVal, jsonData, key);
|
||||
// if (key === 'base') {
|
||||
// for (const i in data[0]) {
|
||||
// resultJSONData[i] = data[0][i];
|
||||
// }
|
||||
// } else {
|
||||
// resultJSONData[key] = data;
|
||||
// }
|
||||
// }
|
||||
// that.resultJSON = resultJSONData;
|
||||
// if (that.resultJSON) {
|
||||
// postBuildMapImport(that.resultJSON).then(res => {
|
||||
// that.loadingUpload = false;
|
||||
// that.$message.success(this.$t('map.importSuccessful'));
|
||||
// that.$emit('refresh');
|
||||
// that.close();
|
||||
// }).catch(error => {
|
||||
// that.loadingUpload = false;
|
||||
// that.$message.error(this.$t('map.importFailure') + error.message);
|
||||
// });
|
||||
// }
|
||||
// obj.value = ''; // 清空上次导入文件
|
||||
// };
|
||||
// if (that.rABS) {
|
||||
// reader.readAsArrayBuffer(f);
|
||||
// } else {
|
||||
// reader.readAsBinaryString(f);
|
||||
// }
|
||||
// },
|
||||
// // 转换数据格式
|
||||
// handelData(key) {
|
||||
// const tHeader = [];
|
||||
// const tHeaderF = [];
|
||||
// if (translate[key]) {
|
||||
// translate[key].columns.forEach(item => {
|
||||
// tHeader.push(item.tHeader);
|
||||
// tHeaderF.push(item.key);
|
||||
// });
|
||||
// }
|
||||
// const filterVal = {
|
||||
// tHeader: tHeader,
|
||||
// tHeaderF: tHeaderF
|
||||
// };
|
||||
// return filterVal;
|
||||
// },
|
||||
// // 文件流转BinaryString
|
||||
// fixdata(data) {
|
||||
// var o = '';
|
||||
// var l = 0;
|
||||
// var w = 10240;
|
||||
// for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));
|
||||
// o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));
|
||||
// return o;
|
||||
// },
|
||||
// // 转换属性名称 格式
|
||||
// formatJson(filterVal, jsonData, key) {
|
||||
// jsonData.map((item, index) => {
|
||||
// const json = {};
|
||||
// filterVal.tHeader.map((j, o) => {
|
||||
// if (item[j] != undefined) {
|
||||
// json[filterVal.tHeaderF[o]] = translate[key].columns[o].formatter(item[j]);
|
||||
// }
|
||||
// });
|
||||
// jsonData.splice(index, 1, json);
|
||||
// });
|
||||
// return jsonData;
|
||||
// },
|
||||
// // 转换sheet名字
|
||||
// formatSheetTitle(title) {
|
||||
// let index;
|
||||
// translateSheetTitle.sheetTitle.forEach((v, i) => {
|
||||
// if (title == v) index = i;
|
||||
// });
|
||||
// return index;
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.uploadDemo {
|
||||
.el-upload-dragger {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.file_box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-loading-mask {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
</style>
|
@ -1,229 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="$t('map.mapEditor')" :visible.sync="dialogShow" :close-on-click-modal="false" width="30%" :before-close="handleClose">
|
||||
<div>
|
||||
<template v-if="basicInfo">
|
||||
<el-form ref="edit" label-position="right" :model="editModel" :rules="editRules" label-width="120px" size="mini" @submit.native.prevent>
|
||||
<el-form-item :label="$t('map.lineCode')" prop="lineCode">
|
||||
<el-select v-model="editModel.lineCode" :placeholder="$t('map.pleaseSelect')" size="mini" disabled>
|
||||
<el-option
|
||||
v-for="item in lineCodeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model.trim="editModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form ref="updt" label-position="right" :model="updtModel" :rules="updtRules" label-width="120px" size="mini" @submit.native.prevent>
|
||||
<el-form-item :label="$t('map.offsetXColon')" :prop="'origin.x'">
|
||||
<el-input v-model="updtModel.origin.x" :label="$t('map.offsetX')" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.offsetYColon')" :prop="'origin.y'">
|
||||
<el-input v-model="updtModel.origin.y" :label="$t('map.offsetY')" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.scalingColon')" prop="scaling">
|
||||
<el-input-number v-model="updtModel.scaling" :precision="1" :step="0.2" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="save">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateMap, getMapDetail } from '@/api/jmap/mapdraft';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import { saveMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'MapEdit',
|
||||
props: {
|
||||
map: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
basicInfo: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: function () {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
lineCode: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
lineCodeList: [],
|
||||
cityList: [],
|
||||
editModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
lineCode: '01',
|
||||
cityCode: ''
|
||||
},
|
||||
updtModel: {
|
||||
code: '',
|
||||
scaling: '',
|
||||
origin: {
|
||||
x: '',
|
||||
y: ''
|
||||
}
|
||||
},
|
||||
isUpdate: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
editRules() {
|
||||
return {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
],
|
||||
lineCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectAssociatedSkin'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
},
|
||||
updtRules() {
|
||||
return {
|
||||
'origin.x': [
|
||||
{ required: true, message: this.$t('rules.enterXOffset'), trigger: 'blur' }
|
||||
],
|
||||
'origin.y': [
|
||||
{ required: true, message: this.$t('rules.enterYOffset'), trigger: 'blur' }
|
||||
],
|
||||
scaling: [
|
||||
{ required: true, message: this.$t('rules.enterScale'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
map: function (val, old) {
|
||||
if (val) {
|
||||
Object.assign(this.editModel, this.map);
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapDataLoadedCount': function () {
|
||||
if (this.$jlmap.lineCode) {
|
||||
this.isUpdate = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initLoadData();
|
||||
},
|
||||
methods: {
|
||||
show(type) {
|
||||
const dataZoom = this.$store.state.map.dataZoom;
|
||||
if (type == 'editCode') {
|
||||
this.editModel.lineCode = this.editModel.lineCode ? this.editModel.lineCode : '';
|
||||
this.editModel.name = this.editModel.name ? this.editModel.name : '';
|
||||
} else if (type == 'editPoint') {
|
||||
if (dataZoom && dataZoom.offsetX) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
},
|
||||
close() {
|
||||
if (this.basicInfo) {
|
||||
this.$refs.edit.resetFields();
|
||||
} else {
|
||||
this.$refs.updt.resetFields();
|
||||
}
|
||||
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleClose() {
|
||||
this.close();
|
||||
},
|
||||
save() {
|
||||
this.loading = true;
|
||||
if (this.basicInfo) {
|
||||
this.$refs['edit'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateMap(this.editModel).then(response => {
|
||||
this.loading = false;
|
||||
if (this.isUpdate && this.$route.params.mapId) {
|
||||
getMapDetail(this.$route.params.mapId).then(response => {
|
||||
this.$store.dispatch('map/setMapData', response.data);
|
||||
});
|
||||
}
|
||||
this.$message.success(this.$t('map.mapUpdateSuccessful'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$message.error(this.$t('map.operationUnusual') + error.message);
|
||||
});
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.updtModel.code = this.lineCode;
|
||||
const map = this.$store.state.map.map;
|
||||
this.$refs['updt'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
skinVO: {
|
||||
code: this.$store.state.map.map.skinVO.code,
|
||||
name: this.$store.state.map.map.skinVO.name,
|
||||
origin: {
|
||||
x: this.updtModel.origin.x,
|
||||
y: this.updtModel.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
}
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
initLoadData() {
|
||||
this.cityList = [];
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
this.cityList = list;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.failedLoadCityList'));
|
||||
});
|
||||
|
||||
this.lineCodeList = [];
|
||||
getLineCodeList().then(response => {
|
||||
this.lineCodeList = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,265 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<map-edit ref="edit" :basic-info="true" :map="editModel" :line-code="lineCode" @refresh="refresh" />
|
||||
<!-- <map-edit ref="axisEdit" :basic-info="false" :map="editModel" :skin-code="skinCode" @refresh="refresh" /> -->
|
||||
<map-save-as ref="saveAs" :map="editModel" @refresh="refresh" />
|
||||
<map-publish ref="publish" :map="editModel" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deleteMap } from '@/api/jmap/mapdraft';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import MapEdit from './edit';
|
||||
import MapSaveAs from './saveAs';
|
||||
import MapPublish from './publish';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { saveMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'MapOperateMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
MapEdit,
|
||||
MapSaveAs,
|
||||
MapPublish
|
||||
},
|
||||
props: {
|
||||
point: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
lineCode: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
editModel: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuMap: [
|
||||
{
|
||||
label: this.$t('map.updateObj'),
|
||||
handler: this.updateObj
|
||||
},
|
||||
{
|
||||
label: this.$t('map.updateObjAxis'),
|
||||
handler: this.updateObjAxis
|
||||
},
|
||||
{
|
||||
label: this.$t('map.saveAs'),
|
||||
handler: this.saveAs
|
||||
},
|
||||
{
|
||||
label: this.$t('map.deleteObj'),
|
||||
handler: this.deleteObj
|
||||
},
|
||||
{
|
||||
label: this.$t('map.jlmap3d'),
|
||||
handler: this.jlmap3d
|
||||
}
|
||||
],
|
||||
publishMapMenu: {
|
||||
label: this.$t('map.publish'),
|
||||
handler: this.publish
|
||||
},
|
||||
menuNormal: [],
|
||||
menu: [],
|
||||
updtModel: {
|
||||
code: '',
|
||||
scaling: '',
|
||||
origin: {
|
||||
x: '',
|
||||
y: ''
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
hasRelease() {
|
||||
return this.$store.state.user.roles.includes('04') ||
|
||||
this.$store.state.user.roles.includes('05');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Map)) {
|
||||
this.menu = [...this.menuMap];
|
||||
if (this.hasRelease) {
|
||||
this.menu.push(this.publishMapMenu);
|
||||
}
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.initCancelMenu();
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.closeEvent();
|
||||
},
|
||||
methods: {
|
||||
closeEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
this.closeEvent();
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
updateObj() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.edit) {
|
||||
this.$refs.edit.show('editCode');
|
||||
}
|
||||
},
|
||||
updateObjAxis() {
|
||||
this.doClose();
|
||||
this.getMapOrigin();
|
||||
this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const map = this.$store.state.map.map;
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
skinVO: {
|
||||
code: this.$store.state.map.map.skinVO.code,
|
||||
name: this.$store.state.map.map.skinVO.name,
|
||||
origin: {
|
||||
x: this.updtModel.origin.x,
|
||||
y: this.updtModel.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
}
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
});
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
getMapOrigin() {
|
||||
const dataZoom = this.$store.state.map.dataZoom;
|
||||
if (dataZoom && dataZoom.offsetX) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
}
|
||||
},
|
||||
saveAs() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.saveAs) {
|
||||
this.$refs.saveAs.show();
|
||||
}
|
||||
},
|
||||
publish() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.publish) {
|
||||
this.$refs.publish.show();
|
||||
}
|
||||
},
|
||||
deleteObj() {
|
||||
this.doClose();
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('map.confirm'),
|
||||
cancelButtonText: this.$t('map.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteMap(this.editModel.id).then(response => {
|
||||
if (this.editModel.id == this.$route.params.mapId) {
|
||||
this.$store.dispatch('map/mapClear').then(() => {
|
||||
_that.$emit('editMap', null);
|
||||
// _that.$router.push({ path: `${UrlConfig.map.draft}/0/draft` });
|
||||
_that.$router.push({ path: `${UrlConfig.designUser.prefix}` });
|
||||
});
|
||||
}
|
||||
_that.refresh();
|
||||
_that.$message.success(this.$t('map.successfullyDelete'));
|
||||
}).catch(error => {
|
||||
_that.$message.error(this.$t('map.failDelete') + error.message);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
jlmap3d() {
|
||||
this.$emit('jlmap3d');
|
||||
},
|
||||
refresh() {
|
||||
this.$emit('refresh');
|
||||
},
|
||||
initCancelMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ {
|
||||
.menu-item{
|
||||
background: #f1ecec;
|
||||
.pop-menu {
|
||||
background: #5F9EA0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,137 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="$t('map.mapPublished')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
|
||||
<div>
|
||||
<el-form ref="form" label-position="right" :model="editModel" label-width="120px" :rules="editRules" size="mini" @submit.native.prevent>
|
||||
<el-form-item :label="$t('map.publishingAssociatedCity')" prop="cityCode">
|
||||
<el-select v-model="editModel.cityCode" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.publishMapName')" prop="name">
|
||||
<el-input v-model="editModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="publish">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { publishMap } from '@/api/jmap/mapdraft';
|
||||
import { checkMapName } from '@/api/jmap/map';
|
||||
export default {
|
||||
name: 'MapPublish',
|
||||
props: {
|
||||
map: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
cityList: [],
|
||||
editModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
cityCode: '000000'
|
||||
},
|
||||
editRules: {
|
||||
cityCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
map: function (val, old) {
|
||||
if (val) {
|
||||
Object.assign(this.editModel, this.map);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
this.cityList = list;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
close() {
|
||||
this.$refs.form.resetFields();
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleClose() {
|
||||
this.close();
|
||||
},
|
||||
publish() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
delete this.editModel.children;
|
||||
this.verifyMapName();
|
||||
}
|
||||
});
|
||||
},
|
||||
async verifyMapName() { // 校验地图名称是否唯一
|
||||
try {
|
||||
const res = await checkMapName(this.editModel.name);
|
||||
if (res.data) {
|
||||
this.confirmPublish();
|
||||
} else {
|
||||
this.publishMap();
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
confirmPublish() {
|
||||
this.$confirm(this.$t('map.verifyMapName'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.publishMap();
|
||||
}).catch(() => { this.loading = false; });
|
||||
},
|
||||
publishMap() {
|
||||
publishMap(this.editModel).then(response => {
|
||||
this.loading = false;
|
||||
if (response.data && response.data.length) {
|
||||
this.tableToExcel(response.data);
|
||||
this.$messageBox(this.$t('map.dataValidationFailed'));
|
||||
} else {
|
||||
this.$message.success(this.$t('map.releaseSuccess'));
|
||||
}
|
||||
this.close();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`${this.$t('map.abnormalOperation')}, ${error.message}`);
|
||||
});
|
||||
},
|
||||
tableToExcel(data) {
|
||||
const filterVal = ['index'];
|
||||
const arr = [];
|
||||
data.forEach(item => {
|
||||
arr.push({ index: item });
|
||||
});
|
||||
const dataList = this.formatJson(filterVal, arr);
|
||||
import('@/utils/Export2Excel').then(excel => {
|
||||
excel.export_json_to_excel([this.$t('map.datQuestion')], dataList, this.$t('map.dataList'));
|
||||
});
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => v[j]));
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,74 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="$t('map.saveMapAs')" :visible.sync="dialogShow" width="30%" :before-close="handleClose">
|
||||
<div>
|
||||
<el-form ref="form" label-position="right" :model="editModel" label-width="100px" :rules="editRules" size="mini" @submit.native.prevent>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model="editModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="saveAs">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { saveAsMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'MapSaveAs',
|
||||
props: {
|
||||
map: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
editModel: {
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
editRules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
map: function (val, old) {
|
||||
if (val) {
|
||||
Object.assign(this.editModel, this.map);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
close() {
|
||||
this.$refs.form.resetFields();
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleClose() {
|
||||
this.close();
|
||||
},
|
||||
saveAs() {
|
||||
this.loading = true;
|
||||
saveAsMap(this.editModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.saveFailed'));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -139,11 +139,12 @@
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<audio id="teleRing" :src="teleRing" preload loop />
|
||||
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import teleRing from '@/assets/teleRing.mp3';
|
||||
import ChatSetting from './chatSetting';
|
||||
import ChatContent from './chatContent';
|
||||
import ChatMemberList from './chatMemberList';
|
||||
@ -176,6 +177,7 @@ export default {
|
||||
seconds:0,
|
||||
inter:null,
|
||||
connectSuccess:false,
|
||||
teleRing:teleRing,
|
||||
recorders: null,
|
||||
microphone:null,
|
||||
createLoading:false,
|
||||
@ -291,6 +293,7 @@ export default {
|
||||
document.querySelector('.chat-box-content').scrollTop = (offsetTop - 40) > 0 ? (offsetTop - 80) : 0;
|
||||
if (!document.querySelector('#teleName').classList.contains('flash')) {
|
||||
document.querySelector('#teleName').classList.add('flash');
|
||||
document.querySelector('#teleRing').play();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -502,6 +505,7 @@ export default {
|
||||
acceptConversitionInvite(this.group, this.conversitionId).then(res=>{
|
||||
this.connectSuccess = true;
|
||||
document.querySelector('#teleName').classList.remove('flash');
|
||||
document.querySelector('#teleRing').pause();
|
||||
this.treeData.forEach(data => {
|
||||
if (data.children) {
|
||||
const member = data.children[res.data.creatorId];
|
||||
|
@ -9,7 +9,9 @@
|
||||
<el-table-column prop="scene" width="350" label="场景" />
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.id" type="primary" size="small" @click="handleLoad(scope.row)">方案一</el-button>
|
||||
<div v-if="scope.row.result">
|
||||
<el-button v-for="(each,index) in scope.row.result" :key="index" type="primary" size="small" @click="handleLoad(each)">{{ each.name }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -51,15 +53,15 @@ export default {
|
||||
selectMapLineCode:'',
|
||||
// operationType: '',
|
||||
mainSceneData: [
|
||||
{type: '车辆故障', scene: '列车救援'},
|
||||
{type: '信号系统故障', scene: '道岔故障'},
|
||||
{type: '信号系统故障', scene: '区域控制器故障'},
|
||||
{type: '信号系统故障', scene: '联锁故障'},
|
||||
{type: '供电系统故障', scene: '接触轨(网)断电'},
|
||||
{type: '供电系统故障', scene: '车站照明熄灭影响乘降'},
|
||||
{type: '车站机电设备故障', scene: '站台门故障'},
|
||||
{type: '限速', scene: '列车限速'},
|
||||
{type: '轨道故障', scene: '线路故障影响列车运行'}
|
||||
{type: '车辆故障', scene: '列车救援', result:[]},
|
||||
{type: '信号系统故障', scene: '道岔故障', result:[]},
|
||||
{type: '信号系统故障', scene: '区域控制器故障', result:[]},
|
||||
{type: '信号系统故障', scene: '联锁故障', result:[]},
|
||||
{type: '供电系统故障', scene: '接触轨(网)断电', result:[]},
|
||||
{type: '供电系统故障', scene: '车站照明熄灭影响乘降', result:[]},
|
||||
{type: '车站机电设备故障', scene: '站台门故障', result:[]},
|
||||
{type: '限速', scene: '列车限速', result:[]},
|
||||
{type: '轨道故障', scene: '线路故障影响列车运行', result:[]}
|
||||
],
|
||||
deputySceneData: [
|
||||
{ scene: '列车在站停车超时' },
|
||||
@ -75,16 +77,16 @@ export default {
|
||||
getCompetitionPracticalScene({pageSize:100, pageNum:1}).then(res=>{
|
||||
if (res.data.list && res.data.list.length > 0) {
|
||||
res.data.list.forEach(each=>{
|
||||
if (each.name == '场景1') {
|
||||
this.mainSceneData[1].id = each.id;
|
||||
if (each.name == '场景1' || each.name == '场景7') {
|
||||
this.mainSceneData[1].result.push({id:each.id, name:each.name});
|
||||
} else if (each.name == '场景4') {
|
||||
this.mainSceneData[0].id = each.id;
|
||||
this.mainSceneData[0].result.push({id:each.id, name:'场景4'});
|
||||
} else if (each.name == '场景5') {
|
||||
this.mainSceneData[4].id = each.id;
|
||||
this.mainSceneData[4].result.push({id:each.id, name:'场景5'});
|
||||
} else if (each.name == '场景9') {
|
||||
this.mainSceneData[6].id = each.id;
|
||||
this.mainSceneData[6].result.push({id:each.id, name:'场景9'});
|
||||
} else if (each.name == '场景10') {
|
||||
this.mainSceneData[7].id = each.id;
|
||||
this.mainSceneData[7].result.push({id:each.id, name:'场景10'});
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user