From 546fd73fd2811b3fd61e408d45fb2452de5a577e Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 20 Jan 2020 10:15:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?iscs=20=E7=BB=98=E5=9B=BE=E7=BB=84=E4=BB=B6?= =?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/iscs/shape/airConditioner.js | 27 ----- src/iscs/shape/bas/airConditioner.js | 27 +++++ src/iscs/shape/bas/chiller.js | 8 +- src/iscs/shape/bas/fireDamper.js | 88 +++++++++++++++ src/iscs/shape/bas/frozenPump.js | 2 +- src/iscs/shape/bas/smookProofFd.js | 104 ++++++++++++++++++ .../shape/{ => bas}/volumeControlDamper.js | 4 +- src/iscs/shape/factory.js | 4 +- .../iscsDraw/iscsBasOperate/smookProofFd.vue | 6 +- 9 files changed, 231 insertions(+), 39 deletions(-) delete mode 100644 src/iscs/shape/airConditioner.js rename src/iscs/shape/{ => bas}/volumeControlDamper.js (86%) diff --git a/src/iscs/shape/airConditioner.js b/src/iscs/shape/airConditioner.js deleted file mode 100644 index afa2b844f..000000000 --- a/src/iscs/shape/airConditioner.js +++ /dev/null @@ -1,27 +0,0 @@ -import Group from 'zrender/src/container/Group'; -import createPathSvg from './components/pathsvg'; - -export default class AirConditioner extends Group { - constructor(device) { - super(); - this.model = device.model; - this.zlevel = device.model.zlevel; - this.z = device.model.z; - this._type = device.model._type; - this.code = device.model.code; - this.create(); - } - create() { - this.grouper = new Group({ - id: this.model.code, - position: [this.model.point.x, this.model.point.y] - }); - this.path = createPathSvg(this.model); - this.add(this.grouper); - this.grouper.add(this.path); - } - setModel(dx, dy) { - this.model.point.x += dx; - this.model.point.y += dy; - } -} diff --git a/src/iscs/shape/bas/airConditioner.js b/src/iscs/shape/bas/airConditioner.js index e69de29bb..761916083 100644 --- a/src/iscs/shape/bas/airConditioner.js +++ b/src/iscs/shape/bas/airConditioner.js @@ -0,0 +1,27 @@ +import Group from 'zrender/src/container/Group'; +import createPathSvg from '../components/pathsvg'; + +export default class airConditioner extends Group { + constructor(device) { + super(); + this.model = device.model; + this.zlevel = device.model.zlevel; + this.z = device.model.z; + this._type = device.model._type; + this.code = device.model.code; + this.create(); + } + create() { + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.path = createPathSvg(this.model); + this.add(this.grouper); + this.grouper.add(this.path); + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/shape/bas/chiller.js b/src/iscs/shape/bas/chiller.js index 163357065..009ff7d84 100644 --- a/src/iscs/shape/bas/chiller.js +++ b/src/iscs/shape/bas/chiller.js @@ -31,7 +31,7 @@ export default class chiller extends Group { }, style: { stroke:this.model.color, - lineWidth:1 + lineWidth:2 } }); this.circle1 = new Circle({ @@ -81,7 +81,7 @@ export default class chiller extends Group { }, style: { stroke:this.model.color, - lineWidth:1 + lineWidth:2 } }); @@ -104,7 +104,7 @@ export default class chiller extends Group { }, style: { stroke:this.model.color, - lineWidth:1 + lineWidth:2 } }); @@ -127,7 +127,7 @@ export default class chiller extends Group { }, style: { stroke:this.model.color, - lineWidth:1 + lineWidth:2 } }); diff --git a/src/iscs/shape/bas/fireDamper.js b/src/iscs/shape/bas/fireDamper.js index e69de29bb..314d23b61 100644 --- a/src/iscs/shape/bas/fireDamper.js +++ b/src/iscs/shape/bas/fireDamper.js @@ -0,0 +1,88 @@ +import Group from 'zrender/src/container/Group'; +import Polygon from 'zrender/src/graphic/shape/Polygon'; +import Polyline from 'zrender/src/graphic/shape/Polyline'; +import Circle from 'zrender/src/graphic/shape/Circle'; +export default class smookProofFd extends Group { + constructor(device) { + super(); + this.model = device.model; + this._type = device.model._type; + this._code = device.model.code; + this.zlevel = device.model.zlevel; + this.z = device.model.zlevel; + this.create(); + } + create() { + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.polygon1 = new Polygon({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [0, 0], + [this.model.width, 0], + [this.model.width, this.model.width / 2], + [0, this.model.width / 2] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.circle = new Circle({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + cx:this.model.width / 2, + cy:this.model.width / 4, + r:this.model.width / 4 + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + + this.polyline1 = new Polyline({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [0, 0], + [this.model.width, this.model.width / 2] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.polyline2 = new Polyline({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [this.model.width, 0], + [0, this.model.width / 2] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.grouper.add(this.polygon1); + this.grouper.add(this.circle); + this.grouper.add(this.polyline1); + this.grouper.add(this.polyline2); + this.add(this.grouper); + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/shape/bas/frozenPump.js b/src/iscs/shape/bas/frozenPump.js index 8782850f0..fdffe2fd0 100644 --- a/src/iscs/shape/bas/frozenPump.js +++ b/src/iscs/shape/bas/frozenPump.js @@ -26,7 +26,7 @@ export default class frozenPump extends Group { }, style: { stroke: this.model.color, - lineWidth:1 + lineWidth:2 } }); this.triangle = new Polygon({ diff --git a/src/iscs/shape/bas/smookProofFd.js b/src/iscs/shape/bas/smookProofFd.js index e69de29bb..d507eb028 100644 --- a/src/iscs/shape/bas/smookProofFd.js +++ b/src/iscs/shape/bas/smookProofFd.js @@ -0,0 +1,104 @@ +import Group from 'zrender/src/container/Group'; +import Polygon from 'zrender/src/graphic/shape/Polygon'; +import Polyline from 'zrender/src/graphic/shape/Polyline'; +import Ellipse from 'zrender/src/graphic/shape/Ellipse'; +export default class smookProofFd extends Group { + constructor(device) { + super(); + this.model = device.model; + this._type = device.model._type; + this._code = device.model.code; + this.zlevel = device.model.zlevel; + this.z = device.model.zlevel; + this.create(); + } + create() { + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.ellipse = new Ellipse({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + cx:this.model.width / 2, + cy:this.model.width * 0.4, + rx:this.model.width / 2, + ry:this.model.width * 0.4 + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.polyline1 = new Polyline({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [this.model.width / 2, this.model.width * 0.8], + [this.model.width / 2, this.model.width * 1.2] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.polyline2 = new Polyline({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [0, this.model.width * 1.2], + [this.model.width, this.model.width * 2.8] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.polyline3 = new Polyline({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [this.model.width, this.model.width * 1.2], + [0, this.model.width * 2.8] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + this.polygon1 = new Polygon({ + zlevel: this.model.zlevel, + z: this.model.z, + shape:{ + points:[ + [0, this.model.width * 1.2], + [this.model.width, this.model.width * 1.2], + [this.model.width, this.model.width * 2.8], + [0, this.model.width * 2.8] + ] + }, + style: { + stroke:this.model.color, + lineWidth:2 + } + }); + + this.grouper.add(this.ellipse); + this.grouper.add(this.polyline1); + this.grouper.add(this.polygon1); + this.grouper.add(this.polyline2); + this.grouper.add(this.polyline3); + this.add(this.grouper); + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/shape/volumeControlDamper.js b/src/iscs/shape/bas/volumeControlDamper.js similarity index 86% rename from src/iscs/shape/volumeControlDamper.js rename to src/iscs/shape/bas/volumeControlDamper.js index ec6a2aa7c..95648bc9f 100644 --- a/src/iscs/shape/volumeControlDamper.js +++ b/src/iscs/shape/bas/volumeControlDamper.js @@ -1,7 +1,7 @@ import Group from 'zrender/src/container/Group'; -import createPathSvg from './components/pathsvg'; +import createPathSvg from '../components/pathsvg'; -export default class VolumeControlDamper extends Group { +export default class volumeControlDamper extends Group { constructor(device) { super(); this.model = device.model; diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js index 6ccd31d0b..ec243933e 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -23,8 +23,8 @@ import BrakeMachine from './brakeMachine'; import EntranceGuard from './entranceGuard/index'; import SemiAutomaticTicketMachine from './semiAutomaticTicketMachine'; import TicketMachine from './ticketMachine'; -import AirConditioner from './airConditioner'; -import VolumeControlDamper from './volumeControlDamper'; +import AirConditioner from './bas/airConditioner'; +import VolumeControlDamper from './bas/volumeControlDamper'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; diff --git a/src/views/iscs/iscsDraw/iscsBasOperate/smookProofFd.vue b/src/views/iscs/iscsDraw/iscsBasOperate/smookProofFd.vue index 7494c7f87..47f71ef2b 100644 --- a/src/views/iscs/iscsDraw/iscsBasOperate/smookProofFd.vue +++ b/src/views/iscs/iscsDraw/iscsBasOperate/smookProofFd.vue @@ -5,7 +5,7 @@ - + @@ -33,7 +33,7 @@ export default { buttonText: '立即创建', form:{ code:'', - width: 40, + width: 20, x: 10, y: 10 }, @@ -103,7 +103,7 @@ export default { this.showDeleteButton = false; this.form = { code:'', - width: 40, + width: 20, x: 10, y: 10 }; From 8b68d80a81a2d2b8b1242df45e159b2b730fb5ee Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 20 Jan 2020 10:55:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A8=A1=E5=9D=97iscs?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 2 ++ src/router/index.js | 9 +++++---- src/views/iscs/iscsSystem/config/index.vue | 2 +- src/views/iscs/iscsSystem/index.vue | 9 ++++----- src/views/iscs/iscsSystem/nav.vue | 20 ++++++++++++++++---- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 454341397..65bd89553 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -106,6 +106,8 @@ export default { $route(val) { if (val.path === '/orderauthor/rules/manage') { this.$refs.keMenu.activeIndex = val.path; + } else if (val.path === '/design/home') { + this.$refs.keMenu.activeIndex = val.path; } } }, diff --git a/src/router/index.js b/src/router/index.js index 8b411d628..425ca9ad4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -940,15 +940,15 @@ export const asyncRouter = [ path: '/iscs', component: Layout, meta: { - i18n: 'router.iscsSystem', - roles: [admin] + i18n: 'router.iscsSystem' }, children: [ { path:'design', component: IscsDesign, meta: { - i18n: 'router.iscsDraw' + i18n: 'router.iscsDraw', + roles: [admin] }, children: [ { @@ -962,7 +962,8 @@ export const asyncRouter = [ path: 'system', component: IscsSystem, meta: { - i18n: 'router.iscsSystem' + i18n: 'router.iscsSystem', + roles: [admin, user] }, children: [ { diff --git a/src/views/iscs/iscsSystem/config/index.vue b/src/views/iscs/iscsSystem/config/index.vue index b56ca0df5..b9adeafdb 100644 --- a/src/views/iscs/iscsSystem/config/index.vue +++ b/src/views/iscs/iscsSystem/config/index.vue @@ -1,5 +1,5 @@