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

new

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