Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
1d06f28d
Commit
1d06f28d
authored
Sep 26, 2022
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地区选择框修改
parent
38fbbb9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
common/common.ts
+3
-2
pages/housePurchase/planningParameters.vue
+3
-2
No files found.
common/common.ts
View file @
1d06f28d
...
@@ -10,13 +10,13 @@ export default {
...
@@ -10,13 +10,13 @@ export default {
const
model
=
{
// 把后端返回过来的数据里面的键给替换成我想要的键
const
model
=
{
// 把后端返回过来的数据里面的键给替换成我想要的键
source
:
x
,
source
:
x
,
text
:
x
.
provinceName
?
x
.
provinceName
:
x
.
cityName
,
text
:
x
.
provinceName
?
x
.
provinceName
:
x
.
cityName
,
value
:
x
.
provinceId
?
x
.
provinceId
:
x
.
cityId
,
value
:
x
.
cityId
?
x
.
cityId
:
x
.
provinceId
,
};
};
const
children
=
this
.
action
(
x
.
citys
);
// 子级数据
const
children
=
this
.
action
(
x
.
citys
);
// 子级数据
if
(
children
){
// 一直往下循环查找有没有children这个键,如果有就直接添加一个子级字段名,这个字段名就是存子级数据
if
(
children
){
// 一直往下循环查找有没有children这个键,如果有就直接添加一个子级字段名,这个字段名就是存子级数据
model
.
children
=
children
;
model
.
children
=
children
;
}
}
return
model
;
// 返回这个数据
return
model
;
// 返回这个数据
});
});
}
}
}
}
\ No newline at end of file
pages/housePurchase/planningParameters.vue
View file @
1d06f28d
...
@@ -58,10 +58,10 @@
...
@@ -58,10 +58,10 @@
methods
:{
methods
:{
onchange
(
e
)
{
onchange
(
e
)
{
const
value
=
e
.
detail
.
value
const
value
=
e
.
detail
.
value
//
console.log(e)
console
.
log
(
e
)
},
},
onnodeclick
(
node
)
{
onnodeclick
(
node
)
{
//
console.log(node)
console
.
log
(
node
)
},
},
resetParams
(){
resetParams
(){
this
.
editParamLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
paramsLists
))
this
.
editParamLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
paramsLists
))
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
[
'success'
]){
if
(
res
[
'success'
]){
this
.
provinceList
=
common
.
action
(
res
[
'data'
][
'provinces'
]);
this
.
provinceList
=
common
.
action
(
res
[
'data'
][
'provinces'
]);
console
.
log
(
this
.
provinceList
)
}
}
})
})
},
},
...
...
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