Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
0f1ae1e8a8
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
export const keyboardEvents = {
|
||||
C: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_C'}, // 绘图复制
|
||||
V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'} // 绘图粘贴
|
||||
// DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
|
||||
V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'}, // 绘图粘贴
|
||||
DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
|
||||
// ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素
|
||||
};
|
||||
|
||||
|
@ -17,6 +17,10 @@ export default class jetFan extends Group {
|
||||
position: [this.model.point.x, this.model.point.y]
|
||||
});
|
||||
this.path = createPathSvg(this.model);
|
||||
if (this.model.rotate) {
|
||||
this.grouper.origin = [this.model.width / 2, this.model.width / 2];
|
||||
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||
}
|
||||
this.add(this.grouper);
|
||||
this.grouper.add(this.path);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ export default class Text2 extends Group {
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
text: content,
|
||||
textFont: model.font,
|
||||
fontSize: Number(model.font),
|
||||
textFill: model.fontColor,
|
||||
textAlign: 'middle'
|
||||
}
|
||||
|
@ -1,72 +1,82 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{message}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -74,4 +84,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,300 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>集中站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="!earlyDepar">
|
||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio"
|
||||
label="1"
|
||||
:disabled="radio == 2"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
本站台上行</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio"
|
||||
label="2"
|
||||
:disabled="radio == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
本站台下行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
扣车</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="earlyDepar">
|
||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
:id="upRadioId"
|
||||
v-model="radio2"
|
||||
label="1"
|
||||
style="display: block; text-align: left;"
|
||||
@change="changeRadio"
|
||||
>
|
||||
本站台上行</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
:id="downRadioId"
|
||||
v-model="radio2"
|
||||
label="2"
|
||||
style="display: block; text-align: left;"
|
||||
@change="changeRadio"
|
||||
>
|
||||
本站台下行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
earlyDepar: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
upRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||
},
|
||||
downRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
return '提前发车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
|
||||
this.earlyDepar = false;
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
if (this.selected.right) {
|
||||
this.radio = '1';
|
||||
} else {
|
||||
this.radio = '2';
|
||||
}
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
if (this.selected.right) {
|
||||
this.radio = '1';
|
||||
} else {
|
||||
this.radio = '2';
|
||||
}
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
this.earlyDepar = true;
|
||||
if (this.selected.right) {
|
||||
this.radio2 = '1';
|
||||
} else {
|
||||
this.radio2 = '2';
|
||||
}
|
||||
}
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
changeRadio(val) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
if (val == 1) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||
} else if (val == 2) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
/** 提前发车*/
|
||||
this.earlyDeparture();
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
},
|
||||
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
this.sendCommand(menuOperate.StationStand.earlyDeparture);
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" />
|
||||
<stand-control ref="standControl" system-name="beijing-01__systerm" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="beijing-01__systerm" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<stand-run-level ref="standRunLevel" />
|
||||
<stand-stop-time ref="standStopTime" />
|
||||
@ -13,8 +13,8 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandJumpStopControl from './dialog/standJumpStopControl';
|
||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||
import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import StandRunLevel from './dialog/standRunLevel';
|
||||
|
@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:class="systemName+' notice-info'"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
props:{
|
||||
systemName:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败']
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(messages) {
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-dialog v-dialogDrag :class="systemName+' stand-detain-train'" :title="title" :visible.sync="show" width="320px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>集中站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||
@ -121,21 +121,27 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" :system-name="systemName" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props:{
|
||||
systemName:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detain-train"
|
||||
:class="systemName+' stand-detain-train'"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
@ -97,23 +97,29 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" :system-name="systemName" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrains',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props:{
|
||||
systemName:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -237,7 +243,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
// mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
251
src/jmapNew/theme/components/utils/menuOperate.js
Normal file
251
src/jmapNew/theme/components/utils/menuOperate.js
Normal file
@ -0,0 +1,251 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
axlePreReset:{
|
||||
// 区段计轴预复位
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
arrangementRoute:{
|
||||
// 排列进路
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
cancelTrainRoute:{
|
||||
// 取消进路
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
humanTrainRoute:{
|
||||
// 总人解
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
},
|
||||
reopenSignal:{
|
||||
// 信号重开
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
signalClose:{
|
||||
// 信号关灯
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
humanControl:{
|
||||
// 进路交人工控
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
atsAutoControl:{
|
||||
// 进路交自动控
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
turnoutForce:{
|
||||
// 道岔强扳
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
}
|
||||
|
||||
},
|
||||
StationStand:{
|
||||
setDetainTrain:{
|
||||
// 设置扣车
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrain:{
|
||||
// 取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
cancelJumpStop:{
|
||||
// 取消跳停
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
setStopTime:{
|
||||
// 停站时间控制
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
setRunLevel:{
|
||||
// 运行时间控制
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
earlyDeparture:{
|
||||
// 设置提前发车
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
setBackStrategy:{
|
||||
// 设置折返策略
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
setDetainTrainAuto:{
|
||||
// 区间列车数量限制
|
||||
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
||||
},
|
||||
cancelDetainTrainAuto:{
|
||||
// 取消区间列车数量限制
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
requestCentralControl:{
|
||||
// 请求中控(遥控)
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
},
|
||||
requestStationControl:{
|
||||
// 请求站控
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
emergencyStationControl:{
|
||||
// 紧急站控
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
resolve({ valid: valid, operate: step });
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -1,366 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="foshan-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>集中站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="buckle">
|
||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio"
|
||||
label="1"
|
||||
:disabled="radio == 2"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
本站台上行</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio"
|
||||
label="2"
|
||||
:disabled="radio == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
本站台下行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="1"
|
||||
:disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
扣车</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="AutomaticBuckle">
|
||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="autoRadio" label="1" style="display: block; text-align: left;">上行</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="autoRadio" label="2" style="display: block; text-align: left;">下行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="autoRadio1" label="1" :disabled="autoRadio1 == '2'" style="display: block; text-align: left;">设置</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="autoRadio1" label="2" :disabled="autoRadio1 == '1'" style="display: block; text-align: left;">取消</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="earlyDepar">
|
||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
:id="upRadioId"
|
||||
v-model="radio2"
|
||||
label="1"
|
||||
style="display: block; text-align: left;"
|
||||
:disabled="radio2 == 2"
|
||||
@change="changeRadio"
|
||||
>
|
||||
本站台上行</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
:id="downRadioId"
|
||||
v-model="radio2"
|
||||
label="2"
|
||||
style="display: block; text-align: left;"
|
||||
:disabled="radio2 == 1"
|
||||
@change="changeRadio"
|
||||
>
|
||||
本站台下行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
earlyDepar: false, // 提前发车
|
||||
buckle: true, // 设置扣车
|
||||
AutomaticBuckle: false, // 区间自动扣车
|
||||
autoRadio: '1',
|
||||
autoRadio1: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
upRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||
},
|
||||
downRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
return '提前发车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.radio = '2';
|
||||
if (!this.selected.right) { // 判断站台行驶方向
|
||||
this.radio = '1';
|
||||
}
|
||||
|
||||
this.operation = operate.operation;
|
||||
this.setDefaultItems();
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
setDefaultItems() { // 设置默认选项值
|
||||
this.earlyDepar = false;
|
||||
this.buckle = false;
|
||||
this.AutomaticBuckle = false;
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.buckle = true;
|
||||
this.radio1 = '1';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.buckle = true;
|
||||
this.radio1 = '2';
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
this.earlyDepar = true;
|
||||
if (!this.selected.right) {
|
||||
this.radio2 = '2';
|
||||
} else {
|
||||
this.radio2 = '1';
|
||||
}
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.operation = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
changeRadio(val) { // 提前发车选择上下行
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
if (val == 1) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||
} else if (val == 2) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
/** 提前发车*/
|
||||
this.earlyDeparture();
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||
param: {
|
||||
leftDirection: this.radio == '2', // 1 上行 2 下行
|
||||
rightDirection: this.radio == '1'
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||
param: {
|
||||
leftDirection: this.radio == '2', // 1 上行 2 下行
|
||||
rightDirection: this.radio == '1'
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
@ -1,355 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="foshan-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>站台</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form label-width="70px" size="mini" style="">
|
||||
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
|
||||
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="11" align="top" :offset="2">
|
||||
<span>车组号</span>
|
||||
<el-select
|
||||
:id="selectTrainId"
|
||||
v-model="model.tripNumber"
|
||||
style="width: 110px;"
|
||||
size="mini"
|
||||
:disabled="!model.val2"
|
||||
@change="trainNoSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in trainList"
|
||||
:key="option.groupNumber"
|
||||
:label="option.groupNumber"
|
||||
:value="option.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
:label="JumpStopSet"
|
||||
:disabled="radio1 == JumpStopCancel"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
设置</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
:label="JumpStopCancel"
|
||||
:disabled="radio1 == JumpStopSet"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrains',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
trainList: [],
|
||||
radio1: '',
|
||||
model: {
|
||||
val1: '',
|
||||
val2: '',
|
||||
tripNumber: '',
|
||||
direction: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selectTrainId() {
|
||||
if (this.radio1 == this.JumpStopSet) {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
||||
}
|
||||
},
|
||||
selfStationStandId() {
|
||||
if (this.radio1 == this.JumpStopSet) {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
|
||||
}
|
||||
},
|
||||
otherStationStandId() {
|
||||
if (this.radio1 == this.JumpStopSet) {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '跳停';
|
||||
},
|
||||
upstream() {
|
||||
return '02'; // 上行
|
||||
},
|
||||
downstream() {
|
||||
return '01'; // 下行
|
||||
},
|
||||
JumpStopSet() {
|
||||
return OperationEvent.StationStand.setJumpStop.menu.operation;
|
||||
},
|
||||
JumpStopCancel() {
|
||||
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.val1'(val) {
|
||||
if (val) this.model.val2 = '';
|
||||
},
|
||||
'model.val2'(val) {
|
||||
if (val) this.model.val1 = '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.radio1 = '';
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.model.direction = '01';
|
||||
this.model.val1 = '01'; // 站台的上下行方向, 01:下行 /02:上行
|
||||
if (!this.selected.right) {
|
||||
this.model.direction = '02';
|
||||
this.model.val1 = '02';
|
||||
}
|
||||
this.radio1 = operate.operation;
|
||||
|
||||
this.model.val2 = '';
|
||||
this.model.tripNumber = '';
|
||||
|
||||
/** 加载列车数据*/
|
||||
this.trainList = this.map.trainList;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
/** 设置跳停*/
|
||||
this.setJumpStop();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
/** 取消跳停*/
|
||||
this.cancelJumpStop();
|
||||
}
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
// let val = this.model.val1;
|
||||
// if (this.model.val2) {
|
||||
// val = this.model.val2;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
param: {
|
||||
// Is_This_Platform: val,
|
||||
trainGroupNumber: this.model.tripNumber
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
// let val = this.model.val1;
|
||||
// if (this.model.val2) {
|
||||
// val = this.model.val2;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
param: {
|
||||
// Is_This_Platform: val,
|
||||
trainGroupNumber: this.model.tripNumber
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
upAndDownStreamChangeVal1(val) {
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||
this.model.val2 = '';
|
||||
this.model.tripNumber = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
upAndDownStreamChange(val) {
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
||||
this.model.val1 = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
trainNoSelectChange(val) {
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
this.model.val1 = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" />
|
||||
<stand-control ref="standControl" system-name="foshan-01__systerm" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="foshan-01__systerm" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<stand-run-level ref="standRunLevel" />
|
||||
<stand-stop-time ref="standStopTime" />
|
||||
@ -14,8 +14,8 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandJumpStopControl from './dialog/standJumpStopControl';
|
||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||
import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import StandRunLevel from './dialog/standRunLevel';
|
||||
|
@ -1,327 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>站台</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form label-width="70px" size="mini" style="">
|
||||
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
|
||||
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
<el-col :span="11" align="top" :offset="2">
|
||||
<span>车组号</span>
|
||||
<el-select
|
||||
:id="selectTrainId"
|
||||
v-model="model.tripNumber"
|
||||
style="width: 110px;"
|
||||
size="mini"
|
||||
:disabled="!model.val2"
|
||||
@change="trainNoSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in trainList"
|
||||
:key="option.groupNumber"
|
||||
:label="option.groupNumber"
|
||||
:value="option.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
:label="JumpStopSet"
|
||||
:disabled="radio1 == JumpStopCancel"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
设置</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio
|
||||
v-model="radio1"
|
||||
:label="JumpStopCancel"
|
||||
:disabled="radio1 == JumpStopSet"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrains',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
trainList: [],
|
||||
radio1: '',
|
||||
model: {
|
||||
val1: '',
|
||||
val2: '',
|
||||
tripNumber: '',
|
||||
direction: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selectTrainId() {
|
||||
if (this.radio1 == this.JumpStopSet) {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
||||
}
|
||||
},
|
||||
selfStationStandId() {
|
||||
if (this.radio1 == this.JumpStopSet) {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
|
||||
}
|
||||
},
|
||||
otherStationStandId() {
|
||||
if (this.radio1 == this.JumpStopSet) {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '跳停';
|
||||
},
|
||||
upstream() {
|
||||
return '02'; // 上行
|
||||
},
|
||||
downstream() {
|
||||
return '01'; // 下行
|
||||
},
|
||||
JumpStopSet() {
|
||||
return OperationEvent.StationStand.setJumpStop.menu.operation;
|
||||
},
|
||||
JumpStopCancel() {
|
||||
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.val1'(val) {
|
||||
if (val) this.model.val2 = '';
|
||||
},
|
||||
'model.val2'(val) {
|
||||
if (val) this.model.val1 = '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.radio1 = '';
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.model.direction = '01';
|
||||
this.model.val1 = '01'; // 站台的上下行方向, 01:下行 /02:上行
|
||||
if (this.selected.right) {
|
||||
this.model.direction = '02';
|
||||
this.model.val1 = '02';
|
||||
}
|
||||
this.radio1 = operate.operation;
|
||||
|
||||
this.model.val2 = '';
|
||||
this.model.tripNumber = '';
|
||||
|
||||
/** 加载列车数据*/
|
||||
this.trainList = this.map.trainList;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
/** 设置跳停*/
|
||||
this.setJumpStop();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
/** 取消跳停*/
|
||||
this.cancelJumpStop();
|
||||
}
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
upAndDownStreamChangeVal1(val) {
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||
this.model.val2 = '';
|
||||
this.model.tripNumber = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
upAndDownStreamChange(val) {
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
||||
this.model.val1 = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
trainNoSelectChange(val) {
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
this.model.val1 = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" />
|
||||
<stand-control ref="standControl" system-name="ningbo-01__systerm" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<stand-run-level ref="standRunLevel" />
|
||||
<stand-stop-time ref="standStopTime" />
|
||||
@ -14,8 +14,8 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandJumpStopControl from './dialog/standJumpStopControl';
|
||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||
import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import StandRunLevel from './dialog/standRunLevel';
|
||||
|
@ -163,6 +163,12 @@ export default {
|
||||
mode: 'bas',
|
||||
id: '28',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '隧道通风-射流风机图',
|
||||
mode: 'bas',
|
||||
id: '29',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -117,6 +117,7 @@ export default {
|
||||
code:'',
|
||||
isRight:true,
|
||||
width: 40,
|
||||
rotate: 0,
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
|
@ -7,6 +7,9 @@
|
||||
<el-form-item label="图形宽度" prop="width">
|
||||
<el-input-number v-model="form.width" :min="20" />
|
||||
</el-form-item>
|
||||
<el-form-item label="旋转角度" prop="rotate">
|
||||
<el-input-number v-model="form.rotate" />
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标" prop="x">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
@ -34,6 +37,7 @@ export default {
|
||||
form:{
|
||||
code:'',
|
||||
width: 40,
|
||||
rotate: 0,
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
@ -67,6 +71,7 @@ export default {
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.width = model.width;
|
||||
this.form.rotate = model.rotate || 0;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
}
|
||||
@ -87,6 +92,7 @@ export default {
|
||||
_type: 'JetFan',
|
||||
code: this.isUpdate ? this.form.code : getUID('JetFan', this.iscs.jetFanList),
|
||||
width: this.form.width,
|
||||
rotate: this.form.rotate,
|
||||
color:'#00ff00'
|
||||
};
|
||||
this.$emit('createJetFan', jetFanModel);
|
||||
@ -104,6 +110,7 @@ export default {
|
||||
this.form = {
|
||||
code:'',
|
||||
width: 40,
|
||||
rotate: 0,
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
list.forEach(item => {
|
||||
if (item && item.code) {
|
||||
const copyModel = this.copyModelInfo(item, 30);
|
||||
const type1 = item._type.charAt(0).toLowerCase() + item._type.slice(1); // .toLowerCase()
|
||||
const type1 = item._type.charAt(0).toLowerCase() + item._type.slice(1);
|
||||
if (!mapIscs[type1 + 'List']) {
|
||||
mapIscs[type1 + 'List'] = this.iscs[type1 + 'List'] || [];
|
||||
}
|
||||
@ -159,7 +159,7 @@ export default {
|
||||
});
|
||||
} else if (this.selected._type != 'CheckBox') {
|
||||
this.copyModel = this.copyModelInfo(this.selected, 10);
|
||||
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1); // .toLowerCase()
|
||||
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1);
|
||||
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []);
|
||||
} else {
|
||||
this.copyModel = {};
|
||||
@ -175,12 +175,16 @@ export default {
|
||||
this.copyModel.code && this.createDataModel(this.copyModel);
|
||||
}
|
||||
} break;
|
||||
// case 'Delete': this.$store.dispatch('map/setDeleteCount');
|
||||
// break;
|
||||
// case 'Update':
|
||||
// this.$refs.offsetX.focus();
|
||||
// this.$store.dispatch('map/setUpdateCount');
|
||||
// break;
|
||||
case 'Delete': {
|
||||
const list = this.getSelectList();
|
||||
if (list.length) {
|
||||
list.forEach(item => {
|
||||
item && item.code && this.$store.dispatch('iscs/deleteIscsDevices', item);
|
||||
});
|
||||
} else {
|
||||
this.copyModel.code && this.$store.dispatch('iscs/deleteIscsDevices', this.copyModel);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -45,6 +45,7 @@
|
||||
</div>
|
||||
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
|
||||
<chat-create-group ref="createGroup" :group="group" @addCoversition="addCoversition" />
|
||||
<chat-tooltip :group="group" @getCoversitionList="getCoversitionList" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -165,6 +166,9 @@ export default {
|
||||
}
|
||||
this.$refs.chatContent.scrollTop();
|
||||
},
|
||||
getCoversitionList() {
|
||||
this.$refs.chatCoversitionList.initPage(false);
|
||||
},
|
||||
quitCoversition() {
|
||||
this.quitLoading = true;
|
||||
quitCoversition(this.group, this.currentCoversition.id).then(res=>{
|
||||
|
110
src/views/newMap/displayNew/chatView/chatTooltip.vue
Normal file
110
src/views/newMap/displayNew/chatView/chatTooltip.vue
Normal file
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div v-show="dialogVisible" class="chatTooltipAll">
|
||||
<div class="chatTooltip">
|
||||
<div class="chatTooltipHeader">
|
||||
{{ userName }} 邀请您加入会话!
|
||||
</div>
|
||||
<div class="chatTooltipBootom">
|
||||
<div class="create-group-bottom">
|
||||
<el-button :loading="loading" size="small" type="primary" @click="doCreate">接受</el-button>
|
||||
<el-button size="small" @click="doClose">拒绝</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import {acceptCoversitionInvite} from '@/api/chat';
|
||||
export default {
|
||||
name:'ChatTooltip',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userName:'',
|
||||
dialogVisible:false,
|
||||
loading:false,
|
||||
conversationId:''
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.inviteOtherIntoChat':function(val) {
|
||||
this.userName = this.coverName(val);
|
||||
this.dialogVisible = true;
|
||||
this.conversationId = val.conversationId;
|
||||
}
|
||||
},
|
||||
// {"conversationId":"22e10b17-7a6c-4b1b-8724-f87fb2053b76","from":{"id":"17","userId":"75","name":"赵",
|
||||
// "role":"STATION_SUPERVISOR","deviceType":"STATION","deviceCode":"Station32955","deviceName":"世纪大道","online":true,"robot":false}
|
||||
methods:{
|
||||
coverName(inviteUser) {
|
||||
const member = inviteUser.from;
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
||||
let data = member.role;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
data = data.replace(rolename, element.enLabel);
|
||||
} else {
|
||||
data = data.replace(rolename, element.label);
|
||||
}
|
||||
});
|
||||
const deviceName = member.deviceName ? '-' + member.deviceName : '';
|
||||
const memberName = member.name ? '-' + member.name : '';
|
||||
return data + deviceName + memberName;
|
||||
},
|
||||
doCreate() {
|
||||
this.loading = true;
|
||||
acceptCoversitionInvite(this.group, this.conversationId).then(res=>{
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('getCoversitionList');
|
||||
}).catch(error=>{
|
||||
this.$messageBox('接受邀请失败: ' + error.message);
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.chatTooltip{
|
||||
position: absolute;
|
||||
width: 290px;
|
||||
left: 32%;
|
||||
top: 42%;
|
||||
z-index: 5;
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
box-shadow: #969090 0px 0px 10px;
|
||||
border-radius: 4px;
|
||||
line-height: 20px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.chatTooltipHeader{
|
||||
margin-top:10px;
|
||||
font-size:14px;
|
||||
}
|
||||
.chatTooltipBootom{
|
||||
margin-top:10px;
|
||||
text-align: center;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.chatTooltipAll{
|
||||
position:absolute;
|
||||
width:100%;
|
||||
height:100%;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
@ -84,7 +84,7 @@
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
|
||||
<menu-system-time v-if="!isScreen" ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
|
||||
</div>
|
||||
|
||||
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
|
||||
@ -243,9 +243,6 @@ export default {
|
||||
isPractice() {
|
||||
return this.mode === 'practice';
|
||||
},
|
||||
isScreen() {
|
||||
return this.model === 'dp';
|
||||
},
|
||||
isDrive() {
|
||||
return this.prdType == '04';
|
||||
},
|
||||
|
@ -31,9 +31,8 @@ import { mapGetters } from 'vuex';
|
||||
import { Notification } from 'element-ui';
|
||||
import { startTrainingNew, endTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { TrainingMode, UrlConfig } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MenuLesson',
|
||||
|
Loading…
Reference in New Issue
Block a user