diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index d84679131..029e14ffd 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -86,25 +86,11 @@ export default class Switch extends Group { const rpoint2 = [rpoint1[0] + directx * (swPadding + switchWidth * this.triangle.getCotRate()), rpoint1[1]]; const rpoint3 = [rpoint2[0], rpoint2[1] + directy * switchWidth]; const rpoint4 = [rpoint1[0] + this.triangle.getCos(slen), rpoint1[1] + this.triangle.getSin(slen)]; - - const switchWidth1 = style.Section.line.width / 2 + 0.1; - const width1 = switchWidth1 * this.triangle.getSinRate(); - const height1 = switchWidth1 * this.triangle.getCosRate(); - const width2 = (height1 + switchWidth1) / this.triangle.getTanRate(); - const width3 = (style.Section.line.width / this.triangle.getSinRate()) - width2 - width1; - const spoint1 = [model.intersection.x + directx * width3, model.intersection.y - directy * switchWidth1]; - // const spoint2 = [spoint1[0] - directx * (width2 + width1) - directx * width3, spoint1[1]]; - // const spoint3 = [model.intersection.x - directx * width3, model.intersection.y + directy * switchWidth1]; - const spoint2 = [model.intersection.x - directx * 13, spoint1[1]]; - const spoint3 = [model.intersection.x - directx * 13, model.intersection.y + directy * switchWidth1]; - const spoint4 = [spoint1[0] + directx * (width2 + width1) - directx * width3, spoint3[1]]; - this.relocShelter = new ESwLnversion({ // 反位覆盖形状 zlevel: this.zlevel, z: this.z, style: style, shelterPoints: [rpoint1, rpoint2, rpoint3, rpoint4], - sectionPoints: [spoint1, spoint2, spoint3, spoint4], cursor: 'pointer', halfWidth: halfWidth, triangle: this.triangle, @@ -112,7 +98,20 @@ export default class Switch extends Group { onmouseout: () => { this.name.getArrowText().hide(); } }); - this.rhomboid = new ERhomboid({ // 平行四边形覆盖范围 + const switchWidth1 = style.Section.line.width / 2 + 0.1; + const width1 = switchWidth1 * this.triangle.getSinRate(); + const height1 = switchWidth1 * this.triangle.getCosRate(); + const width2 = (height1 + switchWidth1) / this.triangle.getTanRate(); + const width3 = (style.Section.line.width / this.triangle.getSinRate()) - width2 - width1; + const spoint1 = [model.intersection.x + directx * width3, model.intersection.y - directy * switchWidth1]; + const spoint2 = [spoint1[0] - directx * (width2 + width1) - directx * width3, spoint1[1]]; + const spoint3 = [model.intersection.x - directx * width3, model.intersection.y + directy * switchWidth1]; + // if (this.style.Switch.block.blockName == 'ningbo_01') { + // spoint2 = [model.intersection.x - directx * 13, spoint1[1]]; + // spoint3 = [model.intersection.x - directx * 13, model.intersection.y + directy * switchWidth1]; + // } + const spoint4 = [spoint1[0] + directx * (width2 + width1) - directx * width3, spoint3[1]]; + this.rhomboid = new ERhomboid({ // 平行四边形覆盖范围 (尝试使用本图形做宁波特有的挤岔图形动作 放弃使用下一个的图形) zlevel: this.zlevel, z: this.z, style: style, @@ -129,7 +128,7 @@ export default class Switch extends Group { const Tspoint3 = [Tspoint1[0] - directx * 8, model.intersection.y - directy * switchWidth1]; const Tspoint4 = [model.intersection.x + directx * width3, Tspoint3[1]]; const Tspoint5 = [Tspoint1[0], Tspoint1[1]]; - this.sheltertriangle = new ETriangle({ // 平行四边形覆盖范围 内侧三角形覆盖物 (用于宁波线路'挤岔' 专用) + this.sheltertriangle = new ETriangle({ // 平行四边形覆盖范围 内侧三角形覆盖物 (用于宁波线路'挤岔' 专用)其他线路不能使用 zlevel: this.zlevel, z: this.z, style: style, diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue index a826bc84c..3ba18851c 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/routeHandControl.vue @@ -101,7 +101,8 @@ export default { signalName: '', allSelect: false, changeList:[], - commitDisabled: true + commitDisabled: true, + disabledLength: 0 }; }, computed: { @@ -172,9 +173,11 @@ export default { if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && (elem.atsControl == '0')) { elem.disabled = true; + this.disabledLength++; } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && (elem.atsControl == '1')) { elem.disabled = true; + this.disabledLength++; } }); } @@ -200,7 +203,7 @@ export default { } else { this.selection.splice(this.selection.indexOf(code), 1); } - if (this.selection.length >= this.tempData.length) { + if (this.selection.length >= (this.tempData.length - this.disabledLength) ) { this.allSelect = true; } else { this.allSelect = false; diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue index 5cba0cbe3..545acd593 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStationStand.vue @@ -262,7 +262,7 @@ export default { operation: OperationEvent.StationStand.stoppage.menu.operation, cmdType: CMD.Stand.CMD_STAND_ADD_FAULT, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` } }; @@ -285,7 +285,7 @@ export default { operation: OperationEvent.StationStand.cancelStoppage.menu.operation, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` } }; @@ -307,7 +307,7 @@ export default { code: this.selected.code, operation: OperationEvent.StationStand.setDetainTrain.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; @@ -325,7 +325,7 @@ export default { code: this.selected.code, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -374,7 +374,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setJumpStop.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -391,7 +391,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -411,7 +411,7 @@ export default { // label: MapDeviceType.StationStand.label, operation: OperationEvent.StationStand.setStopTime.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { @@ -437,7 +437,7 @@ export default { // label: MapDeviceType.StationStand.label, operation: OperationEvent.StationStand.setRunLevel.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { @@ -460,7 +460,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.earlyDeparture.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -479,7 +479,7 @@ export default { // type: MapDeviceType.StationStand.type, operation: OperationEvent.StationStand.setBackStrategy.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; @@ -504,7 +504,7 @@ export default { cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS, operation: OperationEvent.StationStand.detail.menu.operation, param:{ - stationStandCode:this.selected.code + standCode:this.selected.code } }; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { diff --git a/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue b/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue index d24621de7..9e668b574 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuStationStand.vue @@ -144,7 +144,7 @@ export default { operation: OperationEvent.StationStand.stoppage.menu.operation, cmdType: CMD.Stand.CMD_STAND_ADD_FAULT, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { @@ -166,7 +166,7 @@ export default { operation: OperationEvent.StationStand.cancelStoppage.menu.operation, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` } }; @@ -187,7 +187,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setJumpStop.menu.operation, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { @@ -205,7 +205,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { @@ -224,7 +224,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setStopTime.menu.operation, param: { - stationStandCode: `${this.selected.code}` + standCode: `${this.selected.code}` }, cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME diff --git a/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue b/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue index f96f1ebd0..e62fc65b2 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuStationStand.vue @@ -225,7 +225,7 @@ export default { operation: OperationEvent.StationStand.stoppage.menu.operation, cmdType: CMD.Stand.CMD_STAND_ADD_FAULT, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -246,7 +246,7 @@ export default { operation: OperationEvent.StationStand.cancelStoppage.menu.operation, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -266,7 +266,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setDetainTrain.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; @@ -284,7 +284,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -301,7 +301,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -318,7 +318,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -335,7 +335,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setJumpStop.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -352,7 +352,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -369,7 +369,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setStopTime.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid, response }) => { @@ -391,7 +391,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setRunLevel.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid, response }) => { @@ -413,7 +413,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.earlyDeparture.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid }) => { @@ -430,7 +430,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.setBackStrategy.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; @@ -453,7 +453,7 @@ export default { code: `${this.selected.code}`, operation: OperationEvent.StationStand.detail.menu.operation, param: { - StationStand_Code: `${this.selected.code}` + standCode: `${this.selected.code}` } }; this.$store.dispatch('training/next', step).then(({ valid, response }) => { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeControl.vue index c678c7def..f50c911b1 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeControl.vue @@ -83,6 +83,10 @@ export default { return '重开信号'; } else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) { return '信号机控制'; + } else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) { + return '设置通过模式'; + } else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) { + return '取消通过模式'; } return ''; } @@ -154,9 +158,9 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 信号关灯 @@ -193,10 +197,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate,[error.message]); }); }, // 设置通过模式 @@ -213,10 +217,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 取消通过模式 @@ -233,10 +237,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate,[error.message]); }); }, // 取消 diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue index 4f3df7e02..170798b97 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue @@ -99,7 +99,8 @@ export default { signalName: '', allSelect: false, changeList:[], - commitDisabled: true + commitDisabled: true, + disabledLength: 0 }; }, computed: { @@ -145,6 +146,7 @@ export default { this.allSelect = false; this.changeList = []; this.commitDisabled = true; + this.selection = []; // 如果不是断点激活,而是第一次显示则初始化 if (!this.dialogShow) { this.signalName = ''; @@ -165,9 +167,11 @@ export default { if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && (elem.atsControl == '0')) { elem.disabled = true; + this.disabledLength++; } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && (elem.atsControl == '1')) { elem.disabled = true; + this.disabledLength++; } }); } @@ -187,38 +191,13 @@ export default { this.$store.dispatch('training/emitTipFresh'); this.mouseCancelState(this.selected); }, - // checkTableDataSelction(data) { - // const selection = []; - // if (data && data.length > 0) { - // data.forEach(row => { - // if (row.check && !row.disabled) { - // selection.push(row); - // } - // }); - // } - - // if (JSON.stringify(selection) !== JSON.stringify(this.selection)) { - // this.handleChooseChange(selection); - // this.selection = selection; - // } - // let num = 0; - // this.allSelect = false; - // this.tempData.forEach(item => { - // if (item.check) { - // num++; - // if (num == this.tempData.length) { - // this.allSelect = true; - // } - // } - // }); - // }, changeCheck(check, code) { if (check) { this.selection.push(code); } else { this.selection.splice(this.selection.indexOf(code), 1); } - if (this.selection.length >= this.tempData.length) { + if (this.selection.length >= (this.tempData.length - this.disabledLength) ) { this.allSelect = true; } else { this.allSelect = false; @@ -236,6 +215,8 @@ export default { if (!item.disabled) { this.changeList.push(true); this.selection.push(item.code); + } else { + this.changeList.push(''); } }); this.allSelect = true; @@ -316,7 +297,7 @@ export default { }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, // 进路交自动控 @@ -336,7 +317,7 @@ export default { }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { @@ -349,7 +330,7 @@ export default { if (valid) { this.doClose(); } - }).catch(error => { + }).catch(() => { this.doClose(); }); } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standControl.vue index 50762a61c..c795eeee6 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standControl.vue @@ -408,10 +408,10 @@ export default { if (valid) { this.doClose(); } - }).catch(() => { + }).catch(error => { this.loading = false; this.doClose(); - this.$refs.noticeInfo.doShow(operate); + this.$refs.noticeInfo.doShow(operate, [error.message]); }); }, cancel() { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 9946eeea7..506eafc22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -10,6 +10,7 @@ export function getBaseUrl() { // 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'; // 张赛 } else { BASE_API = process.env.VUE_APP_BASE_API; }