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

修改百分百

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