Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄媛媛
ElectricitySheep
Commits
06e9893f
Commit
06e9893f
authored
Aug 18, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
06bd1df3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
558 additions
and
524 deletions
+558
-524
pintuanActive.vue
src/components/pintuan/pintuanActive.vue
+25
-22
regionChoice.vue
src/components/setup/view/regionChoice.vue
+533
-502
No files found.
src/components/pintuan/pintuanActive.vue
View file @
06e9893f
...
@@ -243,8 +243,8 @@
...
@@ -243,8 +243,8 @@
<div
flex=
"dir:left"
>
<div
flex=
"dir:left"
>
<span
class=
"box-grow-0"
style=
"color:#606266"
>
商品
</span>
<span
class=
"box-grow-0"
style=
"color:#606266"
>
商品
</span>
<div
style=
"width: 100%;margin:0 10px"
>
<div
style=
"width: 100%;margin:0 10px"
>
<el-input
placeholder=
"请输入限购数量"
@
keyup
.
native=
"checkInteger(addMsg,'Confine_Count','-')"
v-model=
"addMsg.Confine_Count"
size=
"small"
<el-input
placeholder=
"请输入限购数量"
@
keyup
.
native=
"checkInteger(addMsg,'Confine_Count','-')"
:disabled=
"addMsg.Confine_Count <=-1"
>
v-model=
"addMsg.Confine_Count"
size=
"small"
:disabled=
"addMsg.Confine_Count <=-1"
>
<
template
slot=
"append"
>
件
</
template
>
<
template
slot=
"append"
>
件
</
template
>
</el-input>
</el-input>
</div>
</div>
...
@@ -255,7 +255,8 @@
...
@@ -255,7 +255,8 @@
<div
flex=
"dir:left"
style=
"margin-top: 10px;"
>
<div
flex=
"dir:left"
style=
"margin-top: 10px;"
>
<span
class=
"box-grow-0"
style=
"color:#606266"
>
订单
</span>
<span
class=
"box-grow-0"
style=
"color:#606266"
>
订单
</span>
<div
style=
"width: 100%;margin:0 10px"
>
<div
style=
"width: 100%;margin:0 10px"
>
<el-input
placeholder=
"请输入限购数量"
@
keyup
.
native=
"checkInteger(addMsg,'Confine_Order_Count','-')"
v-model=
"addMsg.Confine_Order_Count"
size=
"small"
<el-input
placeholder=
"请输入限购数量"
@
keyup
.
native=
"checkInteger(addMsg,'Confine_Order_Count','-')"
v-model=
"addMsg.Confine_Order_Count"
size=
"small"
:disabled=
"addMsg.Confine_Order_Count<=-1"
>
:disabled=
"addMsg.Confine_Order_Count<=-1"
>
<
template
slot=
"append"
>
单
</
template
>
<
template
slot=
"append"
>
单
</
template
>
</el-input>
</el-input>
...
@@ -295,20 +296,20 @@
...
@@ -295,20 +296,20 @@
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"addMsg.Is_Area_Limit == 1"
label=
"允许购买区域"
>
<el-form-item
v-if=
"addMsg.Is_Area_Limit == 1"
label=
"允许购买区域"
>
<span
v-if=
"addMsg.Area
_limi
t.length == 0"
@
click=
"addArea"
class=
"blue point"
>
+添加地区
</span>
<span
v-if=
"addMsg.Area
Lis
t.length == 0"
@
click=
"addArea"
class=
"blue point"
>
+添加地区
</span>
<div
v-if=
"addMsg.Area
_limi
t.length > 0"
style=
"border: 1px solid #EBEEF5;padding:20px"
<div
v-if=
"addMsg.Area
Lis
t.length > 0"
style=
"border: 1px solid #EBEEF5;padding:20px"
flex=
"dir:left box:last"
>
flex=
"dir:left box:last"
>
<div>
<div>
<div
flex=
"dir:left"
style=
"flex-wrap: wrap; width: 90%;"
>
<div
flex=
"dir:left"
style=
"flex-wrap: wrap; width: 90%;"
>
<span>
区域:
</span>
<span>
区域:
</span>
<el-tag
v-for=
"item in addMsg.Area
_limi
t"
:key=
"item.Id"
type=
"info"
style=
"margin:5px"
>
<el-tag
v-for=
"item in addMsg.Area
Lis
t"
:key=
"item.Id"
type=
"info"
style=
"margin:5px"
>
{{ item.AreaName }}
</el-tag>
{{ item.AreaName }}
</el-tag>
</div>
</div>
</div>
</div>
<div>
<div>
<img
@
click=
"editQy"
style=
"cursor:pointer;"
src=
"../../assets/img/userman/edit.png"
alt=
""
/>
<img
@
click=
"editQy"
style=
"cursor:pointer;"
src=
"../../assets/img/userman/edit.png"
alt=
""
/>
<img
@
click=
"(addMsg.Area
_limit = []), (AreaList = [])"
style=
"margin-left:15px;cursor:pointer;
"
<img
@
click=
"(addMsg.Area
List = []), (ChooseAreaList = [])
"
src=
"../../assets/img/userman/del.png"
alt=
""
/>
s
tyle=
"margin-left:15px;cursor:pointer;"
s
rc=
"../../assets/img/userman/del.png"
alt=
""
/>
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -491,7 +492,7 @@
...
@@ -491,7 +492,7 @@
</el-dialog>
</el-dialog>
<!--区域-->
<!--区域-->
<el-dialog
custom-class=
"regionDig"
title=
"区域"
:visible
.
sync=
"dialogFormVisible"
>
<el-dialog
custom-class=
"regionDig"
title=
"区域"
:visible
.
sync=
"dialogFormVisible"
>
<regionChoice
@
event1=
"change($event)"
:List=
"AreaList"
ref=
"child"
></regionChoice>
<regionChoice
@
event1=
"change($event)"
:List=
"
Choose
AreaList"
ref=
"child"
></regionChoice>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"Addto"
>
确 定
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"Addto"
>
确 定
</el-button>
</div>
</div>
...
@@ -550,7 +551,7 @@
...
@@ -550,7 +551,7 @@
Pieces
:
0
,
//单品满件包邮
Pieces
:
0
,
//单品满件包邮
Forehead
:
0
,
//单品满额包邮
Forehead
:
0
,
//单品满额包邮
Is_Area_Limit
:
0
,
//区域购买
Is_Area_Limit
:
0
,
//区域购买
Area
_limi
t
:
[],
//购买区域
Area
Lis
t
:
[],
//购买区域
Give_integral
:
0
,
//积分赠送
Give_integral
:
0
,
//积分赠送
Give_integral_type
:
1
,
//积分赠送=>1固定值 2百分比
Give_integral_type
:
1
,
//积分赠送=>1固定值 2百分比
Is_forehead_integral
:
0
,
//积分抵扣
Is_forehead_integral
:
0
,
//积分抵扣
...
@@ -583,7 +584,7 @@
...
@@ -583,7 +584,7 @@
formName
:
''
,
formName
:
''
,
imgDialog
:
false
,
imgDialog
:
false
,
//区域
//区域
AreaList
:
[],
ChooseAreaList
:
[],
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
rules
:
{
rules
:
{
StartTime
:
[{
StartTime
:
[{
...
@@ -646,7 +647,10 @@
...
@@ -646,7 +647,10 @@
this
.
addMsg
.
Pieces
=
Mydata
.
Pieces
;
this
.
addMsg
.
Pieces
=
Mydata
.
Pieces
;
this
.
addMsg
.
Forehead
=
Mydata
.
Forehead
;
this
.
addMsg
.
Forehead
=
Mydata
.
Forehead
;
this
.
addMsg
.
Is_Area_Limit
=
Mydata
.
Is_Area_Limit
;
this
.
addMsg
.
Is_Area_Limit
=
Mydata
.
Is_Area_Limit
;
this
.
addMsg
.
Area_limit
=
Mydata
.
Area_limit
;
if
(
Mydata
.
AreaList
&&
Mydata
.
AreaList
)
{
this
.
addMsg
.
AreaList
=
Mydata
.
AreaList
;
this
.
ChooseAreaList
=
Mydata
.
AreaList
;
}
this
.
addMsg
.
Give_integral
=
Mydata
.
Give_integral
;
this
.
addMsg
.
Give_integral
=
Mydata
.
Give_integral
;
this
.
addMsg
.
Give_integral_type
=
Mydata
.
Give_integral_type
;
this
.
addMsg
.
Give_integral_type
=
Mydata
.
Give_integral_type
;
this
.
addMsg
.
Is_forehead_integral
=
Mydata
.
Is_forehead_integral
;
this
.
addMsg
.
Is_forehead_integral
=
Mydata
.
Is_forehead_integral
;
...
@@ -821,37 +825,36 @@
...
@@ -821,37 +825,36 @@
this
.
imgDialog
=
false
;
this
.
imgDialog
=
false
;
},
},
//添加区域
//添加区域
addArea
(){
addArea
()
{
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
this
.
AreaList
=
[];
this
.
Choose
AreaList
=
[];
this
.
addMsg
.
Area
_limi
t
=
[];
this
.
addMsg
.
Area
Lis
t
=
[];
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
child
.
Receive
(
this
.
AreaList
);
this
.
$refs
.
child
.
Receive
(
this
.
Choose
AreaList
);
},
1000
);
},
1000
);
},
},
//点击区域弹窗确定
//点击区域弹窗确定
Addto
()
{
Addto
()
{
this
.
addMsg
.
Area
_limi
t
=
[];
this
.
addMsg
.
Area
Lis
t
=
[];
this
.
AreaList
.
forEach
(
item
=>
{
this
.
Choose
AreaList
.
forEach
(
item
=>
{
let
obj
=
{
let
obj
=
{
Id
:
item
.
RegionId
,
Id
:
item
.
RegionId
,
AreaId
:
item
.
RegionId
,
AreaId
:
item
.
RegionId
,
AreaName
:
item
.
RegionName
AreaName
:
item
.
RegionName
};
};
this
.
addMsg
.
Area
_limi
t
.
push
(
obj
);
this
.
addMsg
.
Area
Lis
t
.
push
(
obj
);
});
});
this
.
dialogFormVisible
=
false
;
this
.
dialogFormVisible
=
false
;
},
},
change
(
data
)
{
change
(
data
)
{
this
.
AreaList
=
data
;
this
.
Choose
AreaList
=
data
;
},
},
editQy
()
{
editQy
()
{
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
child
.
Receive
(
this
.
AreaList
);
this
.
$refs
.
child
.
Receive
(
this
.
Choose
AreaList
);
},
1000
);
},
1000
);
}
}
}
}
};
};
...
...
src/components/setup/view/regionChoice.vue
View file @
06e9893f
...
@@ -2,27 +2,27 @@
...
@@ -2,27 +2,27 @@
<div
class=
"regionChoice"
v-loading=
"loading"
>
<div
class=
"regionChoice"
v-loading=
"loading"
>
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"item_b"
v-for=
"(item,index) in regionList"
:key=
"index"
>
<div
class=
"item_b"
v-for=
"(item,index) in regionList"
:key=
"index"
>
<el-checkbox
:indeterminate=
"item.indeterminate"
v-model=
"item.ischeckAll"
<el-checkbox
:indeterminate=
"item.indeterminate"
v-model=
"item.ischeckAll"
@
change=
"handleCheckAllChange(index,item.ID,$event)"
:disabled=
"item.disabled"
>
</el-checkbox>
@
change=
"handleCheckAllChange(index,item.ID,$event)"
:disabled=
"item.disabled"
>
</el-checkbox>
<span
@
click=
"showcity(index,item.ID)"
>
{{
item
.
Name
}}
</span>
<span
@
click=
"showcity(index,item.ID)"
>
{{
item
.
Name
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"item_b"
v-for=
"(item,index) in cityList "
:key=
"index"
>
<div
class=
"item_b"
v-for=
"(item,index) in cityList "
:key=
"index"
>
<el-checkbox
:indeterminate=
"item.indeterminate"
v-model=
"item.ischeckAll"
<el-checkbox
:indeterminate=
"item.indeterminate"
v-model=
"item.ischeckAll"
@
change=
"handleCityAllChange(index,item.ID,$event)"
:disabled=
"item.disabled"
>
</el-checkbox>
@
change=
"handleCityAllChange(index,item.ID,$event)"
:disabled=
"item.disabled"
>
</el-checkbox>
<span
@
click=
"showarea(index,item.ID)"
>
{{
item
.
Name
}}
</span>
<span
@
click=
"showarea(index,item.ID)"
>
{{
item
.
Name
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"item_b"
v-for=
"(item,index) in areaList"
:key=
"index"
v-if=
"areaList[0].Name.indexOf('街道')==-1"
>
<div
class=
"item_b"
v-for=
"(item,index) in areaList"
:key=
"index"
v-if=
"areaList[0].Name.indexOf('街道')==-1"
>
<el-checkbox
v-model=
"item.ischeckAll"
@
change=
"handleareaAllChange(index,item.ID,$event)"
<el-checkbox
v-model=
"item.ischeckAll"
@
change=
"handleareaAllChange(index,item.ID,$event)"
:disabled=
"item.disabled"
></el-checkbox>
:disabled=
"item.disabled"
></el-checkbox>
<span>
{{
item
.
Name
}}
</span>
<span>
{{
item
.
Name
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"regionChoice"
,
name
:
"regionChoice"
,
...
@@ -30,127 +30,139 @@
...
@@ -30,127 +30,139 @@
List
:
Array
,
List
:
Array
,
required
:
true
required
:
true
},
},
data
()
{
data
(){
return
{
return
{
regionList
:
[],
regionList
:[],
msg
:
{
msg
:{
Id
:
1
,},
Id
:
1
,
cityID
:
0
,
},
areaID
:
0
,
cityID
:
0
,
list
:[],
areaID
:
0
,
provinceindex
:
0
,
list
:
[],
cityindex
:
0
,
provinceindex
:
0
,
areaindex
:
0
,
cityindex
:
0
,
areaindex
:
0
,
cityList
:[],
areaList
:[],
cityList
:
[],
loading
:
false
,
areaList
:
[],
getlist
:[],
loading
:
false
,
isban
:
false
,
//是否禁止
getlist
:
[],
isbanlist
:[],
//被禁的数组
isban
:
false
,
//是否禁止
isbanlist
:
[],
//被禁的数组
}
}
},
},
methods
:
{
methods
:
{
getprovince
()
{
getprovince
()
{
let
getlist
=
this
.
getlist
let
getlist
=
this
.
getlist
let
isbanlist
=
this
.
isbanlist
let
isbanlist
=
this
.
isbanlist
this
.
apipost
(
"/api/Destination/GetChildList"
,
this
.
msg
,
res
=>
{
this
.
apipost
(
"/api/Destination/GetChildList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
if
(
getlist
.
length
>
0
)
{
if
(
getlist
.
length
>
0
){
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
){
if
(
getlist
[
j
].
GrandpaID
==
data
[
i
].
ID
||
getlist
[
j
].
ParentID
==
data
[
i
]
if
(
getlist
[
j
].
GrandpaID
==
data
[
i
].
ID
||
getlist
[
j
].
ParentID
==
data
[
i
].
ID
){
//如果有着2个参数再 他的子级没选择完全
.
ID
)
{
//如果有着2个参数再 他的子级没选择完全
data
[
i
].
indeterminate
=
true
;
data
[
i
].
indeterminate
=
true
;
this
.
citylist
(
data
[
i
].
ID
,
i
)
this
.
citylist
(
data
[
i
].
ID
,
i
)
}
}
if
(
getlist
[
j
].
RegionId
==
data
[
i
].
ID
){
if
(
getlist
[
j
].
RegionId
==
data
[
i
].
ID
)
{
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
this
.
getCitylist
(
true
)
this
.
getCitylist
(
true
)
}
}
}
}
}
}
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
)
{
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
){
if
(
isbanlist
[
j
].
GrandpaID
==
data
[
i
].
ID
||
isbanlist
[
j
].
ParentID
==
data
[
i
]
.
ID
)
{
//如果有着2个参数再 他的子级没选择完全
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
){
data
[
i
].
disabled
=
true
;
if
(
isbanlist
[
j
].
GrandpaID
==
data
[
i
].
ID
||
isbanlist
[
j
].
ParentID
==
data
[
i
].
ID
){
//如果有着2个参数再 他的子级没选择完全
this
.
citylist
(
data
[
i
].
ID
,
i
)
data
[
i
].
disabled
=
true
;
this
.
citylist
(
data
[
i
].
ID
,
i
)
}
}
if
(
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
)
{
if
(
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
){
data
[
i
].
disabled
=
true
;
data
[
i
].
disabled
=
true
;
}
}
}
}
}
}
}
}
this
.
regionList
=
data
;
this
.
regionList
=
data
;
this
.
cityID
=
data
[
this
.
provinceindex
].
ID
this
.
cityID
=
data
[
this
.
provinceindex
].
ID
this
.
getCitylist
()
this
.
getCitylist
()
}
else
{
// this.Info(res.data.message);
}
}
})
})
},
},
getCitylist
(
type
=
false
,
type2
=
true
)
{
getCitylist
(
type
=
false
,
type2
=
true
)
{
let
getlist
=
this
.
getlist
let
getlist
=
this
.
getlist
let
isbanlist
=
this
.
isbanlist
let
isbanlist
=
this
.
isbanlist
this
.
apipost
(
"/api/Destination/GetChildList"
,
{
this
.
apipost
(
"/api/Destination/GetChildList"
,{
'Id'
:
this
.
cityID
}
,
res
=>
{
'Id'
:
this
.
cityID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
this
.
areaID
=
data
[
this
.
cityindex
].
ID
this
.
areaID
=
data
[
this
.
cityindex
].
ID
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
type2
==
true
)
{
if
(
type2
==
true
){
if
(
getlist
.
length
>
0
)
{
if
(
getlist
.
length
>
0
){
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
){
if
(
type
==
true
)
{
if
(
type
==
true
){
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
}
else
{
}
else
{
if
(
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
].
RegionId
==
this
.
cityID
)
{
data
[
i
].
ischeckAll
=
true
;
if
(
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
].
RegionId
==
this
.
cityID
){
data
[
i
].
indeterminate
=
false
;
data
[
i
].
ischeckAll
=
true
;
}
else
if
(
getlist
[
j
].
ParentID
==
data
[
i
].
ID
)
{
data
[
i
].
indeterminate
=
false
;
data
[
i
].
ischeckAll
=
false
;
}
else
if
(
getlist
[
j
].
ParentID
==
data
[
i
].
ID
){
data
[
i
].
indeterminate
=
true
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
true
;
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
&&
data
[
i
].
hasOwnProperty
(
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
&&
data
[
i
].
hasOwnProperty
(
'indeterminate'
)
==
false
){
'indeterminate'
)
==
false
)
{
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
}
}
}
}
}
}
}
else
{
if
(
type
==
true
)
{
data
[
i
].
ischeckAll
=
true
;
}
else
{
data
[
i
].
indeterminate
=
false
;
if
(
type
==
true
){
}
else
{
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
}
else
{
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
}
}
}
}
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
)
{
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
){
if
(
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
].
RegionId
==
this
.
cityID
)
{
data
[
i
].
disabled
=
true
;
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
){
}
else
if
(
isbanlist
[
j
].
ParentID
==
data
[
i
].
ID
)
{
if
(
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
].
RegionId
==
this
.
cityID
){
data
[
i
].
disabled
=
true
;
data
[
i
].
disabled
=
true
;
}
else
if
(
isbanlist
[
j
].
ParentID
==
data
[
i
].
ID
){
data
[
i
].
disabled
=
true
;
}
}
}
}
}
}
}
else
{
}
else
{
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
}
}
}
}
let
regionList
=
this
.
regionList
let
regionList
=
this
.
regionList
for
(
let
i
=
0
;
i
<
regionList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
regionList
.
length
;
i
++
)
{
if
(
regionList
[
i
].
ID
==
this
.
cityID
)
{
if
(
regionList
[
i
].
ID
==
this
.
cityID
)
{
regionList
[
i
].
cityList
=
data
;
regionList
[
i
].
cityList
=
data
;
}
}
}
}
...
@@ -161,57 +173,60 @@
...
@@ -161,57 +173,60 @@
}
}
})
})
},
},
getareaIDlist
(
type
=
false
,
type2
=
true
)
{
getareaIDlist
(
type
=
false
,
type2
=
true
)
{
let
getlist
=
this
.
getlist
let
getlist
=
this
.
getlist
let
isbanlist
=
this
.
isbanlist
let
isbanlist
=
this
.
isbanlist
this
.
apipost
(
"/api/Destination/GetChildList"
,
{
this
.
apipost
(
"/api/Destination/GetChildList"
,{
'Id'
:
this
.
areaID
}
,
res
=>
{
'Id'
:
this
.
areaID
this
.
loading
=
false
},
res
=>
{
this
.
loading
=
false
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
type2
==
true
)
{
if
(
type2
==
true
){
if
(
getlist
.
length
>
0
)
{
if
(
getlist
.
length
>
0
){
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
){
if
(
type
==
true
)
{
if
(
type
==
true
){
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
ischeckAll
=
true
;
}
else
{
}
else
{
if
(
getlist
[
j
].
RegionId
==
this
.
cityID
||
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
].
RegionId
==
this
.
areaID
){
data
[
i
].
ischeckAll
=
true
;
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
){
data
[
i
].
ischeckAll
=
false
;
if
(
getlist
[
j
].
RegionId
==
this
.
cityID
||
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
]
.
RegionId
==
this
.
areaID
)
{
data
[
i
].
ischeckAll
=
true
;
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
)
{
data
[
i
].
ischeckAll
=
false
;
}
}
}
}
}
}
}
else
{
if
(
type
==
true
)
{
data
[
i
].
ischeckAll
=
true
;
}
else
{
}
else
{
if
(
type
==
true
){
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
true
;
}
else
{
data
[
i
].
ischeckAll
=
false
;
}
}
}
}
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
)
{
if
(
isbanlist
[
j
].
RegionId
==
this
.
cityID
||
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
]
if
(
isbanlist
[
j
].
RegionId
==
this
.
cityID
||
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
].
RegionId
==
this
.
areaID
){
.
RegionId
==
this
.
areaID
)
{
data
[
i
].
disabled
=
true
;
data
[
i
].
disabled
=
true
;
}
}
}
}
}
}
}
else
{
}
else
{
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
false
;
}
}
}
}
let
regionList
=
this
.
regionList
;
let
regionList
=
this
.
regionList
;
for
(
let
i
=
0
;
i
<
regionList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
regionList
.
length
;
i
++
)
{
if
(
regionList
[
i
].
ID
==
this
.
cityID
)
{
if
(
regionList
[
i
].
ID
==
this
.
cityID
)
{
let
cityList
=
regionList
[
i
].
cityList
;
let
cityList
=
regionList
[
i
].
cityList
;
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
if
(
cityList
[
i
].
ID
==
this
.
areaID
)
{
if
(
cityList
[
i
].
ID
==
this
.
areaID
)
{
cityList
[
i
].
areaList
=
data
;
cityList
[
i
].
areaList
=
data
;
}
}
}
}
...
@@ -223,364 +238,383 @@
...
@@ -223,364 +238,383 @@
}
}
})
})
},
},
handleCheckAllChange
(
index
,
id
,
e
)
{
handleCheckAllChange
(
index
,
id
,
e
)
{
let
regionList
=
this
.
regionList
;
let
regionList
=
this
.
regionList
;
this
.
provinceindex
=
index
;
this
.
provinceindex
=
index
;
this
.
cityID
=
id
;
this
.
cityID
=
id
;
if
(
regionList
[
index
].
indeterminate
==
true
)
{
if
(
regionList
[
index
].
indeterminate
==
true
)
{
regionList
[
index
].
indeterminate
=
false
;
regionList
[
index
].
indeterminate
=
false
;
regionList
[
index
].
ischeckAll
=
true
;
regionList
[
index
].
ischeckAll
=
true
;
}
}
if
(
e
==
false
)
{
if
(
regionList
[
index
].
hasOwnProperty
(
'cityList'
)
==
false
)
{
if
(
e
==
false
){
this
.
getCitylist
(
false
,
false
)
}
else
{
if
(
regionList
[
index
].
hasOwnProperty
(
'cityList'
)
==
false
)
{
this
.
getCitylist
(
false
,
false
)
}
else
{
let
cityList
=
regionList
[
index
].
cityList
;
let
cityList
=
regionList
[
index
].
cityList
;
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
cityList
[
i
].
ischeckAll
=
false
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
){
cityList
[
i
].
ischeckAll
=
false
}
}
this
.
cityList
=
cityList
this
.
cityList
=
cityList
let
areaList
=
this
.
cityList
[
this
.
cityindex
].
areaList
let
areaList
=
this
.
cityList
[
this
.
cityindex
].
areaList
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
areaList
[
i
].
ischeckAll
=
false
areaList
[
i
].
ischeckAll
=
false
}
}
this
.
areaList
=
areaList
this
.
areaList
=
areaList
}
}
}
else
{
}
else
{
if
(
regionList
[
index
].
hasOwnProperty
(
'cityList'
)
==
false
)
{
if
(
regionList
[
index
].
hasOwnProperty
(
'cityList'
)
==
false
)
{
this
.
getCitylist
(
true
)
this
.
getCitylist
(
true
)
}
else
{
}
else
{
let
cityList
=
regionList
[
index
].
cityList
;
let
cityList
=
regionList
[
index
].
cityList
;
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
cityList
[
i
].
ischeckAll
=
true
cityList
[
i
].
ischeckAll
=
true
}
}
this
.
cityList
=
cityList
this
.
cityList
=
cityList
let
areaList
=
this
.
cityList
[
this
.
cityindex
].
areaList
let
areaList
=
this
.
cityList
[
this
.
cityindex
].
areaList
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
areaList
[
i
].
ischeckAll
=
true
areaList
[
i
].
ischeckAll
=
true
}
}
this
.
areaList
=
areaList
this
.
areaList
=
areaList
}
}
}
}
this
.
toParent
()
this
.
toParent
()
},
},
showcity
(
index
,
id
)
{
showcity
(
index
,
id
)
{
let
regionList
=
this
.
regionList
;
let
regionList
=
this
.
regionList
;
this
.
provinceindex
=
index
;
this
.
provinceindex
=
index
;
this
.
cityID
=
id
;
this
.
cityID
=
id
;
if
(
regionList
[
index
].
hasOwnProperty
(
'cityList'
)
==
false
)
{
if
(
regionList
[
index
].
hasOwnProperty
(
'cityList'
)
==
false
)
{
this
.
getCitylist
()
this
.
getCitylist
()
}
else
{
}
else
{
this
.
cityList
=
regionList
[
index
].
cityList
;
this
.
cityList
=
regionList
[
index
].
cityList
;
this
.
areaList
=
this
.
cityList
[
0
].
areaList
;
this
.
areaList
=
this
.
cityList
[
0
].
areaList
;
}
}
},
},
handleCityAllChange
(
index
,
id
,
e
)
{
handleCityAllChange
(
index
,
id
,
e
){
let
regionList
=
this
.
regionList
;
let
regionList
=
this
.
regionList
;
this
.
cityindex
=
index
;
this
.
cityindex
=
index
;
this
.
areaID
=
id
;
this
.
areaID
=
id
;
//取消自己的勾的时候父级的勾改变
//取消自己的勾的时候父级的勾改变
let
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
let
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
if
(
e
==
false
)
{
if
(
e
==
false
)
{
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
hasOwnProperty
(
'areaList'
)
==
false
)
{
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
hasOwnProperty
(
'areaList'
)
==
false
)
{
this
.
getareaIDlist
(
false
,
false
)
this
.
getareaIDlist
(
false
,
false
)
}
else
{
}
else
{
this
.
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
this
.
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
}
}
regionList
[
this
.
provinceindex
].
indeterminate
=
true
;
regionList
[
this
.
provinceindex
].
indeterminate
=
true
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
;
if
(
areaList
!=
undefined
)
{
if
(
areaList
!=
undefined
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
areaList
[
i
].
ischeckAll
=
false
;
areaList
[
i
].
ischeckAll
=
false
;
}
}
regionList
[
this
.
provinceindex
].
cityList
[
index
].
indeterminate
=
false
regionList
[
this
.
provinceindex
].
cityList
[
index
].
indeterminate
=
false
}
}
let
all
=
true
;
let
all
=
true
;
let
cityList
=
this
.
regionList
[
this
.
provinceindex
].
cityList
;
let
cityList
=
this
.
regionList
[
this
.
provinceindex
].
cityList
;
if
(
cityList
!=
undefined
)
{
if
(
cityList
!=
undefined
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
if
(
cityList
[
i
].
ischeckAll
==
true
)
{
if
(
cityList
[
i
].
ischeckAll
==
true
)
{
all
=
false
all
=
false
}
}
}
}
}
}
if
(
all
==
true
)
{
this
.
regionList
[
this
.
provinceindex
].
indeterminate
=
false
if
(
all
==
true
){
this
.
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
this
.
regionList
[
this
.
provinceindex
].
indeterminate
=
false
this
.
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
}
}
if
(
areaList
!=
undefined
)
{
if
(
areaList
!=
undefined
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
areaList
[
i
].
ischeckAll
=
false
areaList
[
i
].
ischeckAll
=
false
}
}
}
}
}
else
{
}
else
{
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
hasOwnProperty
(
'areaList'
)
==
false
)
{
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
hasOwnProperty
(
'areaList'
)
==
false
){
this
.
getareaIDlist
(
true
)
this
.
getareaIDlist
(
true
)
}
else
{
}
else
{
this
.
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
this
.
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
}
}
regionList
[
this
.
provinceindex
].
indeterminate
=
true
;
regionList
[
this
.
provinceindex
].
indeterminate
=
true
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
;
let
all
=
true
;
let
all
=
true
;
let
cityList
=
this
.
regionList
[
this
.
provinceindex
].
cityList
;
let
cityList
=
this
.
regionList
[
this
.
provinceindex
].
cityList
;
if
(
cityList
!=
undefined
)
{
if
(
cityList
!=
undefined
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
if
(
cityList
[
i
].
ischeckAll
==
false
)
{
if
(
cityList
[
i
].
ischeckAll
==
false
)
{
all
=
false
all
=
false
}
}
}
}
}
}
if
(
all
==
true
)
{
this
.
regionList
[
this
.
provinceindex
].
indeterminate
=
false
if
(
all
==
true
){
this
.
regionList
[
this
.
provinceindex
].
ischeckAll
=
true
this
.
regionList
[
this
.
provinceindex
].
indeterminate
=
false
this
.
regionList
[
this
.
provinceindex
].
ischeckAll
=
true
}
}
if
(
areaList
!=
undefined
)
{
if
(
areaList
!=
undefined
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
areaList
[
i
].
ischeckAll
=
true
areaList
[
i
].
ischeckAll
=
true
}
}
}
}
}
}
this
.
toParent
()
this
.
toParent
()
},
},
showarea
(
index
,
id
)
{
showarea
(
index
,
id
)
{
let
regionList
=
this
.
regionList
;
let
regionList
=
this
.
regionList
;
this
.
cityindex
=
index
;
this
.
cityindex
=
index
;
this
.
areaID
=
id
;
this
.
areaID
=
id
;
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
hasOwnProperty
(
'areaList'
)
==
false
)
{
//没有子级的时候加载
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
hasOwnProperty
(
'areaList'
)
==
false
){
//没有子级的时候加载
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
ischeckAll
==
true
)
{
if
(
regionList
[
this
.
provinceindex
].
cityList
[
index
].
ischeckAll
==
true
)
{
this
.
getareaIDlist
(
true
)
this
.
getareaIDlist
(
true
)
}
else
{
}
else
{
this
.
getareaIDlist
()
this
.
getareaIDlist
()
}
}
}
else
{
}
else
{
this
.
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
this
.
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
index
].
areaList
;
}
}
},
},
handleareaAllChange
(
index
,
id
,
e
)
{
handleareaAllChange
(
index
,
id
,
e
)
{
let
regionList
=
this
.
regionList
;
let
regionList
=
this
.
regionList
;
this
.
areaindex
=
index
;
this
.
areaindex
=
index
;
let
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
areaList
;
let
areaList
=
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
areaList
;
let
cityList
=
regionList
[
this
.
provinceindex
].
cityList
;
let
cityList
=
regionList
[
this
.
provinceindex
].
cityList
;
if
(
e
==
false
)
{
if
(
e
==
false
){
regionList
[
this
.
provinceindex
].
indeterminate
=
true
regionList
[
this
.
provinceindex
].
indeterminate
=
true
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
true
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
true
let
areaAll
=
true
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
let
areaAll
=
true
if
(
areaList
[
i
].
ischeckAll
==
true
)
{
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
){
areaAll
=
false
if
(
areaList
[
i
].
ischeckAll
==
true
){
areaAll
=
false
}
}
}
}
if
(
areaAll
==
true
)
{
if
(
areaAll
==
true
){
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
ischeckAll
=
false
;
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
ischeckAll
=
false
;
let
provinceAll
=
true
;
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
let
provinceAll
=
true
;
if
(
cityList
[
i
].
ischeckAll
==
true
||
cityList
[
i
].
indeterminate
==
true
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
){
provinceAll
=
false
if
(
cityList
[
i
].
ischeckAll
==
true
||
cityList
[
i
].
indeterminate
==
true
){
provinceAll
=
false
}
}
}
}
if
(
provinceAll
==
true
)
{
if
(
provinceAll
==
true
)
{
regionList
[
this
.
provinceindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
false
;
}
}
}
}
}
else
{
regionList
[
this
.
provinceindex
].
indeterminate
=
true
}
else
{
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
true
regionList
[
this
.
provinceindex
].
indeterminate
=
true
let
areaAll
=
true
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
true
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
)
{
if
(
areaList
[
i
].
ischeckAll
==
false
)
{
areaAll
=
false
let
areaAll
=
true
for
(
let
i
=
0
;
i
<
areaList
.
length
;
i
++
){
if
(
areaList
[
i
].
ischeckAll
==
false
){
areaAll
=
false
}
}
}
}
if
(
areaAll
==
true
)
{
if
(
areaAll
==
true
)
{
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
ischeckAll
=
true
;
regionList
[
this
.
provinceindex
].
cityList
[
this
.
cityindex
].
ischeckAll
=
true
;
let
provinceAll
=
true
;
let
provinceAll
=
true
;
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
cityList
.
length
;
i
++
)
{
if
(
cityList
[
i
].
ischeckAll
==
false
||
cityList
[
i
].
indeterminate
==
true
)
{
if
(
cityList
[
i
].
ischeckAll
==
false
||
cityList
[
i
].
indeterminate
==
true
)
{
provinceAll
=
false
provinceAll
=
false
}
}
}
}
if
(
provinceAll
==
true
)
{
if
(
provinceAll
==
true
)
{
regionList
[
this
.
provinceindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
indeterminate
=
false
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
true
;
regionList
[
this
.
provinceindex
].
ischeckAll
=
true
;
}
}
}
}
}
}
this
.
toParent
()
this
.
toParent
()
},
},
toParent
()
{
//传值给父组件
toParent
(){
//传值给父组件
let
List
=
[];
let
List
=
[];
let
data
=
this
.
regionList
let
data
=
this
.
regionList
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
data
[
i
].
ischeckAll
==
true
&&
data
[
i
].
indeterminate
==
false
&&
(
data
[
i
].
hasOwnProperty
(
'disabled'
)
==
if
(
data
[
i
].
ischeckAll
==
true
&&
data
[
i
].
indeterminate
==
false
&&
(
data
[
i
].
hasOwnProperty
(
'disabled'
)
==
false
||
data
[
i
].
disabled
==
false
)){
//全选的情况 只穿省的ID
false
||
data
[
i
].
disabled
==
false
))
{
//全选的情况 只穿省的ID
List
.
push
({
'ID'
:
0
,
'RegionId'
:
data
[
i
].
ID
,
"RegionName"
:
data
[
i
].
Name
,
'GrandpaID'
:
0
,
'ParentID'
:
0
})
List
.
push
({
}
'ID'
:
0
,
if
(
data
[
i
].
indeterminate
==
true
){
//传市的ID
'RegionId'
:
data
[
i
].
ID
,
"RegionName"
:
data
[
i
].
Name
,
if
(
data
[
i
].
hasOwnProperty
(
'cityList'
)
==
true
){
'GrandpaID'
:
0
,
'ParentID'
:
0
})
}
if
(
data
[
i
].
indeterminate
==
true
)
{
//传市的ID
if
(
data
[
i
].
hasOwnProperty
(
'cityList'
)
==
true
)
{
let
citylist
=
data
[
i
].
cityList
;
let
citylist
=
data
[
i
].
cityList
;
for
(
let
j
=
0
;
j
<
citylist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
citylist
.
length
;
j
++
){
if
(
citylist
[
j
].
ischeckAll
==
true
&&
citylist
[
j
].
indeterminate
==
false
&&
(
citylist
[
j
].
hasOwnProperty
(
if
(
citylist
[
j
].
ischeckAll
==
true
&&
citylist
[
j
].
indeterminate
==
false
&&
(
citylist
[
j
].
hasOwnProperty
(
'disabled'
)
==
false
||
citylist
[
j
].
disabled
==
false
)){
'disabled'
)
==
false
||
citylist
[
j
].
disabled
==
false
))
{
List
.
push
({
'ID'
:
0
,
'RegionId'
:
citylist
[
j
].
ID
,
"RegionName"
:
citylist
[
j
].
Name
,
'GrandpaID'
:
0
,
'ParentID'
:
data
[
i
].
ID
})
List
.
push
({
'ID'
:
0
,
'RegionId'
:
citylist
[
j
].
ID
,
"RegionName"
:
citylist
[
j
].
Name
,
'GrandpaID'
:
0
,
'ParentID'
:
data
[
i
].
ID
})
}
}
if
(
citylist
[
j
].
indeterminate
==
true
)
{
if
(
citylist
[
j
].
indeterminate
==
true
)
{
if
(
citylist
[
j
].
hasOwnProperty
(
'areaList'
)
==
true
)
{
if
(
citylist
[
j
].
hasOwnProperty
(
'areaList'
)
==
true
)
{
let
areaList
=
citylist
[
j
].
areaList
;
let
areaList
=
citylist
[
j
].
areaList
;
for
(
let
z
=
0
;
z
<
areaList
.
length
;
z
++
)
{
for
(
let
z
=
0
;
z
<
areaList
.
length
;
z
++
){
if
(
areaList
[
z
].
ischeckAll
==
true
&&
(
areaList
[
z
].
hasOwnProperty
(
'disabled'
)
==
false
||
if
(
areaList
[
z
].
ischeckAll
==
true
&&
(
areaList
[
z
].
hasOwnProperty
(
'disabled'
)
==
false
||
areaList
[
z
].
disabled
==
false
)){
areaList
[
z
].
disabled
==
false
))
{
List
.
push
({
'ID'
:
0
,
'RegionId'
:
areaList
[
z
].
ID
,
"RegionName"
:
areaList
[
z
].
Name
,
'GrandpaID'
:
data
[
i
].
ID
,
'ParentID'
:
citylist
[
j
].
ID
})
List
.
push
({
'ID'
:
0
,
'RegionId'
:
areaList
[
z
].
ID
,
"RegionName"
:
areaList
[
z
].
Name
,
'GrandpaID'
:
data
[
i
].
ID
,
'ParentID'
:
citylist
[
j
].
ID
})
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
this
.
$emit
(
'event1'
,
List
)
this
.
$emit
(
'event1'
,
List
)
},
},
citylist
(
Id
,
index
)
{
citylist
(
Id
,
index
){
let
getlist
=
this
.
getlist
;
let
getlist
=
this
.
getlist
;
let
isbanlist
=
this
.
isbanlist
;
let
isbanlist
=
this
.
isbanlist
;
let
msg
=
{
let
msg
=
{
'Id'
:
Id
}
'Id'
:
Id
this
.
apipost
(
"/api/Destination/GetChildList"
,
msg
,
res
=>
{
}
this
.
apipost
(
"/api/Destination/GetChildList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
getlist
.
length
>
0
)
{
if
(
getlist
.
length
>
0
){
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
){
if
(
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
].
RegionId
==
this
.
regionList
[
index
].
ID
)
{
data
[
i
].
ischeckAll
=
true
;
if
(
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
].
RegionId
==
this
.
regionList
[
index
].
ID
){
data
[
i
].
indeterminate
=
false
;
data
[
i
].
ischeckAll
=
true
;
this
.
arealist
(
data
[
i
].
ID
,
i
,
index
)
data
[
i
].
indeterminate
=
false
;
}
else
if
(
getlist
[
j
].
ParentID
==
data
[
i
].
ID
)
{
this
.
arealist
(
data
[
i
].
ID
,
i
,
index
)
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
true
;
}
else
if
(
getlist
[
j
].
ParentID
==
data
[
i
].
ID
){
this
.
arealist
(
data
[
i
].
ID
,
i
,
index
)
data
[
i
].
ischeckAll
=
false
;
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
&&
data
[
i
].
hasOwnProperty
(
data
[
i
].
indeterminate
=
true
;
'indeterminate'
)
==
false
)
{
this
.
arealist
(
data
[
i
].
ID
,
i
,
index
)
data
[
i
].
ischeckAll
=
false
;
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
&&
data
[
i
].
hasOwnProperty
(
'indeterminate'
)
==
false
){
data
[
i
].
indeterminate
=
false
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
}
}
}
}
}
else
{
}
else
{
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
indeterminate
=
false
;
data
[
i
].
indeterminate
=
false
;
}
}
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
){
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
){
if
(
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
].
RegionId
==
this
.
cityID
)
{
if
(
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
].
RegionId
==
this
.
cityID
){
data
[
i
].
disabled
=
true
;
data
[
i
].
disabled
=
true
;
}
else
if
(
isbanlist
[
j
].
ParentID
==
data
[
i
].
ID
)
{
data
[
i
].
disabled
=
true
;
}
else
if
(
isbanlist
[
j
].
ParentID
==
data
[
i
].
ID
){
data
[
i
].
disabled
=
true
;
}
}
}
}
}
}
}
}
this
.
regionList
[
index
].
cityList
=
data
this
.
regionList
[
index
].
cityList
=
data
}
else
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
this
.
Info
(
res
.
data
.
message
);
}
}
})
})
},
},
arealist
(
Id
,
index
,
Pindex
)
{
arealist
(
Id
,
index
,
Pindex
){
let
getlist
=
this
.
getlist
;
let
getlist
=
this
.
getlist
;
let
isbanlist
=
this
.
isbanlist
;
let
isbanlist
=
this
.
isbanlist
;
let
msg
=
{
let
msg
=
{
'Id'
:
Id
}
'Id'
:
Id
this
.
apipost
(
"/api/Destination/GetChildList"
,
msg
,
res
=>
{
}
this
.
apipost
(
"/api/Destination/GetChildList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
getlist
.
length
>
0
)
{
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
)
{
if
(
getlist
.
length
>
0
){
if
(
getlist
[
j
].
RegionId
==
this
.
regionList
[
Pindex
].
ID
||
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
for
(
let
j
=
0
;
j
<
getlist
.
length
;
j
++
){
getlist
[
j
].
RegionId
==
this
.
regionList
[
Pindex
].
cityList
[
index
].
ID
)
{
data
[
i
].
ischeckAll
=
true
;
if
(
getlist
[
j
].
RegionId
==
this
.
regionList
[
Pindex
].
ID
||
getlist
[
j
].
RegionId
==
data
[
i
].
ID
||
getlist
[
j
].
RegionId
==
this
.
regionList
[
Pindex
].
cityList
[
index
].
ID
){
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
)
{
data
[
i
].
ischeckAll
=
true
;
data
[
i
].
ischeckAll
=
false
;
}
else
if
(
data
[
i
].
hasOwnProperty
(
'ischeckAll'
)
==
false
){
data
[
i
].
ischeckAll
=
false
;
}
}
}
}
}
else
{
}
else
{
data
[
i
].
ischeckAll
=
false
;
data
[
i
].
ischeckAll
=
false
;
}
}
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
)
{
if
(
isbanlist
.
length
>
0
&&
this
.
isban
==
true
)
{
if
(
isbanlist
[
j
].
RegionId
==
this
.
cityID
||
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
]
for
(
let
j
=
0
;
j
<
isbanlist
.
length
;
j
++
){
.
RegionId
==
this
.
areaID
)
{
if
(
isbanlist
[
j
].
RegionId
==
this
.
cityID
||
isbanlist
[
j
].
RegionId
==
data
[
i
].
ID
||
isbanlist
[
j
].
RegionId
==
this
.
areaID
)
{
data
[
i
].
disabled
=
true
;
data
[
i
].
disabled
=
true
;
}
}
}
}
}
}
}
}
this
.
regionList
[
Pindex
].
cityList
[
index
].
areaList
=
data
this
.
regionList
[
Pindex
].
cityList
[
index
].
areaList
=
data
}
else
{
}
else
{
this
.
Info
(
res
.
data
.
message
);
this
.
Info
(
res
.
data
.
message
);
}
}
})
})
},
},
Receive
(
val
,
val2
=
[],
isban
=
false
)
{
Receive
(
val
,
val2
=
[],
isban
=
false
)
{
this
.
regionList
=
[];
this
.
regionList
=
[];
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
provinceindex
=
0
;
this
.
provinceindex
=
0
;
this
.
cityindex
=
0
;
this
.
cityindex
=
0
;
this
.
areaindex
=
0
;
this
.
areaindex
=
0
;
this
.
cityID
=
0
;
this
.
cityID
=
0
;
this
.
areaID
=
0
;
this
.
areaID
=
0
;
this
.
getlist
=
val
;
this
.
getlist
=
val
;
this
.
isbanlist
=
val2
;
this
.
isbanlist
=
val2
;
this
.
isban
=
isban
this
.
isban
=
isban
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getprovince
()
this
.
getprovince
()
},
2000
)
},
2000
)
}
}
},
},
mounted
()
{
mounted
(){
// this.getprovince()
},
},
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.regionChoice
{
.regionChoice
{
width
:
880px
;
width
:
880px
;
height
:
400px
;
height
:
400px
;
/*margin-left: 100px;*/
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.regionChoice
.item
{
.regionChoice
.item
{
overflow-y
:
auto
;
overflow-y
:
auto
;
border
:
1px
solid
#EBEEF5
;
border
:
1px
solid
#EBEEF5
;
border-radius
:
4px
;
border-radius
:
4px
;
...
@@ -589,15 +623,12 @@
...
@@ -589,15 +623,12 @@
height
:
400px
;
height
:
400px
;
}
}
.regionChoice
.item_b
{
.regionChoice
.item_b
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
}
}
.regionChoice
.item_b
span
{
.regionChoice
.item_b
span
{
margin-left
:
15px
;
margin-left
:
15px
;
}
}
</
style
>
</
style
>
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