Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6ac28534ea
@ -169,12 +169,19 @@ class Jlmap {
|
||||
}
|
||||
|
||||
setCenter(deviceCode) {
|
||||
const arr = Object.keys(this.mapDevice);
|
||||
if (arr.length != 0) {
|
||||
const device = this.mapDevice[deviceCode];
|
||||
if (device && device.instance) {
|
||||
var rect = createBoundingRect(device.instance);
|
||||
var dcenter = calculateDCenter(rect, { width: this.$zr.getWidth(), height: this.$zr.getHeight() });
|
||||
this.setOptions(dcenter);
|
||||
}
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.setCenter(deviceCode);
|
||||
}, 60);
|
||||
}
|
||||
}
|
||||
setRevoverBigScreen() {
|
||||
this.screenFlag = false;
|
||||
|
@ -23,7 +23,7 @@ import { Notification } from 'element-ui';
|
||||
import { startTrainingNew } from '@/api/jmap/training';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
// import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'MenuExam',
|
||||
@ -154,7 +154,7 @@ export default {
|
||||
});
|
||||
},
|
||||
init() {
|
||||
launchFullscreen();
|
||||
// launchFullscreen();
|
||||
// 刷新考试列表
|
||||
refreshExamList(this.$route.query.userExamId).then(response => {
|
||||
this.$store.dispatch('exam/setUsedTime', response.data.usedTime);
|
||||
|
@ -23,7 +23,7 @@
|
||||
highlight-current
|
||||
@node-click="getTrainDetail"
|
||||
>
|
||||
<span slot-scope="{ node, data }">
|
||||
<span slot-scope="{ data }">
|
||||
<span :style="{color: data.usedTime !== undefined ? 'green':''}"> {{ trainingList.indexOf(data)+1 }}.{{
|
||||
data.trainingName }}
|
||||
</span>
|
||||
@ -131,7 +131,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function() {
|
||||
'$store.state.map.mapViewLoadedCount': function() { // 地图视图加载完成标识
|
||||
this.$store.dispatch('exam/stopCountTime');
|
||||
this.loadInitData();
|
||||
this.$store.dispatch('exam/countUsedTime');
|
||||
@ -165,7 +165,7 @@ export default {
|
||||
minDuration: res.data.minDuration,
|
||||
updateTime: res.data.updateTime
|
||||
};
|
||||
this.$store.dispatch('exam/setCenter', res.data.locateDeviceCode);
|
||||
// this.$store.dispatch('exam/setCenter', res.data.locateDeviceCode);
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message);
|
||||
});
|
||||
|
@ -234,9 +234,9 @@ export default {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (!this.planRunning) {
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
// if (!this.planRunning) {
|
||||
// this.$store.dispatch('training/over');
|
||||
// }
|
||||
if (this.isDemon) {
|
||||
this.$refs.menuDemon.initPlannedDriving(this.planRunning); // 是否正在按计划行车
|
||||
} else if (this.isScript) {
|
||||
|
@ -139,7 +139,10 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
this.setCenter(code);
|
||||
code && this.setCenter(code);
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
this.$store.state.exam.deviceCode && this.setCenter(this.$store.state.exam.deviceCode);
|
||||
},
|
||||
'$store.state.config.canvasSizeCount': function (val) {
|
||||
this.resetSize();
|
||||
@ -352,7 +355,7 @@ export default {
|
||||
async simulationReset() {
|
||||
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
await this.$store.dispatch('training/over');
|
||||
// await this.$store.dispatch('training/over');
|
||||
await this.$store.dispatch('socket/setSimulationReset'); // 清空
|
||||
await this.$store.dispatch('socket/setSimulationStart');
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
|
@ -38,7 +38,6 @@ export default {
|
||||
methods: {
|
||||
tipInit() {
|
||||
this.$nextTick(() => {
|
||||
console.log('tipInit',);
|
||||
this.$store.dispatch('training/isTeachMode').then(() => {
|
||||
this.tipShow = true;
|
||||
const offset = this.$store.state.config.canvasOffset;
|
||||
|
Loading…
Reference in New Issue
Block a user