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
d419b5a6
Commit
d419b5a6
authored
Dec 20, 2023
by
shilei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加地图模式
parent
ac5ba8cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
4 deletions
+74
-4
item3.vue
src/components/dropdown/item3.vue
+7
-2
index.vue
src/pages/entryPark/index.vue
+67
-2
No files found.
src/components/dropdown/item3.vue
View file @
d419b5a6
...
@@ -10,12 +10,15 @@
...
@@ -10,12 +10,15 @@
:style=
"item.chooseState ? 'background: #F2F2F2' : ''"
:style=
"item.chooseState ? 'background: #F2F2F2' : ''"
>
>
<view
class=
"item-right-list-name"
>
{{
item
.
dictLabel
}}
</view>
<view
class=
"item-right-list-name"
>
{{
item
.
dictLabel
}}
</view>
<image
<div
v-if=
"item.chooseState"
class=
"item-right-list-img"
>
<u-icon
name=
"checkmark"
color=
"#4374EF"
></u-icon>
</div>
<!--
<image
v-if=
"item.chooseState"
v-if=
"item.chooseState"
class=
"item-right-list-img"
class=
"item-right-list-img"
src=
"/static/dropDown/select.png"
src=
"/static/dropDown/select.png"
>
>
</image>
</image>
-->
</view>
</view>
</scroll-view>
</scroll-view>
<view
class=
"btn-list"
>
<view
class=
"btn-list"
>
...
@@ -176,6 +179,8 @@ export default {
...
@@ -176,6 +179,8 @@ export default {
right
:
22rpx
;
right
:
22rpx
;
width
:
80rpx
;
width
:
80rpx
;
height
:
80rpx
;
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
}
}
}
}
}
}
...
...
src/pages/entryPark/index.vue
View file @
d419b5a6
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
flex-shrink: 0;
flex-shrink: 0;
"
"
class=
"flex align-center"
class=
"flex align-center"
@
click=
"changeMode"
>
>
<image
<image
src=
"/static/img/icon-exchange.png"
src=
"/static/img/icon-exchange.png"
...
@@ -56,6 +57,7 @@
...
@@ -56,6 +57,7 @@
:top=
"166"
:top=
"166"
></dropdown-vue>
></dropdown-vue>
<div
style=
"height: 246rpx"
></div>
<div
style=
"height: 246rpx"
></div>
<div
v-if=
"mode === 'list'"
>
<view
class=
"tab-contant"
>
<view
class=
"tab-contant"
>
<view
<view
class=
"media-card"
class=
"media-card"
...
@@ -68,9 +70,20 @@
...
@@ -68,9 +70,20 @@
<carrier-card-vue
:key-words=
"keyword"
:detail=
"cardInfo"
v-if=
"activeBar == 2"
></carrier-card-vue>
<carrier-card-vue
:key-words=
"keyword"
:detail=
"cardInfo"
v-if=
"activeBar == 2"
></carrier-card-vue>
</view>
</view>
</view>
</view>
<u-loadmore
v-if=
"dataList.length && (!haveMore || isLoading)"
:status=
"isLoading ? 'loading' : 'nomore'"
nomore-text=
"没有更多了"
loading-text=
"加载数据中"
marginTop=
"30"
marginBottom=
"30"
fontSize=
"20rpx"
color=
"#999999"
line
/>
<u-empty
<u-empty
icon=
"/static/img/empty_list.png"
icon=
"/static/img/empty_list.png"
v-if=
"dataList.length === 0
"
v-if=
"dataList.length === 0 && !isLoading
"
width=
"300"
width=
"300"
height=
"300"
height=
"300"
textSize=
"26"
textSize=
"26"
...
@@ -79,6 +92,16 @@
...
@@ -79,6 +92,16 @@
marginTop=
"120"
marginTop=
"120"
>
>
</u-empty>
</u-empty>
</div>
<div
v-else
>
<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;"
>
<park-card-vue
:key=
"activeInfo.id"
:key-words=
"keyWords"
:detail=
"activeInfo"
v-if=
"activeBar == 0"
></park-card-vue>
<land-card-vue
:key=
"activeInfo.id"
:key-words=
"keyword"
:detail=
"activeInfo"
v-if=
"activeBar == 1"
></land-card-vue>
<carrier-card-vue
:key=
"activeInfo.id"
:key-words=
"keyword"
:detail=
"activeInfo"
v-if=
"activeBar == 2"
></carrier-card-vue>
</div>
</div>
</view>
</view>
</
template
>
</
template
>
...
@@ -175,7 +198,9 @@ export default {
...
@@ -175,7 +198,9 @@ export default {
itemList4
:
[],
itemList4
:
[],
},
},
searchKey
:
''
,
searchKey
:
''
,
keyWords
:
''
keyWords
:
''
,
mode
:
'list'
,
activeInfo
:
{}
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -203,6 +228,7 @@ export default {
...
@@ -203,6 +228,7 @@ export default {
if
(
!
this
.
haveMore
)
return
;
if
(
!
this
.
haveMore
)
return
;
this
.
isLoading
=
true
;
this
.
isLoading
=
true
;
let
searchCondition
=
{};
let
searchCondition
=
{};
this
.
activeInfo
=
{};
this
.
keyWords
=
this
.
searchKey
;
this
.
keyWords
=
this
.
searchKey
;
// this.filterChoice.map(item => {
// this.filterChoice.map(item => {
// searchCondition[item.dictType] = item.dictValue;
// searchCondition[item.dictType] = item.dictValue;
...
@@ -230,6 +256,7 @@ export default {
...
@@ -230,6 +256,7 @@ export default {
this
.
dataList
.
push
(...
res
.
records
);
this
.
dataList
.
push
(...
res
.
records
);
this
.
haveMore
=
this
.
haveMore
=
this
.
dataList
.
length
<
res
.
total
;
this
.
dataList
.
length
<
res
.
total
;
},
},
});
});
},
},
...
@@ -294,12 +321,47 @@ export default {
...
@@ -294,12 +321,47 @@ export default {
this
.
pageNum
=
1
;
this
.
pageNum
=
1
;
this
.
haveMore
=
true
;
this
.
haveMore
=
true
;
this
.
getList
();
this
.
getList
();
},
// 模式切换
changeMode
()
{
this
.
mode
=
this
.
mode
===
'list'
?
'map'
:
'list'
;
this
.
activeInfo
=
{};
},
handleMarkerClick
(
e
)
{
console
.
log
(
'handleMarkerClick'
,
e
)
this
.
activeInfo
=
{}
const
temp
=
this
.
dataList
.
filter
(
item
=>
item
.
id
===
e
.
detail
.
markerId
)[
0
];
console
.
log
(
temp
)
setTimeout
(()
=>
{
this
.
$set
(
this
,
'activeInfo'
,
temp
)
})
console
.
log
(
this
.
activeInfo
)
}
}
},
},
computed
:
{
computed
:
{
filterEnum
()
{
filterEnum
()
{
return
store
.
state
.
filterEnum
;
return
store
.
state
.
filterEnum
;
},
},
markers
()
{
let
temp
=
[];
this
.
dataList
.
forEach
(
item
=>
{
temp
.
push
({
id
:
item
.
id
,
latitude
:
item
.
latitude
,
longitude
:
item
.
longitude
,
width
:
25
,
height
:
36
,
callout
:
{
content
:
item
.
name
,
padding
:
5
,
display
:
'ALWAYS'
,
textAlign
:
'center'
}
})
})
return
temp
||
[]
}
},
},
watch
:
{
watch
:
{
refreshCollectionPage
(
newVal
)
{
refreshCollectionPage
(
newVal
)
{
...
@@ -320,6 +382,9 @@ export default {
...
@@ -320,6 +382,9 @@ export default {
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.container {
padding-bottom: 30rpx;
}
.tab_bar {
.tab_bar {
border-bottom: 1rpx solid #fff;
border-bottom: 1rpx solid #fff;
display: flex;
display: flex;
...
...
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