This commit is contained in:
@jyuhsin
2025-12-18 10:40:53 +08:00
parent 276fbae2ed
commit 21c4c1c6de
4 changed files with 32 additions and 5 deletions
@@ -69,6 +69,8 @@ public class TeacherCongressSessionServiceImpl extends BaseServiceImpl<Teacher_c
//代表团角色ID
Sys_role delegationHeadRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_DELEGATION_HEAD);
Sys_role delegationViceHeadRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_VICE_DELEGATION_HEAD);
Sys_role delegationContactRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_DELEGATION_CONTACT);
// 继承上届信息
//查询本届上次的信息
@@ -105,6 +107,24 @@ public class TeacherCongressSessionServiceImpl extends BaseServiceImpl<Teacher_c
newHeadUser.setTcSessionId(session.getId());
dao().insert(newHeadUser);
}
//副团长角色权限继承
List<Sys_user_role> lastViceHeadUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId())
.and(Sys_user_role::getRoleId, "=", delegationViceHeadRole.getId()));
for (Sys_user_role lastViceHeadUser : lastViceHeadUserRoles) {
Sys_user_role newViceHeadUser = BeanUtil.copyProperties(lastViceHeadUser, Sys_user_role.class);
newViceHeadUser.setTcDelegationId(newDelegation.getId());
newViceHeadUser.setTcSessionId(session.getId());
dao().insert(newViceHeadUser);
}
//联络人角色权限继承
List<Sys_user_role> lastContactUserRoles = dao().query(Sys_user_role.class, Cnd.where(Sys_user_role::getTcDelegationId, "=", lastDelegation.getId())
.and(Sys_user_role::getRoleId, "=", delegationContactRole.getId()));
for (Sys_user_role lastContactUser : lastContactUserRoles) {
Sys_user_role newContactUser = BeanUtil.copyProperties(lastContactUser, Sys_user_role.class);
newContactUser.setTcDelegationId(newDelegation.getId());
newContactUser.setTcSessionId(session.getId());
dao().insert(newContactUser);
}
//组成分工会
List<Teacher_congress_delegation_union> lastDelegationUnions = dao().query(Teacher_congress_delegation_union.class, Cnd.where(Teacher_congress_delegation_union::getDelegationId, "=", lastDelegation.getId()));
@@ -273,7 +293,7 @@ public class TeacherCongressSessionServiceImpl extends BaseServiceImpl<Teacher_c
dao().insert(newInstitution);
//插入机构人员数据
String lastSessionId = (String) child.get("sessionId");
List<Teacher_congress_institution_user> lastInstitutionUsers = dao().query(Teacher_congress_institution_user.class, Cnd.where("sessionId", "=", lastSessionId));
List<Teacher_congress_institution_user> lastInstitutionUsers = dao().query(Teacher_congress_institution_user.class, Cnd.where("sessionId", "=", lastSessionId).and("institutionId", "=", child.getId()));
List<Teacher_congress_institution_user> newInstitutionUsers = lastInstitutionUsers.stream().map(institutionUser -> {
Teacher_congress_institution_user teacherCongressInstitutionUser = new Teacher_congress_institution_user();
teacherCongressInstitutionUser.setUserId(institutionUser.getUserId());
@@ -436,7 +436,7 @@ module.exports = {
let result = []
if (response && response.code === 0 && file.status === "success") {
fileList.forEach((f) => {
if(f.response.data.includes('webvpn')) {
if(f.response.data?.includes('webvpn')) {
const index = f.response.data.indexOf('/platform')
f.response.data = f.response.data.substring(index)
}
@@ -444,6 +444,7 @@ module.exports = {
})
} else {
this.$message.error(response.msg)
fileList = fileList.splice(file, 1)
}
if (result.length > 0) {
if (this.upload_result_category === "interval") {
@@ -475,7 +476,7 @@ module.exports = {
}
return
}
this.$emit("update:value", null)
this.$emit("update:value", fileList)
},
// 通过DOM获取上传的文件
@@ -14,7 +14,7 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
<search-item label="分工会" v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('SCHOOL_UNION_ADMIN')">
<el-select v-model="pageForm.unionId" filterable @change="listUnit" clearable style="width: 100%">
<el-select v-model="pageForm.unionId" filterable clearable style="width: 100%">
<el-option v-for="i in unionOptions" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</search-item>
@@ -1,13 +1,19 @@
const HEAD_FORM_TEMPLATE = {
template: `
<el-dialog title="设置团长" :visible.sync="headDialogFormVisible" width="700px" :close-on-click-modal="false">
<el-form :model="formData" ref="headFormRef" size="small" label-width="120px" :rules="formRules">
<el-form :model="formData" ref="headFormRef" size="small" label-width="80px" :rules="formRules">
<el-form-item prop="sessionId" label="教代会">
<el-select v-model="formData.sessionId" disabled>
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="userId" label="团长">
<template #label>
<el-tooltip content="候选人从此代表团的正式代表名单中选择" placement="bottom">
<i class="el-icon-question"></i>
</el-tooltip>
团长
</template>
<user-select v-model="formData.userId"
v-if="headDialogFormVisible"
api="/platform/teacherCongress/delegation/notHeadUser"