206 lines
4.1 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="质量管理" >
<div class="container" >
<div class="left">
<div class="woriaTwo">
<JRingChart
:title="{
text: '质量巡检',
subTitle: `${safetyPatrolInspection.todayTotalNum}`,
fontSize: 16,
}"
:color="['#6EE4F0', '#E7622A']"
:data="[
{
value: 5,
name: '已巡检',
},
{
value: 5,
name: '未巡检',
},
]"
:radius="['43%', '60%']"
:legend="false"
/>
2022-12-17 11:46:32 +08:00
</div>
</div>
2023-01-04 14:27:14 +08:00
<div class="right">
<div class="legend">
<div class="row">
<span >已闭合<span style="color:#6EE4F0;margin-left:5px">3300</span></span>
<span >占比<span style="color:#6EE4F0;margin-left:5px">75%</span></span>
</div>
</div>
<div class="legend">
<div class="row">
<span>未闭合<span style="color:#E7622A;margin-left:5px">1100</span></span>
<span>占比<span style="color:#E7622A;margin-left:5px">25%</span></span>
</div>
</div>
</div>
<div class="count1" >
总次数<span>2700</span
>
</div>
<div class="count2" >
本周次数<span>300</span
>
</div>
2022-10-17 10:13:22 +08:00
</div>
2023-01-04 14:27:14 +08:00
2022-10-17 10:13:22 +08:00
</Card>
</template>
<script>
import Card from '../components/Card'
2023-01-04 14:27:14 +08:00
import JRingChart from "../../common/jChart/pie/JRingChart.vue";
import { getAllTodayDataHdirApi } from "@/assets/js/api/zhongjianFourth";
import { mapState } from "vuex";
2022-12-20 11:25:19 +08:00
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: {
hiddenDangerInspectRecordList: [],
},
2022-10-17 10:13:22 +08:00
}
},
created() {
2023-01-04 14:27:14 +08:00
this.getAllTodayDataHdir();
},
computed: {
...mapState(["projectSn"]),
2022-10-17 10:13:22 +08:00
},
methods: {
2023-01-04 14:27:14 +08:00
getAllTodayDataHdir() {
getAllTodayDataHdirApi({ projectSn: this.projectSn }).then((res) => {
console.log(res, "getAllTodayDataHdir");
this.safetyPatrolInspection = res.result;
2022-12-20 11:25:19 +08:00
});
},
2022-10-17 10:13:22 +08:00
}
}
</script>
<style lang="less" scoped>
2023-01-04 14:27:14 +08:00
2022-12-17 11:46:32 +08:00
.container {
2023-01-04 14:27:14 +08:00
display: flex;
2022-12-17 11:46:32 +08:00
width: 100%;
height: 100%;
padding: 8px 15px;
2023-01-04 14:27:14 +08:00
.left{
width: 100%;
height: 100%;
margin: -30px 0px 0px -77px;
}
.woriaTwo{
width: 100%;
height: 100%;
}
.right{
width: 300px;
height: 130px;
background: url('~@/assets/images/zjsj/spliting.png');
background-size: 100% 100%;
margin-right: 23px;
margin-top: 15px;
.legend {
position: relative;
2023-01-04 14:27:14 +08:00
width: 160px;
margin: 37px 0 -20px 20px;
&::before {
content: "";
position: absolute;
top: 1px;
left: -10px;
width: 6px;
height: 6px;
}
&:nth-child(1)::before {
width: 12px;
height: 12px;
background-color: #6ee4ef;
}
&:nth-child(2)::before {
width: 12px;
height: 12px;
background-color: #e7622a;
}
.row {
display: flex;
span {
text-align: center;
&:first-child {
width: 60%;
margin-top: -8px;
}
&:last-child {
width: 40%;
margin-top: -8px;
}
}
&:first-child {
font-size: 14px;
}
&:last-child {
height: 30px;
line-height: 30px;
font-size: 12px;
// color: #6ae3eb;
}
2022-10-17 10:13:22 +08:00
}
}
2023-01-04 14:27:14 +08:00
}
.count1,
.count2 {
width: 300px;
padding-top: 170px;
font-size: 16px;
color: rgba(110, 228, 240, 0.85);
display: flex;
align-items: center;
position: absolute;
// 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;
2022-10-17 10:13:22 +08:00
}
}
2023-01-04 14:27:14 +08:00
.count1{
margin: 20px 0 0 -13px;
}
.count2{
margin: 20px 0 0 210px;
}
}
2022-10-17 10:13:22 +08:00
</style>