Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/iscs/constant/iscsData.js
This commit is contained in:
commit
a54616fc2c
File diff suppressed because one or more lines are too long
@ -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);
|
||||
});
|
||||
}
|
||||
/** 处理右键拖动事件--- 改变选中区域大小 */
|
||||
|
@ -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
|
||||
},
|
||||
|
@ -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: {
|
||||
|
@ -65,7 +65,7 @@ export default {
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'entranceGuard',
|
||||
enabledTab: 'EntranceGuard',
|
||||
data: '',
|
||||
stationCode: ''
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'brakeMachine',
|
||||
enabledTab: 'BrakeMachine',
|
||||
data: '',
|
||||
stationCode: ''
|
||||
};
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'vidicon',
|
||||
enabledTab: 'Vidicon',
|
||||
data: '',
|
||||
stationCode: ''
|
||||
};
|
||||
|
@ -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: {
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'psd',
|
||||
enabledTab: 'PlatformScreenDoor',
|
||||
data: '',
|
||||
stationCode: ''
|
||||
};
|
||||
|
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user