# Conflicts:
#	src/iscs/constant/iscsData.js
#	src/views/iscs/iscsDraw/iscsCommonElem/line.vue
#	src/views/iscs/iscsDraw/iscsOperate/index.vue
This commit is contained in:
zyy 2020-02-05 16:58:51 +08:00
commit 1673c5ad7f
11 changed files with 56 additions and 112 deletions

View File

@ -3,7 +3,7 @@ const iscsData = {
'12': {},
'21': {},
'31': {},
'41': { "vidiconList": [{ "_type": "Vidicon", "code": "Vidicon_1", "width": 40, "right": true, "point": { "x": 180, "y": 72 }, "zlevel": 1, "z": 4 }], "iscsRect": [{ "point": { "x": 10, "y": 10 }, "code": "IscsRect_1", "_type": "IscsRect", "fillColor": "rgba(28, 27, 27, 0)", "borderWidth": 2, "strokeColor": "#F8F4F4", "width": 70, "height": 90, "zlevel": 1, "z": 3 }] },
'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': {},
'51': {},
'61': {},

View File

@ -237,7 +237,6 @@ class Iscs {
}
dispose() {
this.off(this.events.Pan, this.optionsHandler);
this.off(this.events.Zoom, this.optionsHandler);
this.clear();

View File

@ -137,9 +137,6 @@ class MouseController extends Eventful {
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
this.eventTarget.dirty();
}
if (this.eventTarget._type === deviceType.Background) {
this.eventTarget.setCursor('default');
}
this.eventTarget = '';
this._dragging = false;
this.deviceList = [];
@ -203,7 +200,7 @@ class MouseController extends Eventful {
}
/** 处理鼠标左键按下事件 */
handleMouseDownLeft(e) {
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
if (this.eventTarget) {
this.eventTarget.setCursor('pointer');
this.$iscs.deleteCheckBox('check_box');
} else if (this.eventTarget && this.eventTarget._type === deviceType.CheckBox) {
@ -216,9 +213,7 @@ class MouseController extends Eventful {
handleMouseDownWheel(e) {
this.deviceList = [];
Object.values(this.$iscs.iscsDevice).forEach(item => {
if (item.instance._type !== deviceType.Background) {
this.deviceList.push(item.instance);
}
});
}
/** 处理右键拖动事件--- 改变选中区域大小 */
@ -241,12 +236,15 @@ class MouseController extends Eventful {
item.grouper.drift(dx, dy, e);
});
} else if (this._dragging && this.eventTarget) { // 选中元素图形移动
if (( this.eventTarget._type === deviceType.Background) || !this.isAllowDragging) {
if (!this.isAllowDragging) {
this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
} else if (this.isAllowDragging) {
this.eventTarget.grouper.drift(dx, dy, e);
}
} else if (this._dragging) {
this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
}
}
/** 通过包围盒筛选选中区域的元素 */
@ -257,13 +255,11 @@ class MouseController extends Eventful {
const deviceList = Object.values(this.$iscs.iscsDevice);
const includeDeviceList = [];
deviceList.forEach( item =>{
if (item.instance._type !== deviceType.Background) {
let deviceBoundingRect = item.instance.grouper.getBoundingRect();
deviceBoundingRect = this.createFakeBoundingRect(item.instance, deviceBoundingRect);
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
includeDeviceList.push(item.instance);
}
}
});
this.deviceList = includeDeviceList;
}

View File

@ -17,7 +17,7 @@ class TransformHandle {
}
revisibleView(view) {
if (this.checkVisible(view) || view._type === deviceType.Background) {
if (this.checkVisible(view)) {
view.show();
} else {
view.hide();

View File

@ -10,7 +10,7 @@
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="门禁" name="entranceGuard">
<el-tab-pane label="门禁" name="EntranceGuard">
<entrance-guard
ref="entranceGuard"
style="width: 90%;"
@ -18,7 +18,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="iscsText">
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 90%;"
@ -26,7 +26,7 @@
@deleteDataModel="deleteDataModel">
</iscs-text>
</el-tab-pane>
<el-tab-pane label="线段" name="iscsLine">
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 90%;"
@ -34,7 +34,7 @@
@deleteDataModel="deleteDataModel">
</iscs-line>
</el-tab-pane>
<el-tab-pane label="矩形" name="iscsRect">
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 90%;"

View File

@ -10,7 +10,7 @@
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="闸机" name="brakeMachine">
<el-tab-pane label="闸机" name="BrakeMachine">
<brake-machine
ref="brakeMachine"
style="width: 90%;"
@ -18,7 +18,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="自动售货机" name="ticketMachine">
<el-tab-pane label="自动售货机" name="TicketMachine">
<ticket-machine
ref="ticketMachine"
style="width: 90%"
@ -26,7 +26,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="半自动售货机" name="semiAutomaticTicketMachine">
<el-tab-pane label="半自动售货机" name="SemiAutomaticTicketMachine">
<semi-automatic-ticket-machine
ref="semiAutomaticTicketMachine"
style="width: 90%"
@ -34,7 +34,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="iscsText">
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 90%;"
@ -42,7 +42,7 @@
@deleteDataModel="deleteDataModel">
</iscs-text>
</el-tab-pane>
<el-tab-pane label="线段" name="iscsLine">
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 90%;"
@ -50,7 +50,7 @@
@deleteDataModel="deleteDataModel">
</iscs-line>
</el-tab-pane>
<el-tab-pane label="矩形" name="iscsRect">
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 90%;"

View File

@ -11,7 +11,7 @@
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="冷冻泵/冷却泵" name="frozenPump">
<el-tab-pane label="冷冻泵/冷却泵" name="FrozenPump">
<frozen-pump
ref="frozenPump"
style="width:90%"
@ -19,7 +19,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="冷水机组" name="chiller">
<el-tab-pane label="冷水机组" name="Chiller">
<chiller
ref="chiller"
style="width:90%"
@ -27,7 +27,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="冷却塔" name="coolTower">
<el-tab-pane label="冷却塔" name="CoolTower">
<cool-tower
ref="coolTower"
style="width:90%"
@ -35,7 +35,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="排风机" name="ventilator">
<el-tab-pane label="排风机" name="Ventilator">
<ventilator
ref="ventilator"
style="width:90%"
@ -43,7 +43,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="空调机" name="airConditioner">
<el-tab-pane label="空调机" name="AirConditioner">
<air-conditioner
ref="airConditioner"
style="width:90%"
@ -51,7 +51,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="轨道排风机" name="orbitalVentilator">
<el-tab-pane label="轨道排风机" name="OrbitalVentilator">
<orbital-ventilator
ref="orbitalVentilator"
style="width:90%"
@ -59,7 +59,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="射流风机" name="jetFan">
<el-tab-pane label="射流风机" name="JetFan">
<jet-fan
ref="jetFan"
style="width:90%"
@ -67,7 +67,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="隧道风机" name="tunnelFan">
<el-tab-pane label="隧道风机" name="TunnelFan">
<tunnel-fan
ref="tunnelFan"
style="width:90%"
@ -75,7 +75,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="防火阀" name="fireDamper">
<el-tab-pane label="防火阀" name="FireDamper">
<fire-damper
ref="fireDamper"
style="width:90%"
@ -83,7 +83,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="防烟防火阀" name="smookProofFd">
<el-tab-pane label="防烟防火阀" name="SmookProofFd">
<smook-proof-fd
ref="smookProofFd"
style="width:90%"
@ -91,14 +91,14 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="风量调节阀" name="volumeControlDamper">
<el-tab-pane label="风量调节阀" name="VolumeControlDamper">
<volume-control-damper
ref="volumeControlDamper"
style="width: 90%"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
<el-tab-pane label="文字" name="iscsText">
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 90%;"
@ -106,7 +106,7 @@
@deleteDataModel="deleteDataModel">
</iscs-text>
</el-tab-pane>
<el-tab-pane label="线段" name="iscsLine">
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 90%;"
@ -114,7 +114,7 @@
@deleteDataModel="deleteDataModel">
</iscs-line>
</el-tab-pane>
<el-tab-pane label="矩形" name="iscsRect">
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 90%;"

View File

@ -10,7 +10,7 @@
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="固定摄像机" name="vidicon">
<el-tab-pane label="固定摄像机" name="Vidicon">
<vidicon
ref="vidiconCloud"
style="width:90%"
@ -18,7 +18,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="云台摄像机" name="vidiconCloud">
<el-tab-pane label="云台摄像机" name="VidiconCloud">
<vidicon-cloud
ref="vidicon"
style="width:90%"
@ -26,7 +26,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="iscsText">
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 90%;"
@ -34,7 +34,7 @@
@deleteDataModel="deleteDataModel">
</iscs-text>
</el-tab-pane>
<el-tab-pane label="线段" name="iscsLine">
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 90%;"
@ -42,7 +42,7 @@
@deleteDataModel="deleteDataModel">
</iscs-line>
</el-tab-pane>
<el-tab-pane label="矩形" name="iscsRect">
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 90%;"

View File

@ -7,44 +7,18 @@
<el-form-item label="线段颜色" prop="fillColor">
<el-color-picker v-model="form.fillColor"></el-color-picker>
</el-form-item>
<div class="coordinate">
<span class="title" style="width: 100px">起始坐标</span>
<el-form-item
label="x:"
prop="x1"
style="display: table; float: left; margin-right: 20px;"
label-width="25px"
>
<el-input-number v-model="form.x1" style="width: 150px;" />
</el-form-item>
<el-form-item
label="y:"
prop="y1"
style="display: table; float: left;"
label-width="25px"
>
<el-input-number v-model="form.y1" style="width: 150px;" />
</el-form-item>
</div>
<div class="coordinate">
<span class="title" style="width: 100px">终点坐标</span>
<el-form-item
label="x:"
prop="x2"
style="display: table; float: left; margin-right: 20px;"
label-width="25px"
>
<el-input-number v-model="form.x2" style="width: 150px;" />
</el-form-item>
<el-form-item
label="y:"
prop="y2"
style="display: table; float: left;"
label-width="25px"
>
<el-input-number v-model="form.y2" style="width: 150px;" />
</el-form-item>
</div>
<el-form-item label="起始X轴坐标">
<el-input-number v-model="form.x1" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="起始Y轴坐标">
<el-input-number v-model="form.y1" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="终止X轴坐标">
<el-input-number v-model="form.x2" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="终止Y轴坐标">
<el-input-number v-model="form.y2" controls-position="right" :min="0"></el-input-number>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
@ -172,7 +146,7 @@ export default {
this.form = {
code: '',
lineWidth: '',
fillColor: '#fff',
fillColor: '',
x1: 10,
y1: 10,
x2: 20,
@ -183,30 +157,5 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.coordinate {
overflow: hidden;
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 40px;
width: 120px;
font-weight: bold;
display: block;
float: left;
margin-right: 7px;
}
.listWidth{
display: table;
float: left;
margin-right: 20px;
&:last-child{
margin: 0;
}
}
}
</style>

View File

@ -120,7 +120,7 @@ export default {
}
},
mounted() {
this.$emit('iscsChange', this.$route.params.id);
this.$emit('iscsChange', this.$route.params.id);
},
beforeDestroy() {

View File

@ -10,7 +10,7 @@
>{{ $t('ibp.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
<el-tab-pane label="屏蔽门" name="psd">
<el-tab-pane label="屏蔽门" name="PlatformScreenDoor">
<platform-screen-door
ref="platformScreenDoor"
style="width: 90%;"
@ -18,7 +18,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="端头门" name="endDoor">
<el-tab-pane label="端头门" name="EndDoor">
<end-door
ref="endDoor"
style="width: 90%;"
@ -26,7 +26,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="圆角边框" name="borderRadius">
<el-tab-pane label="圆角边框" name="BorderRadius">
<border-radius
ref="borderRadius"
style="width: 90%;"
@ -34,7 +34,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="iscsText">
<el-tab-pane label="文字" name="IscsText">
<iscs-text
ref="iscsText"
style="width: 90%;"
@ -42,7 +42,7 @@
@deleteDataModel="deleteDataModel">
</iscs-text>
</el-tab-pane>
<el-tab-pane label="线段" name="iscsLine">
<el-tab-pane label="线段" name="IscsLine">
<iscs-line
ref="iscsLine"
style="width: 90%;"
@ -50,7 +50,7 @@
@deleteDataModel="deleteDataModel">
</iscs-line>
</el-tab-pane>
<el-tab-pane label="矩形" name="iscsRect">
<el-tab-pane label="矩形" name="IscsRect">
<iscs-rect
ref="iscsRect"
style="width: 90%;"