Browse Source

日志管理搜索条件对接完成

wangtao 1 year ago
parent
commit
4e0f68f56a
2 changed files with 18 additions and 6 deletions
  1. 1 1
      src/views/index/components/alarming.vue
  2. 17 5
      src/views/user/log-manage/index.vue

+ 1 - 1
src/views/index/components/alarming.vue

@@ -44,7 +44,7 @@ export default {
     // 初始化
     this.init();
     this.scroll();
-    setTimeout(()=>{
+  setInterval(()=>{
       this.scroll();
     },1000 * 10)
   },

+ 17 - 5
src/views/user/log-manage/index.vue

@@ -148,6 +148,13 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.operation = undefined;
+      this.current = 1
+      this.size = 15
+      this.operation = undefined
+      this.ip = undefined
+      this.userName = undefined
+      this.startTime = undefined
+      this.endTime = undefined
       this.handleQuery();
     },
     /** 搜索按钮操作 */
@@ -155,15 +162,20 @@ export default {
       this.getList();
     },
     getList() {
-      // if(this.dateRange.length>0){
-      //   this.query.startTime = this.dateRange[0]
-      //   this.query.endTime = this.dateRange[1]
-      // }
        //获取tableData数据
+       if(this.dateRange.length>0){
+        this.startTime = this.dateRange[0]
+        this.endTime = this.dateRange[1].split(" ")[0] + " 23:59:59"
+       }
       logList({
         current: this.current,
         size: this.size,
-        name:this.operation}).then(Response =>{
+        name:this.operation,
+        ip:this.ip,
+        userName:this.userName,
+        startTime:this.startTime,
+        endTime:this.endTime,
+      }).then(Response =>{
         if(Response.status == "SUCCESS"){
           if(Response.data.pageList){
             this.tableData = Response.data.pageList