From 60e60cc647fe696a68f211d25d563d677f8b27c2 Mon Sep 17 00:00:00 2001
From: batman <978517621@qq.com>
Date: 星期三, 08 三月 2023 10:54:48 +0800
Subject: [PATCH] 新修改添加页面

---
 src/views/intellectInspect/intelligentLine/index.vue |  186 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 141 insertions(+), 45 deletions(-)

diff --git a/src/views/intellectInspect/intelligentLine/index.vue b/src/views/intellectInspect/intelligentLine/index.vue
index 6fee9ce..af7fa8f 100644
--- a/src/views/intellectInspect/intelligentLine/index.vue
+++ b/src/views/intellectInspect/intelligentLine/index.vue
@@ -1,11 +1,15 @@
 <template>
-    <div class="container">
+    <div class="container" id="screenFull">
         <div class="big-title" @click="goBack()">国泰新华智能巡检系统</div>
         <div style="height: 20px;font-size: 14px;line-height: 20px; color: #00ffff; margin-top: 4px">{{ present }}</div>
         <div class="btns">
             <div class="fullbtn" @click="onScreenfullClick">
                 <div class="toFull">
-                    <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i>
+                    <i class="iconfont" :title="全屏" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i>
+<!--                  <el-icon>-->
+<!--                    <FullScreen v-if="isScreenfull"/>-->
+<!--                    <Close v-else/>-->
+<!--                  </el-icon>-->
                 </div>
                 <div>全屏</div>
             </div>
@@ -16,7 +20,53 @@
         </div>
         <div class="blocks">
             <div>
+            <div class="warning-part">
+              <div class="warn-tit">异常警报:</div>
+              <div class="warn-msg">
+                <div class="warn-item">
+                  <div class="i-tit">
+                    P-8240A 巡检异常!
+                  </div>
+                  <div>
+                    正常值:<span>8-10Mpa</span>
+                  </div>
+                  <div>
+                    巡检值:<span>12Mpa</span>
+                  </div>
+                  <div>
+                    已通知负责人:<span>黄公子</span>
+                  </div>
+                  <div>
+                    负责人电话:<span>15261806176</span>
+                  </div>
+                  <div>
+                    工单回执状态:<span>待响应</span>
+                  </div>
+                </div>
+                <div class="warn-item">
+                  <div class="i-tit">
+                    P-8240A 巡检异常!
+                  </div>
+                  <div>
+                    正常值:<span>8-10Mpa</span>
+                  </div>
+                  <div>
+                    巡检值:<span>12Mpa</span>
+                  </div>
+                  <div>
+                    已通知负责人:<span>黄公子</span>
+                  </div>
+                  <div>
+                    负责人电话:<span>15261806176</span>
+                  </div>
+                  <div>
+                    工单回执状态:<span>待响应</span>
+                  </div>
+                </div>
+              </div>
+            </div>
             <div class="star-pic">
+                <dv-decoration-12 scanDur="5" haloDur="4" class="scan"/>
                 <div class="star-bg"><img src="../../../assets/loginPage/star-bg.png" /></div>
                 <div class="star"><img src="../../../assets/loginPage/device-pic.png" /></div>
             </div>
@@ -63,7 +113,7 @@
                                     <span>参数:</span><span class="target">{{ t.secondReferenceResult + t.quotaUnit }}</span>
                                 </div>
                                 <div>
-                                    <span>巡检结果:</span><span class="target">{{ t.reportResult == null ? '--' : t.reportResult == 0 ? '正常' : '异常' }}</span>
+                                    <span>巡检结果:</span><span class="target">{{ t.reportResult == null ? '--' : t.reportResult == 0 ? '正常' : t.reportResult == 1 ? '异常' : '备' }}</span>
                                 </div>
                             </div>
                         </div>
@@ -87,7 +137,7 @@
 <script lang="ts">
 import screenfull from 'screenfull';
 import { lineApi } from '/@/api/intelligentLine';
-import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick} from 'vue';
+import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick, onActivated} from 'vue';
 import {useRoute} from 'vue-router';
 import { storeToRefs } from 'pinia';
 import { initBackEndControlRoutes } from '/@/router/backEnd';
@@ -100,7 +150,6 @@
 // 定义接口来定义对象的类型
 interface stateType {
     present: string;
-    isScreenfull: boolean;
     path: string;
     socket: any;
     socketData: string;
@@ -117,7 +166,6 @@
         const route = useRoute();
         const state = reactive<stateType>({
             present: '',
-            isScreenfull: false,
             path: '',
             socketData: '',
             socket: null,
@@ -135,6 +183,9 @@
             getLine(state.id)
             getUrl(state.id)
         });
+      onActivated(()=>{
+        onScreenfullClick();
+      })
 
         const dataList = computed(() => {
             return userInfos.value.dataList;
@@ -150,12 +201,9 @@
                     alert('您的浏览器不支持socket');
                 } else {
                     // 实例化socket
-                    // debugger
                     let uid =  userInfos.value.uid.toString()
                     var url = state.path + uid + '*' + id;
-                    console.log(url,'url',uid,'uid')
                     url = url.replace('https', 'ws').replace('http', 'ws');
-                    console.log(url, '获取地址');
                     state.socket = new WebSocket(url);
                     // 监听socket连接
                     state.socket.onopen = () => {
@@ -168,7 +216,6 @@
                     // 监听socket消息
                     state.socket.onmessage = (msg) => {
                         if (msg.data === '连接成功') return;
-                        console.log(msg.data,'data')
                         userInfos.value.dataList = JSON.parse(msg.data);
                     };
                 }
@@ -188,7 +235,7 @@
         const getLine = async (id:string) => {
             let res = await lineApi().getLine({ id: id });
             if (res.data.code === '200') {
-                userInfos.value.dataList = res.data.data;
+                userInfos.value.dataList = res.data.data
             } else {
                 ElMessage({
                     type: 'warning',
@@ -199,18 +246,12 @@
 
         // 全屏
         const onScreenfullClick = () => {
+            const element = document.getElementById('screenFull')
             if (!screenfull.isEnabled) {
                 ElMessage.warning('暂不不支持全屏');
                 return false;
             }
-            screenfull.toggle();
-            screenfull.on('change', () => {
-                if (screenfull.isFullscreen) {
-                    state.isScreenfull = true;
-                } else {
-                    state.isScreenfull = false;
-                }
-            });
+            screenfull.toggle(element);
         };
 
         // 返回
@@ -237,7 +278,7 @@
 };
 </script>
 
-<!-- Add "scoped" attribute to limit CSS to this component only -->
+<!-- Add "scoped" attribute to limit CSS to this components only -->
 <style scoped lang="scss">
     @media screen and (min-width: 1366px) {
         .big-title {
@@ -317,7 +358,7 @@
                 height: 24px;
                 border-radius: 50%;
                 position: absolute;
-                border: 1px solid rgba(0, 225, 255, 0.6);
+                border: 1px solid rgba(0, 114, 255, 0.6);
                 top: -12px;
                 left: 10px;
 
@@ -331,7 +372,7 @@
                     -moz-border-radius: 50%;
                     border: 1px solid #0072ff;
                     border-radius: 50%;
-                    background-color: #00e1ff;
+                    background-color: #0072ff;
                     z-index: 2;
                 }
                 .pulse {
@@ -340,7 +381,7 @@
                     height: 48px;
                     left: -13px;
                     top: -13px;
-                    border: 1px solid #00e1ff;
+                    border: 1px solid #0072ff;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
                     border-radius: 50%;
@@ -352,7 +393,7 @@
                     -webkit-animation-iteration-count: infinite;
                     -moz-animation-iteration-count: infinite;
                     animation-iteration-count: infinite;
-                    box-shadow: 1px 1px 30px #00e1ff;
+                    box-shadow: 1px 1px 30px #0072ff;
                 }
                 .pulse1 {
                     position: absolute;
@@ -360,7 +401,7 @@
                     height: 48px;
                     left: -13px;
                     top: -13px;
-                    border: 1px solid #00e1ff;
+                    border: 1px solid #0072ff;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
                     border-radius: 50%;
@@ -372,7 +413,7 @@
                     -webkit-animation-iteration-count: infinite;
                     -moz-animation-iteration-count: infinite;
                     animation-iteration-count: infinite;
-                    box-shadow: 1px 1px 30px #00e1ff;
+                    box-shadow: 1px 1px 30px #0072ff;
                 }
             }
             & > div {
@@ -525,7 +566,7 @@
                 height: 24px;
                 border-radius: 50%;
                 position: absolute;
-                border: 1px solid rgba(0, 225, 255, 0.6);
+                border: 1px solid rgba(0, 114, 255, 0.6);
                 top: -12px;
                 left: 10px;
 
@@ -537,9 +578,9 @@
                     top: 5px;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
-                    border: 1px solid #0072ff;
+                    border: 1px solid #0072FF;
                     border-radius: 50%;
-                    background-color: #00e1ff;
+                    background-color: #0072FF;
                     z-index: 2;
                 }
                 .pulse {
@@ -548,7 +589,7 @@
                     height: 48px;
                     left: -13px;
                     top: -13px;
-                    border: 1px solid #00e1ff;
+                    border: 1px solid #0072FF;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
                     border-radius: 50%;
@@ -560,7 +601,7 @@
                     -webkit-animation-iteration-count: infinite;
                     -moz-animation-iteration-count: infinite;
                     animation-iteration-count: infinite;
-                    box-shadow: 1px 1px 30px #00e1ff;
+                    box-shadow: 1px 1px 30px #0072FF;
                 }
                 .pulse1 {
                     position: absolute;
@@ -568,7 +609,7 @@
                     height: 48px;
                     left: -13px;
                     top: -13px;
-                    border: 1px solid #00e1ff;
+                    border: 1px solid #0072FF;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
                     border-radius: 50%;
@@ -580,7 +621,7 @@
                     -webkit-animation-iteration-count: infinite;
                     -moz-animation-iteration-count: infinite;
                     animation-iteration-count: infinite;
-                    box-shadow: 1px 1px 30px #00e1ff;
+                    box-shadow: 1px 1px 30px #0072FF;
                 }
             }
             & > div {
@@ -734,7 +775,7 @@
                 height: 24px;
                 border-radius: 50%;
                 position: absolute;
-                border: 1px solid rgba(0, 225, 255, 0.6);
+                border: 1px solid rgba(0, 114, 255, 0.6);
                 top: -12px;
                 left: 2px;
 
@@ -748,7 +789,7 @@
                     -moz-border-radius: 50%;
                     border: 1px solid #0072ff;
                     border-radius: 50%;
-                    background-color: #00e1ff;
+                    background-color: #0072ff;
                     z-index: 2;
                 }
                 .pulse {
@@ -757,7 +798,7 @@
                     height: 48px;
                     left: -13px;
                     top: -13px;
-                    border: 1px solid #00e1ff;
+                    border: 1px solid #0072ff;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
                     border-radius: 50%;
@@ -769,7 +810,7 @@
                     -webkit-animation-iteration-count: infinite;
                     -moz-animation-iteration-count: infinite;
                     animation-iteration-count: infinite;
-                    box-shadow: 1px 1px 30px #00e1ff;
+                    box-shadow: 1px 1px 30px #0072ff;
                 }
                 .pulse1 {
                     position: absolute;
@@ -777,7 +818,7 @@
                     height: 48px;
                     left: -13px;
                     top: -13px;
-                    border: 1px solid #00e1ff;
+                    border: 1px solid #0072ff;
                     -webkit-border-radius: 50%;
                     -moz-border-radius: 50%;
                     border-radius: 50%;
@@ -789,7 +830,7 @@
                     -webkit-animation-iteration-count: infinite;
                     -moz-animation-iteration-count: infinite;
                     animation-iteration-count: infinite;
-                    box-shadow: 1px 1px 30px #00e1ff;
+                    box-shadow: 1px 1px 30px #0072ff;
                 }
             }
             & > div {
@@ -1002,11 +1043,11 @@
                 width: 100%;
                 height: 100%;
                 display: flex;
-                justify-content: center;
+                justify-content: left;
                 align-items: flex-start;
-                overflow: hidden;
-                overflow-x: auto;
-                overflow-y: auto;
+                overflow-y: hidden;
+                overflow-x: hidden;
+                overflow: auto;
             }
 
             .line-map {
@@ -1361,19 +1402,74 @@
                     }
                 }
             }
+            .warning-part{
+              position: absolute;
+              width: calc((100vw - 120px) / 7);
+              height: calc((100vw - 120px) / 7);
+              background-image: linear-gradient(to right, rgba(8, 109, 209, 0.4), rgba(11, 255, 255, 0.2));
+              border: 1px solid #36fcfc;
+              z-index: 99999;
+              top: 100px;
+              right: 60px;
+              padding: 10px;
+              color: rgb(0, 255, 255);
+
+              .warn-tit{
+                height: 26px;
+                padding-bottom: 5px;
+                font-weight: bolder;
+                border-bottom: 1px solid rgb(0, 255, 255);
+              }
+              .warn-msg{
+                width: 100%;
+                margin-top: 10px;
+                height: calc(100% - 36px);
+                overflow: hidden;
+                overflow-y: scroll;
+                scrollbar-width: none; /* firefox */
+                -ms-overflow-style: none; /* IE 10+ */
+
+                &::-webkit-scrollbar {
+                  display: none; /* Chrome Safari */
+                }
+                .warn-item{
+                  padding: 0 0 10px;
+                  margin-bottom: 10px;
+                  border-bottom: 1px solid rgb(0, 255, 255);
+
+                  &:last-of-type{
+                    border-bottom: none;
+                    margin-bottom: 0;
+                  }
+                }
+              }
+            }
             .star-pic {
                 position: absolute;
                 width: calc((100vw - 120px) / 7);
                 height: calc((100vw - 120px) / 7);
-                z-index: 999999999;
+                z-index: 9999;
                 bottom: 40px;
                 right: 40px;
                 padding: 20px;
+
+                .scan{
+                    position: inherit;
+                    width: 65%;
+                    height: 65%;
+                    z-index: 99997;
+                    left: 0;
+                    top: 0;
+                    right: 0;
+                    bottom: 0;
+                    margin: auto;
+                }
 
                 .star-bg {
                     position: inherit;
                     width: 100%;
                     height: 100%;
+                    z-index: 99998;
                     left: 0;
                     top: 0;
                     img {
@@ -1382,11 +1478,11 @@
                         animation: circle 30s linear infinite;
                     }
                 }
-
                 .star {
                     position: inherit;
                     width: 100%;
                     height: 100%;
+                    z-index: 99999;
                     left: 0;
                     top: 0;
                     img {

--
Gitblit v1.9.2