提交 fa320d54 作者: ZhangLingKun

Merge branch 'develop'

...@@ -13,4 +13,4 @@ patches: ...@@ -13,4 +13,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/h5 newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/h5
newTag: e748e155ed05e7ae1fbd92eb6610101f9d62f7ba newTag: eb4d0c480b89284c2d5cd9b2e577aedb27ed723f
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
/> />
</view> </view>
</view> </view>
<view class="content-info"> 浏览115 | 交易198 </view> <view class="content-info"> 浏览{{ i.id }} | 交易{{ i.backUserAccountId }} </view>
</view> </view>
<view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view> <view class="content-type">{{ i.brandName }}</view>
<view class="content-location"> <view class="content-location">
<image src="../../../../static/img/location.png" mode="widthFix" /> <image src="../../../../static/img/location.png" mode="widthFix" />
<text>{{ i.address }}</text> <text>{{ i.address }}</text>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</view> </view>
</scroll-view> </scroll-view>
<scroll-view v-else class="list-view-click animate__animated animate__slideInRight" scroll-y> <scroll-view v-else class="list-view-click animate__animated animate__slideInRight" scroll-y>
<view v-for="(i, j) in list" :key="j" class="list-item" @click="handleSelect(j)"> <view v-for="(i, j) in getCurrentList" :key="j" class="list-item" @click="handleSelect(j)">
<image class="item-image" :src="i.brandLogo" mode="widthFix" /> <image class="item-image" :src="i.brandLogo" mode="widthFix" />
<view class="item-content"> <view class="item-content">
<view class="content-title">{{ i.companyName }}</view> <view class="content-title">{{ i.companyName }}</view>
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
</view> </view>
<view class="serve-star">⭐⭐⭐⭐ </view> <view class="serve-star">⭐⭐⭐⭐ </view>
</view> </view>
<view class="content-info"> 浏览115 | 交易198 </view> <view class="content-info"> 浏览{{ i.id }} | 交易{{ i.backUserAccountId }} </view>
</view> </view>
<view class="content-type"> 航拍/航测 | CAAC证书 | 测绘乙级 </view> <view class="content-type">{{ i.brandName }}</view>
<view class="content-location"> <view class="content-location">
<image src="../../../../static/img/location.png" mode="widthFix" /> <image src="../../../../static/img/location.png" mode="widthFix" />
<text>{{ i.address }}</text> <text>{{ i.address }}</text>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, PropType } from 'vue' import { computed, PropType, ref, watch } from 'vue'
import { InterListType } from '@/api/interface' import { InterListType } from '@/api/interface'
import { listCompanyInfoByCoopIdType } from '@/api/interface/common' import { listCompanyInfoByCoopIdType } from '@/api/interface/common'
...@@ -74,6 +74,10 @@ const props = defineProps({ ...@@ -74,6 +74,10 @@ const props = defineProps({
isclick: { isclick: {
type: Boolean, type: Boolean,
default: false default: false
},
currentItem: {
type: Object as unknown as PropType<ListType[0]>,
default: () => ({})
} }
}) })
// 事件 // 事件
...@@ -82,10 +86,20 @@ const emits = defineEmits(['onSelect']) ...@@ -82,10 +86,20 @@ const emits = defineEmits(['onSelect'])
const handleSelect = (j: number) => { const handleSelect = (j: number) => {
emits('onSelect', props.list[j]) emits('onSelect', props.list[j])
} }
// 组件挂载 // 当前选择的项目
onMounted(() => { const currentItem = ref<ListType[0]>()
// console.log('列表组件 --->', props.list) // 获取当前列表
const getCurrentList = computed(() => {
return props.list?.filter((i) => i.id === currentItem.value?.id)
}) })
// 监听变化
watch(
() => props.currentItem,
() => {
currentItem.value = props.currentItem
console.log(props.currentItem)
}
)
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.network-list { .network-list {
...@@ -123,7 +137,7 @@ onMounted(() => { ...@@ -123,7 +137,7 @@ onMounted(() => {
position: relative; position: relative;
width: 100%; width: 100%;
margin-top: 14rpx; margin-top: 14rpx;
font-family: PingFangSC-Medium, PingFang SC; //font-family: PingFangSC-Medium, PingFang SC;
font-size: 20rpx; font-size: 20rpx;
font-weight: 400; font-weight: 400;
color: #888d9c; color: #888d9c;
...@@ -222,6 +236,8 @@ onMounted(() => { ...@@ -222,6 +236,8 @@ onMounted(() => {
height: 216rpx; height: 216rpx;
z-index: 30; z-index: 30;
overflow-x: auto; overflow-x: auto;
box-sizing: border-box;
padding-left: 16rpx;
.list-item { .list-item {
position: relative; position: relative;
display: flex; display: flex;
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
v-if="networkList.length !== 0" v-if="networkList.length !== 0"
:list="networkList" :list="networkList"
:isclick="isclick" :isclick="isclick"
:current-item="currentItem"
@on-select="handleSelect" @on-select="handleSelect"
/> />
<view v-else class="network-none">空空如也</view> <view v-else class="network-none">空空如也</view>
...@@ -132,6 +133,7 @@ export default { ...@@ -132,6 +133,7 @@ export default {
if (from !== 'map') { if (from !== 'map') {
// 当前选择的类型 // 当前选择的类型
const item = this.networkTypeList[this.currentTypeIndex] const item = this.networkTypeList[this.currentTypeIndex]
// 当前选择的下标
const index = this.currentTypeIndex const index = this.currentTypeIndex
// 如果存在路径 // 如果存在路径
if (item?.path) { if (item?.path) {
...@@ -175,7 +177,8 @@ import weChatSDK from 'z-weixin-ts' ...@@ -175,7 +177,8 @@ import weChatSDK from 'z-weixin-ts'
layer: null, layer: null,
parkList: [], parkList: [],
markers: [], markers: [],
isclick:false, isclick: false,
currentItem: {},
icon: { icon: {
type: 'image', type: 'image',
image: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/b0364bd1-f193-4b93-ac9f-cfb6e2624d6b.png', image: 'https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/b0364bd1-f193-4b93-ac9f-cfb6e2624d6b.png',
...@@ -248,10 +251,11 @@ import weChatSDK from 'z-weixin-ts' ...@@ -248,10 +251,11 @@ import weChatSDK from 'z-weixin-ts'
position: element.position, position: element.position,
icon: this.icon, icon: this.icon,
}); });
console.log('labelMarker',labelMarker) // console.log('labelMarker',labelMarker)
this.markers.push(labelMarker); this.markers.push(labelMarker);
labelMarker.on('click', (e) => { labelMarker.on('click', (e) => {
console.log('执行了--->',e) this.currentItem = {...element,...this.networkList[index]};
// console.log('执行到此处 --->', {...element,...this.networkList[index]})
this.openInfo({...element,...this.networkList[index]}); this.openInfo({...element,...this.networkList[index]});
this.isclick = true this.isclick = true
}); });
...@@ -267,6 +271,12 @@ import weChatSDK from 'z-weixin-ts' ...@@ -267,6 +271,12 @@ import weChatSDK from 'z-weixin-ts'
if (zoom > 5) this.map.setZoom(5); // 设置地图层级 if (zoom > 5) this.map.setZoom(5); // 设置地图层级
} }
// 展示当前定位
const marker = new AMap.Marker({
position: [this.location.lng, this.location.lat]
})
this.map.add(marker);
}, },
// 在指定位置打开信息窗体 // 在指定位置打开信息窗体
openInfo(obj) { openInfo(obj) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论