From 01ed5397ad2d251cea9047d11e5cba0bb45437b7 Mon Sep 17 00:00:00 2001 From: yuan Date: Mon, 12 Jul 2021 10:37:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ibp=E7=9B=98=E6=8C=89=E9=92=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=AE=E7=81=AF=E9=A2=9C=E8=89=B2=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/ibp.js | 7 ++++ src/i18n/langs/zh/ibp.js | 7 ++++ src/ibp/shape/button.js | 7 +++- src/scripts/ConstDic.js | 4 +-- .../ibp/ibpDraw/ibpOperate/ibpButton.vue | 32 +++++++++++++++---- 5 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/i18n/langs/en/ibp.js b/src/i18n/langs/en/ibp.js index 20910b09b..d6c095707 100644 --- a/src/i18n/langs/en/ibp.js +++ b/src/i18n/langs/en/ibp.js @@ -36,6 +36,13 @@ export default { backgroundHeight: 'backgroundHeight', buttonCode: 'Button code', buttonColor: 'Button color', + buttonLightColor: 'Button Light Color', + red: 'Red', + blue: 'Blue', + yellow: 'Yellow', + green: 'Green', + gray: 'White', + button: 'Button', buttonWidth: 'Button width', redButton: 'Red button', blueButton: 'Blue button', diff --git a/src/i18n/langs/zh/ibp.js b/src/i18n/langs/zh/ibp.js index 8e437bc29..15ffb5f34 100644 --- a/src/i18n/langs/zh/ibp.js +++ b/src/i18n/langs/zh/ibp.js @@ -41,6 +41,13 @@ export default { backgroundHeight: '背景板高度', buttonCode: '按钮编号', buttonColor: '按钮颜色', + buttonLightColor: '按钮灯颜色', + red: '红色', + blue: '蓝色', + yellow: '黄色', + green: '绿色', + gray: '白色', + button: '按钮', buttonWidth: '按钮宽度', redButton: '红色按钮', blueButton: '蓝色按钮', diff --git a/src/ibp/shape/button.js b/src/ibp/shape/button.js index 0c5ec21d5..e364555cf 100644 --- a/src/ibp/shape/button.js +++ b/src/ibp/shape/button.js @@ -86,7 +86,12 @@ export default class button extends Group { } getImagePic() { - const color = colors.get(`${this.model.color}${this.model.pressed ? '_pressed' : ''}_${this.model.status}`); + let color; + if (this.model.status === 'on') { + color = colors.get(`${this.model.lightColor || this.model.color}${this.model.pressed ? '_pressed' : ''}_on`) + } else if (this.model.status === 'off') { + color = colors.get(`${this.model.color}${this.model.pressed ? '_pressed' : ''}_off`) + } return color; } diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 4d65f4370..ff4a74f3c 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -139,8 +139,8 @@ export const IbpOperation = { XXYS: {operate: '09', event: 'XXYS', name: '下行钥匙'}, SXYS: {operate: '11', event: 'SXYS', name: '上行钥匙'}, AXLE_RESET: {operate: '12', event: 'AXLE_RESET', name: '计轴复位'}, - AXLE_PRE_RESET: {operate: '13', event: 'AXLE_PRE_RESET', name: '计轴预复位'}, - PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复零'}, + AXLE_PRE_RESET: {operate: '13', event: 'AXLE_PRE_RESET', name: '计轴区段复位'}, + PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复位'}, SD: {operate: '15', event: 'SD', name: '试灯'}, XXGM: {operate: '16', event: 'XXGM', name: '下行屏蔽门开门'}, SXGM: {operate: '17', event: 'SXGM', name: '上行屏蔽门开门'}, diff --git a/src/views/ibp/ibpDraw/ibpOperate/ibpButton.vue b/src/views/ibp/ibpDraw/ibpOperate/ibpButton.vue index ce233aca4..7bd7ace7d 100644 --- a/src/views/ibp/ibpDraw/ibpOperate/ibpButton.vue +++ b/src/views/ibp/ibpDraw/ibpOperate/ibpButton.vue @@ -10,11 +10,23 @@ - - - - - + + + + + + + @@ -86,14 +98,16 @@ export default { { label: "屏蔽门开门", value: "KM" }, { label: "屏蔽门关门", value: "GM" }, { label: "计轴复位", value: "AXLE_RESET" }, - { label: "计轴预复位", value: "AXLE_PRE_RESET" }, - { label: "计轴预复零", value: "PRERESET_Z" }, + { label: "计轴区段复位", value: "AXLE_PRE_RESET" }, + { label: "计轴预复位", value: "PRERESET_Z" }, { label: "试灯", value: "SD" } ], + colors: ["red", "yellow", "blue", "green", "gray"], operateWithoutDirections: ["AXLE_RESET", "AXLE_PRE_RESET", "PRERESET_Z", "SD"], form: { code: "", buttonColor: "red", + buttonLightColor: "", buttonWidth: 25, x: 10, y: 10, @@ -125,6 +139,7 @@ export default { this.isUpdate = true; this.form.code = model.code; this.form.buttonColor = model.color; + this.form.buttonLightColor = model.lightColor; this.form.buttonWidth = model.width; this.form.x = model.point.x; this.form.y = model.point.y; @@ -167,6 +182,7 @@ export default { _type: "SquareButton", code: this.form.code, color: this.form.buttonColor, + lightColor: this.form.buttonLightColor, status: "off", width: this.form.buttonWidth, mean: this.form.mean, @@ -189,6 +205,7 @@ export default { _type: "SquareButton", code: this.form.code, color: this.form.buttonColor, + lightColor: this.form.buttonLightColor, status: "off", width: this.form.buttonWidth, mean: this.form.mean, @@ -205,6 +222,7 @@ export default { this.form = { code: "", buttonColor: "red", + buttonLightColor: "", buttonWidth: 25, x: 10, y: 10, From 79a85639fc312a0a8f5866b348a8e61525eb18f7 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 12 Jul 2021 10:38:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=BC=80=E6=94=BE=E5=80=8D=E9=80=9F=E5=8A=9F=E8=83=BD=EF=BC=88?= =?UTF-8?q?5=E5=80=8D=E9=80=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/displayNew/menuSchema.vue | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 5b11be398..e98baf39e 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -2,7 +2,7 @@
- +