From aee8fb2432a529c12024545afcb0dd466133a7e2 Mon Sep 17 00:00:00 2001 From: mch <1332099529@qq.com> Date: Tue, 1 Aug 2023 14:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E6=B0=91=E6=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic-dictionary/Nation.vue | 12 ++--- src/views/user-list/OrganizationUnits.vue | 10 ++-- src/views/user-list/Role.vue | 59 ++++++++++++++++------- src/views/user-list/UserList.vue | 17 +++++-- 4 files changed, 66 insertions(+), 32 deletions(-) diff --git a/src/views/basic-dictionary/Nation.vue b/src/views/basic-dictionary/Nation.vue index fbffaf2..3533dc4 100644 --- a/src/views/basic-dictionary/Nation.vue +++ b/src/views/basic-dictionary/Nation.vue @@ -157,14 +157,14 @@ -
- 新增 -
+
+ + +
置顶
diff --git a/src/views/user-list/OrganizationUnits.vue b/src/views/user-list/OrganizationUnits.vue index b1098e3..b027744 100644 --- a/src/views/user-list/OrganizationUnits.vue +++ b/src/views/user-list/OrganizationUnits.vue @@ -130,9 +130,7 @@ export default { }, methods: { //close弹框关闭事件 - closethiebox(){ - - }, + closethiebox() {}, //关闭弹框 closethebulletbox() { this.dialogVisible = false; @@ -162,6 +160,7 @@ export default { this.getonorganization(); }); } else if (this.title == 3) { + postapi("/api/app/organization-units/creatre", { displayName: this.form.displayName, isPeis: this.form.isPeis, @@ -203,17 +202,18 @@ export default { this.dialogVisible = true; this.title = 1; console.log(this.form); - this.form.displayName='' + this.form.displayName = ""; }, //新增组织组织 append(node, data) { this.title = 3; + if (this.title == 3) { this.dialogVisible = true; this.form.parentId = data.id; this.form.displayName = ""; console.log(this.form.parentId); - + console.log(this.form); } // if(this.natureoptions) diff --git a/src/views/user-list/Role.vue b/src/views/user-list/Role.vue index f348028..40e9d42 100644 --- a/src/views/user-list/Role.vue +++ b/src/views/user-list/Role.vue @@ -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,23 +292,46 @@ export default { }, //确定编辑修改 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) { - 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); }, 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; diff --git a/src/views/user-list/UserList.vue b/src/views/user-list/UserList.vue index 9580c5b..971c702 100644 --- a/src/views/user-list/UserList.vue +++ b/src/views/user-list/UserList.vue @@ -861,10 +861,19 @@ export default { // this.getlist(); // 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); },