bug
This commit is contained in:
@@ -11,8 +11,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div @click="gotoFamilyList(item)">责任家庭</div>
|
|
||||||
<!-- <div @click="handleTag(item)">标签设置</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!list.length"/>
|
<AiEmpty v-if="!list.length"/>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="gird-item" v-if="tertiaryGrid.length">
|
<div class="gird-item" v-if="tertiaryGrid.length">
|
||||||
<h2>三级网格</h2>
|
<h2>三级网格</h2>
|
||||||
<div class="gird-item__wrapper level3" @click="isShowVillage = true">
|
<div class="gird-item__wrapper level3" @click="getSubInfo">
|
||||||
<h3>专属网格</h3>
|
<h3>专属网格</h3>
|
||||||
<p>({{ tertiaryGrid.length }}个)</p>
|
<p>({{ tertiaryGrid.length }}个)</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,12 +42,12 @@
|
|||||||
<scroll-view scroll-y class="street-wrapper">
|
<scroll-view scroll-y class="street-wrapper">
|
||||||
<h2 class="title">数据统计</h2>
|
<h2 class="title">数据统计</h2>
|
||||||
<div class="street-item__wrapper">
|
<div class="street-item__wrapper">
|
||||||
<div class="street-item" v-for="(item, index) in 9" :key="index">
|
<div class="street-item" v-for="(item, index) in tertiaryInfo" :key="index">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<i></i>
|
<i></i>
|
||||||
<h2>网格数</h2>
|
<h2>{{ index }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<span>12</span>
|
<span>{{ item }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="title">网格列表</h2>
|
<h2 class="title">网格列表</h2>
|
||||||
@@ -75,7 +75,8 @@
|
|||||||
isShowVillage: false,
|
isShowVillage: false,
|
||||||
topGrid: [],
|
topGrid: [],
|
||||||
secondaryGrid: [],
|
secondaryGrid: [],
|
||||||
tertiaryGrid: []
|
tertiaryGrid: [],
|
||||||
|
tertiaryInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -94,6 +95,16 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getSubInfo () {
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post(`/api/appgirdinfo/girdInfoCountByThree`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.isShowVillage = true
|
||||||
|
this.tertiaryInfo = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getInfo () {
|
getInfo () {
|
||||||
this.$http.post(`/api/appgirdinfo/listAllByTop`).then(res => {
|
this.$http.post(`/api/appgirdinfo/listAllByTop`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
|||||||
@@ -4,7 +4,16 @@
|
|||||||
<u-search placeholder="请输入姓名、手机号、店面" :show-action="false" v-model="keyword" confirm-type="search" @search="current = 1, getList()"/>
|
<u-search placeholder="请输入姓名、手机号、店面" :show-action="false" v-model="keyword" confirm-type="search" @search="current = 1, getList()"/>
|
||||||
</AiTopFixed>
|
</AiTopFixed>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="item" v-for="item in list" :key="item.id" @click="linkTo('./detail?id=' + item.id)">
|
<u-swipe-action
|
||||||
|
class="item"
|
||||||
|
:show="item.show"
|
||||||
|
:index="index"
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="item.id"
|
||||||
|
@click="onClick"
|
||||||
|
@open="onOpen"
|
||||||
|
@content-click="toDetail(item.id, index)"
|
||||||
|
:options="options">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img :src="$cdn + 'xincheng/icon.png'" alt="">
|
<img :src="$cdn + 'xincheng/icon.png'" alt="">
|
||||||
<p>{{ item.businessName }}</p>
|
<p>{{ item.businessName }}</p>
|
||||||
@@ -22,7 +31,7 @@
|
|||||||
<img :src="$cdn + 'xincheng/wgz@2x.png'" alt="">
|
<img :src="$cdn + 'xincheng/wgz@2x.png'" alt="">
|
||||||
<div>李毅-网格长</div>
|
<div>李毅-网格长</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</u-swipe-action>
|
||||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn" @click="linkTo('./add')">新增商户</div>
|
<div class="btn" @click="linkTo('./add')">新增商户</div>
|
||||||
@@ -40,7 +49,21 @@
|
|||||||
keyword: '',
|
keyword: '',
|
||||||
current: 1,
|
current: 1,
|
||||||
pages: 2,
|
pages: 2,
|
||||||
list: []
|
list: [],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
text: '编辑',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#007aff'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '删除',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#dd524d'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -67,12 +90,54 @@
|
|||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
this.list = this.current > 1 ? [...this.list, ...res.data.records.map(v => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
})] : res.data.records.map(v => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
})
|
||||||
this.pages = res.data.pages
|
this.pages = res.data.pages
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toDetail (id, index) {
|
||||||
|
this.list[index].show = false
|
||||||
|
this.linkTo('./detail?id=' + id)
|
||||||
|
},
|
||||||
|
|
||||||
|
onClick (index, i) {
|
||||||
|
if (i == 1) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.$http.post('/app/appcompany/delete?id=' + this.list[index].id).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.current = 1
|
||||||
|
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.list[index].show = false
|
||||||
|
this.linkTo('./add?id=' + this.list[index].id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onOpen (index) {
|
||||||
|
this.list[index].show = true
|
||||||
|
this.list.map((val, idx) => {
|
||||||
|
if(index != idx) {
|
||||||
|
this.list[idx].show = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
linkTo (url) {
|
linkTo (url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ import {mapState} from 'vuex'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'add',
|
name: 'add',
|
||||||
|
|
||||||
|
appName: '新增商户',
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: '',
|
name: '',
|
||||||
@@ -81,21 +84,19 @@ export default {
|
|||||||
businessAddress: '',
|
businessAddress: '',
|
||||||
businessName: '',
|
businessName: '',
|
||||||
lat: '',
|
lat: '',
|
||||||
lon: '',
|
lng: '',
|
||||||
storePicUrl: [],
|
storePicUrl: [],
|
||||||
telephone: ''
|
telephone: ''
|
||||||
}
|
},
|
||||||
|
id: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
|
|
||||||
onLoad () {
|
onLoad (query) {
|
||||||
|
this.id = query.id
|
||||||
},
|
this.getInfo()
|
||||||
|
|
||||||
onShow() {
|
|
||||||
document.title = "新增商户"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -104,7 +105,20 @@ export default {
|
|||||||
success: res => {
|
success: res => {
|
||||||
this.form.businessAddress = res.name
|
this.form.businessAddress = res.name
|
||||||
this.form.lat = res.latitude
|
this.form.lat = res.latitude
|
||||||
this.form.lon = res.longitude
|
this.form.lng = res.longitude
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getInfo () {
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post(`/app/appcompany/getDetailById?id=${this.id}`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.form = {
|
||||||
|
...this.form,
|
||||||
|
...res.data,
|
||||||
|
storePicUrl: res.data.storePicUrl ? [{url: res.data.storePicUrl}] : []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<p>{{ info.bossName }}</p>
|
<p>{{ info.bossName }}</p>
|
||||||
<div>
|
<div>
|
||||||
<img :src="$cdn + 'xincheng/dw.png'" alt="" class="local-icon">
|
<img :src="$cdn + 'xincheng/dw.png'" alt="" class="local-icon">
|
||||||
<span>{{ info.businessAddress }}</span>
|
<span>{{ info.businessName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span>地图</span>
|
<span>地图</span>
|
||||||
<span class="color-3D94FB" @click="openLocation">定位</span>
|
<span class="color-3D94FB" @click="openLocation">{{ info.businessAddress }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" v-if="info.detailList.length">
|
<div class="content" v-if="info.detailList.length">
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
|
|
||||||
call (phone) {
|
call (phone) {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: '114'
|
phoneNumber: phone
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
uni.openLocation({
|
uni.openLocation({
|
||||||
latitude: this.info.lat,
|
latitude: this.info.lat,
|
||||||
longitude: this.info.lon,
|
longitude: this.info.lng,
|
||||||
success: function () {
|
success: function () {
|
||||||
console.log('success');
|
console.log('success');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,9 +54,9 @@
|
|||||||
const markers = res.data.records.filter(item => item.lat).map(item => {
|
const markers = res.data.records.filter(item => item.lat).map(item => {
|
||||||
return {
|
return {
|
||||||
title: item.businessName,
|
title: item.businessName,
|
||||||
lnglat: [item.lon, item.lat],
|
lnglat: [item.lng, item.lat],
|
||||||
lat: item.lat,
|
lat: item.lat,
|
||||||
lng: item.lon,
|
lng: item.lng,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.businessName
|
name: item.businessName
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,17 +42,36 @@ export default {
|
|||||||
url: '../AppMerchanStatistics/AppMerchanStatistics'
|
url: '../AppMerchanStatistics/AppMerchanStatistics'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
isGridMember: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
|
||||||
document.title = '商户入口'
|
onLoad () {
|
||||||
|
this.$http.post(`/api/appgirdmemberinfo/checkLogOnUser`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.isGridMember = res.data.checkType === '1' || res.data.checkType === '2'
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
linkTo (url) {
|
linkTo (url) {
|
||||||
console.log(url)
|
if (!this.isGridMember) {
|
||||||
|
this.$confirm('没有网格员权限', '温馨提示', {
|
||||||
|
confirmText: '去申报'
|
||||||
|
}).then(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '../AppMerchanGird/AddUser'
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
uni.navigateTo({url})
|
uni.navigateTo({url})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user