Merge remote-tracking branch 'origin/develop'
All checks were successful
master分支构建发布到公网服务器 / Build-Publish (push) Successful in 9m44s

This commit is contained in:
joylink_fanyuhong 2024-09-13 09:27:49 +08:00
commit a1c8b4f662
3 changed files with 41 additions and 8 deletions

View File

@ -168,7 +168,8 @@ export default {
routeDataMap: null, // btnCodeList key routeDataMap: null, // btnCodeList key
routeButtonCodeList: [], // btnCodeList code list routeButtonCodeList: [], // btnCodeList code list
guideLockRightFlag: false, guideLockRightFlag: false,
guideLockLeftFlag: false guideLockLeftFlag: false,
continueSectionFault: false
}; };
}, },
computed: { computed: {
@ -290,6 +291,7 @@ export default {
this.clearOperate(); this.clearOperate();
this.guideLockRightFlag = false; this.guideLockRightFlag = false;
this.guideLockLeftFlag = false; this.guideLockLeftFlag = false;
this.continueSectionFault = false;
} }
}, },
beforeDestroy() { beforeDestroy() {
@ -330,6 +332,9 @@ export default {
if (operate.operationPre === this.Station.powerUnLock.button.operation || operate.cmdType) { if (operate.operationPre === this.Station.powerUnLock.button.operation || operate.cmdType) {
this.clearOperate(); this.clearOperate();
} }
if (operate.operationPre === this.Section.fault.button.operation) {
this.continueSectionFault = true;
}
} }
}).catch(e =>{ }).catch(e =>{
console.error(e); console.error(e);
@ -417,6 +422,7 @@ export default {
operation: operation, operation: operation,
userOperationType: UserOperationType.LEFTCLICK userOperationType: UserOperationType.LEFTCLICK
}; };
// //
const operationList = [this.Signal.humanTrainRoute.button.operation, const operationList = [this.Signal.humanTrainRoute.button.operation,
this.Section.fault.button.operation, this.Section.fault.button.operation,
@ -437,12 +443,30 @@ export default {
// ]; // ];
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
if (operation === this.Command.cancel.clearMbm.operation) { if (operation == this.Section.fault.button.operation) {
this.operation = operation;
this.commandTypeList = commandTypeList;
this.$store.dispatch('menuOperation/setButtonOperation', operation);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
//
if (!this.continueSectionFault) {
operate['operateNext'] = this.Command.close.password.operation;
if (operation === this.Station.powerUnLock.button.operation) {
operate.nextCmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
operate.param = {stationCode: this.$store.state.training.roleDeviceCode};
}
this.$refs.password.doShow(operate, operationMap[operation]);
}
this.timeNode = this.$store.state.socket.simulationTimeSync;
this.$store.dispatch('training/emitTipFresh');
} else if (operation === this.Command.cancel.clearMbm.operation) {
this.continueSectionFault = false;
this.commandTypeList = []; this.commandTypeList = [];
this.$store.dispatch('menuOperation/setButtonOperation', null); this.$store.dispatch('menuOperation/setButtonOperation', null);
this.guideLockRightFlag = false; this.guideLockRightFlag = false;
this.guideLockLeftFlag = false; this.guideLockLeftFlag = false;
} else { } else {
this.continueSectionFault = false;
this.operation = operation; this.operation = operation;
this.commandTypeList = commandTypeList; this.commandTypeList = commandTypeList;
this.$store.dispatch('menuOperation/setButtonOperation', operation); this.$store.dispatch('menuOperation/setButtonOperation', operation);
@ -781,6 +805,9 @@ export default {
if (this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) { if (this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) {
return; return;
} }
if (this.continueSectionFault && model._type !== 'Section') {
this.continueSectionFault = false;
}
const buttonOperation = this.$store.state.menuOperation.buttonOperation; const buttonOperation = this.$store.state.menuOperation.buttonOperation;
const switchOperation = [ const switchOperation = [
this.Switch.lock.button.operation, this.Switch.lock.button.operation,

View File

@ -15,6 +15,7 @@
style="width: 100%" style="width: 100%"
> >
<el-table-column prop="desc" label="步骤" /> <el-table-column prop="desc" label="步骤" />
<el-table-column prop="role" label="操作人员" />
<el-table-column prop="success" label="操作结果" width="100"> <el-table-column prop="success" label="操作结果" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.success?'正确':'错误' }}</span> <span>{{ scope.row.success?'正确':'错误' }}</span>
@ -22,7 +23,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="score" label="得分" width="100"> <el-table-column prop="score" label="得分" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.score || 0 }}</span> <span>{{ scope.row.score }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -54,7 +55,11 @@ export default {
if (scoreList && scoreList.length) { if (scoreList && scoreList.length) {
scoreList.forEach(score => { scoreList.forEach(score => {
const step = this.stepList.find(step => step.id == score.stepId); const step = this.stepList.find(step => step.id == score.stepId);
this.tableData.push({ ...score, desc: step.description }); const role = this.$store.state.training.memberData[parseInt(step.memberId)];
if (!score.hasOwnProperty('score')) {
score.score = '/';
}
this.tableData.push({ ...score, role: role.labelName, desc: step.description });
}); });
} }
this.dialogVisible = true; this.dialogVisible = true;
@ -66,7 +71,7 @@ export default {
if (index === 0) { if (index === 0) {
sums[index] = '合计'; sums[index] = '合计';
return; return;
} else if (index === 1) { } else if (index === 2) {
const MyMemberId = this.$store.state.training.myMemberId; const MyMemberId = this.$store.state.training.myMemberId;
const scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId ); const scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId );
let total = 0; let total = 0;
@ -76,7 +81,7 @@ export default {
}); });
} }
sums[index] = total; sums[index] = total;
} else if (index === 2) { } else if (index === 3) {
const values = data.map(item => Number(item[column.property])); const values = data.map(item => Number(item[column.property]));
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);

View File

@ -58,9 +58,10 @@ export default {
}, },
methods: { methods: {
initLoadPage() { initLoadPage() {
const trainingType = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingType : ''; let trainingType = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingType : '';
trainingType = trainingType ? trainingType.toLowerCase() : null;
// labels: ['', ''] // labels: ['', '']
const data = {mapId: this.mapId, type: trainingType.toLowerCase()}; const data = {mapId: this.mapId, type: trainingType};
if (this.$route.query.labels) { if (this.$route.query.labels) {
const labels = this.$route.query.labels.split('-'); const labels = this.$route.query.labels.split('-');
const labelMap = { loc: '现地', dis: '行调', section: '区段', signal: '信号机', switch: '道岔', stand: '站台', station: '车站', control: '控制权' }; const labelMap = { loc: '现地', dis: '行调', section: '区段', signal: '信号机', switch: '道岔', stand: '站台', station: '车站', control: '控制权' };