改造上架版网格完成
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="pad-t32" v-if="component != 'Map' && isAdmin"></div>
|
||||
<div class="select-gird" v-if="component != 'Map' && isAdmin" flex>
|
||||
<AiPagePicker type="custom" class="fill" :selected="[params]" @select="handleSelectGird"
|
||||
:ops="{url:'./SelectGrid',label: 'girdName'}">
|
||||
:ops="{url:'./SelectGird',label: 'girdName'}">
|
||||
<div flex>
|
||||
<img src="./components/img/gird-icon.png" alt="" class="gird-icon">
|
||||
<AiMore v-model="params.girdName" icon="arrow-down"/>
|
||||
|
||||
@@ -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"/>
|
||||
<!-- {{ 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"/>
|
||||
<!-- {{ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click.stop="girdClick(item, index)"/>
|
||||
<img src="./components/img/gird--select-icon.png" alt="" class="avatras"/>
|
||||
</div>
|
||||
<div class="rightes">
|
||||
<div class="applicationNames">{{ item.girdName }}</div>
|
||||
<u-icon v-if="item.hasChildren" @click="itemClick(item)" name="arrow-right" color="#ddd"/>
|
||||
<div class="rightes fill">
|
||||
<div class="applicationNames fill">{{ item.girdName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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('请选择网格')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.SelectGird {
|
||||
height: 100%;
|
||||
min-height: 100vh;
|
||||
background: #fff;
|
||||
padding-bottom: 140px;
|
||||
|
||||
.header-top {
|
||||
background: #fff;
|
||||
padding: 20px 32px;
|
||||
}
|
||||
box-sizing: border-box;
|
||||
|
||||
.header-middle {
|
||||
.hint {
|
||||
@@ -172,11 +172,6 @@ export default {
|
||||
}
|
||||
|
||||
.showTypes {
|
||||
.empty-div {
|
||||
height: 16px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.cards {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -210,80 +205,24 @@ export default {
|
||||
}
|
||||
|
||||
.rightes {
|
||||
width: calc(100% - 188px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 32px;
|
||||
border-bottom: 1px solid #e4e5e6;
|
||||
padding: 0 16px;
|
||||
|
||||
.applicationNames {
|
||||
width: calc(100% - 56px);
|
||||
display: inline-block;
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.imgs {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: middle;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.showUsers {
|
||||
.cards {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
// background: pink;
|
||||
padding: 0 0 0 32px;
|
||||
|
||||
.imges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 200px;
|
||||
|
||||
.imgselect {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.avatras {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-left: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.rights {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 32px;
|
||||
border-bottom: 1px solid #e4e5e6;
|
||||
padding-right: 40px;
|
||||
|
||||
.applicationNames {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.idNumbers {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subBtn {
|
||||
|
||||
@@ -170,11 +170,6 @@ export default {
|
||||
background: #fff;
|
||||
padding-bottom: 140px;
|
||||
|
||||
.header-top {
|
||||
background: #fff;
|
||||
padding: 20px 32px;
|
||||
}
|
||||
|
||||
.header-middle {
|
||||
.hint {
|
||||
padding: 28px 20px 28px 32px;
|
||||
@@ -255,55 +250,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.showUsers {
|
||||
.cards {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
// background: pink;
|
||||
padding: 0 0 0 32px;
|
||||
|
||||
.imges {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 200px;
|
||||
|
||||
.imgselect {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.avatras {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
border-radius: 8px;
|
||||
margin-left: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.rights {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 32px;
|
||||
border-bottom: 1px solid #e4e5e6;
|
||||
padding-right: 40px;
|
||||
|
||||
.applicationNames {
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.idNumbers {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subBtn {
|
||||
@@ -327,19 +273,5 @@ export default {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.popup {
|
||||
padding: 0 32px 16px;
|
||||
|
||||
.bg {
|
||||
width: 64px;
|
||||
height: 10px;
|
||||
background: #CCC;
|
||||
border-radius: 6px;
|
||||
margin: 32px 0 32px 344px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user