代码改造完成,加入多字典查询方式

This commit is contained in:
zhengjie
2019-06-29 12:32:52 +08:00
parent 1b757d6972
commit 9ca7d4b05f
56 changed files with 771 additions and 1467 deletions

View File

@@ -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
}
}