暂存文件

This commit is contained in:
ival 2021-03-15 19:23:33 +08:00
parent 13f3302cfc
commit c44c2a0e0c
2 changed files with 66 additions and 30 deletions

View File

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

View File

@ -208,15 +208,17 @@ export default {
}
},
onOutboundRouteChange(outboundRouting='') {
if (this.formModel.runningRouting || outboundRouting) {
if (this.formModel.runningRouting) {
//
const outboundRoute = this.routingList.find(route => route.value == outboundRouting);
const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
this.runningRouteList = this.covertRouting(Object.values(this.runningRoutingMap), route => {
return route.runningRouting1 && route.runningRouting2 && (
!inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode ||
inboundRoute && !outboundRoute && inboundRoute.startSectionCode == route.endSectionCode ||
inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode && inboundRoute.startSectionCode == route.endSectionCode
// !inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode ||
// inboundRoute && !outboundRoute && inboundRoute.startSectionCode == route.endSectionCode ||
// inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode && inboundRoute.startSectionCode == route.endSectionCode
outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode)
)
})
@ -227,15 +229,29 @@ export default {
this.formModel.runningRouting2 = '';
}
} else {
//
this.outboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'OUTBOUND'
})
if (!outboundRouting) {
//
this.outboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'OUTBOUND'
})
}
//
if (!this.formModel.outboundRouting && !this.formModel.inboundRouting) {
this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => route.runningRouting1 && route.runningRouting2)
}
const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => {
return route.runningRouting1 && route.runningRouting2 && (
outboundRoute && !inboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
!outboundRoute && inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
outboundRoute && inboundRoute && (
JSON.stringify([route.startSectionCode,route.endSectionCode].sort()) ==
JSON.stringify([inboundRoute.startSectionCode, outboundRoute.endSectionCode].sort()) ||
JSON.stringify([route.endSectionCode,route.startSectionCode].sort()) ==
JSON.stringify([inboundRoute.startSectionCode, outboundRoute.endSectionCode].sort())
) ||
!inboundRoute && !outboundRoute
)
})
}
this.$nextTick(_ => {
@ -252,7 +268,7 @@ export default {
const runningRoute = Object.values(this.runningRoutingMap).find(route => route.value == runningRouting);
if (this.formModel.runningRouting) {
this.outboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'OUTBOUND' && runningRoute && runningRoute.startSectionCode == route.endSectionCode
return route.routingType == 'OUTBOUND' && runningRoute && [runningRoute.startSectionCode, runningRoute.endSectionCode].includes(route.endSectionCode)
})
if (!this.outboundRouteList.find(route => route.value == this.formModel.outboundRouting)) {
@ -260,7 +276,7 @@ export default {
}
this.inboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'INBOUND' && runningRoute && runningRoute.endSectionCode == route.startSectionCode
return route.routingType == 'INBOUND' && runningRoute && [runningRoute.startSectionCode, runningRoute.endSectionCode].includes(route.startSectionCode)
})
if (!this.inboundRouteList.find(route => route.value == this.formModel.inboundRouting)) {
@ -274,11 +290,15 @@ export default {
const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => route.runningRouting1 && route.runningRouting2 && (
!inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode ||
inboundRoute && !outboundRoute && inboundRoute.startSectionCode == route.endSectionCode ||
inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode && inboundRoute.startSectionCode == route.endSectionCode ||
// !inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode ||
// inboundRoute && !outboundRoute && inboundRoute.startSectionCode == route.endSectionCode ||
// inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode && inboundRoute.startSectionCode == route.endSectionCode ||
// !inboundRoute && !outboundRoute
outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
!inboundRoute && !outboundRoute
))
this.inboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'INBOUND';
})
@ -289,16 +309,18 @@ export default {
})
},
onInboundRouteChange(inboundRouting='') {
if (this.formModel.runningRouting || inboundRouting) {
if (this.formModel.runningRouting) {
//
const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
const inboundRoute = this.routingList.find(route => route.value == inboundRouting);
this.runningRouteList = this.covertRouting(Object.values(this.runningRoutingMap), route => {
return route.runningRouting1 && route.runningRouting2 && (
inboundRoute && !outboundRoute && inboundRoute.startSectionCode == route.endSectionCode ||
!inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode ||
inboundRoute && outboundRoute && inboundRoute.startSectionCode == route.endSectionCode && outboundRoute.endSectionCode == route.startSectionCode
// inboundRoute && !outboundRoute && inboundRoute.startSectionCode == route.endSectionCode ||
// !inboundRoute && outboundRoute && outboundRoute.endSectionCode == route.startSectionCode ||
// inboundRoute && outboundRoute && inboundRoute.startSectionCode == route.endSectionCode && outboundRoute.endSectionCode == route.startSectionCode
outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode)
)
})
@ -309,15 +331,29 @@ export default {
this.formModel.runningRouting2 = '';
}
} else {
//
this.inboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'INBOUND';
})
//
if (!this.formModel.outboundRouting && !this.formModel.inboundRouting) {
this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => route.runningRouting1 && route.runningRouting2)
if (!inboundRouting) {
//
this.inboundRouteList = this.covertRouting(this.routingList, route => {
return route.routingType == 'INBOUND';
})
}
const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
//
this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => {
return route.runningRouting1 && route.runningRouting2 && (
outboundRoute && !inboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
!outboundRoute && inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
outboundRoute && inboundRoute && (
JSON.stringify([route.startSectionCode,route.endSectionCode].sort()) ==
JSON.stringify([inboundRoute.startSectionCode, outboundRoute.endSectionCode]) ||
JSON.stringify([route.endSectionCode,route.startSectionCode].sort()) ==
JSON.stringify([inboundRoute.startSectionCode, outboundRoute.endSectionCode])
) ||
!inboundRoute && !outboundRoute
)
})
}
this.$nextTick(_ => {