Commit b0243315 authored by 张伯涛's avatar 张伯涛

日志模块重置问题

parent 594fd89b
......@@ -23,7 +23,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="操作月份">
<el-form-item label="操作月份" prop="operTime">
<el-date-picker
v-model="queryParams.operTime"
type="month"
......@@ -90,7 +90,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
class = "errorCat"
class="errorCat"
size="mini"
type="text"
@click="handleView(scope.row,scope.index)"
......@@ -258,18 +258,16 @@ export default {
}
],
// 日期范围
dateRange: '',
dateRange: [],
// 表单参数
form: {},
// 查询参数
queryParams: {
page: 1,
rows: 10,
status: 1,
operTime: '',
title: '',
operName: ''
// businessType: undefined
}
}
},
......@@ -283,7 +281,6 @@ export default {
this.queryParams = JSON.parse(getDataCache(this.$route.path))
// this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM')
this.getList()
},
methods: {
// 清空和导出弹出框的日期选择器禁用当前月份之后的月份
......@@ -300,22 +297,22 @@ export default {
getList() {
this.loading = true
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.rows.map(item => {
const title = item.title
if (title) {
const temp = title.split('-')
const systemMode = temp.filter((item, index) => { return index < temp.length - 1 }).join('-')
item.systemMode = systemMode
item.optionName = temp[temp.length - 1]
} else {
item.systemMode = ''
item.optionName = ''
}
return item
})
this.total = response.total
this.loading = false
}
this.list = response.rows.map(item => {
const title = item.title
if (title) {
const temp = title.split('-')
const systemMode = temp.filter((item, index) => { return index < temp.length - 1 }).join('-')
item.systemMode = systemMode
item.optionName = temp[temp.length - 1]
} else {
item.systemMode = ''
item.optionName = ''
}
return item
})
this.total = response.total
this.loading = false
}
)
},
handleClose() {
......@@ -380,11 +377,14 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.queryParams.title = ''
this.queryParams.operName = ''
this.queryParams.operTime = ''
this.resetForm('queryParams')
this.dateRange = []
this.queryParams = {
page: 1,
rows: 10,
operTime: '',
title: '',
operName: ''
}
this.handleQuery()
},
// 多选框选中数据
......
......@@ -12,7 +12,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="登录时间">
<el-form-item label="登录时间" prop="loginTime">
<el-date-picker
v-model="queryParams.loginTime"
type="month"
......@@ -142,7 +142,7 @@
<script>
import { list, delLogininfo, cleanLogininfo, exportLogininfo } from '@/api/monitor/loginInfo'
import dictCons from '@/utils/dictCons'
// import dictCons from '@/utils/dictCons'
// import Template from '@/views/instance/Template'
import Coolbutton from '@/components/coolbutton'
import { getDataCache, setDataCache } from '@/assets/js/filterData'
......@@ -209,9 +209,7 @@ export default {
queryParams: {
page: 1,
rows: 10,
ipaddr: undefined,
username: '',
status: '',
loginTime: ''
}
}
......@@ -267,12 +265,13 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.queryParams.ipaddr = ''
this.queryParams.username = ''
this.queryParams.status = ''
this.queryParams.loginTime = ''
this.resetForm('queryParams')
this.dateRange = []
this.queryParams = {
page: 1,
rows: 10,
username: '',
loginTime: ''
}
this.handleQuery()
},
// 多选框选中数据
......
......@@ -23,39 +23,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="类型" prop="businessType">-->
<!-- <el-select-->
<!-- v-model="queryParams.businessType"-->
<!-- placeholder="请选择类型"-->
<!-- clearable-->
<!-- size="small"-->
<!-- style="width: 170px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in typeOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictLabel"-->
<!-- :value="dict.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="系统状态" prop="status">-->
<!-- <el-select-->
<!-- v-model="queryParams.status"-->
<!-- placeholder="请选择系统状态"-->
<!-- clearable-->
<!-- size="small"-->
<!-- style="width: 170px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in statusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictLabel"-->
<!-- :value="dict.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="操作月份">
<el-form-item label="操作月份" prop="operTime">
<el-date-picker
v-model="queryParams.operTime"
type="month"
......@@ -325,18 +293,16 @@ export default {
}
],
// 日期范围
dateRange: '',
dateRange: [],
// 表单参数
form: {},
// 查询参数
queryParams: {
page: 1,
rows: 10,
status: 0,
operTime: '',
title: '',
operName: ''
// businessType: undefined
}
}
},
......@@ -456,11 +422,14 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.queryParams.title = ''
this.queryParams.operName = ''
this.queryParams.operTime = ''
this.resetForm('queryParams')
this.dateRange = []
this.queryParams = {
page: 1,
rows: 10,
operTime: '',
title: '',
operName: ''
}
this.handleQuery()
},
// 多选框选中数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment