文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 46346c8e by Wang Yuhang

搜索功能

parent 14237711
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<div class="filter-container"> <div class="filter-container">
<div class="filter-item"> <div class="filter-item">
任务名称: 任务名称:
<el-input class="filter-input" prefix-icon="el-icon-search" v-model="keywords" placeholder="请输入查询条件"></el-input> <el-input class="filter-input" prefix-icon="el-icon-search" v-model="keyword" placeholder="请输入查询条件"></el-input>
</div> </div>
<div class="filter-item"> <div class="filter-item">
<el-button class="filter-button" type="primary">查询</el-button> <el-button class="filter-button" type="primary" @click="search()">查询</el-button>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
</div> </div>
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
return { return {
activeName: '任务大厅', activeName: '任务大厅',
tasks: [], tasks: [],
keywords: '', keyword: '',
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
pageNum: 0 pageNum: 0
...@@ -81,6 +81,20 @@ export default { ...@@ -81,6 +81,20 @@ export default {
name: 'task', name: 'task',
params: { task: encodeURIComponent(JSON.stringify(task)) } params: { task: encodeURIComponent(JSON.stringify(task)) }
}) })
},
search () {
var self = this
this.axios.get('/task/getTasks', {
params: {
pageSize: self.pageSize,
currentPage: self.currentPage,
keyword: self.keyword
}
}).then(res => {
console.log(res)
self.tasks = res.data.tasks
self.pageNum = res.data.pageNum
})
} }
} }
} }
......
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