Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1

This commit is contained in:
fan 2023-01-05 09:27:40 +08:00
commit 45f8430214
4 changed files with 151 additions and 39 deletions

View File

@ -5,7 +5,7 @@
<el-row>
<div class="signal-box-title">开始</div>
<div style="border: 1px solid #ACABAA;padding: 8px;">
<el-table ref="table" :data="signalList" height="184px" highlight-current-row @current-change="handleCurrentChangeStar">
<el-table :id="domIdStartSignal" ref="table" :data="signalList" height="184px" highlight-current-row @current-change="handleCurrentChangeStar">
<el-table-column prop="name" label="信号机" />
</el-table>
</div>
@ -13,14 +13,14 @@
<el-row>
<div class="signal-box-title">结束</div>
<div style="border: 1px solid #ACABAA;padding: 8px;">
<el-table :data="signalList" height="184px" highlight-current-row @current-change="handleCurrentChangeEnd">
<el-table :id="domIdEndSignal" ref="endTable" :data="signalList" height="184px" highlight-current-row @current-change="handleCurrentChangeEnd">
<el-table-column prop="name" label="信号机" />
</el-table>
</div>
</el-row>
</el-col>
<el-col :span="6" class="path-box">
<el-table ref="singleTable" :data="tempData" height="412px" highlight-current-row @current-change="handleRowChange">
<el-table :id="domIdPath" ref="singleTable" :data="tempData" height="412px" highlight-current-row @current-change="handleRowChange">
<el-table-column prop="name" label="路径" width="125" />
<el-table-column prop="direction" label="运行方向">
<template slot-scope="scope">
@ -38,6 +38,7 @@
<div class="border-box">
<div class="border-box-title">CBTC</div>
<el-table
:id="domIdCBTC1"
ref="singleTable1"
:data="filterRouteList"
highlight-current-row
@ -51,17 +52,18 @@
</el-table>
</div>
</el-col>
<el-col :span="6">
<el-col :id="domIdUnlockType" :span="6">
<div class="radio-box-title">解锁类型</div>
<div class="radio-box">
<el-radio v-model="unlockType" label="auto" style="display: block;margin-bottom: 10px;">自动</el-radio>
<el-radio v-model="unlockType" label="artificial" style="display: block;">人工</el-radio>
<el-radio v-model="unlockType" label="auto" style="display: block;margin-bottom: 10px;" @input="changeUnlockType">自动</el-radio>
<el-radio v-model="unlockType" label="artificial" style="display: block;" @input="changeUnlockType">人工</el-radio>
</div>
</el-col>
</el-row>
<el-row class="border-box">
<div class="border-box-title">后备</div>
<el-table
:id="domIdReserve1"
ref="singleTable2"
:data="routeList"
highlight-current-row
@ -87,6 +89,7 @@
<div class="border-box">
<div class="border-box-title">CBTC</div>
<el-table
:id="domIdCBTC2"
ref="singleTable3"
:data="routeList"
highlight-current-row
@ -103,6 +106,7 @@
<el-row class="border-box">
<div class="border-box-title">后备</div>
<el-table
:id="domIdReserve2"
ref="singleTable4"
:data="routeList"
highlight-current-row
@ -164,7 +168,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!route" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" :loading="loading" :disabled="!route" @click="commit(false)">应用(A)</el-button>
<el-button :id="domIdApply" :loading="loading" :disabled="!route" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
@ -225,11 +229,35 @@ export default {
domIdClose() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
},
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
},
domIdStartSignal() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_startSignal.domId : '';
},
domIdEndSignal() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_endSignal.domId : '';
},
domIdPath() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_path.domId : '';
},
domIdCBTC1() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_CBTC1.domId : '';
},
domIdCBTC2() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_CBTC2.domId : '';
},
domIdReserve1() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_reserve1.domId : '';
},
domIdReserve2() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_reserve2.domId : '';
},
domIdUnlockType() {
return this.dialogShow ? OperationEvent.Command.commandNingBo3.Signal_command_unlockType.domId : '';
},
title() {
return '进路命令';
@ -243,6 +271,15 @@ export default {
}
},
methods: {
changeUnlockType() {
const step = {
operation: OperationEvent.Command.commandNingBo3.Signal_command_unlockType.operation,
param: {
unlockType: this.unlockType
}
};
this.$store.dispatch('trainingNew/next', step);
},
doShow(operate) {
//
this.dialogShow = true;
@ -260,7 +297,7 @@ export default {
setTimeout(()=> {
this.$refs.table.bodyWrapper.scrollTop = index * 20;
}, 200);
this.handleCurrentChangeStar(signal);
// this.handleCurrentChangeStar(signal);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -268,14 +305,20 @@ export default {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.table.setCurrentRow();
this.$refs.endTable.setCurrentRow();
this.$refs.singleTable.setCurrentRow();
this.$refs.singleTable1.setCurrentRow();
this.$refs.singleTable2.setCurrentRow();
this.$refs.singleTable3.setCurrentRow();
this.$refs.singleTable4.setCurrentRow();
this.activeName = 'first';
this.unlockType = 'auto';
this.$refs.table.bodyWrapper.scrollTop = 0;
},
//
handleCurrentChangeStar(val) {
console.log('🚀 ~ file: routeCommand.vue:322 ~ handleCurrentChangeStar ~ val', val);
if (!val) { return; }
this.tempData = [];
this.routeList.forEach(item => {
@ -283,6 +326,13 @@ export default {
this.tempData.push(item);
}
});
const step = {
operation: OperationEvent.Command.commandNingBo3.Signal_command_startSignal.operation,
param: {
startSignalCode: `${val.code}`
}
};
this.$store.dispatch('trainingNew/next', step);
},
handleCurrentChangeEnd(val) {
if (!val) { return; }
@ -293,6 +343,13 @@ export default {
}
});
this.tempData = arrList;
const step = {
operation: OperationEvent.Command.commandNingBo3.Signal_command_endSignal.operation,
param: {
endSignalCode: `${val.code}`
}
};
this.$store.dispatch('trainingNew/next', step);
},
restoreBeforeDevices() {
//
@ -359,22 +416,26 @@ export default {
//
const step = {
code: `${row.code}`,
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
param: {}
// code: `${row.code}`,
operation: OperationEvent.Command.commandNingBo3.Signal_command_path.operation,
param: {
pathCode: `${row.code}`
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: row});
}
this.$store.dispatch('menuOperation/setSelected', {device: row});
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
commit(isClose = false) {
const step = {
start: true, //
over: true,
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
param: {
routeCode: this.route.code,
signalCode: (this.selected || {}).startSignalCode
@ -383,17 +444,18 @@ export default {
if (this.activeName === 'first') {
if (this.unlockType === 'auto') {
step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation;
// step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
} else if (this.unlockType === 'artificial') {
step.operation = OperationEvent.Signal.humanControl.confirm.operation;
// step.operation = OperationEvent.Signal.humanControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
step.param.unlockType = this.unlockType;
}
} else if (this.activeName === 'second') {
step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
// step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
} else {
step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
// step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
}
@ -415,15 +477,17 @@ export default {
this.route = val;
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.atsAutoControl.choose.operation,
param: {}
// code: `${val.code}`,
operation: OperationEvent.Command.commandNingBo3.Signal_command_CBTC1.operation,
param: {
CBTC1Code: `${val.code}`
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
this.$store.dispatch('menuOperation/setSelected', {device: val});
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
@ -435,15 +499,17 @@ export default {
if (!val) { return; }
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.atsAutoControl.choose.operation,
param: {}
// code: `${val.code}`,
operation: OperationEvent.Command.commandNingBo3.Signal_command_reserve1.operation,
param: {
code: `${val.code}`
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
this.$store.dispatch('menuOperation/setSelected', {device: val});
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
@ -457,15 +523,17 @@ export default {
this.route = val;
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
param: {}
// code: `${val.code}`,
operation: OperationEvent.Command.commandNingBo3.Signal_command_CBTC2.operation,
param: {
CBTC2Code: `${val.code}`
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/setSelected', {device: val});
}
this.$store.dispatch('menuOperation/setSelected', {device: val});
}).catch(() => {
this.$refs.noticeInfo.doShow();
});

View File

@ -168,7 +168,7 @@ export default {
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
this.dialogShow = true;
this.$nextTick(function () {
this.changeIgnore = sure;
// this.changeIgnore = sure;
let index = 0;
this.$refs.table.setCurrentRow(this.tempList.find((el, i) => { index = i; return el.code == selected.code; }));
setTimeout(()=> {
@ -181,8 +181,8 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.sure && (this.currentSelect = null);
this.sure && this.$refs.table.setCurrentRow();
this.currentSelect = null;
this.$refs.table.setCurrentRow();
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
);
@ -229,7 +229,9 @@ export default {
const step = {
// code: val.code,
operation: OperationEvent.Command.common.choose.operation,
param: {
val: val.code
}
};
this.changeIgnore = false;

View File

@ -199,6 +199,12 @@ export default {
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
const operate = {
code: `${this.selected.code}`,
userOperationType: 'rightClick',
operation: OperationEvent.Command.commandRight.right.operation
};
this.$store.dispatch('trainingNew/next', operate);
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -677,16 +677,52 @@ export const OperationEvent = {
domId: '_Tips-ningBo-line_remoteResetFunc-sure{TOP}'
},
Switch_command_setMode: {
operation: '00c04',
operation: '00c041',
domId: '_Tips-ningBo-Switch_command_setMode{BOTTOM}'
},
Switch_command_setPosition: {
operation: '00c05',
operation: '00c042',
domId: '_Tips-ningBo-Switch_command_setPosition{BOTTOM}'
},
Switch_command_setReserved: {
operation: '00c06',
operation: '00c043',
domId: '_Tips-ningBo-Switch_command_setReserved{BOTTOM}'
},
Signal_command: {
operation: '00c05',
domId: '_Tips-ningBo-Signal_command{BOTTOM}'
},
Signal_command_startSignal: {
operation: '00c051',
domId: '_Tips-ningBo-Signal_command_startSignal{BOTTOM}'
},
Signal_command_endSignal: {
operation: '00c052',
domId: '_Tips-ningBo-Signal_command_endSignal{BOTTOM}'
},
Signal_command_path: {
operation: '00c053',
domId: '_Tips-ningBo-Signal_command_path{BOTTOM}'
},
Signal_command_CBTC1: {
operation: '00c054',
domId: '_Tips-ningBo-Signal_command_CBTC1{BOTTOM}'
},
Signal_command_CBTC2: {
operation: '00c055',
domId: '_Tips-ningBo-Signal_command_CBTC2{BOTTOM}'
},
Signal_command_reserve1: {
operation: '00c056',
domId: '_Tips-ningBo-Signal_command_reserve1{BOTTOM}'
},
Signal_command_reserve2: {
operation: '00c057',
domId: '_Tips-ningBo-Signal_command_reserve2{BOTTOM}'
},
Signal_command_unlockType: {
operation: '00c058',
domId: '_Tips-ningBo-Signal_command_unlockType{BOTTOM}'
}
},
commandRight: {