|
|
@@ -109,6 +109,7 @@
|
|
|
v-model="scope.row.status"
|
|
|
active-value="0"
|
|
|
inactive-value="1"
|
|
|
+
|
|
|
@change="handleStatusChange(scope.row)"
|
|
|
></el-switch>
|
|
|
</template>
|
|
|
@@ -397,7 +398,7 @@ export default {
|
|
|
handleStatusChange(row) {
|
|
|
let text = row.status === "0" ? "启用" : "停用";
|
|
|
this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
|
|
|
- return changeRoleStatus(row.id, row.status);
|
|
|
+ return changeRoleStatus(row.id,row.status);
|
|
|
}).then(() => {
|
|
|
|
|
|
this.$modal.msgSuccess(text + "成功");
|
|
|
@@ -536,8 +537,9 @@ export default {
|
|
|
/** 分配数据权限操作 */
|
|
|
handleDataScope(row) {
|
|
|
this.reset();
|
|
|
- const deptTreeSelect = this.getDeptTree(row.roleId);
|
|
|
- getRole(row.roleId).then(response => {
|
|
|
+
|
|
|
+ const deptTreeSelect = this.getDeptTree(row.id);
|
|
|
+ getRole(row.id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.openDataScope = true;
|
|
|
this.$nextTick(() => {
|
|
|
@@ -584,11 +586,19 @@ export default {
|
|
|
this.openDataScope = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
+ }else{
|
|
|
+ this.form.deptIds = this.getDeptAllCheckedKeys();
|
|
|
+ dataScope(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.openDataScope = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const roleIds = row.roleId || this.ids;
|
|
|
+ const roleIds = row.id || this.ids;
|
|
|
this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
|
|
|
return delRole(roleIds);
|
|
|
}).then(() => {
|