From c6935cb2e9e6f4e59552d929fd7860d00f4c39ec Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期一, 21 二月 2022 09:57:02 +0800
Subject: [PATCH] bug修复

---
 src/pages/settings/views/clusterManagement.vue            |   10 +
 src/pages/systemSettings/components/ClusterManagement.vue |    2 
 vue.config.js                                             |    4 
 src/pages/cameraAccess/index/App.vue                      |    2 
 src/pages/cameraAccess/components/TimeSlider.vue          |   39 ++++--
 src/pages/vindicate/views/sysInfo.vue                     |   31 +++--
 src/pages/systemMonitor/index/App.vue                     |   15 -
 src/pages/syslog/views/pollingLog.vue                     |  194 ++++++++++++++++++-------------
 src/pages/vindicate/views/updateSettings.vue              |    7 +
 src/pages/cameraAccess/index/VideoManage.vue              |    1 
 src/pages/cameraAccess/components/DataStackInfo.vue       |   15 ++
 11 files changed, 193 insertions(+), 127 deletions(-)

diff --git a/src/pages/cameraAccess/components/DataStackInfo.vue b/src/pages/cameraAccess/components/DataStackInfo.vue
index ed5c980..0960b57 100644
--- a/src/pages/cameraAccess/components/DataStackInfo.vue
+++ b/src/pages/cameraAccess/components/DataStackInfo.vue
@@ -278,9 +278,18 @@
         show-overflow-tooltip
         align="center"
       >
-        <template slot-scope="scope">{{
-          scope.row.status | statusFormat
-        }}</template>
+        <template slot-scope="scope">
+          <div
+            class="lowHash"
+            v-if="
+              !PollData.stackChannelCount &&
+              (scope.row.status == '澶勭悊涓�' || scope.row.status == '2')
+            "
+          >
+            鏁版嵁鏍堢畻鍔涗笉瓒�
+          </div>
+          <div class="normal" v-else>{{ scope.row.status | statusFormat }}</div>
+        </template>
       </el-table-column>
       <el-table-column label="鎿嶄綔" show-overflow-tooltip align="center">
         <template slot-scope="scope">
diff --git a/src/pages/cameraAccess/components/TimeSlider.vue b/src/pages/cameraAccess/components/TimeSlider.vue
index 14cc70b..0f326d3 100644
--- a/src/pages/cameraAccess/components/TimeSlider.vue
+++ b/src/pages/cameraAccess/components/TimeSlider.vue
@@ -79,6 +79,7 @@
         { day: 6, time_range: [{ start: "00:00", end: "24:00" }] },
         { day: 7, time_range: [{ start: "00:00", end: "24:00" }] },
       ],
+      isAdding: false,
     };
   },
   mounted() {
@@ -88,16 +89,19 @@
     handleTabsEdit(tabId, action) {
       let tabs = this.VideoManageData.TimeRules;
       if (action === "add") {
-        let newRule = {
-          id: "",
-          name: "鏃堕棿娈�" + this.VideoManageData.TimeRules.length,
-          time_rule: this.allDay,
-        };
-        this.updateTimeRule(newRule);
+        if (this.isAdding) {
+          return;
+        } else {
+          this.isAdding = true;
+          let newRule = {
+            id: "",
+            name: "鏃堕棿娈�" + this.VideoManageData.TimeRules.length,
+            time_rule: this.allDay,
+          };
+          this.updateTimeRule(newRule);
+        }
       }
       if (action === "remove") {
-        console.log();
-
         if (this.VideoManageData.TimeRules.length == 1) {
           this.$notify({
             title: "璀﹀憡",
@@ -144,12 +148,19 @@
       console.log("鏃堕棿缁勪欢瀹藉害锛�", timeSlideWidth);
     },
     updateTimeRule(rule) {
-      saveTimeRule(rule).then((rsp) => {
-        if (rsp && rsp.success) {
-          this.VideoManageData.getTimeRule();
-          this.activeTab = rsp.data.id;
-        }
-      });
+      saveTimeRule(rule)
+        .then(async (rsp) => {
+          if (rsp && rsp.success) {
+            await this.VideoManageData.getTimeRule();
+            this.isAdding = false;
+            this.activeTab = rsp.data.id;
+          } else {
+            this.isAdding = false;
+          }
+        })
+        .catch(() => {
+          this.isAdding = false;
+        });
     },
     tabClick(item) {
       if (this.activeTab === item.id) {
diff --git a/src/pages/cameraAccess/index/App.vue b/src/pages/cameraAccess/index/App.vue
index cc9702d..9a2acc1 100644
--- a/src/pages/cameraAccess/index/App.vue
+++ b/src/pages/cameraAccess/index/App.vue
@@ -92,7 +92,7 @@
   padding: 16px;
   padding-top: 8px;
   overflow-x: hidden;
-  overflow-y: hidden;
+  overflow-y: auto;
 }
 .resize-bar {
   width: 338px;
diff --git a/src/pages/cameraAccess/index/VideoManage.vue b/src/pages/cameraAccess/index/VideoManage.vue
index ed9de1b..3b3349a 100644
--- a/src/pages/cameraAccess/index/VideoManage.vue
+++ b/src/pages/cameraAccess/index/VideoManage.vue
@@ -244,6 +244,7 @@
   min-width: 1599px;
   float: left;
   box-sizing: border-box;
+  user-select: none;
   .el-tabs--border-card {
     box-shadow: none;
     -webkit-box-shadow: none;
diff --git a/src/pages/settings/views/clusterManagement.vue b/src/pages/settings/views/clusterManagement.vue
index 3eed52f..4648e4f 100644
--- a/src/pages/settings/views/clusterManagement.vue
+++ b/src/pages/settings/views/clusterManagement.vue
@@ -566,7 +566,15 @@
         //   this.showCurCluster = false;
         // }
         async () => {
-          let res = await leave();
+          try {
+            res = await leave();
+          } catch (err) {
+            console.log(err);
+            this.$notify.error({
+              title: "澶辫触",
+              message: err.msg,
+            });
+          }
           this.$notify({
             title: res.success ? "鎴愬姛" : "澶辫触",
             message: res.msg,
diff --git a/src/pages/syslog/views/pollingLog.vue b/src/pages/syslog/views/pollingLog.vue
index 0149e6f..92bcb10 100644
--- a/src/pages/syslog/views/pollingLog.vue
+++ b/src/pages/syslog/views/pollingLog.vue
@@ -1,5 +1,9 @@
 <template>
-  <div class="polling-log" v-loading="loading" :element-loading-text="loadingText">
+  <div
+    class="polling-log"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+  >
     <div class="top">
       <div class="first">
         <div class="time-option">
@@ -17,10 +21,19 @@
             class="input-with-select"
             @keyup.enter.native="getScheduleLog(1)"
           >
-            <span class="icon iconfont icon_clear" @click="clearSearch" slot="append" v-if="fuzzySearch">
+            <span
+              class="icon iconfont icon_clear"
+              @click="clearSearch"
+              slot="append"
+              v-if="fuzzySearch"
+            >
               &#xe785;
             </span>
-            <span class="icon iconfont icon_search" @click="getScheduleLog(1)" slot="append">
+            <span
+              class="icon iconfont icon_search"
+              @click="getScheduleLog(1)"
+              slot="append"
+            >
               &#xe714;
             </span>
 
@@ -63,7 +76,8 @@
         <template slot="empty">
           <img :src="png" class="empty_img" alt="" />
         </template>
-        <el-table-column :align="'center'" label="搴忓彿" type="index" width="50"> </el-table-column>
+        <el-table-column :align="'center'" label="搴忓彿" type="index" width="50">
+        </el-table-column>
         <el-table-column
           :align="'center'"
           sortable
@@ -78,8 +92,17 @@
           prop="schedule_end_time"
           label="杞缁撴潫鏃堕棿"
         ></el-table-column>
-        <el-table-column :align="'center'" sortable prop="info" label="鎽勫儚鏈�"></el-table-column>
-        <el-table-column :align="'center'" prop="minute" label="杞鏃堕暱锛堝垎锛�"></el-table-column>
+        <el-table-column
+          :align="'center'"
+          sortable
+          prop="info"
+          label="鎽勫儚鏈�"
+        ></el-table-column>
+        <el-table-column
+          :align="'center'"
+          prop="minute"
+          label="杞鏃堕暱锛堝垎锛�"
+        ></el-table-column>
       </el-table>
     </div>
 
@@ -94,7 +117,12 @@
     >
     </el-pagination>
 
-    <el-dialog title="閫夋嫨鎽勫儚鏈�" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
+    <el-dialog
+      title="閫夋嫨鎽勫儚鏈�"
+      :visible.sync="dialogVisible"
+      width="50%"
+      :before-close="handleClose"
+    >
       <el-tree
         ref="cameraTree"
         :data="cameraTree"
@@ -109,16 +137,18 @@
         <el-button size="small" @click="pickAllNot">鍙栨秷鍏ㄩ��</el-button>
         <el-button @click="pickAllCam" size="small">鍏ㄩ��</el-button>
         <el-button size="small" @click="cancelShow">鍙栨秷</el-button>
-        <el-button size="small" type="primary" @click="confirmCamera">纭畾</el-button>
+        <el-button size="small" type="primary" @click="confirmCamera"
+          >纭畾</el-button
+        >
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { pad0 } from "@/api/utils"
-import { getLocalCameraTree } from "@/api/area"
-import { getOperations, getModules, queryScheduleLog } from "@/api/log"
+import { pad0 } from "@/api/utils";
+import { getLocalCameraTree } from "@/api/area";
+import { getOperations, getModules, queryScheduleLog } from "@/api/log";
 
 export default {
   data() {
@@ -132,7 +162,7 @@
       dateRange: [],
       cameraTree: [],
       props: {
-        label: "name"
+        label: "name",
       },
       value: "",
       page: 1,
@@ -153,91 +183,91 @@
           {
             text: "鏈�杩戜竴鍛�",
             onClick(picker) {
-              const end = new Date()
-              const start = new Date()
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
-              picker.$emit("pick", [start, end])
-            }
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
           },
           {
             text: "鏈�杩戜竴涓湀",
             onClick(picker) {
-              const end = new Date()
-              const start = new Date()
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
-              picker.$emit("pick", [start, end])
-            }
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
           },
           {
             text: "鏈�杩戜笁涓湀",
             onClick(picker) {
-              const end = new Date()
-              const start = new Date()
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
-              picker.$emit("pick", [start, end])
-            }
-          }
-        ]
-      }
-    }
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+    };
   },
   mounted() {
-    this.getTimeRange(24 * 60 * 60 * 1000 * 30)
-    this.getScheduleLog()
-    this.getOptions()
+    this.getTimeRange(24 * 60 * 60 * 1000 * 30);
+    this.getScheduleLog();
+    this.getOptions();
   },
   methods: {
     handleSizeChange(val) {
-      this.pageSize = val
-      this.getScheduleLog()
+      this.pageSize = val;
+      this.getScheduleLog();
     },
     handleCurrentChange(val) {
-      this.page = val
-      this.getScheduleLog()
+      this.page = val;
+      this.getScheduleLog();
     },
     cancelShow() {
-      this.dialogVisible = false
-      this.pickAllNot()
+      this.dialogVisible = false;
+      this.pickAllNot();
     },
     pickAllCam() {
-      this.$refs.cameraTree.setCheckedNodes(this.cameraTree)
+      this.$refs.cameraTree.setCheckedNodes(this.cameraTree);
     },
     pickAllNot() {
-      this.$refs.cameraTree.setCheckedKeys([])
+      this.$refs.cameraTree.setCheckedKeys([]);
     },
     confirmCamera() {
-      const selectedIDs = this.$refs.cameraTree.getCheckedKeys()
-      this.pickNum = selectedIDs.length
-      this.procID = selectedIDs.join(",")
-      this.getScheduleLog()
-      this.dialogVisible = false
+      const selectedIDs = this.$refs.cameraTree.getCheckedKeys();
+      this.pickNum = selectedIDs.length;
+      this.procID = selectedIDs.join(",");
+      this.getScheduleLog();
+      this.dialogVisible = false;
     },
     openDialog() {
-      this.dialogVisible = true
+      this.dialogVisible = true;
       getLocalCameraTree({
         cameraName: "",
-        searchType: 0
+        searchType: 0,
       }).then((res) => {
-        this.cameraTree = res.data
-      })
+        this.cameraTree = res.data;
+      });
     },
     moduleChange(val) {
-      this.getScheduleLog()
-      this.gongneng = ""
+      this.getScheduleLog();
+      this.gongneng = "";
       getOperations({
-        module: this.curModule
+        module: this.curModule,
       }).then((res) => {
-        this.gongnengOptions = res.data
-      })
+        this.gongnengOptions = res.data;
+      });
     },
     getOptions() {
       getModules().then((res) => {
-        this.moduleOptions = res.data
-      })
+        this.moduleOptions = res.data;
+      });
     },
     getScheduleLog(typ) {
       if (typ == 1) {
-        this.page = 1
+        this.page = 1;
       }
 
       const data = {
@@ -247,40 +277,40 @@
         pageSize: this.pageSize,
         fuzzySearch: this.fuzzySearch,
         procID: this.procID,
-        procName: this.procName
-      }
+        procName: this.procName,
+      };
       queryScheduleLog(data).then((res) => {
-        this.tableData = res.data.logs
-        this.total = res.data.total
-      })
+        this.tableData = res.data.logs;
+        this.total = res.data.total;
+      });
     },
     dateChange(val) {
-      ;[this.timeStart, this.timeEnd] = val
-      this.getScheduleLog()
+      [this.timeStart, this.timeEnd] = val;
+      this.getScheduleLog();
     },
     getTimeStr(date) {
-      var month = pad0(date.getMonth() + 1) //鏈�
-      var day = pad0(date.getDate()) //鏃�
-      var hour = pad0(date.getHours()) //鏃�
-      var minute = pad0(date.getMinutes()) //鍒�
-      var second = pad0(date.getSeconds()) //绉�
-      return `${date.getFullYear()}-${month}-${day} ${hour}:${minute}:${second}`
+      var month = pad0(date.getMonth() + 1); //鏈�
+      var day = pad0(date.getDate()); //鏃�
+      var hour = pad0(date.getHours()); //鏃�
+      var minute = pad0(date.getMinutes()); //鍒�
+      var second = pad0(date.getSeconds()); //绉�
+      return `${date.getFullYear()}-${month}-${day} ${hour}:${minute}:${second}`;
     },
     getTimeRange(gap) {
-      var date = new Date() //褰撳墠鏃堕棿
-      var preDay = new Date(new Date().getTime() - gap)
-      this.timeStart = this.getTimeStr(preDay)
-      this.timeEnd = this.getTimeStr(date)
-      this.dateRange = [this.timeStart, this.timeEnd]
+      var date = new Date(); //褰撳墠鏃堕棿
+      var preDay = new Date(new Date().getTime() - gap);
+      this.timeStart = this.getTimeStr(preDay);
+      this.timeEnd = this.getTimeStr(date);
+      this.dateRange = [this.timeStart, this.timeEnd];
     },
     handleSelectionChange() {},
     handleClose() {},
     clearSearch() {
-      this.fuzzySearch = ""
-      this.getScheduleLog(1)
-    }
-  }
-}
+      this.fuzzySearch = "";
+      this.getScheduleLog(1);
+    },
+  },
+};
 </script>
 <style lang="scss">
 .polling-log {
diff --git a/src/pages/systemMonitor/index/App.vue b/src/pages/systemMonitor/index/App.vue
index 297d8ec..d95e0c4 100644
--- a/src/pages/systemMonitor/index/App.vue
+++ b/src/pages/systemMonitor/index/App.vue
@@ -57,31 +57,26 @@
                 <span>{{ scope.row.desc }} </span>
               </template>
             </el-table-column>
-            <el-table-column label="CPU" width="150">
+            <el-table-column label="CPU">
               <template slot-scope="scope">
                 <span>{{ scope.row.cpu.toFixed(2) }} %</span>
               </template>
             </el-table-column>
-            <el-table-column label="鍐呭瓨" width="150">
+            <el-table-column label="鍐呭瓨">
               <template slot-scope="scope">
                 <span>{{ scope.row.mem.toFixed(2) }} %</span>
               </template>
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               prop="disk"
               label="纭洏"
               width="150"
-            ></el-table-column>
-            <el-table-column label="绠楀姏" width="150">
+            ></el-table-column> -->
+            <el-table-column label="绠楀姏">
               <template slot-scope="scope">
                 <span>{{ scope.row.gpu }} M</span>
               </template>
             </el-table-column>
-            <el-table-column
-              prop="net"
-              label="缃戠粶"
-              width="150"
-            ></el-table-column>
           </el-table>
         </div>
 
diff --git a/src/pages/systemSettings/components/ClusterManagement.vue b/src/pages/systemSettings/components/ClusterManagement.vue
index de81c3b..9e3efcf 100644
--- a/src/pages/systemSettings/components/ClusterManagement.vue
+++ b/src/pages/systemSettings/components/ClusterManagement.vue
@@ -292,7 +292,7 @@
   },
   data() {
     const checkPwd = (rule, value, callback) => {
-      debugger
+      debugger;
       if (!value) {
         return callback(new Error("瀵嗙爜涓嶈兘涓虹┖"));
       }
diff --git a/src/pages/vindicate/views/sysInfo.vue b/src/pages/vindicate/views/sysInfo.vue
index 25d1cea..b03f889 100644
--- a/src/pages/vindicate/views/sysInfo.vue
+++ b/src/pages/vindicate/views/sysInfo.vue
@@ -7,7 +7,7 @@
             <div class="title">Smart AIOS</div>
             <div class="desc">Copyright 漏 璐濇�濈鎶�鏈湁闄愬叕鍙�</div>
           </div>
-          <div class="bar" style="background-color: #F2F2F7;">
+          <div class="bar" style="background-color: #f2f2f7">
             <div class="name">鐗堟湰锛�</div>
             <div class="desc">
               {{
@@ -31,12 +31,12 @@
             </div>
           </div>
           <div class="bar">
-            <div class="name" style="min-width: 65px;">璇锋眰鐮侊細</div>
+            <div class="name" style="min-width: 65px">璇锋眰鐮侊細</div>
             <div class="desc code" style="font-size: 12px">{{ q }}</div>
           </div>
           <div class="bar">
             <div class="name">浜у搧瀵嗛挜锛�</div>
-            <div class="desc" >
+            <div class="desc">
               {{ authorization || "-" }}
             </div>
           </div>
@@ -155,10 +155,10 @@
         passwd: this.password,
         down: 1,
       }).then((res) => {
-        if (res.type=="application/json") {
+        if (res.type == "application/json") {
           var reader = new FileReader();
-          reader.readAsText(res,"utf-8");
-          let that = this
+          reader.readAsText(res, "utf-8");
+          let that = this;
           reader.onload = function () {
             var receive_data = JSON.parse(this.result); //杩欎釜灏辨槸瑙f瀽鍑烘潵鐨勬暟鎹�
             that.$notify.error(receive_data.msg);
@@ -183,15 +183,20 @@
 };
 </script>
 <style lang="scss">
-div{
+div {
   color: #333;
 }
 
 .v-sys-info {
   width: 100%;
-  background-color: #FBFAFF;
+  background-color: #fbfaff;
   border-top: 4px solid #f2f2f7;
   border-left: 4px solid #f2f2f7;
+
+  .el-dialog {
+    width: 625px;
+  }
+
   .el-dialog__header {
     padding: 15px 20px 10px;
     text-align: left;
@@ -307,7 +312,7 @@
           line-height: 33.6px;
         }
         .desc {
-          margin-top:10px ;
+          margin-top: 10px;
           font-size: 12px;
           line-height: 16.8px;
           font-weight: 700;
@@ -343,12 +348,12 @@
           word-wrap: break-word;
           text-align: left;
         }
-        .activation{
+        .activation {
           width: 90px;
           height: 28px;
-          background: rgba(78,148,255,0.1);
-          border: 1px solid #4E94FF;
-          border-radius:20px ;
+          background: rgba(78, 148, 255, 0.1);
+          border: 1px solid #4e94ff;
+          border-radius: 20px;
           text-align: center;
           line-height: 28px;
           color: #333;
diff --git a/src/pages/vindicate/views/updateSettings.vue b/src/pages/vindicate/views/updateSettings.vue
index dec75d5..0766e80 100644
--- a/src/pages/vindicate/views/updateSettings.vue
+++ b/src/pages/vindicate/views/updateSettings.vue
@@ -318,6 +318,13 @@
         });
     },
     upgrade() {
+      if (!this.pkgID) {
+        this.$notify.error({
+          title: "澶辫触",
+          message: "璇峰厛涓婁紶鏇存柊鍖�",
+        });
+        return;
+      }
       this.shengjiing = true;
       upgradePkg({
         id: this.pkgID,
diff --git a/vue.config.js b/vue.config.js
index 39c518e..198dc60 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -40,9 +40,9 @@
   // }
 });
 
-//const serverUrl = "http://192.168.20.189:7009"; // 缇婁簲//
+const serverUrl = "http://192.168.20.189:7009"; // 缇婁簲//
 //  const serverUrl = "http://192.168.8.10:7009";
-const serverUrl = "http://192.168.8.118:7009";
+//const serverUrl = "http://192.168.8.118:7009";
 
 const serverUrl2 = "http://192.168.8.10:9000";
 // const serverUrl = "http://192.168.20.10:7009";

--
Gitblit v1.8.0