fix: 协会会长等角色改为 协会负责人

This commit is contained in:
2026-09-11 16:14:54 +08:00
parent ccc29fee66
commit c5df88bd92
3 changed files with 6 additions and 18 deletions
@@ -295,7 +295,7 @@ public class ClubInfoManageController {
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
if(clubUser != null) {
List<String> roleCodeList = clubUser.getRoleCode();
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()).contains(roleCode)) {
if (List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()).contains(roleCode)) {
roleCodeList.remove(RoleConstant.CLUB_MEMBER.name());
}
if(!roleCodeList.contains(roleCode)) {
@@ -115,7 +115,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
// 校工会主席在协会管理界面按校级管理角色查看全部协会。
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()));
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()));
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
@@ -91,10 +91,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
</el-form-item>
<el-form-item label="身份" prop="roleCode">
<el-radio-group v-model="formData.roleCode" size="medium">
<el-radio v-if="!addMember" border label="CLUB_PRESIDENT">会长</el-radio>
<el-radio v-if="!addMember" border label="CLUB_VICE_PRESIDENT">副会长</el-radio>
<el-radio v-if="!addMember" border label="CLUB_SECRETARY">秘书长</el-radio>
<el-radio v-if="!addMember" border label="CLUB_VICE_SECRETARY">副秘书长</el-radio>
<el-radio v-if="!addMember" border label="CLUB_MANAGER">协会负责人</el-radio>
<el-radio v-if="addMember" border label="CLUB_MEMBER">会员</el-radio>
</el-radio-group>
</el-form-item>
@@ -127,13 +124,10 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
</el-form-item>
<el-form-item prop="roleCode" label="身份">
<el-checkbox-group v-model="roleCodeFormData.roleCode">
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
<el-checkbox label="CLUB_REIMBURSEMENT_MANAGER">协会报销负责人</el-checkbox>
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
<el-checkbox label="CLUB_MANAGER">协会负责人</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
@@ -204,13 +198,6 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
async userDoAdd() {
const valid = await this.$refs.userForm.validate()
if (!valid) return
if (this.formData.roleCode === "CLUB_PRESIDENT" || this.formData.roleCode === "CLUB_SECRETARY") {
const str = this.formData.roleCode === "CLUB_PRESIDENT" ? "会长" : "秘书长"
if (this.formData.users.length > 1) {
this.$message.warning(str + "只能有一位")
return
}
}
const resp = await this.$axios.post("/platform/club/infoManage/manage/userDoAdd", {
clubId: this.parentNode.currentTreeData.id,
users: JSON.stringify(this.formData.users),
@@ -228,7 +215,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
openUserAdd(flag) {
this.userOptions = []
this.addMember = flag
this.$set(this.formData, "roleCode", flag ? "CLUB_MEMBER" : "CLUB_PRESIDENT")
this.$set(this.formData, "roleCode", flag ? "CLUB_MEMBER" : "CLUB_MANAGER")
this.$set(this.formData, "users", [])
this.$set(this.formData, "payed", false)
this.addDialogVisible = true
@@ -266,6 +253,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
},
updateRoleCode(row) {
this.roleCodeFormData = clone(row)
this.roleCodeFormData.roleCode = (this.roleCodeFormData.roleCode || []).filter(code => code === "CLUB_MANAGER")
this.roleCodeDialogVisible = true
},
onRoleCode() {