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

Commit d6bf7023 by Wang Yuhang

条件检索

parent 4cd76a14
var baseURL = 'http://47.92.1.107/api' var baseURL = 'http://localhost:9100/api'
export { export {
baseURL baseURL
......
...@@ -3,8 +3,22 @@ ...@@ -3,8 +3,22 @@
<div class="taskhall-left"> <div class="taskhall-left">
<div class="filter-container"> <div class="filter-container">
<div class="filter-item"> <div class="filter-item">
任务名称: <span class="filter-lable">任务名称:</span>
<el-input class="filter-input" prefix-icon="el-icon-search" v-model="keyword" placeholder="请输入查询条件"></el-input> <el-input class="filter-input" prefix-icon="el-icon-search" v-model="keyword" placeholder="请输入任务名称"></el-input><br/>
</div>
<div class="filter-item">
<span class="filter-lable">发布者:</span>
<el-input class="filter-input" prefix-icon="el-icon-search" v-model="creatorName" placeholder="请输入发布者名称"></el-input>
</div>
<div class="filter-item">
<span class="filter-lable">类型:</span>
<el-checkbox-group v-model="taskType">
<el-checkbox label="文本"></el-checkbox>
<el-checkbox label="图片"></el-checkbox>
<el-checkbox label="图层"></el-checkbox>
</el-checkbox-group>
</div>
<div class="filter-item">
<el-button class="filter-button" type="primary" @click="search()">查询</el-button> <el-button class="filter-button" type="primary" @click="search()">查询</el-button>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -47,6 +61,8 @@ export default { ...@@ -47,6 +61,8 @@ export default {
activeName: '任务大厅', activeName: '任务大厅',
tasks: [], tasks: [],
keyword: '', keyword: '',
creatorName: '',
taskType: [],
condition: {} condition: {}
} }
}, },
...@@ -58,11 +74,11 @@ export default { ...@@ -58,11 +74,11 @@ export default {
}) })
}, },
search () { search () {
if (this.keyword) { var condition = {}
this.condition = {keyword: this.keyword} if (this.keyword) { condition.keyword = this.keyword }
} else { if (this.creatorName) { condition.creatorName = this.creatorName }
this.condition = {} if (this.taskType) { condition.taskType = this.taskType }
} this.condition = condition
} }
} }
} }
...@@ -79,14 +95,18 @@ export default { ...@@ -79,14 +95,18 @@ export default {
width: 70%; width: 70%;
.filter-container{ .filter-container{
.filter-item{ .filter-item{
display: flex; text-align: left;
align-items: center;
margin-bottom: 15px; margin-bottom: 15px;
.filter-lable{
width: 6em;
display: inline-block;
}
.filter-input{ .filter-input{
margin-left: 20px;
margin-right: 20px;;
width: 300px; width: 300px;
} }
.el-checkbox-group{
display: inline;
}
} }
} }
} }
......
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