From c38c2fc529f7d4cde15e8a9b8865810fb944e421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Fri, 1 Nov 2024 15:58:11 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!92=20:?= =?UTF-8?q?=20=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=9A=E5=88=86=E9=85=8D=E5=8A=9F=E8=83=BD=E5=92=8C=E5=88=86?= =?UTF-8?q?=E9=85=8D=E6=8C=89=E9=92=AE=E7=AA=97=E5=8F=A3=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=92=E8=89=B2=E5=90=8D'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserBusinessController.java | 12 ---------- jshERP-web/src/views/system/RoleList.vue | 22 +++++-------------- .../system/modules/RoleFunctionModal.vue | 3 +-- 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/UserBusinessController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/UserBusinessController.java index 80d51d985..8fcfc3da2 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/UserBusinessController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/UserBusinessController.java @@ -1,9 +1,7 @@ package com.jsh.erp.controller; import com.alibaba.fastjson.JSONObject; -import com.jsh.erp.datasource.entities.Role; import com.jsh.erp.datasource.entities.UserBusiness; -import com.jsh.erp.service.role.RoleService; import com.jsh.erp.service.userBusiness.UserBusinessService; import com.jsh.erp.utils.BaseResponseInfo; import com.jsh.erp.utils.ErpInfo; @@ -11,7 +9,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -34,9 +31,6 @@ public class UserBusinessController { @Resource private UserBusinessService userBusinessService; - @Resource - private RoleService roleService; - /** * 获取信息 * @param keyId @@ -81,12 +75,6 @@ public class UserBusinessController { Map objectMap = new HashMap(); Long id = userBusinessService.checkIsValueExist(type, keyId); objectMap.put("id", id); - if("RoleFunctions".equals(type)){ - List roles = roleService.getRoleListByIds(keyId); - if(!CollectionUtils.isEmpty(roles)){ - objectMap.put("name", roles.get(0).getName()); - } - } return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); } diff --git a/jshERP-web/src/views/system/RoleList.vue b/jshERP-web/src/views/system/RoleList.vue index c76a21d2c..99e3ed2f8 100644 --- a/jshERP-web/src/views/system/RoleList.vue +++ b/jshERP-web/src/views/system/RoleList.vue @@ -50,7 +50,7 @@ 分配功能 - 分配按钮 + 分配按钮 编辑 @@ -115,7 +115,6 @@ roleModalVisible: false, roleFunctionModalVisible: false, currentRoleId: '', - currentRoleName: '', labelCol: { span: 5 }, @@ -182,20 +181,12 @@ methods: { handleSetFunction(record) { this.$refs.roleFunctionModal.edit(record); - if(record.name){ - this.$refs.roleFunctionModal.title = "为角色<" + record.name + ">分配功能【分配之后请继续分配按钮】"; - }else{ - this.$refs.roleFunctionModal.title = "分配功能【分配之后请继续分配按钮】"; - } + this.$refs.roleFunctionModal.title = "分配功能【分配之后请继续分配按钮】"; this.$refs.roleFunctionModal.disableSubmit = false; }, - handleSetPushBtn(roleId,name) { + handleSetPushBtn(roleId) { this.$refs.rolePushBtnModal.edit(roleId); - if(name){ - this.$refs.rolePushBtnModal.title = "为角色<" + name + ">分配按钮"; - }else{ - this.$refs.rolePushBtnModal.title = "分配按钮"; - } + this.$refs.rolePushBtnModal.title = "分配按钮"; this.$refs.rolePushBtnModal.disableSubmit = false; }, roleModalFormOk() { @@ -203,12 +194,11 @@ this.loadData() this.roleModalVisible = true }, - roleFunctionModalFormOk(id,name) { + roleFunctionModalFormOk(id) { //重载列表 this.loadData() this.roleFunctionModalVisible = true this.currentRoleId = id - this.currentRoleName = name }, handleRoleTip(record) { if(record) { @@ -219,7 +209,7 @@ handleRoleFunctionTip() { if(this.currentRoleId) { this.roleFunctionModalVisible = false - this.handleSetPushBtn(this.currentRoleId, this.currentRoleName) + this.handleSetPushBtn(this.currentRoleId) } }, handleAdd: function () { diff --git a/jshERP-web/src/views/system/modules/RoleFunctionModal.vue b/jshERP-web/src/views/system/modules/RoleFunctionModal.vue index d931bfd2f..b57a243b3 100644 --- a/jshERP-web/src/views/system/modules/RoleFunctionModal.vue +++ b/jshERP-web/src/views/system/modules/RoleFunctionModal.vue @@ -115,14 +115,13 @@ checkUserBusiness({'type': 'RoleFunctions','keyId': this.roleId}).then((res)=>{ if(res.data && res.data.id) { formData.id=res.data.id - formData.name=res.data.name obj=editUserBusiness(formData); } else { obj=addUserBusiness(formData); } obj.then((res)=>{ if(res.code === 200){ - that.$emit('ok', this.roleId, this.model.name); + that.$emit('ok', this.roleId); }else{ that.$message.warning(res.data.message); }