From 8335ee12591772f9c58aa6d03e7783dc01b39f98 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 14 May 2020 11:03:24 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=98=BE=E7=A4=BA=E5=92=8C=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=9B=E5=BB=BA=E8=A7=92=E8=89=B2=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Train/TrainBody.js | 21 +++------- src/jmapNew/shape/Train/TrainBodyBox.js | 54 ++++++++++++------------- src/router/index_Common.js | 2 +- src/views/designPlatform/demonList.vue | 4 +- src/views/studentManage/index.vue | 4 +- 5 files changed, 38 insertions(+), 47 deletions(-) diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index 24c1ec280..00960a375 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -137,7 +137,6 @@ export default class TrainBody extends Group { text: targetCode.substring(targetCode.length - style.Train.trainNumber.targetCodePrefix.length), textFill: style.trainTextColor, textStroke: style.trainTextColor, - fontWeight: 400, textStrokeWidth: 0, fontSize: model.fontSize, fontFamily: style.Train.common.fontFamily, @@ -301,20 +300,12 @@ export default class TrainBody extends Group { this.trainBodyBox && this.trainBodyBox.setColor(key, color); } getBoundingRect() { - let rect = null; - this.eachChild(elem => { - if (elem) { - const tempRect = elem.getBoundingRect(); - if ((tempRect.x || tempRect.y) && tempRect.width && tempRect.height) { - if (rect) { - rect.union(tempRect); - } else { - rect = tempRect; - } - } - } - }); - return rect || new BoundingRect(0, 0, 0, 0); + const rect = new BoundingRect(0, 0, 0, 0); + if (this.trainBodyBox) { + const tempRect = this.trainBodyBox.getBoundingRect().clone(); + rect.union(tempRect); + } + return rect; } formatChangePosition(model, style) { if (this.nameFormat) { diff --git a/src/jmapNew/shape/Train/TrainBodyBox.js b/src/jmapNew/shape/Train/TrainBodyBox.js index 74f706de8..bc398a283 100644 --- a/src/jmapNew/shape/Train/TrainBodyBox.js +++ b/src/jmapNew/shape/Train/TrainBodyBox.js @@ -2,32 +2,32 @@ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; export default class TrainBodyBox extends Group { - constructor(model) { - super(); - this.model = model; - this.create(); - } - create() { - const model = this.model; + constructor(model) { + super(); + this.model = model; + this.create(); + } + create() { + const model = this.model; this.trainBodyBox = new Rect({ - zlevel: model.zlevel, - z: model.z, - shape: { - x: model.point.x, - y: model.point.y, - width: model.style.Train.common.trainWidth, - height: model.style.Train.common.trainHeight - }, - style: { - lineWidth: model.style.Train.trainBody.trainBodyLineWidth, - stroke: model.style.Train.trainBody.trainSidelineColor || model.style.trainSidelineColor, - fill: model.style.Train.trainBody.trainBodyFillColor - }, - cursor: 'pointer' - }); - this.add(this.trainBodyBox); - } - setColor(key, color) { - this.trainBodyBox.setStyle(key, color); - } + zlevel: model.zlevel, + z: model.z, + shape: { + x: model.point.x, + y: model.point.y, + width: model.style.Train.common.trainWidth, + height: model.style.Train.common.trainHeight + }, + style: { + lineWidth: model.style.Train.trainBody.trainBodyLineWidth, + stroke: model.style.Train.trainBody.trainSidelineColor || model.style.trainSidelineColor, + fill: model.style.Train.trainBody.trainBodyFillColor + }, + cursor: 'pointer' + }); + this.add(this.trainBodyBox); + } + setColor(key, color) { + this.trainBodyBox.setStyle(key, color); + } } diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 2034c8ee5..750fa6bfc 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -964,7 +964,7 @@ export const asyncRouter = [ component: Layout, meta: { i18n: 'router.studentManage', - roles: [admin, user] + roles: [admin, user, lessonCreater] }, hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('gzb') && !window.document.location.pathname.includes('gzb') : !window.document.location.pathname.includes('gzb'), children: [ diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 531909b16..e48ed9465 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -20,7 +20,7 @@ + diff --git a/src/views/newMap/displayNew/chatView/chatContent.vue b/src/views/newMap/displayNew/chatView/chatContent.vue new file mode 100644 index 000000000..e09b49033 --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatContent.vue @@ -0,0 +1,199 @@ + + + + + + {{ covertName(chatContent.member) }} + {{ formatTime(chatContent.chatTime) }} + + + + @{{ covertName(chatContent.targetName) }} + + {{ chatContent.message }} + + + + + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatCoversitionList.vue b/src/views/newMap/displayNew/chatView/chatCoversitionList.vue new file mode 100644 index 000000000..30f92ebb8 --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatCoversitionList.vue @@ -0,0 +1,168 @@ + + + + + {{ coversition.coverName }} + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatMemberList.vue b/src/views/newMap/displayNew/chatView/chatMemberList.vue new file mode 100644 index 000000000..01a0d0b06 --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatMemberList.vue @@ -0,0 +1,154 @@ + + + 成员列表 + + {{ member.memberName }} + + + + + diff --git a/src/views/newMap/displayNew/chatView/chatSetting.vue b/src/views/newMap/displayNew/chatView/chatSetting.vue new file mode 100644 index 000000000..26e59ac5b --- /dev/null +++ b/src/views/newMap/displayNew/chatView/chatSetting.vue @@ -0,0 +1,126 @@ + + + + 设置 + + + + + + + 语言: + + + + 性别: + + + + + + + + diff --git a/src/views/newMap/displayNew/designIndex.vue b/src/views/newMap/displayNew/designIndex.vue index 5ccf32337..7fb6a0f28 100644 --- a/src/views/newMap/displayNew/designIndex.vue +++ b/src/views/newMap/displayNew/designIndex.vue @@ -5,8 +5,6 @@ - - - - - @@ -54,9 +49,7 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/index'; import MenuDemon from '@/views/newMap/displayNew/menuDemon'; import MenuSchema from '@/views/newMap/displayNew/menuSchema'; import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime'; -import MenuScript from '@/views/newMap/displayNew/menuScript'; import AddQuest from './demon/addQuest'; -import Scheduling from './demon/scheduling'; import { mapGetters } from 'vuex'; import { setGoodsTryUse } from '@/api/management/goods'; import { clearSimulation, getSimulationInfoNew } from '@/api/simulation'; @@ -80,12 +73,10 @@ export default { AddQuest, MapSystemDraft, MenuDemon, - MenuScript, MenuSchema, MenuSystemTime, - // Jl3dSimulation, - Jl3dDrive, - Scheduling + Jl3dDrive + // Scheduling }, props: { size: { @@ -119,8 +110,7 @@ export default { '04': '02', // 司机 => 行调 '05': '' // 派班 => null }, - isDrive: this.prdType == '04', - isShowScheduling: this.prdType == '05' + isDrive: this.prdType == '04' }; }, computed: { @@ -146,9 +136,6 @@ export default { right() { return this.$store.state.config.width / 2 - 55; }, - trainingId() { - return this.$route.query.trainingId; - }, mapId() { return this.$route.query.mapId; }, @@ -156,24 +143,12 @@ export default { // return this.$route.query.prdType; return this.$store.state.training.prdType; }, - skinCode() { - return this.$route.query.skinCode; - }, - isLesson() { - return this.mode === 'teach' || this.mode === 'manage'; - }, isDemon() { return this.mode === 'demon'; - }, - isScript() { - return this.mode === 'script'; } // isDrive() { // return this.prdType == '04'; // }, - // isShowScheduling() { - // return this.prdType == '05'; - // } }, watch: { '$store.state.config.menuBarLoadedCount': function (val) { @@ -183,19 +158,12 @@ export default { this.mapBoxP = document.getElementById(this.canvasId).children[0]; this.mapBoxP.style.cursor = ''; }, - '$store.state.training.prdType': function(val) { - // this.prdType=val; - this.isDrive = (val == '04'); - this.isShowScheduling = (val == '05'); - }, - '$store.state.socket.permissionOver': function () { - this.$alert('用户权限已被收回', '提示', { - confirmButtonText: '确定', - callback: action => { - this.back(); - } - }); - }, + // '$store.state.training.prdType': function(val) { + // debugger; + // // this.prdType=val; + // this.isDrive = (val == '04'); + // this.isShowScheduling = (val == '05'); + // }, '$store.state.app.windowSizeCount': function() { this.setWindowSize(); }, @@ -322,8 +290,6 @@ export default { await this.loadSimulationInfo(); if (this.isDemon) { await this.initLoadDemonData(); - } else if (this.isScript) { - await this.initLoadTaskData(); } this.checkLoginLineTimer(); this.checkMouseStatusTimer(); @@ -344,18 +310,6 @@ export default { this.endViewLoading(); } }, - // 任务录制系统 - async initLoadTaskData() { - this.$store.dispatch('training/end', TrainingMode.NORMAL); - this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式 - this.switchMode('01'); - - if (this.group) { - await this.loadNewMapDataByGroup(this.group); - } else { - this.endViewLoading(); - } - }, // 加载剧本 async runQuestLoadShow() { this.$refs.addQuest.doShow(); @@ -435,12 +389,8 @@ export default { }, // 仿真错误时,被动退出时调用 async back() { - if (this.isLesson) { - await this.$refs.lessonMenu.back(); - } else if (this.isDemon) { + if (this.isDemon) { await this.$refs.menuDemon.back(); - } else if (this.isScript) { - await this.$refs.menuScript.back(); } }, // 设置使用时间 @@ -491,9 +441,7 @@ export default { this.$nextTick(() => { const width = this.size ? this.size.width : this.width; const height = this.size ? this.size.height : this.height; - this.$store.dispatch('config/resize', { width, height }); - this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); }); } diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index 2220e3349..bac94f7e6 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -1,5 +1,6 @@ + {{ $t('display.demon.trialTime') }} {{ countTime }} @@ -32,6 +33,7 @@