<template>
|
<view class="">
|
<z-paging ref="paging" v-model="list" @query="queryList" :refresher-enabled="false"
|
loading-more-no-more-text="没有更多了">
|
<view class="bgc-ff" slot="top">
|
<u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
|
:activeStyle="{color:'#017BFC'}" :scrollable="false">
|
</u-tabs>
|
</view>
|
|
|
<view class="list" v-if="tabIndex == 0">
|
<view class="list-item bgc-ff mb-20" v-for="item in list" :key="item.id" @click="pushPage(item)">
|
<view class="item-title flex a-i-c j-c-s-b mb-20">
|
<text class="f-32 fw">{{getRepairType(item.type)}}</text>
|
<u-tag v-if="item.status == 1" text="待处理" type="warning" plain plainFill></u-tag>
|
<u-tag v-if="item.status == 2" text="处理中" type="success" plain plainFill></u-tag>
|
<u-tag v-if="item.status == 3" text="已处理" type="success" plain plainFill></u-tag>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">时间</text>
|
<text class="f-28 c-66">{{ item.createTime }}</text>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">描述</text>
|
<text class="address f-28 c-66">{{ item.remark}}</text>
|
</view>
|
</view>
|
</view>
|
|
|
|
<view class="list" v-if="tabIndex == 1">
|
<view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k"
|
@click="navTo(i.id,i.reportType,i.status)">
|
<view class="item-title flex a-i-c j-c-s-b mb-20">
|
<text class="f-32 fw">{{i.name}}</text>
|
<u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
|
<u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
|
<u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
|
<u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">时间</text>
|
<text class="f-28 c-66">{{i.createTime}}</text>
|
</view>
|
<view class="item-row flex a-i-c j-c-s-b">
|
<text class="f-28">地址</text>
|
<text class="address f-28 c-66">{{i.addressName || ""}}</text>
|
</view>
|
</view>
|
</view>
|
|
|
</z-paging>
|
</view>
|
</template>
|
|
<script>
|
import {
|
getPage
|
} from '@/api/task/taskReportForRepairs'
|
import {
|
getAuditReportingList
|
} from "@/api/reporting/reporting"
|
export default {
|
data() {
|
return {
|
tabList: [
|
|
{
|
name: "公共报事"
|
},
|
{
|
name: "标签事件"
|
},
|
],
|
typeList: [{
|
name: "公共维修",
|
type: 1
|
},
|
{
|
name: "居家维修",
|
type: 2
|
},
|
{
|
name: "矛盾纠纷",
|
type: 3
|
},
|
{
|
name: "投诉举报",
|
type: 4
|
},
|
{
|
name: "企业商户上报",
|
type: 5
|
}
|
],
|
|
tabIndex: 0,
|
list: []
|
}
|
},
|
|
methods: {
|
|
getRepairType(val, key) {
|
for (let i of this.typeList) {
|
if (i.type == val) {
|
return i.name
|
}
|
}
|
},
|
|
changeTab(e) {
|
this.tabIndex = e.index;
|
this.$refs.paging.reload()
|
},
|
|
queryList(pageNo, pageSize) {
|
if (this.tabIndex == 0) {
|
this.getRepairList(pageNo, pageSize)
|
} else {
|
this.getReportList(pageNo, pageSize)
|
}
|
},
|
|
//标签事件列表
|
getReportList(page, size) {
|
getAuditReportingList({
|
page: page,
|
size: size,
|
status: "",
|
houseCode: uni.getStorageSync("siteInfo").houseCode
|
}).then(res => {
|
this.$refs.paging.complete(res.data.records);
|
})
|
},
|
|
//公共报事列表
|
getRepairList(page, size) {
|
getPage({
|
current: page,
|
size: size,
|
createUser: uni.getStorageSync("userInfo").user_id,
|
type: ""
|
}).then(res => {
|
this.$refs.paging.complete(res.data.records);
|
})
|
},
|
|
navTo(id, type, status) {
|
if (status == 4) {
|
if (uni.getStorageSync("activeRole").roleName == "民警") {
|
this.navToDetail(type, id)
|
} else {
|
this.navToEdit(type, id);
|
}
|
} else {
|
this.navToDetail(type, id)
|
}
|
},
|
|
navToEdit(type, id) {
|
if (type == 1) {
|
this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
|
} else if (type == 2) {
|
this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`)
|
} else if (type == 3 || type == 4 || type == 5) {
|
this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
|
} else if (type == 6) {
|
this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`)
|
}
|
},
|
|
navToDetail(type, id) {
|
if (type == 1) {
|
this.$u.func.globalNavigator(`/subPackage/workbench/views/bailReportDetail?id=${id}`)
|
} else if (type == 2) {
|
this.$u.func.globalNavigator(`/subPackage/workbench/views/hotelReportDetail?id=${id}`)
|
} else if (type == 3 || type == 4 || type == 5) {
|
this.$u.func.globalNavigator(`/subPackage/workbench/views/labelReportDetail?id=${id}`)
|
} else if (type == 6) {
|
this.$u.func.globalNavigator(`/subPackage/workbench/views/schoolReportDetail?id=${id}`)
|
}
|
},
|
|
pushPage(item) {
|
const data = JSON.stringify(item)
|
// this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id)
|
this.$u.func.globalNavigator(`/subPackage/workbench/views/reportDetail?data=${data}&from=record`)
|
}
|
|
|
}
|
|
}
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #F5F5F5;
|
}
|
|
.list {
|
margin: 20rpx 30rpx 0;
|
}
|
|
.list-item {
|
padding: 0 30rpx 20rpx;
|
border-radius: 8rpx;
|
|
.item-title {
|
padding: 30rpx 0;
|
border-bottom: 1px solid #F5F5F5;
|
}
|
|
.item-row {
|
padding: 10rpx 0;
|
|
.address {
|
width: 75%;
|
text-align: right;
|
}
|
}
|
}
|
</style>
|