网格选择
@@ -27,7 +28,7 @@
网格长
-
+
@@ -38,7 +39,7 @@
网格员
-
+
@@ -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;
}
}
diff --git a/src/saas/AppGridManagement/SelectGird.vue b/src/saas/AppGridManagement/SelectGird.vue
index 39db385f..30f84bbd 100644
--- a/src/saas/AppGridManagement/SelectGird.vue
+++ b/src/saas/AppGridManagement/SelectGird.vue
@@ -16,9 +16,8 @@
-
-
{{ item.girdName }}
-
+
@@ -93,12 +92,14 @@ export default {
},
itemClick(row) {
- let obj = {
- girdName: row.girdName,
- id: row.id,
+ if (row.hasChildren) {
+ let obj = {
+ girdName: row.girdName,
+ id: row.id,
+ }
+ this.slectList.push(obj)
+ this.getGridsByGridMemberAndParent(row)
}
- this.slectList.push(obj)
- this.getGridsByGridMemberAndParent(row)
},
getGridsByGridMemberAndParent(row) {
@@ -140,26 +141,25 @@ export default {
submit() {
if (this.SelectGird.id != null) {
- uni.$emit('goback', this.SelectGird)
- uni.navigateBack({})
+ uni.navigateBack({
+ success: () => {
+ uni.$emit("pagePicker:custom", [this.SelectGird])
+ }
+ })
} else {
return this.$u.toast('请选择网格')
}
- },
+ }
}
}