文档服务地址: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 {
baseURL
......
......@@ -3,8 +3,22 @@
<div class="taskhall-left">
<div class="filter-container">
<div class="filter-item">
任务名称:
<el-input class="filter-input" prefix-icon="el-icon-search" v-model="keyword" placeholder="请输入查询条件"></el-input>
<span class="filter-lable">任务名称:</span>
<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>
</div>
<el-divider></el-divider>
......@@ -47,6 +61,8 @@ export default {
activeName: '任务大厅',
tasks: [],
keyword: '',
creatorName: '',
taskType: [],
condition: {}
}
},
......@@ -58,11 +74,11 @@ export default {
})
},
search () {
if (this.keyword) {
this.condition = {keyword: this.keyword}
} else {
this.condition = {}
}
var condition = {}
if (this.keyword) { condition.keyword = this.keyword }
if (this.creatorName) { condition.creatorName = this.creatorName }
if (this.taskType) { condition.taskType = this.taskType }
this.condition = condition
}
}
}
......@@ -79,14 +95,18 @@ export default {
width: 70%;
.filter-container{
.filter-item{
display: flex;
align-items: center;
text-align: left;
margin-bottom: 15px;
.filter-lable{
width: 6em;
display: inline-block;
}
.filter-input{
margin-left: 20px;
margin-right: 20px;;
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