2024-08-15 16:11:23 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<u-cell-group>
|
2024-08-29 09:43:51 +08:00
|
|
|
<u-cell v-for="(item, index) in baseList" :key="index" isLink :url="item.url" clickable>
|
2024-08-15 16:11:23 +08:00
|
|
|
<view slot="title">{{ item.title }}</view>
|
|
|
|
<view slot="value">
|
|
|
|
<u-badge :value="item.NUM"></u-badge>
|
|
|
|
</view>
|
|
|
|
</u-cell>
|
|
|
|
</u-cell-group>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { getSafetyenvironmentalRedPoint } from '../../api';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
baseList: [
|
|
|
|
{
|
|
|
|
title: '安全环保检查发起',
|
|
|
|
url: '/safetyEnvirSubPackages/pages/initiate/list',
|
|
|
|
vector: '0',
|
|
|
|
NUM: 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '检查人确认',
|
|
|
|
url: '/safetyEnvirSubPackages/pages/inspector-confirms/list',
|
|
|
|
vector: '1',
|
|
|
|
NUM: 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '隐患指派及验收',
|
|
|
|
url: '/safetyEnvirSubPackages/pages/inspector-archives/list',
|
|
|
|
vector: '2',
|
|
|
|
NUM: 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '申辩记录',
|
|
|
|
url: '/safetyEnvirSubPackages/pages/defense-record/list',
|
|
|
|
vector: '3',
|
|
|
|
NUM: 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
userInfo() {
|
|
|
|
return this.$store.getters.getUserInfo
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onShow(event) {
|
|
|
|
this.getRedPoint()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
fnNavigator(e) {
|
|
|
|
uni.$u.route({
|
|
|
|
url: this.baseList[e].url
|
|
|
|
})
|
|
|
|
},
|
|
|
|
async getRedPoint() {
|
|
|
|
let resData = await getSafetyenvironmentalRedPoint({
|
|
|
|
CORPINFO_ID: this.userInfo.CORPINFO_ID,
|
|
|
|
INSPECTION_USER_ID: this.userInfo.USER_ID,
|
|
|
|
INSPECTED_SITEUSER_ID: this.userInfo.USER_ID,
|
|
|
|
INSPECTION_ORIGINATOR_ID: this.userInfo.USER_ID
|
|
|
|
});
|
|
|
|
|
|
|
|
for (const baseListKey in this.baseList) {
|
|
|
|
if (this.baseList[baseListKey].vector === '0') {
|
|
|
|
this.baseList[baseListKey].NUM = resData.repulseCount.repulseCount ? resData.repulseCount.repulseCount : 0
|
|
|
|
}
|
|
|
|
if (this.baseList[baseListKey].vector === '1') {
|
|
|
|
this.baseList[baseListKey].NUM = resData.confirmCount.confirmCount ? resData.confirmCount.confirmCount : 0
|
|
|
|
}
|
|
|
|
if (this.baseList[baseListKey].vector === '2') {
|
|
|
|
this.baseList[baseListKey].NUM = resData.repulseAndCheckCount.repulseAndCheckCount ? resData.repulseAndCheckCount.repulseAndCheckCount : 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss"></style>
|