From eca3bc0ecb283d9e9402441c6ed3e3580621990f Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期四, 22 七月 2021 11:00:25 +0800
Subject: [PATCH] 桌面开始菜单

---
 src/pages/syslog/views/operationLog.vue           |   10 
 src/pages/desktop/index/components/ToolsEntry.vue |    3 
 src/pages/index/App.vue                           |    3 
 src/pages/settings/components/BasicSetting.vue    | 1143 +++++++++++++++++++++++++++++++++++++++++++++++
 src/pages/syslog/views/pollingLog.vue             |   40 +
 src/pages/desktop/index/App.vue                   |    1 
 src/pages/desktop/index/components/Tools.vue      |  142 +++--
 src/pages/settings/views/generalSettings.vue      |   69 +-
 8 files changed, 1,289 insertions(+), 122 deletions(-)

diff --git a/src/pages/desktop/index/App.vue b/src/pages/desktop/index/App.vue
index 42219eb..dce0dad 100644
--- a/src/pages/desktop/index/App.vue
+++ b/src/pages/desktop/index/App.vue
@@ -83,7 +83,6 @@
   },
   methods: {
     onJumpToDock(item){
-      debugger
       this.$refs.dock_model.onJumpToDock(item)
     },
     onChangeBg(v){
diff --git a/src/pages/desktop/index/components/Tools.vue b/src/pages/desktop/index/components/Tools.vue
index 5217034..063952c 100644
--- a/src/pages/desktop/index/components/Tools.vue
+++ b/src/pages/desktop/index/components/Tools.vue
@@ -15,23 +15,33 @@
         />
       </div>
 
-      <div class="fast-path" :class="showFastPath?'fast-path-show':''" @click.stop>
+      <div
+        class="fast-path"
+        :class="showFastPath ? 'fast-path-show' : ''"
+        @click.stop
+      >
         <div class="top">
-          <img src="" alt="" />
-          <span class="username">{{userInfo.username}}</span>
+          <img :src="`data:image/png;base64,${userInfo.headpic}`" alt="" />
+
+          <span class="username">{{ userInfo.username }}</span>
         </div>
         <div class="link-list">
-          <div class="list-item" v-for="(x, i) in linkList" :key="i" @click="clickFastPath(x.name)">
+          <div
+            class="list-item"
+            v-for="(x, i) in linkList"
+            :key="i"
+            @click="clickFastPath(x.name)"
+          >
             {{ x.name }}
           </div>
         </div>
         <div class="bot">
           <div class="set" @click="gotoSet">
-            <span class="icon iconfont">{{"\ue60f"}}</span>
+            <span class="icon iconfont">{{ "\ue60f" }}</span>
             <span>璁剧疆</span>
           </div>
           <div class="exit" @click="toLogout">
-            <span class="icon iconfont">{{"\ue60f"}}</span>
+            <span class="icon iconfont">{{ "\ue60f" }}</span>
             <span>閫�鍑�</span>
           </div>
         </div>
@@ -174,7 +184,11 @@
       notificationCenterVisible: false,
       notificationCenterMessageCount: 0,
       userInfo: {},
-      linkList: [{name: "鏂囨。涓績"}, {name: "绯荤粺鐩戞帶鍣�"}, { name: "鏃ュ織绠$悊" }],
+      linkList: [
+        { name: "鏂囨。涓績" },
+        { name: "绯荤粺鐩戞帶鍣�" },
+        { name: "鏃ュ織绠$悊" },
+      ],
       showPasswdForm: false,
       rules: {
         oldPwd: [{ required: true, message: "璇疯緭鍏ユ棫瀵嗙爜", trigger: "blur" }],
@@ -183,7 +197,7 @@
           { required: true, validator: validatePass2, trigger: "blur" },
         ],
       },
-      showFastPath:false,
+      showFastPath: false,
       passwdForm: {
         oldPwd: "",
         newPwd: "",
@@ -207,13 +221,13 @@
     ];
   },
   mounted() {
-    document.addEventListener("click",(e) => {
+    document.addEventListener("click", (e) => {
       // debugger
       // this.showFastPath=false
       if (this.showFastPath) {
-        this.showFastPath=false
+        this.showFastPath = false;
       }
-    })
+    });
   },
   methods: {
     submitForm(formName) {
@@ -260,7 +274,7 @@
     },
 
     togglePreference() {
-      this.showFastPath = !this.showFastPath
+      this.showFastPath = !this.showFastPath;
       this.$store.state.desktop.frames.forEach((frame) => {
         this.$store.commit("desktop/addMinDock", {
           id: frame.id,
@@ -287,23 +301,20 @@
         this.$store.commit("desktop/refreshFrame", dock);
       }
     },
-    clickFastPath(name){
-      debugger
-      this.$emit("jumpToDock", name)
-
+    clickFastPath(name) {
+      this.$emit("jumpToDock", name);
     },
-    gotoSet(){
-      this.$emit("jumpToDock", "绯荤粺璁剧疆")
-
+    gotoSet() {
+      this.$emit("jumpToDock", "绯荤粺璁剧疆");
     },
     toolHover(dock) {
       //this.$parent.screenShot(dock)
     },
     toLogout() {
       let _this = this;
-      this.$confirm("纭畾閫�鍑虹櫥褰曞悧锛�","鎻愮ず", {
+      this.$confirm("纭畾閫�鍑虹櫥褰曞悧锛�", "鎻愮ず", {
         // center: true,
-        type:"warning",
+        type: "warning",
         cancelButtonClass: "comfirm-class-cancle",
         confirmButtonClass: "comfirm-class-sure",
       })
@@ -430,74 +441,67 @@
   top: 55px;
   border-radius: 6px;
   background-color: rgba(255, 255, 255, 1);
-  transition: .2s;
+  transition: 0.2s;
   display: none;
-  .top{
-        display: -webkit-box;
-    display: -ms-flexbox;
+  padding-top: 5px;
+  box-sizing: border-box;
+  .top {
     display: flex;
-    -webkit-box-pack: space-evenly;
-    -ms-flex-pack: space-evenly;
-    /* justify-content: space-evenly; */
-    -webkit-box-align: center;
-    -ms-flex-align: center;
     align-items: center;
     height: 70px;
     box-sizing: border-box;
     padding: 0 30px;
-    img{
-              height: 50px;
-        width: 50px;
-background-color: bisque;
-        border-radius: 50%;
+    img {
+      height: 50px;
+      width: 50px;
+      background-color: bisque;
+      border-radius: 50%;
     }
-    .username{
-    width: fit-content;
-    height: 30px;
-    line-height: 30px;
-    font-size: 16px;
-    margin-left: 10px;
+    .username {
+      width: fit-content;
+      height: 30px;
+      line-height: 30px;
+      font-size: 16px;
+      margin-left: 15px;
     }
   }
-  .link-list{
-        height: 180px;
+  .link-list {
+    height: 180px;
     display: flex;
     flex-direction: column;
     align-items: center;
-    .list-item{
-          display: -webkit-box;
-    display: -ms-flexbox;
-    display: flex;
-    width: 80%;
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    padding: 0 20px;
-    border-radius: 5px;
-    font-size: 14px;
-    line-height: 25px;
-    height: 25px;cursor: pointer;
-    margin: 5px;
+    .list-item {
+      display: flex;
+      width: 90%;
+      box-sizing: border-box;
+      padding: 0 20px;
+      border-radius: 5px;
+      font-size: 14px;
+      line-height: 25px;
+      height: 25px;
+      cursor: pointer;
+      margin: 5px;
     }
-    .list-item:hover{
-    background-color: rgba(231, 231, 231, 1);
+    .list-item:hover {
+      background-color: rgba(231, 231, 231, 1);
     }
   }
-  .bot{
-        position: absolute;
+  .bot {
+    position: absolute;
     bottom: 0;
     height: 60px;
     display: flex;
     width: 100%;
     justify-content: space-around;
-    .set,.exit{
-          display: flex;
-    align-items: center;
-    width: 28%;
-    justify-content: space-evenly;
-    font-size: 14px;
-    cursor: pointer;
+    .set,
+    .exit {
+      display: flex;
+      align-items: center;
+      width: 28%;
+      justify-content: space-evenly;
+      font-size: 14px;
+      cursor: pointer;
     }
-
   }
 }
 
@@ -512,7 +516,7 @@
 }
 
 .fast-path-show {
-  animation: move linear .2s 1;
+  animation: move linear 0.2s 1;
   display: block;
 }
 
diff --git a/src/pages/desktop/index/components/ToolsEntry.vue b/src/pages/desktop/index/components/ToolsEntry.vue
index 3ead49f..6429423 100644
--- a/src/pages/desktop/index/components/ToolsEntry.vue
+++ b/src/pages/desktop/index/components/ToolsEntry.vue
@@ -133,7 +133,6 @@
 
         if (msg.indexOf("changeBackground")>-1) {
         const name = e.data.msg.split("?")[1]
-        debugger
         _this.$emit("changeBg", `/images/desktop/${name}.png`)
       }
       }
@@ -156,8 +155,6 @@
       return result
     },
     onJumpToDock(name){
-      debugger
-
       let togo 
       this.carousels.forEach(arr => {
         arr.forEach(x => {
diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index ecb0a52..ede7633 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -139,7 +139,6 @@
               background: 'rgba(0, 0, 0, 0.7)'
             })
             this.testLogin()
-            // return false
           } else {
             this.nullRule = {}
           }
@@ -170,9 +169,7 @@
         })
     },
     async getLoginUserData() {
-      debugger
       let res = await getLoginUserData()
-      debugger
       if (res.success) {
         sessionStorage.setItem('userInfo', JSON.stringify(res.data))
         this.$notify.success("鐧诲綍鎴愬姛锛�")
diff --git a/src/pages/settings/components/BasicSetting.vue b/src/pages/settings/components/BasicSetting.vue
new file mode 100644
index 0000000..9960e95
--- /dev/null
+++ b/src/pages/settings/components/BasicSetting.vue
@@ -0,0 +1,1143 @@
+<template>
+  <div class="s-basic-setting">
+    <el-tabs
+      id="e-basic-setting"
+      v-model="activeName"
+      v-loading="loading"
+      :element-loading-text="loadingText"
+      type="border-card"
+    >
+      <!-- 鏈満淇℃伅 -->
+      <el-tab-pane
+        label="鏈満淇℃伅"
+        name="sysInfo"
+        v-if="isShow('settings:sysInfo')"
+      >
+        <el-menu
+          :default-openeds="openeds"
+          background-color="#fff"
+          text-color="#303133"
+          active-text-color="#409EFF"
+          style="height: 100%"
+          class="menu-css"
+          @open="menuOpen"
+          @close="menuClose"
+        >
+          <!-- 鏈満淇℃伅 -->
+          <el-submenu index="0">
+            <template slot="title">
+              <b class="tree-font">鏈満淇℃伅</b>
+            </template>
+            <el-menu-item-group class="item-group">
+              <el-form
+                :model="sysinfo"
+                :rules="rules"
+                ref="sysinfo"
+                label-width="100px"
+              >
+                <el-row>
+                  <el-col :span="12">
+                    <el-form-item label="鍚嶇О" prop="server_name">
+                      <el-input
+                        v-model="sysinfo.server_name"
+                        placeholder="鏈嶅姟鍣ㄥ悕绉�"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="绔彛" prop="server_port">
+                      <el-input
+                        v-model="sysinfo.server_port"
+                        placeholder="WEB鏈嶅姟绔彛"
+                        size="small"
+                      ></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+
+                <el-row>
+                  <el-col :span="12">
+                    <el-form-item label="IP" prop="ip">
+                      <ip-input
+                        :ip="sysinfo.ip"
+                        @on-blur="sysinfo.ip = arguments[0]"
+                      ></ip-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="瀛愮綉鎺╃爜" prop="subMask">
+                      <ip-input
+                        :ip="sysinfo.subMask"
+                        @on-blur="sysinfo.subMask = arguments[0]"
+                      ></ip-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+
+                <el-row>
+                  <el-col :span="12">
+                    <el-form-item label="缃戝叧" prop="gateway">
+                      <ip-input
+                        :ip="sysinfo.gateway"
+                        @on-blur="sysinfo.gateway = arguments[0]"
+                      ></ip-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="DNS" prop="dns">
+                      <ip-input
+                        :ip="sysinfo.dns"
+                        @on-blur="sysinfo.dns = arguments[0]"
+                      ></ip-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <div class="mt15 mb10 save-btn">
+                  <el-button type="primary" @click="submitSysinfo" size="small"
+                    >淇濆瓨</el-button
+                  >
+                </div>
+              </el-form>
+            </el-menu-item-group>
+          </el-submenu>
+
+          <el-submenu index="1">
+            <template slot="title">
+              <b class="tree-font">璇︾粏淇℃伅</b>
+            </template>
+            <el-menu-item-group class="item-group desc-info">
+              <el-row :gutter="gutter">
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">璁惧ID</div>
+                  <div class="xiangqing-info">{{ sysinfo.server_id }}</div>
+                </el-col>
+                <!-- <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">璁惧缂栧彿</div>
+                  <div class="xiangqing-info">{{sysinfo.deviceNum}}</div>
+                </el-col>-->
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">璁惧鍨嬪彿</div>
+                  <div class="xiangqing-info">{{ sysinfo.deviceModel }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">璁惧绫诲瀷</div>
+                  <div class="xiangqing-info">{{ sysinfo.deviceDesc }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">閫氶亾涓暟</div>
+                  <div class="xiangqing-info">{{ sysinfo.channelCount }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">涓绘帶鐗堟湰</div>
+                  <div class="xiangqing-info">{{ sysinfo.masterVersion }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">web鐗堟湰</div>
+                  <div class="xiangqing-info">{{ sysinfo.webVersion }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">纭洏淇℃伅</div>
+                  <div class="xiangqing-info">{{ sysinfo.disks }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">CPU</div>
+                  <div class="xiangqing-info">{{ sysinfo.cpuInfo }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">鍐呭瓨</div>
+                  <div class="xiangqing-info">{{ sysinfo.mem }}</div>
+                </el-col>
+                <el-col :span="12" class="flex-box">
+                  <div class="xiangqin-label">杩愯鏃堕棿</div>
+                  <div class="xiangqing-info">{{ sysinfo.uptime }}</div>
+                </el-col>
+              </el-row>
+            </el-menu-item-group>
+          </el-submenu>
+          <!-- 浜嬩欢褰曞儚鏃堕暱 -->
+          <el-submenu index="2">
+            <template slot="title">
+              <b class="tree-font">浜嬩欢褰曞儚鏃堕暱</b>
+            </template>
+            <el-menu-item-group class="item-group">
+              <el-form
+                label-width="150px"
+                class="alarmSetting"
+                style="padding-left: 5px; padding-right: 5px"
+              >
+                <el-form-item label="瑙嗛鎴彇鏈�鐭椂闀�" style="width: 724px">
+                  <el-slider
+                    id="cut_min_duration"
+                    @input="min_len = min_video_len"
+                    v-model="fakeObj.min"
+                    :min="5 / 1.2"
+                    :max="100"
+                    :step="5 / 1.2"
+                    show-stops
+                    :show-tooltip="true"
+                    :format-tooltip="formatTooltip"
+                  ></el-slider>
+                  <el-input-number
+                    v-model="min_len"
+                    @change="fakeObj.min = +(min_len / 1.2)"
+                    controls-position="right"
+                    :min="5"
+                    :max="120"
+                    size="small"
+                  ></el-input-number
+                  >&nbsp;s
+                </el-form-item>
+                <el-form-item label="瑙嗛鎴彇鏈�闀挎椂闀�" style="width: 724px">
+                  <el-slider
+                    id="cut_max_duration"
+                    v-model="fakeObj.max"
+                    :min="5 / 1.2"
+                    @input="max_len = max_video_len"
+                    :max="100"
+                    :step="5 / 1.2"
+                    show-stops
+                    :format-tooltip="formatTooltip"
+                    :show-tooltip="true"
+                  ></el-slider>
+                  <el-input-number
+                    v-model="max_len"
+                    @change="fakeObj.max = +(max_len / 1.2)"
+                    controls-position="right"
+                    :min="5"
+                    :max="120"
+                    size="small"
+                  ></el-input-number
+                  >&nbsp;s
+                </el-form-item>
+                <div class="mt15 mb10 save-btn">
+                  <el-button type="primary" @click="submitAlarm" size="small"
+                    >淇濆瓨</el-button
+                  >
+                </div>
+              </el-form>
+            </el-menu-item-group>
+          </el-submenu>
+          <!-- 瀵瑰鏈嶅姟IP 鏀瑰悕涓哄閮ㄧ綉缁�(鏂皌ab)-->
+        </el-menu>
+      </el-tab-pane>
+
+      <!-- 鏃堕棿閰嶇疆 -->
+      <el-tab-pane
+        label="鏃堕棿閰嶇疆"
+        name="timeSet"
+        v-if="isShow('settings:timeSet')"
+      >
+        <el-form label-width="100px">
+          <el-form-item label="璁惧鏃堕棿">
+            {{ equipmentTime }}
+          </el-form-item>
+          <div style="text-align: left; padding: 10px 0px">
+            <div class="time-type">NTP鏍℃椂</div>
+            <div style="padding: 10px 0px">
+              <el-radio v-model="syncType" label="1">NTP鏍℃椂</el-radio>
+            </div>
+          </div>
+
+          <el-form-item label="鏈嶅姟鍣ㄥ湴鍧�">
+            <ip-input
+              :ip="ntpServer"
+              @on-blur="ntpServer = arguments[0]"
+              :disabled="syncType === '2'"
+            ></ip-input>
+          </el-form-item>
+
+          <el-form-item label="鏍℃椂鏃堕棿闂撮殧" style="width: 41.3%">
+            <el-input-number
+              v-model.number="timeInterval"
+              :min="1"
+              :max="60"
+              placeholder="璇疯緭鍏�"
+              size="small"
+              :controls="false"
+              :disabled="syncType === '2'"
+            ></el-input-number
+            >&nbsp;&nbsp;&nbsp;鍒嗛挓
+            <el-button
+              type="text"
+              style="position: absolute; left: 330px"
+              :disabled="syncType === '2'"
+              @click="testNTP"
+              :loading="ntpTestLoading"
+              >娴嬭瘯</el-button
+            >
+          </el-form-item>
+
+          <div style="text-align: left; padding: 10px 0px">
+            <div class="time-type">鎵嬪姩鏍℃椂</div>
+            <div style="padding: 10px 0px">
+              <el-radio v-model="syncType" label="2">鎵嬪姩鏍℃椂</el-radio>
+            </div>
+          </div>
+
+          <el-form-item label="璁剧疆鏃堕棿">
+            <el-date-picker
+              v-model="settime"
+              type="datetime"
+              placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+              size="small"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :disabled="syncType === '1'"
+            ></el-date-picker>
+            <el-checkbox
+              v-model="settimeRadio"
+              style="margin-left: 12px"
+              @change="syncBrowser"
+              :disabled="syncType === '1'"
+              >鍚屾鏈绠楁満鏃堕棿</el-checkbox
+            >
+          </el-form-item>
+
+          <el-col :span="12" style="padding-right: 40px">
+            <el-form-item>
+              <el-button type="primary" @click="submitClock" size="small"
+                >淇濆瓨</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-tab-pane>
+
+      <!-- 闆嗙兢绠$悊 -->
+      <el-tab-pane
+        label="闆嗙兢绠$悊"
+        name="cluster"
+        v-if="isShow('settings:cluster')"
+      >
+        <cluster-management></cluster-management>
+      </el-tab-pane>
+      <!-- <el-tab-pane label="澶栭儴璁块棶" name="fourth">
+        <el-menu
+          :default-openeds="openeds"
+          background-color="#fff"
+          text-color="#303133"
+          active-text-color="#409EFF"
+          style="height: 100%;"
+          class="menu-css"
+          @open="menuOpen"
+          @close="menuClose"
+        >
+          <el-submenu index="0">
+            <template slot="title">
+              <b class="tree-font">澶栭儴璁块棶璁剧疆</b>
+            </template>
+            <el-menu-item-group class="item-group">
+              <el-form :model="sysinfo" :rules="rules" ref="sysinfo" label-width="100px">
+                <div class="flex-box">
+                  <label>璁剧疆澶栭儴IP</label>
+                  <div style="width:300px;">
+                    <ip-input :ip="ipServer.ip" @on-blur="ipServer.ip = arguments[0]"></ip-input>
+                  </div>
+                  <el-checkbox label="閫夌敤鏈満IP" size="small" style="margin-left: 20px"></el-checkbox>
+                </div>
+                <div class="flex-box">
+                  <label>鍩熷悕</label>
+                  <el-input size="small" v-model="ipServer.localhost"></el-input>
+                </div>
+                <div class="flex-box">
+                  <label>鏈湴鏂囦欢绔彛</label>
+                  <el-input size="small" v-model="ipServer.localFilePort"></el-input>
+                </div>
+                <div class="mt15 mb10 save-btn">
+                  <el-button type="primary" @click="submitSysinfo" size="small">淇濆瓨</el-button>
+                </div>
+              </el-form>
+            </el-menu-item-group>
+          </el-submenu>
+        </el-menu>
+      </el-tab-pane>-->
+      <el-tab-pane
+        label="鏉冮檺绠$悊"
+        name="permission"
+        v-if="isShow('settings:permission')"
+      >
+        <authority-management
+          v-if="activeName === 'permission'"
+        ></authority-management>
+      </el-tab-pane>
+      <el-tab-pane
+        label="骞挎挱璁剧疆"
+        name="broadcast"
+        v-if="isShow('settings:broadcast')"
+      >
+        <radio-set v-if="activeName === 'broadcast'"></radio-set>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+import {
+  getDevInfo,
+  getAlarmConfig,
+  saveDevInfo,
+  saveAlarmConfig,
+  getClockInfo,
+  saveClockInfo,
+  testNTPserver,
+  getResourceConfig,
+  saveResourceConfig,
+} from "@/api/system";
+
+import { isPort, isIPv4 } from "@/scripts/validate";
+import ipInput from "@/components/subComponents/IPInput";
+import TimeZones from "@/Pool/TimeZones";
+
+import ClusterManagement from "./ClusterManagement";
+import AuthorityManagement from "./AuthorityManagement";
+import RadioSet from "./RadioSet";
+import config from "../../../../package.json";
+
+export default {
+  name: "BasicSettings",
+  components: {
+    ipInput,
+    ClusterManagement,
+    AuthorityManagement,
+    RadioSet,
+  },
+  computed: {
+    min_video_len() {
+      return Math.round(this.fakeObj.min * 1.2);
+    },
+    max_video_len() {
+      return Math.round(this.fakeObj.max * 1.2);
+    },
+    isAdmin() {
+      if (
+        sessionStorage.getItem("userInfo") &&
+        sessionStorage.getItem("userInfo") !== ""
+      ) {
+        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
+        return loginName === "superadmin" || loginName === "basic";
+      }
+      return false;
+    },
+  },
+  directives: {
+    focus: {
+      inserted: function (el) {
+        el.querySelector("input").focus();
+      },
+    },
+  },
+  data() {
+    return {
+      loading: true,
+      loadingText: "",
+      gutter: 10,
+      activeName: "sysInfo",
+      timezone: "",
+      syncType: "1",
+      ntpServer: "",
+      equipmentTime: "",
+      NYPport: "",
+      settime: "",
+      timeInterval: 10,
+      settimeRadio: false,
+      clockTimer: null,
+      browserTimer: null,
+      timestamp: 0,
+      sysinfo: {},
+      alarmConf: {},
+      min_len: 0,
+      max_len: 0,
+      fakeObj: {
+        min: 0,
+        max: 0,
+      },
+      originNetConfig: {
+        ip: "",
+        gw: "",
+        mask: "",
+        dns: "",
+      },
+      rules: {
+        ip: [
+          {
+            required: true,
+            message: "璇疯緭鍏P鍦板潃",
+            trigger: "change",
+          },
+          { validator: isIPv4, trigger: "change" },
+        ],
+        ServerIp: [
+          {
+            required: true,
+            message: "璇疯緭鍏P鍦板潃",
+            trigger: "change",
+          },
+          { validator: isIPv4, trigger: "change" },
+        ],
+        ServerPort: [
+          {
+            required: true,
+            message: "璇疯緭鍏ョ鍙�",
+            trigger: "change",
+          },
+          { validator: isPort, trigger: "change" },
+        ],
+        GbServerPort: [
+          {
+            required: true,
+            message: "璇疯緭鍏ョ鍙�",
+            trigger: "change",
+          },
+          { validator: isPort, trigger: "change" },
+        ],
+        gateway: [
+          {
+            required: true,
+            message: "璇疯緭鍏ョ綉鍏�",
+            trigger: "change",
+          },
+          { validator: isIPv4, trigger: "change" },
+        ],
+        dns: [
+          {
+            required: true,
+            message: "璇疯緭鍏ns鍦板潃",
+            trigger: "change",
+          },
+          { validator: isIPv4, trigger: "change" },
+        ],
+        server_name: [
+          { required: true, message: "璇疯緭鍏ュ悕绉�", trigger: "change" },
+        ],
+        subMask: [
+          {
+            required: true,
+            message: "璇疯緭鍏ュ瓙缃戞帺鐮�",
+            trigger: "change",
+          },
+          { validator: isIPv4, trigger: "change" },
+        ],
+      },
+      openeds: ["0"],
+      ipServer: {
+        diyOrLocalIP: "1",
+        ip: "",
+        localhost: "",
+        localFilePort: "",
+      },
+      locationCity: {
+        province: "",
+        city: "",
+        county: "",
+        provinceOptions: [],
+        cityOptions: [],
+        countyOptions: [],
+      },
+      webPort: 0,
+      ntpTestLoading: false,
+      buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
+    };
+  },
+  created() {
+    if (this.isShow("settings:sysInfo")) {
+      this.activeName = "sysInfo";
+    } else if (this.isShow("settings:timeSet")) {
+      this.activeName = "timeSet";
+    } else if (this.isShow("settings:cluster")) {
+      this.activeName = "cluster";
+    } else if (this.isShow("settings:permission")) {
+      this.activeName = "permission";
+    } else if (this.isShow("settings:broadcast")) {
+      this.activeName = "broadcast";
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initSysinfo();
+      // this.initAlarmConf();
+      this.initResourceConfig();
+      this.initClockConf();
+      //this.markStartTime();
+    });
+  },
+  beforeDestroy() {
+    clearTimeout(this.clockTimer);
+    clearInterval(this.browserTimer);
+  },
+  methods: {
+    formatTooltip(v){
+      return Math.round(v*1.2)
+    },
+    isShow(authority) {
+      return (
+        this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
+      );
+    },
+    initSysinfo() {
+      this.loadingText = "姝e湪鑾峰彇璁惧淇℃伅...";
+      getDevInfo()
+        .then((rsp) => {
+          if (rsp && rsp.success) {
+            this.sysinfo = rsp.data;
+            this.sysinfo.gateway = this.sysinfo.gateway.trim();
+            this.originNetConfig.ip = this.sysinfo.ip;
+            this.originNetConfig.mask = this.sysinfo.subMask;
+            this.originNetConfig.gw = this.sysinfo.gateway.trim();
+            this.originNetConfig.dns = this.sysinfo.dns ? this.sysinfo.dns : "";
+            this.fakeObj.min = rsp.data.min_video_len / 1.2
+            this.fakeObj.max = rsp.data.max_video_len / 1.2
+            if (this.sysinfo.deviceInfo) {
+              let devInfo = this.sysinfo.deviceInfo;
+
+              this.sysinfo.cpuInfo = devInfo.cpu[0].modelName;
+              this.sysinfo.disks = "( " + devInfo.disk + ") ";
+              this.sysinfo.mem =
+                (devInfo.mem.total / 1024 / 1024 / 1024).toFixed(2) + "GB";
+              // this.sysinfo.arch = devInfo.host.kernelArch;
+              this.sysinfo.uptime = this.secondsFormat(devInfo.host.uptime);
+            }
+
+            if (!this.sysinfo.server_port) {
+              this.sysinfo.server_port = 7003;
+            }
+
+            this.webPort = this.sysinfo.server_port;
+
+            this.sysinfo.webVersion = "V" + config.version;
+          }
+
+          this.loading = false;
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
+    },
+    secondsFormat(s) {
+      var day = Math.floor(s / (24 * 3600)); // Math.floor()鍚戜笅鍙栨暣
+      var hour = Math.floor((s - day * 24 * 3600) / 3600);
+      var minute = Math.floor((s - day * 24 * 3600 - hour * 3600) / 60);
+      var second = s - day * 24 * 3600 - hour * 3600 - minute * 60;
+      return day + "澶�" + hour + "鏃�" + minute + "鍒�" + second + "绉�";
+    },
+    initClockConf(ntpTest = false) {
+      getClockInfo().then((rsp) => {
+        if (rsp && rsp.success) {
+          this.timezone = rsp.data.time_zone;
+          if (!ntpTest) {
+            this.syncType = rsp.data.ntp ? "1" : "2";
+          }
+          if (rsp.data.ntp) {
+            this.ntpServer = rsp.data.ntp_server;
+            this.timeInterval = rsp.data.interval;
+          }
+          this.timestamp = rsp.data.local_time;
+          if (this.clockTimer === null) {
+            this.runClock();
+          }
+        }
+      });
+    },
+    runClock() {
+      this.equipmentTime = this.formatTime(++this.timestamp, "Y-M-D h:m:s");
+      this.clockTimer = setTimeout(() => {
+        this.runClock();
+      }, 1000);
+    },
+    initAlarmConf() {
+      // getAlarmConfig().then(rsp => {
+      //   if (rsp && rsp.success) {
+      //     this.alarmConf = rsp.data;
+      //   }
+      // });
+    },
+    initResourceConfig() {
+      getResourceConfig().then((rsp) => {
+        if (rsp && rsp.success) {
+          this.ipServer.diyOrLocalIP = rsp.data.ipType;
+          this.ipServer.ip = rsp.data.serviceIp;
+          this.ipServer.localhost = rsp.data.domain;
+          this.ipServer.localFilePort = rsp.data.filePort;
+        }
+      });
+    },
+    syncBrowser(enable) {
+      if (!enable) {
+        clearInterval(this.browserTimer);
+      } else {
+        this.browserTimer = setInterval(() => {
+          let timestamp = new Date().getTime() / 1000;
+          this.settime = this.formatTime(timestamp, "Y-M-D h:m:s");
+        }, 1000);
+      }
+    },
+    markStartTime() {
+      let timestamp = new Date().getTime() / 1000;
+      this.settime = this.formatTime(timestamp, "Y-M-D h:m:s");
+    },
+    submitSysinfo() {
+      this.$refs["sysinfo"].validate((valid) => {
+        if (valid) {
+          if (
+            this.sysinfo.ip !== this.originNetConfig.ip ||
+            this.sysinfo.subMask !== this.originNetConfig.mask ||
+            this.sysinfo.dns !== this.originNetConfig.dns ||
+            this.sysinfo.gateway !== this.originNetConfig.gw
+          ) {
+            if (this.sysinfo.ip !== this.originNetConfig.ip) {
+              let newUri =
+                location.protocol +
+                "//" +
+                this.sysinfo.ip +
+                ":" +
+                this.sysinfo.server_port;
+              var changeIPTimer = setTimeout(() => {
+                this.$alert(
+                  '<strong>鎮ㄥ凡淇敼浜嗘湇鍔″櫒ip, 璇烽噸鏂扮櫥褰�</strong><a target="_parent" href="' +
+                    newUri +
+                    '"> ' +
+                    newUri +
+                    "<a/>",
+                  "鎻愮ず",
+                  {
+                    dangerouslyUseHTMLString: true,
+                  }
+                );
+              }, 10000);
+            }
+
+            this.$confirm("纭闇�瑕佷慨鏀规湇鍔″櫒缃戠粶閰嶇疆鍚楋紵", {
+              center: true,
+              cancelButtonClass: "comfirm-class-cancle",
+              confirmButtonClass: "comfirm-class-sure",
+            })
+              .then(() => {
+                this.loading = true;
+                this.loadingText = "姝e湪澶勭悊...";
+                saveDevInfo(this.sysinfo)
+                  .then((rsp) => {
+                    if (rsp && rsp.success) {
+                      this.$notify({
+                        type: "success",
+                        message: "鏈満淇℃伅淇濆瓨鎴愬姛",
+                      });
+                    }
+                    this.initSysinfo();
+                    this.loading = false;
+                  })
+                  .catch((err) => {
+                    this.loading = false;
+                    clearTimeout(changeIPTimer);
+                    this.$notify({
+                      type: "error",
+                      message: "淇濆瓨澶辫触",
+                    });
+                  });
+              })
+              .catch((err) => {});
+          } else {
+            saveDevInfo(this.sysinfo).then((rsp) => {
+              if (rsp && rsp.success) {
+                this.$notify({
+                  type: "success",
+                  message: "鏈満淇℃伅淇濆瓨鎴愬姛",
+                });
+                this.initSysinfo();
+              }
+            });
+
+            if (this.sysinfo.server_port !== this.webPort) {
+              let newUri =
+                location.protocol +
+                "//" +
+                this.sysinfo.ip +
+                ":" +
+                this.sysinfo.server_port;
+              var changeIPTimer = setTimeout(() => {
+                this.$alert(
+                  '<strong>鎮ㄥ凡淇敼浜嗘湇鍔″櫒绔彛, 璇烽噸鏂扮櫥褰�</strong><a target="_parent" href="' +
+                    newUri +
+                    '"> ' +
+                    newUri +
+                    "<a/>",
+                  "鎻愮ず",
+                  {
+                    dangerouslyUseHTMLString: true,
+                  }
+                );
+              }, 5000);
+            }
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    checkTimeZone(val) {},
+    submitClock() {
+      if (this.syncType === "1") {
+        if (this.ntpServer === "") {
+          this.$notify({
+            type: "error",
+            message: "NTP 鏈嶅姟鍣ㄥ湴鍧�涓嶈兘涓虹┖",
+          });
+          return false;
+        } else if (this.timeInterval === "") {
+          this.timeInterval = 1;
+        }
+      } else {
+        if (this.settime === "") {
+          this.$notify({
+            type: "error",
+            message: "璁剧疆鏃堕棿涓嶈兘涓虹┖",
+          });
+          return false;
+        }
+      }
+      let requestBody = {
+        timeZone: this.timezone,
+        ntp: this.syncType === "1",
+        ntpServer: this.ntpServer,
+        interval: this.timeInterval,
+        newTime: this.settime,
+      };
+      saveClockInfo(requestBody).then((rsp) => {
+        if (rsp && rsp.success) {
+          this.$notify({
+            type: "success",
+            message: "璁剧疆鎴愬姛",
+          });
+        }
+        this.initClockConf();
+      });
+    },
+    testNTP() {
+      this.ntpTestLoading = true;
+      testNTPserver({ server: this.ntpServer })
+        .then((rsp) => {
+          if (rsp && rsp.success) {
+            this.$notify({
+              type: "success",
+              message: "鏃堕棿鍚屾鎴愬姛",
+            });
+          } else {
+            this.$notify({
+              type: "error",
+              message: "鏃堕棿鍚屾澶辫触",
+            });
+          }
+          this.ntpTestLoading = false;
+          this.initClockConf(true);
+        })
+        .catch((err) => {
+          this.$notify({
+            type: "error",
+            message: "鏃堕棿鍚屾澶辫触,璇锋鏌ユ湇鍔″櫒ip",
+          });
+          this.ntpTestLoading = false;
+        });
+    },
+    submitAlarm() {
+      saveAlarmConfig({
+        min_video_len: this.min_video_len,
+        max_video_len: this.max_video_len,
+      }).then((rsp) => {
+        if (rsp && rsp.success) {
+          this.$notify({
+            type: "success",
+            message: "淇濆瓨鎴愬姛",
+          });
+        }
+      });
+    },
+    // submitResource() {
+    //   let regNum = /^[0-9]*$/;
+    //   if (!this.vaildHost(this.ipServer.localhost)) {
+    //     this.$notify({
+    //       type: "warning",
+    //       message: "璇疯緭鍏ユ纭牸寮忓緱鍩熷悕锛�",
+    //     });
+    //     return false;
+    //   }
+    //   if (!regNum.test(this.ipServer.localFilePort)) {
+    //     this.$notify({
+    //       type: "warning",
+    //       message: "璇疯緭鍏ユ纭殑绔彛鍙凤紒",
+    //     });
+    //     return false;
+    //   }
+    //   saveResourceConfig({
+    //     domain: this.ipServer.localhost,
+    //     ipType: this.ipServer.diyOrLocalIP,
+    //     serviceIp: this.ipServer.ip,
+    //     filePort: Number(this.ipServer.localFilePort),
+    //   }).then((res) => {
+    //     if (res && res.success) {
+    //       this.$notify({
+    //         type: "success",
+    //         message: "淇濆瓨鎴愬姛",
+    //       });
+    //     } else {
+    //       this.$notify({
+    //         type: "error",
+    //         message: "淇濆瓨澶辫触",
+    //       });
+    //     }
+    //   });
+    // },
+    // onIpBlur(e, ip) {
+    //   console.log(e, ip);
+    // },
+    formatTime(number, format) {
+      var formateArr = ["Y", "M", "D", "h", "m", "s"];
+      var returnArr = [];
+
+      var date = new Date(number * 1000);
+      returnArr.push(date.getFullYear());
+      returnArr.push(this.formatNumber(date.getMonth() + 1));
+      returnArr.push(this.formatNumber(date.getDate()));
+
+      returnArr.push(this.formatNumber(date.getHours()));
+      returnArr.push(this.formatNumber(date.getMinutes()));
+      returnArr.push(this.formatNumber(date.getSeconds()));
+
+      for (var i in returnArr) {
+        format = format.replace(formateArr[i], returnArr[i]);
+      }
+      return format;
+    },
+
+    //鏁版嵁杞寲
+    formatNumber(n) {
+      n = n.toString();
+      return n[1] ? n : "0" + n;
+    },
+    menuOpen(event) {},
+    menuClose(event) {},
+    // handleEdit(row) {
+    //   console.log(row);
+    //   row.edit = true;
+    // },
+    // handleCancel(row) {
+    //   row.edit = false;
+    //   console.log(row);
+    // },
+    // handleSave(row) {
+    //   console.log(row);
+    //   row.edit = false;
+    //   this.$notify({
+    //     message: "淇濆瓨鎴愬姛",
+    //     type: "success",
+    //   });
+    // },
+    //鏍¢獙鍩熷悕
+    vaildHost(str) {
+      let re = /^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/;
+      return re.test(str);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.s-basic-setting {
+  width: 100%;
+  height: 100%;
+  .el-form {
+    width: 1000px;
+
+    // margin-left: -80px;
+    .el-form-item {
+      text-align: left;
+      &.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
+        margin-left: -8px;
+      }
+      .el-button {
+        float: right;
+      }
+
+      .el-form-item__content {
+        text-align: left;
+        input {
+          max-width: 360px;
+        }
+        .el-date-editor.el-input,
+        .el-date-editor.el-input__inner {
+          width: 216px;
+        }
+        .el-checkbox__label {
+          padding-left: 5px;
+        }
+      }
+
+      .el-form-item__label {
+        text-align: left;
+      }
+    }
+  }
+  .alarmSetting {
+    .el-input {
+      width: 100%;
+      // padding-right: 10px;
+    }
+    .el-select {
+      max-width: 113px;
+    }
+    .el-slider {
+      width: calc(100% - 120px);
+      display: inline-block;
+      padding-right: 30px;
+      box-sizing: border-box;
+      vertical-align: middle;
+    }
+    .el-input-number {
+      width: 100px;
+      display: inline-block;
+      .el-input {
+        width: 100%;
+      }
+    }
+  }
+
+  .time-type {
+    height: 25px;
+    width: 413px;
+    line-height: 28px;
+    padding: 3px 23px;
+    font-size: 14px;
+    font-weight: 600;
+    background-color: #e4e6ed;
+  }
+
+  #cut_min_duration {
+    .el-slider__bar {
+      background-color: #3d68e1;
+    }
+    .el-slider__button {
+      width: 10px;
+      height: 10px;
+      border: 4px solid #3d68e1;
+    }
+  }
+
+  #cut_max_duration {
+    .el-slider__bar {
+      background-color: #ff9e6e;
+    }
+    .el-slider__button {
+      width: 10px;
+      height: 10px;
+      border: 4px solid #ff9e6e;
+    }
+  }
+  .menu-css,
+  .el-menu {
+    border-right: none;
+    list-style: none;
+    position: relative;
+    margin: 0;
+    padding-left: 10px;
+    background-color: #ffffff;
+    .el-submenu__title {
+      height: 35px;
+      line-height: 35px;
+      font-size: 14px;
+      color: #303133;
+      padding: 0 20px;
+      list-style: none;
+      cursor: pointer;
+      position: relative;
+      -webkit-transition: border-color 0.3s, background-color 0.3s, color 0.3s;
+      transition: border-color 0.3s, background-color 0.3s, color 0.3s;
+      -webkit-box-sizing: border-box;
+      box-sizing: border-box;
+      white-space: nowrap;
+    }
+    .tree-font {
+      font-family: PingFangSC-Medium;
+      font-size: 14px;
+      color: #222222;
+      text-align: left;
+    }
+    li {
+      text-align: left;
+      .el-submenu__title {
+        // border-bottom: solid 1px #e6e6e6;
+        padding-left: 10px !important;
+        background-color: #e4e6ed !important;
+        border-radius: 2px;
+        .el-submenu__icon-arrow {
+          position: absolute;
+          top: 50%;
+          right: auto;
+          left: 135px;
+          margin-top: -7px;
+          -webkit-transition: -webkit-transform 0.3s;
+          transition: -webkit-transform 0.3s;
+          transition: transform 0.3s;
+          transition: transform 0.3s, -webkit-transform 0.3s;
+          font-size: 12px;
+        }
+      }
+    }
+  }
+  .save-btn {
+    text-align: right;
+    position: relative;
+    right: 40px;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.flex-box {
+  display: flex;
+  height: 50px;
+  label {
+    width: 120px;
+  }
+  .el-input {
+    width: 300px;
+  }
+}
+.desc-info {
+  margin-bottom: 14px;
+  .flex-box {
+    height: 40px;
+    line-height: 40px;
+    .xiangqin-label {
+      width: 80px;
+    }
+  }
+}
+.menu-css,
+.el-menu {
+  border-right: none;
+  list-style: none;
+  position: relative;
+  margin: 0;
+  padding-left: 0;
+  background-color: #ffffff;
+
+  .tree-font {
+    font-family: PingFangSC-Medium;
+    font-size: 14px;
+    color: #222222;
+    text-align: left;
+  }
+  li {
+    text-align: left;
+    .el-submenu__title {
+      .el-submenu__icon-arrow {
+        position: absolute;
+        top: 50%;
+        right: 0;
+        margin-top: -7px;
+        -webkit-transition: -webkit-transform 0.3s;
+        transition: -webkit-transform 0.3s;
+        transition: transform 0.3s;
+        transition: transform 0.3s, -webkit-transform 0.3s;
+        font-size: 12px;
+      }
+    }
+  }
+}
+</style>
diff --git a/src/pages/settings/views/generalSettings.vue b/src/pages/settings/views/generalSettings.vue
index dcb849c..89689cf 100644
--- a/src/pages/settings/views/generalSettings.vue
+++ b/src/pages/settings/views/generalSettings.vue
@@ -60,27 +60,25 @@
           <div class="min-dur">
             <div class="title">鎶撴媿鍓嶅綍鍍忔椂闀�</div>
             <div class="entity">
-              <div class="sec">
-                {{min_video_len }}s
-              </div>
+              <div class="sec">{{ min_video_len }}s</div>
               <div class="block">
                 <el-slider
                   v-model="fakeObj.min"
                   id="cut_min_duration"
                   :min="5 / 1.2"
-                  :max="100"
-                  @input="min_len=min_video_len"
-                  :show-tooltip="false"
+                  :max="100" :step="5 / 1.2"
+                  @input="min_len = min_video_len"
+                  show-stops
+                  :show-tooltip="true"
+                  :format-tooltip="formatTooltip"
                 ></el-slider>
-                <!-- show-stops
-                  :step="5/1.2" -->
               </div>
               <el-input-number
                 v-model="min_len"
-                @change="fakeObj.min=+((min_len/1.2))"
+                @change="fakeObj.min = +(min_len / 1.2)"
                 controls-position="right"
-                :min="5"
-                :max="120"
+                :min="5" :step="5"
+                :max="120" step-strictly
                 size="small"
               ></el-input-number
               >&nbsp;s
@@ -89,22 +87,24 @@
           <div class="min-dur">
             <div class="title">鎶撴媿鍚庡綍鍍忔椂闀�</div>
             <div class="entity">
-              <div class="sec">  {{ max_video_len }} s</div>
+              <div class="sec">{{ max_video_len }} s</div>
               <div class="block">
                 <el-slider
                   v-model="fakeObj.max"
                   id="cut_max_duration"
                   :min="5 / 1.2"
-                  @input="max_len=max_video_len"
-                  :max="100"
-                  :show-tooltip="false"
+                  @input="max_len = max_video_len"
+                  :max="100" :step="5 / 1.2"
+                  show-stops
+                  :format-tooltip="formatTooltip"
+                  :show-tooltip="true"
                 ></el-slider>
               </div>
               <el-input-number
                 v-model="max_len"
-                @change="fakeObj.max=+((max_len/1.2))"
+                @change="fakeObj.max = +(max_len / 1.2)"
                 controls-position="right"
-                :min="5"
+                :min="5" :step="5" step-strictly
                 :max="120"
                 size="small"
               ></el-input-number
@@ -248,15 +248,11 @@
       curPlayingIndex: null,
       showUpload: false,
       activeIcons: 0,
-      // alarmConf: {
-      //   min_video_len: 10,
-      //   max_video_len: 15,
-      // },
-      min_len:10,
-      max_len:15,
-      fakeObj:{
-        min:10,
-        max:15
+      min_len: 0,
+      max_len: 0,
+      fakeObj: {
+        min: 0,
+        max: 0,
       },
       menuArr: [
         { name: "璁惧淇℃伅", icon: "\ue933" },
@@ -310,14 +306,17 @@
     });
   },
   computed: {
-    min_video_len(){
-      return +((this.fakeObj.min* 1.2).toFixed(0))
+    min_video_len() {
+      return Math.round(this.fakeObj.min * 1.2);
     },
-    max_video_len(){
-      return +((this.fakeObj.max* 1.2).toFixed(0))
+    max_video_len() {
+      return Math.round(this.fakeObj.max * 1.2);
     },
   },
   methods: {
+    formatTooltip(v) {
+      return Math.round(v * 1.2);
+    },
     pickBg(item, i) {
       this.activeBg = i;
       let message = "changeBackground?" + item.name;
@@ -361,9 +360,8 @@
         this.deviceInfo.disks = "( " + info.disk + ") ";
         this.deviceInfo.memory =
           (info.mem.total / 1024 / 1024 / 1024).toFixed(2) + "GB";
-        this.min_len = basic.min_video_len
-        this.fakeObj.min = +((basic.min_video_len/1.2).toFixed(0));
-        this.fakeObj.max = +((basic.max_video_len/1.2).toFixed(0));
+        this.fakeObj.min = basic.min_video_len / 1.2;
+        this.fakeObj.max = basic.max_video_len / 1.2;
       });
     },
     getSounds() {
@@ -435,13 +433,12 @@
         "rgba(233, 233, 233, 1)";
     },
     submitAlarm() {
-      debugger;
       saveAlarmConfig({
         min_video_len: this.min_video_len,
-        max_video_len:  this.max_video_len
+        max_video_len: this.max_video_len,
       }).then((res) => {
         if (res && res.success) {
-          this.getDeviceInfo()
+          this.getDeviceInfo();
           this.$notify({
             type: "success",
             message: "淇濆瓨鎴愬姛",
diff --git a/src/pages/syslog/views/operationLog.vue b/src/pages/syslog/views/operationLog.vue
index 523cf69..a1800c6 100644
--- a/src/pages/syslog/views/operationLog.vue
+++ b/src/pages/syslog/views/operationLog.vue
@@ -350,7 +350,8 @@
         display: flex;
         align-items: baseline;
         width: fit-content;
-        margin-right: 20px;    min-width: 120px;
+        margin-right: 20px;
+        min-width: 120px;
         .name {
           margin-right: 5px;
           min-width: fit-content;
@@ -378,9 +379,10 @@
     }
   }
   .el-pagination {
-    padding: 20px 5px;    height: 100%;
-    box-sizing: border-box;    background-color: white;
-
+    padding: 20px 5px;
+    height: 100%;
+    box-sizing: border-box;
+    background-color: white;
   }
 }
 </style>
diff --git a/src/pages/syslog/views/pollingLog.vue b/src/pages/syslog/views/pollingLog.vue
index ff0d106..6abe780 100644
--- a/src/pages/syslog/views/pollingLog.vue
+++ b/src/pages/syslog/views/pollingLog.vue
@@ -11,7 +11,7 @@
           <div class="opts">
             <div class="opt" @click="openDialog">閫夋嫨鎽勫儚鏈�</div>
           </div>
-          <div class="pick-num">宸查�夛紙{{pickNum}}锛�</div>
+          <div class="pick-num">宸查�� : {{ pickNum }}</div>
         </div>
         <div class="search">
           <el-input
@@ -77,11 +77,22 @@
         ></el-table-column>
         <el-table-column
           :align="'center'"
-          prop="procName"
+          prop="minute"
           label="杞鏃堕暱锛堝垎锛�"
         ></el-table-column>
       </el-table>
     </div>
+
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="page"
+      :page-sizes="[15, 30, 50, 100]"
+      :page-size="15"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="total"
+    >
+    </el-pagination>
 
     <el-dialog
       title="閫夋嫨鎽勫儚鏈�"
@@ -142,7 +153,7 @@
       dialogVisible: false,
       procID: "",
       procName: "",
-      pickNum:0
+      pickNum: 0,
     };
   },
   mounted() {
@@ -151,6 +162,14 @@
     this.getOptions();
   },
   methods: {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.getOperationLog();
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getOperationLog();
+    },
     cancelShow() {
       this.dialogVisible = false;
       this.pickAllNot();
@@ -163,7 +182,7 @@
     },
     confirmCamera() {
       const selectedIDs = this.$refs.cameraTree.getCheckedKeys();
-      this.pickNum = selectedIDs.length
+      this.pickNum = selectedIDs.length;
       this.procID = selectedIDs.join(",");
       this.getScheduleLog();
       this.dialogVisible = false;
@@ -279,15 +298,17 @@
         display: flex;
         justify-content: space-between;
         align-items: center;
-        .title,.pick-num {
+        .title,
+        .pick-num {
           margin-right: 10px;
           font-size: 14px;
+          min-width: fit-content;
         }
         .opts {
           display: flex;
           justify-content: space-between;
           .opt {
-            width: fit-content;
+            width: 70px;
             height: 32px;
             padding: 0 15px;
             border-radius: 4px;
@@ -327,6 +348,7 @@
     border-radius: 5px;
     padding: 12px;
     background-color: white;
+    
     .tableBox {
       th {
         padding: 0 !important;
@@ -340,5 +362,11 @@
       }
     }
   }
+  .el-pagination {
+    padding: 20px 5px;
+    height: 100%;
+    box-sizing: border-box;
+    background-color: white;
+  }
 }
 </style>

--
Gitblit v1.8.0