diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index d26cb3674..a24b8d7c6 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -65,6 +65,12 @@ deviceRender[deviceType.Ventilator] = { zlevel: 1, z: 4 }; +/** VidiconCloud渲染配置*/ +deviceRender[deviceType.VidiconCloud] = { + _type: deviceType.VidiconCloud, + zlevel: 1, + z: 4 +}; /** 冷水机渲染配置*/ deviceRender[deviceType.Chiller] = { @@ -79,5 +85,11 @@ deviceRender[deviceType.CoolTower] = { zlevel: 1, 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 948fa21b2..725930728 100644 --- a/src/iscs/constant/deviceType.js +++ b/src/iscs/constant/deviceType.js @@ -1,6 +1,7 @@ const deviceType = { ManualAlarmButton: 'manualAlarmButton', Vidicon: 'Vidicon', + VidiconCloud: 'VidiconCloud', CheckBox: 'CheckBox', FrozenPump:'FrozenPump', FireHydranAlarmButton: 'fireHydranAlarmButton', @@ -10,7 +11,8 @@ const deviceType = { PlatformScreenDoor: 'platformScreenDoor', Ventilator:'Ventilator', Chiller:'Chiller', - CoolTower:'CoolTower' + CoolTower:'CoolTower', + EndDoor: 'endDoor' }; export default deviceType; diff --git a/src/iscs/shape/Vidicon.js b/src/iscs/shape/Vidicon.js index fde5bea83..f90edb516 100644 --- a/src/iscs/shape/Vidicon.js +++ b/src/iscs/shape/Vidicon.js @@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; import Polyline from 'zrender/src/graphic/shape/Polyline'; -export default class Button extends Group { +export default class Vidicon extends Group { constructor(device) { super(); this.model = device.model; diff --git a/src/iscs/shape/VidiconCloud.js b/src/iscs/shape/VidiconCloud.js new file mode 100644 index 000000000..ce9604134 --- /dev/null +++ b/src/iscs/shape/VidiconCloud.js @@ -0,0 +1,66 @@ +import Group from 'zrender/src/container/Group'; +import Sector from 'zrender/src/graphic/shape/Sector'; +import Polyline from 'zrender/src/graphic/shape/Polyline'; + +export default class VidiconCloud 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() { + console.log(this.model, Math.cos(45 * (Math.PI / 180))); + this.grouper = new Group({ + id: this.model.code, + position: [this.model.point.x, this.model.point.y] + }); + this.semicircle = new Sector({ + zlevel: this.model.zlevel, + z: this.model.z, + shape: { + cx: this.model.point.x, + cy: this.model.point.y, + r: this.model.r || 30, + startAngle: 0, + endAngle: Math.PI, + clockwise: true + }, + style: { + stroke: '#00FF00', + lineWidth: 2, + fill: 'rgba(0,0,0,0)' + } + }); + + this.Polyline = new Polyline({ + zlevel: this.model.zlevel, + z: this.model.z + 1, + shape: { + points: [ + [this.model.point.x + this.model.r / 2, this.model.point.y], + [this.model.point.x - Math.cos(45 * (Math.PI / 180)) * this.model.r, this.model.point.y + Math.sin(45 * (Math.PI / 180)) * this.model.r], + [this.model.point.x - Math.cos(55 * (Math.PI / 180)) * this.model.r, this.model.point.y + Math.sin(55 * (Math.PI / 180)) * this.model.r], + [this.model.point.x + this.model.r / 1.2, this.model.point.y] + ] + }, + style: { + stroke: '#00FF00', + lineWidth: 2, + fill: '#00FF00' + } + }); + + this.grouper.add(this.semicircle); + this.grouper.add(this.Polyline); + this.add(this.grouper); + } + + setModel(dx, dy) { + this.model.point.x += dx; + this.model.point.y += dy; + } +} 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 5b6a6d7d2..305149db1 100644 --- a/src/iscs/shape/factory.js +++ b/src/iscs/shape/factory.js @@ -1,5 +1,6 @@ import ManualAlarmButton from './manualAlarmButton'; import Vidicon from './Vidicon'; +import VidiconCloud from './VidiconCloud'; import deviceType from '../constant/deviceType'; import CheckBox from './checkBox'; import FrozenPump from './bas/frozenPump'; @@ -11,10 +12,12 @@ import PlatformScreenDoor from './psd/platformScreenDoor'; import Ventilator from './bas/ventilator'; import Chiller from './bas/chiller'; import CoolTower from './bas/coolTower'; +import EndDoor from './endDoor'; const iscsShape = {}; iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton; iscsShape[deviceType.Vidicon] = Vidicon; +iscsShape[deviceType.VidiconCloud] = VidiconCloud; iscsShape[deviceType.CheckBox] = CheckBox; iscsShape[deviceType.FrozenPump] = FrozenPump; iscsShape[deviceType.FireHydranAlarmButton] = FireHydranAlarmButton; @@ -25,6 +28,7 @@ iscsShape[deviceType.PlatformScreenDoor] = PlatformScreenDoor; iscsShape[deviceType.Ventilator] = Ventilator; iscsShape[deviceType.Chiller] = Chiller; iscsShape[deviceType.CoolTower] = CoolTower; +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 790d2d2b6..de14ac1e4 100644 --- a/src/iscs/utils/parser.js +++ b/src/iscs/utils/parser.js @@ -40,7 +40,10 @@ export function parser(data) { iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem); }, this); zrUtil.each(data.vidiconList || [], elem => { - iscsDevice[elem.code] = deviceFactory(deviceType.Vidicon, elem); + iscsDevice[elem.code] = deviceFactory(deviceType.vidiconList, elem); + }, this); + zrUtil.each(data.vidiconCloudList || [], elem => { + iscsDevice[elem.code] = deviceFactory(deviceType.vidiconCloudList, elem); }, this); zrUtil.each(data.frozenPumpList || [], elem => { iscsDevice[elem.code] = deviceFactory(deviceType.FrozenPump, elem); @@ -76,6 +79,9 @@ export function parser(data) { zrUtil.each(data.coolTowerList || [], elem =>{ iscsDevice[elem.code] = deviceFactory(deviceType.CoolTower, elem); }); + zrUtil.each(data.endDoorList || [], elem =>{ + iscsDevice[elem.code] = deviceFactory(deviceType.EndDoor, elem); + }); } @@ -100,6 +106,12 @@ function updateIscsListByDevice(iscs, name, device) { export function updateIscsData(device) { const iscsData = store.getters['iscs/iscs']; switch (device._type) { + case deviceType.vidiconList : + updateIscsListByDevice(iscsData, 'vidiconList', device); + break; + case deviceType.vidiconCloudList : + updateIscsListByDevice(iscsData, 'vidiconCloudList', device); + break; case deviceType.ManualAlarmButton : updateIscsListByDevice(iscsData, 'manualAlarmButtonList', device); break; @@ -130,6 +142,9 @@ export function updateIscsData(device) { case deviceType.CoolTower : updateIscsListByDevice(iscsData, 'coolTowerList', device); break; + case deviceType.EndDoor: + updateIscsListByDevice(iscsData, 'endDoorList', device); + break; } store.dispatch('iscs/setIscsData', iscsData); diff --git a/src/store/modules/iscs.js b/src/store/modules/iscs.js index d455ffcc5..70df69726 100644 --- a/src/store/modules/iscs.js +++ b/src/store/modules/iscs.js @@ -32,9 +32,16 @@ const iscs = { updateDeviceData: (state) => { return state.updateDeviceData; }, - buttonList: (state) => { - if (state.iscs && state.iscs.buttonList) { - return state.iscs.buttonList; + vidiconList: (state) => { + if (state.iscs && state.iscs.vidiconList) { + return state.iscs.vidiconList; + } else { + return []; + } + }, + vidiconCloudList: (state) => { + if (state.iscs && state.iscs.vidiconCloudList) { + return state.iscs.vidiconCloudList; } else { return []; } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 1e9afea51..79d1c6346 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,11 +3,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + BASE_API = 'http://192.168.3.82:9000'; // 杜康 } else { BASE_API = process.env.VUE_APP_BASE_API; } diff --git a/src/views/system/configLine/config.vue b/src/views/system/configLine/config.vue index 560c830fa..f6125a6a2 100644 --- a/src/views/system/configLine/config.vue +++ b/src/views/system/configLine/config.vue @@ -4,10 +4,20 @@
- - - - + + 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 @@