Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/saas/AppGridManagement/AppGridManagement.vue
This commit is contained in:
aixianling
2022-02-11 11:22:00 +08:00
17 changed files with 113 additions and 72 deletions

View File

@@ -165,10 +165,9 @@ export default {
color: #666;
img {
width: 32px;
height: 32px;
width: 44px;
height: 44px;
vertical-align: middle;
margin-left: 8px;
}
}

View File

@@ -146,7 +146,7 @@ export default {
vertical-align: middle;
}
div {
.gird-name-div {
display: inline-block;
padding: 0 20px;
box-sizing: border-box;
@@ -159,6 +159,15 @@ export default {
img {
margin-left: 8px;
}
.gird-name{
display: inline-block;
max-width: calc(100% - 50px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
}
span {

View File

@@ -57,6 +57,15 @@ export default {
}
},
methods: {
handerSearch() {
this.list = []
this.current = 1
this.getList()
},
handerClear() {
this.keyword = ''
this.handerSearch()
},
getList(){
this.$http.post(`/app/appgirdmemberresident/listByGirdMember?current=${this.current}&girdMemberId=${this.userId}&girdId=${this.girdId}&name=${this.keyword}`).then((res) => {
if (res.code == 0) {

View File

@@ -63,7 +63,8 @@ export default {
showSelect: false,
editor: null,
polygons: [],
labels: []
labels: [],
latLngCenter: [], //中心点
}
},
computed: {...mapState(['user', 'config'])},
@@ -73,11 +74,12 @@ export default {
// this.getLeafNodes()
uni.$on('goback', e => {
if (e.girdLevel == '0') {
setTimeout(() => {
this.$u.toast('请选择二级或者三级网格')
}, 400)
return false
// setTimeout(() => {
// this.$u.toast('请选择二级或者三级网格')
// }, 400)
// return false
}
this.form.girdName = e.girdName
this.getGridList(e.id, true)
})
},
@@ -114,14 +116,23 @@ export default {
this.$http.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${id}`).then((res) => {
this.$hideLoading()
if (res?.data) {
const arr = res.data.map(v => {
return {
id: v.id,
girdName: v.girdName,
points: v.points ? v.points.map(p => [p.lng, p.lat]) : []
const arr = []
res.data.map(v => {
if(v.points) {
arr.push(
{
id: v.id,
girdName: v.girdName,
points: v.points ? v.points.map(p => [p.lng, p.lat]) : []
}
)
if(this.latLngCenter.length) {
return
}else {
this.latLngCenter.push(v.points[0].lat, v.points[0].lng)
}
}
})
this.renderGridMap(arr)
}
}).catch(() => {
@@ -159,6 +170,10 @@ export default {
console.log(paths)
let {map, lib: TMap, $refs: {AiTMap: {fitBounds}}} = this
if (TMap) {
if(this.latLngCenter.length) {
map.setCenter(this.latLngCenter)
this.map.setZoom(14)
}
const colors = ["#A194F4", "#7CBDF3", "#F3A57D", "#62D063", "#58DBDA", "#F7D151"]
if (this.polygons.length > 0) {
this.polygons.forEach(e => e.destroy())

View File

@@ -2,8 +2,11 @@
<div class="Organization">
<div class="title">网格人员</div>
<div class="user-content" v-for="(item, index) in dataInfo.parentGirdMembers" :key="index">
<image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" />
<img src="./components/img/big-user.png" alt="" v-else>
<div>
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
<img :src="item.photo" alt="" v-if="item.photo">
<img src="./components/img/big-user.png" alt="" v-else>
</div>
<div class="right">
<div class="name">
<AiOpenData v-if="item.wxUserId" type="userName" :openid="item.wxUserId" />
@@ -13,8 +16,11 @@
</div>
</div>
<div class="user-content user-item" v-for="(item, index) in dataInfo.girdMembers" :key="index">
<image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" />
<img src="./components/img/user-img.png" alt="" v-else />
<div>
<!-- <image :src="item.photo" alt="" mode="aspectFill" v-if="item.photo" /> -->
<img :src="item.photo" alt="" v-if="item.photo">
<img src="./components/img/big-user.png" alt="" v-else>
</div>
<div class="right">
<div class="name">
<AiOpenData v-if="item.wxUserId" type="userName" :openid="item.wxUserId" />