|
@@ -29,7 +29,8 @@ export default {
|
|
|
searchData: {
|
|
|
name: '',
|
|
|
dep_id: '',
|
|
|
- time: []
|
|
|
+ time: [],
|
|
|
+ keyword: ''
|
|
|
},
|
|
|
tableData: [],
|
|
|
paginationData: {
|
|
@@ -44,13 +45,14 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
- const { name, dep_id, time } = this.searchData
|
|
|
+ const { name, dep_id, time, keyword } = this.searchData
|
|
|
const { page, limit } = this.paginationData
|
|
|
const params = {
|
|
|
name,
|
|
|
dep_id,
|
|
|
page,
|
|
|
- limit
|
|
|
+ limit,
|
|
|
+ keyword
|
|
|
}
|
|
|
if (time && time.length) {
|
|
|
params.start_time = time[0]
|
|
@@ -59,10 +61,8 @@ export default {
|
|
|
this.loading = true
|
|
|
userSearchLog(params).then(res => {
|
|
|
const { p } = res
|
|
|
- if (p.list.length) {
|
|
|
- this.paginationData.total = p.count
|
|
|
- this.tableData = p.list
|
|
|
- }
|
|
|
+ this.paginationData.total = p.count
|
|
|
+ this.tableData = p.list
|
|
|
}).catch(error => {
|
|
|
console.log(error)
|
|
|
}).finally(() => {
|
|
@@ -79,10 +79,11 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
handleDownLoad() {
|
|
|
- const { name, dep_id, time } = this.searchData
|
|
|
+ const { name, dep_id, time, keyword } = this.searchData
|
|
|
const params = {
|
|
|
name,
|
|
|
- dep_id
|
|
|
+ dep_id,
|
|
|
+ keyword
|
|
|
}
|
|
|
if (time && time.length) {
|
|
|
params.start_time = time[0]
|
|
@@ -91,7 +92,7 @@ export default {
|
|
|
userSearchLogExport(params).then(res => {
|
|
|
const content = res.data // 后台返回二进制数据
|
|
|
const blob = new Blob([content])
|
|
|
- const fileName = `${name}.csv`
|
|
|
+ const fileName = `科研探索日志.csv`
|
|
|
if ('download' in document.createElement('a')) { // 非IE下载
|
|
|
const elink = document.createElement('a')
|
|
|
elink.download = fileName
|