From de0fd028edb23cb77a9bf709209bb7221dbbda62 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Tue, 20 Aug 2019 18:35:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=97=B6=E9=97=B4=E6=9A=82?= =?UTF-8?q?=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/permission.js | 15 +- src/i18n/langs/en/replay.js | 2 +- src/i18n/langs/zh/permission.js | 15 +- src/store/modules/socket.js | 12 +- src/utils/baseUrl.js | 4 +- src/views/components/systemTime/digit.vue | 167 +++++++++++----------- src/views/components/systemTime/index.vue | 145 ++++++++++--------- src/views/components/systemTime/point.vue | 65 ++++----- src/views/display/index.vue | 21 +-- src/views/display/menuReplay.vue | 7 +- src/views/display/menuSchema.vue | 10 +- src/views/display/menuSystemTime.vue | 74 +++++----- src/views/package/index.vue | 34 ++--- src/views/package/selectRole/list.vue | 2 +- src/views/replay/index.vue | 4 +- 15 files changed, 321 insertions(+), 256 deletions(-) diff --git a/src/i18n/langs/en/permission.js b/src/i18n/langs/en/permission.js index 3b653e8fc..465458765 100644 --- a/src/i18n/langs/en/permission.js +++ b/src/i18n/langs/en/permission.js @@ -2,5 +2,18 @@ export default { permissionPack: 'Package', setSuccess: 'Set successfully', isSureSetBelonger: 'Are you sure to set {name} to be the owner of the permission?', - belonger: 'Set Owner' + setBelonger: 'Set Owner', + lessonName: 'Lesson Name', + mapName: 'Map Name', + mapProductName: 'Product Name', + permissionType: 'Permission Type', + permissionStatus: 'Permission Status', + permissionUseType: 'Public/Private', + permissionTotal: 'Total', + permissionRemains: 'Remains', + isForever: 'Permanent', + startTime: 'Start Time', + endTime: 'End Time', + belonger: 'Owner', + userList: 'User List' }; diff --git a/src/i18n/langs/en/replay.js b/src/i18n/langs/en/replay.js index 97d3e8a35..8aba71ac0 100644 --- a/src/i18n/langs/en/replay.js +++ b/src/i18n/langs/en/replay.js @@ -1,5 +1,5 @@ export default { - replay: 'playback', + replay: 'Play', mapName: 'Map Name', creatorId: 'Creator of ID', createTime: 'Create Time', diff --git a/src/i18n/langs/zh/permission.js b/src/i18n/langs/zh/permission.js index cc986cf52..1bdac6211 100644 --- a/src/i18n/langs/zh/permission.js +++ b/src/i18n/langs/zh/permission.js @@ -2,5 +2,18 @@ export default { permissionPack: '权限打包', setSuccess: '设置成功', isSureSetBelonger: '是否确定设置{name}为权限所属人?', - belonger: '设置归属人' + setBelonger: '设置归属人', + lessonName: '课程名称', + mapName: '地图名称', + mapProductName: '产品名称', + permissionType: '权限类型', + permissionStatus: '权限状态', + permissionUseType: '公用/专用', + permissionTotal: '权限总数', + permissionRemains: '生于权限', + isForever: '是否永久', + startTime: '开始时间', + endTime: '结束时间', + belonger: '归属人', + userList: '用户列表' }; diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 4c525adcf..8ff511c05 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -88,6 +88,8 @@ function handle(state, data) { case 'Simulation_Quest_Finish': // 任务结束标志 state.tipOperateCount++; break; + case 'Simulation_Control_Pause': // 暂停中 + state.simulationPause = msg; } } @@ -273,7 +275,8 @@ const socket = { permissionOver: {}, // 权限结束 - tipOperateCount: 0 // 任务结束提示消息 + tipOperateCount: 0, // 任务结束提示消息 + simulationPause: false // 是否暂停状态 }, getters: { @@ -326,6 +329,9 @@ const socket = { setRoomInvite: (state, roomInvite) => { state.roomInvite = roomInvite; + }, + setSimulationPause: (state, pause) => { + state.simulationPause = pause; } }, @@ -387,6 +393,10 @@ const socket = { pushMsgQueue: ({ commit }, msg) => { commit('pushMsgQueue', msg); + }, + + setSimulationPause: ({commit}, pause) => { + commit('setSimulationPause', pause); } } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 2e575c51e..4050e7e22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,9 +3,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // 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.5:9000'; // 袁琪 - // BASE_API = 'http://192.168.3.6:9000'; // 旭强 + BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.4:9000' // 琰培 } else { BASE_API = process.env.VUE_APP_BASE_API; diff --git a/src/views/components/systemTime/digit.vue b/src/views/components/systemTime/digit.vue index 8442e7c83..acb7e818d 100644 --- a/src/views/components/systemTime/digit.vue +++ b/src/views/components/systemTime/digit.vue @@ -1,86 +1,93 @@ \ No newline at end of file + diff --git a/src/views/components/systemTime/index.vue b/src/views/components/systemTime/index.vue index 0a0cef9d9..a964e1645 100644 --- a/src/views/components/systemTime/index.vue +++ b/src/views/components/systemTime/index.vue @@ -1,75 +1,84 @@ \ No newline at end of file + diff --git a/src/views/components/systemTime/point.vue b/src/views/components/systemTime/point.vue index 888730e2e..2be8a63ad 100644 --- a/src/views/components/systemTime/point.vue +++ b/src/views/components/systemTime/point.vue @@ -1,38 +1,39 @@ \ No newline at end of file + diff --git a/src/views/display/index.vue b/src/views/display/index.vue index ad44ba7fd..6f468b7d5 100644 --- a/src/views/display/index.vue +++ b/src/views/display/index.vue @@ -26,10 +26,10 @@ - + - + @@ -122,6 +122,7 @@ export default { timeDemonNum: 0, checkLine: null, offset: 15, + right: 0, mouseNum: 1, ierval: null, mouseNumTime: 0, @@ -181,7 +182,7 @@ export default { isReplay() { return this.mode === 'replay'; }, - isTask() { + isScript() { return this.mode === 'script'; }, isPlan() { @@ -246,6 +247,7 @@ export default { const width = this.size ? this.size.width : this._clientWidth; const height = this.size ? this.size.height : this._clientHeight; + this.right = width /2 - 55; this.$store.dispatch('config/resize', { width, height }); this.$nextTick(() => { @@ -340,13 +342,12 @@ export default { }, // 加载地图数据 async initLoadData() { - // const width = document.documentElement.clientWidth; - // const height = document.documentElement.clientHeight + 200; - // this.$store.dispatch('config/resize', { width, height }); this.$store.dispatch('training/reset'); try { - await this.loadSimulationInfo(); + if (!this.isReplay) { + await this.loadSimulationInfo(); + } if (this.isReplay) { await this.initLoadReplayData(); @@ -356,7 +357,7 @@ export default { await this.initLoadScreenData(); } else if (this.isPlan) { await this.initLoadTestRunData(); - } else if (this.isTask) { + } else if (this.isScript) { await this.initLoadTaskData(); } else { await this.initLoadLessonOrExamData(); @@ -524,7 +525,7 @@ export default { await this.$refs.menuScreen.back(); } else if (this.isPlan) { await this.$refs.menuPlan.back(); - } else if (this.isTask) { + } else if (this.isScript) { await this.$refs.menuScript.back(); } }, diff --git a/src/views/display/menuReplay.vue b/src/views/display/menuReplay.vue index 0dd4e80b2..621518c43 100644 --- a/src/views/display/menuReplay.vue +++ b/src/views/display/menuReplay.vue @@ -62,7 +62,7 @@ export default { startLoading: false, speed: '1X', level: 1, - isPlay: true, + isPlay: false, time: '', timeInterval: null, progress: 0, @@ -95,6 +95,11 @@ export default { return this.isPlay ? '暂停' : '播放'; } }, + watch: { + '$store.state.map.mapViewLoadedCount': function() { + this.isPlay = true; + } + }, mounted() { EventBus.$emit('showChat'); this.time = (+new Date(this.$route.query.destroyTime) - +new Date(this.$route.query.createTime)) / 1000; diff --git a/src/views/display/menuSchema.vue b/src/views/display/menuSchema.vue index 3536cb3aa..0e92443ab 100644 --- a/src/views/display/menuSchema.vue +++ b/src/views/display/menuSchema.vue @@ -7,9 +7,9 @@ 加载剧本 - 运行图预览 + 运行图预览 -
- +
+ +
-