diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 1e39ae986..54f73378c 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -591,7 +591,13 @@ class SkinCode extends defaultStyle { tripNumberPrefix: '0000', // 车次号前缀 defaultDirectionCode: 'D', // 默认车次号1 defaultTripNumber: 'CCC', // 默认车次号2 - trainTargetOffset: { x: 42, y: 1}// 列车车次号偏移 + trainTargetOffset: { x: 42, y: 1}, // 列车车次号偏移 + smallColor: '#70ECEE', // 小交路颜色 + bigColor: '#FFFFFF', // 大交路颜色 + inboundColor: '#00FF00', // 回库颜色 + planTypeColor: '#FFFFFF', // 计划车颜色 + manualTypeColor: '#FF0', // 人工车 + headTypeColor: '#FF0' // 头码车 }, trainTargetNumber: { groupNumberPrefix: '000', // 车组号前缀 diff --git a/src/jmapNew/shape/Train/TrainBody.js b/src/jmapNew/shape/Train/TrainBody.js index a096f185e..d849cf47a 100644 --- a/src/jmapNew/shape/Train/TrainBody.js +++ b/src/jmapNew/shape/Train/TrainBody.js @@ -307,6 +307,24 @@ export default class TrainBody extends Group { return new BoundingRect(0, 0, 0, 0); } } + setPlanRoutingTypeColor(planRoutingTypes) { + if (planRoutingTypes === 'BIG') { + this.style.Train.trainTarget.bigColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.bigColor}); + } else if (planRoutingTypes === 'SMALL') { + this.style.Train.trainTarget.smallColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.smallColor}); + } else if (planRoutingTypes === 'INBOUND') { + this.style.Train.trainTarget.inboundColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.inboundColor}); + } + } + setTrainTypeColor(type) { + if (type === 'PLAN') { + this.style.Train.trainTarget.planTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.planTypeColor}); + } else if (type === 'MANUAL') { + this.style.Train.trainTarget.manualTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.manualTypeColor}); + } else if (type === 'HEAD') { + this.style.Train.trainTarget.headTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.headTypeColor}); + } + } setSoonerOrLater(dt) { if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 5) { if (dt > 120) { diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 7eae34a89..092991e40 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -408,6 +408,8 @@ export default class Train extends Group { this.setHoldStatus(model.hold); this.setJumpStatus(model.jump); this.setSoonerOrLater(model.dt); + this.setPlanRoutingTypeColor(model.planRoutingType); + this.setTrainTypeColor(model.type); const style = this.style; if (style.Section.trainPosition.display) { this.updateSection(object); @@ -427,6 +429,12 @@ export default class Train extends Group { // this.setTrainTypeStatus(model.type); // 根据列车类型设置列车识别号样式 // } } + setTrainTypeColor(type) { + this.trainB && this.trainB.setTrainTypeColor(type); + } + setPlanRoutingTypeColor(planRoutingType) { + this.trainB && this.trainB.setPlanRoutingTypeColor(planRoutingType); + } // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 isChangeTrainWidth(model, style) { if (!style.Train.trainBody.changeTrainWidth) { return; } diff --git a/src/views/competitionManage/create.vue b/src/views/competitionManage/create.vue index 4f93c9d7b..331f5d6fa 100644 --- a/src/views/competitionManage/create.vue +++ b/src/views/competitionManage/create.vue @@ -14,7 +14,7 @@ /> - + + @@ -92,7 +93,8 @@ export default { ] }, mapList: [], - currentModel: {} + currentModel: {}, + url: '' }; }, computed: { @@ -121,25 +123,49 @@ export default { this.$refs.createRace.doShow(row); }, showJoinUrl(index, row) { + const url = `${window.location.protocol}//${window.location.host}/jsxt/login?raceId=${row.id}`; + this.url = url; this.$messageBox(); - this.$alert(`${row.name}参赛地址:${window.location.protocol}//${window.location.host}/jsxt/login?raceId=${row.id}`, '', { - confirmButtonText: '确定', - showClose: false, - callback: action => {} + this.$confirm(`${row.name}参赛路径:${url}`, '参赛路径', { + confirmButtonText: '复制路径', + cancelButtonText: '关闭', + type: 'success' + }).then(() => { + const inputText = document.getElementById('competition-manage-url'); + inputText.select(); // 选择对象 + document.execCommand('Copy'); // 执行浏览器复制命令 + this.$message.success('参赛路径已经复制到粘贴板'); }); }, showApplyUrl(index, row) { - this.$alert(`${row.name}报名地址:${window.location.protocol}//${window.location.host}/jsxtApply?raceId=${row.id}`, '', { - confirmButtonText: '确定', - showClose: false, - callback: action => {} + // this.$messageBox(`${row.name}报名路径:${window.location.protocol}//${window.location.host}/jsxtApply?raceId=${row.id}`); + const url = `${window.location.protocol}//${window.location.host}/jsxtApply?raceId=${row.id}`; + this.url = url; + this.$messageBox(); + this.$confirm(`${row.name}报名路径:${url}`, '报名路径', { + confirmButtonText: '复制路径', + cancelButtonText: '关闭', + type: 'success' + }).then(() => { + const inputText = document.getElementById('competition-manage-url'); + inputText.select(); // 选择对象 + document.execCommand('Copy'); // 执行浏览器复制命令 + this.$message.success('报名路径已经复制到粘贴板'); }); }, showRefereeUrl(index, row) { - this.$alert(`${row.name}裁判地址:${window.location.protocol}//${window.location.host}/refereeJsxt/login?raceId=${row.id}`, '', { - confirmButtonText: '确定', - showClose: false, - callback: action => {} + const url = `${window.location.protocol}//${window.location.host}/refereeJsxt/login?raceId=${row.id}`; + this.url = url; + this.$messageBox(); + this.$confirm(`${row.name}裁判地址:${url}`, '报名路径', { + confirmButtonText: '复制路径', + cancelButtonText: '关闭', + type: 'success' + }).then(() => { + const inputText = document.getElementById('competition-manage-url'); + inputText.select(); // 选择对象 + document.execCommand('Copy'); // 执行浏览器复制命令 + this.$message.success('报名路径已经复制到粘贴板'); }); } }