增加部分图层

This commit is contained in:
lVAL 2020-10-09 13:16:34 +08:00
parent 96d77eb652
commit d40821f404
11 changed files with 78 additions and 28 deletions

View File

@ -184,19 +184,19 @@ deviceRender[deviceType.VolumeControlDamper] = {
deviceRender[deviceType.IscsText] = {
_type: deviceType.IscsText,
zlevel: 1,
z: 7
z: 6
};
/** 线段渲染配置 */
deviceRender[deviceType.IscsLine] = {
_type: deviceType.IscsLine,
zlevel: 1,
z: 4
z: 5
};
/** 矩形渲染配置 */
deviceRender[deviceType.IscsRect] = {
_type: deviceType.IscsRect,
zlevel:1,
z: 6
z: 5
};
/** 菱形渲染配置 */
deviceRender[deviceType.IscsRhombus] = {
@ -220,7 +220,7 @@ deviceRender[deviceType.IscsArrow] = {
deviceRender[deviceType.IscsRadioText] = {
_type: deviceType.IscsRadioText,
zlevel:1,
z: 5
z: 6
};
/** 图片渲染配置 */
deviceRender[deviceType.IscsPicture] = {
@ -360,7 +360,7 @@ deviceRender[deviceType.AfcDoorUnite] = {
deviceRender[deviceType.RectText] = {
_type: deviceType.RectText,
zlevel: 1,
z: 4
z: 5
};
/** 福州 三角形 */

View File

@ -8,7 +8,7 @@ export default class iscsCircle extends Group {
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.z = device.model.z;
this.create();
}
create() {
@ -19,7 +19,8 @@ export default class iscsCircle extends Group {
});
this.iscsCircle = new Circle({
zlevel: model.zlevel,
z: model.z,
z: model.z,
z2: model.z2||0,
shape: {
cx:this.model.radius,
cy:this.model.radius,

View File

@ -53,7 +53,8 @@ export default class iscsTriangle extends Group {
}
this.iscsTriangle = new Polygon({
zlevel: model.zlevel,
z: model.z,
z: model.z,
z2: model.z2||0,
shape: {
points:[
[point1.x, point1.y],

View File

@ -52,7 +52,8 @@ export default class line extends Group {
});
this.iscsLine = new Polyline({
zlevel: model.zlevel,
z: model.z,
z: model.z,
z2: model.z2||0,
draggable: false,
shape: {
points: modelPoints
@ -74,7 +75,8 @@ export default class line extends Group {
}
this.arrows = new Polygon({
zlevel: model.zlevel,
z: model.z,
z: model.z,
z2: model.z2||0,
origin: [0, 0],
rotation: rotation,
shape: {
@ -101,7 +103,8 @@ export default class line extends Group {
const y = model.points[this.model.points.length - 1].y - model.points[this.model.points.length - 2].y;
this.arrows = new Polygon({
zlevel: model.zlevel,
z: model.z,
z: model.z,
z2: model.z2||0,
origin: [x, y],
rotation: rotation,
shape: {

View File

@ -20,7 +20,8 @@ export default class rect extends Group {
const lineDash = model.type == 'dashed' ? [8, 5] : [0, 0];
this.iscsRect = new Rect({
zlevel: model.zlevel,
z: model.z,
z: model.z,
z2: model.z2||0,
shape: {
x: 0,
y: 0,

View File

@ -1,6 +1,9 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="半径:" prop="radius">
<el-input-number v-model="form.radius" controls-position="right" :min="3" size="small" />
</el-form-item>
@ -41,7 +44,8 @@ export default {
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
code: '',
z2: 1,
fillColor: '',
borderWidth: '',
strokeColor: '',
@ -71,7 +75,8 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.code = model.code;
this.form.z2 = model.z2||0;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.strokeColor = model.strokeColor;
@ -92,7 +97,8 @@ export default {
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsCircle', this.iscs.iscsCircleList),
_type: 'IscsCircle',
_type: 'IscsCircle',
z2: this.form.z2,
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,

View File

@ -1,6 +1,9 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="100px" style="width: 100%;padding: 10px 20px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="线段宽度:" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="1" :max="50" size="small" />
</el-form-item>
@ -119,7 +122,8 @@ export default {
showDeleteButton: false,
form: {
classify:'solid',
code: '',
code: '',
z2: 0,
lineWidth: '',
fillColor: '#fff',
arrowShow: 'none',
@ -154,7 +158,8 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.code = model.code;
this.form.z2 = model.z2||0;
this.form.lineWidth = model.lineWidth;
this.form.fillColor = model.fillColor;
if (model.point1) {
@ -184,7 +189,8 @@ export default {
const lineModel = {
points: this.form.points,
code: this.isUpdate ? this.form.code : getUID('IscsLine', this.iscs.iscsLineList),
_type: 'IscsLine',
_type: 'IscsLine',
z2: this.form.z2,
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor,
classify: this.form.classify,

View File

@ -1,6 +1,9 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="宽度:" prop="width">
<el-input-number v-model="form.width" controls-position="right" :min="1" size="small" />
</el-form-item>
@ -50,7 +53,8 @@ export default {
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
code: '',
z2: 1,
fillColor: '',
borderWidth: '',
strokeColor: '',
@ -82,7 +86,8 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.code = model.code;
this.form.z2 = model.z2||0;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.strokeColor = model.strokeColor;
@ -105,7 +110,8 @@ export default {
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsRect', this.iscs.iscsRectList),
_type: 'IscsRect',
_type: 'IscsRect',
z2: this.form.z2,
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,

View File

@ -1,7 +1,10 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="底边:" prop="width">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="底边:" prop="width">
<el-input-number v-model="form.width" controls-position="right" :min="1" size="small" />
</el-form-item>
<el-form-item label="高度:" prop="height">
@ -52,7 +55,8 @@ export default {
buttonText: '立即创建',
showDeleteButton: false,
form: {
code: '',
code: '',
z2: 1,
fillColor: '',
borderWidth: '',
direction:'left',
@ -84,7 +88,8 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.code = model.code;
this.form.z2 = model.z2||1;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.strokeColor = model.strokeColor;
@ -107,7 +112,8 @@ export default {
y: this.form.y
},
code: this.isUpdate ? this.form.code : getUID('IscsTriangle', this.iscs.iscsTriangleList),
_type: 'IscsTriangle',
_type: 'IscsTriangle',
z2: this.form.z2,
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
strokeColor: this.form.strokeColor,

View File

@ -41,6 +41,22 @@
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="圆形" name="IscsCircle">
<iscs-circle
ref="iscsCircle"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="三角形" name="IscsTriangle">
<iscs-triangle
ref="iscsTriangle"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
@ -53,6 +69,8 @@ import IscsLine from '../icscComponents/line';
import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
import IscsCircle from '../icscComponents/circle';
import IscsTriangle from '../icscComponents/triangle';
export default {
name: 'IscsOperate',
@ -60,7 +78,9 @@ export default {
IscsRect,
IscsLine,
IscsText,
IscsButton
IscsButton,
IscsCircle,
IscsTriangle
},
mixins: [
],

View File

@ -164,7 +164,7 @@ export default {
if (this.selected && this.selected.code) {
switch (hook) {
case 'KeyC': {
const list = this.getSelectList();
const list = this.getSelectList();
if (list.length) {
this.copyList = [];
const mapIscs = {};
@ -190,7 +190,7 @@ export default {
}
} break;
case 'KeyV': {
const list = this.getSelectList();
const list = this.getSelectList();
if (list.length) {
this.copyList.forEach(item => {
item.code && this.createDataModel(item);