ctc调整
This commit is contained in:
parent
a0eaa636f9
commit
e5f484f3bb
@ -115,7 +115,6 @@ export default {
|
||||
if (operate.operateNext) {
|
||||
this.operation = operate.operateNext;
|
||||
}
|
||||
console.log(this.operate, '--------------0000operate');
|
||||
this.dialogShow = true;
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
@ -158,7 +157,6 @@ export default {
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
send: false,
|
||||
|
@ -18,7 +18,13 @@
|
||||
<center><b>重</b><b>开</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: guideLockLeftFlag? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
|
||||
<button :id="Signal.guide.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: buttonUpColor}" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>按</b><b>钮</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor: buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation, ['Button'])">
|
||||
<span style="color: #800000">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>总</b><b>锁</b></center>
|
||||
@ -160,8 +166,6 @@
|
||||
deviceTimeNode: 0, // 信号按钮设备15秒 计时
|
||||
routeDataMap: null, // btnCodeList 为key
|
||||
routeButtonCodeList: [], // btnCodeList 拼接code list
|
||||
guideLockRightFlag: false,
|
||||
guideLockLeftFlag: false,
|
||||
menu: [
|
||||
{
|
||||
label: '命令下达',
|
||||
@ -249,8 +253,6 @@
|
||||
this.commandTypeList = [];
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.clearOperate();
|
||||
this.guideLockRightFlag = false;
|
||||
this.guideLockLeftFlag = false;
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
@ -316,12 +318,6 @@
|
||||
trainingOperation(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
/* 引导总锁输入面后 处理按钮选中状态 */
|
||||
if (operate.operationPre === this.Switch.guideLock.leftButton.operation || operate.operation === this.Switch.guideLock.leftButton.operation) {
|
||||
this.guideLockLeftFlag = !this.guideLockLeftFlag;
|
||||
} else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
|
||||
this.guideLockRightFlag = !this.guideLockRightFlag;
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
@ -357,10 +353,8 @@
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
if (this.guideLockRightFlag) {
|
||||
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
|
||||
operate.param = {right: false};
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
@ -375,10 +369,8 @@
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
if (this.guideLockRightFlag) {
|
||||
operate.nextCmdType = CMD.Switch.CMD_SWITCH_MASTER_UNBLOCK;
|
||||
operate.param = {right: true};
|
||||
}
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
@ -392,7 +384,11 @@
|
||||
operation: operation
|
||||
};
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation];
|
||||
const operationList = [
|
||||
this.Signal.humanTrainRoute.button.operation,
|
||||
this.Section.fault.button.operation,
|
||||
this.Signal.guide.button.operation
|
||||
];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
@ -445,7 +441,20 @@
|
||||
return this.routeButtonCodeList.some(item => item.includes(name));
|
||||
}
|
||||
},
|
||||
// 排列进路 OR 信号重开操作
|
||||
// 信号重开
|
||||
handelReopenSignal(device) {
|
||||
const operate = {
|
||||
operation: this.Signal.reopenSignal.button.operation,
|
||||
// over: true,
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
|
||||
code: device.code,
|
||||
param: { signalCode: device.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {
|
||||
// this.clearOperate();
|
||||
}).catch(() => this.$refs.noticeInfo.doShow() );
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = { operation: this.Signal.arrangementRoute.button.operation };
|
||||
if (!this.routeDataMap) { this.handleRouteDataMap(); }
|
||||
@ -492,7 +501,6 @@
|
||||
key = key + (index ? '-' : '') + (index? item.code : this.menuSignal.code);
|
||||
});
|
||||
const route = this.routeDataMap[key];
|
||||
console.log(route, '***********');
|
||||
if (route) {
|
||||
operate.code = deviceList[deviceList.length - 1].code;
|
||||
operate.param = {routeCode: route.code};
|
||||
@ -620,17 +628,16 @@
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
handleGuideLock(model) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
|
||||
if (signal && (this.guideLockRightFlag && signal.right) || (this.guideLockLeftFlag && !signal.right)) {
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
param: {signalCode: model.signalCode}
|
||||
};
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
}).catch((e) => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
},
|
||||
handelFaultSection(model) {
|
||||
if (model._type === 'Section') {
|
||||
@ -662,7 +669,7 @@
|
||||
];
|
||||
console.log(buttonOperation, this.Signal.arrangementRoute.button.operation, 'buttonOperation', this.commandTypeList.includes(model._type));
|
||||
|
||||
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||
if (model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||
this.handleGuideLock(model);
|
||||
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||
@ -675,6 +682,8 @@
|
||||
this.handelSignalBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
||||
this.handelFaultSection(model);
|
||||
} else if (buttonOperation === this.Signal.reopenSignal.button.operation) {
|
||||
this.handelReopenSignal(model)
|
||||
} else if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
|
||||
this.deviceList.push(model);
|
||||
this.arrangementRouteOperation(this.deviceList);
|
||||
@ -734,6 +743,22 @@
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
});
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
})
|
||||
} else if (this.operation === OperationEvent.Signal.guide.button.operation) {
|
||||
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.clearOperate();
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.clearOperate();
|
||||
})
|
||||
}
|
||||
},
|
||||
commandClear() {
|
||||
|
@ -5,7 +5,7 @@
|
||||
:class="popClass"
|
||||
title="取消进路"
|
||||
:visible.sync="dialogShow"
|
||||
width="300px"
|
||||
width="350px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
@ -13,7 +13,7 @@
|
||||
>
|
||||
<div>
|
||||
<i class="el-icon-warning"/>
|
||||
<span>{{ `下发“取消进路”【信号机:${signalName}】命令吗?` }}</span>
|
||||
<span>{{ showMessage }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
@ -24,25 +24,29 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" @checkCancel="cancel" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../../../components/utils/menuOperate';
|
||||
import NoticeInfo from '../../../components/menus/childDialog/noticeInfo';
|
||||
import PasswordBox from '../dialog/childDialog/passwordInputBox.vue';
|
||||
export default {
|
||||
name: 'routeCancel',
|
||||
components: {
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
signalName: '',
|
||||
popClass: ''
|
||||
popClass: 'chengdou-03__systerm',
|
||||
loading: false,
|
||||
showMessage: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -50,11 +54,8 @@
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return OperationEvent.Signal.unlock.confirm.domId;
|
||||
}
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doClose() {
|
||||
@ -71,13 +72,28 @@
|
||||
this.signalName = selected.name;
|
||||
}
|
||||
this.operation = operate.operation;
|
||||
if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
this.showMessage = `下发“取消进路”【信号机:${this.signalName}】命令吗?`;
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
this.showMessage = `下发“信号重开”命令吗?`;
|
||||
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.showMessage = `下发“引导进路”命令吗?`;
|
||||
} else {
|
||||
this.showMessage = '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.reopenSignal);
|
||||
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.$refs.passwordBox.doShow({ operation: OperationEvent.Signal.guide.menu.operation });
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
@ -106,6 +122,11 @@
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
passWordCommit(operate) {
|
||||
if (operate.operation === OperationEvent.Signal.guide.menu.operation) {
|
||||
this.sendCommand(menuOperate.Signal.guide);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -9,6 +9,7 @@
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<route-cancel ref="routeCancel" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
@ -283,7 +284,8 @@ export default {
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}});
|
||||
// this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}, ...{routesList: this.getRouteList(this.selected)}});
|
||||
this.$refs.routeCancel.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -291,7 +293,7 @@ export default {
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -308,7 +310,7 @@ export default {
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user