Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 493a80d0
authored
Apr 19, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
直辖市回显修改
1 parent
165232c6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
src/components/province-city/index.vue
src/views/baseInfo/editInfo.vue
src/views/baseInfo/selectBrand.vue
src/components/province-city/index.vue
View file @
493a80d
<
template
>
<
template
>
<div>
<div>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
label-width=
"80px"
inline=
"true"
class=
"province"
>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
label-width=
"80px"
inline=
"true"
class=
"province"
>
<el-select
v-model=
"provinceForm.provinceName"
placeholder=
"选择省份"
@
change=
"selectProvince"
class=
"select-padding"
>
<el-select
v-model=
"provinceForm.provinceName"
clearable
placeholder=
"选择省份"
@
change=
"selectProvince"
class=
"select-padding"
>
<el-option
v-for=
"item in AllData"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectProvince(item)"
></el-option>
<el-option
v-for=
"item in AllData"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectProvince(item)"
></el-option>
</el-select>
</el-select>
<el-select
v-model=
"provinceForm.cityName"
placeholder=
"选择您所在的市"
style=
"width: 250px"
@
change=
"selectCity"
class=
"select-padding"
>
<el-select
v-model=
"provinceForm.cityName"
clearable
placeholder=
"选择您所在的市"
style=
"width: 250px"
@
change=
"selectCity"
class=
"select-padding"
>
<el-option
v-for=
"item in cityList"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectCity(item)"
></el-option>
<el-option
v-for=
"item in cityList"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectCity(item)"
></el-option>
</el-select>
</el-select>
</el-form>
</el-form>
...
@@ -61,13 +61,6 @@ export default {
...
@@ -61,13 +61,6 @@ export default {
var
districtSearch
=
new
AMap
.
DistrictSearch
(
opts
)
var
districtSearch
=
new
AMap
.
DistrictSearch
(
opts
)
districtSearch
.
search
(
'中国'
,
(
status
,
result
)
=>
{
districtSearch
.
search
(
'中国'
,
(
status
,
result
)
=>
{
this
.
AllData
=
result
.
districtList
[
0
].
districtList
this
.
AllData
=
result
.
districtList
[
0
].
districtList
this
.
AllData
.
unshift
({
adcode
:
''
,
name
:
'全部'
})
})
})
console
.
log
(
this
.
AllData
)
if
(
provinceName
)
{
if
(
provinceName
)
{
this
.
AllData
.
map
(
item
=>
{
this
.
AllData
.
map
(
item
=>
{
if
(
item
.
name
.
indexOf
(
provinceName
)
!=
-
1
)
{
if
(
item
.
name
.
indexOf
(
provinceName
)
!=
-
1
)
{
...
@@ -85,6 +78,8 @@ export default {
...
@@ -85,6 +78,8 @@ export default {
}
}
})
})
}
}
})
})
}
}
}
}
}
}
...
...
src/views/baseInfo/editInfo.vue
View file @
493a80d
...
@@ -85,7 +85,7 @@ export default {
...
@@ -85,7 +85,7 @@ export default {
mounted
()
{
mounted
()
{
// this.brandList()
// this.brandList()
this
.
getUserInfo
()
this
.
getUserInfo
()
this
.
$refs
.
provinceForm
.
mapInit
()
//
this.$refs.provinceForm.mapInit()
},
},
methods
:
{
methods
:
{
async
brandList
()
{
async
brandList
()
{
...
@@ -132,7 +132,7 @@ export default {
...
@@ -132,7 +132,7 @@ export default {
this
.
infoForm
.
businessType
=
businessType
.
map
(
item
=>
(
item
=
parseInt
(
item
)))
this
.
infoForm
.
businessType
=
businessType
.
map
(
item
=>
(
item
=
parseInt
(
item
)))
}
}
// 省市回显
// 省市回显
this
.
$refs
.
provinceForm
.
i
nit
(
this
.
infoForm
.
provinceName
,
this
.
infoForm
.
cityName
)
this
.
$refs
.
provinceForm
.
mapI
nit
(
this
.
infoForm
.
provinceName
,
this
.
infoForm
.
cityName
)
if
(
!
this
.
infoForm
.
merchantBrandMain
)
{
if
(
!
this
.
infoForm
.
merchantBrandMain
)
{
this
.
infoForm
.
merchantBrandMain
=
[]
this
.
infoForm
.
merchantBrandMain
=
[]
}
else
{
}
else
{
...
...
src/views/baseInfo/selectBrand.vue
View file @
493a80d
...
@@ -186,7 +186,7 @@ export default {
...
@@ -186,7 +186,7 @@ export default {
//过滤
//过滤
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
if
(
!
value
)
return
true
return
data
.
name
.
indexOf
(
value
)
!==
-
1
return
data
.
label
.
indexOf
(
value
)
!==
-
1
},
},
// 显示隐藏
// 显示隐藏
switchBrand
()
{
switchBrand
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment