diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index d464329d5..6f1ed7e84 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -59,4 +59,11 @@ deviceRender[deviceType.Vidicon] = { z: 4 }; +/** 端头门渲染配置*/ +deviceRender[deviceType.EndDoor] = { + _type: deviceType.EndDoor, + zlevel: 1, + z: 4 +}; + export default deviceRender; diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js index ad36705d5..471c45848 100644 --- a/src/iscs/constant/deviceType.js +++ b/src/iscs/constant/deviceType.js @@ -7,7 +7,8 @@ const deviceType = { GasFireControl: 'gasFireControl', SmokeDetector: 'smokeDetector', TemperatureDetector: 'temperatureDetector', - PlatformScreenDoor: 'platformScreenDoor' + PlatformScreenDoor: 'platformScreenDoor', + EndDoor: 'endDoor' }; export default deviceType; diff --git a/src/iscs/shape/endDoor.js b/src/iscs/shape/endDoor.js new file mode 100644 index 000000000..d713e0bdb --- /dev/null +++ b/src/iscs/shape/endDoor.js @@ -0,0 +1,67 @@ +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import Circle from 'zrender/src/graphic/shape/Circle'; + +export default class EndDoor 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.add(this.grouper); + this.door = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: 0, + y: 0, + width: this.model.width, + height: this.model.width * 29 / 17 + }, + style: { + fill: '#33CC00' + } + }); + this.doorWindow = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: this.model.width * 2 / 17, + y: this.model.width * 6 / 17, + width: this.model.width * 13 / 17, + height: this.model.width * 4 / 17 + }, + style: { + fill: '#000' + } + }); + this.doorknob = new Circle({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: this.model.width * 13 / 17, + cy: this.model.width * 21 / 17, + r: this.model.width / 17 + }, + style: { + fill: '#000' + } + }); + this.grouper.add(this.door); + this.grouper.add(this.doorWindow); + this.grouper.add(this.doorknob); + } + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js index 964b93a36..d3454194f 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -8,6 +8,7 @@ import GasFireControl from './gasFireControl'; import SmokeDetector from './smokeDetector'; import TemperatureDetector from './temperatureDetector'; import PlatformScreenDoor from './psd/platformScreenDoor'; +import EndDoor from './endDoor'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; @@ -19,6 +20,7 @@ iscsShape[deviceType.GasFireControl] = GasFireControl; iscsShape[deviceType.SmokeDetector] = SmokeDetector; iscsShape[deviceType.TemperatureDetector] = TemperatureDetector; iscsShape[deviceType.PlatformScreenDoor] = PlatformScreenDoor; +iscsShape[deviceType.EndDoor] = EndDoor; function shapefactory(device, iscs) { const type = device.model._type; diff --git a/src/iscs/shape/stateTable.js b/src/iscs/shape/stateTable.js new file mode 100644 index 000000000..00773fd59 --- /dev/null +++ b/src/iscs/shape/stateTable.js @@ -0,0 +1,38 @@ +import Group from 'zrender/src/container/Group'; +const mean = { + slidingDoorEmergencyDoorOpenMalfunction : '滑动门&应急门开门故障', + slidingDoorEmergencyDoorCloseMalfunction: '滑动门&应急门关门故障', + slidingDoorsInterlockAllClear: '滑动门互锁解除报警', + emergencyControlPanelOperation: '紧急控制盘操作', + emergencyControlPanelOperationOpenCommand: '紧急控制盘操作开门命令', + emergencyControlPanelOperationCloseCommand: '紧急控制盘操作关门命令', + localControlPanelOperation: '就地控制盘操作', + localControlPanelOperationOpenCommand: '就地控制盘操作开门命令', + localControlPanelOperationCloseCommand: '就地控制盘操作关门命令', + automaticOpenOrder: '自动开门命令', + automaticCloseOrder: '自动开门命令', + allDoorsOpenInPlace: '所有门开到位', + allDoorsCloseInPlace: '所有门关到位', + systemDrivePowerFailure: '系统驱动电源故障', + systemControlPowerFailure: '系统控制电源故障', + monitorPowerFailure: '监视电源故障' + +}; +export default class StateTable 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(); + } + cerate() { + // this.header = + } + 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 793303cf6..1e5f206ce 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -64,6 +64,10 @@ export function parser(data) { zrUtil.each(data.platformScreenDoorList || [], elem =>{ iscsDevice[elem.code] = deviceFactory(deviceType.PlatformScreenDoor, elem); }); + + zrUtil.each(data.endDoorList || [], elem =>{ + iscsDevice[elem.code] = deviceFactory(deviceType.EndDoor, elem); + }); } return iscsDevice; @@ -108,6 +112,9 @@ export function updateIscsData(device) { case deviceType.FrozenPump : updateIscsListByDevice(iscsData, 'frozenPumpList', device); break; + case deviceType.EndDoor: + updateIscsListByDevice(iscsData, 'endDoorList', device); + break; } store.dispatch('iscs/setIscsData', iscsData); diff --git a/src/views/system/iscsDraw/iscsPsdOperate/endDoor.vue b/src/views/system/iscsDraw/iscsPsdOperate/endDoor.vue new file mode 100644 index 000000000..34a012a6f --- /dev/null +++ b/src/views/system/iscsDraw/iscsPsdOperate/endDoor.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/views/system/iscsDraw/iscsPsdOperate/index.vue b/src/views/system/iscsDraw/iscsPsdOperate/index.vue index 61cc048f3..5bd546343 100644 --- a/src/views/system/iscsDraw/iscsPsdOperate/index.vue +++ b/src/views/system/iscsDraw/iscsPsdOperate/index.vue @@ -18,6 +18,14 @@ @deleteDataModel="deleteDataModel" /> + + + @@ -26,11 +34,13 @@