优化
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="Page">
|
||||
<div class="Page" v-if="showPage">
|
||||
<u-tabs class="u-tabs1" :list="tabs" :is-scroll="false" :current="tabIndex0" @change="change" bg-color="#197df0" style="width: 50%" active-color="#FFF;" inactive-color="#FFF"></u-tabs>
|
||||
|
||||
<div class="top">
|
||||
@@ -40,7 +40,7 @@
|
||||
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
|
||||
</div> -->
|
||||
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop=";(delAndEdit = true), (editId = item.id), (deleId = item.id)" class="dels" />
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop=";(delAndEdit = true), (editId = item.id), (deleId = item.id), (statDisabled = item.status)" class="dels" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
<u-modal v-model="delShow" content="确定删除该数据" :mask-close-able="true" @confirm="confirmDel"></u-modal>
|
||||
|
||||
<u-mask :show="delAndEdit" @click="delAndEdit = false">
|
||||
<u-mask :show="delAndEdit" @click=";(delAndEdit = false), (statDisabled = '')">
|
||||
<div class="warp">
|
||||
<div class="rect" @tap.stop="toAdd(0)">编辑</div>
|
||||
<div class="rect" @tap.stop=";(delAndEdit = false), (delShow = true)">删除</div>
|
||||
@@ -115,6 +115,7 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
showPage: false,
|
||||
tabs: [
|
||||
{
|
||||
name: '本村',
|
||||
@@ -167,6 +168,7 @@ export default {
|
||||
flag: false,
|
||||
delAndEdit: false,
|
||||
editId: '',
|
||||
statDisabled: '',
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
@@ -200,6 +202,9 @@ export default {
|
||||
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.showPage = true
|
||||
})
|
||||
},
|
||||
|
||||
init() {
|
||||
@@ -233,6 +238,11 @@ export default {
|
||||
},
|
||||
|
||||
toAdd(index) {
|
||||
if (this.statDisabled == 0) {
|
||||
this.delAndEdit = false
|
||||
return this.$u.toast('该数据未审核')
|
||||
}
|
||||
|
||||
this.delAndEdit = false
|
||||
if (index == 0) {
|
||||
this.$linkTo(`./add?id=${this.editId}`)
|
||||
@@ -253,6 +263,8 @@ export default {
|
||||
this.deleShow = false
|
||||
this.modalShow = false
|
||||
this.deleId = ''
|
||||
this.statDisabled = ''
|
||||
this.$u.toast('删除成功')
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
@@ -499,7 +511,7 @@ export default {
|
||||
padding: 24px;
|
||||
background: #f3f6f9;
|
||||
border-radius: 16px;
|
||||
margin: 24px;
|
||||
margin-top: 24px;
|
||||
.toReply {
|
||||
font-size: 26px;
|
||||
color: #999999;
|
||||
|
||||
@@ -76,6 +76,9 @@ export default {
|
||||
if (!this.forms.content) {
|
||||
return this.$u.toast('请输入内容')
|
||||
}
|
||||
if (!this.forms.gpsDesc) {
|
||||
return this.$u.toast('请选择所在位置')
|
||||
}
|
||||
if (!this.forms.lat && !this.forms.lng) {
|
||||
return this.$u.toast('请选择所在位置')
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
})
|
||||
.then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$u.toast('留言成功')
|
||||
this.$u.toast('发送成功')
|
||||
this.flag = false
|
||||
this.content = ''
|
||||
this.poupShow = false
|
||||
@@ -213,6 +213,7 @@ export default {
|
||||
this.deleShow = false
|
||||
this.deleId = ''
|
||||
this.modalShow = false
|
||||
this.$u.toast('删除成功')
|
||||
this.getDetail()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user