代码改造完成,加入多字典查询方式
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<eHeader :query="query"/>
|
||||
<Search :query="query"/>
|
||||
<!--表格渲染-->
|
||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||
<el-table-column prop="username" label="用户名"/>
|
||||
@@ -35,9 +35,9 @@
|
||||
<script>
|
||||
import initData from '@/mixins/initData'
|
||||
import { parseTime } from '@/utils/index'
|
||||
import eHeader from './module/header'
|
||||
import Search from './search'
|
||||
export default {
|
||||
components: { eHeader },
|
||||
components: { Search },
|
||||
mixins: [initData],
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
@@ -50,9 +50,10 @@ export default {
|
||||
this.url = 'api/logs'
|
||||
const sort = 'id,desc'
|
||||
const query = this.query
|
||||
const username = query.username
|
||||
const type = query.type
|
||||
const value = query.value
|
||||
this.params = { page: this.page, size: this.size, sort: sort }
|
||||
if (username && username) { this.params['username'] = username }
|
||||
if (type && value) { this.params[type] = value }
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user