| | |
| | | <el-button
|
| | | slot="append"
|
| | | icon="el-icon-search"
|
| | | @click="getOperationLog"
|
| | | @click="getOperationLog(1)"
|
| | | ></el-button>
|
| | | </el-input>
|
| | | </div>
|
| | |
| | | placeholder="请选择"
|
| | | size="small"
|
| | | :disabled="curModule == ''"
|
| | | @change="getOperationLog"
|
| | | @change="getOperationLog(1)"
|
| | | >
|
| | | <!-- :disabled="gongnengOptions.length==0" -->
|
| | | <el-option
|
| | |
| | | v-model="result"
|
| | | placeholder="请选择"
|
| | | size="small"
|
| | | @change="getOperationLog"
|
| | | @change="getOperationLog(1)"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in resultOptions"
|
| | |
| | | highlight-current-row
|
| | | :data="tableData"
|
| | | :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'"
|
| | | prop="procName"
|
| | | prop="function"
|
| | | label="操作功能"
|
| | | ></el-table-column>
|
| | | <el-table-column
|
| | |
| | | };
|
| | | },
|
| | | mounted() {
|
| | | this.getTimeRange(24 * 60 * 60 * 1000);
|
| | | this.getTimeRange();
|
| | | this.getOperationLog();
|
| | | this.getOptions();
|
| | | },
|
| | |
| | | this.getOperationLog();
|
| | | },
|
| | | moduleChange(val) {
|
| | | this.getOperationLog();
|
| | | this.getOperationLog(1);
|
| | | this.gongneng = "";
|
| | | getOperations({
|
| | | module: this.curModule,
|
| | |
| | | choseRange(item, i) {
|
| | | switch (item) {
|
| | | case "今日":
|
| | | this.getTimeRange(24 * 60 * 60 * 1000);
|
| | | this.getTimeRange();
|
| | | break;
|
| | | case "近三天":
|
| | | this.getTimeRange(24 * 60 * 60 * 1000 * 3);
|
| | |
| | | default:
|
| | | break;
|
| | | }
|
| | | this.getOperationLog();
|
| | | this.getOperationLog(1);
|
| | | this.activeDateChoise = i;
|
| | | },
|
| | | getOperationLog(timeStart, timeEnd) {
|
| | | const data = {
|
| | | getOperationLog(typ) {
|
| | | if (typ == 1) {
|
| | | this.page = 1;
|
| | | }
|
| | | queryOperationLog({
|
| | | timeStart: this.timeStart,
|
| | | timeEnd: this.timeEnd,
|
| | | page: this.page,
|
| | |
| | | function: this.gongneng,
|
| | | result: this.result,
|
| | | fuzzySearch: this.fuzzySearch,
|
| | | };
|
| | | queryOperationLog(data).then((res) => {
|
| | | }).then((res) => {
|
| | | this.tableData = res.data.logs;
|
| | | this.total = res.data.total;
|
| | | });
|
| | |
| | | return `${date.getFullYear()}-${month}-${day} ${hour}:${minute}:${second}`;
|
| | | },
|
| | | getTimeRange(gap) {
|
| | | var date = new Date(); //当前时间
|
| | | var preDay = new Date(new Date().getTime() - gap);
|
| | | var preDay;
|
| | | preDay = gap
|
| | | ? new Date(new Date().getTime() - gap)
|
| | | : new Date(new Date().setHours(0, 0, 0, 0));
|
| | | this.timeStart = this.getTimeStr(preDay);
|
| | | this.timeEnd = this.getTimeStr(date);
|
| | | },
|
| | | },
|
| | | };
|
| | |
| | | display: flex;
|
| | | align-items: baseline;
|
| | | width: fit-content;
|
| | | margin-right: 20px; min-width: 120px;
|
| | | margin-right: 20px;
|
| | | min-width: 120px;
|
| | | .name {
|
| | | margin-right: 5px;
|
| | | min-width: fit-content;
|
| | |
| | | }
|
| | | }
|
| | | .el-pagination {
|
| | | padding: 20px 5px; height: 100%;
|
| | | box-sizing: border-box; background-color: white;
|
| | |
|
| | | padding: 20px 5px;
|
| | | height: 100%;
|
| | | box-sizing: border-box;
|
| | | background-color: white;
|
| | | }
|
| | | }
|
| | | </style>
|