提交 df850bd1 authored 作者: CRS's avatar CRS

new

......@@ -90,8 +90,8 @@ export default {
}
this.$server.getConfigPageList(this.myPage, this.pageSize, obj).then(res => {
console.log(res);
this.tableData = res.data.objects;
this.tablePageSize = res.data.totalElement;
this.tableData = res.data.rows;
this.tablePageSize = res.data.total;
})
},
// 数据
......@@ -100,8 +100,8 @@ export default {
technologyName:this.technologyId
}
this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => {
this.tableData = res.data.objects;
this.tablePageSize = res.data.totalElement;
this.tableData = res.data.rows;
this.tablePageSize = res.data.total;
});
},
// 点击分页
......@@ -122,7 +122,7 @@ export default {
// 支持国产化
yesEdit(row, index){
let obj = {
suffix: ['java'],
suffix: 'java',
target: row.target,
technologyId: '967a8bd0-eb27-4fb6-ba1d-1bca21cea5b4',
technologyName: '内部依赖(支持)',
......
......@@ -104,6 +104,7 @@ export default {
id: this.detailData.id,
oldRule: this.form
};
obj.suffix = obj.suffix.join(",")
console.log(this.detailData.id)
if (this.modalName === '修改规则') {
this.$server.editConfigUpdate(obj).then(res => {
......
......@@ -5,19 +5,25 @@
<div class="content">
<p class="search">
<span class="searchVal">
<span>关键字:</span>
<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>
<!-- <span>关键技术:</span> -->
<el-select v-model="input3" size="medium" placeholder="请选择关键技术">
<el-option
v-for="item in allList"
v-for="item in keyNameList"
:key="item.id"
:label="item.technologyName"
:value="item.technologyName">
</el-option>
</el-select>
</span>
<span class="searchVal">
<span>查询:</span>
<el-input v-model="input2" size="medium" placeholder="请输入关键字"></el-input>
</span>
<span class="searchVal" style="margin-left:30px;">
<!-- <span>查询:</span> -->
<el-input v-model="input1" size="medium" placeholder="请输入范围"></el-input>
</span>
<span class="button searchBtn" @click="search">搜索</span>
<span class="button add" @click="addRole"><img src="../../assets/img/add.png"></span>
</p>
......@@ -84,9 +90,12 @@ export default {
name: 'roleDispose',
data () {
return {
input2: '', // 关键字
searchVal: '', // 关键技术
allList: [], // 所有关键技术
searchKey:'',
input3:'',
input2: '',
input1: '',
suffix:'',
target:'',
tableData: [],
tablePageSize: 0,
pageSize: 9, // 每页个数
......@@ -94,6 +103,7 @@ export default {
components: '',
myPage: 1,
detailData: {},
keyNameList:[],
modalName: ''
}
},
......@@ -105,27 +115,38 @@ export default {
console.log(err);
})
this.search();
this.keyName()
},
methods: {
// 搜索
search () {
let obj;
if (this.input2 !== '' && this.searchVal !== '') {
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
keyName(){
let val = {
'technologyName': '',
}
} else {
obj = {}
this.$server.getAllPageList(this.myPage,this.pageSize,val).then(res=>{
console.log(res.data)
this.keyNameList = res.data.rows;
}).catch(err => {
this.$message.error('数据请求失败!');
})
},
search () {
let obj = {
technologyName:this.input3,
target:this.input2,
suffix:this.input1,
}
// if(this.searchKey == 'suffix'){
// obj.suffix = this.input2
// }else if (this.searchKey == 'technologyName'){
// obj.technologyName = this.input2
// }else if (this.searchKey == 'target'){
// obj.target = this.input2
// }
this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => {
console.log(res)
this.tableData = res.data.rows;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论