From a3f357e8a60443b74b64c7479113c68eb35ce1f5 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 15 七月 2022 19:44:57 +0800
Subject: [PATCH] 控制轮询

---
 src/pages/cameraAccess/components/infoCard.vue |  176 ++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 109 insertions(+), 67 deletions(-)

diff --git a/src/pages/cameraAccess/components/infoCard.vue b/src/pages/cameraAccess/components/infoCard.vue
index 700efe4..87f1f07 100644
--- a/src/pages/cameraAccess/components/infoCard.vue
+++ b/src/pages/cameraAccess/components/infoCard.vue
@@ -1,75 +1,117 @@
 <template>
-    <el-row class="infoCard">
-        <el-col :span="8">
-            <p>
-                <i class="iconfont iconshishichuli"></i><span class="fontClass">瀹炴椂绠楀姏</span>
-            </p>
-            <p><span style="color: #f49d37;font-family: 'PingFangSC-Regular';font-size:28px;font-weight: 600;">{{realtime}}</span></p>
-        </el-col>
-        <el-col style="width: 1px;height: 80%;margin-top: 10px;background: #DCDFE6">
-        </el-col>
-        <el-col :span="8">
-            <p>
-                <i class="iconfont iconrolling"></i><span class="fontClass">杞绠楀姏</span>
-            </p>
-            <p><span style="color: #f49d37;font-family: 'PingFangSC-Regular';font-size:28px;font-weight: 600;">{{polling}}</span></p>
-        </el-col>
-        <el-col style="width: 1px;height: 80%;margin-top: 10px;background: #DCDFE6">
-        </el-col>
-        <el-col :span="7">
-            <p>
-                <i class="iconfont iconshuju"></i><span class="fontClass">鏁版嵁鏍堢畻鍔�</span>
-            </p>
-            <p><span style="color: #f49d37;font-family: 'PingFangSC-Regular';font-size:28px;font-weight: 600;">{{dataStack}}</span></p>
-        </el-col>
-    </el-row>      
+  <el-row class="infoCard">
+    <el-col :span="8">
+      <p>
+        <i class="iconfont iconshishichuli"></i
+        ><span class="fontClass">瀹炴椂绠楀姏</span>
+      </p>
+      <p>
+        <span
+          style="
+            color: #f49d37;
+            font-family: 'PingFangSC-Regular';
+            font-size: 28px;
+            font-weight: 600;
+          "
+          >{{ realtime }}</span
+        >
+      </p>
+    </el-col>
+    <el-col
+      style="width: 1px; height: 80%; margin-top: 10px; background: #dcdfe6"
+    >
+    </el-col>
+    <el-col :span="8" v-if="isShowPolling === 'show'">
+      <p>
+        <i class="iconfont iconrolling"></i
+        ><span class="fontClass">杞绠楀姏</span>
+      </p>
+      <p>
+        <span
+          style="
+            color: #f49d37;
+            font-family: 'PingFangSC-Regular';
+            font-size: 28px;
+            font-weight: 600;
+          "
+          >{{ polling }}</span
+        >
+      </p>
+    </el-col>
+    <el-col
+      style="width: 1px; height: 80%; margin-top: 10px; background: #dcdfe6"
+    >
+    </el-col>
+    <el-col :span="7">
+      <p>
+        <i class="iconfont iconshuju"></i
+        ><span class="fontClass">鏁版嵁鏍堢畻鍔�</span>
+      </p>
+      <p>
+        <span
+          style="
+            color: #f49d37;
+            font-family: 'PingFangSC-Regular';
+            font-size: 28px;
+            font-weight: 600;
+          "
+          >{{ dataStack }}</span
+        >
+      </p>
+    </el-col>
+  </el-row>
 </template>
 
 <script>
 export default {
-    props: {
-        realtime: {
-            type: Number,
-            default: 10
-        },
-        polling: {
-            type: Number,
-            default: 0
-        },
-        dataStack: {
-            type: Number,
-            default: 0
-        },
-    }
-}
+  props: {
+    realtime: {
+      type: Number,
+      default: 10,
+    },
+    polling: {
+      type: Number,
+      default: 0,
+    },
+    dataStack: {
+      type: Number,
+      default: 0,
+    },
+  },
+  data() {
+    return {
+      isShowPolling: sessionStorage.getItem("isShowPolling"),
+    };
+  },
+};
 </script>
 <style lang="scss">
-    .infoCard {
-        width: 100%;
-        height: 100px;
-        border: 1px solid #e2e2e2;
-        box-shadow: 0px 0px 10px 5px rgba(0,0,0,0.1);
-        border-radius: 3px;
-        i {
-            float: left;
-            margin-left:10px;
-            font-size: 28px;
-            font-weight: 600;
-            color: #3d68e1;
-        }
-        p {
-            height: 45px;
-            line-height: 45px;
-            vertical-align: middle
-        }
-        .fontClass {
-            float: left;
-            margin-left: 10px;
-            font-family: "PingFangSC-Regular";
-            text-align: left;
-            font-size: 14px;
-            color: #222222;
-            font-weight: 600;
-        }
-    }
+.infoCard {
+  width: 100%;
+  height: 100px;
+  border: 1px solid #e2e2e2;
+  box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.1);
+  border-radius: 3px;
+  i {
+    float: left;
+    margin-left: 10px;
+    font-size: 28px;
+    font-weight: 600;
+    color: #3d68e1;
+  }
+  p {
+    height: 45px;
+    line-height: 45px;
+    vertical-align: middle;
+  }
+  .fontClass {
+    float: left;
+    margin-left: 10px;
+    font-family: "PingFangSC-Regular";
+    text-align: left;
+    font-size: 14px;
+    color: #222222;
+    font-weight: 600;
+  }
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0