diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index 7f2951d39..f1824b32a 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -333,4 +333,19 @@ deviceRender[deviceType.IscsTriangle] = { zlevel:1, z: 5 }; + +/** 福州 圆形 */ +deviceRender[deviceType.IscsCircle] = { + _type: deviceType.IscsCircle, + zlevel:1, + z: 5 +}; + +/** 福州 屏蔽门 */ +deviceRender[deviceType.FuzhouPsd] = { + _type: deviceType.FuzhouPsd, + zlevel:1, + z: 5 +}; + export default deviceRender; diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js index 18392d076..c94e38467 100644 --- a/src/iscs/constant/deviceType.js +++ b/src/iscs/constant/deviceType.js @@ -51,7 +51,9 @@ const deviceType = { CommunicationButcher: 'CommunicationButcher', AfcDoorUnite: 'AfcDoorUnite', RectText: 'RectText', - IscsTriangle:'IscsTriangle' + IscsTriangle:'IscsTriangle', + IscsCircle:'IscsCircle', + FuzhouPsd:'FuzhouPsd' }; export default deviceType; diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js index 721ee81eb..6b505ca00 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -52,6 +52,8 @@ import CommunicationButcher from './communicationButcher'; import AfcDoorUnite from './afcDoorUnite'; import RectText from './rectText'; import IscsTriangle from './iscsTriangle'; +import IscsCircle from './iscsCircle'; +import FuzhouPsd from './fuzhouPsd'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; @@ -108,6 +110,8 @@ iscsShape[deviceType.CommunicationButcher] = CommunicationButcher; iscsShape[deviceType.AfcDoorUnite] = AfcDoorUnite; iscsShape[deviceType.RectText] = RectText; iscsShape[deviceType.IscsTriangle] = IscsTriangle; +iscsShape[deviceType.IscsCircle] = IscsCircle; +iscsShape[deviceType.FuzhouPsd] = FuzhouPsd; function shapefactory(device, iscs) { const type = device.model._type; diff --git a/src/iscs/shape/fuzhouPsd.js b/src/iscs/shape/fuzhouPsd.js new file mode 100644 index 000000000..e1aa716c3 --- /dev/null +++ b/src/iscs/shape/fuzhouPsd.js @@ -0,0 +1,87 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; + +export default class fuzhouPsd 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(); + this.setState(this.model); + } + create() { + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.fuzhouPsdBorder = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: 0, + y: 0, + width: this.model.height * 1.6, + height: this.model.height + }, + style: { + fill: '#c48b19', + stroke: '#f00', + lineWidth: 0 + } + }); + this.fuzhouPsdLeft = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: 3 + (this.model.height * 1.6 - 8) * 0.15, + y: 3, + width: (this.model.height * 1.6 - 8) * 0.35, + height: this.model.height - 6 + }, + style: { + fill: '#33CC00', + stroke: '#000', + lineWidth: 1 + } + }); + this.fuzhouPsdRight = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: (this.model.height * 1.6 - 8) * 0.5 + 5, + y: 3, + width: (this.model.height * 1.6 - 8) * 0.35, + height: this.model.height - 6 + }, + style: { + fill: '#33CC00', + stroke: '#000', + lineWidth: 1 + } + }); + this.grouper.add(this.fuzhouPsdBorder); + this.grouper.add(this.fuzhouPsdLeft); + this.grouper.add(this.fuzhouPsdRight); + this.add(this.grouper); + } + setState(model) { + if (model.alarm) { + this.fuzhouPsdBorder.setStyle('lineWidth', 1); + } + if (model.noStatus) { + this.fuzhouPsdLeft.attr({shape:{x: 3}}); + this.fuzhouPsdRight.attr({shape:{x: this.model.height * 1.04 - 0.2}}); + this.fuzhouPsdBorder.setStyle('fill', '#0f96dc'); + this.fuzhouPsdRight.setStyle('fill', '#0f96dc'); + this.fuzhouPsdLeft.setStyle('fill', '#0f96dc'); + } + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } + +} diff --git a/src/iscs/shape/iscsCircle.js b/src/iscs/shape/iscsCircle.js new file mode 100644 index 000000000..e5d6b8e4a --- /dev/null +++ b/src/iscs/shape/iscsCircle.js @@ -0,0 +1,41 @@ +import Group from 'zrender/src/container/Group'; +import Circle from 'zrender/src/graphic/shape/Circle'; + +export default class iscsCircle 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.z; + this.create(); + } + create() { + const model = this.model; + this.grouper = new Group({ + id: model.code, + position: [model.point.x, model.point.y] + }); + this.iscsCircle = new Circle({ + zlevel: model.zlevel, + z: model.z, + shape: { + cx:this.model.radius, + cy:this.model.radius, + r:this.model.radius + }, + style: { + fill: this.model.fillColor, + stroke: this.model.strokeColor, + lineWidth: this.model.borderWidth + } + }); + this.grouper.add(this.iscsCircle); + this.add(this.grouper); + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js index 788d8dc44..e57bd5784 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -202,6 +202,12 @@ export function parser(data) { zrUtil.each(data.iscsTriangleList || [], elem=> { iscsDevice[elem.code] = deviceFactory(deviceType.IscsTriangle, elem); }); + zrUtil.each(data.iscsCircleList || [], elem=> { + iscsDevice[elem.code] = deviceFactory(deviceType.IscsCircle, elem); + }); + zrUtil.each(data.fuzhouPsdList || [], elem=> { + iscsDevice[elem.code] = deviceFactory(deviceType.FuzhouPsd, elem); + }); } return iscsDevice; diff --git a/src/views/iscs/iscsDraw/icscComponents/circle.vue b/src/views/iscs/iscsDraw/icscComponents/circle.vue new file mode 100644 index 000000000..b0195e332 --- /dev/null +++ b/src/views/iscs/iscsDraw/icscComponents/circle.vue @@ -0,0 +1,147 @@ + + + + diff --git a/src/views/iscs/iscsDraw/icscComponents/triangle.vue b/src/views/iscs/iscsDraw/icscComponents/triangle.vue index a810e94e3..dd38636be 100644 --- a/src/views/iscs/iscsDraw/icscComponents/triangle.vue +++ b/src/views/iscs/iscsDraw/icscComponents/triangle.vue @@ -106,7 +106,7 @@ export default { x: this.form.x, y: this.form.y }, - code: this.isUpdate ? this.form.code : getUID('IscsTriangle', this.iscs.iscsRectList), + code: this.isUpdate ? this.form.code : getUID('IscsTriangle', this.iscs.iscsTriangleList), _type: 'IscsTriangle', fillColor: this.form.fillColor, borderWidth: this.form.borderWidth, diff --git a/src/views/iscs/iscsDraw/iscsAutomatic/index.vue b/src/views/iscs/iscsDraw/iscsAutomatic/index.vue index a77b2987a..099310688 100644 --- a/src/views/iscs/iscsDraw/iscsAutomatic/index.vue +++ b/src/views/iscs/iscsDraw/iscsAutomatic/index.vue @@ -42,7 +42,7 @@ @deleteDataModel="deleteDataModel" /> - + - + - + - + +
+ + + + + + + + + + + + {{ buttonText }} + 删除 + 取消 + + +
+ + + + + diff --git a/src/views/iscs/iscsDraw/iscsPsd/index.vue b/src/views/iscs/iscsDraw/iscsPsd/index.vue index aa545a283..271d01747 100644 --- a/src/views/iscs/iscsDraw/iscsPsd/index.vue +++ b/src/views/iscs/iscsDraw/iscsPsd/index.vue @@ -50,9 +50,25 @@ @deleteDataModel="deleteDataModel" />
+ + + + + +