iscs调整

This commit is contained in:
fan 2020-01-17 10:49:06 +08:00
parent fb08f43afd
commit 69b11f98e8
7 changed files with 108 additions and 4 deletions

View File

@ -92,4 +92,11 @@ deviceRender[deviceType.EndDoor] = {
z: 4
};
/** 圆角边框渲染配置 */
deviceRender[deviceType.BorderRadius] = {
_type: deviceType.BorderRadius,
zlevel: 1,
z: 4
};
export default deviceRender;

View File

@ -12,6 +12,7 @@ const deviceType = {
Ventilator:'Ventilator',
Chiller:'Chiller',
CoolTower:'CoolTower',
BorderRadius: 'borderRadius',
EndDoor: 'endDoor'
};

View File

@ -0,0 +1,87 @@
import Group from 'zrender/src/container/Group';
import Line from 'zrender/src/graphic/shape/Line';
import Sector from 'zrender/src/graphic/shape/Sector';
export default class BorderRadius 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.leftSector = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.height / 2,
cy: this.model.height / 2,
r: this.model.height / 2,
startAngle: Math.PI * 2,
endAngle: Math.PI
},
style: {
fill: 'rgba(0, 0, 0, 0.1)',
stroke: '#EBEE0C'
}
});
this.rightSector = new Sector({
zlevel: this.zlevel,
z: this.z,
shape:{
cx: this.model.width - this.model.height / 2,
cy: this.model.height / 2,
r: this.model.height / 2,
startAngle: 0,
endAngle: Math.PI
},
style: {
fill: 'rgba(0, 0, 0, 0.1)',
stroke: '#EBEE0C'
}
});
this.topLine = new Line({
zlevel: this.zlevel,
z: this.z,
shape: {
x1: this.model.height / 2,
y1: 0,
x2: this.model.width - this.model.height / 2,
y2: 0
},
style: {
lineWidth: 2,
stroke: '#EBEE0C'
}
});
this.bottomLine = new Line({
zlevel: this.zlevel,
z: this.z,
shape: {
x1: this.model.height / 2,
y1: this.model.height,
x2: this.model.width - this.model.height / 2,
y2: this.model.height
},
style: {
lineWidth: 2,
stroke: '#EBEE0C'
}
});
this.grouper.add(this.leftSector);
this.grouper.add(this.rightSector);
this.grouper.add(this.bottomLine);
this.grouper.add(this.topLine);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -13,6 +13,7 @@ import Ventilator from './bas/ventilator';
import Chiller from './bas/chiller';
import CoolTower from './bas/coolTower';
import EndDoor from './endDoor';
import BorderRadius from './borderRadius';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
@ -29,6 +30,7 @@ iscsShape[deviceType.Ventilator] = Ventilator;
iscsShape[deviceType.Chiller] = Chiller;
iscsShape[deviceType.CoolTower] = CoolTower;
iscsShape[deviceType.EndDoor] = EndDoor;
iscsShape[deviceType.BorderRadius] = BorderRadius;
function shapefactory(device, iscs) {
const type = device.model._type;

View File

@ -15,9 +15,10 @@ const mean = {
allDoorsCloseInPlace: '所有门关到位',
systemDrivePowerFailure: '系统驱动电源故障',
systemControlPowerFailure: '系统控制电源故障',
monitorPowerFailure: '监视电源故障'
monitorPowerFailure: '监视电源故障',
fieldBusFault:'现场总线故障'
};
export default class StateTable extends Group {
constructor(device) {
super();

View File

@ -83,6 +83,9 @@ export function parser(data) {
iscsDevice[elem.code] = deviceFactory(deviceType.EndDoor, elem);
});
zrUtil.each(data.borderRadiusList || [], elem =>{
iscsDevice[elem.code] = deviceFactory(deviceType.BorderRadius, elem);
} );
}
return iscsDevice;
@ -145,6 +148,9 @@ export function updateIscsData(device) {
case deviceType.EndDoor:
updateIscsListByDevice(iscsData, 'endDoorList', device);
break;
case deviceType.BorderRadius:
updateIscsListByDevice(iscsData, 'borderRadius', device);
break;
}
store.dispatch('iscs/setIscsData', iscsData);

View File

@ -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;
}