村民圈
This commit is contained in:
@@ -35,11 +35,12 @@
|
|||||||
<div class="statusDele">
|
<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="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="toAdd(item)">编辑</div>
|
||||||
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
|
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
|
|
||||||
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,12 +92,16 @@
|
|||||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <AiFixedBtn v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()">
|
<img class="addBtn" src="https://cdn.cunwuyun.cn/dvcp/AppVillager/icon111.png" alt="" 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>
|
|
||||||
|
|
||||||
<u-modal v-model="delShow" content="确定删除该数据" :mask-close-able="true" @confirm="confirmDel"></u-modal>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -160,6 +165,8 @@ export default {
|
|||||||
TopicValue: '0',
|
TopicValue: '0',
|
||||||
TopicName: '美丽庭院',
|
TopicName: '美丽庭院',
|
||||||
flag: false,
|
flag: false,
|
||||||
|
delAndEdit: false,
|
||||||
|
editId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
@@ -225,9 +232,10 @@ export default {
|
|||||||
this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl ? item.avatarUrl : ''}&tabCurrent1=${this.tabCurrent1}`)
|
this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl ? item.avatarUrl : ''}&tabCurrent1=${this.tabCurrent1}`)
|
||||||
},
|
},
|
||||||
|
|
||||||
toAdd(item) {
|
toAdd(index) {
|
||||||
if (item) {
|
this.delAndEdit = false
|
||||||
this.$linkTo(`./add?id=${item.id}`)
|
if (index == 0) {
|
||||||
|
this.$linkTo(`./add?id=${this.editId}`)
|
||||||
} else {
|
} else {
|
||||||
this.$linkTo(`./add`)
|
this.$linkTo(`./add`)
|
||||||
}
|
}
|
||||||
@@ -235,17 +243,20 @@ export default {
|
|||||||
|
|
||||||
confirmDel() {
|
confirmDel() {
|
||||||
this.$instance
|
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) => {
|
.then((res) => {
|
||||||
if (res?.data) {
|
if (res.code == 0) {
|
||||||
this.deleShow = false
|
this.deleShow = false
|
||||||
this.modalShow = false
|
this.modalShow = false
|
||||||
this.deleId = ''
|
this.deleId = ''
|
||||||
this.getDetail()
|
this.init()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
this.$hideLoading()
|
|
||||||
this.$u.toast(e)
|
this.$u.toast(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -285,6 +296,8 @@ export default {
|
|||||||
this.flag = false
|
this.flag = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toDel() {},
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.current = this.current + 1
|
this.current = this.current + 1
|
||||||
@@ -318,10 +331,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
padding: 0 0 32px 16px;
|
padding: 0 16px 32px 16px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 32px 32px 0px 0px;
|
border-radius: 32px 32px 0px 0px;
|
||||||
margin-top: -30px;
|
margin-top: -30px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.tabIndex012 {
|
.tabIndex012 {
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -414,9 +429,10 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.dels {
|
.dels {
|
||||||
|
position: relative;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
// width: 68px;
|
width: 68px;
|
||||||
// height: 68px;
|
height: 68px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -537,5 +553,27 @@ export default {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
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>
|
</style>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="add">
|
<div class="add">
|
||||||
<div class="u-forms">
|
<div class="u-forms">
|
||||||
<u-form class="u-form" :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
|
<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-form-item label="话题类型" class="topics" prop="topicValue" required :border-bottom="false" right-icon="arrow-right">
|
||||||
<u-input v-model="forms.topic" disabled placeholder="请选择话题类型" @click="showStstus = true" />
|
<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-select v-model="showStstus" :list="$dict.getDict('villagerCircleTopic')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@@ -60,6 +60,7 @@ export default {
|
|||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.$dict.load('villagerCircleTopic').then(() => {
|
this.$dict.load('villagerCircleTopic').then(() => {
|
||||||
this.id = o.id
|
this.id = o.id
|
||||||
|
this.getDetail()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
@@ -89,14 +90,15 @@ export default {
|
|||||||
this.flag = true
|
this.flag = true
|
||||||
this.$instance
|
this.$instance
|
||||||
.post(`/app/appvillagercircleinfo/addOrUpdate`, {
|
.post(`/app/appvillagercircleinfo/addOrUpdate`, {
|
||||||
topic: this.forms.topicValue,
|
topic: this.forms.topic,
|
||||||
content: this.forms.content,
|
content: this.forms.content,
|
||||||
pictures: imgs || [],
|
pictures: imgs || [],
|
||||||
createUserResidentId: this.user.id,
|
createUserResidentId: this.user.id,
|
||||||
areaId: this.$areaId,
|
areaId: this.$areaId,
|
||||||
gpsDesc: this.gpsDesc,
|
gpsDesc: this.forms.gpsDesc,
|
||||||
lat: this.forms.lat,
|
lat: this.forms.lat,
|
||||||
lng: this.forms.lng,
|
lng: this.forms.lng,
|
||||||
|
id: this.id,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@@ -122,22 +124,24 @@ export default {
|
|||||||
if (this.id) {
|
if (this.id) {
|
||||||
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
|
this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
if (res.code == 0) {
|
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) {
|
selectStatus(e) {
|
||||||
this.forms.topic = e[0].label
|
this.forms.topic = e[0].value
|
||||||
this.forms.topicValue = e[0].value
|
this.forms.topicValue = e[0].label
|
||||||
},
|
},
|
||||||
|
|
||||||
chooseAddress() {
|
chooseAddress() {
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.forms.gpsDesc = res.gpsDesc
|
this.forms.gpsDesc = res.name
|
||||||
this.forms.lat = res.latitude
|
this.forms.lat = res.latitude
|
||||||
this.forms.lng = res.longitude
|
this.forms.lng = res.longitude
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,9 +10,12 @@
|
|||||||
|
|
||||||
<div class="rightTop">
|
<div class="rightTop">
|
||||||
<div class="leftStaus">
|
<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>
|
||||||
|
|
||||||
<div class="statusDele">
|
<div class="statusDele">
|
||||||
@@ -125,6 +128,7 @@ export default {
|
|||||||
deleId: '',
|
deleId: '',
|
||||||
flagLike: false,
|
flagLike: false,
|
||||||
tabCurrent1: '',
|
tabCurrent1: '',
|
||||||
|
delAndEdit: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
@@ -280,6 +284,9 @@ export default {
|
|||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
color: #6e727a;
|
color: #6e727a;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
.topics {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user