From feaf0a9778879ef211c5587a513ba4cbdabb52d0 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期四, 23 六月 2022 17:42:58 +0800 Subject: [PATCH] bug修复 --- src/pages/syslog/views/operationLog.vue | 28 ++++++++++++---------------- 1 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/pages/syslog/views/operationLog.vue b/src/pages/syslog/views/operationLog.vue index 33c1523..639d73e 100644 --- a/src/pages/syslog/views/operationLog.vue +++ b/src/pages/syslog/views/operationLog.vue @@ -28,7 +28,7 @@ <span 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 class="icon iconfont icon_search" @click="getOperationLog(1)" slot="append">  </span> @@ -44,10 +44,9 @@ <div class="bar"> <div class="name">鎿嶄綔妯″潡锛�</div> - <el-select v-model="curModule" placeholder="璇烽�夋嫨" size="small" @change="moduleChange"> + <el-select v-model="curModule" placeholder="璇烽�夋嫨" size="small" @change="moduleChange" value-key="proc_name"> <el-option label="鍏ㄩ儴" :value="''"> </el-option> - <el-option v-for="(item, i) in moduleOptions" :key="i" :label="item.proc_name" :value="item.proc_name"> - </el-option> + <el-option v-for="(item, i) in moduleOptions" :key="i" :label="item.name_zh" :value="item"> </el-option> </el-select> </div> <div class="bar"> @@ -123,7 +122,7 @@ name: "operationLog", data() { return { - png: "", + png: require("../../../../public/images/syslog/娌℃暟鎹�.png"), loading: false, loadingText: "", input3: "", @@ -176,7 +175,7 @@ this.getOperationLog(1) this.gongneng = "" getOperations({ - module: this.curModule + module: val.proc_name }).then((res) => { this.gongnengOptions = res.data }) @@ -200,7 +199,7 @@ choseRange(item, i) { switch (item) { case "浠婃棩": - this.getTimeRange() + this.getTimeRange(24 * 60 * 60 * 1000) break case "杩戜笁澶�": this.getTimeRange(24 * 60 * 60 * 1000 * 3) @@ -229,28 +228,25 @@ timeEnd: this.timeEnd, page: this.page, pageSize: this.pageSize, - module: this.curModule, + module: this.curModule.name_zh, function: this.gongneng, result: this.result, fuzzySearch: this.fuzzySearch }).then((res) => { this.tableData = res.data.logs this.total = res.data.total - this.png = require("../../../../public/images/syslog/娌℃暟鎹�.png") }) }, getTimeStr(date) { var month = pad0(date.getMonth() + 1) //鏈� var day = pad0(date.getDate()) //鏃� - var hour = pad0(date.getHours()) //鏃� - var minute = pad0(date.getMinutes()) //鍒� - var second = pad0(date.getSeconds()) //绉� - return `${date.getFullYear()}-${month}-${day} ${hour}:${minute}:${second}` + return `${date.getFullYear()}-${month}-${day}` }, getTimeRange(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) + var date = new Date() + var preDay = new Date(new Date().getTime() - gap + 24 * 60 * 60 * 1000) + this.timeStart = this.getTimeStr(preDay) + " 00:00:00" + this.timeEnd = this.getTimeStr(date) + " 23:59:59" }, clearSearch() { this.fuzzySearch = "" -- Gitblit v1.8.0