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