调整西安一号线行调右键操作
This commit is contained in:
parent
d5740a991f
commit
1e7e17c709
@ -157,15 +157,30 @@ class Jlmap {
|
||||
}
|
||||
|
||||
setUpdateScreen(opts) {
|
||||
const scale = 0.3;
|
||||
this.$painter.updateTransform1(
|
||||
[
|
||||
{ scaleRate: scale, offsetY: -100 },
|
||||
{ scaleRate: scale, offsetY: -300 },
|
||||
{ scaleRate: scale, offsetY: -500 },
|
||||
{ scaleRate: scale, offsetY: -700 }
|
||||
],
|
||||
{width: opts.width, height: opts.height});
|
||||
const num = opts.num;
|
||||
const offsetY = (opts.height - 100) / num; // 高度差
|
||||
const arr = [];
|
||||
let rect = '';
|
||||
for (const i in this.mapDevice) {
|
||||
const element = this.mapDevice[i];
|
||||
if (element.instance) {
|
||||
if (!rect) {
|
||||
rect = element.instance.getBoundingRect().clone();
|
||||
} else {
|
||||
rect.union(element.instance.getBoundingRect().clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
const scaleWidth = Math.floor((((opts.width - 100) * num) / rect.width) * 100) / 100;
|
||||
const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
|
||||
const scale = Math.min(scaleWidth, scaleHeight);
|
||||
const spliceWidth = (rect.width + 100) / num * scale;
|
||||
const dx = (opts.width - spliceWidth) / 2;
|
||||
for (let index = 0; index < num; index++) {
|
||||
const param = { scaleRate: scale, offsetX: ((spliceWidth) * index) - dx, offsetY: -100 - (offsetY * index) };
|
||||
arr.push(param);
|
||||
}
|
||||
this.$painter.updateTransform1(arr, {x: dx, y: 0, width: spliceWidth, height: opts.height});
|
||||
}
|
||||
|
||||
setLevelVisible(list) {
|
||||
|
@ -44,12 +44,10 @@ class ESigName extends Group {
|
||||
getNameText() {
|
||||
return this.name;
|
||||
}
|
||||
// 隐藏
|
||||
|
||||
hide() {
|
||||
this.name.hide();
|
||||
}
|
||||
|
||||
// 显示
|
||||
show() {
|
||||
this.name.show();
|
||||
}
|
||||
|
@ -263,6 +263,7 @@ class Signal extends Group {
|
||||
|
||||
this.add(this.sigPost);
|
||||
this.add(this.sigName);
|
||||
|
||||
this.style.Signal.text.show && model.nameShow ? this.sigName.show() : this.sigName.hide();
|
||||
this.add(this.sigAuto);
|
||||
this.add(this.sigRoute);
|
||||
|
@ -106,15 +106,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',
|
||||
@ -124,6 +115,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;
|
||||
|
@ -28,7 +28,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-form-item v-if="!isCancelSpeed" label="限速值" label-width="80px">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="speed"
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
@ -185,7 +185,7 @@ export default {
|
||||
// 待添加
|
||||
// this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.treeData[0].children[0].value = '';
|
||||
@ -196,7 +196,7 @@ export default {
|
||||
this.treeData[0].children[0].value = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
this.loadInitData(selected);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
|
@ -162,7 +162,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -182,15 +182,15 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
@ -202,15 +202,15 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
@ -222,7 +222,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -242,7 +242,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -262,7 +262,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -283,7 +283,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -304,7 +304,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -325,7 +325,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -341,7 +341,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ export default {
|
||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
return '取消进路';
|
||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalOff');
|
||||
return '信号关灯';
|
||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
return this.$t('menu.menuSignal.reopenTrainSignal');
|
||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
||||
@ -159,40 +159,34 @@ export default {
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['messages'] = `信号关灯: ${this.selected.name}`;
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['messages'] = `信号重开: ${this.selected.name}`;
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
|
@ -12,8 +12,8 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||
<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">
|
||||
@ -24,7 +24,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.routeList') }}</span>
|
||||
<span>进路列表</span>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
@ -34,25 +34,24 @@
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column :label="this.$t('menu.route')">
|
||||
<el-table-column label="进路">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="this.$t('menu.controlState')" width="180">
|
||||
<el-table-column prop="status" label="控制状态" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic') }}</span>
|
||||
<span v-else>{{ $t('menu.artificial') }}</span>
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
<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">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
@ -63,8 +62,8 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -75,6 +74,7 @@ export default {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.queryAccessControlMode');
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -104,6 +104,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
@ -127,16 +128,16 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_STAND_VIEW_STATUS
|
||||
send: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -149,11 +150,10 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -5,26 +5,25 @@
|
||||
class="xian-01__systerm route-hand-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||
<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="10">
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.routeList') }}</span>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
@ -34,29 +33,28 @@
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px">
|
||||
<el-table-column label="选择" width="55" style="margin-left:50px; text-align: right;">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox
|
||||
v-model="changeList[scope.$index]"
|
||||
style="text-align: center; display: block;"
|
||||
:disabled="scope.row.disabled"
|
||||
@change="changeCheck(changeList[scope.$index],scope.row.code)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled" />
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" :label="this.$t('menu.controlState')" :width="80">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">
|
||||
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic2') }}</span>
|
||||
<span v-else>{{ $t('menu.artificial') }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="conflictCheck" :label="this.$t('menu.conflictCheck')" :width="80">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}"
|
||||
>{{ scope.row.conflictCheck }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-checkbox v-model="allSelect" size="small" @change="allSelectChange">全选</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button
|
||||
@ -65,13 +63,12 @@
|
||||
:disabled="commitDisabled"
|
||||
:loading="loading"
|
||||
@click="commit"
|
||||
>{{ $t('global.confirm') }}</el-button>
|
||||
>确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -81,25 +78,28 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
operation: null,
|
||||
selection: [],
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
signalName: '',
|
||||
allSelect: false,
|
||||
changeList:[],
|
||||
commitDisabled: true,
|
||||
disabledLength: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -118,38 +118,27 @@ export default {
|
||||
return OperationEvent.Signal.humanControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return this.$t('menu.menuSignal.humanControl');
|
||||
return '进路交人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return this.$t('menu.menuSignal.atsAutoControl');
|
||||
}
|
||||
return '进路交自动控';
|
||||
} else {
|
||||
return '';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.selection && this.selection.length) {
|
||||
disabled = false;
|
||||
}
|
||||
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 深度数据状态
|
||||
tempData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
@ -158,6 +147,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.allSelect = false;
|
||||
this.changeList = [];
|
||||
this.commitDisabled = true;
|
||||
this.selection = [];
|
||||
this.disabledLength = 0;
|
||||
// 如果不是断点激活,而是第一次显示则初始化
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
@ -172,15 +167,17 @@ export default {
|
||||
|
||||
if (tempData && tempData.length > 0) {
|
||||
tempData.forEach(elem => {
|
||||
elem.check = false;
|
||||
this.changeList.push(false);
|
||||
elem.disabled = false;
|
||||
// 设置禁用状态
|
||||
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
|
||||
elem.controlType != '01') {
|
||||
if (operate.operation == OperationEvent.Signal.humanControl.menu.operation &&
|
||||
(elem.atsControl == 0)) {
|
||||
elem.disabled = true;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
elem.controlType == '01') {
|
||||
this.disabledLength++;
|
||||
} if (operate.operation == OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
(elem.atsControl != 0)) {
|
||||
elem.disabled = true;
|
||||
this.disabledLength++;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -199,36 +196,78 @@ export default {
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
changeCheck(check, code) {
|
||||
if (check) {
|
||||
this.selection.push(code);
|
||||
} else {
|
||||
this.selection.splice(this.selection.indexOf(code), 1);
|
||||
}
|
||||
});
|
||||
if (this.selection.length >= (this.tempData.length - this.disabledLength) ) {
|
||||
this.allSelect = true;
|
||||
} else {
|
||||
this.allSelect = false;
|
||||
}
|
||||
if (this.selection.length > 0) {
|
||||
this.commitDisabled = false;
|
||||
} else {
|
||||
this.commitDisabled = true;
|
||||
}
|
||||
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
const operate = {val:code};
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
allSelectChange() {
|
||||
this.changeList = [];
|
||||
if (this.allSelect) {
|
||||
this.tempData.forEach((item, index)=> {
|
||||
if (!item.disabled) {
|
||||
this.changeList.push(true);
|
||||
this.selection.push(item.code);
|
||||
} else {
|
||||
this.changeList.push('');
|
||||
}
|
||||
});
|
||||
this.allSelect = true;
|
||||
if (this.selection.length > 0) {
|
||||
this.commitDisabled = false;
|
||||
}
|
||||
} else {
|
||||
this.tempData.forEach((item, index) => {
|
||||
if (!item.disabled) {
|
||||
this.changeList.push(false);
|
||||
this.selection.splice(this.selection.indexOf(item.code), 1);
|
||||
}
|
||||
});
|
||||
this.allSelect = false;
|
||||
this.commitDisabled = true;
|
||||
}
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
const codeList = selection.map(elem => { return elem.code; });
|
||||
if (codeList && codeList.length) {
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
repeat: true,
|
||||
operation: '',
|
||||
val: codeList.join('::')
|
||||
selection: selection
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 自排关*/
|
||||
/** 进路交人工控*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 自排开*/
|
||||
/** 进路交自动控*/
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
|
||||
@ -238,64 +277,44 @@ export default {
|
||||
}
|
||||
});
|
||||
} else if (!selection) {
|
||||
this.$messageBox(this.$t('tip.selectAPieceOfData'));
|
||||
this.$messageBox(`请选择一条数据`);
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 自排关*/
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 自排开*/
|
||||
/** 进路交自动控*/
|
||||
this.atsAutoControl();
|
||||
}
|
||||
},
|
||||
// 自排关
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const codeList = this.selection.map(elem => { return elem.code; });
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
param: {
|
||||
Route_Code_List: codeList
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 自排开
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const codeList = this.selection.map(elem => { return elem.code; });
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
param: {
|
||||
Route_Code_List: codeList
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -303,7 +322,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ export default {
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
@ -287,8 +287,7 @@ export default {
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
@ -303,7 +302,7 @@ export default {
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
@ -336,7 +335,7 @@ export default {
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
@ -368,7 +367,7 @@ export default {
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
@ -385,7 +384,7 @@ export default {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="xian-01__systerm section-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
||||
<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">
|
||||
@ -28,7 +28,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
@ -56,11 +56,11 @@ export default {
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionBlockade');
|
||||
return '区段封锁';
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
return this.$t('menu.menuSection.orbitalSectionResection');
|
||||
return '区段切除';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return this.$t('menu.menuSection.orbitalSectionActive');
|
||||
return '区段激活';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -112,41 +112,27 @@ export default {
|
||||
},
|
||||
// 区段单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.lock);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.split);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.active);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -154,7 +140,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -1,19 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="xian-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-dialog v-dialogDrag :z-index="2000" class="xian-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||
<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
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -23,41 +28,49 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
|
||||
<el-select :id="domIdChoose" v-model="formData.SpeedLimit_Value" size="small" :disabled="spdDisabled" @change="speedSelectChange">
|
||||
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
|
||||
<el-form-item v-if="!isCancelSpeed" label="限速值" label-width="80px">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="speed"
|
||||
size="small"
|
||||
:disabled="spdDisabled"
|
||||
@change="speedSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tableData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
<el-table ref="table" class="table" :data="tableData" 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="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||
{{ $t('menu.release') }}
|
||||
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||
<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="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||
{{ $t('menu.secondConfirm') }}
|
||||
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||
<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="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
<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="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
<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>
|
||||
@ -65,9 +78,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
||||
import { now } from '@/utils/date';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
@ -83,6 +96,7 @@ export default {
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
type: '',
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
spdDisabled: false,
|
||||
@ -95,56 +109,50 @@ export default {
|
||||
speedSpace: 5,
|
||||
stationName: '',
|
||||
name: '',
|
||||
formData: {
|
||||
SpeedLimit_Value: ''
|
||||
}
|
||||
speed: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
nameLabel() {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.sectionName');
|
||||
return '区段名称';
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.switchName');
|
||||
return '道岔名称';
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
speedList() {
|
||||
const list = [];
|
||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
list.push(i * this.speedSpace);
|
||||
const list = [{ name: '不限速', value: '0' }];
|
||||
for (var i = 1; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
const speed = String(i * this.speedSpace);
|
||||
list.push({ name: speed, value: speed });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Section.setSpeed.menu.operation, name: this.$t('menu.menuSection.sectionSetSpeedLimit') },
|
||||
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: this.$t('menu.menuSection.sectionCancelSpeedLimit') },
|
||||
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: this.$t('menu.turnoutSettingSpeedLimit') },
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: this.$t('menu.turnoutCancelsSpeedLimit') }
|
||||
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
|
||||
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
|
||||
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
|
||||
];
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionSetSpeedLimit');
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
return this.$t('menu.turnoutSettingSpeedLimit');
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.turnoutCancelsSpeedLimit');
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return '区段取消限速';
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.choose.domId;
|
||||
@ -152,11 +160,9 @@ export default {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.choose.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.order.domId;
|
||||
@ -170,11 +176,9 @@ export default {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.order.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm1.domId;
|
||||
@ -188,11 +192,9 @@ export default {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm2.domId;
|
||||
@ -206,11 +208,9 @@ export default {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.stop.domId;
|
||||
@ -224,23 +224,19 @@ export default {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.stop.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return null;
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
isCancelSpeed() {
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation || this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
this.spdDisabled = false;
|
||||
val.forEach((elem, index) => {
|
||||
// 取消操作禁止选择限速,并跳过该步骤
|
||||
@ -256,7 +252,7 @@ export default {
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'formData.SpeedLimit_Value': function (val) {
|
||||
'speed': function (val) {
|
||||
if (val) this.cmdDisabled[0] = false;
|
||||
}
|
||||
},
|
||||
@ -314,7 +310,7 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
|
||||
this.formData.SpeedLimit_Value = '';
|
||||
this.speed = '';
|
||||
this.tableData = [];
|
||||
this.selected = selected;
|
||||
this.timeCountCommand = -1;
|
||||
@ -322,10 +318,11 @@ export default {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
this.stpDisabled = true;
|
||||
this.order = 0;
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.setMessage(this.$t('tip.selectSpeedLimitValueTip'));
|
||||
this.setMessage('请选择限速值后,点击“下达”按钮,下达命令!');
|
||||
if (this.isCancelSpeed) {
|
||||
this.formData.SpeedLimit_Value = `${tempData}`;
|
||||
this.speed = `${tempData}`;
|
||||
this.spdDisabled = true;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
@ -343,6 +340,7 @@ export default {
|
||||
},
|
||||
speedSelectChange(val) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
|
||||
@ -354,8 +352,8 @@ export default {
|
||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
@ -363,42 +361,52 @@ export default {
|
||||
});
|
||||
},
|
||||
command() {
|
||||
const operate = {};
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.order.operation;
|
||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionSetLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||
operate.message = `在【${this.name}】区段,区段设置限速${this.speed}km/h,确认下达吗?`;
|
||||
if (this.speed == 0) {
|
||||
operate.message = `在【${this.name}】区段,区段取消限速,确认下达吗?`;
|
||||
}
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
|
||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||
operate.message = `在【${this.name}】区段,区段取消限速,确认下达吗?`;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
|
||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchSetLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||
operate.message = `在【${this.name}】区段,道岔设置限速${this.speed}km/h,确认下达吗?`;
|
||||
if (this.speed == 0) {
|
||||
operate.message = `在【${this.name}】区段,道岔区段取消限速,确认下达吗?`;
|
||||
}
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
|
||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
|
||||
operate.message = `在【${this.name}】区段,道岔区段取消限速,确认下达吗?`;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||
this.$refs.confirmControlSpeed.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {};
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -414,27 +422,32 @@ export default {
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||
this.$store.dispatch('training/nextNew', 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: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
val: this.formData.SpeedLimit_Value,
|
||||
param: this.formData
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: '',
|
||||
param: {
|
||||
speedLimitValue: this.speed
|
||||
}
|
||||
};
|
||||
// 目前取消限速没有用
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -443,7 +456,7 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
||||
@ -451,30 +464,32 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||
this.$store.dispatch('training/nextNew', 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: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
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: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {};
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -490,25 +505,25 @@ export default {
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickToClose'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.stationStandStatus') }}</span></el-col>
|
||||
<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">
|
||||
@ -20,29 +20,17 @@
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<div style="height: 32px;">
|
||||
<el-radio
|
||||
v-model="standStatus"
|
||||
label="02"
|
||||
style="line-height: 32px;"
|
||||
:style="{color: standStatus == '02' ? '' : 'red'}"
|
||||
disabled
|
||||
>{{ $t('menu.upDirection') }}</el-radio>
|
||||
<el-radio
|
||||
v-model="standStatus"
|
||||
label="01"
|
||||
style="line-height: 32px;"
|
||||
:style="{color: standStatus == '01' ? '' : 'red'}"
|
||||
disabled
|
||||
>{{ $t('menu.downDirection') }}</el-radio>
|
||||
<el-radio v-model="standStatus" :label="true" style="line-height: 32px;" disabled>上行方向</el-radio>
|
||||
<el-radio v-model="standStatus" :label="false" style="line-height: 32px;" disabled>下行方向</el-radio>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||
<span>站台状态</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||
<el-table-column prop="name" :width="170" :label="this.$t('menu.switchbackStation')" />
|
||||
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')" />
|
||||
<el-table-column prop="strategy" :label="this.$t('menu.switchbackStrategy')">
|
||||
<el-table-column prop="name" :width="170" label="折返站" />
|
||||
<el-table-column prop="station" label="折返站台" />
|
||||
<el-table-column prop="strategy" label="折返策略">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
@ -67,11 +55,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
{{ $t('global.confirm') }}</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
@ -149,23 +136,23 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.standStatus = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standStatus = selected.direction;
|
||||
this.standStatus = selected.right;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
this.loadInitData(selected);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -197,7 +184,7 @@ export default {
|
||||
this.strategy = strategy;
|
||||
this.isSelect = false;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -213,14 +200,13 @@ export default {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
val: `${this.strategy}`,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
param:{
|
||||
Stand_ReentryStrategy:this.strategy
|
||||
standReentryStrategy: this.strategy
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -236,11 +222,10 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
@ -57,17 +57,17 @@ export default {
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.detainTrain');
|
||||
return '设置扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelDetainTrain');
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelDetainTrainForce');
|
||||
return '强制取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.earlyDeparture');
|
||||
return '设置提前发车';
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.setJumpStop');
|
||||
return '设置跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelJumpStop');
|
||||
return '取消跳停';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@ -124,136 +124,47 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
},
|
||||
// 强制取消扣车
|
||||
cancelDetainTrainForce() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrainForce);
|
||||
},
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.earlyDeparture);
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.setJumpStop, this.selected.direction);
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
};
|
||||
|
||||
this.sendCommand(menuOperate.StationStand.cancelJumpStop, this.selected.direction); // 站台的上下行方向, 01:下行 /02:上行
|
||||
},
|
||||
sendCommand(operate, val) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(operate, {}, 2, val).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const step = {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -10,31 +10,31 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</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 class="table">
|
||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
||||
<el-table-column prop="item" :width="140" :label="this.$t('menu.item')" />
|
||||
<el-table-column prop="status" :label="this.$t('global.status')" />
|
||||
</el-table>
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
:lazy="false"
|
||||
class="tree-height-max"
|
||||
:default-expand-all="true"
|
||||
style="background: #f0f0f0;"
|
||||
>
|
||||
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
|
||||
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
|
||||
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
|
||||
<div
|
||||
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;"
|
||||
>
|
||||
{{ data.name }}</div>
|
||||
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
|
||||
{{ data.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
<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">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
@ -42,9 +42,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -57,14 +56,67 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': this.$t('menu.noSwitchback'),
|
||||
'02': this.$t('menu.noOneSwitchback'),
|
||||
'03': this.$t('menu.automaticChange'),
|
||||
'04': this.$t('menu.default')
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
treeData: [
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '车站',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '站台',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '停站时间',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '跳停',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '站台基本信息',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '中心扣车',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '车站扣车',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '扣车',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '站台',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '运行等级',
|
||||
level: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -81,7 +133,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuStationStand.getStationStandStatus');
|
||||
return '站台详细信息';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -90,7 +142,7 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
@ -109,30 +161,37 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
|
||||
this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: opts.holdStatus == '02' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: opts.holdStatus == '03' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.stopTime'), status: opts.parkingTime != -1 ? opts.parkingTime : this.$t('menu.automatic2') });
|
||||
// 中心扣车
|
||||
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
|
||||
// 车站扣车
|
||||
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||
// 停站时间
|
||||
this.treeData[0].children[2].value = selected.parkingTime == 0 ? '自动' : `${selected.parkingTime} 秒`;
|
||||
// 跳停
|
||||
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||
// if (selected.direction == '01') {
|
||||
// 待添加
|
||||
// }
|
||||
if (!stationStand || !station) {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: this.$t('menu.automatic2') });
|
||||
this.treeData[2].children[0].value = `自动`;
|
||||
} else {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: opts.intervalRunTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
|
||||
this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动`;
|
||||
}
|
||||
this.tempData.push({ item: this.$t('menu.jumpStop'), status: opts.jumpStopStatus != '01' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : this.$t('menu.default') });
|
||||
// 待添加
|
||||
// this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
this.treeData[0].children[0].value = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
this.treeData[0].children[1].value = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
this.treeData[0].children[0].value = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
this.loadInitData(selected);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -143,16 +202,15 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -167,7 +225,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -15,17 +15,17 @@
|
||||
<el-row>
|
||||
<el-radio-group v-model="upDown" style="width:100%;" @change="choose">
|
||||
<el-col :span="11">
|
||||
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
|
||||
<el-radio :id="upDown ? domIdChoose : ''" :label="true">{{ $t('menu.uplinkBroadly') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">{{ $t('menu.downlinkBroadly') }}</el-radio>
|
||||
<el-radio :id="!upDown ? domIdChoose : ''" :label="false">{{ $t('menu.downlinkBroadly') }}</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.detainTrainStationList') }}</span>
|
||||
<span>扣车站台列表</span>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
:data="tempData"
|
||||
@ -36,8 +36,8 @@
|
||||
height="160"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="stationName" :label="this.$t('menu.stationName')" />
|
||||
<el-table-column prop="standName" :width="140" :label="this.$t('menu.detainTrainStation')" />
|
||||
<el-table-column prop="stationName" label="车站名称" />
|
||||
<el-table-column prop="standName" :width="140" label="扣车站台" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
upDown: '01',
|
||||
upDown: false,
|
||||
tempData: [],
|
||||
disabled: true,
|
||||
operation: ''
|
||||
@ -108,9 +108,9 @@ export default {
|
||||
this.tempData = [];
|
||||
this.stationStandList.forEach(elem => {
|
||||
/** status 01: 未扣车*/
|
||||
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
|
||||
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {});
|
||||
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
|
||||
if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
|
||||
if (station && station.visible && stand && stand.centerHoldTrain && elem.right == this.upDown) {
|
||||
this.tempData.push({ stationName: station.name, standName: elem.name });
|
||||
}
|
||||
});
|
||||
@ -124,7 +124,7 @@ export default {
|
||||
// 不是断点激活的菜单应该将状态初始化
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.upDown = selected.direction;
|
||||
this.upDown = selected.right;
|
||||
this.loadTableData();
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
@ -142,10 +142,10 @@ export default {
|
||||
this.loadTableData();
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
||||
val: `${upDown}`
|
||||
val: this.upDown
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -156,14 +156,13 @@ export default {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
|
||||
val: this.upDown,
|
||||
param: {
|
||||
Stand_AllLine: this.upDown
|
||||
standAllLine: this.upDown ? '01' : '02'
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -179,7 +178,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
|
||||
<el-table-column prop="check" label="一直有效">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||
</template>
|
||||
@ -66,7 +66,6 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandRunLevel',
|
||||
@ -112,8 +111,8 @@ export default {
|
||||
},
|
||||
timeList() {
|
||||
const list = [
|
||||
{ value: 0, label: this.$t('menu.automatic2') },
|
||||
{ value: 1, label: '1' }
|
||||
{ value: 0, label: this.$t('menu.automatic2') }
|
||||
// { value: 1, label: '1' }
|
||||
];
|
||||
for (var i = 60; i <= this.maxRunLevel; i++) {
|
||||
list.push({ value: i, label: `${i}` });
|
||||
@ -137,7 +136,7 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
if (selected.direction == '01') { // 下行
|
||||
@ -145,18 +144,18 @@ export default {
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
@ -168,7 +167,7 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
this.loadInitData(selected);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -195,15 +194,13 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||
val: time.toString(),
|
||||
param: {
|
||||
Stand_RunLevel: time
|
||||
}
|
||||
param: {}
|
||||
};
|
||||
|
||||
this.time = time;
|
||||
this.isSelect = false;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -213,12 +210,10 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
||||
val: check.toString(),
|
||||
param: {
|
||||
Stand_AlwaysValid: !!this.tempData[0].check
|
||||
}
|
||||
param: {}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -231,19 +226,20 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const forver = !!this.tempData[0].check;
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
val: [this.time, forver].join('::'),
|
||||
param:{
|
||||
Stand_AlwaysValid:forver,
|
||||
Stand_RunLevel:this.time
|
||||
runLevelTimeForever: !!this.tempData[0].check,
|
||||
runLevelTime: this.time
|
||||
},
|
||||
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||
messages: [
|
||||
`设置运行等级: ${this.tempData[0].name}-${this.standName},
|
||||
${this.tempData[0].time == 0 ? '运行时间自动' : `运行时间为${this.tempData[0].time}s`},
|
||||
有效次数: ${this.tempData[0].check ? '一直有效' : '一次有效'}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -263,7 +259,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -44,8 +44,8 @@
|
||||
<div style="padding: 0px 15px; height: 30px;">
|
||||
<div style=" position: relative; top:-5px;">
|
||||
<el-radio-group v-model="direction">
|
||||
<el-radio label="02" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio>
|
||||
<el-radio label="01" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio>
|
||||
<el-radio :label="true" disabled>上行方向</el-radio>
|
||||
<el-radio :label="false" disabled>下行方向</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -53,8 +53,8 @@
|
||||
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
|
||||
<div style=" position: relative; top:-10px;">
|
||||
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-radio :id="effective === false? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
|
||||
<el-radio :id="effective === true? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
|
||||
<el-radio :id="!effective? '': domIdChoose2" :label="false">一次有效</el-radio>
|
||||
<el-radio :id="effective? '': domIdChoose2" :label="true">一直有效</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -75,7 +75,6 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandStopTime',
|
||||
@ -89,8 +88,8 @@ export default {
|
||||
loading: false,
|
||||
time: 0,
|
||||
control: '01',
|
||||
direction: '01',
|
||||
effective: false,
|
||||
direction: false,
|
||||
effective: true,
|
||||
selected: null,
|
||||
standName: '',
|
||||
stationName: ''
|
||||
@ -115,18 +114,6 @@ export default {
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||
},
|
||||
disabledUp() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '02';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledDown() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '01';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledInput() {
|
||||
return this.control === '01'; // 如果是自动则不可以设置
|
||||
},
|
||||
@ -143,7 +130,7 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempDate) {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
@ -156,10 +143,9 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
||||
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
||||
this.effective = !!tempDate.parkingValidStatus;
|
||||
this.direction = selected.direction;
|
||||
this.control = selected.parkingTime ? '02' : '01';
|
||||
this.time = selected.parkingTime ? selected.parkingTime : 30;
|
||||
this.direction = selected.right;
|
||||
this.selected = selected || {};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -175,19 +161,16 @@ export default {
|
||||
chooseControl(control) {
|
||||
/** 自动时的默认时间*/
|
||||
if (control == '01') {
|
||||
this.inputTime = 15;
|
||||
this.time = 30;
|
||||
this.effective = true;
|
||||
}
|
||||
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
||||
val: `${control}`,
|
||||
param: {
|
||||
Stand_StopControl: `${control}`
|
||||
}
|
||||
param: {}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -197,12 +180,10 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
||||
val: `${effective}`,
|
||||
param: {
|
||||
Stand_AlwaysValid: `${effective}`
|
||||
}
|
||||
param: {}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -210,15 +191,12 @@ export default {
|
||||
},
|
||||
inputTime(time) {
|
||||
const operate = {
|
||||
repeat: true,
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${time}`,
|
||||
param: {
|
||||
Stand_StopTime: `${time}`
|
||||
}
|
||||
param: {}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -227,22 +205,20 @@ export default {
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
||||
param:{
|
||||
Stand_StopControl:this.control,
|
||||
Stand_AlwaysValid:this.effective,
|
||||
Stand_StopTime:this.time
|
||||
param: {
|
||||
parkingTime: this.time == 30 ? 0 : this.time,
|
||||
parkingAlwaysValid: this.effective
|
||||
},
|
||||
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
this.$refs.confirmControl.doShow(operate); // 弹窗确定发送数据
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
@ -251,14 +227,16 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -252,8 +252,7 @@ export default {
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
};
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
@ -265,7 +264,7 @@ export default {
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
@ -278,8 +277,7 @@ export default {
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
@ -291,7 +289,7 @@ export default {
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
@ -322,7 +320,7 @@ export default {
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
@ -340,8 +338,7 @@ export default {
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
};
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
@ -352,7 +349,7 @@ export default {
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
@ -369,7 +366,7 @@ export default {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -103,7 +103,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -125,7 +125,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ export default {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
@ -321,7 +321,7 @@ export default {
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
@ -335,7 +335,7 @@ export default {
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
@ -354,7 +354,7 @@ export default {
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
@ -392,7 +392,7 @@ export default {
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
@ -428,7 +428,7 @@ export default {
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
@ -445,7 +445,7 @@ export default {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm switch-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag class="xian-01__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
|
||||
<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">
|
||||
@ -22,22 +12,12 @@
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="activeShow" style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||
{{ $t('menu.activation') }}</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: center;">
|
||||
{{ $t('menu.resection') }}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
<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">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
@ -48,7 +28,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
@ -62,7 +42,6 @@ export default {
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
radio: 1,
|
||||
activeShow: false
|
||||
};
|
||||
},
|
||||
@ -78,17 +57,15 @@ export default {
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchLock');
|
||||
return '道岔单锁';
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchBlockade');
|
||||
return '道岔封锁';
|
||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchTurnout');
|
||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchForcedPull');
|
||||
return '道岔转动';
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.sectionResection');
|
||||
return '区段切除';
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.sectionActive');
|
||||
return '区段激活';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -110,15 +87,7 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.operation = operate.operation;
|
||||
if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
this.activeShow = true;
|
||||
this.radio = '2';
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
this.activeShow = true;
|
||||
this.radio = '1';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -140,9 +109,6 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
||||
/** 道岔转动*/
|
||||
this.turnout(this.operation);
|
||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||
/** 道岔强扳*/
|
||||
this.turnoutForce();
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
/** 区段激活*/
|
||||
this.split();
|
||||
@ -153,127 +119,44 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(menuOperate.Switch.lock);
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(menuOperate.Switch.block);
|
||||
},
|
||||
// 道岔转动
|
||||
turnout(operation) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 道岔强扮
|
||||
turnoutForce() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
turnout() {
|
||||
this.sendCommand(menuOperate.Switch.switchTurnout);
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(menuOperate.Switch.split);
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
};
|
||||
this.sendCommand(menuOperate.Switch.active);
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm two-confirmation"
|
||||
:title="$t('menu.menuChildDialog.secondaryConfirmation')"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
@ -13,16 +13,16 @@
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message,index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.confirm') }}</el-button>
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
@ -31,7 +31,6 @@
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
@ -44,15 +43,26 @@ export default {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
timer: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
@ -70,16 +80,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.domIdConfirm = '';
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
|
||||
this.operate = operate || {};
|
||||
this.operation = this.operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -91,11 +93,11 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
@ -103,39 +105,25 @@ export default {
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operate) {
|
||||
this.loading = true;
|
||||
(this.operate.selection || []).forEach(elem => {
|
||||
const operate = {
|
||||
val: elem.code,
|
||||
param: {
|
||||
ControlMode_Code: elem.code
|
||||
}
|
||||
over: true,
|
||||
operation: this.operation
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
}
|
||||
|
||||
this.doClose();
|
||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
});
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -50,11 +50,9 @@
|
||||
</el-table>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3" class="control_button">
|
||||
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">{{ $t('menu.menuDialog.forcedStationControl') }}</el-button>
|
||||
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">{{ $t('menu.menuDialog.requestStationControl') }}
|
||||
</el-button>
|
||||
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">{{ $t('menu.menuDialog.requestInTheControl') }}
|
||||
</el-button>
|
||||
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
|
||||
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控</el-button>
|
||||
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">{{ $t('menu.menuDialog.close') }}
|
||||
@ -85,8 +83,8 @@ export default {
|
||||
disabledClose: false,
|
||||
operation: '',
|
||||
controlProps: {
|
||||
'01': this.$t('menu.menuDialog.inTheControl'),
|
||||
'02': this.$t('menu.menuDialog.stationControl')
|
||||
'Center': '中控',
|
||||
'Local': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
@ -100,8 +98,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'stationControlList'
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
@ -209,9 +206,9 @@ export default {
|
||||
}
|
||||
if (success) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
row.control = this.controlProps['02']; // 01:中控, 02:站控
|
||||
row.control = this.controlProps['Local']; // Center:中控, Local:站控
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
row.control = this.controlProps['01']; // 01:中控, 02:站控
|
||||
row.control = this.controlProps['Center']; // Center:中控, Local:站控
|
||||
}
|
||||
row.disabled = true;
|
||||
row.check = false;
|
||||
@ -238,11 +235,11 @@ export default {
|
||||
checkBoxDisabled(row) {
|
||||
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
if (control && control.status == '02') { // 01:中控, 02:站控
|
||||
if (control && control.controlMode == 'Local') { // Center:中控, Local:站控
|
||||
return true;
|
||||
}
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
if (control && control.status == '01') { // 01:中控, 02:站控
|
||||
if (control && control.controlMode == 'Center') { // Center:中控, Local:站控
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -250,18 +247,19 @@ export default {
|
||||
},
|
||||
loadTableData() {
|
||||
this.tableData = [];
|
||||
if (this.stationControlList) {
|
||||
this.stationControlList.forEach(control => {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(station => {
|
||||
if (station.createControlMode) {
|
||||
this.tableData.push({
|
||||
code: control.code,
|
||||
code: station.code,
|
||||
operate: station.name || '',
|
||||
control: '',
|
||||
check: false,
|
||||
disabled: false,
|
||||
status: this.$t('menu.menuDialog.normal'),
|
||||
status: '正常',
|
||||
result: ''
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -272,7 +270,7 @@ export default {
|
||||
row.result = '';
|
||||
const control = this.$store.getters['map/getDeviceByCode'](row.code);
|
||||
if (control) {
|
||||
row.control = this.controlProps[control.status];
|
||||
row.control = this.controlProps[control.controlMode];
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -299,7 +297,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
@ -354,7 +352,7 @@ export default {
|
||||
}
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.disabledSure = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -370,7 +368,10 @@ export default {
|
||||
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
val: stationCodeList.join('::'),
|
||||
selection: this.selection
|
||||
selection: this.selection,
|
||||
param: {
|
||||
stationCodes: stationCodeList
|
||||
}
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
@ -378,7 +379,7 @@ export default {
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
@ -395,7 +396,10 @@ export default {
|
||||
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
|
||||
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
|
||||
val: stationCodeList.join('::'),
|
||||
selection: this.selection
|
||||
selection: this.selection,
|
||||
param: {
|
||||
stationCodes: stationCodeList
|
||||
}
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
@ -403,7 +407,7 @@ export default {
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
@ -420,7 +424,10 @@ export default {
|
||||
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
val: stationCodeList.join('::'),
|
||||
selection: this.selection
|
||||
selection: this.selection,
|
||||
param: {
|
||||
stationCodes: stationCodeList
|
||||
}
|
||||
};
|
||||
|
||||
this.selection.forEach((elem, index) => {
|
||||
@ -428,7 +435,7 @@ export default {
|
||||
});
|
||||
|
||||
this.disabledSure = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
|
@ -15,11 +15,11 @@ import SectionCmdControl from './dialog/sectionCmdControl';
|
||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -44,80 +44,65 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionResection'),
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionActive'),
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionAxisPreReset'),
|
||||
handler: this.axlePreReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionResection'),
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionActive'),
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
@ -191,11 +176,11 @@ export default {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -213,10 +198,10 @@ export default {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -228,140 +213,57 @@ export default {
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.fault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.split, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.active, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
// 区段封锁
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.lock, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段封锁
|
||||
unlock() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.unlock, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
// 设置限速
|
||||
setSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.setSpeed, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消速度
|
||||
// 取消限速
|
||||
cancelSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.cancelSpeed, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
|
||||
const tempData = resp.data;
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||
});
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -15,10 +15,11 @@ import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
@ -43,56 +44,58 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||
}
|
||||
// {
|
||||
// label: this.$t('menu.menuStation.powerUnLock'),
|
||||
// label: '上电解锁',
|
||||
// handler: this.powerUnLock,
|
||||
// auth: { station: true, center: false }
|
||||
// // cmdType: CMD.Station.
|
||||
// cmdType: CMD.Station.active,
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// auth: { station: true, center: false }
|
||||
// // cmdType: CMD.Station.
|
||||
// cmdType: CMD.Station.active,
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuStation.allHumanControl'),
|
||||
label: '所有进路自排关',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStation.allATSAutoControl'),
|
||||
label: '所有进路自排开',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
cmdType: CMD.Station.active
|
||||
}
|
||||
// {
|
||||
// label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// auth: { station: false, center: true },
|
||||
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
// // cmdType: CMD.Section.
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: false, center: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuStation.setStoppage'),
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStation.cancelStoppage'),
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||
}
|
||||
@ -125,24 +128,16 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
if (this.selected.centralized) {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -158,149 +153,127 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.stoppage.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STOPPAGE,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Station.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
powerUnLock() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(step, this.selected);
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(step, this.selected);
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排关
|
||||
humanControlALL() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(step);
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
const step = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
param: {
|
||||
Station_Code: `${this.selected.code}`
|
||||
}
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(step, this.selected);
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ import StandRunLevel from './dialog/standRunLevel';
|
||||
import StandStopTime from './dialog/standStopTime';
|
||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -53,101 +53,76 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.detainTrain'),
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
||||
label: '强制取消扣车',
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
||||
handler: this.setJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||
handler: this.setBackStrategy,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.detainTrain'),
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
|
||||
label: '全线取消扣车',
|
||||
handler: this.cancelDetainTrainAll,
|
||||
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setStopTime'),
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||
label: '设置运行等级',
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||
label: '设置提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||
label: '查询站台状态',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -193,17 +168,14 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -225,10 +197,10 @@ export default {
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -246,10 +218,10 @@ export default {
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -261,211 +233,90 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
cancelDetainTrainForce() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainForce, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 全线取消扣车
|
||||
cancelDetainTrainAll() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAll, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standDetainTrainAll.doShow(step, this.selected);
|
||||
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||
const tempData = resp.data;
|
||||
this.$refs.standStopTime.doShow(step, this.selected, tempData);
|
||||
});
|
||||
this.$refs.standStopTime.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||
const tempData = resp.data;
|
||||
this.$refs.standRunLevel.doShow(step, this.selected, tempData);
|
||||
});
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置提前发车
|
||||
earlyDeparture() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||
const tempData = resp.data;
|
||||
this.$refs.standBackStrategy.doShow(step, this.selected, tempData);
|
||||
});
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.detail.menu.operation,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||
commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
|
||||
const tempData = resp.data;
|
||||
this.$refs.standDetail.doShow(step, this.selected, tempData);
|
||||
});
|
||||
this.$refs.standDetail.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -43,128 +44,109 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchLock'),
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchUnlock'),
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchTurnout'),
|
||||
label: '道岔转动',
|
||||
handler: this.switchTurnout,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
|
||||
label: '计轴预复位',
|
||||
handler: this.axlePreReset,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionResection'),
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionActive'),
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchLock'),
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchUnlock'),
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchTurnout'),
|
||||
label: '道岔转动',
|
||||
handler: this.switchTurnout,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
||||
label: '故障解锁',
|
||||
handler: this.fault,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionResection'),
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
auth: { station: true, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionActive'),
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
auth: { station: true, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
@ -218,17 +200,13 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -249,7 +227,7 @@ export default {
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
@ -269,7 +247,7 @@ export default {
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
@ -284,198 +262,89 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unlock() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔强扳
|
||||
switchTurnoutForce() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔转动
|
||||
switchTurnout() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
if (step.operation) {
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.switchTurnout, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 道岔故障解锁
|
||||
fault() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.fault, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔计轴预复位
|
||||
axlePreReset() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.axlePreReset, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||
this.$refs.switchCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔设置速度
|
||||
setSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_SPEED,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||
commitOperate(menuOperate.Switch.cancelSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
const tempData = response.data;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -5,26 +5,41 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
lock: {
|
||||
// 区段封锁
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
unlock: {
|
||||
// 区段解封
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
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
|
||||
},
|
||||
cancelSpeed: {
|
||||
// 取消限速
|
||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
},
|
||||
axlePreReset:{
|
||||
// 区段计轴预复位
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
@ -123,19 +138,25 @@ export const menuOperate = {
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
turnoutForce:{
|
||||
// 道岔强扳
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||
block: {
|
||||
// 道岔封锁
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
unblock: {
|
||||
// 道岔解封
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
switchTurnout: {
|
||||
// 道岔转动
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
fault: {
|
||||
// 故障解锁
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
@ -152,10 +173,20 @@ export const menuOperate = {
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
cancelSpeed: {
|
||||
// 取消临时限速
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_CANCEL_SPEED
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
},
|
||||
axlePreReset:{
|
||||
// 计轴预复位
|
||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
||||
}
|
||||
|
||||
},
|
||||
@ -170,6 +201,16 @@ export const menuOperate = {
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrainForce: {
|
||||
// 强制取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrainAll: {
|
||||
// 全线取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
@ -203,6 +244,7 @@ export const menuOperate = {
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
@ -225,13 +267,16 @@ export const menuOperate = {
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
export function commitOperate(operate, paramList, over, val) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
if (val) {
|
||||
step['val'] = val;
|
||||
}
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
|
@ -6,7 +6,6 @@ import store from '@/store/index_APP_TARGET';
|
||||
class TransformHandle {
|
||||
constructor(painter) {
|
||||
this.$painter = painter;
|
||||
this.width = 1600;
|
||||
|
||||
this.parentLevel = painter.getParentLevel();
|
||||
|
||||
@ -47,12 +46,9 @@ class TransformHandle {
|
||||
|
||||
// 更新偏移量
|
||||
updateTransform(list, opts) {
|
||||
const rightWidth = 80; // 右边空余宽度
|
||||
this.rect = { x: 0, y: 0, width: opts.width - rightWidth, height: opts.height };
|
||||
this.width = opts.width - rightWidth;
|
||||
this.rect = { x: opts.x, y: opts.y, width: opts.width, height: opts.height };
|
||||
this.transform = [];
|
||||
list.forEach((item, index) => {
|
||||
item['offsetX'] = index * (this.width - 50) - 50;
|
||||
list.forEach(item => {
|
||||
this.transform.push(createTransform(item));
|
||||
});
|
||||
this.transformAll();
|
||||
|
@ -107,7 +107,8 @@ export default {
|
||||
handleUpdateScreen() {
|
||||
const size = {
|
||||
width: this.$store.state.app.width - (this.widthLeft || 450) - 2,
|
||||
height: this.height
|
||||
height: this.height,
|
||||
num: 3
|
||||
};
|
||||
this.$jlmap.setUpdateScreen(size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user