diff --git a/src/api/simulation.js b/src/api/simulation.js index c8abdd7a5..182cd0daa 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -552,3 +552,10 @@ export function getGroupByMapAndFunction(mapId, functionId) { method: 'get' }); } +/** 由系统管理员和教员销毁仿真 */ +export function destroySimulationByAdmin(group) { + return request({ + url: `/simulation/${group}/destroy`, + method: 'post' + }); +} diff --git a/src/store/modules/trainingNew.js b/src/store/modules/trainingNew.js index e4489abff..b86bf4ca9 100644 --- a/src/store/modules/trainingNew.js +++ b/src/store/modules/trainingNew.js @@ -122,11 +122,16 @@ const training = { store.dispatch('training/setOperate', operate); commit('setTrainingOperate', operate); return new Promise((resolve, reject) => { - NewHandler.handle(operate).then(rtn => { - resolve(rtn); - }).catch(e => { - reject(e); - }); + if (!store.state.training.roles) { + reject({message: '您目前无仿真成员角色!'}); + } else { + NewHandler.handle(operate).then(rtn => { + resolve(rtn); + }).catch(e => { + reject(e); + }); + } + }); }, setOperateErrMsg: ({ commit }, msg) => { diff --git a/src/views/newMap/display/memberManage/membersManage.vue b/src/views/newMap/display/memberManage/membersManage.vue index a2078a47e..a65dbf286 100644 --- a/src/views/newMap/display/memberManage/membersManage.vue +++ b/src/views/newMap/display/memberManage/membersManage.vue @@ -27,7 +27,7 @@ {{ data.labelName }} - +
- -
-
{{ `x${speed}` }}
-
-
-
{{ each.label }}
+
+ {{ time }} + {{ dateString }} +
+
+ +
+
{{ `x${speed}` }}
+
+
+
{{ each.label }}
+
-
-
-
{{ nowMode }}
+
+
{{ nowMode }}
+
@@ -18,6 +24,7 @@ import { simulationPause, simulationStart, timesSpeedPlayback } from '@/api/rtSimulation'; import { OperateMode } from '@/scripts/ConstDic'; import { getSessionStorage } from '@/utils/auth'; +import { timestampFormat } from '@/utils/date'; export default { name:'SimulationControl', data() { @@ -26,7 +33,9 @@ export default { group:'', speed: 1, isShowSpeedMenuList: false, - isShowModeMenuList: false + isShowModeMenuList: false, + time: '', + dateString: '' }; }, computed: { @@ -69,6 +78,11 @@ export default { } } }, + watch: { + '$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新 + this.initDate(time); + } + }, mounted() { this.group = this.$route.query.group; window.addEventListener('click', this.close, false); @@ -77,6 +91,10 @@ export default { window.removeEventListener('click', this.close); }, methods:{ + initDate(date) { + this.time = timestampFormat('HH:mm:ss', date); + this.dateString = timestampFormat('YYYYMMDD', date); + }, changeOperateMode() { let val = ''; if (this.nowMode === '正常操作') { @@ -132,11 +150,14 @@ export default { position: absolute; bottom: 9px; right: 78px; - display: flex; padding: 2px 5px; border-radius: 5px; align-items: center; background: #ccc; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; } .controlButton{ font-size: 22px; diff --git a/src/views/newMap/display/simulationMenu/setTime.vue b/src/views/newMap/display/simulationMenu/setTime.vue index 663c604c7..52ea3e3a7 100644 --- a/src/views/newMap/display/simulationMenu/setTime.vue +++ b/src/views/newMap/display/simulationMenu/setTime.vue @@ -47,8 +47,7 @@ export default { }, methods: { doShow() { - console.log(this.$store.state.training.initTime); - this.formModel.initTime = new Date(this.$store.state.training.initTime || null); + this.formModel.initTime = new Date(this.$store.state.socket.simulationTimeSync || null); this.show = true; }, doClose() { diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue index b19d45487..b24288bd2 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -112,7 +112,7 @@ export default { return this.$store.state.training.roleDeviceCode; }, menuShow() { - return !this.$route.query.singleClient; + return !this.$route.query.singleClient || !this.$store.state.training.roles; } }, watch: { @@ -134,6 +134,8 @@ export default { this.setCentralizedStationList(map); // 获取集中站列表 if (this.$route.query.client) { this.pictureChange(this.$route.query.client); + } else if (!this.$store.state.training.roles) { + this.pictureChange('dispatchWork'); } } } catch (error) { diff --git a/src/views/newMap/display/terminals/terminalMenu.vue b/src/views/newMap/display/terminals/terminalMenu.vue index 2290a9b7c..dc59870d8 100644 --- a/src/views/newMap/display/terminals/terminalMenu.vue +++ b/src/views/newMap/display/terminals/terminalMenu.vue @@ -185,8 +185,8 @@ export default { if (trainingDetail && trainingDetail.client) { this.changePictureShow(trainingDetail.client); } else { - this.isFirst = false; this.initPictureShow(); + this.isFirst = false; } } }, diff --git a/src/views/newMap/display/trainingDesign/editOperate.vue b/src/views/newMap/display/trainingDesign/editOperate.vue index 3ab5a7a85..769d4ecb4 100644 --- a/src/views/newMap/display/trainingDesign/editOperate.vue +++ b/src/views/newMap/display/trainingDesign/editOperate.vue @@ -116,6 +116,7 @@ export default { console.log(tipPosition, this.trainingType, '-------'); this.$emit('backDesignPane'); this.tagIndex = 0; + this.editMode = false; }, covertString(data) { if (data.userOperationType) { diff --git a/src/views/newMap/display/voiceChatBox/index.vue b/src/views/newMap/display/voiceChatBox/index.vue index a3bc34dd0..9e213ee24 100644 --- a/src/views/newMap/display/voiceChatBox/index.vue +++ b/src/views/newMap/display/voiceChatBox/index.vue @@ -890,6 +890,7 @@ export default { this.getUserRole(); } this.commonMessageList = messages.sort(this.sortByMessageTime); + this.messageList = [...this.commonMessageList]; this.initCommonMemberList(); }); }, @@ -994,15 +995,15 @@ export default { this.filterNode(); }); }, - clearAllData() { - this.recordSending = false; - this.inter = null; - this.recorders = null; - this.microphone = null; - this.treeData = []; - this.conversitionMemberList = []; - this.messageList = []; - }, + // clearAllData() { + // this.recordSending = false; + // this.inter = null; + // this.recorders = null; + // this.microphone = null; + // this.treeData = []; + // this.conversitionMemberList = []; + // this.messageList = []; + // }, // 剧本重置清空公有会话 resetCoversition() { this.commonMessageList = []; diff --git a/src/views/organization/trainingManage/index.vue b/src/views/organization/trainingManage/index.vue index 7a3bb2c8a..d2dfd1b02 100644 --- a/src/views/organization/trainingManage/index.vue +++ b/src/views/organization/trainingManage/index.vue @@ -81,6 +81,7 @@ export default { { type: 'button', title: this.$t('trainingManage.operate'), + hide: this.hasTeachingDataManage, width: '150', buttons: [ { diff --git a/src/views/planSchedule/schedule.vue b/src/views/planSchedule/schedule.vue index 80d377e43..ed1062c25 100644 --- a/src/views/planSchedule/schedule.vue +++ b/src/views/planSchedule/schedule.vue @@ -193,7 +193,6 @@ export default { let series = []; const stations = this.$store.state.runPlan.stations; const planData = this.$store.state.runPlan.planData; - console.log(stations, planData, '-----------'); this.kmRangeMap = this.PlanParser.convertStationsToMap(stations); if (this.$route.query.lineCode === '07') { series = this.pushModels(series, [this.PlanParser.initializeAxisX(stations)]); diff --git a/src/views/system/existingSimulation/index.vue b/src/views/system/existingSimulation/index.vue index 86bdc1ed4..57776f70f 100644 --- a/src/views/system/existingSimulation/index.vue +++ b/src/views/system/existingSimulation/index.vue @@ -5,11 +5,9 @@