From ba3104d9e9ce7be6ccb70055d44c04af5e52395a Mon Sep 17 00:00:00 2001 From: lVAL Date: Fri, 16 Oct 2020 14:47:14 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=B9=B3=E7=A7=BB?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=20=E5=8F=AF=E4=BB=A5tips?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/planMonitor/editToolAUS/monitor.js | 46 ++++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/src/views/planMonitor/editToolAUS/monitor.js b/src/views/planMonitor/editToolAUS/monitor.js index d5c5be27b..fd09dc86d 100644 --- a/src/views/planMonitor/editToolAUS/monitor.js +++ b/src/views/planMonitor/editToolAUS/monitor.js @@ -78,7 +78,7 @@ export default { zr.on('click', this.onClick, this) this.myChart.on('mousedown', this.onMouseDown); this.myChart.on('mouseover', this.onMouseOver); - this.myChart.on('mouseout', this.onMouseOver); + this.myChart.on('mouseout', this.onMouseOut); this.myChart.on('mouseup', this.onMouseUP); this.myChart.on('datazoom', this.onUpdatePosition); window.addEventListener('resize', this.onUpdatePosition); @@ -91,7 +91,7 @@ export default { zr.off('click', this.onClick); this.myChart.off('mousedown', this.onMouseDown); this.myChart.off('mouseover', this.onMouseOver); - this.myChart.off('mouseout', this.onMouseOver); + this.myChart.off('mouseout', this.onMouseOut); this.myChart.off('mouseup', this.onMouseUP); this.myChart.off('datazoom', this.onUpdatePosition); window.removeEventListener('resize', this.onUpdatePosition); @@ -122,6 +122,19 @@ export default { }, onMouseOver(e) { this.pixelExecCb(e, this.handleSelectLine); + if (this.action == 'Translate') { + setTimeout(() => { + this.onShapeMouseOver(e); + }, 200); + } + }, + onMouseOut(e) { + this.pixelExecCb(e, this.handleSelectLine); + if (this.action == 'Translate') { + setTimeout(() => { + this.onShapeMouseOver(e); + }, 200); + } }, onMouseUP(e) { switch(this.action) { @@ -136,14 +149,25 @@ export default { onShapePointDragging(e) { if (this.selected) { this.dragging = true; - + this.pixelExecCb(e, this.handleDragging); + } + }, + onShapeMouseOver() { + if (this.selected) { + this.myChart.dispatchAction({ + type: 'showTip', + seriesIndex: this.selected.seriesIndex, + dataIndex: this.selected.dataIndex + }); + } + }, + onShapeMouseOut() { + if (this.selected) { this.myChart.dispatchAction({ type: 'showTip', seriesIndex: this.selected.seriesIndex, dataIndex: this.selected.dataIndex }); - - this.pixelExecCb(e, this.handleDragging); } }, setLineLight() { @@ -193,11 +217,11 @@ export default { cy: 0, r: 10 }, - style: { - fill: 'rgba(0,0,0,0.0)' - }, + invisible: true, draggable: 'horizontal', ondrag: echarts.util.curry(this.onShapePointDragging), + onmouseover: echarts.util.curry(this.onShapeMouseOver), + onmouseout: echarts.util.curry(this.onShapeMouseOut), z: 100 } }, @@ -301,6 +325,12 @@ export default { option.graphic[0].elements = filters; this.myChart.setOption(option, {notMerge: true}); + + this.myChart.dispatchAction({ + type: 'showTip', + seriesIndex: this.selected.seriesIndex, + dataIndex: this.selected.dataIndex + }); }, handleCreateMark({pointInPixel, yObj, xVal}) { const myChart = this.myChart; From 15f6a3a9b69ba8575217da794abdc32a3027e21c Mon Sep 17 00:00:00 2001 From: lVAL Date: Fri, 16 Oct 2020 14:54:55 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/planMonitor/editToolAUS/monitor.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/views/planMonitor/editToolAUS/monitor.js b/src/views/planMonitor/editToolAUS/monitor.js index fd09dc86d..2362ac93f 100644 --- a/src/views/planMonitor/editToolAUS/monitor.js +++ b/src/views/planMonitor/editToolAUS/monitor.js @@ -131,9 +131,7 @@ export default { onMouseOut(e) { this.pixelExecCb(e, this.handleSelectLine); if (this.action == 'Translate') { - setTimeout(() => { - this.onShapeMouseOver(e); - }, 200); + this.onShapeMouseOver(e); } }, onMouseUP(e) { @@ -164,9 +162,7 @@ export default { onShapeMouseOut() { if (this.selected) { this.myChart.dispatchAction({ - type: 'showTip', - seriesIndex: this.selected.seriesIndex, - dataIndex: this.selected.dataIndex + type: 'hideTip', }); } }, From eb9778e4f830a81975f43e9c563fe85ee4b95409 Mon Sep 17 00:00:00 2001 From: lVAL Date: Fri, 16 Oct 2020 15:08:41 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BC=98=E5=8C=96AUS=20=E5=B9=B3=E7=A7=BB?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/planMonitor/editToolAUS/monitor.js | 34 +++++++++++++------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/views/planMonitor/editToolAUS/monitor.js b/src/views/planMonitor/editToolAUS/monitor.js index 2362ac93f..53fe54b6a 100644 --- a/src/views/planMonitor/editToolAUS/monitor.js +++ b/src/views/planMonitor/editToolAUS/monitor.js @@ -75,7 +75,8 @@ export default { if (this.myChart) { const zr = this.myChart.getZr(); - zr.on('click', this.onClick, this) + zr.on('mousedown', this.onZrMouseDown, this); + zr.on('mouseup', this.onZrMouseUp, this); this.myChart.on('mousedown', this.onMouseDown); this.myChart.on('mouseover', this.onMouseOver); this.myChart.on('mouseout', this.onMouseOut); @@ -88,7 +89,8 @@ export default { if (this.myChart) { const zr = this.myChart.getZr(); - zr.off('click', this.onClick); + zr.off('mousedown', this.onZrMouseDown); + zr.off('mouseup', this.onZrMouseUp, this); this.myChart.off('mousedown', this.onMouseDown); this.myChart.off('mouseover', this.onMouseOver); this.myChart.off('mouseout', this.onMouseOut); @@ -106,13 +108,23 @@ export default { }) this.myChart.setOption({graphic}); }, - onClick(e) { + onZrMouseDown(e) { switch(this.action) { case 'Add': this.pixelExecCb(e, this.handleCreateMark); break; } }, + onZrMouseUp(e) { + switch(this.action) { + case 'Translate': + if (this.dragging) { + this.dragging = false; + this.handleTranslate(this.createModel) + } + break; + } + }, onMouseDown(e) { switch(this.action) { case 'Edit': @@ -135,14 +147,14 @@ export default { } }, onMouseUP(e) { - switch(this.action) { - case 'Translate': - if (this.dragging) { - this.dragging = false; - this.handleTranslate(this.createModel) - } - break; - } + // switch(this.action) { + // case 'Translate': + // if (this.dragging) { + // this.dragging = false; + // this.handleTranslate(this.createModel) + // } + // break; + // } }, onShapePointDragging(e) { if (this.selected) { From 7d7240e5110ae1cd7c8ebf0d8cdeb21f99ee53c3 Mon Sep 17 00:00:00 2001 From: lVAL Date: Fri, 16 Oct 2020 15:40:04 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/planMonitor/editToolAUS/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/planMonitor/editToolAUS/index.vue b/src/views/planMonitor/editToolAUS/index.vue index c4f5b36e5..db61693ed 100644 --- a/src/views/planMonitor/editToolAUS/index.vue +++ b/src/views/planMonitor/editToolAUS/index.vue @@ -34,7 +34,12 @@ export default { } }, created() { - this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode); + document.title = '运行图编辑工具' + this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode); + // const project = getSessionStorage('project'); + // if (project) { + // document.querySelector("link[rel*='icon']").href =; + // } }, methods: { setPosition() { From ed46bb20a6d76f51c25457e9ca167a7ca9e0594f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 16 Oct 2020 17:28:06 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E5=AE=9E=E6=93=8D?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/displayNew/dispatherContest/index.vue | 6 ++---- .../displayNew/dispatherContest/sceneList.vue | 8 +++----- .../displayNew/dispatherContest/testResult.vue | 15 ++++++--------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/views/newMap/displayNew/dispatherContest/index.vue b/src/views/newMap/displayNew/dispatherContest/index.vue index da24e692f..c156b3d0c 100644 --- a/src/views/newMap/displayNew/dispatherContest/index.vue +++ b/src/views/newMap/displayNew/dispatherContest/index.vue @@ -170,7 +170,6 @@ export default { scriptMode: ScriptMode.TEACH, mapLocation:{}, playerList:[], - actionList:[], currentPlayList:[], // formatUsedTime:'', formatScore:0, @@ -454,12 +453,11 @@ export default { // this.$refs.menuScript.initLoadPage(); // } }, - selectScript({playerList, mapLocation, actionList}) { + selectScript({playerList, mapLocation}) { this.changeScriptMode(this.scriptMode); this.isScriptLoad = true; this.playerList = playerList; this.mapLocation = mapLocation; - this.actionList = actionList; this.userRole = 'AUDIENCE'; this.$store.dispatch('training/setRoles', 'AUDIENCE'); }, @@ -474,7 +472,7 @@ export default { this.showResultData(data); }, showResultData(data) { - this.$refs.testResult.doShow({data:data, actionList:this.actionList}); + this.$refs.testResult.doShow({data:data}); }, endTraining() { competitionPracticalSceneFinish(this.group, {operationStatisticVO:{}}).then(res=>{ diff --git a/src/views/newMap/displayNew/dispatherContest/sceneList.vue b/src/views/newMap/displayNew/dispatherContest/sceneList.vue index cb195b5ca..ca01dc10f 100644 --- a/src/views/newMap/displayNew/dispatherContest/sceneList.vue +++ b/src/views/newMap/displayNew/dispatherContest/sceneList.vue @@ -120,7 +120,6 @@ export default { const playerList = []; EventBus.$emit('clearRunSeries'); EventBus.$emit('loadScene'); - const actionList = {}; if (res.data.memberList && res.data.memberList.length > 0) { this.form.type = ''; res.data.memberList.sort((a, b) => { @@ -129,7 +128,6 @@ export default { this.$store.dispatch('training/setMemberList', {memberList:res.data.memberList, userId:this.$store.state.user.id}); const activeMemberList = []; res.data.actionList.forEach((activeMember)=>{ - actionList[activeMember.id] = activeMember; if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) { activeMemberList.push(activeMember.memberId); } @@ -179,14 +177,14 @@ export default { if (res.data.mapLocation) { this.mapLocation = res.data.mapLocation; } - this.confirm(playerList, actionList); + this.confirm(playerList); } } }, - confirm(playerList, actionList) { + confirm(playerList) { // this.$store.dispatch('training/setScriptOperationType', this.operationType); // operationType:ScriptMode[this.operationType] - this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation, actionList:actionList}); + this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation}); this.doClose(); }, objectSpanMethod({ row, column, rowIndex, columnIndex }) { diff --git a/src/views/newMap/displayNew/dispatherContest/testResult.vue b/src/views/newMap/displayNew/dispatherContest/testResult.vue index 915ac66cf..de73f1d6e 100644 --- a/src/views/newMap/displayNew/dispatherContest/testResult.vue +++ b/src/views/newMap/displayNew/dispatherContest/testResult.vue @@ -20,7 +20,7 @@ @@ -110,7 +110,7 @@ export default { completed:false, // 竞赛是否已完成 fullScore:'', // 总分 userScore:'', // 用户得分 - actionList:[], // 动作列表 + // actionList:[], // 动作列表 fullScoreOfCommand:0, // 指令发布部分总分 userScoreOfCommand:0, // 关键步骤部分用户得分 fullScoreOfOperationStatistic:0, // 运营统计满分 @@ -120,7 +120,7 @@ export default { }; }, methods:{ - doShow({data, actionList}) { + doShow({data}) { this.dialogShow = true; this.completed = data.completed; this.operationStaticItemVOs = data.operationStatisticVO.itemVOS; @@ -128,7 +128,7 @@ export default { this.finalStopInSectionStatistics = data.operationIndexStatisticVO.finalStopInSectionStatistics; this.finalStoppedRunningStatistics = data.operationIndexStatisticVO.finalStoppedRunningStatistics; this.commandPublishStatisticVO = data.commandPublishStatisticVO; - this.actionList = actionList; + // this.actionList = actionList; this.fullScore = data.fullScore; this.userScore = data.userScore; this.fullScoreOfCommand = data.fullScoreOfCommand; @@ -142,12 +142,9 @@ export default { this.dialogShow = false; }, covertTime(time) { - return time.slice(0, time.length - 3); + return time ? time.slice(0, time.length - 3) : ''; }, - covert(actionId) { - // return actionId; - const element = this.actionList[actionId]; - // this.$store.state.training.memberData[memberId] + covert(element) { const member = this.$store.state.training.memberData[element.memberId]; let resultData = ''; if (element.type == 'Accept_Conversation_Invitation') { From cbb43ad06ae74dedac524a9e762f83e13f68cf49 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 16 Oct 2020 17:38:03 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E5=AE=9E=E6=93=8D?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/displayNew/dispatherContest/testResult.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/newMap/displayNew/dispatherContest/testResult.vue b/src/views/newMap/displayNew/dispatherContest/testResult.vue index de73f1d6e..b06458e7a 100644 --- a/src/views/newMap/displayNew/dispatherContest/testResult.vue +++ b/src/views/newMap/displayNew/dispatherContest/testResult.vue @@ -64,6 +64,11 @@
若竞赛未完成,运营指标不得分
+
停运列车信息
+ + + +
晚点列车信息
@@ -84,11 +89,6 @@ -
停运列车信息
- - - - {{ $t('global.confirm') }} From 4330fa46b3f023701991858541f49548bedc3cd9 Mon Sep 17 00:00:00 2001 From: lVAL Date: Fri, 16 Oct 2020 17:41:20 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=81=9C=E7=AB=99?= =?UTF-8?q?=E6=97=B6=E9=97=B4=EF=BC=8C=E4=BB=A5=E5=8F=8A=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/ConstDic.js | 2 +- .../editToolAUS/dialog/planJustRunning.vue | 43 ++++++++++++++++--- .../editToolAUS/dialog/planJustStop.vue | 31 +++++++++++-- src/views/planMonitor/editToolAUS/monitor.js | 8 ++-- .../planMonitor/editToolAUS/schedule.vue | 4 +- 5 files changed, 71 insertions(+), 17 deletions(-) diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 2157159e1..5b67c4e7d 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -130,7 +130,7 @@ export const DeviceMenu = { IscsSystem: '108', IscsInterface: '109', - planJustArrival: '200', + planJustRunning: '200', planJustDeparture: '201' }; diff --git a/src/views/planMonitor/editToolAUS/dialog/planJustRunning.vue b/src/views/planMonitor/editToolAUS/dialog/planJustRunning.vue index 57b9473d0..36f1dc765 100644 --- a/src/views/planMonitor/editToolAUS/dialog/planJustRunning.vue +++ b/src/views/planMonitor/editToolAUS/dialog/planJustRunning.vue @@ -2,7 +2,7 @@ - + s @@ -23,22 +23,53 @@ export default { default() { return null } + }, + stations: { + type: Array, + default() { + return [] + } } }, data() { + var validator = (rule, value, callback) => { + const stations = this.stations; + const offset = Math.abs( + this.stations[this.selected.dataIndex].kmRange - + this.stations[this.selected.dataIndex+1].kmRange + ) + const min = Math.floor(offset / 19.4); + const max = Math.floor(offset / 8.3); + + if (value < min) { + callback(new Error('Below minimum run time.')); + } else if (value > max) { + callback(new Error('Run time above maximum.')); + } else { + callback() + } + } + return { dialogShow: false, formModel: { time: 0, }, rules: { - time: { required: true, message: 'Please select the arrival time.', trigger: 'change' }, + time: [ + { + type: 'number', min: 0, message: 'Please select the arrival time.', trigger: 'blur' + }, + { + validator: validator, trigger: 'blur' + } + ], } }; }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.planJustArrival)) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.planJustRunning)) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -57,8 +88,10 @@ export default { }, doConfirm() { this.$refs.form.validate((valid) => { - this.$emit('justRunning', this.formModel.time); - this.doClose(); + if(valid) { + this.$emit('justRunning', this.formModel.time); + this.doClose(); + } }); } } diff --git a/src/views/planMonitor/editToolAUS/dialog/planJustStop.vue b/src/views/planMonitor/editToolAUS/dialog/planJustStop.vue index 154ad05ca..113ac4536 100644 --- a/src/views/planMonitor/editToolAUS/dialog/planJustStop.vue +++ b/src/views/planMonitor/editToolAUS/dialog/planJustStop.vue @@ -2,7 +2,7 @@ - + s @@ -23,16 +23,37 @@ export default { default() { return null } + }, + stations: { + type: Array, + default() { + return [] + } } }, data() { + var validator = (rule, value, callback) => { + if (value > 0 && value <= 15) { + callback(new Error('Stop time cannot be within 0-15 seconds.')); + } else { + callback() + } + } + return { dialogShow: false, formModel: { time: 0 }, rules: { - time: { required: true, message: 'Please select the stop time.', trigger: 'change' }, + time: [ + { + type: 'number', min: 0, max: 12*3600, message: 'Please select the stop time.', trigger: 'blur' + }, + { + validator: validator, trigger: 'blur' + } + ], } }; }, @@ -57,8 +78,10 @@ export default { }, doConfirm() { this.$refs.form.validate((valid) => { - this.$emit('justStop', this.formModel.time); - this.doClose(); + if(valid) { + this.$emit('justStop', this.formModel.time); + this.doClose(); + } }); } } diff --git a/src/views/planMonitor/editToolAUS/monitor.js b/src/views/planMonitor/editToolAUS/monitor.js index 53fe54b6a..5d12dd684 100644 --- a/src/views/planMonitor/editToolAUS/monitor.js +++ b/src/views/planMonitor/editToolAUS/monitor.js @@ -278,12 +278,10 @@ export default { time: 0 } - if (e.dataIndex == length - 1 || - e.dataIndex < length - 1 && value[1] == nxt[1]) { + if (e.dataIndex < length - 1 && value[2] == nxt[2]) { this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustDeparture }); - } else if (e.dataIndex == 0 || - e.dataIndex > 0 && value[1] == pre[1]) { - this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustArrival }); + } else if (e.dataIndex == 0 || e.dataIndex > 0 && value[1] == pre[1]) { + this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustRunning }); } } }, diff --git a/src/views/planMonitor/editToolAUS/schedule.vue b/src/views/planMonitor/editToolAUS/schedule.vue index 8b46b272f..6e822f0c9 100644 --- a/src/views/planMonitor/editToolAUS/schedule.vue +++ b/src/views/planMonitor/editToolAUS/schedule.vue @@ -19,8 +19,8 @@
- - + +