From 2e195abb8fba1af970782425aba1a44f532a5888 Mon Sep 17 00:00:00 2001
From: fan
Date: Tue, 29 Nov 2022 15:08:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../theme/fuzhou_01/menus/menuSignal.vue | 2 +-
src/views/newMap/display/index.vue | 11 +--
.../display/simulationMenu/diagramLoad.vue | 9 +--
.../display/trainingDesign/designPane.vue | 2 +-
.../trainingList/designTrainingMenu.vue | 29 +++-----
.../display/trainingList/testResult.vue | 68 +++++++++++++++++++
.../display/trainingList/trainingMenu.vue | 27 +++-----
src/views/publish/publishMap/subsystem.vue | 2 +-
8 files changed, 100 insertions(+), 50 deletions(-)
create mode 100644 src/views/newMap/display/trainingList/testResult.vue
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue
index 688d8295b..05c33158f 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue
@@ -130,7 +130,7 @@ export default {
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
- isDisabled: signal => signal.ciControl !== 0,
+ isDisabled: signal => signal.ciControl !== 1,
isShow: (signal, work) => work === 'localWork'
},
{
diff --git a/src/views/newMap/display/index.vue b/src/views/newMap/display/index.vue
index d843b55e7..f84ec22c2 100644
--- a/src/views/newMap/display/index.vue
+++ b/src/views/newMap/display/index.vue
@@ -67,6 +67,9 @@ export default {
mode() {
return this.$route.params.mode;
},
+ simType() {
+ return this.$route.query.simType;
+ },
// 当前的所属项目
project() {
return getSessionStorage('project');
@@ -89,9 +92,7 @@ export default {
async mounted() {
this.setWindowSize();
this.group = this.$route.query.group;
- if (!this.isLesson && !this.isExam) {
- this.initLoadData();
- }
+ this.initLoadData();
},
beforeDestroy() {
this.$store.dispatch('socket/clearTrainingOverCount');
@@ -114,7 +115,9 @@ export default {
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.$store.dispatch('training/setDomConfig', resp.data.paramVO && resp.data.paramVO.domConfig ? resp.data.paramVO.domConfig : {});
loadMapDataById(this.mapId, 'simulation');
- this.loadRunPlan();
+ if (this.simType === 'METRO') {
+ this.loadRunPlan();
+ }
} else {
this.endViewLoading();
this.$messageBox('此地图数据正在维护中,无法运行!');
diff --git a/src/views/newMap/display/simulationMenu/diagramLoad.vue b/src/views/newMap/display/simulationMenu/diagramLoad.vue
index 653962ad4..e358026f2 100644
--- a/src/views/newMap/display/simulationMenu/diagramLoad.vue
+++ b/src/views/newMap/display/simulationMenu/diagramLoad.vue
@@ -38,7 +38,7 @@ export default {
}
},
watch: {
- '$store.state.socket.runPlanReloadCount': function (val) {
+ '$store.state.socket.runPlanReloadCount': function () {
getSimulationInfoNew(this.group).then(res => {
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
loadRunPlanData(this.group);
@@ -48,9 +48,6 @@ export default {
beforeDestroy() {
this.$store.dispatch('runPlan/setPlanData', []);
},
- mounted() {
- // this.menus = this.$theme.loadPlanComponent(this.$route.query.lineCode);
- },
methods: {
doShow() {
this.show = true;
@@ -72,8 +69,8 @@ export default {
user-select: none;
position: absolute;
z-index: 38;
- top: 0px;
- right: 0px;
+ top: 0;
+ right: 0;
background: white;
}
diff --git a/src/views/newMap/display/trainingDesign/designPane.vue b/src/views/newMap/display/trainingDesign/designPane.vue
index 743411fe2..6f4f98420 100644
--- a/src/views/newMap/display/trainingDesign/designPane.vue
+++ b/src/views/newMap/display/trainingDesign/designPane.vue
@@ -312,7 +312,7 @@ export default {
description: this.editData.description,
labelJson: this.editData.label,
type: this.editData.type,
- client: this.$store.state.map.picture
+ client: this.editData.type === 'SINGLE' ? this.$store.state.map.picture : ''
};
await updateTraining(trainingData);
await updateTrainingStep(this.group, this.editData.id, list);
diff --git a/src/views/newMap/display/trainingList/designTrainingMenu.vue b/src/views/newMap/display/trainingList/designTrainingMenu.vue
index 2eee08279..fd6a47192 100644
--- a/src/views/newMap/display/trainingList/designTrainingMenu.vue
+++ b/src/views/newMap/display/trainingList/designTrainingMenu.vue
@@ -22,10 +22,6 @@
{{ $t('display.training.trainingName') }}
{{ trainingDetail.name }}
-
- {{ $t('display.lesson.score') }}
- {{ trainingScore }}
-
实训模式:
@@ -57,6 +53,7 @@
+
@@ -64,11 +61,13 @@
import { ScriptMode } from '@/scripts/ConstDic';
import { startTraining, endTraining } from '@/api/jmap/training';
import ScenePlayRole from './scenePlayRole';
+import TestResult from './testResult';
export default {
name: 'TipTrainingDetail',
components: {
- ScenePlayRole
+ ScenePlayRole,
+ TestResult
},
props: {
offsetBottom: {
@@ -81,8 +80,7 @@ export default {
isShrink: true,
showSumbit: false,
demoMode: ScriptMode.TEACH,
- TrainingMode: ScriptMode,
- trainingScore: 0
+ TrainingMode: ScriptMode
};
},
computed: {
@@ -99,16 +97,6 @@ export default {
return this.$store.state.trainingNew.teachMode;
}
},
- watch: {
- '$store.state.trainingNew.scoreList': function(val) {
- if (val && val.length) {
- this.trainingScore = 0;
- val.forEach(scoreItem => {
- this.trainingScore += scoreItem.score;
- });
- }
- }
- },
mounted() {
this.loadInitData();
},
@@ -146,16 +134,19 @@ export default {
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
startTraining(this.group, {mode: this.demoMode}).then(() => {
this.$store.dispatch('trainingNew/trainingStart');
- this.trainingScore = 0;
}).catch(() => {
this.$message.error('开始实训失败!');
});
},
handlerEnd() {
const scoreList = this.$store.state.trainingNew.scoreList;
+ if (this.demoMode === ScriptMode.TEST) {
+ const scoringRules = this.$store.state.trainingNew.scoringRules;
+ const scoringRule = scoringRules.find(rule => rule.memberId == this.$store.state.training.myMemberId);
+ this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule.details);
+ }
endTraining(this.group, scoreList).then((resp) => {
this.$store.dispatch('trainingNew/trainingEnd');
- this.trainingScore = 0;
}).catch(() => {
this.$message.error('结束实训失败!');
});
diff --git a/src/views/newMap/display/trainingList/testResult.vue b/src/views/newMap/display/trainingList/testResult.vue
new file mode 100644
index 000000000..8d18bc40d
--- /dev/null
+++ b/src/views/newMap/display/trainingList/testResult.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+ {{ handleStepInfo(scope.row.elementId) }}
+
+
+
+
+
+
+
+ {{ handleTotalScore(scope.row.elementId) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/display/trainingList/trainingMenu.vue b/src/views/newMap/display/trainingList/trainingMenu.vue
index 6f89d07bc..a67bbaf65 100644
--- a/src/views/newMap/display/trainingList/trainingMenu.vue
+++ b/src/views/newMap/display/trainingList/trainingMenu.vue
@@ -24,10 +24,6 @@
{{ $t('display.training.trainingName') }}
{{ trainingDetail.name }}
-
- {{ $t('display.lesson.score') }}
- {{ trainingScore }}
-
实训模式:
@@ -69,6 +65,7 @@
+
@@ -76,10 +73,12 @@
import { ScriptMode } from '@/scripts/ConstDic';
import { startTraining, endTraining } from '@/api/jmap/training';
import ScenePlayRole from './scenePlayRole';
+import TestResult from './testResult';
import { getPublishSingleList, getPublishTrainingDetail, loadPublishTraining, getPublishScenesList } from '@/api/jmap/training';
export default {
name: 'TipTrainingDetail',
components: {
+ TestResult,
ScenePlayRole
},
props: {
@@ -172,8 +171,7 @@ export default {
}
]
},
- playerId: '',
- trainingScore: 0
+ playerId: ''
};
},
computed: {
@@ -193,16 +191,6 @@ export default {
return this.$route.query.mapId;
}
},
- watch: {
- '$store.state.trainingNew.scoreList': function(val) {
- if (val && val.length) {
- this.trainingScore = 0;
- val.forEach(scoreItem => {
- this.trainingScore += scoreItem.score;
- });
- }
- }
- },
mounted() {
this.loadInitData();
},
@@ -241,16 +229,19 @@ export default {
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
startTraining(this.group, {mode: this.demoMode}).then(() => {
this.$store.dispatch('trainingNew/trainingStart');
- this.trainingScore = 0;
}).catch(() => {
this.$message.error('开始实训失败!');
});
},
handlerEnd() {
const scoreList = this.$store.state.trainingNew.scoreList;
+ if (this.demoMode === ScriptMode.TEST) {
+ const scoringRules = this.$store.state.trainingNew.scoringRules;
+ const scoringRule = scoringRules.find(rule => rule.memberId == this.$store.state.training.myMemberId);
+ this.$refs.testResult.doShow(scoreList, this.$store.state.trainingNew.stepList, scoringRule.details);
+ }
endTraining(this.group, scoreList).then((resp) => {
this.$store.dispatch('trainingNew/trainingEnd');
- this.trainingScore = 0;
}).catch(() => {
this.$message.error('结束实训失败!');
});
diff --git a/src/views/publish/publishMap/subsystem.vue b/src/views/publish/publishMap/subsystem.vue
index 2038b7bc1..9d39773bc 100644
--- a/src/views/publish/publishMap/subsystem.vue
+++ b/src/views/publish/publishMap/subsystem.vue
@@ -79,7 +79,7 @@ export default {
queryForm: {
labelWidth: '80px',
reset: true,
- leftSpan: 18,
+ leftSpan: 16,
queryObject: {
name: {
type: 'text',