<template>
|
<view class="">
|
<!-- <view class="block bgc-ff mb-20 mt-20">
|
<view class="caption">
|
<view class="flex a-i-c">
|
<view class="line"></view>
|
<text class="f-32 fw">走访提醒</text>
|
</view>
|
</view>
|
<view class="row flex j-c-s-a">
|
<view class="flex f-d-c a-i-c">
|
<text class="fw c-main f-36 mb-20">3</text>
|
<text class="f-28">本周</text>
|
</view>
|
<view class="flex f-d-c a-i-c">
|
<text class="fw c-main f-36 mb-20">3</text>
|
<text class="f-28">半月</text>
|
</view>
|
<view class="flex f-d-c a-i-c">
|
<text class="fw c-main f-36 mb-20">3</text>
|
<text class="f-28">本月</text>
|
</view>
|
</view>
|
</view> -->
|
<view class="nav bgc-ff mt-20" v-if="comprehensive.length">
|
<!-- <view class="caption">
|
<view class="flex a-i-c">
|
<view class="line"></view>
|
<text class="f-32 fw">综治任务</text>
|
</view>
|
</view> -->
|
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(i.path)" v-for="i in comprehensive">
|
<text class="f-28">{{i.name}}</text>
|
<view class="flex">
|
<block v-if="i.count > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{i.count}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
|
<!-- <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/cshw')" v-for="i in comprehensive">
|
<text class="f-28">场所审核</text>
|
<view class="flex">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">3</view>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/report')">
|
<text class="f-28">报事报修</text>
|
<view class="flex">
|
<block v-if="repairsCount > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{repairsCount}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/house/list/auditList')">
|
<text class="f-28">住户审核</text>
|
<view class="flex">
|
<block v-if="countInfo.zhufang > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{countInfo.zhufang}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/task/taskList')">
|
<text class="f-28">标签事件</text>
|
<view class="flex">
|
<block v-if="comprehensiveTask > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{countInfo.comprehensiveTask}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo()">
|
<text class="f-28">走访提醒</text>
|
<view class="flex">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">3</view>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/rental')">
|
<text class="f-28">出租房管理</text>
|
<view class="flex">
|
<block v-if="countInfo.chuzhu > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{countInfo.chuzhu}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view> -->
|
|
</view>
|
|
<!-- <view class="nav bgc-ff mb-20">
|
<view class="caption">
|
<view class="flex a-i-c">
|
<view class="line"></view>
|
<text class="f-32 fw">住建</text>
|
</view>
|
</view>
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/workbench/views/rental')">
|
<text class="f-28">出租房管理</text>
|
<view class="flex">
|
<block v-if="countInfo.chuzhu > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{countInfo.chuzhu}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
</view>
|
</view> -->
|
<view class="nav bgc-ff mb-20 mt-20" v-if="securityList.length">
|
<!-- <view class="caption">
|
<view class="flex a-i-c">
|
<view class="line"></view>
|
<text class="f-32 fw">公安任务</text>
|
</view>
|
</view> -->
|
|
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(`${i.path}&from=task`)" v-for="i in securityList">
|
<text class="f-28">{{i.name}}</text>
|
<view class="flex">
|
<block v-if="i.count > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{i.count}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view>
|
<!-- <view class="flex">
|
<block v-if="bailCount > 0">
|
<text class="f-28 c-99">待处理</text>
|
<view class="dot bgc-main">{{bailCount}}</view>
|
</block>
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
</view> -->
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import {
|
getCountTypeNumber
|
} from "@/api/task/task.js"
|
import {
|
getRepairsStatistics
|
} from "@/api/task/taskReportForRepairs.js"
|
export default {
|
data() {
|
return {
|
navList: [{
|
name: "",
|
|
}],
|
repairsCount: 0,
|
countInfo: {},
|
securityList: [],
|
comprehensive: [],
|
bailCount: 0
|
}
|
},
|
|
onLoad() {
|
this.getMenuList()
|
},
|
onShow() {
|
this.getCount();
|
// this.getRepairsCount();
|
},
|
|
methods: {
|
|
getMenuList() {
|
let list = uni.getStorageSync("taskMenu");
|
if (list.length) {
|
for (let i of list) {
|
i.count = 0;
|
if (i.remark == '1') {
|
if (i.name == "报事报修") {}
|
this.comprehensive.push(i)
|
} else {
|
this.securityList.push(i)
|
}
|
}
|
}
|
},
|
getCount() {
|
let roleType = 0
|
if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
|
roleType = 1
|
}
|
getCountTypeNumber({
|
neiCode: uni.getStorageSync("siteInfo").id,
|
roleType: roleType
|
}).then(res => {
|
if (res.code == 200) {
|
let data = res.data;
|
this.countInfo = res.data;
|
for (let i of this.comprehensive) {
|
if (i.name.trim() == "场所审核") {
|
i.count = data.cssh;
|
} else if (i.name.trim() == "报事报修") {
|
i.count = data.bsbx;
|
} else if (i.name.trim() == "住户审核") {
|
i.count = data.zhsh
|
} else if (i.name.trim() == "租户确认") {
|
i.count = data.czsh
|
} else if (i.name.trim() == "走访任务") {
|
i.count = data.zfrw;
|
} else if (i.name.trim() == "走访任务") {
|
i.count = data.zfrw;
|
}
|
}
|
// this.bailCount = data.qbhs
|
|
for (let i of this.securityList) {
|
if (i.name.trim() == "二手交易") {
|
i.count = data.bqsj
|
} else if (i.name.trim() == "消防自查") {
|
i.count = data.xfzc;
|
} else if (i.name.trim() == "消防隐患整改") {
|
i.count = data.xfyhzg;
|
} else if (i.name.trim() == "居住证申请") {
|
i.count = data.jzzsq;
|
} else if (i.name.trim() == "从业人员审核") {
|
i.count = data.cyrysh;
|
} else if (i.name.trim() == "无诈申请") {
|
i.count = data.wztj;
|
} else if (i.name.trim() == "校园安全隐患排查") {
|
i.count = data.xyyh;
|
} else if (i.name.trim() == "校园纠纷矛盾") {
|
i.count = data.xyjfmd;
|
} else if (i.name.trim() == "校园安全检查") {
|
i.count = data.xyaqjc;
|
} else {
|
i.count = data.qbhs;
|
}
|
}
|
}
|
})
|
},
|
getRepairsCount() {
|
getRepairsStatistics().then(res => {
|
if (res.code == 200) {
|
this.repairsCount = res.data;
|
let index = this.comprehensive.findIndex(item => item.name == "报事报修")
|
this.comprehensive[index].count = res.data;
|
}
|
})
|
},
|
|
|
navTo(url) {
|
if (!url || url == "暂无") {
|
uni.showToast({
|
title: "功能开发中~",
|
icon: "none"
|
})
|
} else {
|
console.log("url===>", url)
|
uni.navigateTo({
|
url: `${url}?from=task`,
|
complete: (res) => {
|
console.log("errr=>", res)
|
}
|
})
|
// this.$u.func.globalNavigator(`${url}?from=task`)
|
}
|
}
|
}
|
|
}
|
</script>
|
|
<style lang="scss">
|
page {
|
background-color: #F5F5F5;
|
}
|
|
.block {
|
width: 690rpx;
|
margin: 20rpx auto;
|
border-radius: 4rpx;
|
|
|
|
.row {
|
padding: 30rpx 0 34rpx;
|
}
|
}
|
|
.caption {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
border-bottom: 1px solid #F5F5F5;
|
|
.line {
|
width: 6rpx;
|
height: 28rpx;
|
background-color: #017BFC;
|
margin-right: 14rpx;
|
}
|
}
|
|
.nav {
|
width: 690rpx;
|
margin: 0 auto;
|
|
.nav-item {
|
width: 100%;
|
padding: 36rpx 30rpx;
|
box-sizing: border-box;
|
border-bottom: 1px solid #F5F5F5;
|
}
|
|
.dot {
|
width: 32rpx;
|
height: 32rpx;
|
line-height: 32rpx;
|
border-radius: 50%;
|
color: #fff;
|
text-align: center;
|
font-size: 24rpx;
|
margin: 0 10rpx 0 20rpx;
|
}
|
}
|
|
.mb-20 {
|
margin-bottom: 20rpx;
|
}
|
|
.mt-20 {
|
margin-top: 20rpx;
|
}
|
</style>
|