# Conflicts:
#	src/iscs/constant/iscsData.js
This commit is contained in:
zyy 2020-02-05 17:21:50 +08:00
commit 694c0c441c
12 changed files with 56 additions and 93 deletions

View File

@ -1,9 +1,9 @@
const iscsData = { const iscsData = {
'11': { "iscsLineList": [{ "point1": { "x": 22, "y": 238 }, "point2": { "x": 22, "y": 506 }, "code": "IscsLine_2", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 22, "y": 238 } }, { "point1": { "x": 22, "y": 239 }, "point2": { "x": 297, "y": 239 }, "code": "IscsLine_1", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 22, "y": 239 } }, { "point1": { "x": 21, "y": 506 }, "point2": { "x": 296, "y": 506 }, "code": "IscsLine_3", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 21, "y": 506 } }, { "point1": { "x": 295, "y": 505 }, "point2": { "x": 295, "y": 527 }, "code": "IscsLine_4", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 295, "y": 505 } }], "iscsRectList": [{ "point": { "x": 41, "y": 239 }, "code": "IscsRect_1", "_type": "IscsRect", "fillColor": "rgba(181, 181, 181, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 86, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 127, "y": 239 }, "code": "IscsRect_2", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 55, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 182, "y": 239 }, "code": "IscsRect_3", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 37, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 219, "y": 239 }, "code": "IscsRect_4", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 32, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 251, "y": 239 }, "code": "IscsRect_5", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 45, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 22, "y": 409 }, "code": "IscsRect_6", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 68, "height": 97, "zlevel": 1, "z": 3 }, { "point": { "x": 90, "y": 409 }, "code": "IscsRect_7", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 68, "height": 97, "zlevel": 1, "z": 3 }, { "point": { "x": 225, "y": 380 }, "code": "IscsRect_8", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 70, "height": 125, "zlevel": 1, "z": 3 }], "temperatureDetectorList": [], "smokeDetectorList": [{ "point": { "x": 192, "y": 301 }, "code": "SmokeDetector_1", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }, { "point": { "x": 226, "y": 300 }, "code": "SmokeDetector_2", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }, { "point": { "x": 263, "y": 300 }, "code": "SmokeDetector_3", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }, { "point": { "x": 73, "y": 290 }, "code": "SmokeDetector_4", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }], "iscsTextList": [{ "point": { "x": 63, "y": 315 }, "code": "IscsText_1", "_type": "IscsText", "context": "3号楼梯", "textFill": "#F1E98F", "fontSize": 10, "fontWeight": 400, "fontFamily": "consolas", "zlevel": 1, "z": 4 }, { "point": { "x": 128, "y": 274 }, "code": "IscsText_2", "_type": "IscsText", "context": "排热风道一", "textFill": "#F1E98F", "fontSize": 12, "fontWeight": 450, "fontFamily": "consolas", "zlevel": 1, "z": 4 }] }, '11': { "iscsLineList": [{ "point1": { "x": 22, "y": 238 }, "point2": { "x": 22, "y": 506 }, "code": "IscsLine_2", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 22, "y": 238 } }, { "point1": { "x": 22, "y": 239 }, "point2": { "x": 297, "y": 239 }, "code": "IscsLine_1", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 22, "y": 239 } }, { "point1": { "x": 21, "y": 506 }, "point2": { "x": 296, "y": 506 }, "code": "IscsLine_3", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 21, "y": 506 } }, { "point1": { "x": 295, "y": 505 }, "point2": { "x": 295, "y": 527 }, "code": "IscsLine_4", "_type": "IscsLine", "lineWidth": 2, "fillColor": "#fff", "zlevel": 1, "z": 4, "point": { "x": 295, "y": 505 } }], "iscsRectList": [{ "point": { "x": 41, "y": 239 }, "code": "IscsRect_1", "_type": "IscsRect", "fillColor": "rgba(181, 181, 181, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 86, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 127, "y": 239 }, "code": "IscsRect_2", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 55, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 182, "y": 239 }, "code": "IscsRect_3", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 37, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 219, "y": 239 }, "code": "IscsRect_4", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 32, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 251, "y": 239 }, "code": "IscsRect_5", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 45, "height": 89, "zlevel": 1, "z": 3 }, { "point": { "x": 22, "y": 409 }, "code": "IscsRect_6", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 68, "height": 97, "zlevel": 1, "z": 3 }, { "point": { "x": 90, "y": 409 }, "code": "IscsRect_7", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 68, "height": 97, "zlevel": 1, "z": 3 }, { "point": { "x": 225, "y": 380 }, "code": "IscsRect_8", "_type": "IscsRect", "fillColor": "rgba(255, 0, 0, 0)", "borderWidth": 2, "strokeColor": "#B5B5B5", "width": 70, "height": 125, "zlevel": 1, "z": 3 }], "temperatureDetectorList": [], "smokeDetectorList": [{ "point": { "x": 192, "y": 301 }, "code": "SmokeDetector_1", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }, { "point": { "x": 226, "y": 300 }, "code": "SmokeDetector_2", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }, { "point": { "x": 263, "y": 300 }, "code": "SmokeDetector_3", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }, { "point": { "x": 73, "y": 290 }, "code": "SmokeDetector_4", "_type": "SmokeDetector", "width": 19, "zlevel": 1, "z": 4 }], "iscsTextList": [{ "point": { "x": 63, "y": 315 }, "code": "IscsText_1", "_type": "IscsText", "context": "3号楼梯", "textFill": "#F1E98F", "fontSize": 10, "fontWeight": 400, "fontFamily": "consolas", "zlevel": 1, "z": 4 }, { "point": { "x": 128, "y": 274 }, "code": "IscsText_2", "_type": "IscsText", "context": "排热风道一", "textFill": "#F1E98F", "fontSize": 12, "fontWeight": 450, "fontFamily": "consolas", "zlevel": 1, "z": 4 }] },
'12': {}, '12':{},
'21': {}, '21':{},
'31': {}, '31':{},
'41': { "vidiconList": [{ "_type": "Vidicon", "code": "Vidicon_1", "width": 40, "right": true, "point": { "x": 178, "y": 73 }, "zlevel": 1, "z": 4 }, { "_type": "Vidicon", "code": "Vidicon_2", "width": 40, "right": true, "point": { "x": 309, "y": 147 }, "zlevel": 1, "z": 4 }, { "_type": "Vidicon", "code": "Vidicon_3", "width": 40, "right": true, "point": { "x": 308, "y": 72 }, "zlevel": 1, "z": 4 }], "iscsRectList": [{ "point": { "x": 25, "y": 176 }, "code": "IscsRect_1", "_type": "IscsRect", "fillColor": "rgba(239, 231, 231, 0)", "borderWidth": 2, "strokeColor": "#F7F1F1", "width": 70, "height": 90, "zlevel": 1, "z": 3 }, { "point": { "x": 96, "y": 176 }, "code": "IscsRect_2", "_type": "IscsRect", "fillColor": "rgba(239, 231, 231, 0)", "borderWidth": 2, "strokeColor": "#F7F1F1", "width": 70, "height": 90, "zlevel": 1, "z": 3 }, { "point": { "x": 167, "y": 176 }, "code": "IscsRect_3", "_type": "IscsRect", "fillColor": "rgba(239, 231, 231, 0)", "borderWidth": 2, "strokeColor": "#F7F1F1", "width": 70, "height": 90, "zlevel": 1, "z": 3 }, { "point": { "x": 238, "y": 176 }, "code": "IscsRect_4", "_type": "IscsRect", "fillColor": "rgba(239, 231, 231, 0)", "borderWidth": 2, "strokeColor": "#F7F1F1", "width": 70, "height": 90, "zlevel": 1, "z": 3 }, { "point": { "x": 309, "y": 149 }, "code": "IscsRect_5", "_type": "IscsRect", "fillColor": "rgba(239, 231, 231, 0)", "borderWidth": 2, "strokeColor": "#F7F1F1", "width": 70, "height": 90, "zlevel": 1, "z": 3 }], "vidiconCloudList": [{ "_type": "VidiconCloud", "code": "VidiconCloud_1", "r": 18, "point": { "x": 50, "y": 61 }, "zlevel": 1, "z": 4 }, { "_type": "VidiconCloud", "code": "VidiconCloud_2", "r": 18, "point": { "x": 121, "y": 206 }, "zlevel": 1, "z": 4 }, { "_type": "VidiconCloud", "code": "VidiconCloud_3", "r": 18, "point": { "x": 192, "y": 206 }, "zlevel": 1, "z": 4 }, { "_type": "VidiconCloud", "code": "VidiconCloud_4", "r": 18, "point": { "x": 262, "y": 207 }, "zlevel": 1, "z": 4 }], "iscsLineList": [{ "point1": { "x": 375, "y": 50 }, "point2": { "x": 1075, "y": 50 }, "code": "IscsLine_1", "_type": "IscsLine", "lineWidth": 10, "fillColor": "#F7F1F1", "zlevel": 1, "z": 4, "point": { "x": 375, "y": 50 } }, { "point1": { "x": 376, "y": 306 }, "point2": { "x": 1076, "y": 306 }, "code": "IscsLine_2", "_type": "IscsLine", "lineWidth": 10, "fillColor": "#F7F1F1", "zlevel": 1, "z": 4, "point": { "x": 376, "y": 306 } }] }, '41': {"vidiconList":[{"_type":"Vidicon","code":"Vidicon_1","width":40,"right":true,"point":{"x":178,"y":73},"zlevel":1,"z":4},{"_type":"Vidicon","code":"Vidicon_2","width":40,"right":true,"point":{"x":309,"y":147},"zlevel":1,"z":4},{"_type":"Vidicon","code":"Vidicon_3","width":40,"right":true,"point":{"x":308,"y":72},"zlevel":1,"z":4}],"iscsRectList":[{"point":{"x":25,"y":176},"code":"IscsRect_1","_type":"IscsRect","fillColor":"rgba(239, 231, 231, 0)","borderWidth":2,"strokeColor":"#F7F1F1","width":70,"height":90,"zlevel":1,"z":3},{"point":{"x":96,"y":176},"code":"IscsRect_2","_type":"IscsRect","fillColor":"rgba(239, 231, 231, 0)","borderWidth":2,"strokeColor":"#F7F1F1","width":70,"height":90,"zlevel":1,"z":3},{"point":{"x":167,"y":176},"code":"IscsRect_3","_type":"IscsRect","fillColor":"rgba(239, 231, 231, 0)","borderWidth":2,"strokeColor":"#F7F1F1","width":70,"height":90,"zlevel":1,"z":3},{"point":{"x":238,"y":176},"code":"IscsRect_4","_type":"IscsRect","fillColor":"rgba(239, 231, 231, 0)","borderWidth":2,"strokeColor":"#F7F1F1","width":70,"height":90,"zlevel":1,"z":3},{"point":{"x":309,"y":149},"code":"IscsRect_5","_type":"IscsRect","fillColor":"rgba(239, 231, 231, 0)","borderWidth":2,"strokeColor":"#F7F1F1","width":70,"height":90,"zlevel":1,"z":3}],"vidiconCloudList":[{"_type":"VidiconCloud","code":"VidiconCloud_1","r":18,"point":{"x":50,"y":61},"zlevel":1,"z":4},{"_type":"VidiconCloud","code":"VidiconCloud_2","r":18,"point":{"x":121,"y":206},"zlevel":1,"z":4},{"_type":"VidiconCloud","code":"VidiconCloud_3","r":18,"point":{"x":192,"y":206},"zlevel":1,"z":4},{"_type":"VidiconCloud","code":"VidiconCloud_4","r":18,"point":{"x":262,"y":207},"zlevel":1,"z":4}],"iscsLineList":[{"point1":{"x":375,"y":50},"point2":{"x":1075,"y":50},"code":"IscsLine_1","_type":"IscsLine","lineWidth":10,"fillColor":"#F7F1F1","zlevel":1,"z":4,"point":{"x":375,"y":50}},{"point1":{"x":376,"y":306},"point2":{"x":1076,"y":306},"code":"IscsLine_2","_type":"IscsLine","lineWidth":10,"fillColor":"#F7F1F1","zlevel":1,"z":4,"point":{"x":376,"y":306}}]},
'42': {}, '42': {},
'51': {}, '51': {},
'61': {}, '61': {},

View File

@ -14,6 +14,7 @@ export default class line extends Group {
} }
create() { create() {
const model = this.model; const model = this.model;
console.log(model);
this.grouper = new Group({ this.grouper = new Group({
id: model.code, id: model.code,
position: [model.point1.x, model.point1.y] position: [model.point1.x, model.point1.y]

View File

@ -88,6 +88,7 @@ export default {
}, },
methods: { methods: {
createDataModel(model) { createDataModel(model) {
console.log(model);
const newModel = deviceFactory(model._type, model); const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model); this.$store.dispatch('iscs/updateIscsDevices', newModel.model);
}, },

View File

@ -41,7 +41,7 @@ export default {
form: { form: {
code: '', code: '',
lineWidth: '', lineWidth: '',
fillColor: '#fff', fillColor: '#000000',
x1: 10, x1: 10,
y1: 10, y1: 10,
x2: 20, x2: 20,
@ -54,18 +54,6 @@ export default {
fillColor: [ fillColor: [
{ required: true, message: '请输入线段颜色', trigger: 'blur' } { required: true, message: '请输入线段颜色', trigger: 'blur' }
], ],
x1: [
{ required: true, message: '请输入数值', trigger: 'blur' }
],
y1: [
{ required: true, message: '请输入数值', trigger: 'blur' }
],
x2: [
{ required: true, message: '请输入数值', trigger: 'blur' }
],
y2: [
{ required: true, message: '请输入数值', trigger: 'blur' }
]
} }
}; };
}, },
@ -74,22 +62,20 @@ export default {
'iscs' 'iscs'
]) ])
}, },
watch: { watch:{
'$store.state.iscs.rightClickCount': function (val) { '$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData']; const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsLine' ) { if (model._type === 'IscsLine' ) {
this.buttonText = '修改'; this.buttonText = '修改';
this.showDeleteButton = true; this.showDeleteButton = true;
this.isUpdate = true; this.isUpdate = true;
this.form = { this.form.code = model.code;
code: model.code, this.form.lineWidth = model.lineWidth;
lineWidth: model.lineWidth, this.form.fillColor = model.fillColor;
fillColor: model.fillColor, this.form.x1 = model.point1.x;
x1: model.point1.x, this.form.y1 = model.point1.y;
y1: model.point1.y, this.form.x1 = model.point2.x;
x2: model.point2.x, this.form.y2 = model.point2.y;
y2: model.point2.y
};
} }
} }
}, },
@ -112,9 +98,6 @@ export default {
lineWidth: this.form.lineWidth, lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor fillColor: this.form.fillColor
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', lineModel); this.$emit('createDataModel', lineModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -68,23 +68,21 @@ export default {
'iscs' 'iscs'
]) ])
}, },
watch: { watch:{
'$store.state.iscs.rightClickCount': function (val) { '$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData']; const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsRect' ) { if (model._type === 'IscsRect' ) {
this.buttonText = '修改'; this.buttonText = '修改';
this.showDeleteButton = true; this.showDeleteButton = true;
this.isUpdate = true; this.isUpdate = true;
this.form = { this.form.code = model.code;
code: model.code, this.form.fillColor = model.fillColor;
fillColor: model.fillColor, this.form.borderWidth = model.borderWidth;
borderWidth: model.borderWidth, this.form.strokeColor = model.strokeColor;
strokeColor: model.strokeColor, this.form.width = model.width;
width: model.width, this.form.height = model.height;
height: model.height, this.form.x = model.point.x;
x: model.point.x, this.form.y = model.point.y;
y: model.point.y
};
} }
} }
}, },
@ -106,9 +104,6 @@ export default {
width: this.form.width, width: this.form.width,
height: this.form.height height: this.form.height
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', rectModel); this.$emit('createDataModel', rectModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -73,22 +73,20 @@ export default {
'iscs' 'iscs'
]) ])
}, },
watch: { watch:{
'$store.state.iscs.rightClickCount': function (val) { '$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData']; const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'IscsText' ) { if (model._type === 'IscsText' ) {
this.buttonText = '修改'; this.buttonText = '修改';
this.showDeleteButton = true; this.showDeleteButton = true;
this.isUpdate = true; this.isUpdate = true;
this.form = { this.form.code = model.code;
code: model.code, this.form.context = model.context;
context: model.context, this.form.fontSize = model.fontSize;
textFill: model.textFill, this.form.fontWeight = model.fontWeight;
fontSize: model.fontSize, this.form.textFill = model.textFill;
fontWeight: model.fontWeight, this.form.x = model.point.x;
x: model.point.x, this.form.y = model.point.y;
y: model.point.y
};
} }
} }
}, },
@ -110,9 +108,6 @@ export default {
fontWeight: this.form.fontWeight, fontWeight: this.form.fontWeight,
fontFamily: 'consolas' fontFamily: 'consolas'
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', textModel); this.$emit('createDataModel', textModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -76,9 +76,6 @@ export default {
_type: 'FireHydranAlarmButton', _type: 'FireHydranAlarmButton',
width: this.addModel.width width: this.addModel.width
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', maButtonModel); this.$emit('createDataModel', maButtonModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -77,9 +77,6 @@ export default {
_type: 'GasFireControl', _type: 'GasFireControl',
width: this.addModel.width width: this.addModel.width
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', maButtonModel); this.$emit('createDataModel', maButtonModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -53,6 +53,7 @@
<el-tab-pane label="文字" name="IscsText"> <el-tab-pane label="文字" name="IscsText">
<iscs-text <iscs-text
ref="iscsText" ref="iscsText"
style="width: 90%;"
@createDataModel="createDataModel" @createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"> @deleteDataModel="deleteDataModel">
</iscs-text> </iscs-text>
@ -60,6 +61,7 @@
<el-tab-pane label="线段" name="IscsLine"> <el-tab-pane label="线段" name="IscsLine">
<iscs-line <iscs-line
ref="iscsLine" ref="iscsLine"
style="width: 90%;"
@createDataModel="createDataModel" @createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"> @deleteDataModel="deleteDataModel">
</iscs-line> </iscs-line>
@ -67,6 +69,7 @@
<el-tab-pane label="矩形" name="IscsRect"> <el-tab-pane label="矩形" name="IscsRect">
<iscs-rect <iscs-rect
ref="iscsRect" ref="iscsRect"
style="width: 90%;"
@createDataModel="createDataModel" @createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"> @deleteDataModel="deleteDataModel">
</iscs-rect> </iscs-rect>

View File

@ -77,9 +77,6 @@ export default {
_type: 'ManualAlarmButton', _type: 'ManualAlarmButton',
width: this.addModel.width width: this.addModel.width
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', maButtonModel); this.$emit('createDataModel', maButtonModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -77,9 +77,6 @@ export default {
_type: 'SmokeDetector', _type: 'SmokeDetector',
width: this.addModel.width width: this.addModel.width
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', maButtonModel); this.$emit('createDataModel', maButtonModel);
this.initPage(); this.initPage();
} else { } else {

View File

@ -77,9 +77,6 @@ export default {
_type: 'TemperatureDetector', _type: 'TemperatureDetector',
width: this.addModel.width width: this.addModel.width
}; };
if (this.isUpdate) {
this.deleteDevice();
}
this.$emit('createDataModel', maButtonModel); this.$emit('createDataModel', maButtonModel);
this.initPage(); this.initPage();
} else { } else {