c680230a by zhaoqian

数据不重复加载

1 parent 4168bcde
......@@ -70,6 +70,8 @@ export default {
data(){
return {
tableData: [],
scData:[],
ycData:[],
scyclx:'0',
}
},
......@@ -80,7 +82,11 @@ export default {
methods:{
scyclxChange(){
this.getData();
if(this.scyclx === '0'){
this.tableData = this.ycData;
}else {
this.tableData = this.scData;
}
},
chFilter(row, column){
......@@ -101,11 +107,18 @@ export default {
getData(){
let zrzbsm = this.$store.state.zrzbsm;
let scyclx = this.scyclx;
getDetailInfo(zrzbsm,scyclx).then((res)=>{
// let scyclx = this.scyclx;
getDetailInfo(zrzbsm,'0').then((res)=>{
if(res.code===200){
console.log(res.result)
this.ycData = res.result;
this.tableData=this.ycData;
}
});
getDetailInfo(zrzbsm,'1').then((res)=>{
if(res.code===200){
console.log(res.result)
this.tableData = res.result;
this.scData = res.result;
}
})
},
......