188 lines
4.6 KiB
Vue
Raw Normal View History

2022-10-17 10:13:22 +08:00
<template>
2023-01-04 14:27:14 +08:00
<Card title="安全管理">
2022-10-17 10:13:22 +08:00
<div class="container">
2023-01-04 14:27:14 +08:00
<div class="woria">
<div class="left">
<div style="color: #5ce2f6; font-size: 10px">
已闭合
<p style="font-size: 16px; color: #fff; margin-bottom: 10px">
2023-01-10 19:45:09 +08:00
{{ safetyPatrolInspection.allRectificationNum }}
</p>
2022-10-17 10:13:22 +08:00
</div>
<div style="color: #5ce2f6; font-size: 10px">
2023-01-04 14:27:14 +08:00
占比
<p style="font-size: 16px; color: #fff">
{{ safetyPatrolInspection.allRectificationRatio }}%
</p>
2022-10-17 10:13:22 +08:00
</div>
</div>
2023-01-04 14:27:14 +08:00
<div class="right">
<div style="color: #e7622a; font-size: 10px">
未闭合
<p style="font-size: 16px; color: #fff; margin-bottom: 10px">
2023-01-10 19:45:09 +08:00
{{ safetyPatrolInspection.allNoRectificationNum }}
</p>
2022-10-17 10:13:22 +08:00
</div>
2023-01-04 14:27:14 +08:00
<div style="color: #e7622a; font-size: 10px">
占比
<p style="font-size: 16px; color: #fff">
{{ safetyPatrolInspection.allNoRectificationRatio }}%
</p>
2022-10-17 10:13:22 +08:00
</div>
2023-01-04 14:27:14 +08:00
</div>
<div class="woriaTwo">
<JRingChart
:title="{
text: '安全巡检',
subTitle: `${safetyPatrolInspection.allTotalNum}`,
fontSize: 16,
x: '49%',
y: '55'
2023-01-04 14:27:14 +08:00
}"
:color="['#6EE4F0', '#E7622A']"
:data="[
{
value: safetyPatrolInspection.allRectificationNum,
name: '已巡检'
2023-01-04 14:27:14 +08:00
},
{
value: safetyPatrolInspection.allNoRectificationNum,
name: '未巡检'
}
2023-01-04 14:27:14 +08:00
]"
:radius="['71%', '101%']"
2023-01-04 14:27:14 +08:00
:legend="false"
/>
</div>
</div>
<div class="count1">
总次数<span>96</span>
<!-- 总次数<span>{{ allTotalNum2 }}</span
> -->
2023-01-04 14:27:14 +08:00
</div>
<div class="count2">
本周次数<span>{{ safetyPatrolInspection.weekTotalNum }}</span
2023-01-04 14:27:14 +08:00
>
2022-10-17 10:13:22 +08:00
</div>
</div>
</Card>
</template>
<script>
import Card from '../components/Card'
import JRingChart from '../../common/jChart/pie/JRingChart.vue'
import { getAllWeekDataHdirApi } from '@/assets/js/api/zhongjianFourth'
2023-01-11 02:18:25 +08:00
import { resourceManagement } from '@/assets/js/api/zhongjianFourth'
import { mapState } from 'vuex'
2022-10-17 10:13:22 +08:00
export default {
2023-01-04 14:27:14 +08:00
components: { Card, JRingChart },
2022-10-17 10:13:22 +08:00
data() {
return {
2023-01-04 14:27:14 +08:00
safetyPatrolInspection: {
allTotalNum: 0,
allRectificationNum: 0,
allNoRectificationNum: 0,
allRectificationRatio: 0,
allNoRectificationRatio: 0,
weekTotalNum: 0
},
allTotalNum2: 0
}
2022-10-17 10:13:22 +08:00
},
created() {
2023-01-11 02:18:25 +08:00
this.getList()
this.getAllTodayDataHdir()
2022-10-17 10:13:22 +08:00
},
2023-01-04 14:27:14 +08:00
mounted() {},
computed: {
...mapState(['projectSn'])
2022-10-17 10:13:22 +08:00
},
methods: {
2023-01-04 14:27:14 +08:00
getAllTodayDataHdir() {
getAllWeekDataHdirApi({ projectSn: this.projectSn }).then((res) => {
this.safetyPatrolInspection = res.result
console.log(
this.safetyPatrolInspection,
'安全管理========================='
)
})
},
2023-01-11 02:18:25 +08:00
getList() {
resourceManagement({ projectSn: this.projectSn }).then((res) => {
console.log('安全管理getAllTodayDataHdir------------111', res)
2023-01-11 02:18:25 +08:00
this.allTotalNum2 = parseInt(res.result.constructionDay * 1.2)
})
}
}
}
2022-10-17 10:13:22 +08:00
</script>
<style lang="less" scoped>
.container {
display: flex;
box-sizing: border-box;
padding: 10px 0;
width: 100%;
height: 100%;
2023-01-04 14:27:14 +08:00
.woria {
width: 100%;
height: calc(115% - 92px);
2023-03-13 17:56:46 +08:00
background: url(../assets/images/common/blueH.png) no-repeat;
background-size: 99% 101%;
2023-01-04 14:27:14 +08:00
// margin-top: 10px;
.woriaTwo {
2022-10-17 10:13:22 +08:00
width: 100%;
height: 104%;
margin: 3px 0 0 1px;
2022-10-17 10:13:22 +08:00
}
}
2023-01-04 14:27:14 +08:00
.left {
float: left;
margin: 30px 0 0 85px;
}
.right {
float: right;
margin: 30px 75px 0 0px;
}
.countBox {
display: flex;
}
.count1,
.count2 {
width: 300px;
padding-top: 170px;
font-size: 16px;
color: rgba(110, 228, 240, 0.85);
display: flex;
align-items: center;
position: absolute;
2023-01-04 14:27:14 +08:00
// margin-left: -300px;
// margin: 0 322px 0 -413px;
span {
width: 90px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 20px;
color: #fff;
background: url(../assets/images/sourse/bg-car-count.png) no-repeat;
background-size: 100% 100%;
margin-right: 10px;
margin-left: 10px;
}
}
.count1 {
margin: 5px 0 0 0px;
}
.count2 {
margin: 5px 0 0 225px;
2023-01-04 14:27:14 +08:00
}
2022-10-17 10:13:22 +08:00
}
</style>