岔心 绘图调整

This commit is contained in:
joylink_cuiweidong 2021-01-14 16:03:48 +08:00
parent 8118b1ffad
commit 28babc78f9
6 changed files with 50 additions and 26 deletions

View File

@ -146,7 +146,7 @@ export default {
deleteListHint: 'This will delete the list, will it continue?', deleteListHint: 'This will delete the list, will it continue?',
setUpASubscriptionMapSuccessfully: 'Setting up a subscription map successfully!', setUpASubscriptionMapSuccessfully: 'Setting up a subscription map successfully!',
setUpASubscriptionMapFailed: 'Setting up a subscription map failed!', setUpASubscriptionMapFailed: 'Setting up a subscription map failed!',
getMapStateDataException: 'Simulation error!', // Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency! getMapStateDataException: 'Simulation error! Please initial', // Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency!
packagedSuccessfully: 'Packaged successfully', packagedSuccessfully: 'Packaged successfully',
oneKeyGeneratedSuccessfully: 'One key generated successfully!', oneKeyGeneratedSuccessfully: 'One key generated successfully!',
obtainedPermissionSuccessfully: 'Successfully obtained permission', obtainedPermissionSuccessfully: 'Successfully obtained permission',

View File

@ -146,7 +146,7 @@ export default {
deleteListHint: '此操作将删除该列表, 是否继续?', deleteListHint: '此操作将删除该列表, 是否继续?',
setUpASubscriptionMapSuccessfully: '设置订阅地图成功!', setUpASubscriptionMapSuccessfully: '设置订阅地图成功!',
setUpASubscriptionMapFailed: '设置订阅地图失败!', setUpASubscriptionMapFailed: '设置订阅地图失败!',
getMapStateDataException: '仿真出现异常!', // 获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理! getMapStateDataException: '仿真出现异常!请初始化', // 获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理!
packagedSuccessfully: '打包成功', packagedSuccessfully: '打包成功',
oneKeyGeneratedSuccessfully: '一键生成成功!', oneKeyGeneratedSuccessfully: '一键生成成功!',
obtainedPermissionSuccessfully: '领取权限成功', obtainedPermissionSuccessfully: '领取权限成功',

View File

@ -117,17 +117,43 @@ export default class ESeparator extends Group {
if (type === '01') { // 普通分割 if (type === '01') { // 普通分割
let points = []; let points = [];
let lineWidth = 0; let lineWidth = 0;
const tanRate = modelData.traingle.getTanRate(); const tanRate = modelData.traingle.getSinRate();
if (style.Section.separator.sepical && modelData.type == '03' && tanRate != 0 && tanRate != 1) { if (style.Section.separator.sepical && (modelData.type == '03' || modelData.type == '01') && tanRate != 0 && tanRate != 1) {
// 转换坐标系计算 // debugger;
const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1; // // 转换坐标系计算
// const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1;
// points = [
// [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
// modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()],
// [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
// modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()]
// ];
// partition = this.createModel(modelData, points);
const direction = modelData.traingle.drictx * modelData.traingle.dricty > 0 ? 1 : -1;
const offset = style.Section.line.width / 2;
points = [ points = [
[modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(), [modelData.point.x + modelData.drict * modelData.traingle.getSinRate() * offset,
modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()], modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset],
[modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(), // [modelData.point.x, modelData.point.y]
modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()] [modelData.point.x - modelData.drict * modelData.traingle.getSinRate() * offset * 2,
modelData.point.y + direction * modelData.drict * modelData.traingle.getCosRate() * offset * 2],
[modelData.point.x - modelData.drict * offset * 2.5 / modelData.traingle.getSinRate(),
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset],
[modelData.point.x + modelData.drict * modelData.traingle.getSinRate() * offset,
modelData.point.y - direction * modelData.drict * modelData.traingle.getCosRate() * offset]
]; ];
partition = this.createModel(modelData, points); partition = new Polyline({
zlevel: this.zlevel,
z: this.z,
shape: {
points: points
},
style: {
lineWidth:1,
fill:this.style.Section.separator.color
}
});
} else { } else {
points = [ points = [
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)], [modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)],

View File

@ -256,28 +256,25 @@ export default class Section extends Group {
this.line && this.line.setStyle({stroke: '#7F7F7F'}); this.line && this.line.setStyle({stroke: '#7F7F7F'});
this.name && this.name.setStyle({textFill: '#7F7F7f'}); this.name && this.name.setStyle({textFill: '#7F7F7f'});
} }
handleSwitchSection(model, flag) { /** 设置状态*/
// 哈尔滨线路 南京二 道岔相关区段设置 默认颜色 setState(model, flag = false) {
if (!this.isShowShape) return;
this.recover();
// 哈尔滨线路 道岔相关区段设置 默认颜色
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) { if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode];
if (switchModel && (switchModel.normalPosition === 1 || (switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse'))) { // 定位情况 if (switchModel && switchModel.normalPosition != 0) { // 定位情况
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true); sectionB && sectionB.instance && sectionB.instance.setState(sectionB, true);
} else if (switchModel && switchModel.reversePosition === 1 || (switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'normal')) { // 反位情况 } else if (switchModel && switchModel.normalPosition == 0) { // 反位情况
const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode]; const sectionB = Vue.prototype.$jlmap.mapDevice[switchModel.sectionBCode];
sectionB && sectionB.instance && sectionB.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); sectionB && sectionB.instance && sectionB.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true); sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
} }
} }
}
/** 设置状态*/
setState(model, flag = false) {
if (!this.isShowShape) return;
this.recover();
this.handleSwitchSection(model, flag);
// 顺序代表优先级 // 顺序代表优先级
/** 道岔保护区段锁闭 */ /** 道岔保护区段锁闭 */
model.overlapLock && this.protectiveLock(model.lockRight); model.overlapLock && this.protectiveLock(model.lockRight);
@ -349,7 +346,7 @@ export default class Section extends Group {
} }
} }
}); });
this.on('mouseover', () => { // 移入 this.on('mouseover', (event) => { // 移入
if (!this.selectedType && this.line) { if (!this.selectedType && this.line) {
this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 }); this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 });
this.line.setCross({fill:'#fbfbfb'}); this.line.setCross({fill:'#fbfbfb'});

View File

@ -103,7 +103,7 @@ export default {
showCancelButton: false, showCancelButton: false,
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('back'); // this.$emit('back');
}).catch(() => { }).catch(() => {
}); });
}, },

View File

@ -77,9 +77,9 @@ export default {
height: 800, height: 800,
roadData: [], roadData: [],
focus: false, focus: false,
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied'], booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail'],
selectList: ['runMode'], selectList: ['runMode'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied'], generalConfig: ['lockFirst', 'switchSingleHandle', 'upRight', 'switchNRTurnChain', 'switchSingleLockChain', 'switchLossChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch', 'ctcOverlapOnlyTurnBackStationLock', 'noParkingSM', 'parkingSM', 'rmAtpSpeed', 'urmAtpSpeed', 'guideNeedRouteSettingFirst', 'signalOpenAfterParking', 'standHoldCloseLogicLight', 'atsAutoHandleManualFrontTurnBack', 'doNotSetRouteWhenSectionOccupied', 'routeSettingNoFail'],
rangeList: ['noParkingSM', 'parkingSM'], rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'], speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
numberList: [], numberList: [],
@ -105,7 +105,8 @@ export default {
signalOpenAfterParking: '是否列车停站开门后,才办理出站进路开放出站信号机', signalOpenAfterParking: '是否列车停站开门后,才办理出站进路开放出站信号机',
standHoldCloseLogicLight: '站台扣车是否关闭逻辑点灯的信号机', standHoldCloseLogicLight: '站台扣车是否关闭逻辑点灯的信号机',
atsAutoHandleManualFrontTurnBack:'ATS是否自动处理人工设置的站前折返自动更新车次', atsAutoHandleManualFrontTurnBack:'ATS是否自动处理人工设置的站前折返自动更新车次',
doNotSetRouteWhenSectionOccupied: '当进路的区段占用时不排列进路' doNotSetRouteWhenSectionOccupied: '当进路的区段占用时不排列进路',
routeSettingNoFail:'进路办理不失败'
} }
}; };
}, },