Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shuchengMiniPro
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-frontend
shuchengMiniPro
Commits
7725797f
Commit
7725797f
authored
Dec 20, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 列表页查询参数修改
parent
d6a2e86f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
22 deletions
+59
-22
index.js
src/api/url/index.js
+2
-0
index.vue
src/pages/entryPark/index.vue
+57
-22
No files found.
src/api/url/index.js
View file @
7725797f
...
...
@@ -30,4 +30,6 @@ export default {
queryFiltersList
:
'/postcard/api/sysDictData/listByCodes'
,
/** 登录 */
login
:
'/postcard/user/login'
,
/** 主导产业 */
queryIndustryList
:
'/postcard/api/parkInfo/v1.0/industryList'
,
}
src/pages/entryPark/index.vue
View file @
7725797f
...
...
@@ -49,6 +49,7 @@
</div>
</div>
</div>
<div
v-show=
"activeBar !== 1"
>
<dropdown-vue
ref=
"dropDown"
:menuList=
"$u.deepClone(menuList[activeBar])"
...
...
@@ -58,8 +59,9 @@
:top=
"166"
></dropdown-vue>
</div>
<template
v-if=
"mode === 'list'"
>
<view
class=
"tab-contant"
>
</div>
<view
v-if=
"mode === 'list'"
class=
"tab-contant content"
:class=
"
{'no-filter': activeBar === 1}">
<view
class=
"media-card"
v-for=
"cardInfo in dataList"
...
...
@@ -70,7 +72,6 @@
<land-card-vue
:key-words=
"keyword"
:detail=
"cardInfo"
v-if=
"activeBar == 1"
></land-card-vue>
<carrier-card-vue
:key-words=
"keyword"
:detail=
"cardInfo"
v-if=
"activeBar == 2"
></carrier-card-vue>
</view>
</view>
<u-loadmore
v-if=
"dataList.length && (!haveMore || isLoading)"
:status=
"isLoading ? 'loading' : 'nomore'"
...
...
@@ -93,8 +94,8 @@
marginTop=
"120"
>
</u-empty>
</
template
>
<div
v-else
class=
""
>
</
view
>
<div
v-else
class=
"
content
"
>
<map
id=
"mapId"
@
markertap=
"handleMarkerClick"
@
callouttap=
"handleMarkerClick"
:scale=
'10'
style=
"width: 100%;height: calc(100vh - 246rpx)"
latitude=
"31.464086"
longitude=
"116.944909"
class=
"map"
:markers=
"markers"
>
</map>
<div
v-if=
"activeInfo.id"
:key=
"activeInfo.id"
@
click=
"toDetail(activeInfo)"
style=
"position: fixed;padding: 0 30rpx;bottom: 30rpx;width: 100vw;z-index: 999;box-sizing: border-box;"
>
...
...
@@ -134,7 +135,7 @@ export default {
[
{
id
:
1
,
name
:
"
级别
"
,
name
:
"
主导产业
"
,
isMultiple
:
false
,
//是否多选
showType
:
3
,
//下拉框类型(1、2、3、4)
},
...
...
@@ -147,18 +148,18 @@ export default {
},
],
[
{
id
:
1
,
name
:
"土地类型"
,
isMultiple
:
false
,
//是否多选
showType
:
3
,
//下拉框类型(1、2、3、4)
},
{
id
:
2
,
name
:
"面积"
,
isMultiple
:
false
,
//是否多选
showType
:
3
,
//下拉框类型(1、2、3、4)
},
//
{
//
id: 1,
//
name: "土地类型",
//
isMultiple: false, //是否多选
//
showType: 3, //下拉框类型(1、2、3、4)
//
},
//
{
//
id: 2,
//
name: "面积",
//
isMultiple: false, //是否多选
//
showType: 3, //下拉框类型(1、2、3、4)
//
},
],
[
{
...
...
@@ -171,7 +172,7 @@ export default {
id
:
2
,
name
:
"建筑结构"
,
isMultiple
:
false
,
//是否多选
showType
:
1
,
//下拉框类型(1、2、3、4)
showType
:
3
,
//下拉框类型(1、2、3、4)
},
{
id
:
3
,
...
...
@@ -206,10 +207,15 @@ export default {
},
mounted
()
{
this
.
getList
();
store
.
dispatch
(
'getFilterEnum'
).
then
(()
=>
{
this
.
initFilterList
();
},
methods
:
{
initFilterList
()
{
const
list
=
[
this
.
initIndustryList
(),
store
.
dispatch
(
'getFilterEnum'
)];
Promise
.
all
(
list
).
then
(([
industryList
])
=>
{
this
.
filterList
=
[
{
itemList1
:
this
.
filterEnum
.
park_level
,
itemList1
:
industryList
.
map
((
i
)
=>
({
dictLabel
:
i
,
dictValue
:
i
,
dictType
:
'primaryIndustry'
}))
,
itemList2
:
this
.
filterEnum
.
park_area
,
},
{
...
...
@@ -224,7 +230,30 @@ export default {
]
})
},
methods
:
{
initIndustryList
()
{
return
this
.
$fetch
({
url
:
API
.
queryIndustryList
,
methods
:
"get"
,
data
:
{},
});
}
,
handleParams
(
params
)
{
const
config
=
{
park_area
:
'parkArea'
,
carrier_type
:
'carrierType'
,
carrier_construction
:
'carrierConstruction'
,
carrier_area
:
'carrierArea'
,
}
const
result
=
Object
.
entries
(
params
).
map
(([
key
,
value
])
=>
{
const
target
=
config
[
key
];
if
(
target
)
{
return
[
target
,
value
];
}
else
{
return
[
key
,
value
];
}
});
return
Object
.
fromEntries
(
result
);
},
getList
()
{
if
(
!
this
.
haveMore
)
return
;
this
.
isLoading
=
true
;
...
...
@@ -241,6 +270,7 @@ export default {
}
}
searchCondition
.
name
=
this
.
searchKey
searchCondition
=
this
.
handleParams
(
searchCondition
);
this
.
$fetch
({
url
:
this
.
api
,
methods
:
"post"
,
...
...
@@ -419,7 +449,12 @@ export default {
}
.tab-contant {
padding: 20rpx 30rpx;
}
.content {
padding-top: 250rpx + 20rpx;
&.no-filter {
padding-top: 250rpx + 20rpx - 80rpx;
}
}
.media-card {
margin-bottom: 15rpx;
...
...
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