-
+
@@ -29,12 +29,9 @@ export default {
};
},
watch: {
- '$store.state.app.windowSizeCount': function() {
- this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 });
- }
+
},
created() {
- this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 });
},
mounted() {
this.$refs.iscsPlate.show();
diff --git a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
index f6e6051f4..a02c86c7a 100644
--- a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
+++ b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
@@ -13,6 +13,11 @@
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
@@ -25,19 +30,68 @@ export default {
addModel:{
code: '',
width: '',
- x: '',
- y: ''
+ x: 10,
+ y: 10
},
rules: {
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
- }
+ },
+ showDeleteButton: false,
+ buttonText: '立即创建'
};
},
methods: {
- doSave() {
-
+ onSubmit(form) {
+ if (!this.addModel.code) {
+ this.generateCode();
+ }
+ this.$refs[form].validate((valid) => {
+ if (valid) {
+ const maButtonModel = {
+ point: {
+ x: this.addModel.x,
+ y: this.addModel.y
+ },
+ code: this.addModel.code,
+ _type: 'manualAlarmButton',
+ width: this.addModel.width
+ };
+ this.$emit('createManualAlarm', maButtonModel);
+ this.initPage();
+ } else {
+ return false;
+ }
+ });
+ },
+ deleteDevice() {
+ const maButtonModel = {
+ point: {
+ x: this.addModel.x,
+ y: this.addModel.y
+ },
+ code: this.addModel.code,
+ _type: 'manualAlarmButton',
+ width: this.addModel.width
+ };
+ this.$emit('deleteDataModel', maButtonModel);
+ this.initPage();
+ },
+ initPage() {
+ this.isUpdate = false;
+ this.buttonText = '立即创建';
+ this.showDeleteButton = false;
+ this.addModel = {
+ code: '',
+ width: '',
+ x: 10,
+ y: 10
+ };
+ },
+ generateCode() {
+ const mydate = new Date();
+ this.addModel.code = 'manualAlarmButton_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}
From a03b002beb2800b337681c3a2b9647f2e356f2b9 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 15 Jan 2020 13:27:07 +0800
Subject: [PATCH 06/20] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceType.js | 14 +---
src/iscs/iscs.js | 12 +--
src/iscs/shape/factory.js | 4 +
src/iscs/shape/manualAlarmButton.js | 4 +-
src/iscs/utils/parser.js | 82 +------------------
src/store/index.js | 4 +-
src/views/iscsSystem/index.vue | 49 +----------
src/views/system/iscsDesign/demonList.vue | 14 +++-
src/views/system/iscsDesign/index.vue | 6 +-
src/views/system/iscsDraw/index.vue | 3 +-
.../system/iscsDraw/iscsOperate/index.vue | 40 ++-------
.../iscsOperate/manualAlarmButton.vue | 2 +-
12 files changed, 44 insertions(+), 190 deletions(-)
diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js
index 0a071ffc7..14198449f 100644
--- a/src/iscs/constant/deviceType.js
+++ b/src/iscs/constant/deviceType.js
@@ -1,17 +1,5 @@
const deviceType = {
- SquareButton: 'SquareButton',
- Arrow: 'Arrow',
- TipBox: 'TipBox',
- Background: 'Background',
- CircularLamp: 'CircularLamp',
- AppendageBox: 'AppendageBox',
- Alarm: 'Alarm',
- Elevator: 'Elevator',
- Key: 'Key',
- TeleTerminal: 'TeleTerminal',
- Clock: 'Clock',
- RotateTip: 'RotateTip',
- CheckBox: 'CheckBox'
+ ManualAlarmButton: 'manualAlarmButton'
};
export default deviceType;
diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js
index 0c5f897d3..29e6831c9 100644
--- a/src/iscs/iscs.js
+++ b/src/iscs/iscs.js
@@ -59,8 +59,8 @@ class Iscs {
this.canvasSize = {
x: 0,
y: 0,
- width: config.background.width,
- height: config.background.height
+ width: config.width,
+ height: config.height
};
// 地图数据
@@ -120,14 +120,6 @@ class Iscs {
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
- if (type === deviceType.Background) {
- this.canvasSize = {
- x: 0,
- y: 0,
- width: elem.width,
- height: elem.height
- };
- }
updateIscsData(elem);
const oDevice = this.iscsDevice[code] || deviceFactory(type, elem);
const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, elem));
diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js
index 34a6f5284..28072543b 100644
--- a/src/iscs/shape/factory.js
+++ b/src/iscs/shape/factory.js
@@ -1,4 +1,8 @@
+import ManualAlarmButton from './manualAlarmButton';
+import deviceType from '../constant/deviceType';
+
const iscsShape = {};
+iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
function shapefactory(device, iscs) {
const type = device.model._type;
diff --git a/src/iscs/shape/manualAlarmButton.js b/src/iscs/shape/manualAlarmButton.js
index 9050e113f..e4e833e37 100644
--- a/src/iscs/shape/manualAlarmButton.js
+++ b/src/iscs/shape/manualAlarmButton.js
@@ -3,7 +3,7 @@ import Rect from 'zrender/src/graphic/shape/Rect';
import Circle from 'zrender/src/graphic/shape/Circle';
import Text from 'zrender/src/graphic/Text';
-export default class manualAlarmButton extends Group() {
+export default class manualAlarmButton extends Group {
constructor(device) {
super();
this.model = device.model;
@@ -13,7 +13,7 @@ export default class manualAlarmButton extends Group() {
this.z = device.model.zlevel;
this.create();
}
- cerate() {
+ create() {
this.rect = new Rect({
zlevel: this.model.zlevel,
z: this.model.z - 1,
diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js
index 38b2c19b9..7609f5fba 100644
--- a/src/iscs/utils/parser.js
+++ b/src/iscs/utils/parser.js
@@ -36,50 +36,9 @@ export function deviceFactory(type, elem) {
export function parser(data) {
var iscsDevice = {};
if (data) {
-
- zrUtil.each(data.squareButtonList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.SquareButton, elem);
+ zrUtil.each(data.manualAlarmButtonList || [], elem => {
+ iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem);
}, this);
-
- zrUtil.each(data.circularLampList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.CircularLamp, elem);
- }, this);
-
- zrUtil.each(data.alarmList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.Alarm, elem);
- }, this);
-
- zrUtil.each(data.arrowList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.Arrow, elem);
- }, this);
-
- zrUtil.each(data.tipBoxList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.TipBox, elem);
- }, this);
-
- zrUtil.each(data.appendageBoxList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.AppendageBox, elem);
- }, this);
-
- zrUtil.each(data.elevatorList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.Elevator, elem);
- }, this);
-
- zrUtil.each(data.keyList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.Key, elem);
- }, this);
-
- zrUtil.each(data.teleTerminalList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.TeleTerminal, elem);
- }, this);
-
- zrUtil.each(data.clockList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.Clock, elem);
- });
-
- zrUtil.each(data.rotateTipList || [], elem => {
- iscsDevice[elem.code] = deviceFactory(deviceType.RotateTip, elem);
- });
}
return iscsDevice;
@@ -104,41 +63,8 @@ function updateIscsListByDevice(iscs, name, device) {
export function updateIscsData(device) {
const iscsData = store.getters['iscs/iscs'];
switch (device._type) {
- case deviceType.Background :
- iscsData.background = device;
- break;
- case deviceType.SquareButton :
- updateIscsListByDevice(iscsData, 'squareButtonList', device);
- break;
- case deviceType.Arrow :
- updateIscsListByDevice(iscsData, 'arrowList', device);
- break;
- case deviceType.TipBox :
- updateIscsListByDevice(iscsData, 'tipBoxList', device);
- break;
- case deviceType.CircularLamp :
- updateIscsListByDevice(iscsData, 'circularLampList', device);
- break;
- case deviceType.AppendageBox :
- updateIscsListByDevice(iscsData, 'appendageBoxList', device);
- break;
- case deviceType.Alarm :
- updateIscsListByDevice(iscsData, 'alarmList', device);
- break;
- case deviceType.Elevator :
- updateIscsListByDevice(iscsData, 'elevatorList', device);
- break;
- case deviceType.Key :
- updateIscsListByDevice(iscsData, 'keyList', device);
- break;
- case deviceType.TeleTerminal :
- updateIscsListByDevice(iscsData, 'teleTerminalList', device);
- break;
- case deviceType.Clock :
- updateIscsListByDevice(iscsData, 'clockList', device);
- break;
- case deviceType.RotateTip:
- updateIscsListByDevice(iscsData, 'rotateTipList', device);
+ case deviceType.ManualAlarmButton :
+ updateIscsListByDevice(iscsData, 'manualAlarmButtonList', device);
break;
}
store.dispatch('iscs/setIscsData', iscsData);
diff --git a/src/store/index.js b/src/store/index.js
index 6feaf3b5f..a994e562f 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -15,6 +15,7 @@ import socket from './modules/socket';
import scriptRecord from './modules/scriptRecord';
import ibp from './modules/ibp';
import order from './modules/order';
+import iscs from './modules/iscs';
import getters from './getters';
@@ -36,7 +37,8 @@ const store = new Vuex.Store({
socket,
scriptRecord,
ibp,
- order
+ order,
+ iscs
},
getters
});
diff --git a/src/views/iscsSystem/index.vue b/src/views/iscsSystem/index.vue
index fc7b467a1..258d39306 100644
--- a/src/views/iscsSystem/index.vue
+++ b/src/views/iscsSystem/index.vue
@@ -70,18 +70,6 @@ export default {
'$store.state.app.windowSizeCount': function() {
this.setWindowSize();
},
- '$store.state.training.initTime': function (initTime) {
- this.initTime = initTime;
- if (this.$iscs) {
- this.initClockTime(initTime);
- }
- },
- '$store.state.training.started': function (started) {
- this.started = started;
- if (this.$iscs) {
- this.setClockStart(started);
- }
- },
'$store.state.socket.equipmentStatus': function (val) {
if (val.length) {
this.statusMessage(val);
@@ -94,20 +82,10 @@ export default {
this.iscsDestroy();
},
methods: {
- show (deviceCode, iscsPart) {
- if (!deviceCode) {
- return;
- }
- this.stationCode = deviceCode;
+ show () {
document.getElementById(this.iscsId).oncontextmenu = function (e) {
return false;
};
- let offsetX = 0;
- if (iscsPart === 'left') {
- offsetX = 0;
- } else if (iscsPart === 'right') {
- offsetX = 1920;
- }
this.iscsDestroy();
this.loading = true;
const data = {};
@@ -115,12 +93,12 @@ export default {
dom: document.getElementById(this.iscsId),
config: {
renderer: 'canvas',
- width: this.canvasWidth,
- height: this.canvasHeight
+ width: this.width,
+ height: this.height
},
options: {
scaleRate: 1,
- offsetX: offsetX,
+ offsetX: 0,
offsetY: 0
},
methods: {
@@ -134,8 +112,6 @@ export default {
}
this.setIscs(data, {});
this.$store.dispatch('iscs/setIscsData', {});
- this.handleBanOpenScreenDoorStatus();
- this.initClockTime(this.initTime);
window.document.oncontextmenu = function () {
return false;
};
@@ -143,15 +119,6 @@ export default {
setIscs(data, oldData) {
this.$iscs.setIscs(oldData, data);
},
- handleBanOpenScreenDoorStatus() {
- this.$store.state.iscs.iscs['keyList'].forEach(item => {
- if (item.mean === 'Ban_Down_Open_Screen_Door') {
- item.status === 'on' ? this.banDownOpenScreenDoor = false : this.banDownOpenScreenDoor = true;
- } else if (item.mean === 'Ban_Up_Open_Screen_Door') {
- item.status === 'on' ? this.banUpOpenScreenDoor = false : this.banUpOpenScreenDoor = true;
- }
- });
- },
// 点击选择事件
onSelected(em) {
if (em.deviceModel.mean) {
@@ -191,14 +158,6 @@ export default {
this.$iscs && this.$iscs.drawIscsInit();
this.showBackButton = false;
},
- // 初始化电子表时间
- initClockTime(initTime) {
- this.$iscs.initClockTime(initTime);
- },
- // 设置电子时钟开始或停止
- setClockStart(started) {
- this.$iscs.setClockStart(started);
- },
reSize() {
this.$nextTick(() => {
this.width = this.$store.state.config.width;
diff --git a/src/views/system/iscsDesign/demonList.vue b/src/views/system/iscsDesign/demonList.vue
index c672cd47c..23cfead4c 100644
--- a/src/views/system/iscsDesign/demonList.vue
+++ b/src/views/system/iscsDesign/demonList.vue
@@ -1,7 +1,7 @@
- {{ $t('map.myMapList') }}
+ 我的iscs系统列表
@@ -84,18 +84,26 @@ export default {
{
name: 'iscs系统',
id: 0,
+ type: 'system',
children: [
{
name: 'HMI界面',
mode: 'hmi',
- id: '1'
+ id: '1',
+ type: 'interface'
}
]
}
];
},
clickEvent(obj, data, ele) {
- this.$router.push({ path: `/system/iscs/design/edit/${obj.Id}/${obj.mode}` });
+ switch (obj.type) {
+ case 'system' :
+ break;
+ case 'interface':
+ this.$router.push({ path: `/system/iscs/design/edit/${obj.id}/${obj.mode}` });
+ break;
+ }
},
showContextMenu(e, obj, node, vueElem) {
if (obj && obj.type == 'map') {
diff --git a/src/views/system/iscsDesign/index.vue b/src/views/system/iscsDesign/index.vue
index 0675730b9..334c2a102 100644
--- a/src/views/system/iscsDesign/index.vue
+++ b/src/views/system/iscsDesign/index.vue
@@ -50,13 +50,15 @@ export default {
this.resize();
}
},
+ created() {
+ this.resize();
+ },
mounted() {
const againEnter = getSessionStorage('againEnter') || null;
if (!againEnter) {
launchFullscreen();
setSessionStorage('againEnter', true);
}
- this.resize();
this.widthLeft = Number(localStore.get('LeftWidth'));
},
methods: {
@@ -70,13 +72,11 @@ export default {
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
const width = this.$store.state.app.width - 521 - this.widthLeft;
const height = this.$store.state.app.height - 90;
- console.log(width, height, this.widthLeft);
this.$store.dispatch('config/resize', { width: width, height: height });
},
setMapResize(LeftWidth) {
const widths = this.$store.state.app.width - 521 - LeftWidth;
const heights = this.$store.state.app.height - 90;
- console.log(widths, heights, '111111');
this.$store.dispatch('config/resize', { width: widths, height: heights });
}
}
diff --git a/src/views/system/iscsDraw/index.vue b/src/views/system/iscsDraw/index.vue
index 42c3c70a8..f49a5d696 100644
--- a/src/views/system/iscsDraw/index.vue
+++ b/src/views/system/iscsDraw/index.vue
@@ -41,8 +41,7 @@ export default {
},
methods: {
- iscsChange(stationCode) {
- this.$refs.iscsPlate.show(stationCode);
+ iscsChange() {
this.$refs.iscsPlate.drawIscsInit();
}
}
diff --git a/src/views/system/iscsDraw/iscsOperate/index.vue b/src/views/system/iscsDraw/iscsOperate/index.vue
index 1ac61c857..70b141477 100644
--- a/src/views/system/iscsDraw/iscsOperate/index.vue
+++ b/src/views/system/iscsDraw/iscsOperate/index.vue
@@ -1,17 +1,8 @@
-
+
-
{{ $t('ibp.stationName') }}
-
-
-
@@ -47,24 +38,14 @@ export default {
return {
enabledTab: 'Background',
data: '',
- stationOptions:[
- {
- value: 'Station_203_0.07533',
- label: '车站一'
- },
- {
- value: 'Station_207_0.62282',
- label: '车站二'
- },
- {
- value: 'Station_209_0.95175',
- label: '车站三'
- }
- ],
- stationCode: '',
- height: this.$store.state.app.height - 190
+ stationCode: ''
};
},
+ computed: {
+ height() {
+ return this.$store.state.config.height;
+ }
+ },
watch: {
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
@@ -72,7 +53,6 @@ export default {
}
},
mounted() {
-
},
beforeDestroy() {
@@ -89,10 +69,6 @@ export default {
const data = JSON.stringify(this.$store.state.iscs.iscs);
console.log(data);
},
- changeStationCode(e) {
- this.$emit('iscsChange', e);
- this.handleTabClick();
- },
handleTabClick() {
}
diff --git a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
index a02c86c7a..b1f03a814 100644
--- a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
+++ b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
@@ -58,7 +58,7 @@ export default {
_type: 'manualAlarmButton',
width: this.addModel.width
};
- this.$emit('createManualAlarm', maButtonModel);
+ this.$emit('createDataModel', maButtonModel);
this.initPage();
} else {
return false;
From 31f6277107d05ceabf47e5312d5dd141864916a3 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 15 Jan 2020 13:33:11 +0800
Subject: [PATCH 07/20] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/shape/manualAlarmButton.js | 15 ++++++++-------
.../iscsDraw/iscsOperate/manualAlarmButton.vue | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/iscs/shape/manualAlarmButton.js b/src/iscs/shape/manualAlarmButton.js
index e4e833e37..840e68d64 100644
--- a/src/iscs/shape/manualAlarmButton.js
+++ b/src/iscs/shape/manualAlarmButton.js
@@ -6,6 +6,7 @@ import Text from 'zrender/src/graphic/Text';
export default class manualAlarmButton extends Group {
constructor(device) {
super();
+ console.log(device, '=======');
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
@@ -21,7 +22,7 @@ export default class manualAlarmButton extends Group {
x: this.model.point.x,
y: this.model.point.y,
width: this.model.width,
- height: this.model.height
+ height: this.model.width * 0.8
},
style: {
lineWidth: 1,
@@ -35,16 +36,16 @@ export default class manualAlarmButton extends Group {
style: {
x: this.model.point.x,
y: this.model.point.y,
- fontWeight: this.model.fontWeight,
- fontSize: this.model.fontSize,
- fontFamily: this.model.fontFamily,
- text: this.model.context,
+ fontWeight: this.model.fontWeight || 500,
+ fontSize: this.model.fontSize || 14,
+ fontFamily: this.model.fontFamily || 'consolas',
+ text: 'Y',
textStrokeWidth: this.model.textStrokeWidth,
- textFill: this.model.textFill,
+ textFill: this.model.textFill || '#000',
textAlign: this.model.textAlign,
textPosition: this.model.textPosition || 'inside',
textVerticalAlign: this.model.textVerticalAlign || null,
- textLineHeight: this.model.fontSize
+ textLineHeight: this.model.fontSize || 14
}
});
this.add(this.text);
diff --git a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
index b1f03a814..52bfc4104 100644
--- a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
+++ b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
@@ -29,7 +29,7 @@ export default {
return {
addModel:{
code: '',
- width: '',
+ width: 25,
x: 10,
y: 10
},
From f13f7c9964d68adce271b00e99f5c66bf027b3d8 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 15 Jan 2020 14:03:25 +0800
Subject: [PATCH 08/20] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/shape/manualAlarmButton.js | 37 ++++++++++++-------
.../iscsOperate/manualAlarmButton.vue | 8 ++--
2 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/src/iscs/shape/manualAlarmButton.js b/src/iscs/shape/manualAlarmButton.js
index 840e68d64..1f806a3c0 100644
--- a/src/iscs/shape/manualAlarmButton.js
+++ b/src/iscs/shape/manualAlarmButton.js
@@ -6,7 +6,6 @@ import Text from 'zrender/src/graphic/Text';
export default class manualAlarmButton extends Group {
constructor(device) {
super();
- console.log(device, '=======');
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
@@ -15,12 +14,17 @@ export default class manualAlarmButton extends Group {
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.rect = new Rect({
zlevel: this.model.zlevel,
z: this.model.z - 1,
shape: {
- x: this.model.point.x,
- y: this.model.point.y,
+ x: 0,
+ y: 0,
width: this.model.width,
height: this.model.width * 0.8
},
@@ -29,13 +33,13 @@ export default class manualAlarmButton extends Group {
stroke: '#0F0'
}
});
- this.add(this.rect);
+ this.grouper.add(this.rect);
this.text = new Text({
zlevel: this.model.zlevel,
z: this.model.z,
style: {
- x: this.model.point.x,
- y: this.model.point.y,
+ x: 0,
+ y: 0,
fontWeight: this.model.fontWeight || 500,
fontSize: this.model.fontSize || 14,
fontFamily: this.model.fontFamily || 'consolas',
@@ -48,31 +52,36 @@ export default class manualAlarmButton extends Group {
textLineHeight: this.model.fontSize || 14
}
});
- this.add(this.text);
+ this.grouper.add(this.text);
this.circleOutside = new Circle({
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
- cx: this.model.point.x,
- cy: this.model.point.y,
- r: this.model.r1
+ cx: 0,
+ cy: 0,
+ r: 10
},
style: {
fill: '#0f0'
}
});
- this.add(this.circleOutside);
+ this.grouper.add(this.circleOutside);
this.circleInside = new Circle({
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
- cx: this.model.point.x,
- cy: this.model.point.y,
- r: this.model.r2
+ cx: 0,
+ cy: 0,
+ r: 5
},
style: {
fill: '#000'
}
});
+ this.grouper.add(this.circleInside);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
}
}
diff --git a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
index 52bfc4104..6f83794f3 100644
--- a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
+++ b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
@@ -4,13 +4,13 @@
-
+
-
+
-
+
@@ -84,7 +84,7 @@ export default {
this.showDeleteButton = false;
this.addModel = {
code: '',
- width: '',
+ width: 25,
x: 10,
y: 10
};
From 308e0960b0ae44b79cec7915ec9ab2697a9482f7 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 15 Jan 2020 14:04:33 +0800
Subject: [PATCH 09/20] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
index 6f83794f3..c2423b046 100644
--- a/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
+++ b/src/views/system/iscsDraw/iscsOperate/manualAlarmButton.vue
@@ -1,7 +1,7 @@
-
+
From 699d548b849bdaa6f085a22b99aac0b801ac71c0 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 15 Jan 2020 14:26:25 +0800
Subject: [PATCH 10/20] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/shape/manualAlarmButton.js | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/iscs/shape/manualAlarmButton.js b/src/iscs/shape/manualAlarmButton.js
index 1f806a3c0..4820144ba 100644
--- a/src/iscs/shape/manualAlarmButton.js
+++ b/src/iscs/shape/manualAlarmButton.js
@@ -26,7 +26,7 @@ export default class manualAlarmButton extends Group {
x: 0,
y: 0,
width: this.model.width,
- height: this.model.width * 0.8
+ height: this.model.width * 1.1
},
style: {
lineWidth: 1,
@@ -39,13 +39,13 @@ export default class manualAlarmButton extends Group {
z: this.model.z,
style: {
x: 0,
- y: 0,
- fontWeight: this.model.fontWeight || 500,
- fontSize: this.model.fontSize || 14,
+ y: this.model.width * 2 / 5,
+ fontWeight: this.model.fontWeight || 300,
+ fontSize: this.model.fontSize || this.model.width,
fontFamily: this.model.fontFamily || 'consolas',
text: 'Y',
textStrokeWidth: this.model.textStrokeWidth,
- textFill: this.model.textFill || '#000',
+ textFill: this.model.textFill || '#0F0',
textAlign: this.model.textAlign,
textPosition: this.model.textPosition || 'inside',
textVerticalAlign: this.model.textVerticalAlign || null,
@@ -57,9 +57,9 @@ export default class manualAlarmButton extends Group {
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
- cx: 0,
- cy: 0,
- r: 10
+ cx: this.model.width * 2 / 3,
+ cy: this.model.width * 2.2 / 3,
+ r: this.model.width / 4
},
style: {
fill: '#0f0'
@@ -70,9 +70,9 @@ export default class manualAlarmButton extends Group {
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
- cx: 0,
- cy: 0,
- r: 5
+ cx: this.model.width * 2 / 3,
+ cy: this.model.width * 2.2 / 3,
+ r: this.model.width / 10
},
style: {
fill: '#000'
From bf1497164c6dd047fce3eaff61b94444316dbb7d Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Wed, 15 Jan 2020 14:33:21 +0800
Subject: [PATCH 11/20] =?UTF-8?q?iscs=E8=B0=83=E6=95=B4(=E6=89=B9=E9=87=8F?=
=?UTF-8?q?=E6=8B=96=E5=8A=A8)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceRender.js | 6 ++++
src/iscs/constant/deviceType.js | 3 +-
src/iscs/shape/checkBox.js | 46 +++++++++++++++++++++++++++++++
src/iscs/shape/factory.js | 2 ++
4 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 src/iscs/shape/checkBox.js
diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js
index d50a10bbc..b30b0acbb 100644
--- a/src/iscs/constant/deviceRender.js
+++ b/src/iscs/constant/deviceRender.js
@@ -8,5 +8,11 @@ deviceRender[deviceType.ManualAlarmButton] = {
zlevel: 1,
z: 4
};
+/** CheckBox渲染配置 */
+deviceRender[deviceType.CheckBox] = {
+ _type: deviceType.CheckBox,
+ zlevel: 10,
+ z: 0
+};
export default deviceRender;
diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js
index 14198449f..f42f70fc2 100644
--- a/src/iscs/constant/deviceType.js
+++ b/src/iscs/constant/deviceType.js
@@ -1,5 +1,6 @@
const deviceType = {
- ManualAlarmButton: 'manualAlarmButton'
+ ManualAlarmButton: 'manualAlarmButton',
+ CheckBox: 'CheckBox'
};
export default deviceType;
diff --git a/src/iscs/shape/checkBox.js b/src/iscs/shape/checkBox.js
new file mode 100644
index 000000000..0299ada99
--- /dev/null
+++ b/src/iscs/shape/checkBox.js
@@ -0,0 +1,46 @@
+import Group from 'zrender/src/container/Group';
+import Rect from 'zrender/src/graphic/shape/Rect';
+
+export default class checkBox 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.box = new Rect({
+ zlevel: model.zlevel,
+ z: model.z,
+ draggable: false,
+ shape: {
+ x: 0,
+ y: 0,
+ width: this.model.width,
+ height: this.model.height
+ },
+ style: {
+ fill: 'rgb(135,206,250,0.2)'
+ }
+ });
+ this.grouper.add(this.box);
+ this.add(this.grouper);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
+ }
+ setSize(width, height) {
+ this.model.width = width;
+ this.model.height = height;
+ }
+}
diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js
index 28072543b..c89d0e7ee 100644
--- a/src/iscs/shape/factory.js
+++ b/src/iscs/shape/factory.js
@@ -1,8 +1,10 @@
import ManualAlarmButton from './manualAlarmButton';
import deviceType from '../constant/deviceType';
+import CheckBox from './checkBox';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
+iscsShape[deviceType.CheckBox] = CheckBox;
function shapefactory(device, iscs) {
const type = device.model._type;
From 02b2ce19f18fd877f0866292ca9c9e71aea43c66 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Wed, 15 Jan 2020 17:56:31 +0800
Subject: [PATCH 12/20] =?UTF-8?q?iscs=20bas=E4=BB=A3=E7=A0=81=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/iscsDesign/demonList.vue | 6 +++
src/views/system/iscsDraw/index.vue | 24 ++++++----
.../system/iscsDraw/iscsBasOperate/index.vue | 44 +++++++++++++++++++
3 files changed, 66 insertions(+), 8 deletions(-)
create mode 100644 src/views/system/iscsDraw/iscsBasOperate/index.vue
diff --git a/src/views/system/iscsDesign/demonList.vue b/src/views/system/iscsDesign/demonList.vue
index 23cfead4c..5219d5f0c 100644
--- a/src/views/system/iscsDesign/demonList.vue
+++ b/src/views/system/iscsDesign/demonList.vue
@@ -91,6 +91,12 @@ export default {
mode: 'hmi',
id: '1',
type: 'interface'
+ },
+ {
+ name: 'BAS界面',
+ mode: 'bas',
+ id: '2',
+ type: 'interface'
}
]
}
diff --git a/src/views/system/iscsDraw/index.vue b/src/views/system/iscsDraw/index.vue
index f49a5d696..4fa52102e 100644
--- a/src/views/system/iscsDraw/index.vue
+++ b/src/views/system/iscsDraw/index.vue
@@ -5,7 +5,8 @@
-
+
+
@@ -13,12 +14,13 @@
+
From de7176ac5e2fcf27e1730a3e7aac6ec9fda6366a Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 16 Jan 2020 09:23:37 +0800
Subject: [PATCH 13/20] =?UTF-8?q?FAS=E5=AD=90=E7=B3=BB=E7=BB=9F=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceRender.js | 36 +++++-
src/iscs/constant/deviceType.js | 6 +-
src/iscs/shape/factory.js | 8 ++
src/iscs/shape/fireHydrantAlarmButton.js | 42 +++++--
src/iscs/shape/gasFireControl.js | 84 ++++++++++++++
src/iscs/shape/smokeDetector.js | 59 ++++++++++
src/iscs/shape/temperatureDetector.js | 59 ++++++++++
src/iscs/utils/parser.js | 28 +++++
.../iscsOperate/fireHydranAlarmButton.vue | 103 ++++++++++++++++++
.../iscsDraw/iscsOperate/gasFireControl.vue | 103 ++++++++++++++++++
.../system/iscsDraw/iscsOperate/index.vue | 34 +++++-
.../iscsDraw/iscsOperate/smokeDetector.vue | 103 ++++++++++++++++++
12 files changed, 648 insertions(+), 17 deletions(-)
create mode 100644 src/iscs/shape/gasFireControl.js
create mode 100644 src/iscs/shape/smokeDetector.js
create mode 100644 src/iscs/shape/temperatureDetector.js
create mode 100644 src/views/system/iscsDraw/iscsOperate/fireHydranAlarmButton.vue
create mode 100644 src/views/system/iscsDraw/iscsOperate/gasFireControl.vue
create mode 100644 src/views/system/iscsDraw/iscsOperate/smokeDetector.vue
diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js
index b30b0acbb..76eaa9222 100644
--- a/src/iscs/constant/deviceRender.js
+++ b/src/iscs/constant/deviceRender.js
@@ -2,17 +2,41 @@ import deviceType from './deviceType';
const deviceRender = {};
-/** IbpText渲染配置*/
-deviceRender[deviceType.ManualAlarmButton] = {
- _type: deviceType.ManualAlarmButton,
- zlevel: 1,
- z: 4
-};
/** CheckBox渲染配置 */
deviceRender[deviceType.CheckBox] = {
_type: deviceType.CheckBox,
zlevel: 10,
z: 0
};
+/** 手动报警按钮渲染配置*/
+deviceRender[deviceType.ManualAlarmButton] = {
+ _type: deviceType.ManualAlarmButton,
+ zlevel: 1,
+ z: 4
+};
+/** 消火栓报警按钮渲染配置 */
+deviceRender[deviceType.FireHydranAlarmButton] = {
+ _type: deviceType.FireHydranAlarmButton,
+ zlevel: 1,
+ z: 4
+};
+/** 气体灭火渲染配置 */
+deviceRender[deviceType.GasFireControl] = {
+ _type: deviceType.GasFireControl,
+ zlevel: 1,
+ z: 4
+};
+/** 烟感探测器渲染配置 */
+deviceRender[deviceType.SmokeDetector] = {
+ _type: deviceType.SmokeDetector,
+ zlevel: 1,
+ z: 4
+};
+/** 温度探测器渲染配置 */
+deviceRender[deviceType.TemperatureDetector] = {
+ _type: deviceType.TemperatureDetector,
+ zlevel: 1,
+ z: 4
+};
export default deviceRender;
diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js
index f42f70fc2..dd5747e0d 100644
--- a/src/iscs/constant/deviceType.js
+++ b/src/iscs/constant/deviceType.js
@@ -1,6 +1,10 @@
const deviceType = {
ManualAlarmButton: 'manualAlarmButton',
- CheckBox: 'CheckBox'
+ CheckBox: 'CheckBox',
+ FireHydranAlarmButton: 'fireHydranAlarmButton',
+ GasFireControl: 'gasFireControl',
+ SmokeDetector: 'smokeDetector',
+ TemperatureDetector: 'TemperatureDetector'
};
export default deviceType;
diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js
index c89d0e7ee..d99100fd3 100644
--- a/src/iscs/shape/factory.js
+++ b/src/iscs/shape/factory.js
@@ -1,10 +1,18 @@
import ManualAlarmButton from './manualAlarmButton';
import deviceType from '../constant/deviceType';
import CheckBox from './checkBox';
+import FireHydranAlarmButton from './fireHydrantAlarmButton';
+import GasFireControl from './gasFireControl';
+import SmokeDetector from './smokeDetector';
+import TemperatureDetector from './temperatureDetector';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
iscsShape[deviceType.CheckBox] = CheckBox;
+iscsShape[deviceType.FireHydranAlarmButton] = FireHydranAlarmButton;
+iscsShape[deviceType.GasFireControl] = GasFireControl;
+iscsShape[deviceType.SmokeDetector] = SmokeDetector;
+iscsShape[deviceType.TemperatureDetector] = TemperatureDetector;
function shapefactory(device, iscs) {
const type = device.model._type;
diff --git a/src/iscs/shape/fireHydrantAlarmButton.js b/src/iscs/shape/fireHydrantAlarmButton.js
index f78bd5e38..80630bdc6 100644
--- a/src/iscs/shape/fireHydrantAlarmButton.js
+++ b/src/iscs/shape/fireHydrantAlarmButton.js
@@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Polygon from 'zrender/src/graphic/shape/Polygon';
-export default class FireHydrantAlarmButton extends Group() {
+export default class FireHydrantAlarmButton extends Group {
constructor(device) {
super();
this.model = device.model;
@@ -13,22 +13,48 @@ export default class FireHydrantAlarmButton extends Group() {
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.rect = new Rect({
- zlevel: this.model.zlevel,
- z: this.model.z,
+ zlevel: this.zlevel,
+ z: this.z,
shape: {
- x: this.model.point.x,
- y: this.model.point.y,
+ x: 0,
+ y: 0,
width: this.model.width,
- height: this.model.height
+ height: this.model.width / 2
},
style: {
fill: '#0f0'
}
});
- this.add(this.rect);
+ this.grouper.add(this.rect);
+ const width = this.model.width;
this.polygonTop = new Polygon({
-
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ points: [[width / 4, width * 3 / 40], [width * 3 / 4, width * 3 / 40], [width * 3 / 5, width * 5 / 20], [width * 2 / 5, width * 5 / 20]]
+ },
+ style: {
+ color: '#000'
+ }
});
+ this.polygonBottom = new Polygon({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ points: [[width * 2 / 5, width * 3 / 10], [width * 3 / 5, width * 3 / 10], [width * 13 / 20, width * 2 / 5], [width * 7 / 20, width * 2 / 5]]
+ }
+ });
+ this.grouper.add(this.polygonTop);
+ this.grouper.add(this.polygonBottom);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
}
}
diff --git a/src/iscs/shape/gasFireControl.js b/src/iscs/shape/gasFireControl.js
new file mode 100644
index 000000000..499c72fa4
--- /dev/null
+++ b/src/iscs/shape/gasFireControl.js
@@ -0,0 +1,84 @@
+import Group from 'zrender/src/container/Group';
+import Rect from 'zrender/src/graphic/shape/Rect';
+import Isogon from 'zrender/src/graphic/shape/Isogon';
+import Circle from 'zrender/src/graphic/shape/Circle';
+
+export default class GasFireControl extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.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.rect = new Rect({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x: 0,
+ y: 0,
+ width: this.model.width,
+ height: this.model.width
+ },
+ style: {
+ lineWidth: 1,
+ stroke: '#0F0'
+ }
+ });
+ this.grouper.add(this.rect);
+ this.isogon = new Isogon({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x: this.model.width / 3,
+ y: this.model.width / 2,
+ r: this.model.width / 4,
+ n: 3
+ },
+ style: {
+ fill: '#0F0'
+ }
+ });
+ this.isogon.origin = [this.model.width / 3, this.model.width / 2];
+ this.isogon.rotation = Math.PI / 180 * Number(90);
+ this.grouper.add(this.isogon);
+ this.circleTop = new Circle({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ cx: this.model.width * 2 / 3,
+ cy: this.model.width / 4,
+ r: this.model.width / 12
+ },
+ style: {
+ fill: '#0F0'
+ }
+ });
+ this.circleBottom = new Circle({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ cx: this.model.width * 2 / 3,
+ cy: this.model.width * 3 / 4,
+ r: this.model.width / 12
+ },
+ style: {
+ fill: '#0F0'
+ }
+ });
+ this.grouper.add(this.circleTop);
+ this.grouper.add(this.circleBottom);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
+ }
+}
diff --git a/src/iscs/shape/smokeDetector.js b/src/iscs/shape/smokeDetector.js
new file mode 100644
index 000000000..72829f275
--- /dev/null
+++ b/src/iscs/shape/smokeDetector.js
@@ -0,0 +1,59 @@
+import Group from 'zrender/src/container/Group';
+import Circle from 'zrender/src/graphic/shape/Circle';
+import Text from 'zrender/src/graphic/Text';
+
+export default class SmokeDetector extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.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.circle = new Circle({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ cx: this.model.width / 2,
+ cy: this.model.width / 2,
+ r: this.model.width / 2
+ },
+ style: {
+ lineWidth: 1,
+ stroke: '#0F0'
+ }
+ });
+ this.grouper.add(this.circle);
+ this.text = new Text({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ style: {
+ x: this.model.width / 4,
+ y: 0,
+ fontWeight: 300,
+ fontSize: this.model.width,
+ fontFamily: 'Consolas',
+ text: 'Y',
+ textFill: this.model.textFill || '#0F0',
+ textPosition: this.model.textPosition || 'inside',
+ textLineHeight: this.model.fontSize || 14
+ }
+ });
+ const boundingRect = this.text.getBoundingRect();
+ const distance = this.model.width / 2 - boundingRect.y - boundingRect.height / 2;
+ this.text.setStyle('y', distance);
+ this.grouper.add(this.text);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
+ }
+}
diff --git a/src/iscs/shape/temperatureDetector.js b/src/iscs/shape/temperatureDetector.js
new file mode 100644
index 000000000..cf52a7f3b
--- /dev/null
+++ b/src/iscs/shape/temperatureDetector.js
@@ -0,0 +1,59 @@
+import Group from 'zrender/src/container/Group';
+import Circle from 'zrender/src/graphic/shape/Circle';
+import Text from 'zrender/src/graphic/Text';
+
+export default class TemperatureDetector extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.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.circle = new Circle({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ cx: this.model.width / 2,
+ cy: this.model.width / 2,
+ r: this.model.width / 2
+ },
+ style: {
+ lineWidth: 1,
+ stroke: '#0F0'
+ }
+ });
+ this.grouper.add(this.circle);
+ this.text = new Text({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ style: {
+ x: this.model.width / 4,
+ y: 0,
+ fontWeight: 300,
+ fontSize: this.model.width,
+ fontFamily: 'Consolas',
+ text: 'W',
+ textFill: this.model.textFill || '#0F0',
+ textPosition: this.model.textPosition || 'inside',
+ textLineHeight: this.model.fontSize || 14
+ }
+ });
+ const boundingRect = this.text.getBoundingRect();
+ const distance = this.model.width / 2 - boundingRect.y - boundingRect.height / 2;
+ this.text.setStyle('y', distance);
+ this.grouper.add(this.text);
+ }
+ 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 7609f5fba..7c67cb089 100644
--- a/src/iscs/utils/parser.js
+++ b/src/iscs/utils/parser.js
@@ -39,6 +39,22 @@ export function parser(data) {
zrUtil.each(data.manualAlarmButtonList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem);
}, this);
+
+ zrUtil.each(data.fireHydranAlarmButtonList || [], elem => {
+ iscsDevice[elem.code] = deviceFactory(deviceType.FireHydranAlarmButton, elem);
+ }, this);
+
+ zrUtil.each(data.gasFireControlList || [], elem => {
+ iscsDevice[elem.code] = deviceFactory(deviceType.GasFireControl, elem);
+ }, this);
+
+ zrUtil.each(data.smokeDetectorList || [], elem => {
+ iscsDevice[elem.code] = deviceFactory(deviceType.SmokeDetector, elem);
+ }, this);
+
+ zrUtil.each(data.temperatureDetectorList || [], elem => {
+ iscsDevice[elem.code] = deviceFactory(deviceType.TemperatureDetector, elem);
+ });
}
return iscsDevice;
@@ -66,6 +82,18 @@ export function updateIscsData(device) {
case deviceType.ManualAlarmButton :
updateIscsListByDevice(iscsData, 'manualAlarmButtonList', device);
break;
+ case deviceType.FireHydranAlarmButton:
+ updateIscsListByDevice(iscsData, 'fireHydranAlarmButtonList', device);
+ break;
+ case deviceType.GasFireControl:
+ updateIscsListByDevice(iscsData, 'gasFireControlList', device);
+ break;
+ case deviceType.SmokeDetector:
+ updateIscsListByDevice(iscsData, 'smokeDetectorList', device);
+ break;
+ case deviceType.TemperatureDetector:
+ updateIscsListByDevice(iscsData, 'temperatureDetectorList', device);
+ break;
}
store.dispatch('iscs/setIscsData', iscsData);
}
diff --git a/src/views/system/iscsDraw/iscsOperate/fireHydranAlarmButton.vue b/src/views/system/iscsDraw/iscsOperate/fireHydranAlarmButton.vue
new file mode 100644
index 000000000..0d187dc14
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsOperate/fireHydranAlarmButton.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
+
+
+
diff --git a/src/views/system/iscsDraw/iscsOperate/gasFireControl.vue b/src/views/system/iscsDraw/iscsOperate/gasFireControl.vue
new file mode 100644
index 000000000..eb632d39c
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsOperate/gasFireControl.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
+
+
+
diff --git a/src/views/system/iscsDraw/iscsOperate/index.vue b/src/views/system/iscsDraw/iscsOperate/index.vue
index 70b141477..b5a6f3406 100644
--- a/src/views/system/iscsDraw/iscsOperate/index.vue
+++ b/src/views/system/iscsDraw/iscsOperate/index.vue
@@ -12,12 +12,36 @@
+
+
+
+
+
+
+
+
+
@@ -26,11 +50,17 @@
+
+
From 9b26c70100b7eb60aaa4139a35bab97959d8a47d Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 16 Jan 2020 13:03:44 +0800
Subject: [PATCH 14/20] =?UTF-8?q?FAS=E5=AD=90=E7=B3=BB=E7=BB=9F=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95PSD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceRender.js | 6 +
src/iscs/constant/deviceType.js | 3 +-
src/iscs/shape/factory.js | 2 +
src/iscs/shape/psd/platformScreenDoor.js | 161 ++++++++++++++++++
src/iscs/shape/psd/psdOpen.js | 0
src/iscs/utils/parser.js | 8 +-
.../system/iscsDraw/iscsOperate/index.vue | 24 ++-
.../iscsOperate/platformScreenDoor.vue | 103 +++++++++++
.../iscsOperate/temperatureDetector.vue | 103 +++++++++++
9 files changed, 406 insertions(+), 4 deletions(-)
create mode 100644 src/iscs/shape/psd/platformScreenDoor.js
create mode 100644 src/iscs/shape/psd/psdOpen.js
create mode 100644 src/views/system/iscsDraw/iscsOperate/platformScreenDoor.vue
create mode 100644 src/views/system/iscsDraw/iscsOperate/temperatureDetector.vue
diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js
index 76eaa9222..9395ae8ef 100644
--- a/src/iscs/constant/deviceRender.js
+++ b/src/iscs/constant/deviceRender.js
@@ -38,5 +38,11 @@ deviceRender[deviceType.TemperatureDetector] = {
zlevel: 1,
z: 4
};
+/** 屏蔽门渲染配置 */
+deviceRender[deviceType.PlatformScreenDoor] = {
+ _type: deviceType.PlatformScreenDoor,
+ zlevel: 1,
+ z: 4
+};
export default deviceRender;
diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js
index dd5747e0d..5182dfc9a 100644
--- a/src/iscs/constant/deviceType.js
+++ b/src/iscs/constant/deviceType.js
@@ -4,7 +4,8 @@ const deviceType = {
FireHydranAlarmButton: 'fireHydranAlarmButton',
GasFireControl: 'gasFireControl',
SmokeDetector: 'smokeDetector',
- TemperatureDetector: 'TemperatureDetector'
+ TemperatureDetector: 'temperatureDetector',
+ PlatformScreenDoor: 'platformScreenDoor'
};
export default deviceType;
diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js
index d99100fd3..3c677c219 100644
--- a/src/iscs/shape/factory.js
+++ b/src/iscs/shape/factory.js
@@ -5,6 +5,7 @@ import FireHydranAlarmButton from './fireHydrantAlarmButton';
import GasFireControl from './gasFireControl';
import SmokeDetector from './smokeDetector';
import TemperatureDetector from './temperatureDetector';
+import PlatformScreenDoor from './psd/platformScreenDoor';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
@@ -13,6 +14,7 @@ iscsShape[deviceType.FireHydranAlarmButton] = FireHydranAlarmButton;
iscsShape[deviceType.GasFireControl] = GasFireControl;
iscsShape[deviceType.SmokeDetector] = SmokeDetector;
iscsShape[deviceType.TemperatureDetector] = TemperatureDetector;
+iscsShape[deviceType.PlatformScreenDoor] = PlatformScreenDoor;
function shapefactory(device, iscs) {
const type = device.model._type;
diff --git a/src/iscs/shape/psd/platformScreenDoor.js b/src/iscs/shape/psd/platformScreenDoor.js
new file mode 100644
index 000000000..8f077c237
--- /dev/null
+++ b/src/iscs/shape/psd/platformScreenDoor.js
@@ -0,0 +1,161 @@
+import Group from 'zrender/src/container/Group';
+import Text from 'zrender/src/graphic/Text';
+import Rect from 'zrender/src/graphic/shape/Rect';
+import Line from 'zrender/src/graphic/shape/Line';
+
+export default class PlatformScreenDoor extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.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.glass = new Rect({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x: 0,
+ y: 0,
+ width: this.model.width,
+ height: this.model.width / 2
+ },
+ style: {
+ fill: '#FFFFFF'
+ }
+ });
+ this.glassTopLine = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: 0,
+ y1: this.model.width * 5 / 16,
+ x2: this.model.width,
+ y2: this.model.width * 5 / 16
+ },
+ style: {
+ lineWidth: 2,
+ stroke: '#CBCBCB'
+ }
+ });
+ this.glassBottomLine = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: 0,
+ y1: this.model.width * 7 / 16,
+ x2: this.model.width,
+ y2: this.model.width * 7 / 16
+ },
+ style: {
+ lineWidth: 2,
+ stroke: '#CBCBCB'
+ }
+ });
+ this.door = new Rect({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x: this.model.width / 4,
+ y: 0,
+ width: this.model.width / 2,
+ height: this.model.width / 2
+ },
+ style: {
+ fill: '#0F0'
+ }
+ });
+ this.doorLeftLine1 = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width / 4 + 2,
+ y1: 2,
+ x2: this.model.width / 4 + 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorLeftLine2 = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width / 4 + 2,
+ y1: 2,
+ x2: this.model.width / 2 - 2,
+ y2: 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorRightLine1 = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width / 2 + 2,
+ y1: 2,
+ x2: this.model.width * 3 / 4 - 2,
+ y2: 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorRightLine2 = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width * 3 / 4 - 2,
+ y1: 2,
+ x2: this.model.width * 3 / 4 - 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorCrack = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width / 2,
+ y1: 2,
+ x2: this.model.width / 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ stroke : '#000',
+ lineWidth: 2
+ }
+ });
+
+ this.grouper.add(this.glass);
+ this.grouper.add(this.glassTopLine);
+ this.grouper.add(this.glassBottomLine);
+ this.grouper.add(this.door);
+ this.grouper.add(this.doorLeftLine1);
+ this.grouper.add(this.doorLeftLine2);
+ this.grouper.add(this.doorRightLine1);
+ this.grouper.add(this.doorRightLine2);
+ this.grouper.add(this.doorCrack);
+ }
+ setModel(dx, dy) {
+ this.model.point.x += dx;
+ this.model.point.y += dy;
+ }
+}
diff --git a/src/iscs/shape/psd/psdOpen.js b/src/iscs/shape/psd/psdOpen.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js
index 7c67cb089..532a119ae 100644
--- a/src/iscs/utils/parser.js
+++ b/src/iscs/utils/parser.js
@@ -55,6 +55,10 @@ export function parser(data) {
zrUtil.each(data.temperatureDetectorList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.TemperatureDetector, elem);
});
+
+ zrUtil.each(data.platformScreenDoorList || [], elem =>{
+ iscsDevice[elem.code] = deviceFactory(deviceType.PlatformScreenDoor, elem);
+ });
}
return iscsDevice;
@@ -72,7 +76,6 @@ function updateIscsListByDevice(iscs, name, device) {
} else {
iscs[name] = [device];
}
-
return list;
}
@@ -94,6 +97,9 @@ export function updateIscsData(device) {
case deviceType.TemperatureDetector:
updateIscsListByDevice(iscsData, 'temperatureDetectorList', device);
break;
+ case deviceType.PlatformScreenDoor:
+ updateIscsListByDevice(iscsData, 'platformScreenDoorList', device);
+ break;
}
store.dispatch('iscs/setIscsData', iscsData);
}
diff --git a/src/views/system/iscsDraw/iscsOperate/index.vue b/src/views/system/iscsDraw/iscsOperate/index.vue
index b5a6f3406..4a1edc6e6 100644
--- a/src/views/system/iscsDraw/iscsOperate/index.vue
+++ b/src/views/system/iscsDraw/iscsOperate/index.vue
@@ -42,6 +42,22 @@
@deleteDataModel="deleteDataModel"
/>
+
+
+
+
+
+
@@ -53,6 +69,8 @@ import ManualAlarmButton from './manualAlarmButton';
import FireHydranAlarmButton from './fireHydranAlarmButton';
import GasFireControl from './gasFireControl';
import SmokeDetector from './smokeDetector';
+import TemperatureDetector from './temperatureDetector';
+import PlatformScreenDoor from './platformScreenDoor';
export default {
name: 'IscsOperate',
@@ -60,13 +78,15 @@ export default {
ManualAlarmButton,
FireHydranAlarmButton,
GasFireControl,
- SmokeDetector
+ SmokeDetector,
+ TemperatureDetector,
+ PlatformScreenDoor
},
mixins: [
],
data() {
return {
- enabledTab: 'Background',
+ enabledTab: 'maButton',
data: '',
stationCode: ''
};
diff --git a/src/views/system/iscsDraw/iscsOperate/platformScreenDoor.vue b/src/views/system/iscsDraw/iscsOperate/platformScreenDoor.vue
new file mode 100644
index 000000000..9861878d9
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsOperate/platformScreenDoor.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
+
+
+
diff --git a/src/views/system/iscsDraw/iscsOperate/temperatureDetector.vue b/src/views/system/iscsDraw/iscsOperate/temperatureDetector.vue
new file mode 100644
index 000000000..680cc4a41
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsOperate/temperatureDetector.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
+
+
+
From 394c5b776cfbbf32c07c5bc07b1ca6ae86292169 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Thu, 16 Jan 2020 13:15:52 +0800
Subject: [PATCH 15/20] =?UTF-8?q?iscs=20=E5=86=B7=E5=86=BB=E6=B3=B5/?=
=?UTF-8?q?=E5=86=B7=E5=8D=B4=E6=B3=B5=E6=B7=BB=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceRender.js | 7 +
src/iscs/constant/deviceType.js | 3 +-
src/iscs/shape/factory.js | 3 +-
src/iscs/shape/frozenPump.js | 56 +++++++
src/iscs/utils/parser.js | 11 +-
src/views/system/iscsDraw/index.vue | 2 +
.../iscsDraw/iscsBasOperate/frozenPump.vue | 144 ++++++++++++++++++
.../system/iscsDraw/iscsBasOperate/index.vue | 22 ++-
8 files changed, 238 insertions(+), 10 deletions(-)
create mode 100644 src/iscs/shape/frozenPump.js
create mode 100644 src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js
index b30b0acbb..01fb4ccad 100644
--- a/src/iscs/constant/deviceRender.js
+++ b/src/iscs/constant/deviceRender.js
@@ -15,4 +15,11 @@ deviceRender[deviceType.CheckBox] = {
z: 0
};
+/** FrozenPump渲染配置 */
+deviceRender[deviceType.FrozenPump] = {
+ _type: deviceType.FrozenPump,
+ zlevel: 10,
+ z: 0
+};
+
export default deviceRender;
diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js
index f42f70fc2..3b0ebfaf9 100644
--- a/src/iscs/constant/deviceType.js
+++ b/src/iscs/constant/deviceType.js
@@ -1,6 +1,7 @@
const deviceType = {
ManualAlarmButton: 'manualAlarmButton',
- CheckBox: 'CheckBox'
+ CheckBox: 'CheckBox',
+ FrozenPump:'FrozenPump'
};
export default deviceType;
diff --git a/src/iscs/shape/factory.js b/src/iscs/shape/factory.js
index c89d0e7ee..302cdda28 100644
--- a/src/iscs/shape/factory.js
+++ b/src/iscs/shape/factory.js
@@ -1,11 +1,12 @@
import ManualAlarmButton from './manualAlarmButton';
import deviceType from '../constant/deviceType';
import CheckBox from './checkBox';
+import FrozenPump from './frozenPump';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
iscsShape[deviceType.CheckBox] = CheckBox;
-
+iscsShape[deviceType.FrozenPump] = FrozenPump;
function shapefactory(device, iscs) {
const type = device.model._type;
const shape = iscsShape[type];
diff --git a/src/iscs/shape/frozenPump.js b/src/iscs/shape/frozenPump.js
new file mode 100644
index 000000000..8ef266d43
--- /dev/null
+++ b/src/iscs/shape/frozenPump.js
@@ -0,0 +1,56 @@
+import Group from 'zrender/src/container/Group';
+import Circle from 'zrender/src/graphic/shape/Circle';
+import Polygon from 'zrender/src/graphic/shape/Polygon';
+export default class frozenPump 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.circleOutside = new Circle({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape: {
+ cx: this.model.width / 2,
+ cy: this.model.width / 2,
+ r: this.model.width / 2
+ },
+ style: {
+ stroke: this.model.strokeColor,
+ lineWidth:2
+ }
+ });
+ this.triangle = new Polygon({
+ zlevel: this.model.zlevel,
+ z: this.model.z,
+ shape:{
+ points:[
+ [this.model.width / 4, this.model.width / 2 * 0.133975],
+ [this.model.width / 4, this.model.width / 2 * 1.866025],
+ [this.model.width, this.model.width / 2],
+ [this.model.width / 4, this.model.width / 2 * 0.133975]
+ ]
+ },
+ style: {
+ fill: this.model.strokeColor,
+ stroke:this.model.strokeColor
+ }
+ });
+ this.grouper.add(this.circleOutside);
+ this.grouper.add(this.triangle);
+ 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 7609f5fba..6e388eb52 100644
--- a/src/iscs/utils/parser.js
+++ b/src/iscs/utils/parser.js
@@ -39,6 +39,9 @@ export function parser(data) {
zrUtil.each(data.manualAlarmButtonList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem);
}, this);
+ zrUtil.each(data.frozenPumpList || [], elem => {
+ iscsDevice[elem.code] = deviceFactory(deviceType.FrozenPump, elem);
+ }, this);
}
return iscsDevice;
@@ -63,9 +66,15 @@ function updateIscsListByDevice(iscs, name, device) {
export function updateIscsData(device) {
const iscsData = store.getters['iscs/iscs'];
switch (device._type) {
- case deviceType.ManualAlarmButton :
+ case deviceType.ManualAlarmButton : {
updateIscsListByDevice(iscsData, 'manualAlarmButtonList', device);
break;
}
+ case deviceType.FrozenPump : {
+ updateIscsListByDevice(iscsData, 'frozenPumpList', device);
+ break;
+ }
+ }
+
store.dispatch('iscs/setIscsData', iscsData);
}
diff --git a/src/views/system/iscsDraw/index.vue b/src/views/system/iscsDraw/index.vue
index 4fa52102e..d707de353 100644
--- a/src/views/system/iscsDraw/index.vue
+++ b/src/views/system/iscsDraw/index.vue
@@ -36,7 +36,9 @@ export default {
}
},
watch: {
+ $route(val) {
+ }
},
created() {
},
diff --git a/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue b/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
new file mode 100644
index 000000000..5a562a9dd
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+ {{ $t('ibp.generateCode') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
diff --git a/src/views/system/iscsDraw/iscsBasOperate/index.vue b/src/views/system/iscsDraw/iscsBasOperate/index.vue
index 06dca8f54..a45cddcd7 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/index.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/index.vue
@@ -3,7 +3,7 @@
-
111111
+
111111
-
@@ -25,17 +25,25 @@
From 4103f1db8b935df58ec5887b2cc6b7427689e365 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Thu, 16 Jan 2020 13:41:10 +0800
Subject: [PATCH 16/20] =?UTF-8?q?iscs=20=E5=86=B7=E6=B0=B4=E6=9C=BA?=
=?UTF-8?q?=E7=BB=84=20=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iscsDraw/iscsBasOperate/chiller.vue | 130 ++++++++++++++++++
.../iscsDraw/iscsBasOperate/frozenPump.vue | 2 +-
.../system/iscsDraw/iscsBasOperate/index.vue | 12 +-
3 files changed, 142 insertions(+), 2 deletions(-)
create mode 100644 src/views/system/iscsDraw/iscsBasOperate/chiller.vue
diff --git a/src/views/system/iscsDraw/iscsBasOperate/chiller.vue b/src/views/system/iscsDraw/iscsBasOperate/chiller.vue
new file mode 100644
index 000000000..20faf981f
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsBasOperate/chiller.vue
@@ -0,0 +1,130 @@
+
+
+
+
+
+ {{ $t('ibp.generateCode') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
diff --git a/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue b/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
index 5a562a9dd..1dec45213 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/frozenPump.vue
@@ -109,7 +109,7 @@ export default {
},
initPage() {
this.isUpdate = false;
- this.buttonText = this.$t('ibp.createNow');
+ this.buttonText = '立即创建';
this.showDeleteButton = false;
this.form = {
code:'',
diff --git a/src/views/system/iscsDraw/iscsBasOperate/index.vue b/src/views/system/iscsDraw/iscsBasOperate/index.vue
index a45cddcd7..1a6074c2f 100644
--- a/src/views/system/iscsDraw/iscsBasOperate/index.vue
+++ b/src/views/system/iscsDraw/iscsBasOperate/index.vue
@@ -19,6 +19,14 @@
@deleteDataModel="deleteDataModel"
/>
+
+
+
@@ -27,10 +35,12 @@
+
+
From 3b263669355790311b89f3051727d7fa09d8ba66 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 16 Jan 2020 16:25:33 +0800
Subject: [PATCH 18/20] =?UTF-8?q?Psd=E5=AD=90=E7=B3=BB=E7=BB=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/shape/fireHydrantAlarmButton.js | 3 +
src/iscs/shape/psd/platformScreenDoor.js | 107 ++++--------------
src/iscs/shape/psd/psdClose.js | 104 +++++++++++++++++
src/iscs/shape/psd/psdOpen.js | 98 ++++++++++++++++
src/iscs/shape/psd/unknownState.js | 45 ++++++++
src/views/system/iscsDesign/demonList.vue | 10 +-
src/views/system/iscsDraw/index.vue | 9 +-
.../system/iscsDraw/iscsOperate/index.vue | 17 +--
.../system/iscsDraw/iscsPsdOperate/index.vue | 85 ++++++++++++++
.../platformScreenDoor.vue | 0
10 files changed, 376 insertions(+), 102 deletions(-)
create mode 100644 src/iscs/shape/psd/psdClose.js
create mode 100644 src/iscs/shape/psd/unknownState.js
create mode 100644 src/views/system/iscsDraw/iscsPsdOperate/index.vue
rename src/views/system/iscsDraw/{iscsOperate => iscsPsdOperate}/platformScreenDoor.vue (100%)
diff --git a/src/iscs/shape/fireHydrantAlarmButton.js b/src/iscs/shape/fireHydrantAlarmButton.js
index 80630bdc6..df6434c19 100644
--- a/src/iscs/shape/fireHydrantAlarmButton.js
+++ b/src/iscs/shape/fireHydrantAlarmButton.js
@@ -48,6 +48,9 @@ export default class FireHydrantAlarmButton extends Group {
z: this.z,
shape: {
points: [[width * 2 / 5, width * 3 / 10], [width * 3 / 5, width * 3 / 10], [width * 13 / 20, width * 2 / 5], [width * 7 / 20, width * 2 / 5]]
+ },
+ style: {
+ color: '#000'
}
});
this.grouper.add(this.polygonTop);
diff --git a/src/iscs/shape/psd/platformScreenDoor.js b/src/iscs/shape/psd/platformScreenDoor.js
index 8f077c237..c0fa4c9ec 100644
--- a/src/iscs/shape/psd/platformScreenDoor.js
+++ b/src/iscs/shape/psd/platformScreenDoor.js
@@ -2,6 +2,9 @@ import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
+import PsdClose from './psdClose';
+import PsdOpen from './psdOpen';
+import UnknownState from './unknownState';
export default class PlatformScreenDoor extends Group {
constructor(device) {
@@ -60,99 +63,35 @@ export default class PlatformScreenDoor extends Group {
stroke: '#CBCBCB'
}
});
- this.door = new Rect({
- zlevel: this.zlevel,
- z: this.z,
- shape: {
- x: this.model.width / 4,
- y: 0,
- width: this.model.width / 2,
- height: this.model.width / 2
- },
- style: {
- fill: '#0F0'
+ this.psdClose = new PsdClose({
+ model: {
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ width: this.model.width
}
});
- this.doorLeftLine1 = new Line({
- zlevel: this.zlevel,
- z: this.z,
- shape: {
- x1: this.model.width / 4 + 2,
- y1: 2,
- x2: this.model.width / 4 + 2,
- y2: this.model.width / 2
- },
- style: {
- stroke: '#000',
- lineWidth: 0.5
+ this.psdOpen = new PsdOpen({
+ model: {
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ width: this.model.width
}
});
- this.doorLeftLine2 = new Line({
- zlevel: this.zlevel,
- z: this.z,
- shape: {
- x1: this.model.width / 4 + 2,
- y1: 2,
- x2: this.model.width / 2 - 2,
- y2: 2
- },
- style: {
- stroke: '#000',
- lineWidth: 0.5
+ this.unknownState = new UnknownState({
+ model: {
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ width: this.model.width
}
});
- this.doorRightLine1 = new Line({
- zlevel: this.zlevel,
- z: this.z,
- shape: {
- x1: this.model.width / 2 + 2,
- y1: 2,
- x2: this.model.width * 3 / 4 - 2,
- y2: 2
- },
- style: {
- stroke: '#000',
- lineWidth: 0.5
- }
- });
- this.doorRightLine2 = new Line({
- zlevel: this.zlevel,
- z: this.z,
- shape: {
- x1: this.model.width * 3 / 4 - 2,
- y1: 2,
- x2: this.model.width * 3 / 4 - 2,
- y2: this.model.width / 2
- },
- style: {
- stroke: '#000',
- lineWidth: 0.5
- }
- });
- this.doorCrack = new Line({
- zlevel: this.zlevel,
- z: this.z,
- shape: {
- x1: this.model.width / 2,
- y1: 2,
- x2: this.model.width / 2,
- y2: this.model.width / 2
- },
- style: {
- stroke : '#000',
- lineWidth: 2
- }
- });
-
this.grouper.add(this.glass);
this.grouper.add(this.glassTopLine);
this.grouper.add(this.glassBottomLine);
- this.grouper.add(this.door);
- this.grouper.add(this.doorLeftLine1);
- this.grouper.add(this.doorLeftLine2);
- this.grouper.add(this.doorRightLine1);
- this.grouper.add(this.doorRightLine2);
- this.grouper.add(this.doorCrack);
+ this.grouper.add(this.psdClose);
+ this.grouper.add(this.psdOpen);
+ this.grouper.add(this.unknownState);
+ this.unknownState.hide();
+ this.psdOpen.hide();
}
setModel(dx, dy) {
this.model.point.x += dx;
diff --git a/src/iscs/shape/psd/psdClose.js b/src/iscs/shape/psd/psdClose.js
new file mode 100644
index 000000000..367d2a4c6
--- /dev/null
+++ b/src/iscs/shape/psd/psdClose.js
@@ -0,0 +1,104 @@
+import Group from 'zrender/src/container/Group';
+import Line from 'zrender/src/graphic/shape/Line';
+import Rect from 'zrender/src/graphic/shape/Rect';
+
+export default class PsdClose extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.model.z;
+ this.create();
+ }
+ create() {
+ this.door = new Rect({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x: this.model.width / 4,
+ y: 0,
+ width: this.model.width / 2,
+ height: this.model.width / 2
+ },
+ style: {
+ fill: '#0F0'
+ }
+ });
+ this.doorLeftLine1 = new Line({
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ shape: {
+ x1: this.model.width / 4 + 2,
+ y1: 2,
+ x2: this.model.width / 4 + 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorLeftLine2 = new Line({
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ shape: {
+ x1: this.model.width / 4 + 2,
+ y1: 2,
+ x2: this.model.width / 2 - 2,
+ y2: 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorRightLine1 = new Line({
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ shape: {
+ x1: this.model.width / 2 + 2,
+ y1: 2,
+ x2: this.model.width * 3 / 4 - 2,
+ y2: 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorRightLine2 = new Line({
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ shape: {
+ x1: this.model.width * 3 / 4 - 2,
+ y1: 2,
+ x2: this.model.width * 3 / 4 - 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ stroke: '#000',
+ lineWidth: 0.5
+ }
+ });
+ this.doorCrack = new Line({
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ shape: {
+ x1: this.model.width / 2,
+ y1: 2,
+ x2: this.model.width / 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ stroke : '#000',
+ lineWidth: 2
+ }
+ });
+ this.add(this.door);
+ this.add(this.doorLeftLine1);
+ this.add(this.doorLeftLine2);
+ this.add(this.doorRightLine1);
+ this.add(this.doorRightLine2);
+ this.add(this.doorCrack);
+ }
+}
diff --git a/src/iscs/shape/psd/psdOpen.js b/src/iscs/shape/psd/psdOpen.js
index e69de29bb..da3417db2 100644
--- a/src/iscs/shape/psd/psdOpen.js
+++ b/src/iscs/shape/psd/psdOpen.js
@@ -0,0 +1,98 @@
+import Group from 'zrender/src/container/Group';
+import Line from 'zrender/src/graphic/shape/Line';
+import Rect from 'zrender/src/graphic/shape/Rect';
+import Polygon from 'zrender/src/graphic/shape/Polygon';
+
+export default class PsdOpen extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.model.z;
+ this.create();
+ }
+ create() {
+ this.bgRect = new Rect({
+ zlevel: this.zlevel,
+ z: this.z - 1,
+ shape: {
+ x: this.model.width / 4,
+ y: 0,
+ width: this.model.width / 2,
+ height: this.model.width / 2
+ },
+ style: {
+ fill: '#000'
+ }
+ });
+ this.doorLeftFrame = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width / 4,
+ y1: 0,
+ x2: this.model.width / 4,
+ y2: this.model.width / 2
+ },
+ style: {
+ lineWidth: this.model.width / 40,
+ stroke: '#10F19A'
+ }
+ });
+ this.doorTopFrame = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width / 4,
+ y1: this.model.width / 80,
+ x2: this.model.width * 3 / 4,
+ y2: this.model.width / 80
+ },
+ style: {
+ lineWidth: this.model.width / 40,
+ stroke: '#10F19A'
+ }
+ });
+ this.doorRightFrame = new Line({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x1: this.model.width * 3 / 4,
+ y1: 0,
+ x2: this.model.width * 3 / 4,
+ y2: this.model.width / 2
+ },
+ style: {
+ lineWidth: this.model.width / 40,
+ stroke: '#10F19A'
+ }
+ });
+ this.leftPolygon = new Polygon({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ points: [[this.model.width * 21 / 80, this.model.width * 3 / 80], [this.model.width * 5 / 12, this.model.width / 8], [this.model.width * 5 / 12, this.model.width * 37 / 80], [this.model.width * 21 / 80, this.model.width * 37 / 80]]
+ },
+ style: {
+ fill: '#00CC33'
+ }
+ });
+ this.rightPolygon = new Polygon({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ points: [
+ [this.model.width * 7 / 12, this.model.width / 8], [this.model.width * 59 / 80, this.model.width * 3 / 80], [this.model.width * 59 / 80, this.model.width * 37 / 80], [this.model.width * 7 / 12, this.model.width * 37 / 80]]
+ },
+ style: {
+ fill: '#00CC33'
+ }
+ });
+ this.add(this.bgRect);
+ this.add(this.doorLeftFrame);
+ this.add(this.doorRightFrame);
+ this.add(this.doorTopFrame);
+ this.add(this.leftPolygon);
+ this.add(this.rightPolygon);
+ }
+}
diff --git a/src/iscs/shape/psd/unknownState.js b/src/iscs/shape/psd/unknownState.js
new file mode 100644
index 000000000..0d918c0a2
--- /dev/null
+++ b/src/iscs/shape/psd/unknownState.js
@@ -0,0 +1,45 @@
+import Group from 'zrender/src/container/Group';
+import Rect from 'zrender/src/graphic/shape/Rect';
+import Line from 'zrender/src/graphic/shape/Line';
+
+export default class UnknownState extends Group {
+ constructor(device) {
+ super();
+ this.model = device.model;
+ this.zlevel = device.model.zlevel;
+ this.z = device.model.z;
+ this.create();
+ }
+ create() {
+ this.doorFrame = new Rect({
+ zlevel: this.zlevel,
+ z: this.z,
+ shape: {
+ x: this.model.width / 4,
+ y: 0,
+ width: this.model.width / 2,
+ height: this.model.width / 2
+ },
+ style: {
+ stroke: '#10F19A',
+ fill: '#B5B201'
+ }
+ });
+ this.doorCrack = new Line({
+ zlevel: this.zlevel,
+ z: this.z + 1,
+ shape: {
+ x1: this.model.width / 2,
+ y1: 0,
+ x2: this.model.width / 2,
+ y2: this.model.width / 2
+ },
+ style: {
+ lineWidth: 2,
+ stroke: '#10F19A'
+ }
+ });
+ this.add(this.doorFrame);
+ this.add(this.doorCrack);
+ }
+}
diff --git a/src/views/system/iscsDesign/demonList.vue b/src/views/system/iscsDesign/demonList.vue
index 5219d5f0c..ff580f510 100644
--- a/src/views/system/iscsDesign/demonList.vue
+++ b/src/views/system/iscsDesign/demonList.vue
@@ -87,8 +87,8 @@ export default {
type: 'system',
children: [
{
- name: 'HMI界面',
- mode: 'hmi',
+ name: 'FAS界面',
+ mode: 'fas',
id: '1',
type: 'interface'
},
@@ -97,6 +97,12 @@ export default {
mode: 'bas',
id: '2',
type: 'interface'
+ },
+ {
+ name: 'PSD界面',
+ mode: 'psd',
+ id: '3',
+ type: 'interface'
}
]
}
diff --git a/src/views/system/iscsDraw/index.vue b/src/views/system/iscsDraw/index.vue
index 4fa52102e..58154c9fb 100644
--- a/src/views/system/iscsDraw/index.vue
+++ b/src/views/system/iscsDraw/index.vue
@@ -5,8 +5,9 @@
-
-
+
+
+
@@ -15,12 +16,14 @@
import IscsPlate from '@/views/iscsSystem/index';
import IscsOperate from './iscsOperate/index';
import IscsBasOperate from './iscsBasOperate/index';
+import IscsPsdOperate from './iscsPsdOperate/index';
export default {
name: 'IscsView',
components: {
IscsPlate,
IscsOperate,
- IscsBasOperate
+ IscsBasOperate,
+ IscsPsdOperate
},
data() {
return {
diff --git a/src/views/system/iscsDraw/iscsOperate/index.vue b/src/views/system/iscsDraw/iscsOperate/index.vue
index 4a1edc6e6..a56fd3147 100644
--- a/src/views/system/iscsDraw/iscsOperate/index.vue
+++ b/src/views/system/iscsDraw/iscsOperate/index.vue
@@ -1,7 +1,7 @@
-
-
+
+
@@ -70,7 +62,6 @@ import FireHydranAlarmButton from './fireHydranAlarmButton';
import GasFireControl from './gasFireControl';
import SmokeDetector from './smokeDetector';
import TemperatureDetector from './temperatureDetector';
-import PlatformScreenDoor from './platformScreenDoor';
export default {
name: 'IscsOperate',
@@ -79,8 +70,7 @@ export default {
FireHydranAlarmButton,
GasFireControl,
SmokeDetector,
- TemperatureDetector,
- PlatformScreenDoor
+ TemperatureDetector
},
mixins: [
],
@@ -131,4 +121,5 @@ export default {
float: right;
width: 100%;
}
+ .heightClass{height:100%;}
diff --git a/src/views/system/iscsDraw/iscsPsdOperate/index.vue b/src/views/system/iscsDraw/iscsPsdOperate/index.vue
new file mode 100644
index 000000000..61cc048f3
--- /dev/null
+++ b/src/views/system/iscsDraw/iscsPsdOperate/index.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+ {{ $t('ibp.save') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/iscsDraw/iscsOperate/platformScreenDoor.vue b/src/views/system/iscsDraw/iscsPsdOperate/platformScreenDoor.vue
similarity index 100%
rename from src/views/system/iscsDraw/iscsOperate/platformScreenDoor.vue
rename to src/views/system/iscsDraw/iscsPsdOperate/platformScreenDoor.vue
From 27257482ab2c8eb1583a782d07e13c69e5673e05 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Thu, 16 Jan 2020 18:02:57 +0800
Subject: [PATCH 19/20] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BA=BF=E8=B7=AF?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=20ISCS?=
=?UTF-8?q?=20=E7=BB=98=E5=9B=BE=E5=85=83=E7=B4=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceRender.js | 9 +-
src/iscs/constant/deviceType.js | 1 +
src/iscs/shape/Vidicon.js | 2 +-
src/iscs/shape/VidiconCloud.js | 66 +++++++++
src/iscs/shape/factory.js | 2 +
src/iscs/utils/parser.js | 11 +-
src/store/modules/iscs.js | 13 +-
src/utils/baseUrl.js | 4 +-
src/views/system/configLine/config.vue | 61 +++++++--
src/views/system/configLine/editConfig.vue | 39 +++---
.../system/iscsDraw/iscsOperate/index.vue | 14 +-
.../system/iscsDraw/iscsOperate/vidicon.vue | 14 +-
.../iscsDraw/iscsOperate/vidiconCloud.vue | 126 ++++++++++++++++++
13 files changed, 318 insertions(+), 44 deletions(-)
create mode 100644 src/iscs/shape/VidiconCloud.js
create mode 100644 src/views/system/iscsDraw/iscsOperate/vidiconCloud.vue
diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js
index d464329d5..274fb01e7 100644
--- a/src/iscs/constant/deviceRender.js
+++ b/src/iscs/constant/deviceRender.js
@@ -52,11 +52,18 @@ deviceRender[deviceType.FrozenPump] = {
z: 0
};
-/** IbpText渲染配置*/
+/** Vidicon渲染配置*/
deviceRender[deviceType.Vidicon] = {
_type: deviceType.Vidicon,
zlevel: 1,
z: 4
};
+/** VidiconCloud渲染配置*/
+deviceRender[deviceType.VidiconCloud] = {
+ _type: deviceType.VidiconCloud,
+ zlevel: 1,
+ z: 4
+};
+
export default deviceRender;
diff --git a/src/iscs/constant/deviceType.js b/src/iscs/constant/deviceType.js
index ad36705d5..d77559704 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',
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/factory.js b/src/iscs/shape/factory.js
index 964b93a36..868c9f610 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 './frozenPump';
@@ -12,6 +13,7 @@ import PlatformScreenDoor from './psd/platformScreenDoor';
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;
diff --git a/src/iscs/utils/parser.js b/src/iscs/utils/parser.js
index 793303cf6..a4e2a820c 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);
@@ -87,6 +90,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;
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 @@
-
-
-
-
+
+
+
+
{{ scope.row.configValue }}
+
+
+
+ {{ scope.row.configValue }}
+
+
+
+
+
-
-
+
+
+
From 027518132a6b2fc19c7b478de78322190ca0c0d7 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Thu, 16 Jan 2020 18:06:00 +0800
Subject: [PATCH 20/20] =?UTF-8?q?psd=E5=AD=90=E7=B3=BB=E7=BB=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/constant/deviceRender.js | 7 ++
src/iscs/constant/deviceType.js | 3 +-
src/iscs/shape/endDoor.js | 67 ++++++++++++
src/iscs/shape/factory.js | 2 +
src/iscs/shape/stateTable.js | 38 +++++++
src/iscs/utils/parser.js | 7 ++
.../iscsDraw/iscsPsdOperate/endDoor.vue | 103 ++++++++++++++++++
.../system/iscsDraw/iscsPsdOperate/index.vue | 12 +-
8 files changed, 237 insertions(+), 2 deletions(-)
create mode 100644 src/iscs/shape/endDoor.js
create mode 100644 src/iscs/shape/stateTable.js
create mode 100644 src/views/system/iscsDraw/iscsPsdOperate/endDoor.vue
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+ {{ $t('global.delete') }}
+ {{ $t('global.cancel') }}
+
+
+
+
+
+
+
+
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 @@