|
|
|
@ -135,7 +135,7 @@ import { |
|
|
|
roledelention, |
|
|
|
permissionconntro, |
|
|
|
} from "@/request/ruquset"; |
|
|
|
import { getapi } from '@/api/api'; |
|
|
|
import { getapi } from "@/api/api"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -183,7 +183,7 @@ export default { |
|
|
|
//确定新增 |
|
|
|
Confirmaddition() { |
|
|
|
if (this.form.name == "") { |
|
|
|
this.$message.success("请输入角色名称"); |
|
|
|
this.$message.warning("请输入角色名称"); |
|
|
|
} else { |
|
|
|
addrole({ name: this.form.name }).then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
@ -292,6 +292,9 @@ export default { |
|
|
|
}, |
|
|
|
//确定编辑修改 |
|
|
|
roleseding() { |
|
|
|
if (this.form.name == "") { |
|
|
|
this.$message.warning("请输入角色名称"); |
|
|
|
} else { |
|
|
|
roleediting(this.rorlsid, { name: this.form.name }).then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
this.$message.success("编辑角色成功"); |
|
|
|
@ -300,15 +303,35 @@ export default { |
|
|
|
this.getbolkeall(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//删除角色 |
|
|
|
deletrole(row) { |
|
|
|
this.$confirm("是否确定删除数据, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
roledelention(row.id).then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
// if (res.code == 1) { |
|
|
|
this.$message.success("删除角色成功"); |
|
|
|
this.getbolkeall(); |
|
|
|
} |
|
|
|
// } |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消删除", |
|
|
|
}); |
|
|
|
}); |
|
|
|
// roledelention(row.id).then((res) => { |
|
|
|
// if (res.code == 1) { |
|
|
|
// this.$message.success("删除角色成功"); |
|
|
|
// this.getbolkeall(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
console.log(row); |
|
|
|
}, |
|
|
|
queryCheckKey(children) { |
|
|
|
@ -370,7 +393,9 @@ export default { |
|
|
|
this.title = "用户权限-" + row.name; |
|
|
|
this.userobj = obj; |
|
|
|
// limitsofauthority |
|
|
|
getapi(`/api/permissionmanagement/get?providerName=R&providerKey=${row.name}`).then((res) => { |
|
|
|
getapi( |
|
|
|
`/api/permissionmanagement/get?providerName=R&providerKey=${row.name}` |
|
|
|
).then((res) => { |
|
|
|
this.defaultKeys = []; |
|
|
|
this.currenItem = []; |
|
|
|
this.allCheckedLength = 0; |
|
|
|
|