马宇豪
2024-07-08 20b0ce2db27b64a60de60aee05dedd448099e330
src/views/riskWarningSys/warningBigScreen/indexs/components/risk.vue
@@ -1,38 +1,45 @@
<template>
  <div>
    <div class="tit">
      <div class="title">隐患趋势</div>
    </div>
    <div class="chart-cont">
      <div class="chart">
        <risk :size="2.5" @getData="getData"></risk>
      </div>
      <div class="chart-right">
        <dv-decoration-10 :color="lineColor" style="width:100%;height:5%;" />
        <div class="charts-des">
    <div id="descCont" class="dark-desc">
      <div class="des-tit">
        <div>隐患影响等级分布详情</div>
            <div>隐患趋势详情</div>
        <dv-decoration8 :color="lineColor" :reverse="true" style="width:100%;" />
      </div>
      <div class="des-main">
        <div v-for="(item,index) in descContent.riskData" :key="index">
            <div v-for="(item,index) in descContent" :key="index">
          <div>
            <h4>{{item.depId}}共上报隐患总数:{{item.detail.riskTotalCount }} 个</h4>
                <h2>{{item.time}} 共上报隐患总数:{{item.count }}</h2>
          </div>
          <div>
            <h4>其中:</h4>
                <h3>其中:</h3>
          </div>
          <div>
            <h4>一般隐患数量:{{ item.detail.lightRiskCount }} 个</h4>
                <h4>一般隐患:{{ item.generalDanger }}</h4>
          </div>
          <div>
            <h4>重大隐患数量:{{ item.detail.heavyRiskCount }} 个</h4>
                <h4>重大隐患:{{ item.majorDanger }}</h4>
          </div>
          <div>
            <h4>可能造成死亡的:{{ item.detail.deathCount }} 个</h4>
                <h4>已完成整改:{{ item.rectifyFinish }}</h4>
          </div>
          <div>
            <h4>可能造成重伤的:{{ item.detail.heavyInjureCount}} 个</h4>
                <h4>未完成整改:{{ item.rectifyNotFinish }}</h4>
          </div>
          <div>
            <h4>可能造成轻伤的:{{ item.detail.lightInjureCount }} 个</h4>
          </div>
          <div>
            <h4>一般隐患整改数量:{{ item.detail.lightRiskFinishCount }} 个</h4>
          </div>
          <div>
            <h4>重大隐患整改数量:{{ item.detail.heavyRiskFinishCount }} 个</h4>
          </div>
        </div>
        <dv-decoration-10 :color="lineColor" style="width:100%;height:5%;"/>
        </div>
      </div>
    </div>
@@ -61,7 +68,9 @@
  }
  export default defineComponent({
    name: 'riskDesc',
    components: {},
    components: {
      risk: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/components/risk.vue')),
    },
    props:{
      content: Object || null
    },
@@ -89,14 +98,16 @@
        if(props.content){
          state.descContent = props.content
        }
        console.log(state.descContent,'risk')
      })
      const getData = (data:Array)=>{
        state.descContent = data
      }
      // 页面载入时执行方法
      onMounted(() => {
        getTheme();
      });
      return {
        getData,
        ...toRefs(state)
      };
    }
@@ -104,6 +115,80 @@
</script>
<style scoped lang="scss">
.dark-page{
  width: 100%;
  height: 100%;
  border:1px #5a5959 solid;
  background: url('../../../../../assets/warningScreen/body-bg.jpg');
  padding: 4%;
  .btns{
    position: fixed;
    width: 8%;
    height: 6%;
    right: 5%;
    top: 1.25rem;
    font-size: 1.125rem;
    color: rgb(17, 254, 238);
    cursor: pointer;
  }
  .tit{
    width: 100%;
    height: 122px;
    background: url("../../../../../assets/warningScreen/pagebg-t.png") no-repeat center;
    background-size: 100% 100%;
    .title{
      width: 100%;
      height: 122px;
      line-height: 112px;
      border-radius: 8px;
      margin-bottom: 20px;
      font-size: 2.8rem;
      color: #11feee;
      font-weight: bolder;
      text-align: center;
      letter-spacing: 5px;
    }
  }
  .chart-cont{
    width: 100%;
    padding: 20px;
    height: calc(92vh - 122px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    .chart{
      width: calc((100% - 20px) * 0.63);
      height: 100%;
      padding: 3%;
      background: url("../../../../../assets/warningScreen/pagebg-l.png") no-repeat center;
      background-size: 100% 100%;
      position: relative;
      .selector-2{
        position: absolute;
        top: 5%;
        right: 10%;
        width: 20%;
        font-size: 1.25rem;
        color: #fff;
      }
      .main-chart{
        width: 100%;
        height: 100%;
      }
    }
    .chart-right{
      width: calc((100% - 20px) * 0.37);
      height: 100%;
      .charts-des{
        height: 90%;
        padding: 4%;
        background: url("../../../../../assets/warningScreen/pagebg-r.png") no-repeat center;
        background-size: 100% 100%;
  .dark-desc{
    width: 100%;
    height: 100%;
@@ -131,16 +216,12 @@
      &>div{
        margin-bottom: 1rem;
        &>h4{
          font-size: 1.25rem;
              &>div{
          display: flex;
          align-items: center;
          span{
            margin-right: 10px;
          }
          &:first-of-type{
            margin-bottom: 10px;
          }
        }
@@ -151,6 +232,86 @@
      }
    }
  }
      }
    }
  }
}
.light-page{
  width: 100%;
  height: 100%;
  border:1px #5a5959 solid;
  background: #F0F0F0;
  padding: 4%;
  .btns{
    position: fixed;
    width: 8%;
    height: 6%;
    right: 5%;
    top: 1.25rem;
    font-size: 1.125rem;
    color: #333;
    cursor: pointer;
  }
  .tit{
    width: 100%;
    height: 122px;
    background: url("../../../../../assets/warningScreen/pagebg-t-light.png") no-repeat center;
    background-size: 100% 100%;
    .title{
      width: 100%;
      height: 122px;
      line-height: 112px;
      border-radius: 8px;
      margin-bottom: 20px;
      font-size: 2.8rem;
      color: #333;
      font-weight: bolder;
      text-align: center;
      letter-spacing: 5px;
    }
  }
  .chart-cont{
    width: 100%;
    padding: 20px;
    height: calc(92vh - 122px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    .chart{
      width: calc((100% - 20px) * 0.63);
      height: 100%;
      padding: 3%;
      background: url("../../../../../assets/warningScreen/pagebg-l-light.png") no-repeat center;
      background-size: 100% 100%;
      position: relative;
      .selector-2{
        position: absolute;
        top: 5%;
        right: 10%;
        width: 20%;
        font-size: 1.25rem;
        color: #fff;
      }
      .main-chart{
        width: 100%;
        height: 100%;
      }
    }
    .chart-right{
      width: calc((100% - 20px) * 0.37);
      height: 100%;
      .charts-des{
        height: 90%;
        padding: 4%;
        background: url("../../../../../assets/warningScreen/pagebg-r-light.png") no-repeat center;
        background-size: 100% 100%;
  .light-desc{
    width: 100%;
    height: 100%;
@@ -198,4 +359,9 @@
      }
    }
  }
      }
    }
  }
}
</style>