From 3b28f20cf3919dbfbfb6e66a1635bdb4aa3e00f7 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 26 Aug 2020 16:02:06 +0800 Subject: [PATCH 01/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=99=9A=E6=8B=9Fibp=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 3e40f178f..7fab4ae54 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -434,6 +434,7 @@ export default { } } else if (this.$route.query.projectDevice) { getLoginInfo(getToken()).then(res => { + this.$store.dispatch('SetProjecteDevice', res.data.deviceVO); getSimulationInfoNew(res.data.group).then(resp => { const query = { group: res.data.group, From 07e8ee25864d648a411f379bc6cc37322f01bddb Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 26 Aug 2020 17:09:55 +0800 Subject: [PATCH 02/53] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=99=9A=E6=8B=9Fibp=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 6 ------ src/views/login/index.vue | 1 - src/views/newMap/jointTrainingNew/index.vue | 4 ++-- .../newMap/jointTrainingNew/memberManage/membersManage.vue | 3 --- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 1ad306437..f5ca3dfd5 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -31,9 +31,6 @@ const user = { SET_NICKNAME: (state, nickname) => { state.nickname = nickname; }, - SET_PROJECTDEVICE: (state, projectDevice) => { - state.projectDevice = projectDevice; - }, SET_ROLES: (state, roles) => { state.roles = roles; }, @@ -110,9 +107,6 @@ const user = { }); }); }, - SetProjecteDevice({ commit }, deviceVo) { - commit('SET_PROJECTDEVICE', deviceVo); - }, // 获取用户信息 GetInfo({ commit }, token) { return new Promise((resolve, reject) => { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 7fab4ae54..3e40f178f 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -434,7 +434,6 @@ export default { } } else if (this.$route.query.projectDevice) { getLoginInfo(getToken()).then(res => { - this.$store.dispatch('SetProjecteDevice', res.data.deviceVO); getSimulationInfoNew(res.data.group).then(resp => { const query = { group: res.data.group, diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 7e76e1c03..0e8e68cc4 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -339,7 +339,7 @@ export default { this.$store.dispatch('training/setRoleDeviceCode', data.deviceCode); this.isAdmin = data.admin; - const deviceVO = this.$store.state.user.projectDevice; + const deviceVO = JSON.parse(getSessionStorage('projectDevice')); if (deviceVO && deviceVO.type === 'VR_IBP') { this.showIbp(this.deviceCode); const config = JSON.parse(deviceVO.config); @@ -405,7 +405,6 @@ export default { case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); - this.hideIbp(); if (this.lineCode === '06' && deviceCode) { this.$refs.menuSchema.chiShowStation = deviceCode; this.mapViewLoadedOver && this.switchStationMode(deviceCode); @@ -499,6 +498,7 @@ export default { window.open(routeData.href, '_blank', 'noopener noreferrer'); }, showdriving() { + console.log('***************'); this.panelShow = true; this.drivingShow = false; this.ibpShow = false; diff --git a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue index 89ecdbce3..c487ce492 100644 --- a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue +++ b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue @@ -131,9 +131,6 @@ export default { }, username() { return this.$store.state.user.nickname; - }, - projectDevice() { - return this.$store.state.user.projectDevice; } }, watch: { From d5a4d58fe6664658a520cf4fad7b92690582c6db Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 26 Aug 2020 17:27:02 +0800 Subject: [PATCH 03/53] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=8C=89demoButton=E5=B1=82=E7=BA=A7?= =?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/ibp/ibpsystem/index.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue index 18e6f3f7f..1d1a98e5c 100644 --- a/src/views/ibp/ibpsystem/index.vue +++ b/src/views/ibp/ibpsystem/index.vue @@ -268,7 +268,10 @@ export default { float: right; right: 20px; bottom: 15px; + z-index: 38; } .ibp-canvas{ + position: absolute; + z-index: 37; } From 22099d841cb0898757cc495a96aa522f3a694153 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 26 Aug 2020 17:43:34 +0800 Subject: [PATCH 04/53] =?UTF-8?q?=E8=B0=83=E6=95=B4ibp=E7=9B=98=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/jointTrainingNew/index.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 0e8e68cc4..6884aaa69 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -341,9 +341,9 @@ export default { const deviceVO = JSON.parse(getSessionStorage('projectDevice')); if (deviceVO && deviceVO.type === 'VR_IBP') { - this.showIbp(this.deviceCode); const config = JSON.parse(deviceVO.config); this.ibpPart = config.part.toLowerCase(); + this.showIbp(this.deviceCode); } else { this.hideIbp(); } @@ -498,7 +498,6 @@ export default { window.open(routeData.href, '_blank', 'noopener noreferrer'); }, showdriving() { - console.log('***************'); this.panelShow = true; this.drivingShow = false; this.ibpShow = false; From 716e7c21179da096498330d79f68aedea64e5e65 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 1 Sep 2020 11:20:53 +0800 Subject: [PATCH 05/53] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=9A=E8=AF=9D?= =?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/newMap/chatView/chatBox.vue | 4 +- src/views/newMap/chatView/chatContent.vue | 82 +++++++++---------- src/views/newMap/displayNew/demonChat.vue | 52 +++++++----- .../jointTrainingNew/chatView/chatBox.vue | 28 ++++++- 4 files changed, 97 insertions(+), 69 deletions(-) diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index 2ebc567cb..d0f1a3948 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -247,7 +247,6 @@ export default { const that = this; this.recorders.stopRecording(function(blobURL) { const data = URL.createObjectURL(that.recorders.getBlob()); - console.log('--------', data); clearInterval(that.inter); that.seconds = 0; const blob = that.recorders.getBlob(); @@ -307,6 +306,9 @@ export default { }, inviteMember() { this.$refs.chatToolTip.doShow(); + }, + addAudioList(data) { + this.$refs.chatContent.addAudioList(data); } } }; diff --git a/src/views/newMap/chatView/chatContent.vue b/src/views/newMap/chatView/chatContent.vue index 3938b7cb7..df9b5d61e 100644 --- a/src/views/newMap/chatView/chatContent.vue +++ b/src/views/newMap/chatView/chatContent.vue @@ -30,12 +30,20 @@ export default { }, data() { return { - // currentAudioList:[], - // currentAudioIndex:0, - // isPlay:false, + currentAudioList:[], + currentAudioIndex:0, + isPlay:false, + isAutoPlay: false, baseUrl:process.env.VUE_APP_VOICE_API + 'audio/' }; }, + watch: { + 'currentAudioList': function(val) { + if (val.length > 0 && !this.isPlay && !this.isAutoPlay) { + this.playEachAudio(val[0].src); + } + } + }, mounted() { // this.coversition = this.currentCoversition; // this.inintData(); @@ -47,50 +55,36 @@ export default { document.querySelector('.chatcontentIn').scrollTop = scrollTop; }); }, - // playEachAudio(audioUrl) { - // this.$nextTick(function() { - // document.querySelector('#audioPlay').src = audioUrl; - // document.querySelector('#audioPlay').play(); - // const that = this; - // document.querySelector('#audioPlay').onended = function() { - // that.currentAudioList.shift(); - // console.log(that.currentAudioList.length); - // if (that.currentAudioList.length > 0) { - // that.playEachAudio(that.currentAudioList[that.currentAudioIndex]); - // } else { - // that.isPlay = false; - // } - // }; - // }); - // }, - // covertName(data, status) { - // if (status) { - // let result = ''; - // const members = data.members || this.conversitionMemberList; - // (members || []).forEach(member => { - // if (member.memberId != data.memberId) { - // result += ('@' + this.covertEachName(member.memberId)); - // } - // }); - // return result; - // } else { - // return this.covertEachName(data.memberId); - // } - // }, - // covertEachName(memberId) { - // let name = ''; - // const member = this.$store.state.training.memberData[memberId]; - // if (member && member.userId) { - // const user = this.simulationUsers[member.userId]; - // name = member.label + '(' + user.nickName + ')'; - // } else if (member) { - // name = member.label; - // } - // return name; - // }, + + playEachAudio(audioUrl) { + this.$nextTick(function() { + this.isAutoPlay = true; + document.querySelector('#audioPlay').src = this.baseUrl + audioUrl; + document.querySelector('#audioPlay').play(); + const that = this; + document.querySelector('#audioPlay').onended = function() { + that.currentAudioList.shift(); + if (that.currentAudioList.length > 0) { + that.playEachAudio(that.currentAudioList[0].src); + } else { + that.isAutoPlay = false; + } + }; + }); + }, playAudio(audioUrl) { + this.isPlay = true; document.querySelector('#audioPlay').src = audioUrl; document.querySelector('#audioPlay').play(); + const that = this; + document.querySelector('#audioPlay').onended = function() { + that.isPlay = false; + that.isAutoPlay = false; + }; + }, + addAudioList(converstion) { + this.currentAudioList.push(converstion); + this.scrollTop(); } // conversationChange() { // this.currentAudioList = []; diff --git a/src/views/newMap/displayNew/demonChat.vue b/src/views/newMap/displayNew/demonChat.vue index fb696e4c8..0ff21f0fa 100644 --- a/src/views/newMap/displayNew/demonChat.vue +++ b/src/views/newMap/displayNew/demonChat.vue @@ -108,9 +108,12 @@ export default { // 创建会话 '$store.state.socket.createConversition':function(val) { if (this.memberData.length > 0) { - const member = this.memberData.find(member=>{ return member.id == val.creatorId; }); - if (member && member.userId == this.$store.state.user.id) { + const conversitionMember = this.memberData.find(member=>{ return member.userId == this.$store.state.user.id; }); + if (conversitionMember && val.memberIds.includes(conversitionMember.id)) { // 当前用户创建的会话 + if (val.creatorId !== conversitionMember.id) { + this.$message.success(this.coverName(val) + '与你开启会话'); + } this.isHasCoversition = true; this.isStartRecord = true; this.isQuitShow = true; @@ -118,6 +121,7 @@ export default { const memberList = []; val.memberIds.forEach(id=>{ if (val.creatorId == id) { + const member = this.memberData.find(member=>{ return member.id == id; }); member.connect = true; memberList.push(member); } else { @@ -177,7 +181,11 @@ export default { '$store.state.socket.conversationInfo':function (val, old) { // 仿真聊天 const simulationText = this.$store.state.socket.conversationInfo; if (val.messageType == 'MESSAGE' && (this.conversitionId == val.id || this.userRole == 'AUDIENCE')) { - this.chatContentList.push(this.addContent(simulationText.message)); + const content = this.addContent(simulationText.message); + this.chatContentList.push(content); + if (!content.self) { + this.$refs.chatbox.addAudioList(content); + } } }, // 按计划行车的列车列表更新(更新司机列表) @@ -217,23 +225,23 @@ export default { }, // 邀请会话的消息 '$store.state.socket.inviteSimulationConversition':function(val) { - const member = this.memberData.find(member=>{ return member.id == val.creatorId; }); - if (member) { - this.inviteUserName = member.label; - this.conversitionId = val.id; - member.connect = true; - member.online = true; - this.inviteUser = member; - - this.currentMemberList.push(member); - const member = this.memberData.find(member=>{ return member.id == val.memberId; }); - member.connect = true; - this.currentMemberList.push(member); - this.isStartRecord = true; - - // this.$refs.chatbox.inviteMember(); - this.$message.success(this.inviteUserName + '与你开启会话'); - } + // const conversitionMember = this.memberData.find(member=>{ return member.id == val.creatorId; }); + // if (conversitionMember) { + // this.inviteUserName = conversitionMember.label; + // this.conversitionId = val.id; + // conversitionMember.connect = true; + // conversitionMember.online = true; + // this.inviteUser = conversitionMember; + // + // this.currentMemberList.push(conversitionMember); + // const member = this.memberData.find(member=>{ return member.id == val.memberId; }); + // member.connect = true; + // this.currentMemberList.push(member); + // this.isStartRecord = true; + // this.isHasCoversition = true; + // // this.$refs.chatbox.inviteMember(); + // this.$message.success(this.inviteUserName + '与你开启会话'); + // } } }, @@ -254,6 +262,10 @@ export default { } return text; }, + coverName(inviteUser) { + const member = this.memberData.find(member=>{ return member.id == inviteUser.creatorId; }); + return member.label; + }, clearAllData() { this.resetCoversition(); this.createCoversition = true; diff --git a/src/views/newMap/jointTrainingNew/chatView/chatBox.vue b/src/views/newMap/jointTrainingNew/chatView/chatBox.vue index 420ec5fad..f112dd848 100644 --- a/src/views/newMap/jointTrainingNew/chatView/chatBox.vue +++ b/src/views/newMap/jointTrainingNew/chatView/chatBox.vue @@ -92,7 +92,7 @@
确定
取消
- + @@ -583,16 +585,22 @@ export default { this.days.push(Math.floor((day % 100) / 10)); this.days.push(day % 10); }, - goCompetitionRules() { - window.open('https://mp.weixin.qq.com/s?__biz=MzI3NzMwODY3OQ==&mid=2247506304&idx=1&sn=77708ca228404cee2b28e131cdfb9735&chksm=eb6aade8dc1d24fe6eb9f1334aadda239f47dafc79de7d522e0f3f00e2d3ba1dd213dda6764c&xtrack=1&scene=90&subscene=93&sessionid=1598522875&clicktime=1598523062&enterid=1598523062&ascene=56&devicetype=android-29&version=3.0.27.2701&nettype=WIFI&abtest_cookie=AAACAA%3D%3D&lang=zh_CN&exportkey=AQZ2cTPSob%2B5kBDiWnKw0Js%3D&pass_ticket=12Xyhe%2BbZsC9Vuzfs0iYUUn0i%2Br5JlZiOGCxWoExuthBhnIrpkmUyjVRi6bjyA1I&wx_header=1&platform=win', '_blank'); + goCompetitionRules(val) { + if (val === '1') { + window.open('https://mp.weixin.qq.com/s?__biz=MzI3NzMwODY3OQ==&mid=2247506304&idx=1&sn=77708ca228404cee2b28e131cdfb9735&chksm=eb6aade8dc1d24fe6eb9f1334aadda239f47dafc79de7d522e0f3f00e2d3ba1dd213dda6764c&xtrack=1&scene=90&subscene=93&sessionid=1598522875&clicktime=1598523062&enterid=1598523062&ascene=56&devicetype=android-29&version=3.0.27.2701&nettype=WIFI&abtest_cookie=AAACAA%3D%3D&lang=zh_CN&exportkey=AQZ2cTPSob%2B5kBDiWnKw0Js%3D&pass_ticket=12Xyhe%2BbZsC9Vuzfs0iYUUn0i%2Br5JlZiOGCxWoExuthBhnIrpkmUyjVRi6bjyA1I&wx_header=1&platform=win', '_blank'); + } else if (val === '2') { + window.open('https://mp.weixin.qq.com/s?__biz=MzI3NzMwODY3OQ==&mid=2247506789&idx=1&sn=5b5c1e6e0ca7dc54a935f57cee4eb1a2&chksm=eb6aaf0ddc1d261ba2ba7b9bed810b12b3317d45b1a484095d13b3d7e075b091d92fc7b9afb8&mpshare=1&scene=1&srcid=0910Yd3PVFs0WjWZyumLN9Jo&sharer_sharetime=1599740490862&sharer_shareid=98d62529ea7e8d0f6fb2281f854f3ea1&version=3.0.30.2006&platform=win&rd2werd=1#wechat_redirect', '_blank'); + } else if (val === '3') { + window.open('http://metroskills.camet.org.cn', '_blank'); + } } } }; From 3ca4cbbfcebc49850a2173416a476c37930f2c48 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 11 Sep 2020 10:15:15 +0800 Subject: [PATCH 08/53] =?UTF-8?q?drts=E5=80=92=E8=AE=A1=E6=97=B6=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ffa74b94e..cb9cb0854 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -213,7 +213,7 @@ export default { versionBaseNoShow: VersionBaseNoShow, mainBodyNoShow: MainBodyNoShow, noQrcodeList: NoQrcodeList, - expirationDate: 1607562000000, + expirationDate: 1605488400000, countdown: null, days: [0, 0, 0], gameOver: false, From f1000a1528c29659ab090fdf8482f06a42663837 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 11 Sep 2020 10:28:55 +0800 Subject: [PATCH 09/53] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=81=93=E5=B2=94?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/mapoperate/switch/create.vue | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue index 6bbe5fa8b..fe4089923 100644 --- a/src/views/newMap/newMapdraft/mapoperate/switch/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/switch/create.vue @@ -244,45 +244,45 @@ export default { const sectionb = this.findSectionData(sectionLists, elem.sectionBCode); const sectiona = this.findSectionData(sectionLists, elem.sectionACode); const sectionc = this.findSectionData(sectionLists, elem.sectionCCode); - const parentSectionModel = this.$store.getters['map/getDeviceByCode'](sectiona.parentCode); - if (!parentSectionModel) { // 找不到父元素删除 - if (switchSectionList.indexOf(elem.code) == -1) { - let uid; - if (!elem['uid']) { - uid = getUID('T', [...this.sectionList, ...addSectionList]); - elem['uid'] = uid; - } - addSectionList.push({ code: elem.uid }); - sectiona.parentCode = elem['uid']; - sectionb.parentCode = elem['uid']; - sectionc.parentCode = elem['uid']; - elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode]; - sectionList.push(elem); - switchList.forEach(ele => { - const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode); - const sectionc1 = this.findSectionData(sectionLists, ele.sectionCCode); - const sectionb1 = this.findSectionData(sectionLists, ele.sectionBCode); - if (sectionb1.points[sectionb1.points.length - 1].x == sectionb.points[0].x && sectionb1.points[sectionb1.points.length - 1].y == sectionb.points[0].y) { - ele['uid'] = uid; - elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode, ele.sectionACode, ele.sectionBCode, ele.sectionCCode]; - sectiona1.parentCode = uid; - sectionb1.parentCode = uid; - sectionc1.parentCode = uid; - switchSectionList.push(ele.code); - sectionList.forEach((item, index) => { - if (item.code == ele.code) { - sectionList.splice(index, 1); - } - }); - } - }); + // const parentSectionModel = this.$store.getters['map/getDeviceByCode'](sectiona.parentCode); + // if (!parentSectionModel) { // 找不到父元素删除 + if (switchSectionList.indexOf(elem.code) == -1) { + let uid; + if (!elem['uid']) { + uid = getUID('T', [...this.sectionList, ...addSectionList]); + elem['uid'] = uid; } - } else { - parentSectionModel.relevanceSectionList.push(elem.sectionACode); - parentSectionModel.relevanceSectionList.push(elem.sectionBCode); - parentSectionModel.relevanceSectionList.push(elem.sectionCCode); - models.push(parentSectionModel); + addSectionList.push({ code: elem.uid }); + sectiona.parentCode = elem['uid']; + sectionb.parentCode = elem['uid']; + sectionc.parentCode = elem['uid']; + elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode]; + sectionList.push(elem); + switchList.forEach(ele => { + const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode); + const sectionc1 = this.findSectionData(sectionLists, ele.sectionCCode); + const sectionb1 = this.findSectionData(sectionLists, ele.sectionBCode); + if (sectionb1.points[sectionb1.points.length - 1].x == sectionb.points[0].x && sectionb1.points[sectionb1.points.length - 1].y == sectionb.points[0].y) { + ele['uid'] = uid; + elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode, ele.sectionACode, ele.sectionBCode, ele.sectionCCode]; + sectiona1.parentCode = uid; + sectionb1.parentCode = uid; + sectionc1.parentCode = uid; + switchSectionList.push(ele.code); + sectionList.forEach((item, index) => { + if (item.code == ele.code) { + sectionList.splice(index, 1); + } + }); + } + }); } + // } else { + // parentSectionModel.relevanceSectionList.push(elem.sectionACode); + // parentSectionModel.relevanceSectionList.push(elem.sectionBCode); + // parentSectionModel.relevanceSectionList.push(elem.sectionCCode); + // models.push(parentSectionModel); + // } sectiona.relSwitchCode = elem.code; sectionb.relSwitchCode = elem.code; sectionc.relSwitchCode = elem.code; From 33d5850ed447a3bc607102ceb2f1991985d1a99f Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 11 Sep 2020 16:07:18 +0800 Subject: [PATCH 10/53] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pushMessage.js | 9 ++++ src/scripts/DictionaryData.js | 6 +-- src/views/system/notification/index.vue | 68 ++++++++++++++++++------- 3 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/api/pushMessage.js b/src/api/pushMessage.js index bcb4c75c8..f4ccba64d 100644 --- a/src/api/pushMessage.js +++ b/src/api/pushMessage.js @@ -8,3 +8,12 @@ export function pushMessage(data) { data: data }); } + +/** 推送通知消息*/ +export function pushSysNotice(data) { + return request({ + url: `/api/v1/sysNotice`, + method: 'post', + data: data + }); +} diff --git a/src/scripts/DictionaryData.js b/src/scripts/DictionaryData.js index 48d4c0cc6..7cdefc2ad 100644 --- a/src/scripts/DictionaryData.js +++ b/src/scripts/DictionaryData.js @@ -86,10 +86,10 @@ function loadDictionary() { _LimitOperation: [], - _SystemInform: [], // 通知类型 + _Notice: [], // 通知类型 - systemInform: function () { - return queryData('system_inform', this, '_SystemInform'); + noticeList: function () { + return queryData('notice', this, '_Notice'); }, regionTypeList: function () { diff --git a/src/views/system/notification/index.vue b/src/views/system/notification/index.vue index 29d66217b..a2cb944b7 100644 --- a/src/views/system/notification/index.vue +++ b/src/views/system/notification/index.vue @@ -7,13 +7,30 @@
- {{ $t('system.push') }} + 发布
- diff --git a/src/views/drts/scene/create.vue b/src/views/drts/scene/create.vue new file mode 100644 index 000000000..105cc0aba --- /dev/null +++ b/src/views/drts/scene/create.vue @@ -0,0 +1,128 @@ + + diff --git a/src/views/drts/scene/index.vue b/src/views/drts/scene/index.vue new file mode 100644 index 000000000..ab4b55683 --- /dev/null +++ b/src/views/drts/scene/index.vue @@ -0,0 +1,120 @@ + + From 118f95efc4a5aec016280d30df1213a6b3e5b766 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Sun, 27 Sep 2020 13:41:25 +0800 Subject: [PATCH 20/53] =?UTF-8?q?=E8=B0=83=E6=95=B4ibp=20=E8=A7=A6?= =?UTF-8?q?=E6=91=B8=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ibp/ibpPan.js | 6 ++++++ src/ibp/mouseController.js | 20 +++++++++++++------ .../menus/menuDialog/systemLogin.vue | 2 +- src/utils/baseUrl.js | 4 ++-- src/views/ibp/ibpsystem/index.vue | 2 +- src/views/iscs/iscsDesign/demonList.vue | 2 +- 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/ibp/ibpPan.js b/src/ibp/ibpPan.js index 7f348b971..1f6bca0fe 100644 --- a/src/ibp/ibpPan.js +++ b/src/ibp/ibpPan.js @@ -1,4 +1,10 @@ +import env from 'zrender/src/core/env'; +import envLib from 'zrender/lib/core/env'; +env.touchEventsSupported = true; +envLib.touchEventsSupported = true; +console.log(env); import zrender from 'zrender'; + // import * as zrUtil from 'zrender/src/core/util'; import localStore from 'storejs'; import Options from './options'; diff --git a/src/ibp/mouseController.js b/src/ibp/mouseController.js index 95ecef042..4527834d4 100644 --- a/src/ibp/mouseController.js +++ b/src/ibp/mouseController.js @@ -2,6 +2,7 @@ import deviceType from './constant/deviceType'; import Eventful from 'zrender/src/mixin/Eventful'; import * as eventTool from 'zrender/src/core/event'; import store from '@/store/index_APP_TARGET'; +// import * as Event from 'zrender/src/core/event'; class EventModel { constructor(e) { @@ -55,6 +56,7 @@ class MouseController extends Eventful { zr.on('mousedown', this.mousedown, this); zr.on('mousemove', this.mousemove, this); zr.on('mouseup', this.mouseup, this); + zr.on('touchstart', this.mousedown, this); zr.on('touchmove', this.mousemove, this); zr.on('touchend', this.mouseup, this); @@ -64,6 +66,7 @@ class MouseController extends Eventful { zr.off('mousedown', this.mousedown); zr.off('mousemove', this.mousemove); zr.off('mouseup', this.mouseup); + zr.off('touchstart', this.mousedown); zr.off('touchmove', this.mousemove); zr.off('touchend', this.mouseup); @@ -99,9 +102,10 @@ class MouseController extends Eventful { this._x = e.offsetX; this._y = e.offsetY; this._dragging = true; + this._target = null; if (e.which === 3) { this.handleMouseDownRight(e); - } else if (e.which === 1) { + } else if (e.which === 1 || e.which == 0) { this.handleMouseDownLeft(e); } else if (e.which === 2) { this.handleMouseDownWheel(e); @@ -120,7 +124,7 @@ class MouseController extends Eventful { this._y = e.offsetY; if (e.which === 3) { this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY}); - } else if (e.which === 1) { + } else if (e.which === 1 || e.which == 0) { this.handleMouseMoveLeft(e, dx, dy, oldX, oldY); } } @@ -148,11 +152,13 @@ class MouseController extends Eventful { this.eventTarget.setCursor('default'); } if (this.eventTarget.grouper) { - if (e.target._subType == 'buttonImag') { - this.targetView = this.checkEvent(e); - this.targetView.eventTarget.close(); + if (this._target && this._target._subType == 'buttonImag') { + // this.targetView = this.checkEvent(e); + this._targetView && this._targetView.eventTarget.close(); this.boundingRect = {}; } + this._target = null; + this._targetView = null; } this.eventTarget = ''; this._dragging = false; @@ -229,6 +235,8 @@ class MouseController extends Eventful { if (e.target._subType == 'buttonImag') { this.targetView = this.checkEvent(e); this.targetView.eventTarget.open(); + this._target = e.target; + this._targetView = this.targetView; this.boundingRect = this.eventTarget.grouper.getBoundingRect(); this.boundingRect = this.createFakeBoundingRect(this.eventTarget, this.boundingRect); } @@ -260,7 +268,7 @@ class MouseController extends Eventful { this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y }); } } - if (this.eventTarget.grouper) { + if (this.eventTarget && this.eventTarget.grouper) { const x = e.event.x + this.$ibp.$options.offsetX; const y = e.event.y + this.$ibp.$options.offsetY; if (!(x <= this.boundingRect.x2 && x >= this.boundingRect.x1 && y <= this.boundingRect.y2 && y >= this.boundingRect.y1)) { diff --git a/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue b/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue index 40fbc395a..0a7cee93c 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue @@ -117,7 +117,7 @@ export default { }); }, clickEvent(val) { - console.log(val, '--------', this.addModel.role, '========', document.getElementById(val)); + // console.log(val, '--------', this.addModel.role, '========', document.getElementById(val)); this.addModel.role && document.getElementById(this.addModel.role).setAttribute('style', 'background: #5F9EA0;color: #000; width:100%'); this.addModel.role = val; document.getElementById(val).setAttribute('style', 'background: #000;color: #5F9EA0; width:100%'); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index d678bd1fa..524befeac 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,10 +2,10 @@ 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.175:9000'; // 张赛 + // BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue index 24b831385..80cd134c7 100644 --- a/src/views/ibp/ibpsystem/index.vue +++ b/src/views/ibp/ibpsystem/index.vue @@ -280,7 +280,7 @@ export default { }, controlAudio(val) { const audio = document.getElementById('buzzer'); - console.log(val, audio); + // console.log(val, audio); if (audio !== null) { if (val) { audio.play(); diff --git a/src/views/iscs/iscsDesign/demonList.vue b/src/views/iscs/iscsDesign/demonList.vue index 1be7d1e49..bf20b6f1d 100644 --- a/src/views/iscs/iscsDesign/demonList.vue +++ b/src/views/iscs/iscsDesign/demonList.vue @@ -771,7 +771,7 @@ export default { this.$refs.tree.filter(val); }, mapStationList(val) { - console.log(val); + // console.log(val); } }, beforeDestroy () { From 73750209959158b15ea5e7345c8203ca806bb758 Mon Sep 17 00:00:00 2001 From: lVAL Date: Sun, 27 Sep 2020 14:29:32 +0800 Subject: [PATCH 21/53] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/constant/keyboardEvents.js | 6 +++--- src/iscs/keyboardController.js | 10 +++------- src/utils/baseUrl.js | 4 ++-- src/views/iscsSystem/index.vue | 6 +++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/iscs/constant/keyboardEvents.js b/src/iscs/constant/keyboardEvents.js index a7811c178..7a2127165 100644 --- a/src/iscs/constant/keyboardEvents.js +++ b/src/iscs/constant/keyboardEvents.js @@ -1,7 +1,7 @@ export const keyboardEvents = { - C: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_C'}, // 绘图复制 - V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'}, // 绘图粘贴 - DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素 + C: { event: 'KeyC'}, // 绘图复制 + V: { event: 'KeyV'}, // 绘图粘贴 + DELETE: { event: 'Delete'}, // 快捷删除绘图元素 // ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素 }; diff --git a/src/iscs/keyboardController.js b/src/iscs/keyboardController.js index 03bdfbfa2..c11d799ab 100644 --- a/src/iscs/keyboardController.js +++ b/src/iscs/keyboardController.js @@ -7,7 +7,7 @@ class KeyboardController extends Eventful { this.$iscs = iscs; this.$zr = iscs.getZr(); this.events = iscs.getEvents(); - this.initHandler(this.$zr); + this.initHandler(this.$zr); } initHandler(zr) { @@ -33,12 +33,8 @@ class KeyboardController extends Eventful { keydown(e) { if (this._keyOnDownUp && !e.repeat) { - const currentEvent = keyboardEvents[e.key.toUpperCase()]; - let str = ''; - if (currentEvent && currentEvent.altKey === e.altKey && currentEvent.ctrlKey === e.ctrlKey && currentEvent.shiftKey === e.shiftKey) { - str = currentEvent.event; - } - this.trigger(this.events.Keyboard, str); + const currentEvent = keyboardEvents[e.key.toUpperCase()]||{event:""}; + this.trigger(this.events.Keyboard, currentEvent.event); } } } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index d678bd1fa..524befeac 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,10 +2,10 @@ 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.175:9000'; // 张赛 + // BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/iscsSystem/index.vue b/src/views/iscsSystem/index.vue index 6e1e96fcd..cb881fd15 100644 --- a/src/views/iscsSystem/index.vue +++ b/src/views/iscsSystem/index.vue @@ -163,7 +163,7 @@ export default { onKeyboard(hook) { if (this.selected && this.selected.code) { switch (hook) { - case 'Ctrl_C': { + case 'KeyC': { const list = this.getSelectList(); if (list.length) { this.copyList = []; @@ -189,7 +189,7 @@ export default { this.copyModel = {}; } } break; - case 'Ctrl_V': { + case 'KeyV': { const list = this.getSelectList(); if (list.length) { this.copyList.forEach(item => { @@ -231,7 +231,7 @@ export default { return this.$iscs.getCopyList() || []; }, createDataModel(model) { - const newModel = deviceFactory(model._type, model); + const newModel = deviceFactory(model._type, model); this.$store.dispatch('iscs/updateIscsDevices', newModel.model); }, // 点击选择事件 From e4d673cdb084d831b2c4fdf30015982b614eeb52 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Sun, 27 Sep 2020 14:44:59 +0800 Subject: [PATCH 22/53] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ibp/ibpPan.js | 3 +-- src/views/iscsSystem/index.vue | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ibp/ibpPan.js b/src/ibp/ibpPan.js index 1f6bca0fe..58f166657 100644 --- a/src/ibp/ibpPan.js +++ b/src/ibp/ibpPan.js @@ -1,8 +1,7 @@ import env from 'zrender/src/core/env'; import envLib from 'zrender/lib/core/env'; env.touchEventsSupported = true; -envLib.touchEventsSupported = true; -console.log(env); +envLib.touchEventsSupported = true; // 支持触摸板 import zrender from 'zrender'; // import * as zrUtil from 'zrender/src/core/util'; diff --git a/src/views/iscsSystem/index.vue b/src/views/iscsSystem/index.vue index cb881fd15..4437a2dd6 100644 --- a/src/views/iscsSystem/index.vue +++ b/src/views/iscsSystem/index.vue @@ -231,7 +231,7 @@ export default { return this.$iscs.getCopyList() || []; }, createDataModel(model) { - const newModel = deviceFactory(model._type, model); + const newModel = deviceFactory(model._type, model); this.$store.dispatch('iscs/updateIscsDevices', newModel.model); }, // 点击选择事件 From bae0a26c6490e666a9798e25ddfc6bb1bf5abbf8 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Sun, 27 Sep 2020 14:45:15 +0800 Subject: [PATCH 23/53] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/constant/deviceRender.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index 2145884b5..a774c191d 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -196,7 +196,7 @@ deviceRender[deviceType.IscsLine] = { deviceRender[deviceType.IscsRect] = { _type: deviceType.IscsRect, zlevel:1, - z: 3 + z: 6 }; /** 菱形渲染配置 */ deviceRender[deviceType.IscsRhombus] = { From 9d2836cf6411ff921ecb95a1ea4c4340a9ad4cf4 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Sun, 27 Sep 2020 15:40:23 +0800 Subject: [PATCH 24/53] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/constant/deviceRender.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index a774c191d..590f47f15 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -184,7 +184,7 @@ deviceRender[deviceType.VolumeControlDamper] = { deviceRender[deviceType.IscsText] = { _type: deviceType.IscsText, zlevel: 1, - z: 6 + z: 7 }; /** 线段渲染配置 */ deviceRender[deviceType.IscsLine] = { From 0e47dfcff11f7891cacdea51777fde3bac9c4562 Mon Sep 17 00:00:00 2001 From: lVAL Date: Sun, 27 Sep 2020 16:12:25 +0800 Subject: [PATCH 25/53] =?UTF-8?q?=E9=80=82=E9=85=8D=E5=9B=BE=E7=89=87APF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iscs_picture/{sdfzs711799.png => iscs_APF.png} | Bin src/iscs/shape/picture.js | 6 +++++- src/views/iscs/iscsDraw/icscComponents/picture.vue | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) rename src/assets/iscs_picture/{sdfzs711799.png => iscs_APF.png} (100%) diff --git a/src/assets/iscs_picture/sdfzs711799.png b/src/assets/iscs_picture/iscs_APF.png similarity index 100% rename from src/assets/iscs_picture/sdfzs711799.png rename to src/assets/iscs_picture/iscs_APF.png diff --git a/src/iscs/shape/picture.js b/src/iscs/shape/picture.js index d99ae9c17..3a0578683 100644 --- a/src/iscs/shape/picture.js +++ b/src/iscs/shape/picture.js @@ -7,10 +7,14 @@ import psdRight from '@/assets/iscs_picture/iscs-psd-right.png'; import fireBlue from '@/assets/iscs_picture/iscs-fire-blue.png'; import fireRed from '@/assets/iscs_picture/iscs-fire-red.png'; + +import iscsAPF from '@/assets/iscs_picture/iscs_APF.png'; + const pictureObj = { 'psdLeft': psdLeft, 'psdSystem': psdSystem, - 'psdRight': psdRight, + 'psdRight': psdRight, + 'APF': iscsAPF, 's': fireBlue, 'a': fireRed }; diff --git a/src/views/iscs/iscsDraw/icscComponents/picture.vue b/src/views/iscs/iscsDraw/icscComponents/picture.vue index 78001fc3e..2e41293c7 100644 --- a/src/views/iscs/iscsDraw/icscComponents/picture.vue +++ b/src/views/iscs/iscsDraw/icscComponents/picture.vue @@ -54,8 +54,10 @@ export default { typeList: [ { name: '车头', value: 'psdLeft' }, { name: '车尾', value: 'psdRight' }, - { name: '车厢', value: 'psdSystem' } - ], + { name: '车厢', value: 'psdSystem' }, + { name: 'APF', value: 'APF'} + ], + rules: { strokeColor: [ { required: true, message: '请选择边框颜色', trigger: 'change' } From abc2ef4e62d5442fc576e403c7991bb0571a87fd Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 28 Sep 2020 09:42:20 +0800 Subject: [PATCH 26/53] =?UTF-8?q?=E9=97=AE=E9=A2=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/utils/parser.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index 4db325525..2d051b148 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -63,7 +63,11 @@ export function parser(data, skinCode, showConfig) { if (elem.type == '02' || elem.type == '03') { mapDevice[elem.code].parentName = mapDevice[elem.parentCode] ? mapDevice[elem.parentCode].name : ''; } else if (elem.type == '01' && (elem.standTrack || elem.reentryTrack) && elem.belongStation) { - mapDevice[elem.belongStation].sectionCode = elem.code; + if (mapDevice[elem.belongStation]) { + mapDevice[elem.belongStation].sectionCode = elem.code; + } else { + elem.belongStation = ''; + } } }, this); From d5c97063117d8144d251bf16b0cb30e422b049de Mon Sep 17 00:00:00 2001 From: lVAL Date: Mon, 28 Sep 2020 13:15:54 +0800 Subject: [PATCH 27/53] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E5=9B=AD=E4=BB=A5=E5=8F=8A=E4=BF=AE=E6=94=B9=E5=9C=86=E7=9A=84?= =?UTF-8?q?=E6=9C=80=E5=B0=8F=E5=8D=8A=E5=BE=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iscs/iscsDraw/icscComponents/circle.vue | 2 +- .../iscs/iscsDraw/iscsPowerMonitoring/index.vue | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/iscs/iscsDraw/icscComponents/circle.vue b/src/views/iscs/iscsDraw/icscComponents/circle.vue index b0195e332..062cca352 100644 --- a/src/views/iscs/iscsDraw/icscComponents/circle.vue +++ b/src/views/iscs/iscsDraw/icscComponents/circle.vue @@ -2,7 +2,7 @@
- + diff --git a/src/views/iscs/iscsDraw/iscsPowerMonitoring/index.vue b/src/views/iscs/iscsDraw/iscsPowerMonitoring/index.vue index cbac245f7..634c59ea5 100644 --- a/src/views/iscs/iscsDraw/iscsPowerMonitoring/index.vue +++ b/src/views/iscs/iscsDraw/iscsPowerMonitoring/index.vue @@ -57,6 +57,14 @@ @createDataModel="createDataModel" @deleteDataModel="deleteDataModel" /> + + + Date: Mon, 28 Sep 2020 14:02:04 +0800 Subject: [PATCH 28/53] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=20=E7=90=86=E8=AE=BA?= =?UTF-8?q?=E8=80=83=E8=AF=95=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4=20/=20?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B=20=E5=9C=BA=E6=99=AF=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/competition.js | 26 +- src/views/drts/scene/create.vue | 76 +++-- src/views/drts/scene/index.vue | 49 ++-- src/views/drts/scene/modify.vue | 210 +++++++++++++ src/views/drts/scene/update.vue | 275 ++++++++++++++++++ .../dispatherContest/theoryExam.vue | 41 ++- .../component/covertOperation.js | 24 +- 7 files changed, 651 insertions(+), 50 deletions(-) create mode 100644 src/views/drts/scene/modify.vue create mode 100644 src/views/drts/scene/update.vue diff --git a/src/api/competition.js b/src/api/competition.js index 3b6459686..60bed1cd5 100644 --- a/src/api/competition.js +++ b/src/api/competition.js @@ -277,7 +277,7 @@ export function getCompetitionPracticalScene(params) { }); } -/** 获取场景列表 */ +/** 添加场景 */ export function addCompetitionPracticalScene(data) { return request({ url: `/api/v1/competitionPractical`, @@ -286,3 +286,27 @@ export function addCompetitionPracticalScene(data) { }); } +/** 删除场景 */ +export function deleteCompetitionPracticalScene(sceneId) { + return request({ + url: `/api/v1/competitionPractical/${sceneId}`, + method: 'delete' + }); +} + +/** 更新场景 */ +export function updateCompetitionPracticalScene(data) { + return request({ + url: `/api/v1/competitionPractical`, + method: 'PUT', + data + }); +} +/** 获取场景 */ +export function getCompetitionPracticalSceneById(id) { + return request({ + url: `/api/v1/competitionPractical/detail/${id}`, + method: 'get' + }); +} + diff --git a/src/views/drts/scene/create.vue b/src/views/drts/scene/create.vue index 105cc0aba..497d491af 100644 --- a/src/views/drts/scene/create.vue +++ b/src/views/drts/scene/create.vue @@ -1,5 +1,5 @@ + diff --git a/src/views/drts/scene/update.vue b/src/views/drts/scene/update.vue new file mode 100644 index 000000000..51e415d5c --- /dev/null +++ b/src/views/drts/scene/update.vue @@ -0,0 +1,275 @@ + + + + diff --git a/src/views/newMap/displayNew/dispatherContest/theoryExam.vue b/src/views/newMap/displayNew/dispatherContest/theoryExam.vue index e099436dd..1bda55faf 100644 --- a/src/views/newMap/displayNew/dispatherContest/theoryExam.vue +++ b/src/views/newMap/displayNew/dispatherContest/theoryExam.vue @@ -58,9 +58,9 @@
-
{{ '测验得分:' }}{{ resultScore+' 分' }}
-
错题列表
-
+
+
{{ '测验得分:' }}{{ resultScore+' 分' }}
+
错题列表
{{ covertWrong() }}
@@ -98,6 +98,10 @@
+
+
+
{{ '测验得分:' }}{{ resultScore+' 分' }}
+
@@ -293,10 +297,20 @@ export default { this.theoryExamWrongList = writeList.filter(wrong=>{ return wrong.correct == false; }); - this.resultScore = writeList.reduce((prev, cur, index, arr)=>{ - return prev.score == undefined ? prev + cur.score : prev.score + cur.score; - }); - this.getWrongDataOption(); + if (writeList.length > 0) { + if (writeList.length >= 2) { + this.resultScore = writeList.reduce((prev, cur, index, arr)=>{ + return prev.score == undefined ? prev + cur.score : prev.score + cur.score; + }); + } else { + this.resultScore = writeList[0].score; + } + } else { + this.resultScore = 0; + } + if (this.theoryExamWrongList.length > 0) { + this.getWrongDataOption(); + } }).catch(()=>{ this.$message.error('提交失败,请稍后再试'); @@ -419,6 +433,8 @@ export default { overflow:auto; padding-left: 10px; width: 256px; + border: 1px #ececec solid; + border-radius: 5px; } .eachQuestionNum{ color: #8f7f70; @@ -524,6 +540,17 @@ export default { margin-top: 10px; font-size: 15px; } +.theoryExamScore1{ + text-align: center; + font-size: 17px; + margin-top: 20px; +} +.theoryExamEnd{ + font-size: 90px; + color: #007b00; + margin-left: 340px; + margin-top: 115px; +} .theoryExamWrongList{} .theoryExamWrongListL{ width: 500px; diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index 12dd29bff..ac58490b5 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -1,5 +1,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import store from '@/store/index_APP_TARGET'; +import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config'; // 操作 export const operateEnum = { Set_Fault:{ @@ -146,7 +147,28 @@ export const operateEnum = { // 转换函数 export function covertOperate(operationType, operationParamMap) { if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') { - // covertOperation(operationType); + let deviceName = ''; + const device = store.getters['map/getDeviceByCode'](operationParamMap.code); + if (device._type == 'StationStand') { + const station = store.getters['map/getDeviceByCode'](device.stationCode); + deviceName += '【车站-' + station.name + '】/'; + } else { + deviceName = '' + device.name; + } + let tip = '请找到' + deviceType[device._type] + deviceName + ','; + if (operationType == 'Set_Fault') { + tip += '设置故障,'; + } else { + tip += '取消故障,'; + } + const data = deviceFaultType[device._type]; + data.forEach(each=>{ + if (each.value == operationParamMap.faultType) { + tip += '参数为:' + each.label; + } + }); + return tip; + } else { let device = operationType.split('_')[0]; if (device == 'CM') { From 4eab63d1f34696b642b7082a395f86174e438906 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 28 Sep 2020 16:32:33 +0800 Subject: [PATCH 29/53] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=89=93=E5=8C=85?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index_Common.js | 1 + src/views/login/index.vue | 4 ++-- vue.config.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 9263ac1f8..7eef8d620 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -1214,6 +1214,7 @@ export const JSXT = [ } ]; const createRouter = () => new Router({ + base: '/cbtc/', mode: 'history', // require service support scrollBehavior: () => ({ y: 0 }), routes: constantRoutes diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 9261fdb05..922433159 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -213,7 +213,7 @@ export default { versionBaseNoShow: VersionBaseNoShow, mainBodyNoShow: MainBodyNoShow, noQrcodeList: NoQrcodeList, - expirationDate: 1605488400000, + expirationDate: 1606784400000, countdown: null, days: [0, 0, 0], gameOver: false, @@ -581,7 +581,7 @@ export default { if (difference <= 0) { this.gameOver = true; } - const day = Math.floor(difference / (24 * 60 * 60 * 1000)); + const day = Math.ceil(difference / (24 * 60 * 60 * 1000)); this.days.push(Math.floor(day / 100)); this.days.push(Math.floor((day % 100) / 10)); this.days.push(day % 10); diff --git a/vue.config.js b/vue.config.js index f56070b32..73f199c82 100644 --- a/vue.config.js +++ b/vue.config.js @@ -21,8 +21,8 @@ module.exports = { * In most cases please use '/' !!! * Detail: https://cli.vuejs.org/config/#publicpath */ - publicPath: '/', - outputDir: 'dist', + publicPath: '/cbtc', + outputDir: 'dist/cbtc', assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录 lintOnSave: false, productionSourceMap: false, // 项目打包后是否压缩 From 2f051be6e9580f48af7359ec80a0dc4b26dab7d6 Mon Sep 17 00:00:00 2001 From: program-walker <418875866@qq.com> Date: Mon, 28 Sep 2020 17:54:54 +0800 Subject: [PATCH 30/53] =?UTF-8?q?=E4=BF=AE=E6=94=B9Jenkins=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile-test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-test b/Jenkinsfile-test index 694bc472a..7961d5f98 100644 --- a/Jenkinsfile-test +++ b/Jenkinsfile-test @@ -4,7 +4,7 @@ pipeline { label 'master' } } - + stages { stage('Package') { tools { @@ -17,7 +17,9 @@ pipeline { } stage('Publish') { steps { - sh 'cp -rf ./dist/* /usr/local/joylink/jlclient' + sh 'mkdir -p /usr/local/joylink/jlclient' + sh 'rm -rf /usr/local/joylink/jlclient/*' + sh 'cp -rf ./dist/* /usr/local/joylink/jlclient' } } } From c89fb915f56658f4aaa0f04ff585a9958ce65e07 Mon Sep 17 00:00:00 2001 From: program-walker <418875866@qq.com> Date: Mon, 28 Sep 2020 17:57:53 +0800 Subject: [PATCH 31/53] =?UTF-8?q?=E4=BF=AE=E6=94=B9Jenkins=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile-test | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile-test b/Jenkinsfile-test index 7961d5f98..fff7d237c 100644 --- a/Jenkinsfile-test +++ b/Jenkinsfile-test @@ -11,6 +11,7 @@ pipeline { nodejs 'nodejs-10' } steps { + sh 'npm update' sh 'npm install' sh 'npm run test' } From 6019050258ad69810a9141649a91f6f57ac2c5b1 Mon Sep 17 00:00:00 2001 From: program-walker <418875866@qq.com> Date: Mon, 28 Sep 2020 18:27:57 +0800 Subject: [PATCH 32/53] =?UTF-8?q?=E4=BF=AE=E6=94=B9Jenkins=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=E6=89=93=E5=8C=85=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile-prd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile-prd b/Jenkinsfile-prd index 8bff30f3b..1bd53bb27 100644 --- a/Jenkinsfile-prd +++ b/Jenkinsfile-prd @@ -4,7 +4,7 @@ pipeline { label 'master' } } - + stages { stage('Package') { tools { @@ -18,6 +18,8 @@ pipeline { } stage('Publish') { steps { + sh 'mkdir -p /usr/local/joylink/jlclient' + sh 'rm -rf /usr/local/joylink/jlclient/*' sh 'cp -rf ./dist/* /usr/local/joylink/jlclient' } } From ca84d29af9d421e6d5b3e3f30887dade8cf6ab00 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 28 Sep 2020 20:54:34 +0800 Subject: [PATCH 33/53] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/competition.js | 8 + src/views/drts/scene/index.vue | 2 +- src/views/drts/scene/modify.vue | 357 ++++++++++++++++++++--- src/views/drts/scene/stepDescription.vue | 92 ++++++ 4 files changed, 424 insertions(+), 35 deletions(-) create mode 100644 src/views/drts/scene/stepDescription.vue diff --git a/src/api/competition.js b/src/api/competition.js index 60bed1cd5..3dfbaf849 100644 --- a/src/api/competition.js +++ b/src/api/competition.js @@ -310,3 +310,11 @@ export function getCompetitionPracticalSceneById(id) { }); } +/** 更新步骤数据 */ +export function updateCompetitionPracticalStep(data) { + return request({ + url: `/api/v1/competitionPractical/detail`, + method: 'POST', + data + }); +} diff --git a/src/views/drts/scene/index.vue b/src/views/drts/scene/index.vue index 03e64e3e0..338edb67b 100644 --- a/src/views/drts/scene/index.vue +++ b/src/views/drts/scene/index.vue @@ -3,7 +3,7 @@ - +
diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index 2f80d77fd..0d5e634d0 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -2,47 +2,125 @@ - + - {{ '' }} + - - - + + + + + + + + + +
+ 编辑步骤描述 + 取消编辑步骤描述 +
+ + + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} +
+ From dc930dae126a7ef1c33f6dbd4694d1c16b29f77f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 28 Sep 2020 21:00:14 +0800 Subject: [PATCH 34/53] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/drts/scene/modify.vue | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index 0d5e634d0..9493a9522 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -182,22 +182,24 @@ export default { this.formModel.disposalProcesses = row.disposalProcesses; this.formModel.operationScore = row.operationScore; this.formModel.scriptId = row.scriptId; - getCompetitionPracticalSceneById(row.id).then(response=>{ - const commandEvaluationRuleVOs = {}; - response.data.commandEvaluationRuleVOs.forEach(data=>{ - commandEvaluationRuleVOs[data.actionId] = data; - }); - const stepVOs = {}; - response.data.stepVOs.forEach(data=>{ - stepVOs[data.startActionId] = data; - this.startArray.push(data.startActionId); - this.endArray.push(data.endActionId); - }); - this.commandEvaluationRuleVOs = commandEvaluationRuleVOs; - this.stepVOs = stepVOs; - }); getScriptByIdNew(row.scriptId).then(res=>{ this.actionList = res.data.actionList; + getCompetitionPracticalSceneById(row.id).then(response=>{ + const commandEvaluationRuleVOs = {}; + response.data.commandEvaluationRuleVOs.forEach(data=>{ + commandEvaluationRuleVOs[data.actionId] = data; + }); + const stepVOs = {}; + response.data.stepVOs.forEach(data=>{ + stepVOs[data.startActionId] = data; + const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; }); + const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; }); + this.startArray.push(dataIndex); + this.endArray.push(dataIndex1); + }); + this.commandEvaluationRuleVOs = commandEvaluationRuleVOs; + this.stepVOs = stepVOs; + }); // 加载地图数据 getPublishMapDetailById(res.data.mapId).then(resp => { this.$store.dispatch('map/setMapData', resp.data); From f39ee786b4b83c374b5e6961d099877d55a47acc Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 29 Sep 2020 09:31:29 +0800 Subject: [PATCH 35/53] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=20=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/drts/scene/modify.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index 9493a9522..3b30b9f94 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -1,8 +1,8 @@