This commit is contained in:
joylink_cuiweidong 2021-02-19 13:28:53 +08:00
commit 7d3dfc2d31
14 changed files with 205 additions and 76 deletions

View File

@ -39,6 +39,7 @@
<confirm-control ref="confirmControl" :pop-class="popClass" />
<password-box ref="password" :pop-class="popClass" @checkOver="passWordCommit" />
<notice-info ref="noticeInfo" :pop-class="popClass" />
<ning-bo-confirm-tip ref="ningBoConfirmTip" />
</el-dialog>
</template>
@ -50,13 +51,15 @@ import ConfirmControl from '../childDialog/confirmControl';
import NoticeInfo from '../childDialog/noticeInfo';
import PasswordBox from '../childDialog/passwordInputBox';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip';
export default {
name: 'RouteControl',
components: {
ConfirmControl,
NoticeInfo,
PasswordBox
PasswordBox,
NingBoConfirmTip
},
props: {
popClass: {
@ -184,7 +187,11 @@ export default {
switch (this.popClass) {
case 'ningbo-01__systerm':
//
this.sendCommand(menuOperate.Signal.signalTotalCancle);
// this.sendCommand(menuOperate.Signal.signalTotalCancle);
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
operate.message = `命令:进路取消<br/>始端信号机:${this.stationName} ${this.signalName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
break;
case 'fuzhou-01__systerm':
if (this.$store.state.training.prdType === '01') {

View File

@ -213,14 +213,6 @@ export default {
}
},
mounted() {
this.timer = setInterval(() => {
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { //
this.timeCountConfirm = -1;
this.disabledConfirm2 = true;
}
}, 1000);
},
methods: {
doShow(operate, selected) {
@ -251,6 +243,7 @@ export default {
this.messageText2 = '';
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
this.timer && clearInterval(this.timer);
},
SelectChange() {
@ -280,6 +273,7 @@ export default {
},
confirm1() {
this.message = '发送First request消息成功请等待服务器';
const operate = {
operation: ''
};
@ -297,11 +291,22 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.messageText1 = '*****';
this.messageText2 = '';
this.disabledConfirm1 = true;
this.disabledConfirm2 = false;
this.timeCountConfirm = 60; //
setTimeout(() => {
this.message = '收到First request消息';
this.messageText1 = '*****';
this.messageText2 = '';
this.disabledConfirm1 = true;
this.disabledConfirm2 = false;
this.timeCountConfirm = 30; //
this.timer = setInterval(() => {
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { //
this.timeCountConfirm = -1;
this.disabledConfirm2 = true;
}
}, 1000);
}, 1000);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
@ -336,7 +341,7 @@ export default {
this.messageText2 = '*****';
this.disabledConfirm2 = true;
this.timeCountConfirm = -1;
this.message = '操作成功';
this.message = '发送 Second Confirm消息成功请等待服务器';
}
}).catch(() => {
this.$refs.noticeInfo.doShow();

View File

@ -122,6 +122,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" :pop-class="systemName" />
<ning-bo-confirm-tip ref="ningBoConfirmTip" />
</el-dialog>
</template>
@ -131,11 +132,13 @@ import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
import { mapGetters } from 'vuex';
import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
NoticeInfo,
NingBoConfirmTip
},
props:{
systemName:{
@ -321,7 +324,14 @@ export default {
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain);
if (this.systemName === 'ningbo-01__systerm') {
this.sendCommandNext(menuOperate.StationStand.setDetainTrain).then(operate => {
operate.message = `命令:扣车<br/>范围:${this.radio === '1' ? '本站台上行' : '本站台下行'}<br/>车站:${this.stationName}<br/>站台:${this.standName}`;
this.$refs.ningBoConfirmTip.doShow(operate);
});
} else {
this.sendCommand(menuOperate.StationStand.setDetainTrain);
}
},
//
cancelDetainTrain() {
@ -348,6 +358,25 @@ export default {
this.$refs.noticeInfo.doShow();
});
},
sendCommandNext(operate) {
const that = this;
return new Promise(function(resolve, reject) {
that.loading = true;
commitOperate(operate, {}, 1).then(({valid})=>{
that.loading = false;
if (valid) {
that.doClose();
that.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
resolve({...operate});
}
}).catch((error) => {
that.loading = false;
that.doClose();
console.error(error);
that.$refs.noticeInfo.doShow();
});
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation

View File

@ -67,22 +67,46 @@ export default {
this.message = operate.message || '';
this.dialogShow = true;
this.operation = operate.operation;
console.log(this.operation, '--');
},
confirm() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
const step = {
operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
};
commitOperate(step, {}, 2).then(({valid, operate})=>{
if (valid) {
this.$emit('close');
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow();
});
try {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
const step = {
operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
};
commitOperate(step, {}, 2).then(({valid, operate})=>{
if (valid) {
this.$emit('close');
this.doClose();
}
});
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
const step = {
operation: OperationEvent.Signal.cancelTrainRoute.secondaryConfirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
});
} else if (this.operation === OperationEvent.StationStand.setDetainTrain.menu.operation) {
const step = {
operation: OperationEvent.StationStand.setDetainTrain.secondaryConfirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
});
}
} catch (e) {
console.error(e);
this.doClose();
this.$refs.noticeInfo.doShow();
}
},
doClose() {

View File

@ -76,6 +76,12 @@ export default {
this.doClose();
}
});
} else if (this.operation === OperationEvent.Station.atsAutoControlALL.confirm) {
commitOperate({ operation: this.operation, cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING }, {stationCode: this.$store.state.map.showCentralizedStationCode }, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
});
}
},
doClose() {

View File

@ -37,7 +37,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<confirm-tip ref="confirmTip" />
<confirm-tip ref="confirmTip" @close="doClose" />
</el-dialog>
</template>
@ -118,7 +118,7 @@ export default {
},
methods: {
expandPath() {
this.showExpand = !this.showExpand;
this.showExpand = !this.showExpand;
},
doShow(operate, selected, tempData) {
this.selected = selected;
@ -268,7 +268,7 @@ export default {
if (valid) {
const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode);
operate.message = `命令:进路设置<br/>始端信号机:${signal.name}<br/>进路:${this.row.name}`;
this.doClose();
// this.doClose();
this.$refs.confirmTip.doShow(operate);
}
}).catch(() => {

View File

@ -60,7 +60,7 @@
@click.stop="hookClick(child)"
>
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
<span class="label">{{ child.computedTitle?computedTitle(child): child.title }}</span>
</li>
</template>
</template>
@ -292,17 +292,20 @@ export default {
{
title: '设置全站自动通过进路',
operate: OperationEvent.Station.stationSetCIAuto.mbar,
click: this.setAllCiAuto
click: this.setAllCiAuto,
computedTitle: true
},
{
title: '取消全站自动通过进路',
operate: OperationEvent.Station.stationCancelCIAuto.mbar,
click: this.cancelAllCiAuto
click: this.cancelAllCiAuto,
computedTitle: true
},
{
title: '全站自动交自动控',
operate: OperationEvent.Station.atsAutoControlALL.mbar,
click: ''
click: this.setAllAutoControl,
computedTitle: true
}
]
},
@ -631,6 +634,18 @@ export default {
}
return true;
},
computedTitle(child) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (child.operate === OperationEvent.Station.stationSetCIAuto.mbar && station) {
return `设置${station.name}全站自动通过进路`;
} else if (child.operate === OperationEvent.Station.stationCancelCIAuto.mbar && station) {
return `取消${station.name}全站自动通过进路`;
} else if (child.operate === OperationEvent.Station.atsAutoControlALL.mbar && station) {
return `${station.name}全站进路交自动控`;
} else {
return '';
}
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
@ -923,6 +938,25 @@ export default {
}
});
},
setAllAutoControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
const nextOperate = {
operation: OperationEvent.Station.atsAutoControlALL.confirm,
message: `是否要执行批处理命令: ${station.name}全站进路交自动控`
};
this.$refs.operateConfirm.doShow(nextOperate);
}
});
},
cancelAllCiAuto(order) {
const operate = {
type: 'bar',

View File

@ -37,10 +37,10 @@
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<0" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdApply" type="primary" :disabled="!selected || speedLimitValue<=0" :loading="loading" @click="apply">应用(A)</el-button>
<el-button :id="domIdApply" type="primary" :disabled="!selected || speedLimitValue<0" :loading="loading" @click="apply">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -176,13 +176,15 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code);
this.speedLimitValue = sectionEle.speedUpLimit;
if (this.speedLimitValue > 0) {
this.$refs.table2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
} else {
this.$refs.table2.setCurrentRow();
}
// const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code);
// this.speedLimitValue = sectionEle.speedUpLimit;
// if (this.speedLimitValue > 0) {
// this.$refs.table2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
// } else {
// this.$refs.table2.setCurrentRow();
// }
this.$refs.table2.setCurrentRow()
this.speedLimitValue = 0;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
@ -192,15 +194,17 @@ export default {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
operation: OperationEvent.Command.common.choose1.operation,
val: val.value,
param: {speedLimitValue: val.value}
};
const step = {
operation: OperationEvent.Command.common.choose1.operation,
val: val.value,
param: {speedLimitValue: val.value}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.speedLimitValue = val.value;
this.speedLimitValue = val.value;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();

View File

@ -187,8 +187,8 @@ export default {
},
commit(isClose = true) {
const operate = {
// cmdType: this.command ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
cmdType: this.speedLimitValue ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation,
over: true,
param: {sectionCode: this.selected.code, speedLimitValue:this.speedLimitValue}

View File

@ -92,7 +92,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '开始允许锁闭解除';
return '确认/取消允许锁闭';
}
},
watch: {

View File

@ -33,14 +33,14 @@
</div>
<div class="radio-box-title">设置位置</div>
<div class="radio-box">
<el-radio v-model="position" label="normal" :disabled="!selected" style="display: block;margin-bottom: 10px;">定位</el-radio>
<el-radio v-model="position" label="reverse" :disabled="!selected" style="display: block;">反位</el-radio>
<el-radio v-model="position" label="normal" :disabled="!selected&&mode=='auto'" style="display: block;margin-bottom: 10px;">定位</el-radio>
<el-radio v-model="position" label="reverse" :disabled="!selected&&mode=='auto'" style="display: block;">反位</el-radio>
</div>
<div class="radio-box-title">设置预留</div>
<div class="radio-box">
<el-radio v-model="reserved" label="auto" :disabled="true" style="display: block;margin-bottom: 10px;">自动与预留</el-radio>
<el-radio v-model="reserved" label="reversed" :disabled="true" style="display: block;margin-bottom: 10px;">预留</el-radio>
<el-radio v-model="reserved" label="release" :disabled="true" style="display: block;">释放</el-radio>
<el-radio v-model="reserved" label="auto" :disabled="!selected&&mode=='auto'" style="display: block;margin-bottom: 10px;">自动与预留</el-radio>
<el-radio v-model="reserved" label="reversed" :disabled="!selected&&mode=='auto'" style="display: block;margin-bottom: 10px;">预留</el-radio>
<el-radio v-model="reserved" label="release" :disabled="!selected&&mode=='auto'" style="display: block;">释放</el-radio>
</div>
</el-col>
</el-row>
@ -80,7 +80,7 @@ export default {
allChecked: false,
dialogShow: false,
loading: false,
mode: '',
mode: 'artificial',
position: '',
reserved: 'reversed'
@ -110,11 +110,23 @@ export default {
}
},
watch: {
mode(val) {
if (val == 'auto') {
this.position = '';
this.reserved = '';
}
},
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
'selected': function(val) {
if (val) {
const section = this.$store.getters['map/getDeviceByCode'](val.code);
this.position = section && section.normalPosition? 'reverse': 'normal';
}
}
},
methods: {
doShow(operate) {
@ -132,10 +144,12 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
const cmd = {
normal: menuOperate.Switch.locate,
reverse: menuOperate.Switch.reverse
}[this.position];
const cmd = this.mode == 'auto'
? menuOperate.Switch.turnout
: {
normal: menuOperate.Switch.locate,
reverse: menuOperate.Switch.reverse
}[this.position];
if (cmd) {
commitOperate(cmd, {switchCode: this.selected.code}, 3).then(({valid})=>{
@ -154,13 +168,7 @@ export default {
if (!val) { return; }
commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{
if (valid) {
const switchEle = this.$store.getters['map/getDeviceByCode'](val.code);
this.position = '';
if (switchEle.normalPosition) {
this.position = 'reverse';
} else if (switchEle.reversePosition) {
this.position = 'normal';
}
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
});

View File

@ -248,7 +248,7 @@ export default {
trainingType: 'Switch',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标键菜单选择【道岔定位】' },
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标键菜单选择【道岔定位】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},

View File

@ -1111,6 +1111,10 @@ export const OperationEvent = {
choose: {
operation: '3033',
domId: '_Tips-Signal-CancelTrainRoute-Choose'
},
secondaryConfirm: {
operation: '3034',
domId: '_Tips-Signal-CancelTrainRoute-SecondaryConfirm'
}
},
// 信号重开
@ -1944,6 +1948,10 @@ export const OperationEvent = {
tableMenu: {
operation: '5042',
domId: '_Tips-Stand-SetOrCancelDetain-TableMenu'
},
secondaryConfirm: {
operation: '5043',
domId: '_Tips-Stand-SetOrCancelDetain-SecondaryConfirm'
}
},
// 取消扣车
@ -2279,6 +2287,10 @@ export const OperationEvent = {
mbar: {
operation: '6062',
domId: '_Tips-Station-AtsAutoControlAll-Mbar'
},
confirm: {
operation: '6063',
domId: '_Tips-Station-AtsAutoControlAll-Confirm'
}
},
split: {

View File

@ -135,7 +135,7 @@ export default {
.display-time{
padding: 3px 5px;
box-shadow: 0px 0px 5px #eee;
box-shadow: 0px 0px 3px #eee;
border-radius: 3px;
}