all
heyujie
2021-07-21 b5e2e236828b7fbc0e8f2bdbf66651ad8907e3b1
src/pages/vindicate/views/systemClean.vue
File was renamed from src/pages/maintain/views/systemClean.vue
@@ -16,11 +16,17 @@
    </div>
    <div class="desc">
      <div class="disk-img"></div>
      <div class="disk-img">
        <span class="icon iconfont">&#xe6e0;</span>
      </div>
      <div class="cap">
        <div class="cap-text">磁盘可用:{{ 21 }}%</div>
        <div class="cap-text">
          <span>磁盘已用</span>
          <span>可用:{{ percent }}%</span>
        </div>
        <div class="cap-bar">
          <div class="inner-bar"></div>
          <div class="inner-bar" :style="`width: ${100-percent}%;`"></div>
        </div>
      </div>
@@ -36,7 +42,7 @@
</template>
<script>
import { deleteDate } from "@/api/system";
import { deleteData } from "@/api/system";
export default {
  data() {
    return {
@@ -55,21 +61,26 @@
      ]
    };
  },
  mounted() { },
  mounted() {
  },
  props:{
    percent:{
      type:Number,
      default:0
    }
  },
  methods: {
    deleteData() {
      var timeRange = this.format(this.dataRange);
      var showStartTime = timeRange[0];
      var showEndTime = timeRange[1];
      this.$confirm(
        "提示:" +
        showStartTime +
        " 至 " +
        showEndTime +
        " 产生的全部数据将被删除,此操作立即生效,不可恢复,是否删除?",
        {
          center: true,
        " 产生的全部数据将被删除,此操作立即生效,不可恢复,是否删除?", "提示",
        {
          type:"warning",
          cancelButtonClass: "comfirm-class-cancle",
          confirmButtonClass: "comfirm-class-sure",
        }
@@ -77,7 +88,7 @@
        .then(() => {
          this.loading = true
          this.loadingText = "正在删除数据,请稍候!"
          deleteDate({
          deleteData({
            startTime: showStartTime,
            endTime: showEndTime,
          })
@@ -147,7 +158,11 @@
      width: 100px;
      margin: 0 auto;
      margin-bottom: 10px;
      background-color: aquamarine;
      // background-color: aquamarine;
      .iconfont{
        font-size: 90px;
        color: #3a8120;
      }
    }
    .cap {
      height: 50px;
@@ -155,21 +170,22 @@
      width: 160px;
      margin-bottom: 20px;
      .cap-bar {
        height: 8px;
        background: rgba(242, 242, 242, 1);
        height: 10px;
        background: rgb(239, 240, 236);
        //
        margin: 0 auto;
        border-radius: 2px;
        .inner-bar {
          background: #3a8120;
          width: 40%;
          height: 100%;
          border-radius: 2px;
        }
      }
      .cap-text {
        text-align: right;
        height: 25px;
        height: 25px;    display: flex;
    justify-content: space-between;
        line-height: 25px;
        font-size: 12px;
      }
@@ -192,7 +208,7 @@
        margin-right: 5px;
      }
      .text {
        color: rgba(187, 187, 187, 1);
        color: rgb(175, 175, 175);
        font-size: 14px;
      }
    }