巡查上报

This commit is contained in:
liuye
2023-09-05 14:15:00 +08:00
parent 199732d477
commit bfa356e657
4 changed files with 261 additions and 4 deletions

View File

@@ -93,7 +93,7 @@
</div>
</div>
<div class="fixedBtn">
<div class="fixedBtn" v-if="isShowBtn">
<div class="status00" v-if="data.eventStatus == 0">
<div class="columns border-r" @click="toContent(1)">
<img src="./components/img/zhuanjiao.png" alt="" />
@@ -137,7 +137,8 @@ export default {
data: {},
id: '',
doItShow: false,
evaluation: {}
evaluation: {},
isShowBtn: false
}
},
computed: {
@@ -171,6 +172,7 @@ export default {
},
watch: {},
onLoad(o) {
this.isShowBtn = o.isShowBtn == 1 ? true : false
this.id = o.id
this.$dict.load('clapEventStatus','residentEventSource', 'residentReportDoStatus').then(() => {
this.getDetail()

View File

@@ -151,7 +151,7 @@ export default {
},
goDetail(item) {
uni.navigateTo({url: `./Detail?id=${item.id}`})
uni.navigateTo({url: `./Detail?id=${item.id}&isShowBtn=1`})
},
change(index) {

View File

@@ -11,7 +11,7 @@
<div class="info-content">
<div class="title">概况总览</div>
<div class="el-row">
<div class="item" v-for="(item, index) in todayList" :key="index">
<div class="item" v-for="(item, index) in todayList" :key="index" @click="toList(item)">
<h2>{{item.value}}</h2>
<p>{{item.label}}</p>
</div>
@@ -289,6 +289,15 @@ export default {
handleSelectGird(v) {
this.selectGird = v || {}
this.getStatistics()
},
toList(row) {
var searchType = '', typeList= ['', '', '累计上报', '今日上报', '今日办结', '办理中']
typeList.map((item, index) => {
if(item == row.label) {
return searchType = index
}
})
uni.navigateTo({url: `./StatisticsList?title=${row.label}&searchType=${searchType}&girdId=${this.selectGird.id}`})
}
},
}

View File

@@ -0,0 +1,246 @@
<template>
<div class="list-content">
<template>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
<div class="card-top">
<div class="titles">{{ item.content }}</div>
<div class="types">
<span>事件类型</span>
<span class="types-right">{{ item.groupName }}</span>
</div>
<div class="types">
<span>事件来源</span>
<span class="types-right">{{ $dict.getLabel('residentEventSource', item.eventSource) }}</span>
</div>
<div class="gards">
<span>所属网格</span>
<span class="gards-right">{{ item.girdName }}</span>
</div>
</div>
<div class="status" :class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'"
v-if="item.eventStatus">
<span class="icon"></span>
<span>
{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}
</span>
</div>
</template>
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<div class="pad-b120" v-if="datas.length"></div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
props: {},
data() {
return {
datas: [],
current: 1,
pages: 0,
searchType: '',
title: '',
girdId: ''
}
},
computed: {
...mapState(['user']),
listType() {
return this.$dict.getDict('clapEventStatusAll')
}
},
onLoad(options) {
console.log(options)
this.searchType = options.searchType
this.title = options.title
this.girdId = options.girdId
},
onShow() {
document.title = this.title
this.current = 1
this.getList()
},
created() {
this.$dict.load('clapEventStatus', 'clapEventStatusAll', 'clapEventStatusHistory', 'residentEventSource').then(() => {
this.getList()
})
},
methods: {
getListInit() {
this.current = 1
this.getList()
},
nextPage() {
this.current++
this.getList()
},
getList() {
let {current, girdId, searchType} = this
this.$http.post(`/app/apppatrolreportinfo/listByStatus`, null, {
params: {
size: 10,
current,
girdId,
searchType
},
}).then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
this.$forceUpdate()
}
})
},
goDetail(item) {
uni.navigateTo({url: `./Detail?id=${item.id}&isShowBtn=0`})
},
},
onReachBottom() {
this.nextPage()
}
}
</script>
<style scoped lang="scss">
.list-content {
height: 100%;
padding: 0;
width: 100vw;
.select-top {
background: #fff;
display: flex;
padding: 24px 0;
.tab-item {
flex: 1;
text-align: center;
line-height: 48px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
img {
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
.tab-item:nth-of-type(1) {
border-right: 1px solid #eee;
}
}
::v-deep .AiTopFixed .content {
padding: 0;
}
::v-deep .AiCard {
background: #f3f6f9;
padding: 24px 40px 0 32px;
.start {
background: #fff;
border-radius: 16px;
.card-top {
padding: 32px;
.titles {
margin-bottom: 34px;
font-size: 32px;
font-weight: 500;
color: #333333;
line-height: 1.4;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.types,
.gards {
margin-top: 8px;
font-size: 26px;
.types-right,
.gards-right {
margin-left: 32px;
color: #333333;
}
}
}
.status {
padding: 32px;
border-top: 1px solid #dddddd;
.icon {
display: inline-block;
width: 8px;
height: 8px;
vertical-align: middle;
margin-right: 8px;
}
}
.status0 {
color: #ff883c;
.icon {
background: #ff883c;
}
}
.status1 {
color: #1aaaff;
.icon {
background: #1aaaff;
}
}
.status2 {
color: #42d784;
.icon {
background: #42d784;
}
}
.status3 {
color: #ff4466;
.icon {
background: #ff4466;
}
}
}
}
// ::v-deep .AiCard:last-child {
// padding-bottom: 24px;
// }
.pad-b120 {
background-color: #f3f6f9;
padding-bottom: 120px;
}
.grid-name {
display: inline-block;
font-size: 32px;
color: #333;
}
}
</style>