Merge branch 'dev' of https://git.cloud.tencent.com/joylink/jl-nclient into dev
This commit is contained in:
commit
bc68f1adc9
@ -107,19 +107,19 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
let fontNum = 0;
|
||||
let newLabel="";
|
||||
let fontNum = 0;
|
||||
let newLabel='';
|
||||
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) {
|
||||
fontNum=newLabel.length;
|
||||
fontNum=newLabel.length;
|
||||
// fontNum = elem.label.length;
|
||||
}
|
||||
});
|
||||
var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
|
||||
// if(this.$t('global.lanuage')==='en'){
|
||||
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
|
||||
// }
|
||||
});
|
||||
var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
|
||||
// if(this.$t('global.lanuage')==='en'){
|
||||
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
|
||||
// }
|
||||
return width;
|
||||
}
|
||||
},
|
||||
@ -193,7 +193,6 @@ export default {
|
||||
}
|
||||
},
|
||||
calculateSubWidth(item) {
|
||||
// debugger;
|
||||
const children = item.children;
|
||||
let width = 0;
|
||||
let fontNum = 0;
|
||||
@ -204,7 +203,7 @@ export default {
|
||||
});
|
||||
width = fontNum * this.defaultFontSize + 20 + 'px';
|
||||
return width;
|
||||
},
|
||||
},
|
||||
openLoadFile(item) {
|
||||
const obj = this.$refs[item.label][0];
|
||||
if (obj.files) {
|
||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
|
@ -152,6 +152,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'chengdu_03', // 成都三号线引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
|
@ -143,6 +143,7 @@ class SkinCode extends defaultStyle {
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
|
@ -89,6 +89,10 @@ class ESigLamp extends Group {
|
||||
this.lamp.setStyle({stroke: color});
|
||||
}
|
||||
|
||||
setStyle(data) {
|
||||
this.lamp.setStyle(data);
|
||||
}
|
||||
|
||||
setStop(has) {
|
||||
if (has) {
|
||||
this.lstop.show();
|
||||
|
@ -318,7 +318,7 @@ class Signal extends Group {
|
||||
|
||||
// 引导
|
||||
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]) {
|
||||
this.lamps[0].setStop(false);
|
||||
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].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.sigAuto.animationRecover();
|
||||
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) {
|
||||
|
@ -1,432 +1,439 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
||||
:value="option.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="信号机名称" label-width="100px">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
||||
highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="50" label="序号">
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" :width="160" label="时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="context" :width="180" label="执行过程">
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="执行结果">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="notice">{{message}}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock>
|
||||
</div>
|
||||
<div>
|
||||
<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">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="信号机名称" label-width="100px">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { now } from '@/utils/date';
|
||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { now } from '@/utils/date';
|
||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||
|
||||
export default {
|
||||
name: 'RouteCmdControl',
|
||||
components: {
|
||||
ConfirmSignalUnlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
|
||||
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
|
||||
]
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.order.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.confirm1.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.confirm2.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.stop.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && 1 <= index && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'RouteCmdControl',
|
||||
components: {
|
||||
ConfirmSignalUnlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
|
||||
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.order.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.confirm1.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.confirm2.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.stop.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.stpDisabled = true;
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
}
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.stpDisabled = true;
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.order.operation
|
||||
}
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
commandNoPopUp() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
}
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.order.operation
|
||||
}
|
||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
})
|
||||
},
|
||||
confirm1() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
}
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
|
||||
}
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
})
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type
|
||||
}
|
||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
})
|
||||
},
|
||||
stop() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
}
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
||||
}
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.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 }) => {
|
||||
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() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
this.backOperate = operate;
|
||||
this.setButtonEnable(operate);
|
||||
if (operate.success) {
|
||||
this.timeCountCommand = 30;
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
|
||||
}
|
||||
}
|
||||
},
|
||||
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];
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
this.backOperate = operate;
|
||||
this.setButtonEnable(operate);
|
||||
if (operate.success) {
|
||||
this.timeCountCommand = 30;
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
|
||||
}
|
||||
}
|
||||
},
|
||||
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>
|
@ -1,31 +1,26 @@
|
||||
<template>
|
||||
<div id="statusDownTrainDetail"></div>
|
||||
<div id="statusDownTrainDetail" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'StatusDownTrainDetail',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'StatusDownTrainDetail',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
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>
|
@ -107,7 +107,11 @@ export default {
|
||||
}
|
||||
},
|
||||
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() {
|
||||
@ -132,11 +136,14 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
send: this.operate.operateCode != null,
|
||||
type: this.operate.type,
|
||||
operation: this.operate.operateCode,
|
||||
val: this.operate.val
|
||||
operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
if (this.operate.val) {
|
||||
operate['val'] = this.operate.val;
|
||||
}
|
||||
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
@ -149,7 +156,7 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
@ -192,7 +199,7 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -203,12 +203,14 @@ export default {
|
||||
humanTrainRoute() {
|
||||
const operate = {
|
||||
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 }) => {
|
||||
if (valid) {
|
||||
this.$refs.password.doShow();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
@ -271,7 +273,6 @@ export default {
|
||||
// 进路收人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
// send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
operateCode: OperationEvent.Signal.humanControl.confirm.operation,
|
||||
|
@ -5,6 +5,7 @@
|
||||
<template v-show="isShowBar">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
</template>
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
@ -24,6 +25,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
@ -40,6 +42,7 @@ export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
|
@ -8,13 +8,7 @@
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li
|
||||
v-if="handleShow(item)"
|
||||
:id="getDomId(item)"
|
||||
:key="i"
|
||||
class="nav-li"
|
||||
@click.stop="selectedClassA(item, i)"
|
||||
>
|
||||
<li 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>
|
||||
<ul class="nav-ul" :class="{'active' :i==classA}">
|
||||
<template v-for="(child,j) in item.children">
|
||||
@ -23,13 +17,7 @@
|
||||
<span class="status"> </span>
|
||||
<span class="separator"> </span>
|
||||
</li>
|
||||
<li
|
||||
v-else
|
||||
:id="getDomId(child)"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="selectedClassB(child, j)"
|
||||
>
|
||||
<li v-else :id="getDomId(child)" :key="j" class="menu-li" @click.stop="selectedClassB(child, j)">
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
@ -42,13 +30,7 @@
|
||||
<span class="status"> </span>
|
||||
<span class="separator"> </span>
|
||||
</li>
|
||||
<li
|
||||
v-else-if="grandchild.show"
|
||||
:id="getDomId(grandchild)"
|
||||
:key="k"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(grandchild)"
|
||||
>
|
||||
<li v-else-if="grandchild.show" :id="getDomId(grandchild)" :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
@ -65,13 +47,7 @@
|
||||
<span class="status"> </span>
|
||||
<span class="separator"> </span>
|
||||
</li>
|
||||
<li
|
||||
v-else-if="child.show"
|
||||
:id="getDomId(child)"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(child)"
|
||||
>
|
||||
<li v-else-if="child.show" :id="getDomId(child)" :key="j" class="menu-li" @click.stop="hookClick(child)">
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
@ -812,7 +788,7 @@ export default {
|
||||
this.clickEvent();
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: item.operate.operation
|
||||
operation: item.operate
|
||||
};
|
||||
this.tempClassA = index;
|
||||
this.tempClassB = -1;
|
||||
@ -834,7 +810,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: item.operate.operation
|
||||
operation: item.operate
|
||||
};
|
||||
this.tempClassB = index;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -850,151 +826,11 @@ export default {
|
||||
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) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -1021,7 +857,7 @@ export default {
|
||||
setLimitSpeed(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -1034,7 +870,7 @@ export default {
|
||||
cancleLimitSpeed(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
279
src/jmap/theme/chengdu_03/menus/menuButton.vue
Normal file
279
src/jmap/theme/chengdu_03/menus/menuButton.vue
Normal 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>
|
@ -1,118 +1,120 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit>
|
||||
</div>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<cancel-all-limit ref="cancelAllLimit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit,
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: '',
|
||||
auth: { station: true, center: false }
|
||||
}],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
//编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu]
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//取消速度
|
||||
cancelSpeed() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
label: MapDeviceType.LimitControl.label,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: '',
|
||||
auth: { station: true, center: false }
|
||||
}],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
label: MapDeviceType.LimitControl.label,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
||||
};
|
||||
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>
|
@ -51,18 +51,12 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledState.Section.fault,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
// {
|
||||
// label: '区故解',
|
||||
// handler: this.fault,
|
||||
// disabledCallback: MenuDisabledState.Section.fault,
|
||||
// auth: { station: true, center: false }
|
||||
// }
|
||||
],
|
||||
central: [
|
||||
{
|
||||
@ -91,6 +85,16 @@ export default {
|
||||
label: '设置计轴失效',
|
||||
handler: this.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() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -64,29 +64,29 @@ export default {
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '总人解',
|
||||
label: '总人解', // 取消引导进路
|
||||
handler: this.humanTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
// {
|
||||
// label: '信号重开',
|
||||
// handler: this.reopenSignal,
|
||||
// disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '信号封锁',
|
||||
// handler: this.lock,
|
||||
// disabledCallback: MenuDisabledState.Signal.lock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '信号解封',
|
||||
// handler: this.unlock,
|
||||
// disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
{
|
||||
label: '进路收人工控',
|
||||
handler: this.humanControl,
|
||||
@ -98,12 +98,6 @@ export default {
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
@ -337,7 +331,6 @@ export default {
|
||||
operation: OperationEvent.Signal.guide.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
debugger;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
var tempData = null;
|
||||
|
@ -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: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
@ -69,6 +60,15 @@ export default {
|
||||
'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: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
|
@ -1,69 +1,69 @@
|
||||
<template>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
],
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -39,18 +39,6 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
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: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
@ -62,24 +50,6 @@ export default {
|
||||
handler: this.cancelJumpStop,
|
||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||
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: [
|
||||
|
@ -39,54 +39,42 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '单操到定位',
|
||||
handler: this.locate,
|
||||
disabledCallback: MenuDisabledState.Switch.locate,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '单操到反位',
|
||||
handler: this.reverse,
|
||||
disabledCallback: MenuDisabledState.Switch.reverse,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Switch.lock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '道岔解锁',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
disabledCallback: MenuDisabledState.Switch.block,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
disabledCallback: MenuDisabledState.Switch.unblock,
|
||||
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 }
|
||||
}
|
||||
// {
|
||||
// label: '单操到定位',
|
||||
// handler: this.locate,
|
||||
// disabledCallback: MenuDisabledState.Switch.locate,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '单操到反位',
|
||||
// handler: this.reverse,
|
||||
// disabledCallback: MenuDisabledState.Switch.reverse,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔单锁',
|
||||
// handler: this.lock,
|
||||
// disabledCallback: MenuDisabledState.Switch.lock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解锁',
|
||||
// handler: this.unlock,
|
||||
// disabledCallback: MenuDisabledState.Switch.unlock,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔封锁',
|
||||
// handler: this.block,
|
||||
// disabledCallback: MenuDisabledState.Switch.block,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解封',
|
||||
// handler: this.unblock,
|
||||
// disabledCallback: MenuDisabledState.Switch.unblock,
|
||||
// auth: { station: true, center: true }
|
||||
// }
|
||||
],
|
||||
central: [
|
||||
{
|
||||
|
@ -1,149 +1,159 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div class="tool" v-for="(item,index) in tools" :key="index">
|
||||
<img :src="item.src" :alt="item.title" />
|
||||
</div>
|
||||
<img class="logo" :src="logoImg" />
|
||||
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2"
|
||||
:top="6"></system-time>
|
||||
</div>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time
|
||||
v-if="isShowSystemTime"
|
||||
class="time"
|
||||
:time="time"
|
||||
:zoom="2"
|
||||
:width="180"
|
||||
:height="48"
|
||||
:fine="2"
|
||||
:top="6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
// import { mapGetters } from 'vuex';
|
||||
// import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
let date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
@ -187,7 +197,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -77,6 +77,20 @@ export const MenuDisabledState = {
|
||||
if (device && device.status == deviceState.Section.status.State13) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.fault) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && !device.fault) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
Signal: {
|
||||
|
@ -27,7 +27,6 @@ export default {
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, false);
|
||||
var needList = Object.keys(this.ExcelConfig.columns);
|
||||
debugger;
|
||||
if (dataList && dataList.length) {
|
||||
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) {
|
||||
|
@ -351,7 +351,7 @@ export const OperationEvent = {
|
||||
event: '1',
|
||||
button: {
|
||||
operation: '1010',
|
||||
domId: '_Tips-Switch-Locate-Mbm'
|
||||
domId: '_Tips-Switch-Locate-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '101',
|
||||
@ -363,7 +363,7 @@ export const OperationEvent = {
|
||||
event: '2',
|
||||
button: {
|
||||
operation: '1020',
|
||||
domId: '_Tips-Switch-Reverse-Mbm'
|
||||
domId: '_Tips-Switch-Reverse-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '102',
|
||||
@ -375,7 +375,7 @@ export const OperationEvent = {
|
||||
event: '3',
|
||||
button: {
|
||||
operation: '1030',
|
||||
domId: '_Tips-Switch-Lock-Mbm'
|
||||
domId: '_Tips-Switch-Lock-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '103',
|
||||
@ -387,7 +387,7 @@ export const OperationEvent = {
|
||||
event: '4',
|
||||
button: {
|
||||
operation: '1040',
|
||||
domId: '_Tips-Switch-Unlock-Mbm'
|
||||
domId: '_Tips-Switch-Unlock-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '104',
|
||||
@ -649,6 +649,14 @@ export const OperationEvent = {
|
||||
operation: '1174',
|
||||
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' },
|
||||
button: {
|
||||
operation: '3010',
|
||||
domId: '_Tips-Signal-ArrangementRoute-Mbm'
|
||||
domId: '_Tips-Signal-ArrangementRoute-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '301',
|
||||
@ -823,7 +831,7 @@ export const OperationEvent = {
|
||||
event: '3',
|
||||
button: {
|
||||
operation: '3030',
|
||||
domId: '_Tips-Signal-CancelTrainRoute-Mbm'
|
||||
domId: '_Tips-Signal-CancelTrainRoute-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '303',
|
||||
@ -855,14 +863,14 @@ export const OperationEvent = {
|
||||
event: '5',
|
||||
button: {
|
||||
operation: '3050',
|
||||
domId: '_Tips-Signal-HumanTrainRoute-Mbm'
|
||||
domId: '_Tips-Signal-HumanTrainRoute-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '3051',
|
||||
operation: '305',
|
||||
domId: '_Tips-Signal-HumanTrainRoute-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3052',
|
||||
operation: '3051',
|
||||
domId: '_Tips-Signal-HumanTrainRoute-Confirm'
|
||||
}
|
||||
},
|
||||
@ -911,7 +919,7 @@ export const OperationEvent = {
|
||||
event: { query: '1', confirm: '8' },
|
||||
button: {
|
||||
operation: '3080',
|
||||
domId: '_Tips-Signal-Guide-Mbm'
|
||||
domId: '_Tips-Signal-Guide-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '308',
|
||||
@ -993,6 +1001,10 @@ export const OperationEvent = {
|
||||
// 进路交人工控
|
||||
humanControl: {
|
||||
event: { query: '1', confirm: '14' },
|
||||
button: {
|
||||
operation: '3140',
|
||||
domId: '_Tips-Signal-HumanControl-Button{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '314',
|
||||
domId: '_Tips-Signal-HumanControl-Menu'
|
||||
@ -1006,9 +1018,13 @@ export const OperationEvent = {
|
||||
domId: '_Tips-Signal-HumanControl-Confirm'
|
||||
}
|
||||
},
|
||||
// 进路交ATS自动工控
|
||||
// 进路交自动控
|
||||
atsAutoControl: {
|
||||
event: { query: '1', confirm: '15' },
|
||||
button: {
|
||||
operation: '3150',
|
||||
domId: '_Tips-Signal-AtsAutoControl-Button{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '315',
|
||||
domId: '_Tips-Signal-AtsAutoControl-Menu'
|
||||
@ -1069,7 +1085,7 @@ export const OperationEvent = {
|
||||
event: '2',
|
||||
button: {
|
||||
operation: '4020',
|
||||
domId: '_Tips-Section-Fault-Mbm'
|
||||
domId: '_Tips-Section-Fault-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '402',
|
||||
@ -2068,9 +2084,32 @@ export const OperationEvent = {
|
||||
operation: '2999',
|
||||
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}'
|
||||
}
|
||||
}
|
||||
}
|
||||
// 密码输入框指令
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1304,7 +1304,7 @@ export const OperationList = {
|
||||
trainingName: '办理引导进路({3})',
|
||||
trainingRemark: '进路办理信号引导',
|
||||
trainingType: '02',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3085', tip: '鼠标左键选择进路名称【{3}】' },
|
||||
@ -1320,12 +1320,27 @@ export const OperationList = {
|
||||
trainingName: '取消进路({3} 进路)',
|
||||
trainingRemark: '取消进路功能',
|
||||
trainingType: '02',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, 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,
|
||||
minDuration: 5,
|
||||
@ -1374,11 +1389,11 @@ export const OperationList = {
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0208',
|
||||
skinCode: '02',
|
||||
skinCode: '04',
|
||||
trainingName: '进路收人工控({5})',
|
||||
trainingRemark: '进路收人工控',
|
||||
trainingType: '02',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' },
|
||||
@ -1389,11 +1404,11 @@ export const OperationList = {
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: '0209',
|
||||
skinCode: '02',
|
||||
skinCode: '04',
|
||||
trainingName: '进路交自动控({5})',
|
||||
trainingRemark: '进路交自动控',
|
||||
trainingType: '02',
|
||||
productTypes: ['02'],
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' },
|
||||
@ -1509,7 +1524,7 @@ export const OperationList = {
|
||||
trainingName: '区故解({7})',
|
||||
trainingRemark: '道岔区段故障解锁功能',
|
||||
trainingType: '03',
|
||||
productTypes: ['01,02'],
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' },
|
||||
@ -1540,7 +1555,7 @@ export const OperationList = {
|
||||
trainingName: '属性({8}{9})',
|
||||
trainingRemark: '区段详情({8}{9})',
|
||||
trainingType: '04',
|
||||
productTypes: ['01,02'],
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' }
|
||||
@ -1555,7 +1570,7 @@ export const OperationList = {
|
||||
trainingName: '设置扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置扣车功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'],
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
@ -1569,7 +1584,7 @@ export const OperationList = {
|
||||
trainingName: '取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置取消扣车功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'],
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
@ -1583,7 +1598,7 @@ export const OperationList = {
|
||||
trainingName: '取消扣车({10}-{12}站台)',
|
||||
trainingRemark: '设置取消扣车功能(上行全线)',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'],
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' },
|
||||
@ -1720,7 +1735,7 @@ export const OperationList = {
|
||||
trainingName: '属性({10}-{12}站台)',
|
||||
trainingRemark: '查询站台状态功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'],
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
|
||||
|
@ -6,7 +6,7 @@ const CancelLimitType = MapDeviceType.LimitControl.type;
|
||||
|
||||
export default {
|
||||
test: function (operates) {
|
||||
let operateType = getOperateTypeBy('LimitControl', operates[0].operation);
|
||||
const operateType = getOperateTypeBy('LimitControl', operates[0].operation);
|
||||
if (operateType) {
|
||||
return true;
|
||||
} else {
|
||||
@ -15,7 +15,7 @@ export default {
|
||||
},
|
||||
convert: function (operates) {
|
||||
if (operates && operates.length) {
|
||||
let operation = operates[0].operation;
|
||||
const operation = operates[0].operation;
|
||||
switch (operation) {
|
||||
case CancelLimitOperation.CancelAllLimit.menu.operation: return handleMenuCancelAllLimit(operates);
|
||||
|
||||
@ -30,7 +30,7 @@ export default {
|
||||
*/
|
||||
function handleMenuCancelAllLimit(operates) {
|
||||
if (operates.length >= 2) {
|
||||
let operate = operates[0];
|
||||
const operate = operates[0];
|
||||
if (operate.type === CancelLimitType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
|
@ -1,43 +1,80 @@
|
||||
import { OperationEvent, getOperateTypeBy, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import { handleMenuRequestCentralControl, handleMenuRequestStationControl, handleMenuEmergencyStationControl } from './StationControlOperationConverter';
|
||||
|
||||
const MixinCommandOperation = OperationEvent.MixinCommand
|
||||
const MixinCommandOperation = OperationEvent.MixinCommand;
|
||||
const StationControlOperation = OperationEvent.StationControl;
|
||||
|
||||
export default {
|
||||
test: function (operates) {
|
||||
let operateType = getOperateTypeBy('MixinCommand', operates[0].operation);
|
||||
if (operateType) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
convert: function (operates) {
|
||||
if (operates && operates.length) {
|
||||
switch (operates[0].operation) {
|
||||
case MixinCommandOperation.remoteControl.mbar.operation: return handleMenuRemoteControl(operates);
|
||||
}
|
||||
}
|
||||
}
|
||||
test: function (operates) {
|
||||
const operateType = getOperateTypeBy('MixinCommand', operates[0].operation);
|
||||
if (operateType) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
convert: function (operates) {
|
||||
if (operates && operates.length) {
|
||||
switch (operates[0].operation) {
|
||||
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) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[operates.length - 1];
|
||||
if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestStationControl)) {
|
||||
return handleMenuRequestCentralControl(operates);
|
||||
} else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestCentralControl)) {
|
||||
return handleMenuRequestStationControl(operates);
|
||||
} else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.emergencyStationControl)) {
|
||||
return handleMenuEmergencyStationControl(operates);
|
||||
}
|
||||
if (operates.length >= 1) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestStationControl)) {
|
||||
return handleMenuRequestCentralControl(operates);
|
||||
} else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.requestCentralControl)) {
|
||||
return handleMenuRequestStationControl(operates);
|
||||
} else if (checkOperationIsCurrentOperate(operate.operation, StationControlOperation.emergencyStationControl)) {
|
||||
return handleMenuEmergencyStationControl(operates);
|
||||
}
|
||||
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
return { error: true };
|
||||
}
|
||||
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;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic';
|
||||
import localStore from 'storejs';
|
||||
import store from '@/store';
|
||||
// import localStore from 'storejs';
|
||||
// import store from '@/store';
|
||||
|
||||
const SignalOperation = OperationEvent.Signal;
|
||||
|
||||
@ -56,16 +56,16 @@ export default {
|
||||
|
||||
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.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(operates);
|
||||
case SignalOperation.cancelTrainRoute.button.operation: return handleButtonCancelTrainRoute(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.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates);
|
||||
case SignalOperation.humanTrainRoute.button.operation: return handleButtonHumanTrainRoute(operates); // 人解列车进路按钮操作
|
||||
case SignalOperation.humanTrainRoute.menu.operation: return handleMenuHumanTrainRoute(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.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.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);
|
||||
|
||||
@ -87,8 +87,10 @@ export default {
|
||||
case SignalOperation.cancelAutoTrigger.menu.operation: return handleMenuCancelAutoTrigger(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.button.operation: return handleButtonAtsAutoControl(operates); // 自动控按钮操作
|
||||
|
||||
case SignalOperation.detail.menu.operation: return handleMenuDetail(operates);
|
||||
}
|
||||
@ -186,19 +188,17 @@ function handleButtonHumanTrainRoute(operates) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === SignalType && operate.code) {
|
||||
if (operate.code) {
|
||||
const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02');
|
||||
if (counter) {
|
||||
const val = localStore.get(counter.code) || '';
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: SignalOperation.humanTrainRoute.event,
|
||||
val: val
|
||||
};
|
||||
}
|
||||
// const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02');
|
||||
// if (counter) {
|
||||
// const val = localStore.get(counter.code) || '';
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: SignalOperation.humanTrainRoute.event
|
||||
};
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
@ -326,17 +326,17 @@ function handleMenuHumanTrainRoute(operates) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === SignalType && operate.code) {
|
||||
if (operate.code) {
|
||||
const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02');
|
||||
if (counter) {
|
||||
const val = localStore.get(counter.code) || '';
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: SignalOperation.humanTrainRoute.event,
|
||||
val: val
|
||||
};
|
||||
}
|
||||
// const counter = store.getters['map/getCounterBySingalCode'](operate.code, '02');
|
||||
// if (counter) {
|
||||
// const val = localStore.get(counter.code) || '';
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: SignalOperation.humanTrainRoute.event
|
||||
// val: val
|
||||
};
|
||||
// }
|
||||
}
|
||||
}
|
||||
return { error: true };
|
||||
@ -547,6 +547,23 @@ function handleMenuHumanControl(operates) {
|
||||
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自动工控 操作
|
||||
* @param {*} operates
|
||||
@ -583,6 +600,23 @@ function handleMenuAtsAutoControl(operates) {
|
||||
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
|
||||
@ -634,7 +668,7 @@ function handleButtonGuideRoute(operates) {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: SignalOperation.guide.event
|
||||
operation: SignalOperation.guide.event.confirm
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
|
@ -8,7 +8,6 @@ import StationStandOperationConverter from './StationStandOperationConverter';
|
||||
import CancelLimitOperationConverter from './CancelLimitOperationConverter';
|
||||
import MixinOperationConverter from './MixinOperationConverter';
|
||||
|
||||
|
||||
export function getConverter(operates) {
|
||||
if (SwitchOperationConverter.test(operates)) {
|
||||
return SwitchOperationConverter;
|
||||
@ -33,7 +32,9 @@ export function getConverter(operates) {
|
||||
|
||||
} else if (CancelLimitOperationConverter.test(operates)) {
|
||||
return CancelLimitOperationConverter;
|
||||
|
||||
} else if (MixinOperationConverter.test(operates)) {
|
||||
return MixinOperationConverter;
|
||||
|
||||
}
|
||||
}
|
@ -4,22 +4,9 @@
|
||||
<span v-if="hasProduct"><b>{{ $t('demonstration.simulationName') + courseModel.name }}</b></span>
|
||||
<span v-else>{{ $t('demonstration.noSimulationProducts') }}</span>
|
||||
</div>
|
||||
<el-tabs
|
||||
type="border-card"
|
||||
: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' }"
|
||||
>
|
||||
<el-tabs type="border-card" :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>
|
||||
<!-- <el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height-170 +'px' }"> -->
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('demonstration.productDescription') }}</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
@ -28,7 +15,6 @@
|
||||
<span class="list-label">{{ $t('global.permissionList') }}</span>
|
||||
</p>
|
||||
<limit-list :ref="`limit_${item.code}`" :course-model="courseModel" @initLoadPage="initLoadPage" />
|
||||
<!-- </el-scrollbar> -->
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<div v-if="hasProduct" class="btn-buy">
|
||||
|
@ -5,7 +5,7 @@
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||
<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>
|
||||
</p>
|
||||
@ -34,35 +34,35 @@
|
||||
<div v-show="!detailShow" class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<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>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{$t('display.exam.bestTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }} {{$t('display.seconds')}} </span>
|
||||
<span class="list-label">{{ $t('display.exam.bestTime') }}</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }} {{ $t('display.seconds') }} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{$t('display.exam.maximumTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }} {{$t('display.seconds')}} </span>
|
||||
<span class="list-label">{{ $t('display.exam.maximumTime') }}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }} {{ $t('display.seconds') }} </span>
|
||||
</p>
|
||||
<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>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="tip-foot">
|
||||
<div v-show="!detailShow" class="foot-detail">
|
||||
<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="!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 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="!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>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div v-drag class="reminder-drag">
|
||||
<!-- v-drag 拖拽 调整宽高 -->
|
||||
<div v-quickMenuDrag class="reminder-drag">
|
||||
<div ref="drapBox" class="reminder-box">
|
||||
<div class="tip-title">
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
@ -12,19 +13,19 @@
|
||||
<div class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<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>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{$t('display.training.bestTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }} {{$t('display.seconds')}} </span>
|
||||
<span class="list-label">{{ $t('display.training.bestTime') }}</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }} {{ $t('display.seconds') }} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{$t('display.training.maximumTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }} {{$t('display.seconds')}} </span>
|
||||
<span class="list-label">{{ $t('display.training.maximumTime') }}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }} {{ $t('display.seconds') }} </span>
|
||||
</p>
|
||||
<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>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
@ -154,10 +155,14 @@ export default {
|
||||
height: 260px;
|
||||
}
|
||||
|
||||
.reminder-drag{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.reminder-box {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 15x;
|
||||
left: 15px;
|
||||
bottom: 15px;
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
|
@ -435,7 +435,7 @@ export default {
|
||||
width:90%;
|
||||
height:25px;
|
||||
bottom:30%;
|
||||
left:5%;
|
||||
left:0;
|
||||
font-size:20px;
|
||||
position:absolute;
|
||||
}
|
||||
@ -444,7 +444,7 @@ export default {
|
||||
width:65%;
|
||||
height:20px;
|
||||
bottom:0;
|
||||
left:10%;
|
||||
left:0;
|
||||
position:absolute;
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -36,17 +36,11 @@
|
||||
</div>
|
||||
<div class="footChat">
|
||||
<div class="inputBox">
|
||||
<div
|
||||
class="sendBtn zIndex1"
|
||||
: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 class="sendBtn zIndex1" :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 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" />
|
||||
</div>
|
||||
</div>
|
||||
@ -59,12 +53,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import Vue from 'vue';
|
||||
import HZRecorder from '@/utils/HZRecorder';
|
||||
import ChatFomat from '@/utils/chatFomat';
|
||||
// import StompClient from '@/utils/sock';
|
||||
import { postDataBd, getConversation } from '@/api/chat';
|
||||
// import { handleToken } from '@/utils/auth';
|
||||
import { displayTopic, clearSubscribe } from '@/utils/stomp';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
@ -213,7 +204,7 @@ export default {
|
||||
conversationId: this.conversationId
|
||||
};
|
||||
|
||||
await postDataBd(param).catch(error => {
|
||||
postDataBd(param).catch(error => {
|
||||
this.sending = false;
|
||||
this.speakOf = false;
|
||||
const message = JSON.parse(error.message);
|
||||
|
@ -2,13 +2,13 @@
|
||||
<div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<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="isIBP" type="warning" @click="jumpIbp">{{ $t('joinTraining.iBPDisk') }}</el-button>
|
||||
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
<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="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('joinTraining.exitPlan') }}</el-button>
|
||||
</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>
|
||||
</div>
|
||||
<qr-code ref="qrCode" />
|
||||
@ -40,12 +40,12 @@ export default {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
deviceCode: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
deviceCode: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -311,7 +311,7 @@ export default {
|
||||
this.$emit('hidepanel');
|
||||
},
|
||||
jumpIbp() {
|
||||
this.$emit('showIbp',this.deviceCode);
|
||||
this.$emit('showIbp', this.deviceCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -41,6 +41,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { getTrainingTree } from '@/api/jmap/training';
|
||||
import OperateMenu from './operateMenu';
|
||||
|
||||
// 实训录制左侧 数据树
|
||||
export default {
|
||||
name: 'TrainingOperate',
|
||||
components: {
|
||||
|
@ -1,20 +1,5 @@
|
||||
<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"
|
||||
>
|
||||
<!-- <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-dialog :title="$t('map.layerDisplay')" :visible.sync="dialogTableVisible" class="view_box" width="460px" :before-close="doClose" :modal-append-to-body="false">
|
||||
<el-row type="flex" justify="center" class="content_box">
|
||||
<el-form label-width="80px" class="demo-ruleForm">
|
||||
<el-form-item :label="$t('map.viewShows')">
|
||||
@ -45,9 +30,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<!-- </div> -->
|
||||
</el-dialog>
|
||||
<!-- </transition> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -7,26 +7,10 @@
|
||||
{{ $t('map.mapName') }}
|
||||
<b>{{ mapInfo.name }}</b>
|
||||
</span>
|
||||
<el-button
|
||||
type="text"
|
||||
style="float: right; padding: 3px 0; margin-right: 5px;"
|
||||
@click="previewRouteEvent"
|
||||
>{{ $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>
|
||||
<el-button type="text" class="mapEdit_box" @click="previewRouteEvent">{{ $t('map.preview') }}</el-button>
|
||||
<el-button type="text" class="mapEdit_box" @click="createRouteEvent">{{ $t('map.newConstruction') }}</el-button>
|
||||
<el-button type="text" class="mapEdit_box" @click="drawMap">{{ $t('map.drawMap') }}</el-button>
|
||||
<el-button type="text" class="mapEdit_box" @click="showMap">{{ $t('map.viewLayer') }}</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="enabledTab" type="card" class="map_card" @tab-click="changePane">
|
||||
<el-tab-pane label="进路" name="route">
|
||||
@ -216,6 +200,11 @@ export default {
|
||||
float: right;
|
||||
width: 100%;
|
||||
}
|
||||
.mapEdit_box{
|
||||
float: right;
|
||||
padding: 3px 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.physical-view {
|
||||
line-height: 25px;
|
||||
|
@ -100,6 +100,7 @@ export default {
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
},
|
||||
async subscribe() {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.group || '', 'X-Token': handleToken() };
|
||||
|
||||
if (this.mode === 'dp') {
|
||||
|
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div class="forms pack-rule">
|
||||
<el-table
|
||||
@ -22,10 +21,9 @@
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<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>
|
||||
</div>
|
||||
<qr-code ref="qrCode" />
|
||||
<premission-list ref="permissionList" />
|
||||
</div>
|
||||
</template>
|
||||
@ -34,13 +32,11 @@
|
||||
import { addOrganization, getOrganizationList } from '@/api/management/organization';
|
||||
import { getSellerList } from '@/api/management/user';
|
||||
import { createPermission } from '@/api/management/order';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import PremissionList from './list';
|
||||
|
||||
export default {
|
||||
name: 'OrderForm',
|
||||
components: {
|
||||
QrCode,
|
||||
PremissionList
|
||||
},
|
||||
props: {
|
||||
@ -347,7 +343,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
Package() {
|
||||
packageCode() {
|
||||
if (this.permissionType == '01') {
|
||||
this.createPackage();
|
||||
} else if (this.permissionType == '02') {
|
||||
@ -396,7 +392,7 @@ export default {
|
||||
createVO: {
|
||||
isPackage: true,
|
||||
relPermissions: this.permissionVo.relPermissions,
|
||||
permissionName: this.permissionVo.name,
|
||||
name: this.permissionVo.name,
|
||||
id: this.permissionVo.id,
|
||||
remarks: this.permissionVo.remarks
|
||||
},
|
||||
|
@ -75,6 +75,9 @@ export default {
|
||||
this.mapList = response.data;
|
||||
this.loading = false;
|
||||
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);
|
||||
})
|
||||
},
|
||||
|
@ -121,9 +121,9 @@ export default {
|
||||
},
|
||||
deleteScript() {
|
||||
const data=this.formModel;
|
||||
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('scriptRecord.operateTip'), {
|
||||
confirmButtonText: this.$t('scriptRecord.confirmButtonText'),
|
||||
cancelButtonText: this.$t('scriptRecord.cancelButtonText'),
|
||||
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteQuest(data.id).then(response => {
|
||||
|
Loading…
Reference in New Issue
Block a user