diff --git a/package.json b/package.json index be972b538..8c4db5cec 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@stomp/stompjs": "^5.4.4", "axios": "^0.18.0", "dayjs": "^1.11.5", "echarts": "^4.7.0", @@ -46,6 +47,7 @@ "vuedraggable": "^2.24.3", "vuex": "^3.1.0", "wangeditor": "^4.6.17", + "ws": "^8.13.0", "xlsx": "^0.14.2", "zrender": "^4.0.4" }, diff --git a/src/App.vue b/src/App.vue index 1bc2274ca..82e28f4bf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ + diff --git a/src/views/newMap/display/simulationMenu/simulationMenu.vue b/src/views/newMap/display/simulationMenu/simulationMenu.vue index fdfd2bc95..52de8e999 100644 --- a/src/views/newMap/display/simulationMenu/simulationMenu.vue +++ b/src/views/newMap/display/simulationMenu/simulationMenu.vue @@ -17,11 +17,10 @@ - + - diff --git a/src/views/newMap/display/terminals/nccWork.vue b/src/views/newMap/display/terminals/nccWork.vue new file mode 100644 index 000000000..c216b9bce --- /dev/null +++ b/src/views/newMap/display/terminals/nccWork.vue @@ -0,0 +1,101 @@ + + + + + diff --git a/src/views/newMap/display/terminals/psl.vue b/src/views/newMap/display/terminals/psl.vue index ad7611c2f..fab5c6da9 100644 --- a/src/views/newMap/display/terminals/psl.vue +++ b/src/views/newMap/display/terminals/psl.vue @@ -131,7 +131,7 @@ export default { this.standCode = ''; this.standList = []; this.stationStandList.forEach(stand => { - if (stand.stationCode === stationCode) { + if (stand.stationCode === stationCode && !stand.small) { let dir = ''; if (this.$store.state.map.mapConfig.upRight) { dir = stand.right ? '上行' : '下行'; diff --git a/src/views/newMap/display/terminals/terminalMenu.vue b/src/views/newMap/display/terminals/terminalMenu.vue index 3992db29d..b8f1a471b 100644 --- a/src/views/newMap/display/terminals/terminalMenu.vue +++ b/src/views/newMap/display/terminals/terminalMenu.vue @@ -40,6 +40,20 @@ export default { isShow: () => this.$route.query.lineCode !== '14', click: this.changePictureShow }, + { + name: '线网监控', + code: 'nccWork', + roleList: ['NCC_DISPATCHER'], + isShow: () => this.$route.query.simType === 'METRO', + click: this.changePictureShow + }, + { + name: '线路监控', + code: 'lineMonitor', + roleList: ['NCC_DISPATCHER'], + isShow: () => this.$route.query.simType === 'METRO', + click: this.changePictureShow + }, { name: '行调台', code: 'dispatcherManage', @@ -106,7 +120,7 @@ export default { { name: '运行图预览', code: 'diagramPreview', - roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER'], + roleList: ['DISPATCHER', 'STATION_SUPERVISOR', 'DRIVER', 'NCC_DISPATCHER'], isShow: () => this.$route.query.simType === 'METRO', click: this.changePictureShow }, @@ -304,7 +318,10 @@ export default { this.changePictureShow('maintainerSelect'); } else if (this.roles === 'DRIVER') { // 司机模拟 - this.changePictureShow('driverAtsWork'); + const trainingDesign = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.trainingDesign : false; + this.changePictureShow(trainingDesign ? 'driverAtsWork' : 'drivingPlan'); + } else if (this.roles === 'NCC_DISPATCHER') { + this.changePictureShow('nccWork'); } }, changePictureShow(code) { diff --git a/src/views/newMap/display/thirdJump.vue b/src/views/newMap/display/thirdJump.vue index 2d4ff4757..b986038b3 100644 --- a/src/views/newMap/display/thirdJump.vue +++ b/src/views/newMap/display/thirdJump.vue @@ -27,6 +27,12 @@ export default { labels: this.$route.query.labels, third: true }; + if (this.$route.query.client) { + query.client = this.$route.query.client; + } + if (this.$route.query.singleClient) { + query.singleClient = this.$route.query.singleClient; + } this.$router.replace({ path: `/display/demon`, query: query }); launchFullscreen(); }).catch(error=>{ diff --git a/src/views/newMap/display/trainingList/testResult.vue b/src/views/newMap/display/trainingList/testResult.vue index ed0ab5539..edb0be58c 100644 --- a/src/views/newMap/display/trainingList/testResult.vue +++ b/src/views/newMap/display/trainingList/testResult.vue @@ -6,10 +6,25 @@ append-to-body :before-close="handleClose" > - + - - + + + + + + 确 定 @@ -33,27 +48,47 @@ export default { handleClose() { this.dialogVisible = false; }, - doShow(score) { + doShow(scoreList) { this.tableData = []; - const MyMemberId = this.$store.state.training.myMemberId; - this.scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId ); - console.log(this.scoringRuleList, this.$store.state.trainingNew.scoringRules); this.stepList = this.$store.state.trainingNew.stepList; - this.scoringRuleList && this.scoringRuleList.details.forEach(item => { - const desc = this.handleStepInfo(item.elementId); - const score = this.handleScore(item.elementId); - this.tableData.push({ desc: desc, score: score, totalScore: item.score }); - }); + if (scoreList && scoreList.length) { + scoreList.forEach(score => { + const step = this.stepList.find(step => step.id == score.stepId); + this.tableData.push({ ...score, desc: step.description }); + }); + } this.dialogVisible = true; }, - handleStepInfo(stepId) { - const stepInfo = this.stepList.find(step => stepId == step.id); - return stepInfo ? stepInfo.description : ''; - }, - handleScore(stepId) { - const rule = this.scoringRuleList.details.find(item => stepId == item.elementId); - const record = this.$store.state.trainingNew.stepRecord.find(item => stepId == item.stepId); - return record && record.success ? rule.score : 0; + getSummaries(param) { + const { columns, data } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '合计'; + return; + } else if (index === 1) { + const MyMemberId = this.$store.state.training.myMemberId; + const scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId ); + let total = 0; + if (scoringRuleList && scoringRuleList.details && scoringRuleList.details.length) { + scoringRuleList.details.forEach(item => { + total += item.score; + }); + } + sums[index] = total; + } else if (index === 2) { + const values = data.map(item => Number(item[column.property])); + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return prev + curr; + } else { + return prev; + } + }, 0); + } + }); + return sums; } } }; diff --git a/src/views/newMap/display/trainingList/trainingLeftSlider.vue b/src/views/newMap/display/trainingList/trainingLeftSlider.vue index ee14299c6..1b20ddced 100644 --- a/src/views/newMap/display/trainingList/trainingLeftSlider.vue +++ b/src/views/newMap/display/trainingList/trainingLeftSlider.vue @@ -8,8 +8,8 @@
- + diff --git a/src/views/newMap/newMapdraftSystem/mapoperate/arrow.vue b/src/views/newMap/newMapdraftSystem/mapoperate/arrow.vue deleted file mode 100644 index e0194f3d9..000000000 --- a/src/views/newMap/newMapdraftSystem/mapoperate/arrow.vue +++ /dev/null @@ -1,214 +0,0 @@ - - - - diff --git a/src/views/newMap/newMapdraftSystem/mapoperate/components/operateProperty.vue b/src/views/newMap/newMapdraftSystem/mapoperate/components/operateProperty.vue index c9fad141e..4bb4b58a4 100644 --- a/src/views/newMap/newMapdraftSystem/mapoperate/components/operateProperty.vue +++ b/src/views/newMap/newMapdraftSystem/mapoperate/components/operateProperty.vue @@ -59,7 +59,7 @@ export default { }, // 删除对象 deleteObj() { - const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code); + const selected = this.$store.getters['map/getNccDeviceByCode'](this.editModel.code); if (selected && this.isDeleteHide) { this.isDeleteHide = false; this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), { diff --git a/src/views/newMap/newMapdraftSystem/mapoperate/config/list.vue b/src/views/newMap/newMapdraftSystem/mapoperate/config/list.vue index 48f18b520..3cbf20a11 100644 --- a/src/views/newMap/newMapdraftSystem/mapoperate/config/list.vue +++ b/src/views/newMap/newMapdraftSystem/mapoperate/config/list.vue @@ -95,6 +95,11 @@ + diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue index ee421f9c1..16c407577 100644 --- a/src/views/trainingPlatform/demonList.vue +++ b/src/views/trainingPlatform/demonList.vue @@ -12,7 +12,6 @@ @@ -86,16 +85,27 @@ export default { }; diff --git a/src/views/trainingPlatform/index.vue b/src/views/trainingPlatform/index.vue index c97f9b701..e78d57208 100644 --- a/src/views/trainingPlatform/index.vue +++ b/src/views/trainingPlatform/index.vue @@ -62,5 +62,6 @@ export default { left:0; top:0; height: 100%; + background: #00172E; } diff --git a/src/views/trainingPlatform/simulation.vue b/src/views/trainingPlatform/simulation.vue index c5149acb6..3e1b94b3a 100644 --- a/src/views/trainingPlatform/simulation.vue +++ b/src/views/trainingPlatform/simulation.vue @@ -1,7 +1,7 @@