改造上架版网格完成

This commit is contained in:
2022-05-04 19:50:50 +08:00
parent e36d0e43b0
commit a5a41268c3
4 changed files with 37 additions and 164 deletions

View File

@@ -1,7 +1,8 @@
<template>
<div class="detail">
<div class="grid-select">
<AiPagePicker type="gird" class="fill" :selected="[form]" @select="handleSelectGird" :isDisabledOneGird="true">
<AiPagePicker type="custom" class="fill" :selected="[form]" @select="handleSelectGird"
:ops="{url:'./SelectGird',label: 'girdName'}">
<div class="gird-content">
<div class="label">网格选择</div>
<div class="grid-select__right">
@@ -27,7 +28,7 @@
<div class="info-flex" v-for="(item, index) in form.girdMemberManageList" :key="index">
<span class="label">网格长</span>
<span class="value">
<AiOpenData v-if="item.name" type="userName" :openid="item.name" />
<AiOpenData v-if="item.name" type="userName" :openid="item.name"/>
<!-- &nbsp;&nbsp;{{ item.phone }}
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon"
v-if="item.phone"> -->
@@ -38,7 +39,7 @@
<div class="info-flex" v-for="(item, index) in form.girdMemberList" :key="index">
<span class="label">网格员</span>
<span class="value">
<AiOpenData v-if="item.name" type="userName" :openid="item.name" />
<AiOpenData v-if="item.name" type="userName" :openid="item.name"/>
<!-- &nbsp;&nbsp;{{ item.phone }}
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon"
v-if="item.phone"> -->
@@ -120,17 +121,17 @@ export default {
if (res?.data) {
const arr = []
res.data.map(v => {
if(v.points) {
if (v.points) {
arr.push(
{
id: v.id,
girdName: v.girdName,
points: v.points ? v.points.map(p => [p.lng, p.lat]) : []
}
{
id: v.id,
girdName: v.girdName,
points: v.points ? v.points.map(p => [p.lng, p.lat]) : []
}
)
if(this.latLngCenter.length) {
if (this.latLngCenter.length) {
}else {
} else {
this.latLngCenter.push(v.points[0].lat, v.points[0].lng)
}
}
@@ -176,7 +177,7 @@ export default {
renderGridMap(paths, count = 0) {
let {map, lib: TMap, $refs: {AiTMap: {fitBounds}}} = this
if (TMap) {
if(this.latLngCenter.length) {
if (this.latLngCenter.length) {
map.setCenter(this.latLngCenter)
this.map.setZoom(14)
}
@@ -300,7 +301,7 @@ export default {
text-align: right;
}
.gird-content{
.gird-content {
display: flex;
justify-content: space-between;
}
@@ -377,7 +378,8 @@ export default {
vertical-align: sub;
margin-left: 16px;
}
div{
div {
display: inline-block;
}
}