From 45fafdd0ee427593e3fa07514c8e66898a1d3dae Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Fri, 17 Jan 2020 11:07:44 +0800
Subject: [PATCH] =?UTF-8?q?iscs=20=E6=8E=92=E9=A3=8E=E6=9C=BA=20=E5=86=B7?=
=?UTF-8?q?=E6=B0=B4=E6=9C=BA=E7=BB=84=E7=BB=98=E5=9B=BE=E4=BB=A3=E7=A0=81?=
=?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/bas/chiller.js | 72 ++++++++--
src/iscs/shape/bas/frozenPump.js | 6 +-
src/iscs/shape/bas/ventilator.js | 123 ++++++++++++++++++
.../iscsDraw/iscsBasOperate/chiller.vue | 4 +-
.../iscsDraw/iscsBasOperate/coolTower.vue | 4 +-
.../iscsDraw/iscsBasOperate/frozenPump.vue | 4 +-
.../iscsDraw/iscsBasOperate/ventilator.vue | 10 +-
7 files changed, 201 insertions(+), 22 deletions(-)
diff --git a/src/iscs/shape/bas/chiller.js b/src/iscs/shape/bas/chiller.js
index 3b7b93930..009ff7d84 100644
--- a/src/iscs/shape/bas/chiller.js
+++ b/src/iscs/shape/bas/chiller.js
@@ -30,7 +30,7 @@ export default class chiller extends Group {
]
},
style: {
- stroke:this.model.strokeColor,
+ stroke:this.model.color,
lineWidth:2
}
});
@@ -43,7 +43,7 @@ export default class chiller extends Group {
r: this.model.width * 0.1
},
style: {
- fill: this.model.strokeColor
+ fill: this.model.color
}
});
this.circle2 = new Circle({
@@ -55,11 +55,11 @@ export default class chiller extends Group {
r: this.model.width * 0.1
},
style: {
- fill: this.model.strokeColor
+ fill: this.model.color
}
});
- this.polyline = new Polyline({
+ this.polyline1 = new Polyline({
zlevel: this.model.zlevel,
z: this.model.z,
shape:{
@@ -68,19 +68,75 @@ export default class chiller extends Group {
[this.model.width * 0.21, this.model.width * 0.33],
[this.model.width * 0.29, this.model.width * 0.20],
[this.model.width * 0.37, this.model.width * 0.33],
- [this.model.width * 0.59, this.model.width * 0.33],
- [this.model.width * 0.80, this.model.width * 0.33]
+ [this.model.width * 0.60, this.model.width * 0.33],
+ [this.model.width * 0.68, this.model.width * 0.20],
+ [this.model.width * 0.76, this.model.width * 0.33],
+ [this.model.width * 0.60, this.model.width * 0.33],
+ [this.model.width * 0.97, this.model.width * 0.33],
+ [this.model.width * 0.97, this.model.width * 0.38],
+ [this.model.width * 0.01, this.model.width * 0.38],
+ [this.model.width * 0.01, this.model.width * 0.33],
+ [this.model.width * 0.21, this.model.width * 0.33]
]
},
style: {
- stroke:this.model.strokeColor,
+ stroke:this.model.color,
lineWidth:2
}
});
+
+ this.polyline2 = new Polyline({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width * 0.07, this.model.width * 0.43],
+ [this.model.width * 0.33, this.model.width * 0.43],
+ [this.model.width * 0.33, this.model.width * 0.41],
+ [this.model.width * 0.64, this.model.width * 0.41],
+ [this.model.width * 0.64, this.model.width * 0.43],
+ [this.model.width * 0.90, this.model.width * 0.43],
+ [this.model.width * 0.64, this.model.width * 0.43],
+ [this.model.width * 0.64, this.model.width * 0.45],
+ [this.model.width * 0.33, this.model.width * 0.45],
+ [this.model.width * 0.33, this.model.width * 0.43]
+ ]
+ },
+ style: {
+ stroke:this.model.color,
+ lineWidth:2
+ }
+ });
+
+ this.polyline3 = new Polyline({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width * 0.07, this.model.width * 0.52],
+ [this.model.width * 0.33, this.model.width * 0.52],
+ [this.model.width * 0.33, this.model.width * 0.50],
+ [this.model.width * 0.64, this.model.width * 0.50],
+ [this.model.width * 0.64, this.model.width * 0.52],
+ [this.model.width * 0.90, this.model.width * 0.52],
+ [this.model.width * 0.64, this.model.width * 0.52],
+ [this.model.width * 0.64, this.model.width * 0.54],
+ [this.model.width * 0.33, this.model.width * 0.54],
+ [this.model.width * 0.33, this.model.width * 0.52]
+ ]
+ },
+ style: {
+ stroke:this.model.color,
+ lineWidth:2
+ }
+ });
+
this.grouper.add(this.rect);
this.grouper.add(this.circle2);
this.grouper.add(this.circle1);
- this.grouper.add(this.polyline);
+ this.grouper.add(this.polyline1);
+ this.grouper.add(this.polyline2);
+ this.grouper.add(this.polyline3);
this.add(this.grouper);
}
setModel(dx, dy) {
diff --git a/src/iscs/shape/bas/frozenPump.js b/src/iscs/shape/bas/frozenPump.js
index 8ef266d43..fdffe2fd0 100644
--- a/src/iscs/shape/bas/frozenPump.js
+++ b/src/iscs/shape/bas/frozenPump.js
@@ -25,7 +25,7 @@ export default class frozenPump extends Group {
r: this.model.width / 2
},
style: {
- stroke: this.model.strokeColor,
+ stroke: this.model.color,
lineWidth:2
}
});
@@ -41,8 +41,8 @@ export default class frozenPump extends Group {
]
},
style: {
- fill: this.model.strokeColor,
- stroke:this.model.strokeColor
+ fill: this.model.color,
+ stroke:this.model.color
}
});
this.grouper.add(this.circleOutside);
diff --git a/src/iscs/shape/bas/ventilator.js b/src/iscs/shape/bas/ventilator.js
index e69de29bb..73050370b 100644
--- a/src/iscs/shape/bas/ventilator.js
+++ b/src/iscs/shape/bas/ventilator.js
@@ -0,0 +1,123 @@
+import Group from 'zrender/src/container/Group';
+import Polygon from 'zrender/src/graphic/shape/Polygon';
+import Polyline from 'zrender/src/graphic/shape/Polyline';
+export default class ventilator 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.polyline1 = new Polyline({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [0, 0],
+ [this.model.width * 0.086, this.model.width * 0.10],
+ [this.model.width * 0.586, this.model.width * 0.10],
+ [this.model.width * 0.606, this.model.width * 0.10],
+ [this.model.width * 0.706, 0],
+ [this.model.width * 0.706, this.model.width * 0.758],
+ [this.model.width * 0.606, this.model.width * 0.638],
+ [this.model.width * 0.606, this.model.width * 0.10],
+ [this.model.width * 0.606, this.model.width * 0.638],
+ [this.model.width * 0.086, this.model.width * 0.638],
+ [0, this.model.width * 0.758],
+ [0, 0],
+ [this.model.width * 0.086, this.model.width * 0.10],
+ [this.model.width * 0.086, this.model.width * 0.638]
+ ]
+ },
+ style: {
+ stroke:this.model.color,
+ lineWidth:2
+ }
+ });
+
+ this.rhombus1 = new Polygon({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width * 0.336, this.model.width * 0.10],
+ [this.model.width * 0.456, this.model.width * 0.2345],
+ [this.model.width * 0.336, this.model.width * 0.369],
+ [this.model.width * 0.216, this.model.width * 0.2345],
+ [this.model.width * 0.336, this.model.width * 0.10]
+ ]
+ },
+ style: {
+ fill:this.model.color
+ }
+ });
+
+ this.rhombus2 = new Polygon({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width * 0.336, this.model.width * 0.369],
+ [this.model.width * 0.456, this.model.width * 0.5035],
+ [this.model.width * 0.336, this.model.width * 0.638],
+ [this.model.width * 0.216, this.model.width * 0.5035],
+ [this.model.width * 0.336, this.model.width * 0.369]
+ ]
+ },
+ style: {
+ fill:this.model.color
+ }
+ });
+
+ this.triangle = new Polygon({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width * 0.728, this.model.width * 0.08],
+ [this.model.width * 1, this.model.width * 0.369],
+ [this.model.width * 0.728, this.model.width * 0.640],
+ [this.model.width * 0.728, this.model.width * 0.08]
+ ]
+ },
+ style: {
+ fill: this.model.color
+ }
+ });
+
+ this.line = new Polyline({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width * 0.126, this.model.width * 0.369],
+ [this.model.width * 0.546, this.model.width * 0.369]
+ ]
+ },
+ style: {
+ stroke:this.model.color,
+ lineWidth:2
+ }
+ });
+
+ this.grouper.add(this.polyline1);
+ this.grouper.add(this.rhombus1);
+ this.grouper.add(this.rhombus2);
+ this.grouper.add(this.triangle);
+ this.grouper.add(this.line);
+ this.add(this.grouper);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
+ }
+}
diff --git a/src/views/system/iscsDraw/iscsBasOperate/chiller.vue b/src/views/system/iscsDraw/iscsBasOperate/chiller.vue
index 967debbfa..19464cf1a 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/chiller.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/chiller.vue
@@ -83,7 +83,7 @@ export default {
_type: 'Chiller',
code: this.isUpdate ? this.form.code : this.generateCode(),
width: this.form.width,
- strokeColor:'#00ff00'
+ color:'#00ff00'
};
this.$emit('createChiller', chillerModel);
this.initPage();
@@ -114,7 +114,7 @@ export default {
_type: 'Chiller',
code: this.form.code,
width: this.form.width,
- fillColor:'#00ff00'
+ color:'#00ff00'
};
this.$emit('deleteDataModel', chillerModel );
this.initPage();
diff --git a/src/views/system/iscsDraw/iscsBasOperate/coolTower.vue b/src/views/system/iscsDraw/iscsBasOperate/coolTower.vue
index d79a52539..4da9ba3bd 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/coolTower.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/coolTower.vue
@@ -83,7 +83,7 @@ export default {
_type: 'CoolTower',
code: this.isUpdate ? this.form.code : this.generateCode(),
width: this.form.width,
- strokeColor:'#00ff00'
+ color:'#00ff00'
};
this.$emit('createCoolTower', chillerModel);
this.initPage();
@@ -114,7 +114,7 @@ export default {
_type: 'CoolTower',
code: this.form.code,
width: this.form.width,
- fillColor:'#00ff00'
+ color:'#00ff00'
};
this.$emit('deleteDataModel', chillerModel );
this.initPage();
diff --git a/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue b/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
index 90b15ca95..27ca9620a 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
@@ -94,7 +94,7 @@ export default {
_type: 'FrozenPump',
code: this.isUpdate ? this.form.code : this.generateCode(),
width: this.form.width,
- strokeColor:'#00ff00',
+ color:'#00ff00',
pumpType:this.form.type
};
this.$emit('createFrozenPump', frozenPumpModel);
@@ -127,7 +127,7 @@ export default {
_type: 'FrozenPump',
code: this.form.code,
width: this.form.width,
- fillColor:'#00ff00',
+ color:'#00ff00',
pumpType:this.form.type
};
this.$emit('deleteDataModel', frozenPumpModel );
diff --git a/src/views/system/iscsDraw/iscsBasOperate/ventilator.vue b/src/views/system/iscsDraw/iscsBasOperate/ventilator.vue
index e895899a9..a18addf44 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/ventilator.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/ventilator.vue
@@ -5,7 +5,7 @@
-
+
@@ -31,7 +31,7 @@ export default {
buttonText: '立即创建',
form:{
code:'',
- width: 25,
+ width: 60,
x: 10,
y: 10
},
@@ -83,7 +83,7 @@ export default {
_type: 'Ventilator',
code: this.isUpdate ? this.form.code : this.generateCode(),
width: this.form.width,
- strokeColor:'#00ff00'
+ color:'#00ff00'
};
this.$emit('createVentilator', chillerModel);
this.initPage();
@@ -99,7 +99,7 @@ export default {
this.showDeleteButton = false;
this.form = {
code:'',
- width: 25,
+ width: 60,
x: 10,
y: 10
};
@@ -114,7 +114,7 @@ export default {
_type: 'Ventilator',
code: this.form.code,
width: this.form.width,
- fillColor:'#00ff00'
+ color:'#00ff00'
};
this.$emit('deleteDataModel', chillerModel );
this.initPage();