|
@ -58,7 +58,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import CrudRole from '@/api/role' |
|
|
import { updateDataScope } from '@/api/role' |
|
|
import { getAll } from '@/api/data_scope_department' |
|
|
import { getAll } from '@/api/data_scope_department' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
@ -149,11 +149,14 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
update() { |
|
|
update() { |
|
|
console.log(this.checkedIds) |
|
|
updateDataScope({ |
|
|
console.log(Array.from(this.checkedIds)) |
|
|
roleId: this.permission.id, |
|
|
this.permission.dataScopeDepartmentIds = Array.from(this.checkedIds) |
|
|
dataScope: this.permission.dataScope, |
|
|
console.log(this.permission) |
|
|
departmentIds: Array.from(this.checkedIds) |
|
|
CrudRole.edit(this.permission).then(() => this.$notify.success('操作成功')) |
|
|
}).then(() => { |
|
|
|
|
|
this.$notify.success('操作成功') |
|
|
|
|
|
this.close() |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleCheckAllChange(val, checked) { |
|
|
handleCheckAllChange(val, checked) { |
|
|
if (checked) { |
|
|
if (checked) { |
|
|