宁波一: 设置扣车流程调整&区故解二次确认调整提示
This commit is contained in:
parent
b44011057c
commit
2f8c2a3d42
@ -51,7 +51,7 @@ 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';
|
||||
import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
@ -59,7 +59,7 @@ export default {
|
||||
ConfirmControl,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
ningBoConfirmTip
|
||||
NingBoConfirmTip
|
||||
},
|
||||
props: {
|
||||
popClass: {
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -67,6 +67,7 @@ export default {
|
||||
this.message = operate.message || '';
|
||||
this.dialogShow = true;
|
||||
this.operation = operate.operation;
|
||||
console.log(this.operation, '--');
|
||||
},
|
||||
confirm() {
|
||||
try {
|
||||
@ -91,6 +92,16 @@ export default {
|
||||
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);
|
||||
|
@ -1948,6 +1948,10 @@ export const OperationEvent = {
|
||||
tableMenu: {
|
||||
operation: '5042',
|
||||
domId: '_Tips-Stand-SetOrCancelDetain-TableMenu'
|
||||
},
|
||||
secondaryConfirm: {
|
||||
operation: '5043',
|
||||
domId: '_Tips-Stand-SetOrCancelDetain-SecondaryConfirm'
|
||||
}
|
||||
},
|
||||
// 取消扣车
|
||||
|
Loading…
Reference in New Issue
Block a user