提交 412a515c authored 作者: CRS's avatar CRS

合并分支 'crs' 到 'master'

new 查看合并请求 !106
...@@ -5,8 +5,18 @@ ...@@ -5,8 +5,18 @@
<div class="content"> <div class="content">
<p class="search"> <p class="search">
<span class="searchVal"> <span class="searchVal">
<span>查询:</span> <span>关键字:</span>
<el-input v-model="input2" size="medium" @change="search" placeholder="请输入关键技术"></el-input> <el-input v-model="input2" size="medium" @change="search" placeholder="请输入关键字"></el-input>
</span>
<span class="searchVal">
<span>关键技术:</span>
<el-select v-model="searchVal" @change="search" placeholder="请选择关键技术" clearable>
<el-option
v-for="item in allList"
:label="item.technologyName"
:value="item.technologyName">
</el-option>
</el-select>
</span> </span>
<span class="button searchBtn" @click="search">搜索</span> <span class="button searchBtn" @click="search">搜索</span>
<span class="button add" @click="addRole"><img src="../../assets/img/add.png"></span> <span class="button add" @click="addRole"><img src="../../assets/img/add.png"></span>
...@@ -74,7 +84,9 @@ export default { ...@@ -74,7 +84,9 @@ export default {
name: 'roleDispose', name: 'roleDispose',
data () { data () {
return { return {
input2: '', input2: '', // 关键字
searchVal: '', // 关键技术
allList: [], // 所有关键技术
tableData: [], tableData: [],
tablePageSize: 0, tablePageSize: 0,
pageSize: 9, // 每页个数 pageSize: 9, // 每页个数
...@@ -86,14 +98,33 @@ export default { ...@@ -86,14 +98,33 @@ export default {
} }
}, },
mounted() { mounted() {
this.$server.getAllList().then(res => { // 获取所有关键技术
console.log(res)
this.allList = res.data
}).catch(err => {
this.$message.error('数据请求失败!');
})
this.search(); this.search();
}, },
methods: { methods: {
// 搜索 // 搜索
search () { search () {
console.log(1222) let obj;
let obj = { if (this.input2 !== '' && this.searchVal !== '') {
technologyName:this.input2 obj = {
'technologyName': this.searchVal,
'target': this.input2
}
} else if (this.input2 !== '' && this.searchVal === '') {
obj = {
'target': this.input2
}
} else if (this.input2 === '' && this.searchVal !== '') {
obj = {
'technologyName': this.searchVal
}
} else {
obj = {}
} }
this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => { this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => {
this.tableData = res.data.objects; this.tableData = res.data.objects;
...@@ -186,16 +217,21 @@ export default { ...@@ -186,16 +217,21 @@ export default {
display: flex; display: flex;
} }
.roleDispose .content .searchVal{ .roleDispose .content .searchVal{
width: 280px; width: 320px;
display: flex; display: flex;
font-size: 18px; font-size: 18px;
color: #4663a6; color: #4663a6;
} }
.roleDispose .content .searchVal>span{ .roleDispose .content .searchVal>span{
width: 75px; width: 95px;
display: inline-block; display: inline-block;
line-height: 34px; line-height: 34px;
} }
.roleDispose .content .searchVal:nth-child(2)>span{
width: 150px;
margin-left: 20px;
text-align: right;
}
.roleDispose .content .button{ .roleDispose .content .button{
display: inline-block; display: inline-block;
width: 100px; width: 100px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论