diff --git a/src/api/jmap/mapdraft.js b/src/api/jmap/mapdraft.js index 333822c57..054cabfb3 100644 --- a/src/api/jmap/mapdraft.js +++ b/src/api/jmap/mapdraft.js @@ -401,3 +401,71 @@ export function getContinueProtectList(mapId, params) { params }); } +// 自动折返相关接口 创建,修改,删除,根据id查询, +export function postAutoReentry(data) { + return request({ + url: `/api/mapBuild/autoReentry`, + method: 'post', + data:data + }); +} +export function putAutoReentry(data) { + return request({ + url: `/api/mapBuild/autoReentry/${data.id}`, + method: 'put', + data:data + }); +} +export function delAutoReentry(id) { + return request({ + url: `/api/mapBuild/autoReentry/${id}`, + method: 'delete' + }); +} +export function getAutoReentryById(id) { + return request({ + url: `/api/mapBuild/autoReentry/${id}`, + method: 'get' + }); +} +export function getAutoReentryList(mapId, params) { + return request({ + url: `/api/mapBuild/${mapId}/autoReentry/paging`, + method: 'get', + params + }); +} +// 新版地图进路相关接口 创建,修改,删除,根据id查询, +export function postRouteNew(data) { + return request({ + url: `/api/mapBuild/routeNew`, + method: 'post', + data:data + }); +} +export function putRouteNew(data) { + return request({ + url: `/api/mapBuild/routeNew/${data.id}`, + method: 'put', + data:data + }); +} +export function delRouteNew(id) { + return request({ + url: `/api/mapBuild/routeNew/${id}`, + method: 'delete' + }); +} +export function getRouteNewById(id) { + return request({ + url: `/api/mapBuild/routeNew/${id}`, + method: 'get' + }); +} +export function getRouteNewList(mapId, params) { + return request({ + url: `/api/mapBuild/${mapId}/routeNew`, + method: 'get', + params + }); +} diff --git a/src/jmapNew/shape/StationStand/ESafeStand.js b/src/jmapNew/shape/StationStand/ESafeStand.js index d9b6d7e91..b0523c286 100644 --- a/src/jmapNew/shape/StationStand/ESafeStand.js +++ b/src/jmapNew/shape/StationStand/ESafeStand.js @@ -2,38 +2,38 @@ import Group from 'zrender/src/container/Group'; import Rect from 'zrender/src/graphic/shape/Rect'; class ESafeStand extends Group { - constructor(model) { - super(); - this.model = model; - this.create(); - } + constructor(model) { + super(); + this.model = model; + this.create(); + } - create() { - const model = this.model; - const style = this.model.style; + create() { + const model = this.model; + const style = this.model.style; - this.stand = new Rect({ - zlevel: model.zlevel, - z: model.z, - shape: { - x: model.x, - y: model.y, - width: model.width, - height: model.height - }, - style: { - lineWidth: 0, - stroke: style.sidelineColor, - fill: style.StationStand.stand.spareColor - } - }); + this.stand = new Rect({ + zlevel: model.zlevel, + z: model.z, + shape: { + x: model.x, + y: model.y, + width: model.width, + height: model.height + }, + style: { + lineWidth: 0, + stroke: style.sidelineColor, + fill: style.StationStand.stand.spareColor + } + }); - this.add(this.stand); - } + this.add(this.stand); + } - setColor(color) { - this.stand.setStyle('fill', color); - } + setColor(color) { + this.stand.setStyle('fill', color); + } } export default ESafeStand; diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index c8df0a164..f1461faea 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -33,9 +33,9 @@ class StationStand extends Group { const drict = 1; /** 列车站台*/ - const standH = drict > 0 ? style.StationStand.safetyDoor.height : model.height; + // const standH = drict > 0 ? style.StationStand.safetyDoor.height : model.height; const standX = model.position.x - model.width / 2; - const standY = model.position.y + drict * (style.StationStand.safetyDoor.distance + standH); + const standY = model.position.y - model.height / 2; this.safeStand = new ESafeStand({ zlevel: this.zlevel, z: this.z, @@ -47,124 +47,124 @@ class StationStand extends Group { }); this.add(this.safeStand); - if (model.direction != '03') { - // /** 屏蔽门*/ - // this.safeDoor = new ESafeDoor({ - // zlevel: this.zlevel, - // z: this.z, - // style: style, - // x: model.position.x, - // y: model.position.y, - // width: model.width, - // height: style.StationStand.safetyDoor.height, - // show: model.hasDoor - // }); + // if (model.direction != '03') { + // /** 屏蔽门*/ + // this.safeDoor = new ESafeDoor({ + // zlevel: this.zlevel, + // z: this.z, + // style: style, + // x: model.position.x, + // y: model.position.y, + // width: model.width, + // height: style.StationStand.safetyDoor.height, + // show: model.hasDoor + // }); - /** 站台紧急关闭*/ - const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height : style.StationStand.standEmergent.mergentR; - const emergentX = model.position.x + drict * (style.StationStand.standEmergent.offset.x); - const emergentY = model.position.y + drict * (style.StationStand.standEmergent.offset.y + emergentH); - this.emergent = new ESafeEmergent({ + /** 站台紧急关闭*/ + const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height : style.StationStand.standEmergent.mergentR; + const emergentX = model.position.x + drict * (style.StationStand.standEmergent.offset.x); + const emergentY = model.position.y + drict * (style.StationStand.standEmergent.offset.y + emergentH); + this.emergent = new ESafeEmergent({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + x: emergentX, + y: emergentY, + r: style.StationStand.standEmergent.mergentR, + n: 4 + }); + + /** 站台折返策略*/ + const reentryD = style.StationStand.reentry.position ? model.height + 6 : -style.StationStand.safetyDoor.distance - style.StationStand.safetyDoor.height; + const reentryH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + reentryD; + const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2); + const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH; + this.reentry = new EReentry({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + drict: drict, + x: reentryX, + y: reentryY, + lineWidth: 0, + fill: style.StationStand.reentry.noHumanColor + }); + + const distance = style.StationStand.safetyDoor.height * 2 - style.StationStand.stand.headFontSize / 2 - 2; + + /** 站台扣车*/ + const detainD = style.StationStand.detainCar.position ? model.height - distance : -style.StationStand.safetyDoor.height; + const detainH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + detainD; + const detainX = model.position.x - (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.x - model.width / 2); + const detainY = model.position.y + (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.y) + drict * detainH; + this.detain = new EDetain({ + zlevel: this.zlevel, + z: this.z, + style: style, + x: detainX, + y: detainY, + textAlign: 'middle', + textVerticalAlign: 'top' + }); + + /** 停站时间*/ + const timeD = style.StationStand.stopTime.position ? model.height - distance : -style.StationStand.safetyDoor.height; + const timeH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + timeD; + const timeX = model.position.x - (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.x - model.width / 2); + const timeY = model.position.y + (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH; + this.time = new ETime({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + x: timeX, + y: timeY, + name: model.parkingTime || '30' + }); + + /** 运行等级*/ + const levelD = style.StationStand.level.position ? model.height - distance : -style.StationStand.safetyDoor.height; + const levelH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + levelD; + const levelX = model.position.x - (style.StationStand.level.position || drict) * (style.StationStand.level.offset.x - model.width / 2); + const levelY = model.position.y + (style.StationStand.level.position || drict) * (style.StationStand.level.offset.y) + drict * levelH; + this.level = new ELevel({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + x: levelX, + y: levelY, + name: model.intervalRunTime || '5' + }); + + /** 列车停跳 */ + if (style.StationStand.common.haveJumpShow) { + const jumpD = style.StationStand.jump.position ? model.height - distance : -style.StationStand.safetyDoor.height; + const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; + const jumpX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2); + const jumpY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; + const jumpCX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2); + const jumpCY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH; + this.jump = new EJump({ zlevel: this.zlevel, z: this.z + 1, style: style, - x: emergentX, - y: emergentY, - r: style.StationStand.standEmergent.mergentR, - n: 4 - }); - - /** 站台折返策略*/ - const reentryD = style.StationStand.reentry.position ? model.height + 6 : -style.StationStand.safetyDoor.distance - style.StationStand.safetyDoor.height; - const reentryH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + reentryD; - const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2); - const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH; - this.reentry = new EReentry({ - zlevel: this.zlevel, - z: this.z + 1, - style: style, - drict: drict, - x: reentryX, - y: reentryY, - lineWidth: 0, - fill: style.StationStand.reentry.noHumanColor - }); - - const distance = style.StationStand.safetyDoor.height * 2 - style.StationStand.stand.headFontSize / 2 - 2; - - /** 站台扣车*/ - const detainD = style.StationStand.detainCar.position ? model.height - distance : -style.StationStand.safetyDoor.height; - const detainH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + detainD; - const detainX = model.position.x - (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.x - model.width / 2); - const detainY = model.position.y + (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.y) + drict * detainH; - this.detain = new EDetain({ - zlevel: this.zlevel, - z: this.z, - style: style, - x: detainX, - y: detainY, + x: jumpX, + y: jumpY, + cx: jumpCX, + cy: jumpCY, textAlign: 'middle', - textVerticalAlign: 'top' + textVerticalAlign: 'top', + jumpStopStatus: model.jumpStopStatus }); - - /** 停站时间*/ - const timeD = style.StationStand.stopTime.position ? model.height - distance : -style.StationStand.safetyDoor.height; - const timeH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + timeD; - const timeX = model.position.x - (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.x - model.width / 2); - const timeY = model.position.y + (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH; - this.time = new ETime({ - zlevel: this.zlevel, - z: this.z + 1, - style: style, - x: timeX, - y: timeY, - name: model.parkingTime || '30' - }); - - /** 运行等级*/ - const levelD = style.StationStand.level.position ? model.height - distance : -style.StationStand.safetyDoor.height; - const levelH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + levelD; - const levelX = model.position.x - (style.StationStand.level.position || drict) * (style.StationStand.level.offset.x - model.width / 2); - const levelY = model.position.y + (style.StationStand.level.position || drict) * (style.StationStand.level.offset.y) + drict * levelH; - this.level = new ELevel({ - zlevel: this.zlevel, - z: this.z + 1, - style: style, - x: levelX, - y: levelY, - name: model.intervalRunTime || '5' - }); - - /** 列车停跳 */ - if (style.StationStand.common.haveJumpShow) { - const jumpD = style.StationStand.jump.position ? model.height - distance : -style.StationStand.safetyDoor.height; - const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; - const jumpX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2); - const jumpY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; - const jumpCX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2); - const jumpCY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH; - this.jump = new EJump({ - zlevel: this.zlevel, - z: this.z + 1, - style: style, - x: jumpX, - y: jumpY, - cx: jumpCX, - cy: jumpCY, - textAlign: 'middle', - textVerticalAlign: 'top', - jumpStopStatus: model.jumpStopStatus - }); - this.add(this.jump); - } - - this.add(this.safeDoor); - this.add(this.emergent); - this.add(this.detain); - this.add(this.reentry); - this.add(this.time); - this.add(this.level); + this.add(this.jump); } + + this.add(this.safeDoor); + this.add(this.emergent); + this.add(this.detain); + this.add(this.reentry); + this.add(this.time); + this.add(this.level); + // } } createMouseEvent() { diff --git a/src/jmapNew/utils/Uid.js b/src/jmapNew/utils/Uid.js index 88f015c4b..937c4351f 100644 --- a/src/jmapNew/utils/Uid.js +++ b/src/jmapNew/utils/Uid.js @@ -8,7 +8,17 @@ export function getUID(type, list) { // if (list && list.length) { let name = ''; if (type == 'T') { - name = list.length ? Number(list[list.length - 1].code.replace('T', '')) + 1 : list.length + 1; + if (list.length) { + const str = list[list.length - 1].code.substr(0, 1); + if (str == 'T') { + name = Number(list[list.length - 1].code.replace('T', '')) + 1; + } else { + name = 1; + } + } else { + name = list.length + 1; + } + // name = list.length ? Number(list[list.length - 1].code.replace('T', '')) + 1 : list.length + 1; } else { name = Math.floor((Math.random() * 100000) + 1); } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 79d1c6346..1e9afea51 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,11 +3,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'; // 杜康 } else { BASE_API = process.env.VUE_APP_BASE_API; } diff --git a/src/views/newMap/newDesignUser/mapmanage/edit.vue b/src/views/newMap/newDesignUser/mapmanage/edit.vue index cbbd3a8bb..f58d80424 100644 --- a/src/views/newMap/newDesignUser/mapmanage/edit.vue +++ b/src/views/newMap/newDesignUser/mapmanage/edit.vue @@ -4,7 +4,7 @@