From 9466f8f5d714c8f72dbaff6ac3898b4d43c7c715 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 22 二月 2022 15:28:55 +0800
Subject: [PATCH] delete pickerOptions

---
 src/pages/maintain/index/App.vue         |  102 ++++++++++-----------------------
 src/pages/maintain/views/systemClean.vue |   77 +++++++++----------------
 2 files changed, 60 insertions(+), 119 deletions(-)

diff --git a/src/pages/maintain/index/App.vue b/src/pages/maintain/index/App.vue
index 3f6e78e..b5f9f9c 100644
--- a/src/pages/maintain/index/App.vue
+++ b/src/pages/maintain/index/App.vue
@@ -1,97 +1,64 @@
 <template>
   <div class="container">
     <div class="container-left">
-      <div
-        class="left-card"
-        v-for="(item, index) in menuArr"
-        :key="index"
-        @click="openMenu(item, index)"
-      >
+      <div class="left-card" v-for="(item, index) in menuArr" :key="index" @click="openMenu(item, index)">
         <span class="icon iconfont">&#xe646;</span>
         <span class="card-text">{{ item.name }}</span>
       </div>
     </div>
-    <systemClean
-      v-if="activePage == '绯荤粺娓呯悊'"
-      style="width: 100%"
-    ></systemClean>
-    <updateSettings
-      v-if="activePage == '鏇存柊璁剧疆'"
-      style="width: 100%"
-    ></updateSettings>
-    <back-up
-      v-if="activePage == '澶囦唤杩樺師'"
-      style="width: 100%"
-    ></back-up>
-    <restartSettings
-      v-if="activePage == '閲嶅惎璁剧疆'"
-      style="width: 100%"
-    ></restartSettings>
+    <systemClean v-if="activePage == '绯荤粺娓呯悊'" style="width: 100%"></systemClean>
+    <updateSettings v-if="activePage == '鏇存柊璁剧疆'" style="width: 100%"></updateSettings>
+    <back-up v-if="activePage == '澶囦唤杩樺師'" style="width: 100%"></back-up>
+    <restartSettings v-if="activePage == '閲嶅惎璁剧疆'" style="width: 100%"></restartSettings>
   </div>
 </template>
 
 <script>
-import {
-  getClockInfo,
-  saveClockInfo,
-  testNTPserver,
-} from "@/api/system";
-import switchBar from "../components/switchBar";
-import ipInput from "@/components/subComponents/IPInput";
-import systemClean from "../views/systemClean";
-import updateSettings from "../views/updateSettings";
-import BackUp from "../views/backUp";
-import restartSettings from "../views/restartSettings";
+import systemClean from "../views/systemClean"
+import updateSettings from "../views/updateSettings"
+import BackUp from "../views/backUp"
+import restartSettings from "../views/restartSettings"
 export default {
   name: "settings",
   components: {
-    switchBar,
-    ipInput,
     systemClean,
     updateSettings,
     BackUp,
-    restartSettings,
+    restartSettings
   },
   data() {
     return {
       browserTimer: null,
-      menuArr: [
-        { name: "鏇存柊璁剧疆" },
-        { name: "澶囦唤杩樺師" },
-        { name: "绯荤粺娓呯悊" },
-        { name: "閲嶅惎璁剧疆" },
-      ],
+      menuArr: [{ name: "鏇存柊璁剧疆" }, { name: "澶囦唤杩樺師" }, { name: "绯荤粺娓呯悊" }, { name: "閲嶅惎璁剧疆" }],
       jpgArr: [{}, {}, {}, {}, {}, {}, {}, {}, {}],
       activePage: "鏇存柊璁剧疆",
       activeIndex: 0,
-      clockTimer: null,
-    };
+      clockTimer: null
+    }
   },
   beforeDestroy() {
-    clearTimeout(this.clockTimer);
-    clearInterval(this.browserTimer);
+    clearTimeout(this.clockTimer)
+    clearInterval(this.browserTimer)
   },
   mounted() {
-    const s = document.getElementsByClassName("left-card")[0];
-    s.style.backgroundColor = "rgba(61, 104, 225, 1)";
-    s.style.color = "#fff";
+    const s = document.getElementsByClassName("left-card")[0]
+    s.style.backgroundColor = "rgba(61, 104, 225, 1)"
+    s.style.color = "#fff"
   },
   methods: {
     openMenu(item, i) {
-      const old = document.getElementsByClassName("left-card")[
-        this.activeIndex
-      ];
-      old.style.backgroundColor = "initial";
-      old.style.color = "rgba(81, 81, 81, 1)";
+      const old = document.getElementsByClassName("left-card")[this.activeIndex]
+      old.style.backgroundColor = "initial"
+      old.style.color = "rgba(81, 81, 81, 1)"
 
-      this.activePage = item.name;
-      this.activeIndex = i;
-      const s = document.getElementsByClassName("left-card")[i];
-      s.style.backgroundColor = "rgba(61, 104, 225, 1)";
-      s.style.color = "#fff";
-    },
-  },
-};
+      this.activePage = item.name
+      this.activeIndex = i
+      const s = document.getElementsByClassName("left-card")[i]
+      s.style.backgroundColor = "rgba(61, 104, 225, 1)"
+      s.style.color = "#fff"
+    }
+  }
+}
 </script>
 <style lang="scss">
 .container {
@@ -140,7 +107,6 @@
     border-right: 5px solid rgba(248, 248, 248, 1);
     box-sizing: border-box;
     .account-left {
-  
       .add-account {
         color: rgba(61, 104, 225, 1);
         margin-top: 50px;
@@ -171,7 +137,6 @@
           font-size: 14px;
         }
       }
-  
     }
     .datetime-left {
       .time-card {
@@ -376,11 +341,8 @@
       }
     }
     .datetime-right {
-      .el-form-item.is-required:not(.is-no-asterisk)
-        > .el-form-item__label:before,
-      .el-form-item.is-required:not(.is-no-asterisk)
-        .el-form-item__label-wrap
-        > .el-form-item__label:before {
+      .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before,
+      .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label:before {
         display: none;
       }
       .el-form-item {
@@ -624,5 +586,3 @@
   }
 }
 </style>
-
-
diff --git a/src/pages/maintain/views/systemClean.vue b/src/pages/maintain/views/systemClean.vue
index ca5bb8f..c81e682 100644
--- a/src/pages/maintain/views/systemClean.vue
+++ b/src/pages/maintain/views/systemClean.vue
@@ -1,9 +1,5 @@
 <template>
-  <div class="clear"
-  
-      v-loading="loading"
-      :element-loading-text="loadingText"
-  >
+  <div class="clear" v-loading="loading" :element-loading-text="loadingText">
     <div class="head">
       <span class="t">璇烽�夋嫨瑕佹竻鐞嗙殑鏁版嵁鑼冨洿</span>
       <el-date-picker
@@ -34,48 +30,36 @@
       <div class="warm">
         <!-- <span class="icon iconfont" style="margin-right:5px">&#xe690;</span> -->
         <i class="iconfont icontishi-zhuyi"></i>
-        <span class="text"
-          >璇锋敞鎰忥紝鎸変互涓婃棩鏈熻寖鍥村垹闄ょ殑鏁版嵁涓嶅彲鎭㈠锛岀珛鍗崇敓鏁堬紝璇疯皑鎱庢搷浣�!</span
-        >
+        <span class="text">璇锋敞鎰忥紝鎸変互涓婃棩鏈熻寖鍥村垹闄ょ殑鏁版嵁涓嶅彲鎭㈠锛岀珛鍗崇敓鏁堬紝璇疯皑鎱庢搷浣�!</span>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-import { deleteDate } from "@/api/system";
+import { deleteDate } from "@/api/system"
 export default {
   data() {
     return {
-      pickerOptions: {
-        disabledDate(time) {
-          var day = new Date();
-          day.setTime(day.getTime() - 24 * 60 * 60 * 1000);
-          return time.getTime() > day;
-        },
-      },
       loading: false,
-      loadingText: '',
-      dataRange: [
-        this.$moment().format("YYYY-MM-DD HH:mm:ss"),
-        this.$moment().format("YYYY-MM-DD HH:mm:ss"),
-      ],
+      loadingText: "",
+      dataRange: [this.$moment().format("YYYY-MM-DD HH:mm:ss"), this.$moment().format("YYYY-MM-DD HH:mm:ss")],
       pickerOptions: {
         disabledDate(time) {
-          var day = new Date();
-          day.setTime(day.getTime() - 24 * 60 * 60 * 1000);
-          return time.getTime() > day;
-        },
-      },
-    };
+          var day = new Date()
+          day.setTime(day.getTime() - 24 * 60 * 60 * 1000)
+          return time.getTime() > day
+        }
+      }
+    }
   },
   mounted() {},
 
   methods: {
     deleteData() {
-      var timeRange = this.format(this.dataRange);
-      var showStartTime = timeRange[0];
-      var showEndTime = timeRange[1];
+      var timeRange = this.format(this.dataRange)
+      var showStartTime = timeRange[0]
+      var showEndTime = timeRange[1]
       this.$confirm(
         "鎻愮ず锛�" +
           showStartTime +
@@ -85,7 +69,7 @@
         {
           center: true,
           cancelButtonClass: "comfirm-class-cancle",
-          confirmButtonClass: "comfirm-class-sure",
+          confirmButtonClass: "comfirm-class-sure"
         }
       )
         .then(() => {
@@ -93,35 +77,32 @@
           this.loadingText = "姝e湪鍒犻櫎鏁版嵁锛岃绋嶅�欙紒"
           deleteDate({
             startTime: showStartTime,
-            endTime: showEndTime,
+            endTime: showEndTime
           })
             .then((resp) => {
               if (resp.success) {
                 this.$message({
                   type: "success",
-                  message: "鍒犻櫎鏁版嵁鎴愬姛",
-                });
+                  message: "鍒犻櫎鏁版嵁鎴愬姛"
+                })
                 this.loading = false
               }
             })
             .catch((err) => {
               this.$message({
                 type: "error",
-                message: "鍒犻櫎鏁版嵁澶辫触锛�",
-              });
+                message: "鍒犻櫎鏁版嵁澶辫触锛�"
+              })
               this.loading = false
-            });
+            })
         })
-        .catch(() => {});
+        .catch(() => {})
     },
     format(array) {
-      return [
-        this.$moment(array[0]).format("YYYY-MM-DD"),
-        this.$moment(array[1]).format("YYYY-MM-DD"),
-      ];
-    },
-  },
-};
+      return [this.$moment(array[0]).format("YYYY-MM-DD"), this.$moment(array[1]).format("YYYY-MM-DD")]
+    }
+  }
+}
 </script>
 <style lang="scss">
 .all {
@@ -151,8 +132,8 @@
       border: none;
     }
     .el-range-editor--small .el-range-separator {
-    line-height: 26px;
-}
+      line-height: 26px;
+    }
   }
   .desc {
     margin-top: 50px;
@@ -200,7 +181,7 @@
       align-items: center;
       justify-content: center;
       .iconfont {
-          font-size: 16px;
+        font-size: 16px;
 
         color: #e99038;
         margin-right: 5px;

--
Gitblit v1.8.0