Browse Source

用户管理 民族

master
mch 2 years ago
parent
commit
aee8fb2432
  1. 12
      src/views/basic-dictionary/Nation.vue
  2. 10
      src/views/user-list/OrganizationUnits.vue
  3. 59
      src/views/user-list/Role.vue
  4. 17
      src/views/user-list/UserList.vue

12
src/views/basic-dictionary/Nation.vue

@ -157,14 +157,14 @@
</el-card> </el-card>
</div> </div>
<!-- 按钮区域 --> <!-- 按钮区域 -->
<div style="margin-left: 10px; margin-top: 10%">
<el-button type="primary" @click="addll">新增</el-button>
<div style="margin-top: 10px">
<div style="margin-left: 10px; margin-top: 7%">
<!-- <el-button type="primary" @click="addll">新增</el-button> -->
<!-- <div style="margin-top: 10px">
<el-button type="primary" @click="edit">编辑</el-button> <el-button type="primary" @click="edit">编辑</el-button>
</div>
<div style="margin-top: 10px">
</div> -->
<!-- <div style="margin-top: 10px">
<el-button type="danger" @click="delets">删除</el-button> <el-button type="danger" @click="delets">删除</el-button>
</div>
</div> -->
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-button type="primary" @click="topping">置顶</el-button> <el-button type="primary" @click="topping">置顶</el-button>
</div> </div>

10
src/views/user-list/OrganizationUnits.vue

@ -130,9 +130,7 @@ export default {
}, },
methods: { methods: {
//close //close
closethiebox(){
},
closethiebox() {},
// //
closethebulletbox() { closethebulletbox() {
this.dialogVisible = false; this.dialogVisible = false;
@ -162,6 +160,7 @@ export default {
this.getonorganization(); this.getonorganization();
}); });
} else if (this.title == 3) { } else if (this.title == 3) {
postapi("/api/app/organization-units/creatre", { postapi("/api/app/organization-units/creatre", {
displayName: this.form.displayName, displayName: this.form.displayName,
isPeis: this.form.isPeis, isPeis: this.form.isPeis,
@ -203,17 +202,18 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
this.title = 1; this.title = 1;
console.log(this.form); console.log(this.form);
this.form.displayName=''
this.form.displayName = "";
}, },
// //
append(node, data) { append(node, data) {
this.title = 3; this.title = 3;
if (this.title == 3) { if (this.title == 3) {
this.dialogVisible = true; this.dialogVisible = true;
this.form.parentId = data.id; this.form.parentId = data.id;
this.form.displayName = ""; this.form.displayName = "";
console.log(this.form.parentId); console.log(this.form.parentId);
console.log(this.form);
} }
// if(this.natureoptions) // if(this.natureoptions)

59
src/views/user-list/Role.vue

@ -135,7 +135,7 @@ import {
roledelention, roledelention,
permissionconntro, permissionconntro,
} from "@/request/ruquset"; } from "@/request/ruquset";
import { getapi } from '@/api/api';
import { getapi } from "@/api/api";
export default { export default {
data() { data() {
return { return {
@ -183,7 +183,7 @@ export default {
// //
Confirmaddition() { Confirmaddition() {
if (this.form.name == "") { if (this.form.name == "") {
this.$message.success("请输入角色名称");
this.$message.warning("请输入角色名称");
} else { } else {
addrole({ name: this.form.name }).then((res) => { addrole({ name: this.form.name }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
@ -292,23 +292,46 @@ export default {
}, },
// //
roleseding() { roleseding() {
roleediting(this.rorlsid, { name: this.form.name }).then((res) => {
if (res.code == 1) {
this.$message.success("编辑角色成功");
// this.form = {};
this.dialogVisible = false;
this.getbolkeall();
}
});
if (this.form.name == "") {
this.$message.warning("请输入角色名称");
} else {
roleediting(this.rorlsid, { name: this.form.name }).then((res) => {
if (res.code == 1) {
this.$message.success("编辑角色成功");
// this.form = {};
this.dialogVisible = false;
this.getbolkeall();
}
});
}
}, },
// //
deletrole(row) { deletrole(row) {
roledelention(row.id).then((res) => {
if (res.code == 1) {
this.$message.success("删除角色成功");
this.getbolkeall();
}
});
this.$confirm("是否确定删除数据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
roledelention(row.id).then((res) => {
// 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); console.log(row);
}, },
queryCheckKey(children) { queryCheckKey(children) {
@ -370,7 +393,9 @@ export default {
this.title = "用户权限-" + row.name; this.title = "用户权限-" + row.name;
this.userobj = obj; this.userobj = obj;
// limitsofauthority // 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.defaultKeys = [];
this.currenItem = []; this.currenItem = [];
this.allCheckedLength = 0; this.allCheckedLength = 0;

17
src/views/user-list/UserList.vue

@ -861,10 +861,19 @@ export default {
// this.getlist(); // this.getlist();
// this.$message.success(""); // this.$message.success("");
// }); // });
postapi(`/api/identity/users/delete?id=${row.id}`).then((res) => {
this.getlist();
this.$message.success("删除成功");
});
this.$confirm("是否确定删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
postapi(`/api/identity/users/delete?id=${row.id}`).then((res) => {
this.getlist();
this.$message.success("删除成功");
});
})
.catch(() => {});
console.log(row); console.log(row);
}, },

Loading…
Cancel
Save