From d8f8acfe02ea1fa59ca04e5cdbf027f0e8270470 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 2 Dec 2020 14:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E8=B0=83=E6=95=B4&=E5=93=88?= =?UTF-8?q?=E5=B0=94=E6=BB=A8=E5=8C=BA=E6=AE=B5=E9=99=90=E9=80=9F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/chengdu_01.js | 5 + src/jmapNew/config/skinCode/chengdu_03.js | 5 + src/jmapNew/config/skinCode/haerbin_01.js | 17 +- src/jmapNew/config/skinCode/race_01.js | 5 + src/jmapNew/shape/Section/ELimitName.js | 220 +++++++++--------- src/jmapNew/theme/chengdu_03/menus/index.vue | 1 - .../theme/haerbin_01/menus/menuButton.vue | 35 ++- src/router/index_Common.js | 2 +- src/utils/baseUrl.js | 4 +- src/views/system/companyManage/manager.vue | 3 + 10 files changed, 183 insertions(+), 114 deletions(-) diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 5a083dcd0..53f27194f 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -108,6 +108,11 @@ class SkinCode extends defaultStyle { }, speedLimitName: { z: 10, + leftName: true, // 左侧限速值是否展示 + rightName: true, // 右侧限速值是否展示 + nameBackgroundIsRect: false, // 限速值背景是否为矩形 + nameBackgroundBorderWidth: 0, // 限速值背景是否边框宽度 + nameBackgroundBorderColor: '#000', // 限速值背景边框颜色 limitValueDistance: -15, kilometerFontSize: 8, // 公里标大小 kilometerColor: '#fff', // 公里标颜色 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 6e34272f1..3604709ca 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -108,6 +108,11 @@ class SkinCode extends defaultStyle { }, speedLimitName: { z: 10, + leftName: true, // 左侧限速值是否展示 + rightName: true, // 右侧限速值是否展示 + nameBackgroundIsRect: false, // 限速值背景是否为矩形 + nameBackgroundBorderWidth: 0, // 限速值背景是否边框宽度 + nameBackgroundBorderColor: '#000', // 限速值背景边框颜色 limitValueDistance: -15, kilometerFontSize: 8, // 公里标大小 kilometerColor: '#fff', // 公里标颜色 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 57364c7a8..ea1d37e3e 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -6,7 +6,7 @@ class SkinCode extends defaultStyle { super(); this.fontFamily = '宋体'; this[deviceType.Section] = { - elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionBlock', 'speedLimit'], + elemnetType:['name', 'logicText', 'standTrackText', 'reentryTrackText', 'transferTrackText', 'line', 'lineBorder', 'sectionBlock', 'speedLimitName'], active: { routeColor: false // 进路触发颜色 }, @@ -113,6 +113,21 @@ class SkinCode extends defaultStyle { lineColor: '#FFFF00', // 限速线颜色 nameShow: false // 名称显示 }, + speedLimitName: { + z: 10, + leftName: true, // 左侧限速值是否展示 + rightName: false, // 右侧限速值是否展示 + nameBackgroundIsRect: true, // 限速值背景是否为矩形 + nameBackgroundBorderWidth: 1, // 限速值背景是否边框宽度 + nameBackgroundBorderColor: '#C00808', // 限速值背景边框颜色 + limitValueDistance: 18, + kilometerFontSize: 0, // 公里标大小 + nameNumberFontSize: 11, // 限速值大小 + nameNumberColor: '#C00808', // 限速值颜色 + nameBackground: '#000', // 限速名称背景颜色 + drogueWidth: 15, // 浮标宽度 + drogueHeight: 12 // 浮标高度 + }, separator: { z: 3, // 分割符层级 width: 1.2, // 分隔符宽度 diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index ec4c206a0..5c4ab8f49 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -68,6 +68,11 @@ class SkinCode extends defaultStyle { }, speedLimitName: { z: 10, + leftName: true, // 左侧限速值是否展示 + rightName: true, // 右侧限速值是否展示 + nameBackgroundIsRect: false, // 限速值背景是否为矩形 + nameBackgroundBorderWidth: 0, // 限速值背景是否边框宽度 + nameBackgroundBorderColor: '#C00808', // 限速值背景边框颜色 limitValueDistance: 15, // 限速值距离 kilometerFontSize: 0, // 公里标大小 kilometerColor: '#000', // 公里标颜色 diff --git a/src/jmapNew/shape/Section/ELimitName.js b/src/jmapNew/shape/Section/ELimitName.js index 6b2640a1e..e499eb94c 100644 --- a/src/jmapNew/shape/Section/ELimitName.js +++ b/src/jmapNew/shape/Section/ELimitName.js @@ -22,110 +22,122 @@ export default class ELimitName extends Group { const y1 = model.points[0].y + style.Section.speedLimitName.limitValueDistance; const x2 = model.points[model.points.length - 1].x; const y2 = model.points[model.points.length - 1].y + style.Section.speedLimitName.limitValueDistance; - this.leftPolygon = new Polygon({ - zlevel: this.zlevel, - z: this.z + 9, - shape: { - points: [ - [x1, y1], - [x1 + rectW, y1], - [x1 + (rectW + rectH / 2), y1 - rectH / 2], - [x1 + rectW, y1 - rectH], - [x1, y1 - rectH] - ] - }, - style: { - lineWidth: 0, - fill: style.Section.speedLimitName.nameBackground - } - }); - this.rightPolygon = new Polygon({ - zlevel: this.zlevel, - z: this.z + 9, - shape: { - points: [ - [x2, y2], - [x2 - rectW, y2], - [x2 - (rectW + rectH / 2), y2 - rectH / 2], - [x2 - rectW, y2 - rectH], - [x2, y2 - rectH] - ] - }, - style: { - lineWidth: 0, - fill: style.Section.speedLimitName.nameBackground - } - }); - this.leftLimitValue = new Text({ - zlevel: this.zlevel, - z: this.z + 10, - style: { - x: x1 + 2, - y: y1, - fontWeight: 'normal', - fontSize: style.Section.speedLimitName.nameNumberFontSize, - fontFamily: style.fontFamily, - text: '', - textFill: style.Section.speedLimitName.nameNumberColor, - textAlign: 'left', - textPosition: style.Section.name.textPosition || 'inside', - textVerticalAlign: 'bottom' - } - }); - this.rightLimitValue = new Text({ - zlevel: this.zlevel, - z: this.z + 10, - style: { - x: x2 - 2, - y: y2, - fontWeight: 'normal', - fontSize: style.Section.speedLimitName.nameNumberFontSize, - fontFamily: style.fontFamily, - text: '', - textFill: style.Section.speedLimitName.nameNumberColor, - textAlign: 'right', - textPosition: style.Section.name.textPosition || 'inside', - textVerticalAlign: 'bottom' - } - }); - this.leftKilometerValue = new Text({ - zlevel: this.zlevel, - z: this.z + 10, - style: { - x: x1, - y: y1 + 12, - fontWeight: 'normal', - fontSize: style.Section.speedLimitName.kilometerFontSize, - fontFamily: style.fontFamily, - text: '17.981km', - textFill: style.Section.speedLimitName.kilometerColor, - textAlign: 'left', - textPosition: style.Section.name.textPosition || 'inside', - textVerticalAlign: 'bottom' - } - }); - this.rightKilometerValue = new Text({ - zlevel: this.zlevel, - z: this.z + 10, - style: { - x: x2, - y: y2 + 12, - fontWeight: 'normal', - fontSize: style.Section.speedLimitName.kilometerFontSize, - fontFamily: style.fontFamily, - text: '17.981km', - textFill: style.Section.speedLimitName.kilometerColor, - textAlign: 'right', - textPosition: style.Section.name.textPosition || 'inside', - textVerticalAlign: 'bottom' - } - }); - this.add(this.leftPolygon); - this.add(this.rightPolygon); - this.add(this.leftLimitValue); - this.add(this.rightLimitValue); - this.add(this.leftKilometerValue); - this.add(this.rightKilometerValue); + if (style.Section.speedLimitName.leftName) { + const leftPoints = style.Section.speedLimitName.nameBackgroundIsRect ? [[x1, y1], + [x1 + rectW, y1], + [x1 + rectW, y1 - rectH], + [x1, y1 - rectH]] : [[x1, y1], + [x1 + rectW, y1], + [x1 + (rectW + rectH / 2), y1 - rectH / 2], + [x1 + rectW, y1 - rectH], + [x1, y1 - rectH]]; + this.leftPolygon = new Polygon({ + zlevel: this.zlevel, + z: this.z + 9, + shape: { + points: leftPoints + }, + style: { + lineWidth: style.Section.speedLimitName.nameBackgroundBorderWidth, + fill: style.Section.speedLimitName.nameBackground, + stroke: style.Section.speedLimitName.nameBackgroundBorderColor + } + }); + this.leftLimitValue = new Text({ + zlevel: this.zlevel, + z: this.z + 10, + style: { + x: x1 + 2, + y: y1, + fontWeight: 'normal', + fontSize: style.Section.speedLimitName.nameNumberFontSize, + fontFamily: style.fontFamily, + text: '', + textFill: style.Section.speedLimitName.nameNumberColor, + textAlign: 'left', + textPosition: style.Section.name.textPosition || 'inside', + textVerticalAlign: 'bottom' + } + }); + this.leftKilometerValue = new Text({ + zlevel: this.zlevel, + z: this.z + 10, + style: { + x: x1, + y: y1 + 12, + fontWeight: 'normal', + fontSize: style.Section.speedLimitName.kilometerFontSize, + fontFamily: style.fontFamily, + text: '17.981km', + textFill: style.Section.speedLimitName.kilometerColor, + textAlign: 'left', + textPosition: style.Section.name.textPosition || 'inside', + textVerticalAlign: 'bottom' + } + }); + this.add(this.leftPolygon); + this.add(this.leftLimitValue); + this.add(this.leftKilometerValue); + } + if (style.Section.speedLimitName.rightName) { + const rightPoints = style.Section.speedLimitName.nameBackgroundIsRect ? [[x2, y2], + [x2 - rectW, y2], + [x2 - rectW, y2 - rectH], + [x2, y2 - rectH]] : [[x2, y2], + [x2 - rectW, y2], + [x2 - (rectW + rectH / 2), y2 - rectH / 2], + [x2 - rectW, y2 - rectH], + [x2, y2 - rectH]]; + this.rightPolygon = new Polygon({ + zlevel: this.zlevel, + z: this.z + 9, + shape: { + points: rightPoints + }, + style: { + lineWidth: style.Section.speedLimitName.nameBackgroundBorderWidth, + fill: style.Section.speedLimitName.nameBackground, + stroke: style.Section.speedLimitName.nameBackgroundBorderColor + } + }); + + this.rightLimitValue = new Text({ + zlevel: this.zlevel, + z: this.z + 10, + style: { + x: x2 - 2, + y: y2, + fontWeight: 'normal', + fontSize: style.Section.speedLimitName.nameNumberFontSize, + fontFamily: style.fontFamily, + text: '', + textFill: style.Section.speedLimitName.nameNumberColor, + textAlign: 'right', + textPosition: style.Section.name.textPosition || 'inside', + textVerticalAlign: 'bottom' + } + }); + + this.rightKilometerValue = new Text({ + zlevel: this.zlevel, + z: this.z + 10, + style: { + x: x2, + y: y2 + 12, + fontWeight: 'normal', + fontSize: style.Section.speedLimitName.kilometerFontSize, + fontFamily: style.fontFamily, + text: '17.981km', + textFill: style.Section.speedLimitName.kilometerColor, + textAlign: 'right', + textPosition: style.Section.name.textPosition || 'inside', + textVerticalAlign: 'bottom' + } + }); + this.add(this.rightPolygon); + this.add(this.rightLimitValue); + this.add(this.rightKilometerValue); + } } hide() { diff --git a/src/jmapNew/theme/chengdu_03/menus/index.vue b/src/jmapNew/theme/chengdu_03/menus/index.vue index ef111f7ad..c88200ad3 100644 --- a/src/jmapNew/theme/chengdu_03/menus/index.vue +++ b/src/jmapNew/theme/chengdu_03/menus/index.vue @@ -33,7 +33,6 @@ export default { components: { MenuBar, MenuButton, - MenuCancel, MenuSignal, MenuSwitch, MenuSection, diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index 502992822..00cc4ea77 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -53,7 +53,7 @@ :data="tempData" border :cell-style="tableStyle" - style="width: 100%;background: #E0E0E0;border: none;outline: none; height: 56px" + style="width: 100%;background: #E0E0E0;border: none;outline: none; height: 28px" size="mini" class="haerbin_table" highlight-current-row @@ -61,6 +61,14 @@ > + + + @@ -147,6 +155,8 @@ export default { data() { return { tempData: [], + speedList: [{label: '15km/h', value: 15}, {label: '25km/h', value:25}, {label: '45km/h', value:45}, {label: '60km/h', value: 60}], + speedLimitValue: 15, oldDevice: null, // 上一次点击元素 canCommand: true, cr1Confrim: false, @@ -204,6 +214,9 @@ export default { }, cr2ConfirmId() { return OperationEvent.Command.commandHaerbin.confrimCr2.domId; + }, + speedShow() { + return this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED; } }, watch: { @@ -373,8 +386,7 @@ export default { this.tempData.push(this.selectedObj); this.param = { switchCode: this.selectedObj.code, - sectionCode: section.code, - speedLimitValue: '5' // 默认区段临时限速 + sectionCode: section.code }; }, handleSingalMenu() { @@ -468,8 +480,7 @@ export default { this.tempData = []; this.tempData.push(this.selectedObj); this.param = { - sectionCode: this.selectedObj.code, - speedLimitValue: '5' + sectionCode: this.selectedObj.code }; }, handleDirectionRodMenu() { @@ -577,6 +588,9 @@ export default { }); } } + if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) { + this.param.speedLimitValue = this.speedLimitValue; + } }, command() { this.handleParam(); @@ -652,6 +666,7 @@ export default { this.operate = ''; // 清空指令 this.cmdType = ''; this.securityCommand = ''; + this.speedLimitValue = 15; this.secondConfirm = false; this.cr1Confrim = false; if (this.oldClickObj) { @@ -804,6 +819,16 @@ export default { height: 20px; line-height: 20px; } + /deep/.el-input--small .el-input__inner{ + height: 28px; + line-height: 28px; + } + /deep/.el-table__empty-text{ + line-height: 28px; + } + /deep/.el-table__empty-block{ + min-height: 28px; + }