Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-09-11 20:57:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0fb7a035a420de0299cc62730492fc6c0e6e6ab5
0fb7a035
1 parent
8183b2d5
modify
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
27 deletions
src/utils/request.js
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/utils/request.js
View file @
0fb7a03
...
...
@@ -79,14 +79,22 @@ service.interceptors.response.use(res => {
type
:
'error'
})
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!=
203
&&
code
!=
603
&&
code
!=
402
)
{
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!=
203
&&
code
!=
300
&&
code
!=
402
&&
code
!=
603
)
{
Message
({
message
:
msg
,
type
:
'error'
})
return
Promise
.
reject
(
'error'
)
type
:
"error"
,
})
;
return
Promise
.
reject
(
"error"
);
}
else
{
return
res
.
data
return
res
.
data
;
}
},
error
=>
{
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
0fb7a03
...
...
@@ -782,27 +782,76 @@ export default {
})
}
} else {
//航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
this.routeList.forEach((route, sub) => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
this.infoForm.list.push(this.dataHandle(item))
//
if (this.routeSatus == 'FlightAllocConfig') {
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
fltDate: '',
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(resData => {
if (resData.data.list.length > 0) {
this.routeList.forEach((route) => {
let routeStatus = 1
resData.data.list.forEach(item => {
if (item.flightRoute == route.route) {
routeStatus = 2
this.infoForm.list.push(
this.dataHandle(item)
)
console.log(route.route)
}
})
if (routeStatus == 1) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
else {
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
})
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
if (routeStatus == 1) {
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
this.newRoute(sub)
}
})
}else{
// 航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
this.routeList.forEach((route, sub) => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
item.id = undefined
item.status = undefined
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routeStatus == 1) {
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
this.newRoute(sub)
}
})
}
}
}
else {
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
0fb7a03
...
...
@@ -359,7 +359,7 @@ export default {
route: [
{
required: true,
message: "航班路线不能为空",
message: "航班路线不能为空
呀
",
trigger: "change",
},
// {
...
...
@@ -615,11 +615,15 @@ export default {
this.selectOption.flightKindlist.forEach(item => {
if (item.id == val) {
if (item.chineseName.indexOf('White') >= 0) {
this.form.route = ''
this.routeMultiple = false
// this.rules.route[0].type = 'string'
this.form.route = ''
// this.rules.route[0].required = true;
} else if (item.chineseName.indexOf('Purple') >= 0) {
this.form.route = []
this.routeMultiple = true
// this.rules.route[0].type = 'array'
this.form.route = []
// this.rules.route[0].required = true;
}
}
})
...
...
@@ -1109,6 +1113,11 @@ export default {
},
//航线修改
routeChange(val) {
if(val.length){
this.rules.route[0].required = false;
}else{
// this.rules.route[0].required = true;
}
this.$forceUpdate()
},
//多选框选中数据
...
...
Please
register
or
login
to post a comment