日志管理修改
This commit is contained in:
@@ -14,16 +14,15 @@
|
|||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
|
<a-col :xl="8" :lg="8" :md="8" :sm="24">
|
||||||
<a-col :md="6" :sm="8">
|
|
||||||
<a-form-item label="搜索日志">
|
<a-form-item label="搜索日志">
|
||||||
<a-input placeholder="请输入搜索关键词" v-model="queryParam.keyWord"></a-input>
|
<a-input placeholder="请输入搜索关键词" v-model="queryParam.keyWord"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :xl="8" :lg="8" :md="8" :sm="24">
|
||||||
<a-col :md="10" :sm="10">
|
|
||||||
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
|
style="width: 100%"
|
||||||
v-model="queryParam.createTimeRange"
|
v-model="queryParam.createTimeRange"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
:placeholder="['开始时间', '结束时间']"
|
:placeholder="['开始时间', '结束时间']"
|
||||||
@@ -32,16 +31,15 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="5" :sm="8" v-if="tabKey === '2'">
|
<a-col :xl="8" :lg="8" :md="8" :sm="24" v-if="tabKey === '2' ">
|
||||||
<a-form-item label="操作类型" style="left: 10px">
|
<a-form-item label="操作类型" style="left: 10px">
|
||||||
<j-dict-select-tag v-model="queryParam.operateType" placeholder="请选择操作类型" dictCode="operate_type"/>
|
<j-dict-select-tag v-model="queryParam.operateType" placeholder="请选择操作类型" dictCode="operate_type"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||||
<a-button type="primary" style="left: 10px" @click="searchQuery" icon="search" v-has="'sys:log:search'">查询</a-button>
|
<a-button type="primary" style="left: 10px" @click="searchQuery" icon="search" v-has="'sys:log:search'">查询</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload"
|
<a-button class="reset-button" @click="searchReset" icon="reload"
|
||||||
style="margin-left: 8px;left: 10px">重置</a-button>
|
style="margin-left: 8px;left: 10px">重置</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
@@ -56,7 +54,7 @@
|
|||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="newColumns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -67,7 +65,7 @@
|
|||||||
<!-- <div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>-->
|
<!-- <div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- 字符串超长截取省略号显示-->
|
<!-- 字符串超长截取省略号显示-->
|
||||||
<span slot="logContent" slot-scope="text, record">
|
<span slot="logContent" slot-scope="text">
|
||||||
<j-ellipsis :value="text" :length="40"/>
|
<j-ellipsis :value="text" :length="40"/>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -171,9 +169,13 @@ export default {
|
|||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
list: '/sys/log/page'
|
list: '/sys/log/page'
|
||||||
}
|
},
|
||||||
|
newColumns:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.newColumns = [...this.columns]
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQueryParams() {
|
getQueryParams() {
|
||||||
var param = Object.assign({}, this.lastQueryParam, this.isorter, { logType: this.tabKey })
|
var param = Object.assign({}, this.lastQueryParam, this.isorter, { logType: this.tabKey })
|
||||||
@@ -199,16 +201,17 @@ export default {
|
|||||||
},
|
},
|
||||||
// 日志类型
|
// 日志类型
|
||||||
callback(key) {
|
callback(key) {
|
||||||
|
this.newColumns = [...this.columns]
|
||||||
|
this.tabKey = key
|
||||||
// 动态添加操作类型列
|
// 动态添加操作类型列
|
||||||
if (key == 2) {
|
if (key == 2) {
|
||||||
this.tabKey = '2'
|
this.tabKey = '2'
|
||||||
this.columns.splice(7, 0, this.operateColumn)
|
this.newColumns.splice(7, 0, this.operateColumn)
|
||||||
} else if (this.columns.length == 9) {
|
} else if (this.columns.length == 9) {
|
||||||
this.tabKey = '1'
|
this.tabKey = '1'
|
||||||
this.columns.splice(7, 1)
|
this.newColumns.splice(7, 1)
|
||||||
}
|
}
|
||||||
|
console.log(this.tabKey,'this.tabKey')
|
||||||
let that = this
|
let that = this
|
||||||
that.queryParam = {}
|
that.queryParam = {}
|
||||||
that.queryParam.logType = key
|
that.queryParam.logType = key
|
||||||
@@ -226,6 +229,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user