This commit is contained in:
fan 2019-09-26 15:43:56 +08:00
commit bc68f1adc9
47 changed files with 1530 additions and 1381 deletions

View File

@ -107,19 +107,19 @@ export default {
}, },
computed: { computed: {
width() { width() {
let fontNum = 0; let fontNum = 0;
let newLabel=""; let newLabel='';
this.menu.forEach(elem => { this.menu.forEach(elem => {
newLabel=elem.label.replace(/[^\u0000-\u00ff]/g,"aa"); newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa');
if (elem.label && newLabel.length > fontNum) { if (elem.label && newLabel.length > fontNum) {
fontNum=newLabel.length; fontNum=newLabel.length;
// fontNum = elem.label.length; // fontNum = elem.label.length;
} }
}); });
var width = fontNum/2 * this.defaultFontSize + 60 + 'px'; var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
// if(this.$t('global.lanuage')==='en'){ // if(this.$t('global.lanuage')==='en'){
// width = fontNum/2 * this.defaultFontSize + 40 + 'px'; // width = fontNum/2 * this.defaultFontSize + 40 + 'px';
// } // }
return width; return width;
} }
}, },
@ -193,7 +193,6 @@ export default {
} }
}, },
calculateSubWidth(item) { calculateSubWidth(item) {
// debugger;
const children = item.children; const children = item.children;
let width = 0; let width = 0;
let fontNum = 0; let fontNum = 0;
@ -204,7 +203,7 @@ export default {
}); });
width = fontNum * this.defaultFontSize + 20 + 'px'; width = fontNum * this.defaultFontSize + 20 + 'px';
return width; return width;
}, },
openLoadFile(item) { openLoadFile(item) {
const obj = this.$refs[item.label][0]; const obj = this.$refs[item.label][0];
if (obj.files) { if (obj.files) {

View File

@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号字体 checkColor: '#00FF00' // 信号字体
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
borderWidth: 0.5, // 信号灯边框线宽度 borderWidth: 0.5, // 信号灯边框线宽度

View File

@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号字体 checkColor: '#00FF00' // 信号字体
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
borderWidth: 0.5, // 信号灯边框线宽度 borderWidth: 0.5, // 信号灯边框线宽度

View File

@ -152,6 +152,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
guidName: 'chengdu_03', // 成都三号线引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度 borderWidth: 2, // 信号灯边框线宽度

View File

@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度 borderWidth: 2, // 信号灯边框线宽度

View File

@ -143,6 +143,7 @@ class SkinCode extends defaultStyle {
nameBorderShow: true // 信号机名字边框显示 nameBorderShow: true // 信号机名字边框显示
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 1, // 信号灯边框线宽度 borderWidth: 1, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色 borderColor: '#3149C3', // 信号灯边框线颜色

View File

@ -89,6 +89,10 @@ class ESigLamp extends Group {
this.lamp.setStyle({stroke: color}); this.lamp.setStyle({stroke: color});
} }
setStyle(data) {
this.lamp.setStyle(data);
}
setStop(has) { setStop(has) {
if (has) { if (has) {
this.lstop.show(); this.lstop.show();

View File

@ -318,7 +318,7 @@ class Signal extends Group {
// 引导 // 引导
guid() { guid() {
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 允许引导信号 if (this.count == 2 && this.model.lightType == '01' && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
if (this.lamps[0]) { if (this.lamps[0]) {
this.lamps[0].setStop(false); this.lamps[0].setStop(false);
this.lamps[0].setColor(this.style.Signal.lamp.redColor); this.lamps[0].setColor(this.style.Signal.lamp.redColor);
@ -327,6 +327,9 @@ class Signal extends Group {
this.lamps[1].setStop(false); this.lamps[1].setStop(false);
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
} }
} else if (this.count == 1 && this.model.lightType == '01' && this.style.Signal.lamp.guidName == 'chengdu_03') {
this.lamps[0].setStop(false);
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
} }
} }
@ -433,6 +436,9 @@ class Signal extends Group {
this.sigDelay.hide(); this.sigDelay.hide();
this.sigAuto.animationRecover(); this.sigAuto.animationRecover();
this.sigName.setColor(this.style.Signal.text.defaultColor); this.sigName.setColor(this.style.Signal.text.defaultColor);
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
}
} }
setState(model) { setState(model) {

View File

@ -1,432 +1,439 @@
<template> <template>
<div> <div>
<el-dialog class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" <el-dialog v-dialogDrag class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> <div style="padding: 10px 20px; border: 1px solid lightgray;">
<div style="padding: 10px 20px; border: 1px solid lightgray;"> <span class="base-label">命令信息</span>
<span class="base-label">命令信息</span> <el-form label-position="center" size="mini">
<el-form label-position="center" size="mini"> <el-row>
<el-row> <el-col :span="8">
<el-col :span="8"> <el-form-item label="类型" label-width="40px">
<el-form-item label="类型" label-width="40px"> <el-select v-model="operation" size="small" disabled>
<el-select v-model="operation" size="small" disabled> <el-option
<el-option v-for="option in typeList" :key="option.code" :label="option.name" v-for="option in typeList"
:value="option.code"> :key="option.code"
</el-option> :label="option.name"
</el-select> :value="option.code"
</el-form-item> />
</el-col> </el-select>
<el-col :span="8"> </el-form-item>
<el-form-item label="车站名称" label-width="80px"> </el-col>
<el-input v-model="stationName" size="small" disabled></el-input> <el-col :span="8">
</el-form-item> <el-form-item label="车站名称" label-width="80px">
</el-col> <el-input v-model="stationName" size="small" disabled />
<el-col :span="8"> </el-form-item>
<el-form-item label="信号机名称" label-width="100px"> </el-col>
<el-input v-model="signalName" size="small" disabled></el-input> <el-col :span="8">
</el-form-item> <el-form-item label="信号机名称" label-width="100px">
</el-col> <el-input v-model="signalName" size="small" disabled />
</el-row> </el-form-item>
</el-form> </el-col>
</div> </el-row>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini" </el-form>
highlight-current-row height="200"> </div>
<el-table-column prop="order" :width="50" label="序号"> <el-table
</el-table-column> ref="tempData"
<el-table-column prop="date" :width="160" label="时间"> class="table"
</el-table-column> :data="tempData"
<el-table-column prop="context" :width="180" label="执行过程"> border
</el-table-column> style="width: 100%"
<el-table-column prop="result" label="执行结果"> size="mini"
</el-table-column> highlight-current-row
</el-table> height="200"
<span class="notice">{{message}}</span> >
<el-row class="button-group"> <el-table-column prop="order" :width="50" label="序号" />
<el-col :span="2" :offset="2"> <el-table-column prop="date" :width="160" label="时间" />
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span <el-table-column prop="context" :width="180" label="执行过程" />
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button> <el-table-column prop="result" label="执行结果" />
</el-col> </el-table>
<el-col :span="2" :offset="2"> <span class="notice">{{ message }}</span>
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1 <el-row class="button-group">
</el-button> <el-col :span="2" :offset="2">
</el-col> <el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
<el-col :span="2" :offset="2"> v-show="timeCountCommand>0"
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span >({{ timeCountCommand }})</span></el-button>
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button> </el-col>
</el-col> <el-col :span="2" :offset="2">
<el-col :span="2" :offset="2"> <el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button> </el-button>
</el-col> </el-col>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button> <el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
</el-col> v-show="timeCountConfirm>0"
</el-row> >({{ timeCountConfirm }})</span></el-button>
</el-dialog> </el-col>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock> <el-col :span="2" :offset="2">
</div> <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>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock'; import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default { export default {
name: 'RouteCmdControl', name: 'RouteCmdControl',
components: { components: {
ConfirmSignalUnlock ConfirmSignalUnlock
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
backOperate: '', backOperate: '',
selected: '', selected: '',
order: 0, order: 0,
row: null, row: null,
timer: null, timer: null,
operation: '', operation: '',
cmdDisabled: [true, true, true], cmdDisabled: [true, true, true],
stpDisabled: true, stpDisabled: true,
tempData: [], tempData: [],
message: '', message: '',
timeCountCommand: -1, timeCountCommand: -1,
timeCountConfirm: -1, timeCountConfirm: -1,
stationName: '', stationName: '',
signalName: '' signalName: ''
} };
}, },
computed: { computed: {
typeList() { typeList() {
return [ return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' }, { code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' } { code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
] ];
}, },
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCommand() { domIdCommand() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.order.domId; return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId; return OperationEvent.Signal.guide.order.domId;
} }
} }
}, },
domIdConfirm1() { domIdConfirm1() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId; return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId; return OperationEvent.Signal.guide.confirm1.domId;
} }
} }
}, },
domIdConfirm2() { domIdConfirm2() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId; return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId; return OperationEvent.Signal.guide.confirm2.domId;
} }
} }
}, },
domIdStop() { domIdStop() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId; return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId; return OperationEvent.Signal.guide.stop.domId;
} }
} }
}, },
domIdClose() { domIdClose() {
if (this.dialogShow) { if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId; return OperationEvent.Command.close.menu.domId;
} }
}, },
title() { title() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封'; return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路'; return '办理引导进路';
} }
} }
} }
}, },
watch: { watch: {
cmdDisabled: { cmdDisabled: {
handler(val, oldVal) { handler(val, oldVal) {
this.stpDisabled = true; this.stpDisabled = true;
val.forEach((elem, index) => { val.forEach((elem, index) => {
// 1 // 1
if (elem == false && 1 <= index && index <= 2) { if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false; this.stpDisabled = false;
} }
}); });
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) { if (this.timeCountCommand > 0) {
this.timeCountCommand--; this.timeCountCommand--;
} else if (this.timeCountCommand == 0) { } else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1; this.timeCountCommand = -1;
} }
if (this.timeCountConfirm > 0) { if (this.timeCountConfirm > 0) {
this.timeCountConfirm--; this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { } else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
} }
} }
}, 1000) }, 1000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.order = 0; this.order = 0;
this.operation = operate.operation; this.operation = operate.operation;
this.tempData = []; this.tempData = [];
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true]; this.cmdDisabled = [false, true, true];
} }
this.dialogShow = true; this.dialogShow = true;
this.stpDisabled = true; this.stpDisabled = true;
this.setMessage('请点击“下达”按钮,下达命令!'); this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
command() { command() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/ /** 第一步带弹框处理*/
this.commandHasPopUp(); this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/ /** 第一步不带弹框处理*/
this.commandNoPopUp(); this.commandNoPopUp();
} }
}, },
commandHasPopUp() { commandHasPopUp() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation operate.operation = OperationEvent.Signal.unlock.order.operation;
} }
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected); this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
} }
} }
}) });
}, },
commandNoPopUp() { commandNoPopUp() {
let operate = { const operate = {
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.guide.menu.operation) { if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation operate.operation = OperationEvent.Signal.guide.order.operation;
} }
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 }); this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
}) });
}, },
confirm1() { confirm1() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation; operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation; operate.operation = OperationEvent.Signal.guide.confirm1.operation;
} }
this.setMessage('请点击“确认2”按钮确认命令'); this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = 10; this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 }); this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
}) });
}, },
confirm2() { confirm2() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation; operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation; operate.operation = OperationEvent.Signal.guide.confirm2.operation;
} }
this.setMessage(''); this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
} }
}).catch(() => { }).catch(() => {
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
}) });
}, },
stop() { stop() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation; operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation; operate.operation = OperationEvent.Signal.guide.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(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
});
},
close() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation
};
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' }); this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/next', operate).then(({ valid }) => { if (valid) {
if (valid) { this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); }
this.setButtonEnable({ step: 0 }); }).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' }); this.doClose();
} else { });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' }); },
} getOperate(operate) {
}).catch(error => { /** 弹框返回值处理*/
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' }); if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
}) /** 信号解封*/
}, this.backOperate = operate;
close() { this.setButtonEnable(operate);
let operate = { if (operate.success) {
type: MapDeviceType.Signal.type, this.timeCountCommand = 30;
operation: OperationEvent.Command.close.menu.operation, this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
} } else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { }
if (valid) { }
this.doClose(); },
} setButtonEnable(param) {
}).catch(error => { this.cmdDisabled = [true, true, true];
this.doClose(); if (param && param.step >= 0) {
}); this.cmdDisabled[param.step] = false;
}, }
getOperate(operate) { },
/** 弹框返回值处理*/ setMessage(message) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { this.message = message;
/** 信号解封*/ },
this.backOperate = operate; writeRecord(param) {
this.setButtonEnable(operate); this.tempData.push(param);
if (operate.success) { },
this.timeCountCommand = 30; editRecord(param) {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' }); this.tempData.forEach(elem => {
} else { if (elem.order == param.order) {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' }); for (var prop in param) {
} elem[prop] = param[prop];
} }
}, }
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> </script>

View File

@ -1,31 +1,26 @@
<template> <template>
<div id="statusDownTrainDetail"></div> <div id="statusDownTrainDetail" />
</template> </template>
<script> <script>
export default { export default {
name: 'StatusDownTrainDetail', name: 'StatusDownTrainDetail',
props: { props: {
selected: { selected: {
type: Object type: Object,
} default() {
}, return null;
data() { }
return { }
} },
}, data() {
mounted() { return {
} };
} },
mounted() {
}
};
</script> </script>
<style> <style>
#statusDownTrainDetail {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style> </style>

View File

@ -107,7 +107,11 @@ export default {
} }
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : ''; if (this.operate && this.operate.operateCode) {
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
} else {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
} }
}, },
mounted() { mounted() {
@ -132,11 +136,14 @@ export default {
}, },
commit() { commit() {
const operate = { const operate = {
send: true, send: this.operate.operateCode != null,
type: this.operate.type, type: this.operate.type,
operation: this.operate.operateCode, operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
val: this.operate.val
}; };
if (this.operate.val) {
operate['val'] = this.operate.val;
}
if (this.passwordCheck === this.correctPassword) { if (this.passwordCheck === this.correctPassword) {
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
@ -149,7 +156,7 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
}); });
} else { } else {
this.showMistake = true; this.showMistake = true;
@ -192,7 +199,7 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
}); });
} }
} }

View File

@ -203,12 +203,14 @@ export default {
humanTrainRoute() { humanTrainRoute() {
const operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$refs.password.doShow(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
@ -271,7 +273,6 @@ export default {
// //
humanControl() { humanControl() {
const operate = { const operate = {
// send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.humanControl.menu.operation,
operateCode: OperationEvent.Signal.humanControl.confirm.operation, operateCode: OperationEvent.Signal.humanControl.confirm.operation,

View File

@ -5,6 +5,7 @@
<template v-show="isShowBar"> <template v-show="isShowBar">
<menu-bar ref="menuBar" :selected="selected" /> <menu-bar ref="menuBar" :selected="selected" />
</template> </template>
<menu-button ref="menuButton" />
<menu-station-control ref="menuStationControl" :selected="selected" /> <menu-station-control ref="menuStationControl" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
@ -24,6 +25,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel'; import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal'; import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationControl from './menuStationControl'; import MenuStationControl from './menuStationControl';
import MenuStationStand from './menuStationStand'; import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch'; import MenuSwitch from './menuSwitch';
@ -40,6 +42,7 @@ export default {
name: 'Menus', name: 'Menus',
components: { components: {
MenuBar, MenuBar,
MenuButton,
MenuCancel, MenuCancel,
MenuSignal, MenuSignal,
MenuSwitch, MenuSwitch,

View File

@ -8,13 +8,7 @@
</li> </li>
</template> </template>
<template v-else> <template v-else>
<li <li v-if="handleShow(item)" :id="getDomId(item)" :key="i" class="nav-li" @click.stop="selectedClassA(item, i)">
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span> <span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}"> <ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children"> <template v-for="(child,j) in item.children">
@ -23,13 +17,7 @@
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
<span class="separator">&ensp;</span> <span class="separator">&ensp;</span>
</li> </li>
<li <li v-else :id="getDomId(child)" :key="j" class="menu-li" @click.stop="selectedClassB(child, j)">
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
@ -42,13 +30,7 @@
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
<span class="separator">&ensp;</span> <span class="separator">&ensp;</span>
</li> </li>
<li <li v-else-if="grandchild.show" :id="getDomId(grandchild)" :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
@ -65,13 +47,7 @@
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
<span class="separator">&ensp;</span> <span class="separator">&ensp;</span>
</li> </li>
<li <li v-else-if="child.show" :id="getDomId(child)" :key="j" class="menu-li" @click.stop="hookClick(child)">
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
@ -812,7 +788,7 @@ export default {
this.clickEvent(); this.clickEvent();
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: item.operate.operation operation: item.operate
}; };
this.tempClassA = index; this.tempClassA = index;
this.tempClassB = -1; this.tempClassB = -1;
@ -834,7 +810,7 @@ export default {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: item.operate.operation operation: item.operate
}; };
this.tempClassB = index; this.tempClassB = index;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -850,151 +826,11 @@ export default {
this.closeMenu(true); this.closeMenu(true);
} }
}, },
//
turnToStationControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
mandatoryStationControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
});
},
//
conterStationControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
setTrainIdDisplay(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewTrainId.doShow(operate);
}
});
},
//
setNameDisplay(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewName.doShow(operate);
}
});
},
//
setDeviceDisplay(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewDevice.doShow(operate);
}
});
},
//
addPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainTranstalet.doShow(operate);
}
});
},
//
delPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.manageUser.doShow(operate);
}
});
},
// //
about(order) { about(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operate
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -1021,7 +857,7 @@ export default {
setLimitSpeed(order) { setLimitSpeed(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operate
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -1034,7 +870,7 @@ export default {
cancleLimitSpeed(order) { cancleLimitSpeed(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operate
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {

View File

@ -0,0 +1,279 @@
<template>
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
<button :id="Signal.arrangementRoute.button.domId" class="button_box" :style="{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="Signal.cancelTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.cancelTrainRoute.button.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.guide.button.domId" class="button_box" :style="{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="Switch.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.guideLock.button.operation)">
<span style="color: red">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{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="Section.fault.button.domId" class="button_box" :style="{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="Switch.locate.button.domId" class="button_box" :style="{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" class="button_box" :style="{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" class="button_box" :style="{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" class="button_box" :style="{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="MixinCommand.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.block.button.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<button :id="MixinCommand.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.unblock.button.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<button :id="MixinCommand.functionButton.button.domId" class="button_box" :style="{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="Signal.atsAutoControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.atsAutoControl.button.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.humanControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanControl.button.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button id="mbm_clear" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown('mbm_clear')">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<password-box ref="password" @checkOver="doClose" />
</div>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
import { deepAssign } from '@/utils/index';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
export default {
name: 'MapButtonMenu',
components: {
PasswordBox
},
data() {
return {
point: {
x: -1000,
y: -1000
},
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;
},
MixinCommand() {
return OperationEvent.MixinCommand;
},
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: {
doClose() {
},
resetPosition() {
this.$nextTick(() => {
const canvasOffset = this.$store.state.config.canvasOffset;
this.point = {
x: canvasOffset.x + 20,
y: canvasOffset.y + this.$store.state.config.height - 65
};
this.$store.dispatch('training/tipReload');
});
},
updateButtonShow(val, old) {
if (old) {
//
const domId = getDomIdByOperation(old);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = false;
dom.style.backgroundColor = this.buttonUpColor;
}
}
if (val) {
//
const domId = getDomIdByOperation(val);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = true;
dom.style.backgroundColor = this.buttonDownColor;
}
}
},
buttonDown(operation) {
if (operation != 'mbm_clear') {
const operate = {
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (operation == this.Signal.humanTrainRoute.button.operation) { //
this.$refs.password.doShow(operate);
}
this.$store.dispatch('training/emitTipFresh');
}
});
} else {
OperateHandler.cleanOperates(); //
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
},
selectedChange() {
//
if (this.$store.state.menuOperation.buttonOperation) {
const model = this.$store.state.menuOperation.selected;
if (model._type) {
const deviceType = MapDeviceType[model._type];
const modelData = deepAssign({}, model);
const operate = {
send: true,
model: modelData,
code: model.code,
type: deviceType.type,
operation: this.$store.state.menuOperation.buttonOperation,
tempData: this.tempData
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response) {
this.tempData = response.data;
// console.log(this.tempData, '');
}
}
});
} else {
OperateHandler.cleanOperates(); //
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #fff;
$hoverBg: #f5f7fa;
.button_box{
display: block;
float: left;
}
.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>

View File

@ -1,118 +1,120 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit> <cancel-all-limit ref="cancelAllLimit" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import CancelAllLimit from './dialog/cancelAllLimit'; import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'MenuLimit', name: 'MenuLimit',
components: { components: {
PopMenu, PopMenu,
CancelAllLimit, CancelAllLimit
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
} default() {
}, return null;
data() { }
return { }
menu: [{ },
label: '取消全线临时限速', data() {
handler: this.cancelSpeed, return {
disabledCallback: '', menu: [{
auth: { station: true, center: false } label: '取消全线临时限速',
}], handler: this.cancelSpeed,
menuNormal: { disabledCallback: '',
local: [ auth: { station: true, center: false }
{ }],
label: '取消全线临时限速', menuNormal: {
handler: this.cancelSpeed, local: [
disabledCallback: MenuDisabledState.Section.cancelSpeed, {
auth: { station: true, center: false } label: '取消全线临时限速',
} handler: this.cancelSpeed,
], disabledCallback: MenuDisabledState.Section.cancelSpeed,
central: [ auth: { station: true, center: false }
{ }
label: '取消全线临时限速', ],
handler: this.cancelSpeed, central: [
disabledCallback: MenuDisabledState.Section.cancelSpeed, {
auth: { station: false, center: true } label: '取消全线临时限速',
} handler: this.cancelSpeed,
] disabledCallback: MenuDisabledState.Section.cancelSpeed,
}, auth: { station: false, center: true }
} }
}, ]
watch: { }
'$store.state.menuOperation.menuCount': function (val) { };
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) { },
this.doShow(this.$store.state.menuOperation.menuPosition); computed: {
} else { ...mapGetters('training', [
this.doClose(); 'mode',
} 'operatemode'
} ]),
}, ...mapGetters('menuOperation', [
computed: { 'buttonOperation'
...mapGetters('training', [ ])
'mode', },
'operatemode' watch: {
]), '$store.state.menuOperation.menuCount': function (val) {
...mapGetters('menuOperation', [ if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
'buttonOperation' this.doShow(this.$store.state.menuOperation.menuPosition);
]) } else {
}, this.doClose();
methods: { }
clickEvent() { }
let self = this; },
window.onclick = function (e) { methods: {
self.doClose(); clickEvent() {
} const self = this;
}, window.onclick = function (e) {
initMenu() { self.doClose();
// };
if (this.operatemode === OperateMode.ADMIN) { },
this.menu = [...this.menu] initMenu() {
} //
}, if (this.operatemode === OperateMode.ADMIN) {
doShow(point) { this.menu = [...this.menu];
this.clickEvent(); }
this.initMenu(); },
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { doShow(point) {
this.$refs.popMenu.resetShowPosition(point); this.clickEvent();
} this.initMenu();
}, if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
doClose() { this.$refs.popMenu.resetShowPosition(point);
if (this.$refs && this.$refs.popMenu) { }
this.$refs.popMenu.close(); },
} doClose() {
}, if (this.$refs && this.$refs.popMenu) {
// this.$refs.popMenu.close();
cancelSpeed() { }
let operate = { },
start: true, //
send: true, cancelSpeed() {
code: this.selected.code, const operate = {
type: MapDeviceType.LimitControl.type, start: true,
label: MapDeviceType.LimitControl.label, send: true,
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation code: this.selected.code,
}; type: MapDeviceType.LimitControl.type,
this.$store.dispatch('training/next', operate).then(({ valid }) => { label: MapDeviceType.LimitControl.label,
if (valid) { operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); };
this.$refs.cancelAllLimit.doShow(operate, this.selected); this.$store.dispatch('training/next', operate).then(({ valid }) => {
} if (valid) {
}); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}, this.$refs.cancelAllLimit.doShow(operate, this.selected);
} }
} });
}
}
};
</script> </script>

View File

@ -51,18 +51,12 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ local: [
{ // {
label: '区故解', // label: '',
handler: this.fault, // handler: this.fault,
disabledCallback: MenuDisabledState.Section.fault, // disabledCallback: MenuDisabledState.Section.fault,
auth: { station: true, center: false } // auth: { station: true, center: false }
}, // }
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
}
], ],
central: [ central: [
{ {
@ -91,6 +85,16 @@ export default {
label: '设置计轴失效', label: '设置计轴失效',
handler: this.alxeFailure, handler: this.alxeFailure,
disabledCallback: MenuDisabledState.Section.alxeFailure disabledCallback: MenuDisabledState.Section.alxeFailure
},
{
label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Section.setStoppage
},
{
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Section.cancelStoppage
} }
] ]
}; };
@ -216,6 +220,46 @@ export default {
} }
}); });
}, },
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.stoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.cancelStoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
undeveloped() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { this.$alert('实现中......', '提示', {

View File

@ -64,29 +64,29 @@ export default {
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: '总人解', label: '总人解', //
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
disabledCallback: MenuDisabledState.Signal.humanTrainRoute, disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ // {
label: '信号重开', // label: '',
handler: this.reopenSignal, // handler: this.reopenSignal,
disabledCallback: MenuDisabledState.Signal.reopenSignal, // disabledCallback: MenuDisabledState.Signal.reopenSignal,
auth: { station: true, center: false } // auth: { station: true, center: false }
}, // },
{ // {
label: '信号封锁', // label: '',
handler: this.lock, // handler: this.lock,
disabledCallback: MenuDisabledState.Signal.lock, // disabledCallback: MenuDisabledState.Signal.lock,
auth: { station: true, center: false } // auth: { station: true, center: false }
}, // },
{ // {
label: '信号解封', // label: '',
handler: this.unlock, // handler: this.unlock,
disabledCallback: MenuDisabledState.Signal.unlock, // disabledCallback: MenuDisabledState.Signal.unlock,
auth: { station: true, center: false } // auth: { station: true, center: false }
}, // },
{ {
label: '进路收人工控', label: '进路收人工控',
handler: this.humanControl, handler: this.humanControl,
@ -98,12 +98,6 @@ export default {
handler: this.atsAutoControl, handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.atsAutoControl, disabledCallback: MenuDisabledState.Signal.atsAutoControl,
auth: { station: false, center: true } auth: { station: false, center: true }
},
{
label: '查询进路控制状态',
handler: this.detail,
disabledCallback: MenuDisabledState.Signal.detail,
auth: { station: true, center: true }
} }
], ],
central: [ central: [
@ -337,7 +331,6 @@ export default {
operation: OperationEvent.Signal.guide.menu.operation operation: OperationEvent.Signal.guide.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
debugger;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
var tempData = null; var tempData = null;

View File

@ -51,15 +51,6 @@ export default {
] ]
}; };
}, },
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
@ -69,6 +60,15 @@ export default {
'buttonOperation' 'buttonOperation'
]) ])
}, },
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: { methods: {
clickEvent() { clickEvent() {
const self = this; const self = this;

View File

@ -1,69 +1,69 @@
<template> <template>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationControlMenu', name: 'StationControlMenu',
props: { components: {
selected: { PopMenu
type: Object },
} props: {
}, selected: {
components: { type: Object,
PopMenu default() {
}, return null;
data() { }
return { }
menu: [], },
menuNormal: [ data() {
], return {
menuForce: [ menu: [],
] menuNormal: [
} ],
}, menuForce: [
watch: { ]
'$store.state.menuOperation.menuCount': function (val) { };
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) { },
this.doShow(this.$store.state.menuOperation.menuPosition); computed: {
} else { ...mapGetters('training', [
this.doClose(); 'mode',
} 'operatemode'
} ]),
}, ...mapGetters('menuOperation', [
computed: { 'buttonOperation'
...mapGetters('training', [ ])
'mode', },
'operatemode' watch: {
]), '$store.state.menuOperation.menuCount': function (val) {
...mapGetters('menuOperation', [ if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
'buttonOperation' this.doShow(this.$store.state.menuOperation.menuPosition);
]) } else {
}, this.doClose();
methods: { }
clickEvent() { }
let self = this; },
window.onclick = function (e) { methods: {
self.doClose(); clickEvent() {
} const self = this;
}, window.onclick = function (e) {
doShow(point) { self.doClose();
if (this.$refs && this.$refs.popMenu) { };
this.$refs.popMenu.close(); },
} doShow(point) {
}, if (this.$refs && this.$refs.popMenu) {
doClose() { this.$refs.popMenu.close();
if (this.$refs && this.$refs.popMenu) { }
this.$refs.popMenu.close(); },
} doClose() {
} if (this.$refs && this.$refs.popMenu) {
} this.$refs.popMenu.close();
} }
}
}
};
</script> </script>

View File

@ -39,18 +39,6 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ local: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true }
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{ {
label: '设置跳停', label: '设置跳停',
handler: this.setJumpStop, handler: this.setJumpStop,
@ -62,24 +50,6 @@ export default {
handler: this.cancelJumpStop, handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true } auth: { station: true, center: true }
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }
},
{
label: '设置站间运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true }
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }
} }
], ],
central: [ central: [

View File

@ -39,54 +39,42 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ local: [
{ // {
label: '单操到定位', // label: '',
handler: this.locate, // handler: this.locate,
disabledCallback: MenuDisabledState.Switch.locate, // disabledCallback: MenuDisabledState.Switch.locate,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '单操到反位', // label: '',
handler: this.reverse, // handler: this.reverse,
disabledCallback: MenuDisabledState.Switch.reverse, // disabledCallback: MenuDisabledState.Switch.reverse,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '道岔单锁', // label: '',
handler: this.lock, // handler: this.lock,
disabledCallback: MenuDisabledState.Switch.lock, // disabledCallback: MenuDisabledState.Switch.lock,
auth: { station: true, center: false } // auth: { station: true, center: false }
}, // },
{ // {
label: '道岔解锁', // label: '',
handler: this.unlock, // handler: this.unlock,
disabledCallback: MenuDisabledState.Switch.unlock, // disabledCallback: MenuDisabledState.Switch.unlock,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '道岔封锁', // label: '',
handler: this.block, // handler: this.block,
disabledCallback: MenuDisabledState.Switch.block, // disabledCallback: MenuDisabledState.Switch.block,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '道岔解封', // label: '',
handler: this.unblock, // handler: this.unblock,
disabledCallback: MenuDisabledState.Switch.unblock, // disabledCallback: MenuDisabledState.Switch.unblock,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // }
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Switch.fault,
auth: { station: true, center: true }
},
{
label: '属性',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Switch.property,
auth: { station: true, center: true }
}
], ],
central: [ central: [
{ {

View File

@ -1,149 +1,159 @@
<template> <template>
<div id="menuTool"> <div id="menuTool">
<div class="nav"> <div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index"> <div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title" /> <img :src="item.src" :alt="item.title">
</div> </div>
<img class="logo" :src="logoImg" /> <img class="logo" :src="logoImg">
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2" <system-time
:top="6"></system-time> v-if="isShowSystemTime"
</div> class="time"
:time="time"
:zoom="2"
:width="180"
:height="48"
:fine="2"
:top="6"
/>
</div> </div>
</div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; // import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; // import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic'; // import { OperateMode } from '@/scripts/ConstDic';
import { prefixIntrger } from '@/utils/date'; import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index'; import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png'; import logo_ from '@/assets/logo_.png';
export default {
export default { name: 'MenuTool',
name: 'MenuTool', components: {
props: { SystemTime
selected: { },
type: Object props: {
} selected: {
}, type: Object,
components: { default() {
SystemTime return null;
}, }
data() { }
return { },
logoImg: logo_, data() {
time: '00:0000', return {
tools: [ logoImg: logo_,
{ time: '00:0000',
title: '服务器1', tools: [
operate: '', {
src: logo_, title: '服务器1',
click: this.undeveloped, operate: '',
}, src: logo_,
{ click: this.undeveloped
title: '服务器2', },
operate: '', {
src: '', title: '服务器2',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '前置机1', },
operate: '', {
src: '', title: '前置机1',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '前置机2', },
operate: '', {
src: '', title: '前置机2',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '主调', },
operate: '', {
src: '', title: '主调',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '调度台1', },
operate: '', {
src: '', title: '调度台1',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '调度台2', },
operate: '', {
src: '', title: '调度台2',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '调度台3', },
operate: '', {
src: '', title: '调度台3',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '大屏', },
operate: '', {
src: '', title: '大屏',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '维护工作站', },
operate: '', {
src: '', title: '维护工作站',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '运行图显示人工站', },
operate: '', {
src: '', title: '运行图显示人工站',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '跳停', },
operate: '', {
src: '', title: '跳停',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '扣车', },
operate: '', {
src: '', title: '扣车',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '列车报警', },
operate: '', {
src: logo_, title: '列车报警',
click: this.undeveloped, operate: '',
} src: logo_,
] click: this.undeveloped
} }
}, ]
watch: { };
'$store.state.training.initTime': function (initTime) { },
let date = new Date(initTime); computed: {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}` isShowSystemTime() {
} return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}, }
computed: { },
isShowSystemTime() { watch: {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode; '$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(); },
}, mounted() {
methods: { this.initTools();
initTools() { },
this.tools = []; methods: {
} initTools() {
} this.tools = [];
} }
}
};
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
$top: 30px; $top: 30px;
$width: 50px; $width: 50px;
@ -187,7 +197,6 @@
} }
} }
.time { .time {
position: relative; position: relative;
float: right; float: right;

View File

@ -1,31 +0,0 @@
<template>
<div id="statusBar"></div>
</template>
<script>
export default {
name: 'StatusBar',
props: {
selected: {
type: Object
}
},
data() {
return {
}
},
mounted() {
}
}
</script>
<style>
#statusBar {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -1,31 +0,0 @@
<template>
<div id="statusDownTrainDetail"></div>
</template>
<script>
export default {
name: 'StatusDownTrainDetail',
props: {
selected: {
type: Object
}
},
data() {
return {
}
},
mounted() {
}
}
</script>
<style>
#statusDownTrainDetail {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -1,31 +0,0 @@
<template>
<div id="statusUpTrainDetail"></div>
</template>
<script>
export default {
name: 'StatusUpTrainDetail',
props: {
selected: {
type: Object
}
},
data() {
return {
}
},
mounted() {
}
}
</script>
<style>
#statusUpTrainDetail {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -77,6 +77,20 @@ export const MenuDisabledState = {
if (device && device.status == deviceState.Section.status.State13) { if (device && device.status == deviceState.Section.status.State13) {
return true; return true;
} }
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
} }
}, },
Signal: { Signal: {

View File

@ -27,7 +27,6 @@ export default {
importData(Sheet, JsonData) { importData(Sheet, JsonData) {
var dataList = convertSheetToList(Sheet, false); var dataList = convertSheetToList(Sheet, false);
var needList = Object.keys(this.ExcelConfig.columns); var needList = Object.keys(this.ExcelConfig.columns);
debugger;
if (dataList && dataList.length) { if (dataList && dataList.length) {
for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) { for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) { for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) {

View File

@ -351,7 +351,7 @@ export const OperationEvent = {
event: '1', event: '1',
button: { button: {
operation: '1010', operation: '1010',
domId: '_Tips-Switch-Locate-Mbm' domId: '_Tips-Switch-Locate-Mbm{TOP}'
}, },
menu: { menu: {
operation: '101', operation: '101',
@ -363,7 +363,7 @@ export const OperationEvent = {
event: '2', event: '2',
button: { button: {
operation: '1020', operation: '1020',
domId: '_Tips-Switch-Reverse-Mbm' domId: '_Tips-Switch-Reverse-Mbm{TOP}'
}, },
menu: { menu: {
operation: '102', operation: '102',
@ -375,7 +375,7 @@ export const OperationEvent = {
event: '3', event: '3',
button: { button: {
operation: '1030', operation: '1030',
domId: '_Tips-Switch-Lock-Mbm' domId: '_Tips-Switch-Lock-Mbm{TOP}'
}, },
menu: { menu: {
operation: '103', operation: '103',
@ -387,7 +387,7 @@ export const OperationEvent = {
event: '4', event: '4',
button: { button: {
operation: '1040', operation: '1040',
domId: '_Tips-Switch-Unlock-Mbm' domId: '_Tips-Switch-Unlock-Mbm{TOP}'
}, },
menu: { menu: {
operation: '104', operation: '104',
@ -649,6 +649,14 @@ export const OperationEvent = {
operation: '1174', operation: '1174',
domId: '_Tips-Switch-Alxe-Effective-Confirm-2' domId: '_Tips-Switch-Alxe-Effective-Confirm-2'
} }
},
// 引导总锁
guideLock: {
event: '18',
button: {
operation: '1180',
domId: '_Tips-Switch-GuideLock-Button{TOP}'
}
} }
}, },
@ -803,7 +811,7 @@ export const OperationEvent = {
event: { query: '1', confirm: '2' }, event: { query: '1', confirm: '2' },
button: { button: {
operation: '3010', operation: '3010',
domId: '_Tips-Signal-ArrangementRoute-Mbm' domId: '_Tips-Signal-ArrangementRoute-Mbm{TOP}'
}, },
menu: { menu: {
operation: '301', operation: '301',
@ -823,7 +831,7 @@ export const OperationEvent = {
event: '3', event: '3',
button: { button: {
operation: '3030', operation: '3030',
domId: '_Tips-Signal-CancelTrainRoute-Mbm' domId: '_Tips-Signal-CancelTrainRoute-Mbm{TOP}'
}, },
menu: { menu: {
operation: '303', operation: '303',
@ -855,14 +863,14 @@ export const OperationEvent = {
event: '5', event: '5',
button: { button: {
operation: '3050', operation: '3050',
domId: '_Tips-Signal-HumanTrainRoute-Mbm' domId: '_Tips-Signal-HumanTrainRoute-Mbm{TOP}'
}, },
menu: { menu: {
operation: '3051', operation: '305',
domId: '_Tips-Signal-HumanTrainRoute-Menu' domId: '_Tips-Signal-HumanTrainRoute-Menu'
}, },
confirm: { confirm: {
operation: '3052', operation: '3051',
domId: '_Tips-Signal-HumanTrainRoute-Confirm' domId: '_Tips-Signal-HumanTrainRoute-Confirm'
} }
}, },
@ -911,7 +919,7 @@ export const OperationEvent = {
event: { query: '1', confirm: '8' }, event: { query: '1', confirm: '8' },
button: { button: {
operation: '3080', operation: '3080',
domId: '_Tips-Signal-Guide-Mbm' domId: '_Tips-Signal-Guide-Mbm{TOP}'
}, },
menu: { menu: {
operation: '308', operation: '308',
@ -993,6 +1001,10 @@ export const OperationEvent = {
// 进路交人工控 // 进路交人工控
humanControl: { humanControl: {
event: { query: '1', confirm: '14' }, event: { query: '1', confirm: '14' },
button: {
operation: '3140',
domId: '_Tips-Signal-HumanControl-Button{TOP}'
},
menu: { menu: {
operation: '314', operation: '314',
domId: '_Tips-Signal-HumanControl-Menu' domId: '_Tips-Signal-HumanControl-Menu'
@ -1006,9 +1018,13 @@ export const OperationEvent = {
domId: '_Tips-Signal-HumanControl-Confirm' domId: '_Tips-Signal-HumanControl-Confirm'
} }
}, },
// 进路交ATS自动 // 进路交自动控
atsAutoControl: { atsAutoControl: {
event: { query: '1', confirm: '15' }, event: { query: '1', confirm: '15' },
button: {
operation: '3150',
domId: '_Tips-Signal-AtsAutoControl-Button{TOP}'
},
menu: { menu: {
operation: '315', operation: '315',
domId: '_Tips-Signal-AtsAutoControl-Menu' domId: '_Tips-Signal-AtsAutoControl-Menu'
@ -1069,7 +1085,7 @@ export const OperationEvent = {
event: '2', event: '2',
button: { button: {
operation: '4020', operation: '4020',
domId: '_Tips-Section-Fault-Mbm' domId: '_Tips-Section-Fault-Mbm{TOP}'
}, },
menu: { menu: {
operation: '402', operation: '402',
@ -2068,9 +2084,32 @@ export const OperationEvent = {
operation: '2999', operation: '2999',
domId: '_Tips-Control-StationControl-Mbar' domId: '_Tips-Control-StationControl-Mbar'
} }
},
// 封锁
block: {
event: '90',
button: {
operation: '2991',
domId: '_Tips-Block-Button{TOP}'
}
},
// 解封
unblock: {
event: '91',
button: {
operation: '2992',
domId: '_Tips-Unblock-Button{TOP}'
}
},
// 功能按钮
functionButton: {
button: {
operation: '2993',
domId: '_Tips-FunctionButton-Button{TOP}'
}
} }
} }
// 密码输入框指令
}; };
/** /**

View File

@ -1304,7 +1304,7 @@ export const OperationList = {
trainingName: '办理引导进路({3})', trainingName: '办理引导进路({3})',
trainingRemark: '进路办理信号引导', trainingRemark: '进路办理信号引导',
trainingType: '02', trainingType: '02',
productTypes: ['02'], productTypes: ['01,02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' }, { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3085', tip: '鼠标左键选择进路名称【{3}】' }, { deviceType: '04', orderNum: 2, operateCode: '3085', tip: '鼠标左键选择进路名称【{3}】' },
@ -1320,12 +1320,27 @@ export const OperationList = {
trainingName: '取消进路({3} 进路)', trainingName: '取消进路({3} 进路)',
trainingRemark: '取消进路功能', trainingRemark: '取消进路功能',
trainingType: '02', trainingType: '02',
productTypes: ['02'], productTypes: ['01,02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{
maxDuration: 15,
minDuration: 8,
operateType: '0207',
skinCode: '04',
trainingName: '总人解({3})',
trainingRemark: '总人解',
trainingType: '02',
productTypes: ['01,02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' },
{ deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456点击【确定】按钮' }
]
},
{ {
maxDuration: 8, maxDuration: 8,
minDuration: 5, minDuration: 5,
@ -1374,11 +1389,11 @@ export const OperationList = {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
operateType: '0208', operateType: '0208',
skinCode: '02', skinCode: '04',
trainingName: '进路收人工控({5})', trainingName: '进路收人工控({5})',
trainingRemark: '进路收人工控', trainingRemark: '进路收人工控',
trainingType: '02', trainingType: '02',
productTypes: ['02'], productTypes: ['01,02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' }, { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' }, { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' },
@ -1389,11 +1404,11 @@ export const OperationList = {
maxDuration: 15, maxDuration: 15,
minDuration: 8, minDuration: 8,
operateType: '0209', operateType: '0209',
skinCode: '02', skinCode: '04',
trainingName: '进路交自动控({5})', trainingName: '进路交自动控({5})',
trainingRemark: '进路交自动控', trainingRemark: '进路交自动控',
trainingType: '02', trainingType: '02',
productTypes: ['02'], productTypes: ['01,02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' }, { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' }, { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' },
@ -1509,7 +1524,7 @@ export const OperationList = {
trainingName: '区故解({7})', trainingName: '区故解({7})',
trainingRemark: '道岔区段故障解锁功能', trainingRemark: '道岔区段故障解锁功能',
trainingType: '03', trainingType: '03',
productTypes: ['01,02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' }, { deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' }, { deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' },
@ -1540,7 +1555,7 @@ export const OperationList = {
trainingName: '属性({8}{9})', trainingName: '属性({8}{9})',
trainingRemark: '区段详情({8}{9})', trainingRemark: '区段详情({8}{9})',
trainingType: '04', trainingType: '04',
productTypes: ['01,02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' }, { deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' } { deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' }
@ -1555,7 +1570,7 @@ export const OperationList = {
trainingName: '设置扣车({10}-{12}站台)', trainingName: '设置扣车({10}-{12}站台)',
trainingRemark: '设置扣车功能', trainingRemark: '设置扣车功能',
trainingType: '05', trainingType: '05',
productTypes: ['01,02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' }, { deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' } { deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
@ -1569,7 +1584,7 @@ export const OperationList = {
trainingName: '取消扣车({10}-{12}站台)', trainingName: '取消扣车({10}-{12}站台)',
trainingRemark: '设置取消扣车功能', trainingRemark: '设置取消扣车功能',
trainingType: '05', trainingType: '05',
productTypes: ['01,02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' } { deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
@ -1583,7 +1598,7 @@ export const OperationList = {
trainingName: '取消扣车({10}-{12}站台)', trainingName: '取消扣车({10}-{12}站台)',
trainingRemark: '设置取消扣车功能(上行全线)', trainingRemark: '设置取消扣车功能(上行全线)',
trainingType: '05', trainingType: '05',
productTypes: ['01,02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' }, { deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' },
@ -1720,7 +1735,7 @@ export const OperationList = {
trainingName: '属性({10}-{12}站台)', trainingName: '属性({10}-{12}站台)',
trainingRemark: '查询站台状态功能', trainingRemark: '查询站台状态功能',
trainingType: '05', trainingType: '05',
productTypes: ['01,02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' }, { deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' } { deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }

View File

@ -6,7 +6,7 @@ const CancelLimitType = MapDeviceType.LimitControl.type;
export default { export default {
test: function (operates) { test: function (operates) {
let operateType = getOperateTypeBy('LimitControl', operates[0].operation); const operateType = getOperateTypeBy('LimitControl', operates[0].operation);
if (operateType) { if (operateType) {
return true; return true;
} else { } else {
@ -15,7 +15,7 @@ export default {
}, },
convert: function (operates) { convert: function (operates) {
if (operates && operates.length) { if (operates && operates.length) {
let operation = operates[0].operation; const operation = operates[0].operation;
switch (operation) { switch (operation) {
case CancelLimitOperation.CancelAllLimit.menu.operation: return handleMenuCancelAllLimit(operates); case CancelLimitOperation.CancelAllLimit.menu.operation: return handleMenuCancelAllLimit(operates);
@ -30,7 +30,7 @@ export default {
*/ */
function handleMenuCancelAllLimit(operates) { function handleMenuCancelAllLimit(operates) {
if (operates.length >= 2) { if (operates.length >= 2) {
let operate = operates[0]; const operate = operates[0];
if (operate.type === CancelLimitType && operate.code) { if (operate.type === CancelLimitType && operate.code) {
return { return {
type: operate.type, type: operate.type,

View File

@ -1,43 +1,80 @@
import { OperationEvent, getOperateTypeBy, checkOperationIsCurrentOperate } from '@/scripts/ConstDic'; import { OperationEvent, getOperateTypeBy, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import { handleMenuRequestCentralControl, handleMenuRequestStationControl, handleMenuEmergencyStationControl } from './StationControlOperationConverter'; import { handleMenuRequestCentralControl, handleMenuRequestStationControl, handleMenuEmergencyStationControl } from './StationControlOperationConverter';
const MixinCommandOperation = OperationEvent.MixinCommand const MixinCommandOperation = OperationEvent.MixinCommand;
const StationControlOperation = OperationEvent.StationControl; const StationControlOperation = OperationEvent.StationControl;
export default { export default {
test: function (operates) { test: function (operates) {
let operateType = getOperateTypeBy('MixinCommand', operates[0].operation); const operateType = getOperateTypeBy('MixinCommand', operates[0].operation);
if (operateType) { if (operateType) {
return true; return true;
} else { } else {
return false; return false;
} }
}, },
convert: function (operates) { convert: function (operates) {
if (operates && operates.length) { if (operates && operates.length) {
switch (operates[0].operation) { switch (operates[0].operation) {
case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates); case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates);
} case MixinCommandOperation.block.button.operation: return handleBlockButton(operates);
} case MixinCommandOperation.unblock.button.operation: return handleUnblockButton(operates);
} // case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates);
// case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates);
}
}
}
}; };
/** /**
* 控制模式操作 * 控制模式操作
*/ */
function handleMenuRemoteControl(operates) { function handleMenuRemoteControl(operates) {
if (operates.length >= 1) { if (operates.length >= 1) {
let operate = operates[operates.length - 1]; const operate = operates[operates.length - 1];
if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestStationControl)) { if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestStationControl)) {
return handleMenuRequestCentralControl(operates); return handleMenuRequestCentralControl(operates);
} else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestCentralControl)) { } else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestCentralControl)) {
return handleMenuRequestStationControl(operates); return handleMenuRequestStationControl(operates);
} else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.emergencyStationControl)) { } else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.emergencyStationControl)) {
return handleMenuEmergencyStationControl(operates); return handleMenuEmergencyStationControl(operates);
} }
return { error: true }; return { error: true };
} }
return null; return null;
}
// 封锁操作
function handleBlockButton(operates) {
if (operates.length >= 2) {
const operate = operates[operates.length - 1];
if (operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: MixinCommandOperation.block.event
};
}
return { error: true };
}
return null;
}
// 解封操作
function handleUnblockButton(operates) {
if (operates.length >= 2) {
const operate = operates[operates.length - 1];
if (operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: MixinCommandOperation.unblock.event
};
}
return { error: true };
}
return null;
} }

View File

@ -1,6 +1,6 @@
import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic'; import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic';
import localStore from 'storejs'; // import localStore from 'storejs';
import store from '@/store'; // import store from '@/store';
const SignalOperation = OperationEvent.Signal; const SignalOperation = OperationEvent.Signal;
@ -56,16 +56,16 @@ export default {
case SignalOperation.stoppage.menu.operation: return handleMenuStoppage(operates); case SignalOperation.stoppage.menu.operation: return handleMenuStoppage(operates);
case SignalOperation.arrangementRoute.button.operation: return handleButtonArrangementRoute(operates); case SignalOperation.arrangementRoute.button.operation: return handleButtonArrangementRoute(operates); // 排列进路按钮操作
case SignalOperation.arrangementRoute.menu.operation: return handleMenuArrangementRoute(operates); case SignalOperation.arrangementRoute.menu.operation: return handleMenuArrangementRoute(operates);
case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates); case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates); // 取消进路按钮操作
case SignalOperation.cancelTrainRoute.menu.operation: return handleMenuCancelTrainRoute(operates); case SignalOperation.cancelTrainRoute.menu.operation: return handleMenuCancelTrainRoute(operates);
case SignalOperation.reopenSignal.button.operation: return handleButtonReopenSignal(operates); case SignalOperation.reopenSignal.button.operation: return handleButtonReopenSignal(operates); // 信号重开按钮操作
case SignalOperation.reopenSignal.menu.operation: return handleMenuReopenSignal(operates); case SignalOperation.reopenSignal.menu.operation: return handleMenuReopenSignal(operates);
case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); // 人解列车进路按钮操作
case SignalOperation.humanTrainRoute.menu.operation: return handleMenuHumanTrainRoute(operates); case SignalOperation.humanTrainRoute.menu.operation: return handleMenuHumanTrainRoute(operates);
case SignalOperation.lock.menu.operation: return handleMenuLock(operates); case SignalOperation.lock.menu.operation: return handleMenuLock(operates);
@ -73,12 +73,12 @@ export default {
case SignalOperation.unlock.menu.operation: return handleMenuUnlock(operates); case SignalOperation.unlock.menu.operation: return handleMenuUnlock(operates);
case SignalOperation.guide.menu.operation: return handleMenuGuideRoute(operates); case SignalOperation.guide.menu.operation: return handleMenuGuideRoute(operates);
case SignalOperation.guide.button.operation: return handleButtonGuideRoute(operates); case SignalOperation.guide.button.operation: return handleButtonGuideRoute(operates); // 引导进路按钮操作
case SignalOperation.signalClose.menu.operation: return handleMenuSignalClose(operates); case SignalOperation.signalClose.menu.operation: return handleMenuSignalClose(operates);
case SignalOperation.setAutoInterlock.menu.operation: return handleMenuSetAutoInterlock(operates); case SignalOperation.setAutoInterlock.menu.operation: return handleMenuSetAutoInterlock(operates);
case SignalOperation.setAutoInterlock.button.operation: return handleButtonSetAutoInterlock(operates); case SignalOperation.setAutoInterlock.button.operation: return handleButtonSetAutoInterlock(operates); // 设置联锁自动进路按钮
case SignalOperation.cancelAutoInterlock.menu.operation: return handleMenuCancelAutoInterlock(operates); case SignalOperation.cancelAutoInterlock.menu.operation: return handleMenuCancelAutoInterlock(operates);
@ -87,8 +87,10 @@ export default {
case SignalOperation.cancelAutoTrigger.menu.operation: return handleMenuCancelAutoTrigger(operates); case SignalOperation.cancelAutoTrigger.menu.operation: return handleMenuCancelAutoTrigger(operates);
case SignalOperation.humanControl.menu.operation: return handleMenuHumanControl(operates); case SignalOperation.humanControl.menu.operation: return handleMenuHumanControl(operates);
case SignalOperation.humanControl.button.operation: return handleButtonHumanControl(operates); // 人工控按钮操作
case SignalOperation.atsAutoControl.menu.operation: return handleMenuAtsAutoControl(operates); case SignalOperation.atsAutoControl.menu.operation: return handleMenuAtsAutoControl(operates);
case SignalOperation.atsAutoControl.button.operation: return handleButtonAtsAutoControl(operates); // 自动控按钮操作
case SignalOperation.detail.menu.operation: return handleMenuDetail(operates); case SignalOperation.detail.menu.operation: return handleMenuDetail(operates);
} }
@ -186,19 +188,17 @@ function handleButtonHumanTrainRoute(operates) {
const operate = operates[operates.length - 1]; const operate = operates[operates.length - 1];
if (operate.type === SignalType && operate.code) { if (operate.type === SignalType && operate.code) {
if (operate.code) { if (operate.code) {
const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02');
if (counter) { // if (counter) {
const val = localStore.get(counter.code) || ''; // const val = localStore.get(counter.code) || '';
return { return {
type: operate.type, type: operate.type,
code: operate.code, code: operate.code,
over: true, over: true,
operation: SignalOperation.humanTrainRoute.event, operation: SignalOperation.humanTrainRoute.event
val: val };
}; // }
}
} }
} }
return { error: true }; return { error: true };
} }
@ -326,17 +326,17 @@ function handleMenuHumanTrainRoute(operates) {
const operate = operates[0]; const operate = operates[0];
if (operate.type === SignalType && operate.code) { if (operate.type === SignalType && operate.code) {
if (operate.code) { if (operate.code) {
const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02'); // const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02');
if (counter) { // if (counter) {
const val = localStore.get(counter.code) || ''; // const val = localStore.get(counter.code) || '';
return { return {
type: operate.type, type: operate.type,
code: operate.code, code: operate.code,
over: true, over: true,
operation: SignalOperation.humanTrainRoute.event, operation: SignalOperation.humanTrainRoute.event
val: val // val: val
}; };
} // }
} }
} }
return { error: true }; return { error: true };
@ -547,6 +547,23 @@ function handleMenuHumanControl(operates) {
return null; return null;
} }
// 人工控按钮 操作
function handleButtonHumanControl(operates) {
if (operates.length >= 2) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: SignalOperation.humanControl.event.confirm
};
}
return { error: true };
}
return null;
}
/** /**
* 处理右键菜单 进路交ATS自动工控 操作 * 处理右键菜单 进路交ATS自动工控 操作
* @param {*} operates * @param {*} operates
@ -583,6 +600,23 @@ function handleMenuAtsAutoControl(operates) {
return null; return null;
} }
// 自动控 按钮操作
function handleButtonAtsAutoControl(operates) {
if (operates.length >= 2) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: SignalOperation.atsAutoControl.event.confirm
};
}
return { error: true };
}
return null;
}
/** /**
* 处理右键菜单 查询进路状态 操作 * 处理右键菜单 查询进路状态 操作
* @param {*} operates * @param {*} operates
@ -634,7 +668,7 @@ function handleButtonGuideRoute(operates) {
type: operate.type, type: operate.type,
code: operate.code, code: operate.code,
over: true, over: true,
operation: SignalOperation.guide.event operation: SignalOperation.guide.event.confirm
}; };
} }
return { error: true }; return { error: true };

View File

@ -8,7 +8,6 @@ import StationStandOperationConverter from './StationStandOperationConverter';
import CancelLimitOperationConverter from './CancelLimitOperationConverter'; import CancelLimitOperationConverter from './CancelLimitOperationConverter';
import MixinOperationConverter from './MixinOperationConverter'; import MixinOperationConverter from './MixinOperationConverter';
export function getConverter(operates) { export function getConverter(operates) {
if (SwitchOperationConverter.test(operates)) { if (SwitchOperationConverter.test(operates)) {
return SwitchOperationConverter; return SwitchOperationConverter;
@ -33,7 +32,9 @@ export function getConverter(operates) {
} else if (CancelLimitOperationConverter.test(operates)) { } else if (CancelLimitOperationConverter.test(operates)) {
return CancelLimitOperationConverter; return CancelLimitOperationConverter;
} else if (MixinOperationConverter.test(operates)) { } else if (MixinOperationConverter.test(operates)) {
return MixinOperationConverter; return MixinOperationConverter;
} }
} }

View File

@ -4,22 +4,9 @@
<span v-if="hasProduct"><b>{{ $t('demonstration.simulationName') + courseModel.name }}</b></span> <span v-if="hasProduct"><b>{{ $t('demonstration.simulationName') + courseModel.name }}</b></span>
<span v-else>{{ $t('demonstration.noSimulationProducts') }}</span> <span v-else>{{ $t('demonstration.noSimulationProducts') }}</span>
</div> </div>
<el-tabs <el-tabs type="border-card" :value="currentPrdCode" :style="{ height: height-50 +'px' }" @tab-click="handleLeave">
type="border-card" <el-tab-pane v-for="item in productList" :key="item.code" :name="item.code" :label="item.name" style="padding: 5px" :style="{ height: height-160 +'px' }">
:value="currentPrdCode"
:style="{ height: height-50 +'px' }"
@tab-click="handleLeave"
>
<el-tab-pane
v-for="item in productList"
:key="item.code"
:name="item.code"
:label="item.name"
style="padding: 5px"
:style="{ height: height-160 +'px' }"
>
<div> <div>
<!-- <el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height-170 +'px' }"> -->
<p class="list-item"> <p class="list-item">
<span class="list-label">{{ $t('demonstration.productDescription') }}</span> <span class="list-label">{{ $t('demonstration.productDescription') }}</span>
<span class="list-elem">{{ courseModel.remarks }}</span> <span class="list-elem">{{ courseModel.remarks }}</span>
@ -28,7 +15,6 @@
<span class="list-label">{{ $t('global.permissionList') }}</span> <span class="list-label">{{ $t('global.permissionList') }}</span>
</p> </p>
<limit-list :ref="`limit_${item.code}`" :course-model="courseModel" @initLoadPage="initLoadPage" /> <limit-list :ref="`limit_${item.code}`" :course-model="courseModel" @initLoadPage="initLoadPage" />
<!-- </el-scrollbar> -->
</div> </div>
</el-tab-pane> </el-tab-pane>
<div v-if="hasProduct" class="btn-buy"> <div v-if="hasProduct" class="btn-buy">

View File

@ -5,7 +5,7 @@
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" /> <i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" /> <i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
<p v-if="!isShrink" style="color: #fff;"> <p v-if="!isShrink" style="color: #fff;">
<span class="time-label">{{$t('display.exam.examTime')}}</span> <span class="time-label">{{ $t('display.exam.examTime') }}</span>
<span class="time-elem">{{ formatRemainTime }}</span> <span class="time-elem">{{ formatRemainTime }}</span>
</p> </p>
@ -34,35 +34,35 @@
<div v-show="!detailShow" class="tip-body"> <div v-show="!detailShow" class="tip-body">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<p class="list-item"> <p class="list-item">
<span class="list-label">{{$t('display.exam.questionTitle')}}</span> <span class="list-label">{{ $t('display.exam.questionTitle') }}</span>
<span class="list-elem">{{ courseModel.name }}</span> <span class="list-elem">{{ courseModel.name }}</span>
</p> </p>
<p class="list-item"> <p class="list-item">
<span class="list-label">{{$t('display.exam.bestTime')}}</span> <span class="list-label">{{ $t('display.exam.bestTime') }}</span>
<span class="list-elem">{{ courseModel.minDuration }} {{$t('display.seconds')}} </span> <span class="list-elem">{{ courseModel.minDuration }} {{ $t('display.seconds') }} </span>
</p> </p>
<p class="list-item"> <p class="list-item">
<span class="list-label">{{$t('display.exam.maximumTime')}}</span> <span class="list-label">{{ $t('display.exam.maximumTime') }}</span>
<span class="list-elem">{{ courseModel.maxDuration }} {{$t('display.seconds')}} </span> <span class="list-elem">{{ courseModel.maxDuration }} {{ $t('display.seconds') }} </span>
</p> </p>
<p class="list-item"> <p class="list-item">
<span class="list-label"> {{$t('display.exam.trainingInstructions')}}</span> <span class="list-label"> {{ $t('display.exam.trainingInstructions') }}</span>
<span class="list-elem">{{ courseModel.remarks }}</span> <span class="list-elem">{{ courseModel.remarks }}</span>
</p> </p>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div class="tip-foot"> <div class="tip-foot">
<div v-show="!detailShow" class="foot-detail"> <div v-show="!detailShow" class="foot-detail">
<el-button class="btn" @click="backList">{{$t('display.exam.viewQuestions')}}</el-button> <el-button class="btn" @click="backList">{{ $t('display.exam.viewQuestions') }}</el-button>
<el-button v-if="!isFirst" class="btn" type="primary" @click="lastExam">{{$t('display.exam.prev')}}</el-button> <el-button v-if="!isFirst" class="btn" type="primary" @click="lastExam">{{ $t('display.exam.prev') }}</el-button>
<el-button v-if="!isLast" class="btn" type="primary" @click="nextExam">{{$t('display.exam.next')}}</el-button> <el-button v-if="!isLast" class="btn" type="primary" @click="nextExam">{{ $t('display.exam.next') }}</el-button>
<el-button v-if="isLast" class="btn" type="primary" @click="overExam">{{$t('display.exam.submitExaminationPaper')}}</el-button> <el-button v-if="isLast" class="btn" type="primary" @click="overExam">{{ $t('display.exam.submitExaminationPaper') }}</el-button>
</div> </div>
<div v-show="detailShow" class="foot-submit"> <div v-show="detailShow" class="foot-submit">
<el-button class="btn" type="primary" @click="overExam">{{$t('display.exam.submitExaminationPaper')}}</el-button> <el-button class="btn" type="primary" @click="overExam">{{ $t('display.exam.submitExaminationPaper') }}</el-button>
</div> </div>
<p style="color: #000; float: left;"> <p style="color: #000; float: left;">
<span class="time-label">{{$t('display.exam.examTime')}}</span> <span class="time-label">{{ $t('display.exam.examTime') }}</span>
<span class="time-elem">{{ formatRemainTime }}</span> <span class="time-elem">{{ formatRemainTime }}</span>
</p> </p>
</div> </div>

View File

@ -1,5 +1,6 @@
<template> <template>
<div v-drag class="reminder-drag"> <!-- v-drag 拖拽 调整宽高 -->
<div v-quickMenuDrag class="reminder-drag">
<div ref="drapBox" class="reminder-box"> <div ref="drapBox" class="reminder-box">
<div class="tip-title"> <div class="tip-title">
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" /> <i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
@ -12,19 +13,19 @@
<div class="tip-body"> <div class="tip-body">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<p class="list-item"> <p class="list-item">
<span class="list-label">{{$t('display.training.trainingName')}}</span> <span class="list-label">{{ $t('display.training.trainingName') }}</span>
<span class="list-elem">{{ courseModel.name }}</span> <span class="list-elem">{{ courseModel.name }}</span>
</p> </p>
<p class="list-item"> <p class="list-item">
<span class="list-label">{{$t('display.training.bestTime')}}</span> <span class="list-label">{{ $t('display.training.bestTime') }}</span>
<span class="list-elem">{{ courseModel.minDuration }} {{$t('display.seconds')}} </span> <span class="list-elem">{{ courseModel.minDuration }} {{ $t('display.seconds') }} </span>
</p> </p>
<p class="list-item"> <p class="list-item">
<span class="list-label">{{$t('display.training.maximumTime')}}</span> <span class="list-label">{{ $t('display.training.maximumTime') }}</span>
<span class="list-elem">{{ courseModel.maxDuration }} {{$t('display.seconds')}} </span> <span class="list-elem">{{ courseModel.maxDuration }} {{ $t('display.seconds') }} </span>
</p> </p>
<p class="list-item"> <p class="list-item">
<span class="list-label"> {{$t('display.training.trainingInstructions')}}</span> <span class="list-label"> {{ $t('display.training.trainingInstructions') }}</span>
<span class="list-elem">{{ courseModel.remarks }}</span> <span class="list-elem">{{ courseModel.remarks }}</span>
</p> </p>
</el-scrollbar> </el-scrollbar>
@ -154,10 +155,14 @@ export default {
height: 260px; height: 260px;
} }
.reminder-drag{
position: relative;
}
.reminder-box { .reminder-box {
position: absolute; position: absolute;
float: left; float: left;
left: 15x; left: 15px;
bottom: 15px; bottom: 15px;
width: 500px; width: 500px;
height: 300px; height: 300px;

View File

@ -435,7 +435,7 @@ export default {
width:90%; width:90%;
height:25px; height:25px;
bottom:30%; bottom:30%;
left:5%; left:0;
font-size:20px; font-size:20px;
position:absolute; position:absolute;
} }
@ -444,7 +444,7 @@ export default {
width:65%; width:65%;
height:20px; height:20px;
bottom:0; bottom:0;
left:10%; left:0;
position:absolute; position:absolute;
text-align: center; text-align: center;
} }

View File

@ -36,17 +36,11 @@
</div> </div>
<div class="footChat"> <div class="footChat">
<div class="inputBox"> <div class="inputBox">
<div <div class="sendBtn zIndex1" :style="{background: background, color: color}" :disabled="true" @mousedown="startRecording()" @mouseup="stopRecording()">{{ speak }}</div>
class="sendBtn zIndex1" <div v-show="sending" class="sendBtn zIndex2" :style="{background: background}">{{ $t('joinTraining.sending') }}</div>
:style="{background: background, color: color,}"
:disabled="true"
@mousedown="startRecording()"
@mouseup="stopRecording()"
>{{ speak }}</div>
<div v-show="sending" class="sendBtn zIndex2" :style="{background: background}">{{$t('joinTraining.sending')}}</div>
</div> </div>
<div v-if="isShowAuto" class="switch-box"> <div v-if="isShowAuto" class="switch-box">
<span style="font-size: 12px;">{{$t('joinTraining.autoplay')}}</span> <span style="font-size: 12px;">{{ $t('joinTraining.autoplay') }}</span>
<el-switch v-model="isAutoPlay" active-color="#13ce66" inactive-color="#d6d6d6" /> <el-switch v-model="isAutoPlay" active-color="#13ce66" inactive-color="#d6d6d6" />
</div> </div>
</div> </div>
@ -59,12 +53,9 @@
</template> </template>
<script> <script>
// import Vue from 'vue';
import HZRecorder from '@/utils/HZRecorder'; import HZRecorder from '@/utils/HZRecorder';
import ChatFomat from '@/utils/chatFomat'; import ChatFomat from '@/utils/chatFomat';
// import StompClient from '@/utils/sock';
import { postDataBd, getConversation } from '@/api/chat'; import { postDataBd, getConversation } from '@/api/chat';
// import { handleToken } from '@/utils/auth';
import { displayTopic, clearSubscribe } from '@/utils/stomp'; import { displayTopic, clearSubscribe } from '@/utils/stomp';
import { sendCommand } from '@/api/jmap/training'; import { sendCommand } from '@/api/jmap/training';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
@ -213,7 +204,7 @@ export default {
conversationId: this.conversationId conversationId: this.conversationId
}; };
await postDataBd(param).catch(error => { postDataBd(param).catch(error => {
this.sending = false; this.sending = false;
this.speakOf = false; this.speakOf = false;
const message = JSON.parse(error.message); const message = JSON.parse(error.message);

View File

@ -2,13 +2,13 @@
<div> <div>
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
<el-button v-if="isIBP" type="warning" @click="jumpIbp">{{$t('joinTraining.iBPDisk')}}</el-button> <el-button v-if="isIBP" type="warning" @click="jumpIbp">{{ $t('joinTraining.iBPDisk') }}</el-button>
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">{{$t('joinTraining.driverPerspective')}}</el-button> <el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
<template v-if="isAdmin"> <template v-if="isAdmin">
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{$t('joinTraining.drivingByPlan')}}</el-button> <el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
<el-button type="danger" :disabled="!isDisable" @click="end">{{$t('joinTraining.exitPlan')}}</el-button> <el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('joinTraining.exitPlan') }}</el-button>
</template> </template>
<el-button v-if="!isBigScreen" type="primary" @click="back">{{$t('global.back')}}</el-button> <el-button v-if="!isBigScreen" type="primary" @click="back">{{ $t('global.back') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<qr-code ref="qrCode" /> <qr-code ref="qrCode" />
@ -40,12 +40,12 @@ export default {
type: String, type: String,
required: true required: true
}, },
deviceCode: { deviceCode: {
type: String, type: String,
default() { default() {
return ''; return '';
} }
} }
}, },
data() { data() {
return { return {
@ -311,7 +311,7 @@ export default {
this.$emit('hidepanel'); this.$emit('hidepanel');
}, },
jumpIbp() { jumpIbp() {
this.$emit('showIbp',this.deviceCode); this.$emit('showIbp', this.deviceCode);
} }
} }
}; };

View File

@ -41,6 +41,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { getTrainingTree } from '@/api/jmap/training'; import { getTrainingTree } from '@/api/jmap/training';
import OperateMenu from './operateMenu'; import OperateMenu from './operateMenu';
//
export default { export default {
name: 'TrainingOperate', name: 'TrainingOperate',
components: { components: {

View File

@ -1,20 +1,5 @@
<template> <template>
<!-- <transition name="fade"> --> <el-dialog :title="$t('map.layerDisplay')" :visible.sync="dialogTableVisible" class="view_box" width="460px" :before-close="doClose" :modal-append-to-body="false">
<el-dialog
:title="$t('map.layerDisplay')"
:visible.sync="dialogTableVisible"
class="view_box"
width="460px"
:before-close="doClose"
:modal-append-to-body="false"
>
<!-- <div class="dialog-box"> -->
<!-- <div class="title">
<div class="fl-title">{{ $t('map.layerDisplay') }}</div>
<div class="fr-title" @click="doClose">
<i class="el-icon-close" />
</div>
</div> -->
<el-row type="flex" justify="center" class="content_box"> <el-row type="flex" justify="center" class="content_box">
<el-form label-width="80px" class="demo-ruleForm"> <el-form label-width="80px" class="demo-ruleForm">
<el-form-item :label="$t('map.viewShows')"> <el-form-item :label="$t('map.viewShows')">
@ -45,9 +30,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<!-- </div> -->
</el-dialog> </el-dialog>
<!-- </transition> -->
</template> </template>
<script> <script>

View File

@ -7,26 +7,10 @@
{{ $t('map.mapName') }} {{ $t('map.mapName') }}
<b>{{ mapInfo.name }}</b> <b>{{ mapInfo.name }}</b>
</span> </span>
<el-button <el-button type="text" class="mapEdit_box" @click="previewRouteEvent">{{ $t('map.preview') }}</el-button>
type="text" <el-button type="text" class="mapEdit_box" @click="createRouteEvent">{{ $t('map.newConstruction') }}</el-button>
style="float: right; padding: 3px 0; margin-right: 5px;" <el-button type="text" class="mapEdit_box" @click="drawMap">{{ $t('map.drawMap') }}</el-button>
@click="previewRouteEvent" <el-button type="text" class="mapEdit_box" @click="showMap">{{ $t('map.viewLayer') }}</el-button>
>{{ $t('map.preview') }}</el-button>
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="createRouteEvent"
>{{ $t('map.newConstruction') }}</el-button>
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="drawMap"
>{{ $t('map.drawMap') }}</el-button>
<el-button
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
@click="showMap"
>{{ $t('map.viewLayer') }}</el-button>
</div> </div>
<el-tabs v-model="enabledTab" type="card" class="map_card" @tab-click="changePane"> <el-tabs v-model="enabledTab" type="card" class="map_card" @tab-click="changePane">
<el-tab-pane label="进路" name="route"> <el-tab-pane label="进路" name="route">
@ -216,6 +200,11 @@ export default {
float: right; float: right;
width: 100%; width: 100%;
} }
.mapEdit_box{
float: right;
padding: 3px 0;
margin-right: 5px;
}
.physical-view { .physical-view {
line-height: 25px; line-height: 25px;

View File

@ -100,6 +100,7 @@ export default {
await this.$store.dispatch('training/setMapDefaultState'); await this.$store.dispatch('training/setMapDefaultState');
}, },
async subscribe() { async subscribe() {
this.clearSubscribe();
const header = { group: this.group || '', 'X-Token': handleToken() }; const header = { group: this.group || '', 'X-Token': handleToken() };
if (this.mode === 'dp') { if (this.mode === 'dp') {

View File

@ -1,5 +1,4 @@
<template> <template>
<div> <div>
<div class="forms pack-rule"> <div class="forms pack-rule">
<el-table <el-table
@ -22,10 +21,9 @@
<div class="draft"> <div class="draft">
<el-button-group> <el-button-group>
<el-button type="primary" @click="back">{{ $t('permission.lastShep') }}</el-button> <el-button type="primary" @click="back">{{ $t('permission.lastShep') }}</el-button>
<el-button type="primary" @click="Package">{{ $t('permission.package') }}</el-button> <el-button type="primary" @click="packageCode">{{ $t('permission.package') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<qr-code ref="qrCode" />
<premission-list ref="permissionList" /> <premission-list ref="permissionList" />
</div> </div>
</template> </template>
@ -34,13 +32,11 @@
import { addOrganization, getOrganizationList } from '@/api/management/organization'; import { addOrganization, getOrganizationList } from '@/api/management/organization';
import { getSellerList } from '@/api/management/user'; import { getSellerList } from '@/api/management/user';
import { createPermission } from '@/api/management/order'; import { createPermission } from '@/api/management/order';
import QrCode from '@/components/QrCode';
import PremissionList from './list'; import PremissionList from './list';
export default { export default {
name: 'OrderForm', name: 'OrderForm',
components: { components: {
QrCode,
PremissionList PremissionList
}, },
props: { props: {
@ -347,7 +343,7 @@ export default {
} }
} }
}, },
Package() { packageCode() {
if (this.permissionType == '01') { if (this.permissionType == '01') {
this.createPackage(); this.createPackage();
} else if (this.permissionType == '02') { } else if (this.permissionType == '02') {
@ -396,7 +392,7 @@ export default {
createVO: { createVO: {
isPackage: true, isPackage: true,
relPermissions: this.permissionVo.relPermissions, relPermissions: this.permissionVo.relPermissions,
permissionName: this.permissionVo.name, name: this.permissionVo.name,
id: this.permissionVo.id, id: this.permissionVo.id,
remarks: this.permissionVo.remarks remarks: this.permissionVo.remarks
}, },

View File

@ -75,6 +75,9 @@ export default {
this.mapList = response.data; this.mapList = response.data;
this.loading = false; this.loading = false;
this.mapSelect=localStore.get("script_mapId") || this.mapList[0].id; this.mapSelect=localStore.get("script_mapId") || this.mapList[0].id;
if(localStore.get("script_mapId")){
this.$store.dispatch('scriptRecord/updateScriptId',localStore.get("script_mapId"));
}
this.getQuestPageList(this.mapSelect); this.getQuestPageList(this.mapSelect);
}) })
}, },

View File

@ -121,9 +121,9 @@ export default {
}, },
deleteScript() { deleteScript() {
const data=this.formModel; const data=this.formModel;
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('scriptRecord.operateTip'), { this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('scriptRecord.confirmButtonText'), confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('scriptRecord.cancelButtonText'), cancelButtonText: this.$t('global.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
deleteQuest(data.id).then(response => { deleteQuest(data.id).then(response => {