luobisheng
2022-11-29 4641a877cd6a94e4d35dca7f7f14bc1443e2d2ad
src/views/operate/log/index.vue
@@ -63,7 +63,6 @@
        <!-- 数据展示 -->
        <el-table
          ref="multipleTable"
          :default-sort="{ prop: 'createTime' }"
          :header-cell-style="{
            background: '#06122c',
            'font-size': '12px',
@@ -82,7 +81,7 @@
            prop="createTime"
            label="日志时间"
            min-width="10"
            :sort-orders="['descending','ascending']"
            :sort-orders="['descending', 'ascending']"
            sortable="custom"
          >
            <template slot-scope="scope">
@@ -148,7 +147,7 @@
  </div>
</template>
<script>
import {getNowDate} from '@/utils/helper'
import {downloadFile, getNowDate} from "@/utils/helper";
import helper from "@/utils/mydate";
import { parseTime } from "@/utils/index";
import { createNamespacedHelpers } from "vuex";
@@ -202,7 +201,6 @@
    async handleExport() {
      const { currentPage, pageSize, context, operationType, mysort, mytime } =
        this;
      console.log(mytime);
      let arr = await this.exportLogs({
        content: context,
        current: currentPage,
@@ -210,7 +208,7 @@
        id: "",
        operationType: operationType === "全部" ? "" : operationType,
        portEquipment: "",
        size: pageSize,
        size: 50000,
        startTime: mytime[0] !== "" ? parseTime(mytime[0]) : "",
        sort: mysort,
      });
@@ -224,7 +222,7 @@
      const href = window.URL.createObjectURL(blob);
      downloadElement.href = href;
      // // 下载后文件名
      downloadElement.download = fileName + '日志数据.xlsx';
      downloadElement.download = fileName + "日志数据.xlsx";
      document.body.appendChild(downloadElement);
      // 点击下载
      downloadElement.click();
@@ -285,7 +283,6 @@
    async getLogList() {
      const { currentPage, pageSize, context, operationType, mysort, mytime } =
        this;
      console.log(mytime);
      let arr = await this.getLogsList({
        content: context,
        current: currentPage,
@@ -297,12 +294,10 @@
        startTime: mytime[0] !== "" ? parseTime(mytime[0]) : "",
        sort: mysort,
      });
      console.log(arr);
      return arr.data.data;
    },
    // 批量下拉框操作
    async selectChange(list) {
      console.log(this.tempList);
      if (this.tempList.length !== 0) {
        this.preMyIdx = list;
        if (list === 3) {
@@ -345,11 +340,9 @@
                message: res.message,
              });
            }
            console.log(res);
          });
        })
        .catch((err) => {
          console.log(err);
        });
    },
    // 表格监听
@@ -413,7 +406,6 @@
          done();
        })
        .catch((err) => {
          console.log(err);
        });
    },
    // 自定义关闭弹窗
@@ -424,7 +416,6 @@
    },
    //
    timechange(data) {
      console.log(data);
    },
  },
};