|
@@ -0,0 +1,338 @@
|
|
|
+<template>
|
|
|
+ <div class="item danger-component">
|
|
|
+ <div class="title">隐患</div>
|
|
|
+ <div class="cont">
|
|
|
+ <div class="part part_1">
|
|
|
+ <div class="part_item">
|
|
|
+ <div class="part_item_title">
|
|
|
+ <img src="../../images/danger_serious.png" alt="">
|
|
|
+ <span>重大隐患</span>
|
|
|
+ </div>
|
|
|
+ <div class="part_item_cont">
|
|
|
+ <div class="status">
|
|
|
+ <div class="state-name">已完成</div>
|
|
|
+ <div class="number">32</div>
|
|
|
+ </div>
|
|
|
+ <div class="status">
|
|
|
+ <div class="state-name unfinished">未完成</div>
|
|
|
+ <div class="number">32</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="part_item ordinary">
|
|
|
+ <div class="part_item_title">
|
|
|
+ <img src="../../images/danger_ordinary.png" alt="">
|
|
|
+ <span>一般隐患</span>
|
|
|
+ </div>
|
|
|
+ <div class="part_item_cont">
|
|
|
+ <div class="status">
|
|
|
+ <div class="state-name">已完成</div>
|
|
|
+ <div class="number">32</div>
|
|
|
+ </div>
|
|
|
+ <div class="status unfinished">
|
|
|
+ <div class="state-name unfinished">未完成</div>
|
|
|
+ <div class="number">12</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="part part_2">
|
|
|
+ <div class="chart-title">最近7天的隐患</div>
|
|
|
+ <div ref="mychart" class="mychart" />
|
|
|
+ </div>
|
|
|
+ <div class="part part_3">
|
|
|
+ <div class="part_item">
|
|
|
+ <div class="part_item_cont">
|
|
|
+ <vuescroll :ops="ops">
|
|
|
+ <div class="info">
|
|
|
+ <div class="info-item">
|
|
|
+ <div class="info_head">
|
|
|
+ <span class="info_head_name">重大隐患</span>
|
|
|
+ <span class="info_head_time">2023.07.11 11:55:45</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-title">
|
|
|
+ <div class="imgbox">
|
|
|
+ <img src="../../images/danger_info_def.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="info-title-cont">{Ⅲ号-770-32002}:采空区封堵是否完好是否完。</div>
|
|
|
+ </div>
|
|
|
+ <div class="tag " />
|
|
|
+ <div class="bottom">
|
|
|
+ <div class="tag error">已超限</div>
|
|
|
+ <div class="name">张三</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <div class="info_head">
|
|
|
+ <span class="info_head_name">一般隐患</span>
|
|
|
+ <span class="info_head_time">2023.07.11 11:55:45</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-title">
|
|
|
+ <div class="imgbox">
|
|
|
+ <img src="../../images/danger_info_def.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="info-title-cont">{Ⅲ号-770-32002}:采空区封堵是否完好是否完。</div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom">
|
|
|
+ <div class="tag success">15天06:06:00</div>
|
|
|
+ <div class="name">李四</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </vuescroll>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import * as echarts from 'echarts'
|
|
|
+import Vuescroll from 'vuescroll'
|
|
|
+export default {
|
|
|
+ name: 'Danger',
|
|
|
+ components: {
|
|
|
+ Vuescroll
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ ops: {
|
|
|
+ bar: {
|
|
|
+ keepShow: false,
|
|
|
+ background: 'rgba(144, 147, 153, 0.4)',
|
|
|
+ onlyShowBarOnScroll: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ chartOptions: {
|
|
|
+ grid: {
|
|
|
+ top: '20%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ boundaryGap: [0, 0.01],
|
|
|
+ axisLabel: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ data: ['5-1', '5-2', '5-3', '5-4', '5-5', '5-6', '5-7']
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value',
|
|
|
+ axisLabel: {
|
|
|
+ color: '#fff'
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: [120, 200, 150, 80, 70, 110, 130],
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: 20,
|
|
|
+ itemStyle: {
|
|
|
+ borderRadius: 1,
|
|
|
+ borderColor: 'rgba(197, 99, 99, 1)',
|
|
|
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
+ {
|
|
|
+ offset: 1,
|
|
|
+ color: 'rgba(197, 99, 99, 1)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ offset: 0,
|
|
|
+ color: 'rgba(197, 99, 99, 0.5)'
|
|
|
+ }
|
|
|
+ ]),
|
|
|
+ borderWidth: 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ var chartDom = this.$refs.mychart
|
|
|
+ var myChart = echarts.init(chartDom)
|
|
|
+ myChart.setOption(this.chartOptions)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initCharts() {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.danger-component{
|
|
|
+ .cont{
|
|
|
+ height: calc(100vh - 450px);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding-top: 15px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .part{
|
|
|
+ &.part_1{
|
|
|
+ .part_item{
|
|
|
+ height: 52px;
|
|
|
+ background: linear-gradient(rgba(238, 85, 59, 0),rgba(238, 85, 59, 0.2));
|
|
|
+ border-radius: 50px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ &.ordinary{
|
|
|
+ background: linear-gradient(rgba(45, 125, 255, 0),rgba(45, 125, 255, 0.2));
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ .part_item_title{
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ img{
|
|
|
+ display: block;
|
|
|
+ width: 52px;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .part_item_cont{
|
|
|
+ height: 100%;
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ .status{
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ &:nth-child(2){
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .state-name{
|
|
|
+ position: relative;
|
|
|
+ padding-left: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #A1B3C8;
|
|
|
+ &::after{
|
|
|
+ display: block;
|
|
|
+ content: "";
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: #38CA9C;
|
|
|
+ position: absolute;
|
|
|
+ left: 2px;
|
|
|
+ top: 6px;
|
|
|
+ }
|
|
|
+ &.unfinished::after{
|
|
|
+ background-color: #EC5034;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .number{
|
|
|
+ font-family: 'Bebas';
|
|
|
+ font-size: 18px;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.part_2{
|
|
|
+ margin-top: 20px;
|
|
|
+ .chart-title{
|
|
|
+ font-size: 14px;
|
|
|
+ color: #38CA9C;
|
|
|
+ }
|
|
|
+ .mychart{
|
|
|
+ width: 100%;
|
|
|
+ height: 160px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.part_3{
|
|
|
+ flex: 1;
|
|
|
+ margin-top: 20px;
|
|
|
+ .info{
|
|
|
+ min-height: 120px;
|
|
|
+ .info-item{
|
|
|
+ margin-bottom: 20px;
|
|
|
+ .info_head{
|
|
|
+ height: 32px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ background:linear-gradient(to right, rgba(31, 89, 175, 0.33),rgba(31, 89, 175, 0.49),rgba(35, 97, 190, 0.12));
|
|
|
+ padding: 0 10px;
|
|
|
+
|
|
|
+ .info_head_name{
|
|
|
+ font-size: 14px;
|
|
|
+ font-family:"Microsoft YaHei UI" ;
|
|
|
+ color: #DFC053;
|
|
|
+ }
|
|
|
+ .info_head_time{
|
|
|
+ font-size: 12px;
|
|
|
+ font-family:"Microsoft YaHei UI" ;
|
|
|
+ color: rgba(255, 255, 255, 0.7);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .info-title{
|
|
|
+ color: #DAE6F8;
|
|
|
+ font-size: 16px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .imgbox{
|
|
|
+ width: 46px;
|
|
|
+ height: 61px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ img{
|
|
|
+ display: block;
|
|
|
+ width: 44px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .info-title-cont{
|
|
|
+ flex:1;
|
|
|
+ padding-left: 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bottom{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding-top: 5px;
|
|
|
+ .tag{
|
|
|
+ width: 64px;
|
|
|
+ height: 28px;
|
|
|
+ border-radius: 43px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 28px;
|
|
|
+ &.error{
|
|
|
+ border:1px solid #EB4A2E;
|
|
|
+ color: #EB4A2E;
|
|
|
+ }
|
|
|
+ &.success{
|
|
|
+ width: 113px;
|
|
|
+ border:1px solid #38CA9C;
|
|
|
+ color: #38CA9C;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .name{
|
|
|
+ color: rgba(255, 255, 255, 0.7);
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|