From 20b0ce2db27b64a60de60aee05dedd448099e330 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期一, 08 七月 2024 10:12:16 +0800
Subject: [PATCH] xiugai

---
 src/views/riskWarningSys/warningBigScreen/indexs/components/dan.vue |  398 +++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 274 insertions(+), 124 deletions(-)

diff --git a/src/views/riskWarningSys/warningBigScreen/indexs/components/dan.vue b/src/views/riskWarningSys/warningBigScreen/indexs/components/dan.vue
index 15e93f2..6c9d5f1 100644
--- a/src/views/riskWarningSys/warningBigScreen/indexs/components/dan.vue
+++ b/src/views/riskWarningSys/warningBigScreen/indexs/components/dan.vue
@@ -1,56 +1,45 @@
 <template>
-    <div id="descCont" class="dark-desc">
-      <div class="des-tit">
-        <div>隐患等级分布与隐患整改率</div>
-        <dv-decoration8 :color="lineColor" :reverse="true" style="width:100%;" />
+  <div>
+    <div class="tit">
+      <div class="title">隐患等级</div>
+    </div>
+    <div class="chart-cont">
+      <div class="chart">
+        <danger :size="2.5" @getData="getData"></danger>
       </div>
-      <div class="des-main">
-        <div>
-          <h4 v-if="descContent.detail && descContent.detail.heavyRiskCount">
-            重大隐患数量:{{descContent.detail.heavyRiskCount}}
-          </h4>
-          <h4 v-else>
-            重大隐患数量:0
-          </h4>
+      <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>
+              <dv-decoration8 :color="lineColor" :reverse="true" style="width:100%;" />
+            </div>
+            <div class="des-main">
+              <div>
+                <h4>
+                  A级:{{descContent.a}}
+                </h4>
+                <h4>
+                  B级:{{descContent.b}}
+                </h4>
+                <h4>
+                  C级:{{descContent.c}}
+                </h4>
+                <h4>
+                  已完成整改数:{{descContent.rectifyFinish}}
+                </h4>
+                <h4>
+                  未完成整改数:{{descContent.rectifyNotFinish}}
+                </h4>
+              </div>
+            </div>
+          </div>
         </div>
-        <div>
-          <h4 v-if="descContent.detail && descContent.detail.heavyRiskCount && descContent.detail.heavyRiskFinishCount">
-            已完成整改:{{descContent.detail.heavyRiskCount == 0 ? 0 + '%' : Math.round(descContent.detail.heavyRiskFinishCount / descContent.detail.heavyRiskCount * 10000) / 100.00 + '%'}}
-          </h4>
-          <h4 v-else>
-            已完成整改:0%
-          </h4>
-        </div>
-<!--        <div>-->
-<!--          <h4>整改中:8%;</h4>-->
-<!--        </div>-->
-<!--        <div>-->
-<!--          <h4>暂未整改:3%;</h4>-->
-<!--        </div>-->
-        <div>
-          <h4 v-if="descContent.detail && descContent.detail.lightRiskCount">
-            一般隐患数量:{{descContent.detail.lightRiskCount}}
-          </h4>
-          <h4 v-else>
-            一般隐患数量:0
-          </h4>
-        </div>
-        <div>
-          <h4 v-if="descContent.detail && descContent.detail.lightRiskCount && descContent.detail.lightRiskFinishCount">
-            已完成整改:{{descContent.detail.lightRiskCount == 0 ? 0 + '%' : Math.round(descContent.detail.lightRiskFinishCount / descContent.detail.lightRiskCount * 10000) / 100.00 + '%'}}
-          </h4>
-          <h4 v-else>
-            已完成整改:0%
-          </h4>
-        </div>
-<!--        <div>-->
-<!--          <h4>整改中:19%;</h4>-->
-<!--        </div>-->
-<!--        <div>-->
-<!--          <h4>暂未整改:6%;</h4>-->
-<!--        </div>-->
+        <dv-decoration-10 :color="lineColor" style="width:100%;height:5%;"/>
       </div>
     </div>
+  </div>
 </template>
 <script lang="ts">
   import screenfull from 'screenfull';
@@ -76,7 +65,9 @@
   }
   export default defineComponent({
     name: 'danDesc',
-    components: {},
+    components: {
+      danger: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/components/danger.vue')),
+    },
     props:{
       content: Object || null
     },
@@ -106,11 +97,15 @@
         }
       })
 
+      const getData = (data:Object)=>{
+        state.descContent = data
+      }
       // 页面载入时执行方法
       onMounted(() => {
         getTheme();
       });
       return {
+        getData,
         ...toRefs(state)
       };
     }
@@ -118,98 +113,253 @@
 </script>
 
 <style scoped lang="scss">
-  .dark-desc{
+.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: 100%;
+    height: 122px;
+    background: url("../../../../../assets/warningScreen/pagebg-t.png") no-repeat center;
+    background-size: 100% 100%;
 
-    .des-tit{
+
+    .title{
       width: 100%;
-      &>div{
-        font-size: 1.5rem;
-        height: 2.2rem;
-        line-height: 2.2rem;
-        text-align: center;
-        font-weight: bolder;
-        color: #11FEEE;
-      }
-    }
-    .des-main{
-      width: 100%;
-      height: calc(96% - 2.2rem);
-      padding: 1rem;
-      overflow: auto;
-      color: #11FEEE;
-
-      &::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
-      &::scrollbar { width: 0; height: 0; color: transparent; }
-
-      &>div{
-        margin-bottom: 1rem;
-        &>h4{
-          font-size: 1.25rem;
-          display: flex;
-          align-items: center;
-
-          span{
-            margin-right: 10px;
-          }
-          &:first-of-type{
-            margin-bottom: 10px;
-          }
-        }
-
-        &>p{
-          font-size: 1rem;
-          margin-top: 10px;
-        }
-      }
+      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;
     }
   }
-  .light-desc{
-    width: 100%;
-    height: 100%;
 
-    .des-tit{
-      width: 100%;
-      &>div{
-        font-size: 1.5rem;
-        height: 2.2rem;
-        line-height: 2.2rem;
-        text-align: center;
-        font-weight: bolder;
-        color: #333;
+  .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%;
       }
     }
-    .des-main{
+    .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%;
+
+          .des-tit{
+            width: 100%;
+            &>div{
+              font-size: 1.5rem;
+              height: 2.2rem;
+              line-height: 2.2rem;
+              text-align: center;
+              font-weight: bolder;
+              color: #11FEEE;
+            }
+          }
+          .des-main{
+            width: 100%;
+            height: calc(96% - 2.2rem);
+            padding: 1rem;
+            overflow: auto;
+            color: #11FEEE;
+
+            &::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
+            &::scrollbar { width: 0; height: 0; color: transparent; }
+
+            &>div{
+              margin-bottom: 1rem;
+              &>h4{
+                font-size: 1.25rem;
+                display: flex;
+                align-items: center;
+                margin-bottom: 10px;
+
+                span{
+                  margin-right: 10px;
+                }
+              }
+
+              &>p{
+                font-size: 1rem;
+                margin-top: 10px;
+              }
+            }
+          }
+        }
+      }
+    }
+
+  }
+}
+.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: calc(96% - 2.2rem);
-      padding: 1rem;
-      overflow: auto;
+      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;
+    }
+  }
 
-      &::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
-      &::scrollbar { width: 0; height: 0; color: transparent; }
+  .chart-cont{
+    width: 100%;
+    padding: 20px;
+    height: calc(92vh - 122px);
+    display: flex;
+    align-items: flex-start;
+    justify-content: space-between;
 
-      &>div{
-        margin-bottom: 1rem;
-        &>h4{
-          font-size: 1.25rem;
-          display: flex;
-          align-items: center;
+    .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%;
 
-          span{
-            margin-right: 10px;
+      .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%;
+
+          .des-tit{
+            width: 100%;
+            &>div{
+              font-size: 1.5rem;
+              height: 2.2rem;
+              line-height: 2.2rem;
+              text-align: center;
+              font-weight: bolder;
+              color: #333;
+            }
           }
-          &:first-of-type{
-            margin-bottom: 10px;
-          }
-        }
+          .des-main{
+            width: 100%;
+            height: calc(96% - 2.2rem);
+            padding: 1rem;
+            overflow: auto;
+            color: #333;
 
-        &>p{
-          font-size: 1rem;
-          margin-top: 10px;
+            &::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
+            &::scrollbar { width: 0; height: 0; color: transparent; }
+
+            &>div{
+              margin-bottom: 1rem;
+              &>h4{
+                font-size: 1.25rem;
+                display: flex;
+                align-items: center;
+                margin-bottom: 10px;
+
+                span{
+                  margin-right: 10px;
+                }
+              }
+
+              &>p{
+                font-size: 1rem;
+                margin-top: 10px;
+              }
+            }
+          }
         }
       }
     }
+
   }
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.2