From a6917c1d1789b7908827dcab03b751dd80d68bae Mon Sep 17 00:00:00 2001 From: fan Date: Sat, 8 Oct 2022 18:12:28 +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 --- src/utils/baseUrl.js | 4 +- src/views/newMap/displayNew/exam/index.vue | 1 + .../newMap/displayNew/exam/tipExamList.vue | 16 ++++---- src/views/newMap/displayNew/lesson/index.vue | 38 ++++++++++++++++--- .../displayNew/lesson/tipTrainingDetail.vue | 16 ++++---- 5 files changed, 51 insertions(+), 24 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 18cd6450a..0c6bfc252 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -24,12 +24,12 @@ export function handlerUrl(data) { if (process.env.NODE_ENV === 'development') { // const data = null; // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.233/rtss-server'; // BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://192.168.3.90:9100'; // 周寅 // BASE_API = 'http://192.168.3.94:9000'; // 旭强 - BASE_API = 'http://192.168.3.15:9000'; // 张赛 + // BASE_API = 'http://192.168.3.15:9000'; // 张赛 // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; diff --git a/src/views/newMap/displayNew/exam/index.vue b/src/views/newMap/displayNew/exam/index.vue index d3cb6c535..a0b7a0eeb 100644 --- a/src/views/newMap/displayNew/exam/index.vue +++ b/src/views/newMap/displayNew/exam/index.vue @@ -285,6 +285,7 @@ export default { } this.$jlmap.updateShowStation(list, item.deviceCode); } + this.$jlmap.setCenter(item.deviceCode); } }); } diff --git a/src/views/newMap/displayNew/exam/tipExamList.vue b/src/views/newMap/displayNew/exam/tipExamList.vue index a9faeb211..3f9ed4f74 100644 --- a/src/views/newMap/displayNew/exam/tipExamList.vue +++ b/src/views/newMap/displayNew/exam/tipExamList.vue @@ -39,14 +39,14 @@ {{ $t('display.exam.questionTitle') }} {{ courseModel.name }}

-

- {{ $t('display.exam.bestTime') }} - {{ courseModel.minDuration }} {{ $t('display.seconds') }} -

-

- {{ $t('display.exam.maximumTime') }} - {{ courseModel.maxDuration }} {{ $t('display.seconds') }} -

+ + + + + + + +

{{ $t('display.exam.trainingInstructions') }} {{ courseModel.remarks }} diff --git a/src/views/newMap/displayNew/lesson/index.vue b/src/views/newMap/displayNew/lesson/index.vue index db82672b8..111eea871 100644 --- a/src/views/newMap/displayNew/lesson/index.vue +++ b/src/views/newMap/displayNew/lesson/index.vue @@ -365,13 +365,39 @@ export default { checkRoleChange(list) { list.forEach(item => { if (item.messageType === 'PLAY_CHANGE' && item.userId == this.$store.state.user.id && item.type === 'STATION_SUPERVISOR') { - this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode); - const mapDevice = this.$store.state.map.mapDevice; - const list = []; - for (const key in mapDevice) { - list.push(mapDevice[key]); + if (this.$store.state.map.map && this.$store.state.map.map.pictureList) { + const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === item.deviceCode && picture.type === 'chainStation'); + if (picture) { + const mapDevice = this.$store.state.map.mapDevice; + const list = []; + const deviceList = []; + for (const key in mapDevice) { + list.push(mapDevice[key]); + deviceList.push(key); + } + this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); + this.$jlmap.updatePicture(deviceList); + // this.$jlmap.updateTransform(picture.scaling, picture.origin); + this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode); + } else { + this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode); + const mapDevice = this.$store.state.map.mapDevice; + const list = []; + for (const key in mapDevice) { + list.push(mapDevice[key]); + } + this.$jlmap.updateShowStation(list, item.deviceCode); + } + } else { + this.$store.dispatch('map/setShowCentralizedStationCode', item.deviceCode); + const mapDevice = this.$store.state.map.mapDevice; + const list = []; + for (const key in mapDevice) { + list.push(mapDevice[key]); + } + this.$jlmap.updateShowStation(list, item.deviceCode); } - this.$jlmap.updateShowStation(list, item.deviceCode); + this.$jlmap.setCenter(this.trainingObj.locateDeviceCode); } }); } diff --git a/src/views/newMap/displayNew/lesson/tipTrainingDetail.vue b/src/views/newMap/displayNew/lesson/tipTrainingDetail.vue index d3f6ad2eb..c9bc3efe5 100644 --- a/src/views/newMap/displayNew/lesson/tipTrainingDetail.vue +++ b/src/views/newMap/displayNew/lesson/tipTrainingDetail.vue @@ -18,14 +18,14 @@ {{ $t('display.training.trainingName') }} {{ courseModel.name }}

-

- {{ $t('display.training.bestTime') }} - {{ courseModel.minDuration }} {{ $t('display.seconds') }} -

-

- {{ $t('display.training.maximumTime') }} - {{ courseModel.maxDuration }} {{ $t('display.seconds') }} -

+ + + + + + + +

{{ $t('display.training.trainingInstructions') }} {{ courseModel.remarks }}