调整ibp按钮点击

This commit is contained in:
zyy 2020-09-17 17:45:04 +08:00
parent 3134142ab3
commit c2e3df8dbc
4 changed files with 19 additions and 27 deletions

View File

@ -621,11 +621,10 @@ export function getPlcGateway(group) {
// });
// }
export function handlerIbpEvent(group, data) {
export function handlerIbpEvent(group, button) {
return request({
url: `/simulation/${group}/ibp/button`,
method: 'put',
data
url: `/simulation/${group}/ibp/${button}`,
method: 'put'
});
}

View File

@ -63,27 +63,25 @@ export default class Switch extends Group {
const point2 = [model.intersection.x + directx * (width2 + width1) + directx * detailWidth, point1[1]];
const point3 = [point2[0] + directx * this.triangle.getCotRate() * swPadding, point2[1] + directy * swPadding];
const point4 = [point3[0] + direct * this.triangle.getSin(switchWidth) - directx * 2 * detailWidth, point3[1] - direct * this.triangle.getCos(switchWidth)];
// const sectionAModel = Vue.prototype.$jlmap.mapDevice[model.sectionACode];
// const sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
// const sectionAPoint = { x: '', y: '' };
// sectionAModel.points.forEach((point, sectionIndex) => {
// if (point.x == model.intersection.x && point.y == model.intersection.y) {
// sectionAPoint.x = point.x;
// sectionAPoint.y = point.y;
// this.sectionIndex = sectionIndex;
// }
// });
// let directxA = 1;
// // const directxA = sectionATriangle.drictx;
// const drictyyA = sectionATriangle.dricty;
// if (this.sectionIndex != 0) {
// const sectionAModel = Vue.prototype.$jlmap.mapDevice[model.sectionACode];
// let sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
// const sectionAPoint = { x: model.intersection.x, y: model.intersection.y };
// if (sectionAModel.points[0].x == model.intersection.x && sectionAModel.points[0].y == model.intersection.y) {
// sectionATriangle = new JTriangle(sectionAModel.points[0], sectionAModel.points[1]);
// directxA = 1;
// }
// if (sectionAModel.points[sectionAModel.points.length - 1].x == model.intersection.x && sectionAModel.points[sectionAModel.points.length - 1].y == model.intersection.y) {
// sectionATriangle = new JTriangle(sectionAModel.points[sectionAModel.points.length - 2], sectionAModel.points[sectionAModel.points.length - 1]);
// directxA = -1;
// }
// const difference = switchWidth1 * this.triangle.getCosRate();
// const drictyyA = sectionATriangle.dricty;
// // const difference = switchWidth1 * this.triangle.getCosRate();
// const point1 = [model.intersection.x + directx * this.triangle.getCotRate() * swPadding, model.intersection.y + directy * swPadding];
// const point2 = [model.intersection.x, model.intersection.y];
// const point3 = [sectionAPoint.x + directxA * (difference / sectionATriangle.getCosRate()), sectionAPoint.y + drictyyA * difference * sectionATriangle.getTanRate()];
// const point3 = [sectionAPoint.x + directxA * (switchWidth1 * sectionATriangle.getCosRate()), sectionAPoint.y + drictyyA * switchWidth1 * sectionATriangle.getSinRate()];
this.locShelter = new ESwLocal({ // 定位 覆盖形状 A
zlevel: this.zlevel,
z: this.z,

View File

@ -2,11 +2,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -191,15 +191,10 @@ export default {
onMouseDown(em) {
if (em.deviceModel.mean) {
if (IbpOperation[em.deviceModel.mean]) {
handlerIbpEvent(this.$route.query.group, {button: IbpOperation[em.deviceModel.mean].event, stationCode: this.stationCode});
handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event);
}
}
},
openScreenDoor(flag, buttonOperate) {
if (flag) {
handlerIbpEvent(this.$route.query.group, {button: buttonOperate, stationCode: this.stationCode});
}
},
//
onContextMenu(em) {
this.$store.dispatch('ibp/setUpdateDeviceData', em.eventTarget.model);