-
-
-
+
+
+
@@ -28,10 +28,10 @@
-
-
+
+
@@ -107,7 +107,20 @@ export default {
data() {
return {
mode: 'standFAS',
- deviceList: ['ManualAlarmButton', 'SmokeDetector', 'FireHydranAlarmButton', 'GasFireControl']
+ deviceList: [
+ 'ManualAlarmButton',
+ 'SmokeDetector',
+ 'FireHydranAlarmButton',
+ 'GasFireControl',
+ 'LightingGroup',
+ 'Electrically',
+ 'VolumeControlDamper',
+ 'SmookExhaustFd',
+ 'Ventilator',
+ 'AirConditioner',
+ 'FireDamper',
+ 'SmookProofFd'
+ ]
};
},
watch: {
@@ -116,9 +129,10 @@ export default {
},
'$store.state.iscs.selectedCount': function() {
const device = this.$store.state.iscs.selected;
- if (device._type === 'IscsButton' && device.function === 'GraphicEle') {
+ console.log(device, '11111111111111');
+ if (device && device._type === 'IscsButton' && device.function === 'GraphicEle') {
this.$refs.graphicEle.doShow();
- } else if (this.deviceList.includes(device._type)) {
+ } else if (device && this.deviceList.includes(device._type)) {
this.$refs.deviceControl.doShow(device);
}
}
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index 76bb4eb7a..f5b8feb10 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -117,7 +117,8 @@ export default {
countdownTime: '00:00:00',
practicalTime: 0,
countdown: null,
- questionList: []
+ questionList: [],
+ practicalExamTime: 0
};
},
computed: {
@@ -392,15 +393,14 @@ export default {
const paperResp = await getTestPaperDatail(this.$route.query.raceId);
if (paperResp.data && paperResp.data.practicalQuestions) {
this.questionList = [];
+ this.practicalExamTime = paperResp.data.practicalExamTime;
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
const startTime = localStore.get(storeKey);
if (startTime) {
const dt = new Date().getTime() - startTime;
this.practicalTime = paperResp.data.practicalExamTime * 60 - Math.floor(dt / 1000);
} else {
- this.practicalTime = paperResp.data.practicalExamTime * 60;
- const storeValue = new Date().getTime();
- localStore.set(storeKey, storeValue);
+ this.practicalTime = this.practicalExamTime * 60;
}
this.countdownTime = this.computationTime(this.practicalTime);
paperResp.data.practicalQuestions.forEach(elem => {
@@ -436,6 +436,12 @@ export default {
}
},
startCounting() {
+ const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
+ const startTime = localStore.get(storeKey);
+ if (!startTime) {
+ const storeValue = new Date().getTime();
+ localStore.set(storeKey, storeValue);
+ }
this.countdown = setInterval(() => {
if (this.practicalTime <= 0) {
if (this.countdown) {