村民圈

This commit is contained in:
花有清香月有阴
2022-02-18 17:51:56 +08:00
parent 9221b97d91
commit e0ddc13369
3 changed files with 76 additions and 27 deletions

View File

@@ -35,11 +35,12 @@
<div class="statusDele">
<div class="status status0" :class="item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2'" v-if="tabIndex0 == 3">{{ $dict.getLabel('auditStatus', item.status) }}</div>
<div class="statusRight">
<!-- <div class="statusRight">
<div class="dels" @click.stop="toAdd(item)">编辑</div>
<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="delShow = true" class="dels" /> -->
</div> -->
<img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop=";(delAndEdit = true), (editId = item.id), (deleId = item.id)" class="dels" />
</div>
</div>
</div>
@@ -91,12 +92,16 @@
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<!-- <AiFixedBtn v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()">
<div class="addBtn iconfont iconfont-iconfangda">发起审核</div>
</AiFixedBtn> -->
<div class="addBtn" v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()">发起审核</div>
<img class="addBtn" src="https://cdn.cunwuyun.cn/dvcp/AppVillager/icon111.png" alt="" v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()" />
<u-modal v-model="delShow" content="确定删除该数据" :mask-close-able="true" @confirm="confirmDel"></u-modal>
<u-mask :show="delAndEdit" @click="delAndEdit = false">
<div class="warp">
<div class="rect" @tap.stop="toAdd(0)">编辑</div>
<div class="rect" @tap.stop=";(delAndEdit = false), (delShow = true)">删除</div>
</div>
</u-mask>
</div>
</template>
@@ -160,6 +165,8 @@ export default {
TopicValue: '0',
TopicName: '美丽庭院',
flag: false,
delAndEdit: false,
editId: '',
}
},
computed: { ...mapState(['user']) },
@@ -225,9 +232,10 @@ export default {
this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl ? item.avatarUrl : ''}&tabCurrent1=${this.tabCurrent1}`)
},
toAdd(item) {
if (item) {
this.$linkTo(`./add?id=${item.id}`)
toAdd(index) {
this.delAndEdit = false
if (index == 0) {
this.$linkTo(`./add?id=${this.editId}`)
} else {
this.$linkTo(`./add`)
}
@@ -235,17 +243,20 @@ export default {
confirmDel() {
this.$instance
.post(`/app/appvillagercircleinfo/delete?ids=${this.deleId}`)
.post(this.tabIndex0 == 3 && this.tabCurrent1 == 1 ? '/app/appvillagercirclecomment/delete' : '/app/appvillagercircleinfo/delete', null, {
params: {
ids: this.deleId,
},
})
.then((res) => {
if (res?.data) {
if (res.code == 0) {
this.deleShow = false
this.modalShow = false
this.deleId = ''
this.getDetail()
this.init()
}
})
.catch((e) => {
this.$hideLoading()
this.$u.toast(e)
})
},
@@ -285,6 +296,8 @@ export default {
this.flag = false
})
},
toDel() {},
},
onReachBottom() {
this.current = this.current + 1
@@ -318,10 +331,12 @@ export default {
}
.top {
padding: 0 0 32px 16px;
padding: 0 16px 32px 16px;
background: #fff;
border-radius: 32px 32px 0px 0px;
margin-top: -30px;
overflow: hidden;
.tabIndex012 {
padding-top: 32px;
display: flex;
@@ -414,9 +429,10 @@ export default {
flex-direction: column;
align-items: center;
.dels {
position: relative;
margin-left: 20px;
// width: 68px;
// height: 68px;
width: 68px;
height: 68px;
}
}
}
@@ -537,5 +553,27 @@ export default {
border-radius: 50%;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}
::v-deep .u-mask {
.warp {
position: absolute;
top: 251px;
right: 70px;
display: flex;
flex-direction: column;
align-items: center;
width: 45%;
height: 22%;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
border-radius: 5%;
.rect {
height: 50%;
width: 100%;
text-align: center;
line-height: 4;
background: #fff;
}
}
}
}
</style>

View File

@@ -2,8 +2,8 @@
<div class="add">
<div class="u-forms">
<u-form class="u-form" :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="话题类型" class="topics" prop="topic" required :border-bottom="false" right-icon="arrow-right">
<u-input v-model="forms.topic" disabled placeholder="请选择话题类型" @click="showStstus = true" />
<u-form-item label="话题类型" class="topics" prop="topicValue" required :border-bottom="false" right-icon="arrow-right">
<u-input v-model="forms.topicValue" disabled placeholder="请选择话题类型" @click="showStstus = true" />
<u-select v-model="showStstus" :list="$dict.getDict('villagerCircleTopic')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
@@ -60,6 +60,7 @@ export default {
onLoad(o) {
this.$dict.load('villagerCircleTopic').then(() => {
this.id = o.id
this.getDetail()
})
},
onShow() {},
@@ -89,14 +90,15 @@ export default {
this.flag = true
this.$instance
.post(`/app/appvillagercircleinfo/addOrUpdate`, {
topic: this.forms.topicValue,
topic: this.forms.topic,
content: this.forms.content,
pictures: imgs || [],
createUserResidentId: this.user.id,
areaId: this.$areaId,
gpsDesc: this.gpsDesc,
gpsDesc: this.forms.gpsDesc,
lat: this.forms.lat,
lng: this.forms.lng,
id: this.id,
})
.then((res) => {
if (res.code == 0) {
@@ -122,22 +124,24 @@ export default {
if (this.id) {
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
// this.forms = res.data
this.forms = res.data
console.log(this.form)
this.forms.topicValue = this.$dict.getLabel('villagerCircleTopic', this.forms.topic)
}
})
}
},
selectStatus(e) {
this.forms.topic = e[0].label
this.forms.topicValue = e[0].value
this.forms.topic = e[0].value
this.forms.topicValue = e[0].label
},
chooseAddress() {
uni.chooseLocation({
success: (res) => {
console.log(res)
this.forms.gpsDesc = res.gpsDesc
this.forms.gpsDesc = res.name
this.forms.lat = res.latitude
this.forms.lng = res.longitude
},

View File

@@ -10,9 +10,12 @@
<div class="rightTop">
<div class="leftStaus">
<span class="names">{{ detail.createUserName }}</span>
<span class="names">{{ detail.createUserName || detail.replyUserName }}</span>
<span class="titless">{{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.createTime }}</span>
<span class="titless">
<span class="topics" v-if="detail.topic"> {{ $dict.getLabel('villagerCircleTopic', detail.topic) }} |</span>
<span> {{ detail.createTime }}</span>
</span>
</div>
<div class="statusDele">
@@ -125,6 +128,7 @@ export default {
deleId: '',
flagLike: false,
tabCurrent1: '',
delAndEdit: '',
}
},
computed: { ...mapState(['user']) },
@@ -280,6 +284,9 @@ export default {
font-size: 26px;
color: #6e727a;
margin-top: 6px;
.topics {
margin-right: 8px;
}
}
}