admin/src/views/business/deviceRole.vue
@@ -28,7 +28,7 @@ <el-table-column prop="isDefault" label="是否默认" min-width="100px"> <template slot-scope="{row}"> <el-switch @change="changeIsDefault" @change="changeIsDefault($event, row.id)" v-model="row.isDefault" active-color="#13ce66" inactive-color="#ff4949" @@ -91,8 +91,8 @@ this.search() }, methods: { changeIsDefault (r) { updateStatusById({ isDefault: r, type: 2 }) changeIsDefault (r, id) { updateStatusById({ isDefault: r, type: 2, id }) .finally(() => { this.search() })