# Conflicts:
#	src/iscs/constant/iscsData.js
This commit is contained in:
zyy 2020-02-06 10:24:18 +08:00
commit a54616fc2c
13 changed files with 60 additions and 34 deletions

File diff suppressed because one or more lines are too long

View File

@ -200,10 +200,7 @@ class MouseController extends Eventful {
}
/** 处理鼠标左键按下事件 */
handleMouseDownLeft(e) {
if (this.eventTarget) {
this.eventTarget.setCursor('pointer');
this.$iscs.deleteCheckBox('check_box');
} else if (this.eventTarget && this.eventTarget._type === deviceType.CheckBox) {
if (this.eventTarget && this.eventTarget._type === deviceType.CheckBox) {
this.handleBoundingRect(this.eventTarget);
} else {
this.$iscs.deleteCheckBox('check_box');
@ -213,7 +210,7 @@ class MouseController extends Eventful {
handleMouseDownWheel(e) {
this.deviceList = [];
Object.values(this.$iscs.iscsDevice).forEach(item => {
this.deviceList.push(item.instance);
this.deviceList.push(item.instance);
});
}
/** 处理右键拖动事件--- 改变选中区域大小 */

View File

@ -22,8 +22,8 @@ export default class Vidicon extends Group {
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
x: this.model.point.x,
y: this.model.point.y,
x: 0,
y: 0,
width: this.model.width,
height: vidiconHeight,
r: [1, 1, 1, 1]
@ -40,10 +40,10 @@ export default class Vidicon extends Group {
z: this.model.z + 1,
shape: {
points: [
[this.model.point.x + this.model.width, this.model.point.y + 3],
[this.model.point.x + this.model.width + shotWidth, this.model.point.y],
[this.model.point.x + this.model.width + shotWidth, this.model.point.y + 6 + shotHeight],
[this.model.point.x + this.model.width, this.model.point.y + 3 + shotHeight]
[this.model.width, 3],
[this.model.width + shotWidth, 0],
[this.model.width + shotWidth, 6 + shotHeight],
[this.model.width, 3 + shotHeight]
],
smooth: 0.2
},
@ -57,10 +57,10 @@ export default class Vidicon extends Group {
z: this.model.z + 1,
shape: {
points: [
[this.model.point.x, this.model.point.y + vidiconHeight - 3],
[this.model.point.x - shotWidth, this.model.point.y + vidiconHeight],
[this.model.point.x - shotWidth, this.model.point.y + vidiconHeight - 6 - shotHeight],
[this.model.point.x, this.model.point.y + vidiconHeight - 3 - shotHeight]
[0, vidiconHeight - 3],
[-shotWidth, vidiconHeight],
[-shotWidth, vidiconHeight - 6 - shotHeight],
[0, vidiconHeight - 3 - shotHeight]
],
smooth: 0.2
},

View File

@ -22,8 +22,8 @@ export default class VidiconCloud extends Group {
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
cx: this.model.point.x,
cy: this.model.point.y,
cx: 0,
cy: 0,
r: this.model.r || 30,
startAngle: 0,
endAngle: Math.PI,
@ -42,10 +42,10 @@ export default class VidiconCloud extends Group {
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]
[this.model.r / 2, 0],
[-Math.cos(45 * (Math.PI / 180)) * this.model.r, Math.sin(45 * (Math.PI / 180)) * this.model.r],
[-Math.cos(55 * (Math.PI / 180)) * this.model.r, Math.sin(55 * (Math.PI / 180)) * this.model.r],
[this.model.r / 1.2, 0]
]
},
style: {

View File

@ -65,7 +65,7 @@ export default {
],
data() {
return {
enabledTab: 'entranceGuard',
enabledTab: 'EntranceGuard',
data: '',
stationCode: ''
};

View File

@ -86,7 +86,7 @@ export default {
],
data() {
return {
enabledTab: 'brakeMachine',
enabledTab: 'BrakeMachine',
data: '',
stationCode: ''
};

View File

@ -76,7 +76,7 @@ export default {
],
data() {
return {
enabledTab: 'vidicon',
enabledTab: 'Vidicon',
data: '',
stationCode: ''
};

View File

@ -52,6 +52,21 @@ export default {
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'Vidicon' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.height = model.height;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
this.$refs.form.validate((valid) => {
@ -59,7 +74,7 @@ export default {
const Uid = getUID('Vidicon', this.iscs.vidiconList);
const model = {
_type: 'Vidicon',
code: Uid,
code: this.isUpdate ? this.addModel.code : Uid,
width: this.addModel.width,
right: this.addModel.right,
point: {

View File

@ -48,6 +48,20 @@ export default {
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'VidiconCloud' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.r = model.r;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
this.$refs.form.validate((valid) => {
@ -55,7 +69,7 @@ export default {
const Uid = getUID('VidiconCloud', this.iscs.vidiconCloudList);
const model = {
_type: 'VidiconCloud',
code: Uid,
code: this.isUpdate ? this.addModel.code : Uid,
r: this.addModel.r,
point: {
x: this.addModel.x,

View File

@ -79,7 +79,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('BorderRadius', this.iscs.borderRadiusList),
code: this.isUpdate ? this.addModel.code : getUID('BorderRadius', this.iscs.borderRadiusList),
_type: 'BorderRadius',
width: this.addModel.width,
height: this.addModel.height

View File

@ -73,7 +73,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('EndDoor', this.iscs.endDoorList),
code: this.isUpdate ? this.addModel.code : getUID('EndDoor', this.iscs.endDoorList),
_type: 'EndDoor',
width: this.addModel.width
};

View File

@ -86,7 +86,7 @@ export default {
],
data() {
return {
enabledTab: 'psd',
enabledTab: 'PlatformScreenDoor',
data: '',
stationCode: ''
};

View File

@ -73,7 +73,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('PlatformScreenDoor', this.iscs.platformScreenDoorList),
code: this.isUpdate ? this.addModel.code : getUID('PlatformScreenDoor', this.iscs.platformScreenDoorList),
_type: 'PlatformScreenDoor',
width: this.addModel.width
};