网格动态
This commit is contained in:
@@ -41,6 +41,7 @@ export default {
|
||||
files: [],
|
||||
lat: '',
|
||||
lng: '',
|
||||
address: '',
|
||||
girdCode: '',
|
||||
girdName: '',
|
||||
girdId: '',
|
||||
@@ -102,6 +103,11 @@ export default {
|
||||
success: res => {
|
||||
this.forms.lng = res.longitude
|
||||
this.forms.lat = res.latitude
|
||||
this.$http.post('/api/appdvcpconfig/apiForward', `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.forms.address = res.data.result.address
|
||||
}
|
||||
})
|
||||
},
|
||||
error: err => {
|
||||
console.log(err)
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
<template>
|
||||
<div class="AppFormReview">
|
||||
<AiTopFixed v-if="tabs.length">
|
||||
<!-- <div class="tab-select">
|
||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index"
|
||||
@click="tabClick(index, item)">{{ item.name }}<span></span></div>
|
||||
</div> -->
|
||||
<u-search class="serach_content" placeholder="请输入内容" :show-action="false" v-model="keyword" @clear="clearSearch"
|
||||
@search="getListInit"></u-search>
|
||||
<div class="select-top">
|
||||
@@ -20,44 +16,24 @@
|
||||
<u-select v-model="showType" :list="typeList" value-name="dictValue" label-name="dictName" @confirm="confirmType"></u-select>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<template v-if="datas.length > 0">
|
||||
<AiCard v-for="(item, i) in datas" :ref="item.id" :key="i" @click.native="toDetail(item)">
|
||||
<template #custom>
|
||||
<div class="titles">{{ item.content }}</div>
|
||||
<!-- <p class="item-content">
|
||||
<u-parse :html="item.content"></u-parse>
|
||||
</p> -->
|
||||
<div class="img-list" v-if="item.files.length">
|
||||
<img :src="items.accessUrl" alt="" v-for="(items, index) in item.files" :key="index" v-if="index < 3"
|
||||
@click.stop="previewImage(item.files, items.accessUrl)"/>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<span class="left">
|
||||
<span class="type">{{ $dict.getLabel('wyGirdNewsType', item.type) }}</span>
|
||||
<span class="times">{{ item.name }}</span>
|
||||
</span>
|
||||
|
||||
<!-- <span class="right">
|
||||
<img src="./img/view-icon.png" alt="">
|
||||
<span>{{ item.viewCount }}</span>
|
||||
</span> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #menu v-if="item.girdMemberId == user.girdMemberId">
|
||||
<div class="menu" @tap.stop="toDetele(item)">删除</div>
|
||||
</template>
|
||||
</AiCard>
|
||||
</template>
|
||||
|
||||
<AiEmpty description="暂无数据" v-else></AiEmpty>
|
||||
|
||||
<div class="user-list">
|
||||
<div class="item" v-for="(item, index) in datas" :key="index" @click="toDetail(item)">
|
||||
<div class="item-top">
|
||||
<div class="title">{{item.content}}</div>
|
||||
<div class="info">所属网格:{{item.girdName}}</div>
|
||||
<div class="info">类型:{{$dict.getLabel('wyGirdNewsType', item.type)}}</div>
|
||||
<div class="info">网格员姓名:{{item.name}}</div>
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
<div class="status" :class="`status${item.status}`">{{$dict.getLabel('auditStatus', item.status)}}</div>
|
||||
<div class="time">{{item.createTime}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!datas.length"></AiEmpty>
|
||||
</div>
|
||||
<AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()"/>
|
||||
</AiFixedBtn>
|
||||
|
||||
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true"
|
||||
:show-title="false" @confirm="delet"></u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -76,7 +52,6 @@ export default {
|
||||
current: 1,
|
||||
size: 10,
|
||||
pages: 0,
|
||||
deletShow: false,
|
||||
tabs: [{name: '全部'}, {name: '我发布的'}],
|
||||
tabIndex: 0,
|
||||
searchGrid: {},
|
||||
@@ -92,7 +67,7 @@ export default {
|
||||
onLoad() {
|
||||
this.searchGrid.girdId = this.user.girdId
|
||||
this.searchGrid.girdName = this.user.girdName
|
||||
this.$dict.load(['wyGirdNewsType']).then(() => {
|
||||
this.$dict.load(['wyGirdNewsType', 'auditStatus']).then(() => {
|
||||
this.typeList = this.$dict.getDict('wyGirdNewsType')
|
||||
this.typeList.unshift({dictName: '全部', dictValue: ''})
|
||||
this.getList()
|
||||
@@ -148,22 +123,6 @@ export default {
|
||||
uni.navigateTo({url: `./Detail?id=${row.id}`})
|
||||
},
|
||||
|
||||
toDetele(item) {
|
||||
this.deletShow = true
|
||||
this.deletId = item.id
|
||||
this.$refs?.[item.id]?.[0]?.handleClose()
|
||||
},
|
||||
|
||||
delet() {
|
||||
this.$http.post(`/app/appgirdnews/delete?id=${this.deletId}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.current = 1
|
||||
this.$u.toast('删除成功!')
|
||||
this.getListInit()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleSelectGird(v) {
|
||||
console.log(v)
|
||||
this.searchGrid = v
|
||||
@@ -261,116 +220,56 @@ export default {
|
||||
margin-bottom: 0!important;
|
||||
}
|
||||
|
||||
::v-deep .AiCard {
|
||||
background: #f3f6f9;
|
||||
position: relative;
|
||||
|
||||
.start {
|
||||
background: #fff;
|
||||
padding: 32px;
|
||||
.user-list {
|
||||
padding: 24px 32px 0 32px;
|
||||
box-sizing: border-box;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
|
||||
.titles {
|
||||
width: 600px;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 16px;
|
||||
line-height: 50px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 44px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.img-list {
|
||||
margin-bottom: 24px;
|
||||
|
||||
img {
|
||||
width: calc(33% - 16px);
|
||||
height: 204px;
|
||||
margin: 0 16px 8px 0;
|
||||
margin-bottom: 24px;
|
||||
.item-top {
|
||||
padding: 24px;
|
||||
.title {
|
||||
line-height: 48px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
margin-bottom: 12px;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.info {
|
||||
line-height: 48px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
.item-bottom {
|
||||
padding: 18px 24px;
|
||||
border-top: 1px solid #E4E5E6;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
.garydiv {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
background: #eeeeee;
|
||||
border-radius: 24px;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
|
||||
.times {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.type {
|
||||
display: inline-block;
|
||||
padding: 0 16px;
|
||||
line-height: 48px;
|
||||
background: #EEE;
|
||||
border-radius: 24px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 28px;
|
||||
.time {
|
||||
line-height: 48px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.font {
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont-iconMore {
|
||||
position: absolute;
|
||||
top: 42px;
|
||||
right: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.mask {
|
||||
.moreMenu {
|
||||
.menu {
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
.status0{
|
||||
color: #FF883C;
|
||||
}
|
||||
.status1{
|
||||
color: #2EA222;
|
||||
}
|
||||
.status2{
|
||||
color: #F46;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,54 @@
|
||||
<template>
|
||||
<div class="Detail">
|
||||
<div class="header-top">
|
||||
<div class="titles">{{ data.content }}</div>
|
||||
<div class="flex">
|
||||
<span class="left">
|
||||
<span class="type">{{ $dict.getLabel('wyGirdNewsType', data.type) }}</span>
|
||||
<span class="times">{{ data.name }}</span>
|
||||
</span>
|
||||
<div class="avatars" v-if="data.name">{{ data.name.substring(data.name.length, data.name.length - 2) }}</div>
|
||||
<div class="right">
|
||||
<div class="names">{{ data.name }}的上报</div>
|
||||
<div class="times">{{ data.createTime }}</div>
|
||||
<!-- <span class="edit-btn" @click="toEdit()" v-if="data.eventStatus != 2 && data.eventStatus != 3">编辑</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="img-list" v-if="data.files">
|
||||
<div class="title">图片</div>
|
||||
<img :src="item.accessUrl" alt="" v-for="(item, index) in data.files" :key="index" @click="previewImage(data.files, item.accessUrl)" />
|
||||
<div class="header-middle">
|
||||
<div class="titles">{{ data.content }}</div>
|
||||
<span class="status" :class="`status${data.status}`">{{$dict.getLabel('auditStatus', data.status)}}</span>
|
||||
<div class="card">
|
||||
<span class="card-left">所属网格</span>
|
||||
<span class="card-right">{{data.girdName}}</span>
|
||||
</div>
|
||||
<div class="card">
|
||||
<span class="card-left">类型</span>
|
||||
<span class="card-right">{{$dict.getLabel('wyGirdNewsType', data.type)}}</span>
|
||||
</div>
|
||||
|
||||
<div class="cards" v-if="data.files && data.files.length">
|
||||
<span class="card-left" style="color:#999">图片</span>
|
||||
</div>
|
||||
|
||||
<img :src="item.url" alt="" v-for="(item, i) in data.files" :key="i" @click="previewImage(data.files, item.accessUrl)"/>
|
||||
</div>
|
||||
<div class="footer-btn" v-if="data.status == 0 && user.girdMemberId == data.girdMemberId">
|
||||
<div class="btn" @click="deletShow=true">删除</div>
|
||||
</div>
|
||||
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true"
|
||||
:show-title="false" @confirm="confirm"></u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
export default {
|
||||
name: 'Detail',
|
||||
data() {
|
||||
return {
|
||||
data: {},
|
||||
id: '',
|
||||
listName: '',
|
||||
selectList: []
|
||||
selectList: [],
|
||||
deletShow: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(o) {
|
||||
this.id = o.id
|
||||
this.$dict.load(['wyGirdNewsType']).then(() => {
|
||||
@@ -51,127 +73,169 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.$http.post(`/app/appgirdnews/delete?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
this.$u.toast('删除成功!')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
height: 100%;
|
||||
padding-top: 26px;
|
||||
}
|
||||
|
||||
.Detail {
|
||||
height: 100%;
|
||||
padding: 0 32px;
|
||||
background: #fff;
|
||||
|
||||
.header-top {
|
||||
padding: 40px 0 32px 0;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
padding: 32px 32px 0;
|
||||
|
||||
.titles {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
width: 100%;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 66px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 16px;
|
||||
.avatars {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
background: #3975c6;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.titles-bottom {
|
||||
margin-top: 16px;
|
||||
font-size: 30px;
|
||||
color: #999999;
|
||||
.right {
|
||||
.names {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.to-left {
|
||||
margin-left: 32px;
|
||||
.times {
|
||||
margin-top: 10px;
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.edit-btn {
|
||||
position: absolute;
|
||||
color: #197df0;
|
||||
top: 32px;
|
||||
right: 32px;
|
||||
width: 150px;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header-middle {
|
||||
padding: 64px 0 48px 0;
|
||||
background: inherit;
|
||||
padding: 0 32px 180px 32px;
|
||||
background: #fff;
|
||||
|
||||
.contsnts {
|
||||
font-size: 36px;
|
||||
line-height: 1.5;
|
||||
.titles {
|
||||
padding: 32px 0;
|
||||
line-height: 1.4;
|
||||
word-break: break-all;
|
||||
background: inherit;
|
||||
font-size: 40px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.status {
|
||||
display: inline-block;
|
||||
margin-bottom: 14px;
|
||||
padding: 4px 8px;
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.status0 {
|
||||
background: #ff883c;
|
||||
}
|
||||
.status1 {
|
||||
background: #2EA222;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: #F46;
|
||||
}
|
||||
.status3 {
|
||||
background: #ff4466;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 34px 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
|
||||
.card-left {
|
||||
width: 46%;
|
||||
font-size: 32px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.card-right {
|
||||
font-size: 32px;
|
||||
|
||||
.u-icon {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .card:last-child {
|
||||
// border-bottom: none;
|
||||
// }
|
||||
|
||||
.cards {
|
||||
padding: 34px 0;
|
||||
}
|
||||
|
||||
img {
|
||||
margin-top: 30px;
|
||||
width: 686px;
|
||||
height: 486px;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
img {
|
||||
width: 204px;
|
||||
height: 204px;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
line-height: 112px;
|
||||
background: #FFF;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
img:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
.garydiv {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
background: #eeeeee;
|
||||
border-radius: 24px;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
|
||||
.times {
|
||||
font-size: 28px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.type {
|
||||
display: inline-block;
|
||||
padding: 0 16px;
|
||||
line-height: 48px;
|
||||
background: #EEE;
|
||||
border-radius: 24px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.font {
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep uni-video {
|
||||
.footer-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 16px 32px 52px 16px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
.btn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 96px;
|
||||
line-height: 94px;
|
||||
border: 1px solid #2183FF;
|
||||
border-radius: 8px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
color: #2183FF;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user