| | |
| | | v-model="fuzzySearch"
|
| | | size="small"
|
| | | class="input-with-select"
|
| | | @keyup.enter.native="getOperationLog(1)"
|
| | | >
|
| | | <span
|
| | | class="icon iconfont"
|
| | | class="icon iconfont icon_clear"
|
| | | @click="clearSearch"
|
| | | slot="append"
|
| | | v-if="fuzzySearch"
|
| | | >
|
| | | 
|
| | | </span>
|
| | | <span
|
| | | class="icon iconfont icon_search"
|
| | | @click="getOperationLog(1)"
|
| | | slot="append"
|
| | | v-else
|
| | | >
|
| | | 
|
| | | </span>
|
| | |
|
| | | <!-- <el-button
|
| | | slot="append"
|
| | | icon="el-icon-search"
|
| | |
| | | >
|
| | | <el-option label="全部" :value="''"> </el-option>
|
| | | <el-option
|
| | | v-for="item in moduleOptions"
|
| | | :key="item.proc_name"
|
| | | v-for="(item, i) in moduleOptions"
|
| | | :key="i"
|
| | | :label="item.proc_name"
|
| | | :value="item.proc_name"
|
| | | >
|
| | |
| | | >
|
| | | <!-- :disabled="gongnengOptions.length==0" -->
|
| | | <el-option
|
| | | v-for="item in gongnengOptions"
|
| | | :key="item.name"
|
| | | v-for="(item, i) in gongnengOptions"
|
| | | :key="i"
|
| | | :label="item.name"
|
| | | :value="item.name"
|
| | | >
|
| | |
| | | @change="getOperationLog(1)"
|
| | | >
|
| | | <el-option
|
| | | v-for="item in resultOptions"
|
| | | :key="item.value"
|
| | | v-for="(item, i) in resultOptions"
|
| | | :key="i"
|
| | | :label="item.label"
|
| | | :value="item.value"
|
| | | >
|
| | |
| | | :data="tableData"
|
| | | :header-cell-style="{ background: '#f8f8f8', color: '#222222' }"
|
| | | style="width: 100%"
|
| | | border
|
| | | >
|
| | | <template slot="empty">
|
| | | <img :src="png" class="empty_img" alt="" />
|
| | | </template>
|
| | | <el-table-column :align="'center'" label="序号" type="index" width="50">
|
| | | </el-table-column>
|
| | | <el-table-column
|
| | |
| | | import { queryOperationLog, getOperations, getModules } from "@/api/log";
|
| | |
|
| | | export default {
|
| | | name: "operationLog",
|
| | | data() {
|
| | | return {
|
| | | png: "",
|
| | | loading: false,
|
| | | loadingText: "",
|
| | | input3: "",
|
| | |
| | | },
|
| | | getOptions() {
|
| | | getModules().then((res) => {
|
| | | const indexArr = [];
|
| | | res.data.forEach((item, index) => {
|
| | | if (item.proc_name == "") {
|
| | | indexArr.push(index);
|
| | | }
|
| | | });
|
| | | if (indexArr.length != 0) {
|
| | | indexArr.forEach((i) => {
|
| | | res.data.splice(i);
|
| | | });
|
| | | }
|
| | | this.moduleOptions = res.data;
|
| | | console.log(this.moduleOptions);
|
| | | });
|
| | | },
|
| | | choseRange(item, i) {
|
| | |
| | | }).then((res) => {
|
| | | this.tableData = res.data.logs;
|
| | | this.total = res.data.total;
|
| | | this.png = require("../../../../public/images/syslog/没数据.png");
|
| | | });
|
| | | },
|
| | | getTimeStr(date) {
|
| | |
| | | ? new Date(new Date().getTime() - gap)
|
| | | : new Date(new Date().setHours(0, 0, 0, 0));
|
| | | this.timeStart = this.getTimeStr(preDay);
|
| | | },
|
| | | clearSearch() {
|
| | | this.fuzzySearch = "";
|
| | | this.getOperationLog(1);
|
| | | },
|
| | | },
|
| | | };
|
| | |
| | | display: flex;
|
| | | align-items: center;
|
| | |
|
| | | .icon_clear:hover {
|
| | | color: #4e94ff;
|
| | | }
|
| | |
|
| | | .input-with-select {
|
| | | width: 100%;
|
| | | height: 100%;
|
| | |
| | | border: 2px solid #f2f2f7;
|
| | | border-right: none;
|
| | |
|
| | | // &:focus + .el-input-group__append {
|
| | | // border-color: #409eff;
|
| | | // }
|
| | | &:focus,
|
| | | &:focus + .el-input-group__append {
|
| | | border-color: #409eff;
|
| | | }
|
| | | }
|
| | |
|
| | | .el-input-group__append {
|
| | | // transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
| | | transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
| | | background-color: #fff;
|
| | | border: 2px solid #f2f2f7;
|
| | | border-radius: 0 18px 18px 0;
|
| | |
| | | border-radius: 5px;
|
| | | padding: 12px;
|
| | | background-color: white;
|
| | | .empty_img {
|
| | | margin: 80px auto;
|
| | | width: 164px;
|
| | | }
|
| | | .tableBox {
|
| | | border: none;
|
| | | &::before,
|
| | | &::after {
|
| | | display: none;
|
| | | }
|
| | | tr {
|
| | | td:first-child {
|
| | | border-radius: 4px 0 0 4px;
|
| | | }
|
| | | td:last-child {
|
| | | border-radius: 0 4px 4px 0;
|
| | | }
|
| | | &.current-row td {
|
| | | background-color: #4e94ff !important;
|
| | | color: #fff;
|
| | | }
|
| | | &:hover td {
|
| | | background-color: rgb(242, 242, 247);
|
| | | }
|
| | | }
|
| | | th {
|
| | | padding: 0 !important;
|
| | | height: 40px;
|
| | | line-height: 40px;
|
| | | border-color: #fff !important;
|
| | | border-right: 2px solid #fff;
|
| | | border-radius: 4px;
|
| | | font-size: 12px;
|
| | | background: #f2f2f7;
|
| | | }
|
| | | td {
|
| | | padding: 0 !important;
|
| | | height: 34px;
|
| | | line-height: 34px;
|
| | | border: none;
|
| | | font-size: 12px;
|
| | | }
|
| | | }
|
| | | }
|