Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
6f6d827c
Commit
6f6d827c
authored
Nov 20, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线路选择器的逻辑目的国、目的城市、目的仓选择联动逻辑修改完善
parent
6efa58ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
75 deletions
+80
-75
index.vue
src/components/RoutersSelector/index.vue
+80
-75
No files found.
src/components/RoutersSelector/index.vue
View file @
6f6d827c
...
...
@@ -319,30 +319,31 @@ export default {
if
(
this
.
destCountryIds
&&
this
.
destCountryIds
.
length
>
0
)
{
this
.
destCityList
=
this
.
AddressCity
.
filter
(
item
=>
this
.
destCountryIds
.
includes
(
item
.
guojia
))
this
.
destWarehouseList
=
this
.
AddressTown
.
filter
(
item
=>
this
.
destCountryIds
.
includes
(
item
.
guojia
))
}
else
{
if
(
this
.
destCityIds
&&
this
.
destCityIds
.
length
>
0
)
{
let
cityCountryIdList
=
this
.
destCityList
.
filter
(
item
=>
this
.
destCityIds
.
includes
(
item
.
shi
)).
map
((
city
)
=>
{
return
city
.
guojia
})
this
.
destCountryList
=
this
.
countryList
.
filter
(
item
=>
cityCountryIdList
.
includes
(
item
.
guojia
))
this
.
destWarehouseList
=
this
.
AddressTown
.
filter
(
item
=>
this
.
destCityIds
.
includes
(
item
.
shi
))
}
else
{
if
(
this
.
destWarehouseIds
&&
this
.
destWarehouseIds
.
length
>
0
)
{
let
warehouseCountryIdList
=
this
.
destWarehouseList
.
filter
(
item
=>
this
.
destWarehouseIds
.
includes
(
item
.
warehouseId
)).
map
((
warehouse
)
=>
{
return
warehouse
.
guojia
})
this
.
destCountryList
=
this
.
countryList
.
filter
(
item
=>
warehouseCountryIdList
.
includes
(
item
.
guojia
))
let
warehouseCityIdList
=
this
.
destWarehouseList
.
filter
(
item
=>
this
.
destWarehouseIds
.
includes
(
item
.
warehouseId
)).
map
((
warehouse
)
=>
{
return
warehouse
.
shi
})
this
.
destCityList
=
this
.
AddressCity
.
filter
(
item
=>
warehouseCityIdList
.
includes
(
item
.
shi
))
}
else
{
this
.
destCountryList
=
this
.
countryList
;
this
.
destCityList
=
this
.
AddressCity
;
this
.
destWarehouseList
=
this
.
AddressTown
}
}
}
// else {
// if (this.destCityIds && this.destCityIds.length > 0) {
// let cityCountryIdList = this.destCityList.filter(item => this.destCityIds.includes(item.shi)).map((city) => {
// return city.guojia
// })
// this.destCountryList = this.countryList.filter(item => cityCountryIdList.includes(item.guojia))
// this.destWarehouseList = this.AddressTown.filter(item => this.destCityIds.includes(item.shi))
// }else {
// if (this.destWarehouseIds && this.destWarehouseIds.length > 0) {
// let warehouseCountryIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.guojia
// })
// this.destCountryList = this.countryList.filter(item => warehouseCountryIdList.includes(item.guojia))
// let warehouseCityIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.shi
// })
// this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
// }else {
// this.destCountryList = this.countryList;
// this.destCityList = this.AddressCity;
// this.destWarehouseList = this.AddressTown
// }
// }
// }
this
.
getOpenedRouterList
()
},
},
...
...
@@ -352,66 +353,70 @@ export default {
console
.
log
(
"
目的城市id集合变更
"
,
this
.
destCityIds
)
this
.
destWarehouseIds
=
[];
if
(
this
.
destCityIds
&&
this
.
destCityIds
.
length
>
0
)
{
let
cityCountryIdList
=
this
.
destCityList
.
filter
(
item
=>
this
.
destCityIds
.
includes
(
item
.
shi
)).
map
((
city
)
=>
{
return
city
.
guojia
})
this
.
destCountryList
=
this
.
countryList
.
filter
(
item
=>
cityCountryIdList
.
includes
(
item
.
guojia
))
//
let cityCountryIdList = this.destCityList.filter(item => this.destCityIds.includes(item.shi)).map((city) => {
//
return city.guojia
//
})
//
this.destCountryList = this.countryList.filter(item => cityCountryIdList.includes(item.guojia))
this
.
destWarehouseList
=
this
.
AddressTown
.
filter
(
item
=>
this
.
destCityIds
.
includes
(
item
.
shi
))
}
else
{
if
(
this
.
destCountryIds
&&
this
.
destCountryIds
.
length
>
0
)
{
this
.
destCityList
=
this
.
AddressCity
.
filter
(
item
=>
this
.
destCountryIds
.
includes
(
item
.
guojia
))
this
.
destWarehouseList
=
this
.
AddressTown
.
filter
(
item
=>
this
.
destCountryIds
.
includes
(
item
.
guojia
))
}
else
{
if
(
this
.
destWarehouseIds
&&
this
.
destWarehouseIds
.
length
>
0
)
{
let
warehouseCountryIdList
=
this
.
destWarehouseList
.
filter
(
item
=>
this
.
destWarehouseIds
.
includes
(
item
.
warehouseId
)).
map
((
warehouse
)
=>
{
return
warehouse
.
guojia
})
this
.
destCountryList
=
this
.
countryList
.
filter
(
item
=>
warehouseCountryIdList
.
includes
(
item
.
guojia
))
let
warehouseCityIdList
=
this
.
destWarehouseList
.
filter
(
item
=>
this
.
destWarehouseIds
.
includes
(
item
.
warehouseId
)).
map
((
warehouse
)
=>
{
return
warehouse
.
shi
})
this
.
destCityList
=
this
.
AddressCity
.
filter
(
item
=>
warehouseCityIdList
.
includes
(
item
.
shi
))
}
else
{
this
.
destCountryList
=
this
.
countryList
;
this
.
destCityList
=
this
.
AddressCity
;
this
.
destWarehouseList
=
this
.
AddressTown
}
}
}
// else {
// if (this.destCountryIds && this.destCountryIds.length > 0) {
// this.destCityList = this.AddressCity.filter(item => this.destCountryIds.includes(item.guojia))
// this.destWarehouseList = this.AddressTown.filter(item => this.destCountryIds.includes(item.guojia))
// }else {
// if (this.destWarehouseIds && this.destWarehouseIds.length > 0) {
// let warehouseCountryIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.guojia
// })
// this.destCountryList = this.countryList.filter(item => warehouseCountryIdList.includes(item.guojia))
// let warehouseCityIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.shi
// })
// this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
// }else {
// this.destCountryList = this.countryList;
// this.destCityList = this.AddressCity;
// this.destWarehouseList = this.AddressTown
// }
// }
// }
this
.
getOpenedRouterList
()
},
},
destWarehouseIds
:
{
deep
:
true
,
//深度监听
handler
()
{
console
.
log
(
"
目的仓库id集合变更
"
,
this
.
destWarehouseIds
)
if
(
this
.
destWarehouseIds
&&
this
.
destWarehouseIds
.
length
>
0
)
{
let
warehouseCountryIdList
=
this
.
destWarehouseList
.
filter
(
item
=>
this
.
destWarehouseIds
.
includes
(
item
.
warehouseId
)).
map
((
warehouse
)
=>
{
return
warehouse
.
guojia
})
this
.
destCountryList
=
this
.
countryList
.
filter
(
item
=>
warehouseCountryIdList
.
includes
(
item
.
guojia
))
let
warehouseCityIdList
=
this
.
destWarehouseList
.
filter
(
item
=>
this
.
destWarehouseIds
.
includes
(
item
.
warehouseId
)).
map
((
warehouse
)
=>
{
return
warehouse
.
shi
})
this
.
destCityList
=
this
.
AddressCity
.
filter
(
item
=>
warehouseCityIdList
.
includes
(
item
.
shi
))
}
else
{
if
(
this
.
destCountryIds
&&
this
.
destCountryIds
.
length
>
0
)
{
this
.
destCityList
=
this
.
AddressCity
.
filter
(
item
=>
this
.
destCountryIds
.
includes
(
item
.
guojia
))
this
.
destWarehouseList
=
this
.
AddressTown
.
filter
(
item
=>
this
.
destCountryIds
.
includes
(
item
.
guojia
))
}
else
{
if
(
this
.
destCityIds
&&
this
.
destCityIds
.
length
>
0
)
{
let
cityCountryIdList
=
this
.
destCityList
.
filter
(
item
=>
this
.
destCityIds
.
includes
(
item
.
shi
)).
map
((
city
)
=>
{
return
city
.
guojia
})
this
.
destCountryList
=
this
.
countryList
.
filter
(
item
=>
cityCountryIdList
.
includes
(
item
.
guojia
))
this
.
destWarehouseList
=
this
.
AddressTown
.
filter
(
item
=>
this
.
destCityIds
.
includes
(
item
.
shi
))
}
else
{
this
.
destCountryList
=
this
.
countryList
;
this
.
destCityList
=
this
.
AddressCity
;
this
.
destWarehouseList
=
this
.
AddressTown
}
}
}
// console.log("目的仓库id集合变更", this.destWarehouseIds)
// if (this.destWarehouseIds && this.destWarehouseIds.length > 0) {
// let warehouseCountryIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.guojia
// })
// this.destCountryList = this.countryList.filter(item => warehouseCountryIdList.includes(item.guojia))
// let warehouseCityIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.shi
// })
// this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
// }else {
// if (this.destCountryIds && this.destCountryIds.length > 0) {
// this.destCityList = this.AddressCity.filter(item => this.destCountryIds.includes(item.guojia))
// this.destWarehouseList = this.AddressTown.filter(item => this.destCountryIds.includes(item.guojia))
// }else {
// if (this.destWarehouseIds && this.destWarehouseIds.length > 0) {
// let warehouseCountryIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.guojia
// })
// this.destCountryList = this.countryList.filter(item => warehouseCountryIdList.includes(item.guojia))
// let warehouseCityIdList = this.destWarehouseList.filter(item => this.destWarehouseIds.includes(item.warehouseId)).map((warehouse) => {
// return warehouse.shi
// })
// this.destCityList = this.AddressCity.filter(item => warehouseCityIdList.includes(item.shi))
// }else {
// this.destCountryList = this.countryList;
// this.destCityList = this.AddressCity;
// this.destWarehouseList = this.AddressTown
// }
// }
// }
this
.
getOpenedRouterList
()
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment