| | |
| | | <header> |
| | | <div class="header-nav"> |
| | | <span class="nav-left">数据筛选</span> |
| | | <span class="nav-right">高级搜索</span> |
| | | <!-- <span class="nav-right">高级搜索</span> --> |
| | | </div> |
| | | <div class="header-content"> |
| | | <div class="search"> |
| | | <span>输入查询:</span> |
| | | <el-input placeholder="内容信息" v-model="context"></el-input> |
| | | |
| | | <div class="option"> |
| | | <el-input placeholder="内容信息" v-model="context"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="message-status"> |
| | | <span>操作类型:</span> |
| | | <el-select v-model="operationType"> |
| | | <el-option |
| | | v-for="item in operationTypeList" |
| | | :key="item.id" |
| | | :label="item.operationType" |
| | | :value="item.operationType" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <div class="option"> |
| | | <el-select v-model="operationType"> |
| | | <el-option |
| | | v-for="item in operationTypeList" |
| | | :key="item.id" |
| | | :label="item.operationType" |
| | | :value="item.operationType" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="message-kind"> |
| | | <span>时间范围:</span> |
| | | <el-date-picker |
| | | v-model="mytime" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | <div class="option"> |
| | | <el-date-picker |
| | | v-model="mytime" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="find"> |
| | | <el-button |
| | |
| | | <!-- 数据展示 --> |
| | | <el-table |
| | | ref="multipleTable" |
| | | :default-sort="{ prop: 'createTime' }" |
| | | :header-cell-style="{ |
| | | background: '#06122c', |
| | | 'font-size': '12px', |
| | |
| | | prop="createTime" |
| | | label="日志时间" |
| | | min-width="10" |
| | | :sort-orders="['descending','ascending']" |
| | | :sort-orders="['descending', 'ascending']" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | </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"; |
| | |
| | | async handleExport() { |
| | | const { currentPage, pageSize, context, operationType, mysort, mytime } = |
| | | this; |
| | | console.log(mytime); |
| | | let arr = await this.exportLogs({ |
| | | content: context, |
| | | current: currentPage, |
| | |
| | | id: "", |
| | | operationType: operationType === "全部" ? "" : operationType, |
| | | portEquipment: "", |
| | | size: pageSize, |
| | | size: 50000, |
| | | startTime: mytime[0] !== "" ? parseTime(mytime[0]) : "", |
| | | sort: mysort, |
| | | }); |
| | |
| | | const href = window.URL.createObjectURL(blob); |
| | | downloadElement.href = href; |
| | | // // 下载后文件名 |
| | | downloadElement.download = fileName + '日志数据.xlsx'; |
| | | downloadElement.download = fileName + "日志数据.xlsx"; |
| | | document.body.appendChild(downloadElement); |
| | | // 点击下载 |
| | | downloadElement.click(); |
| | |
| | | async getLogList() { |
| | | const { currentPage, pageSize, context, operationType, mysort, mytime } = |
| | | this; |
| | | console.log(mytime); |
| | | let arr = await this.getLogsList({ |
| | | content: context, |
| | | current: currentPage, |
| | |
| | | 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) { |
| | |
| | | message: res.message, |
| | | }); |
| | | } |
| | | console.log(res); |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | .catch((err) => {}); |
| | | }, |
| | | // 表格监听 |
| | | tableChange(list) { |
| | |
| | | .then((_) => { |
| | | done(); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | .catch((err) => {}); |
| | | }, |
| | | // 自定义关闭弹窗 |
| | | closeDialog({ flag, index }) { |
| | |
| | | } |
| | | }, |
| | | // |
| | | timechange(data) { |
| | | console.log(data); |
| | | }, |
| | | timechange(data) {}, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | padding: 0 40px; |
| | | display: flex; |
| | | line-height: 100px; |
| | | justify-content: space-between; |
| | | // justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | span { |
| | | min-width: 120px; |
| | | padding-left: 15px; |
| | | } |
| | | .search, |
| | | .message-status, |
| | | .message-kind { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | flex: 1; |
| | | // flex: 1; |
| | | .el-input { |
| | | flex: 1; |
| | | color: #1d3f57; |
| | |
| | | background-color: #09152f; |
| | | } |
| | | } |
| | | |
| | | .find { |
| | | margin-left: 15px; |
| | | } |
| | | .findBtn { |
| | | line-height: 100px; |
| | | margin-left: 15px; |