Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-merchant-data
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 7be6e49d
authored
Mar 20, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
合并
2 parents
ed00357d
816b4831
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
48 deletions
src/views/customer/businessManagement/index.vue
src/views/customer/components/src/cityArea.vue
src/views/customer/businessManagement/index.vue
View file @
7be6e49
...
...
@@ -134,11 +134,7 @@ export default {
type
:
'text'
,
label
:
'详情'
,
callback
:
(
index
,
rows
)
=>
{
// const url = encodeURI(`./businessDetails.html?id=${rows[index].businessId}&name=${rows[index].businessName}`)
// location.href = url
const
url
=
jumpLink
(
'./businessDetails.html?'
,
{
id
:
rows
[
index
].
businessId
,
name
:
rows
[
index
].
businessName
},
_this
)
this
.
$parent
.
to
([
'商户数据平台'
,
'商户数据平台'
,
'商户数据平台'
,
'业务管理'
,
'商户详情'
],
{
id
:
rows
[
index
].
businessId
,
name
:
rows
[
index
].
businessName
})
// console.log(url)
}
}
]
...
...
src/views/customer/components/src/cityArea.vue
View file @
7be6e49
<
template
>
<div>
<gl-select
style=
"width: 20%;margin-right: 20px"
v-model=
"province"
@
click=
"selectProvince"
@
focus=
"selectProvince"
placeholder=
"请选择省"
>
<gl-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
<gl-select
style=
"width: 20%;margin-right: 20px"
v-model=
"province"
placeholder=
"请选择市"
>
<gl-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
<gl-select
style=
"width: 20%"
v-model=
"province"
placeholder=
"请选择区"
>
<gl-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
</div>
<!--
<div>
-->
<gl-row
style=
"margin-left: 0"
:gutter=
"10"
>
<gl-col
:span=
"8"
>
<gl-select
filterable
clearable
v-model=
"province"
@
focus=
"selectProvince"
placeholder=
"请选择省"
>
<gl-option
v-for=
"(item, k) in provinceList"
:key=
"k"
:label=
"item.provinceName"
:value=
"item.provinceId"
>
</gl-option>
</gl-select>
</gl-col>
<gl-col
:span=
"8"
>
<gl-select
filterable
clearable
v-model=
"province"
placeholder=
"请选择市"
>
<gl-option
v-for=
"item in cityList"
:key=
"item.cityId"
:label=
"item.cityName"
:value=
"item.cityId"
>
</gl-option>
</gl-select>
</gl-col>
<gl-col
:span=
"8"
>
<gl-select
filterable
clearable
v-model=
"province"
placeholder=
"请选择区"
>
<gl-option
v-for=
"item in areaList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</gl-option>
</gl-select>
</gl-col>
</gl-row>
<!--
</div>
-->
</
template
>
<
script
>
...
...
@@ -32,32 +40,47 @@ export default {
name
:
'CityArea'
,
data
()
{
return
{
options
:
[
{
value
:
'选项1'
,
label
:
'黄金糕黄金糕黄金糕黄金糕'
},
{
value
:
'选项2'
,
label
:
'双皮奶'
},
{
value
:
'选项3'
,
label
:
'蚵仔煎'
},
{
value
:
'选项4'
,
label
:
'龙须面'
},
{
value
:
'选项5'
,
label
:
'北京烤鸭'
}
],
AllData
:
[],
provinceList
:
[],
cityList
:
[],
areaList
:
[],
province
:
''
,
// 省值
city
:
''
,
// 市值
area
:
''
// 区值
}
},
mounted
()
{
const
URL
=
' http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/area_config'
)
=>
{
return
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
()
xhr
.
onreadystatechange
=
()
=>
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
resolve
({
'config'
:
JSON
.
parse
(
xhr
.
responseText
)
})
}
}
xhr
.
open
(
'GET'
,
url
)
xhr
.
send
()
})
}
getConfig
().
then
(
data
=>
{
console
.
log
(
data
.
config
)
this
.
AllData
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
config
.
provinceInfoList
))
this
.
AllData
.
forEach
(
element
=>
{
this
.
provinceList
.
push
({
provinceId
:
element
.
provinceId
,
provinceName
:
element
.
provinceName
})
})
// this.getCity()
})
},
methods
:
{
selectProvince
()
{
console
.
log
(
'我选择了省'
)
},
// 获取市
getCity
(
index
)
{
this
.
AllData
[
0
].
forEach
(
element
=>
{
this
.
cityList
.
push
({
cityId
:
element
.
cityId
,
cityName
:
element
.
cityName
})
})
}
}
}
...
...
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