File was renamed from src/pages/logCenter/views/operationLog.vue |
| | |
| | | size="small"
|
| | | class="input-with-select"
|
| | | >
|
| | | <el-button slot="append" icon="el-icon-search" @click="getOperationLog"></el-button>
|
| | | <el-button
|
| | | slot="append"
|
| | | icon="el-icon-search"
|
| | | @click="getOperationLog"
|
| | | ></el-button>
|
| | | </el-input>
|
| | | </div>
|
| | | </div>
|
| | |
| | | size="small"
|
| | | @change="moduleChange"
|
| | | >
|
| | | <el-option
|
| | | label="全部"
|
| | | :value="''"
|
| | | >
|
| | | </el-option>
|
| | | <el-option label="全部" :value="''"> </el-option>
|
| | | <el-option
|
| | | v-for="item in moduleOptions"
|
| | | :key="item.proc_name"
|
| | |
| | | v-model="gongneng"
|
| | | placeholder="请选择"
|
| | | size="small"
|
| | | :disabled="curModule == ''"
|
| | | @change="getOperationLog"
|
| | | >
|
| | | <!-- :disabled="gongnengOptions.length==0" -->
|
| | |
| | | </div>
|
| | | <div class="bar">
|
| | | <div class="name">操作结果:</div>
|
| | |
|
| | | <el-select
|
| | | v-model="result"
|
| | | placeholder="请选择"
|
| | |
| | | ref="multipleTable"
|
| | | highlight-current-row
|
| | | :data="tableData"
|
| | | style="width: 100%"
|
| | | :header-cell-style="{ background: '#f8f8f8', color: '#222222' }"
|
| | | @selection-change="handleSelectionChange"
|
| | | style="width: 100%"
|
| | | >
|
| | | <el-table-column :align="'center'" label="序号" type="index" width="50">
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | | :align="'center'"
|
| | | sortable
|
| | | min-width="98px"
|
| | | min-width="150px"
|
| | | prop="add_time"
|
| | | label="操作时间"
|
| | | ></el-table-column>
|
| | |
| | | ></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>
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { deleteDate } from "@/api/system";
|
| | | import { pad0 } from "@/api/utils";
|
| | | import { queryOperationLog, getOperations, getModules } from "@/api/log";
|
| | |
|
| | | function pad0(i) {
|
| | | if (i >= 0 && i <= 9) {
|
| | | return "0" + i;
|
| | | } else {
|
| | | return i;
|
| | | }
|
| | | }
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | |
| | | timeStart: "",
|
| | | timeEnd: "",
|
| | | fuzzySearch: "",
|
| | | total:0,
|
| | | total: 0,
|
| | | };
|
| | | },
|
| | | mounted() {
|
| | |
| | | this.getOptions();
|
| | | },
|
| | | methods: {
|
| | | gongnengChange(val) {},
|
| | | handleSizeChange(val) {
|
| | | this.pageSize = val;
|
| | | this.getOperationLog();
|
| | | },
|
| | | handleCurrentChange(val) {
|
| | | this.page = val;
|
| | | this.getOperationLog();
|
| | | },
|
| | | moduleChange(val) {
|
| | | this.getOperationLog()
|
| | | this.gongneng=""
|
| | | this.getOperationLog();
|
| | | this.gongneng = "";
|
| | | getOperations({
|
| | | module: this.curModule,
|
| | | }).then((res) => {
|
| | |
| | | this.activeDateChoise = i;
|
| | | },
|
| | | getOperationLog(timeStart, timeEnd) {
|
| | | const data= {
|
| | | const data = {
|
| | | timeStart: this.timeStart,
|
| | | timeEnd: this.timeEnd,
|
| | | page: this.page,
|
| | |
| | | function: this.gongneng,
|
| | | result: this.result,
|
| | | fuzzySearch: this.fuzzySearch,
|
| | | }
|
| | | };
|
| | | queryOperationLog(data).then((res) => {
|
| | | this.tableData = res.data.logs;
|
| | | this.total = res.data.total
|
| | | this.total = res.data.total;
|
| | | });
|
| | | },
|
| | | getTimeStr(date) {
|
| | |
| | | getTimeRange(gap) {
|
| | | var date = new Date(); //当前时间
|
| | | var preDay = new Date(new Date().getTime() - gap);
|
| | | this.timeStart = this.getTimeStr(preDay)
|
| | | this.timeEnd = this.getTimeStr(date)
|
| | | this.timeStart = this.getTimeStr(preDay);
|
| | | this.timeEnd = this.getTimeStr(date);
|
| | | },
|
| | | },
|
| | | };
|
| | |
| | | .op-log {
|
| | | margin: 0 auto;
|
| | | padding: 10px 8px 10px 5px;
|
| | |
|
| | | background-color: rgba(248, 248, 248, 1);
|
| | | width: 100%;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | overflow: auto;
|
| | | .top {
|
| | | height: 100px;
|
| | | background: #fff;
|
| | |
| | | display: flex;
|
| | | justify-content: space-between;
|
| | | align-items: center;
|
| | | // padding-left: 20px;
|
| | | .title {
|
| | | margin-right: 20px;
|
| | | margin-right: 10px;
|
| | | min-width: fit-content;
|
| | | font-size: 14px;
|
| | | }
|
| | | .opts {
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | | .opt {
|
| | | width: fit-content;
|
| | | min-width: fit-content;
|
| | | width: 50px;
|
| | | height: 32px;
|
| | | padding: 0 15px;
|
| | | // background: aquamarine;
|
| | | border-radius: 4px;
|
| | | cursor: pointer;
|
| | | margin-right: 20px;
|
| | | margin-right: 10px;
|
| | | line-height: 32px;
|
| | | font-size: 14px;
|
| | | }
|
| | |
| | | .second {
|
| | | display: flex;
|
| | | margin: 10px 0;
|
| | | padding: 0 20px;
|
| | | .bar {
|
| | | display: flex;
|
| | | align-items: baseline;
|
| | | width: fit-content;
|
| | | padding-left: 20px;
|
| | | margin-right: 20px; min-width: 120px;
|
| | | .name {
|
| | | margin-right: 5px;
|
| | | min-width: fit-content;
|
| | | font-size: 14px;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | .el-pagination {
|
| | | padding: 20px 5px; height: 100%;
|
| | | box-sizing: border-box; background-color: white;
|
| | |
|
| | | }
|
| | | }
|
| | | </style>
|