Commit b968f17f authored by 赵啸非's avatar 赵啸非

修改百分百

parent 02f17b6d
......@@ -73,18 +73,18 @@ export default {
},
handleSwitch(row){
this.loading = true
if(row.selected==1){
this.$post("/device/module/distribute/selected", {id:row.id,selected:0})
.then(res => {
row.selected=1+""
// if (res && res.code && res.code == 1) {
// this.getData();
// this.loading = false;
// }else{
// this.$message.error(res.msg);
// }
row.selected=1
console.log(row)
if (res && res.code && res.code == 1) {
this.getData();
this.loading = false;
}else{
this.$message.error(res.msg);
}
})
.catch(error => {
this.$message.error(error.message);
......@@ -92,13 +92,14 @@ export default {
}else{
this.$post("/device/module/distribute/selected", {id:row.id,selected:1})
.then(res => {
row.selected=0+""
// if (res && res.code && res.code == 1) {
// this.getData();
// this.loading = false;
// }else{
// this.$message.error(res.msg);
// }
row.selected=0
console.log(row)
if (res && res.code && res.code == 1) {
this.getData();
this.loading = false;
}else{
this.$message.error(res.msg);
}
})
.catch(error => {
this.$message.error(error.message);
......
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