This commit is contained in:
=
2026-06-03 11:07:12 +08:00
parent 6e4771282d
commit c305bc5dfe
9 changed files with 229 additions and 71 deletions
@@ -76,6 +76,7 @@ public class CondolenceApplyController {
@SaCheckPermission(value = {"condolence.apply", "h5.condolence.apply"}, mode = SaMode.OR)
@SLog(tag = "职工慰问系统-慰问申请", msg = "保存申请")
public Result save(@Param("data") Condolence condolence) {
validateHelpUserScope(condolence);
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
dao.insertOrUpdate(condolence);
return Result.success();
@@ -87,6 +88,7 @@ public class CondolenceApplyController {
@SLog(tag = "职工慰问系统-慰问申请", msg = "提交申请")
@Aop(TransAop.READ_COMMITTED)
public Result submit(@Param("data") Condolence condolence) {
validateHelpUserScope(condolence);
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
dao.insertOrUpdate(condolence);
// 开启流程实例
@@ -108,6 +110,7 @@ public class CondolenceApplyController {
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission(value = {"condolence.apply", "h5.condolence.apply"}, mode = SaMode.OR)
public Result submitAgain(@Param("data") Condolence condolence, @Param("taskId") Long taskId) {
validateHelpUserScope(condolence);
dao.insertOrUpdate(condolence);
Dict dict = Dict.create();
@@ -144,16 +147,37 @@ public class CondolenceApplyController {
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
cnd.and(seg);
}
cnd.and(View_user::getMember, "=", 1);
if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
if (StrUtil.isNotBlank(SecurityUtil.getUnionId())) {
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
} else {
cnd.and(View_user::getId, "=", SecurityUtil.getUserId());
}
}
sql.setCondition(cnd);
Pagination pagination = condolenceService.listPageMap(1, 50, sql);
return Result.success(pagination.getList());
}
/**
* 校验慰问对象范围:只能选择会员,非校级角色只能选择本工会会员。
*/
private void validateHelpUserScope(Condolence condolence) {
if (condolence == null || StrUtil.isBlank(condolence.getHelpUserId())) {
return;
}
View_user helpUser = dao.fetch(View_user.class, Cnd.where(View_user::getId, "=", condolence.getHelpUserId()));
if (helpUser == null) {
throw new RuntimeException("慰问对象不存在");
}
if (!Integer.valueOf(1).equals(helpUser.getMember())) {
throw new RuntimeException("慰问对象必须是会员");
}
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
if (StrUtil.isBlank(SecurityUtil.getUnionId()) || !SecurityUtil.getUnionId().equals(helpUser.getUnionId())) {
throw new RuntimeException("只能为本工会会员填写慰问申请");
}
}
}
}
@@ -53,14 +53,12 @@ public class MemberInfoBoardController {
}
/**
* @return 今年和去年的会员数
* @return 今年会员数、未缴费会员数和去年的会员数
*/
@At
@SaCheckPermission(value = {"member.info.board", "h5.member.info.board"}, mode = SaMode.OR)
public Result memberNumber() {
int memberNum = memberInfoService.count(Sqls.create("select count(1) from sys_user where member = 1"));
int lastYearMemberNum = memberInfoService.count(Sqls.create("select count(1) from member_history where year = year(now()) -1 "));
return Result.success(Map.of("memberNum", memberNum, "lastYearMemberNum", lastYearMemberNum));
return Result.success(memberInfoService.getBoardMemberNumber());
}
/**
@@ -124,7 +122,8 @@ public class MemberInfoBoardController {
SELECT
un.name as unionname,
un.unionCode,
( SELECT count( 1 ) FROM vw_user WHERE member = 1 and unionId = un.id ) `value`
( SELECT count( 1 ) FROM vw_user WHERE member = 1 and unionId = un.id ) `value`,
( SELECT count( 1 ) FROM vw_user u LEFT JOIN sys_user su ON su.id = u.id WHERE u.member = 1 and u.unionId = un.id and (su.memberFeePaid = 0 or su.memberFeePaid is null) ) unpaidValue
FROM
sys_union un
ORDER BY
@@ -61,6 +61,13 @@ public interface MemberInfoService extends BaseService<Sys_user> {
*/
void exportMember(MemberInfoPageForm pageForm, HttpServletResponse response);
/**
* 获取会员看板会员数统计数据
*
* @return memberNum 会员总数、unpaidMemberNum 未缴费会员数、lastYearMemberNum 去年会员数
*/
NutMap getBoardMemberNumber();
/**
* 切换指定会员的缴费状态
*
@@ -270,6 +270,18 @@ public class MemberInfoServiceImpl extends BaseServiceImpl<Sys_user> implements
CommonDownloadUtil.download("会员档案表.xlsx", workbook, response);
}
@Override
public NutMap getBoardMemberNumber() {
int memberNum = count(Sqls.create("select count(1) from sys_user where member = 1"));
// 空值按未缴费处理,保持会员列表中“是否缴费”的展示口径一致。
int unpaidMemberNum = count(Sqls.create("select count(1) from sys_user where member = 1 and (memberFeePaid = 0 or memberFeePaid is null)"));
int lastYearMemberNum = count(Sqls.create("select count(1) from member_history where year = year(now()) -1 "));
return NutMap.NEW()
.addv("memberNum", memberNum)
.addv("unpaidMemberNum", unpaidMemberNum)
.addv("lastYearMemberNum", lastYearMemberNum);
}
@Override
@Aop(TransAop.READ_COMMITTED)
public Boolean toggleMemberFeePaid(String userId) {
@@ -55,4 +55,7 @@ public class WelfareFilterUserPageForm extends PageForm {
@ApiModelProperty("是否会员")
private Boolean isMember;
@ApiModelProperty("是否缴费会员")
private Boolean memberFeePaid;
}
@@ -33,6 +33,7 @@ import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.Lang;
@@ -444,10 +445,12 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
u.unitName,
u.unionId,
u.unionName,
u.member
u.member,
IFNULL(su.memberFeePaid, 0) AS memberFeePaid
FROM
vw_user u
LEFT JOIN welfare_list w ON u.id = w.userId AND w.projectId = @projectId
LEFT JOIN sys_user su ON su.id = u.id
$condition
""");
sql.setParam("projectId", pageForm.getProjectId());
@@ -455,6 +458,13 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
Cnd cnd = Cnd.NEW();
cnd.and("w.userId", "is", null);
// 姓名/工号合并为一个输入框,输入值同时匹配姓名和工号。
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup userSearchGroup = new SqlExpressionGroup();
userSearchGroup.or("u.username", "like", "%" + pageForm.getSearchKeyword() + "%");
userSearchGroup.or("u.loginname", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(userSearchGroup);
}
if (StrUtil.isNotBlank(pageForm.getUserName())) {
cnd.where().andLike("u.username", pageForm.getUserName());
}
@@ -466,19 +476,21 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
if (pageForm.getBirthMonths() != null && pageForm.getBirthMonths().length > 0) {
cnd.andEX("MONTH(u.birthday)", "in", pageForm.getBirthMonths());
}
cnd.andEX("u.unionId", "=", pageForm.getUnionId());
applyWelfareUserUnionScope(cnd, "u.unionId", pageForm.getUnionId());
cnd.andEX("u.unitId", "in", pageForm.getUnitIds());
cnd.andEX("u.personType", "in", pageForm.getPersonTypes());
cnd.andEX("u.preparedBy", "in", pageForm.getPreparedBys());
cnd.andEX("u.userState", "in", pageForm.getUserStates());
cnd.andEX("u.member","=",pageForm.getIsMember());
// 是否缴费会员来源于会员分组管理设置,空值按未缴费处理。
cnd.andEX("IFNULL(su.memberFeePaid, 0)", "=", pageForm.getMemberFeePaid());
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.asc("u.unionCode");
cnd.asc("u.unitCode");
cnd.asc("u.sex");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
cnd.orderBy(getWelfareUserOrderName(pageForm.getPageOrderName()), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
@@ -489,51 +501,62 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
public void addWelfareUser(WelfareFilterUserPageForm pageForm) {
Sql sql = Sqls.create("""
SELECT
id,
loginname,
username,
sex,
birthday,
personType,
preparedBy,
userState,
unitId,
unitName,
unionId,
unionName,
member
u.id,
u.loginname,
u.username,
u.sex,
u.birthday,
u.personType,
u.preparedBy,
u.userState,
u.unitId,
u.unitName,
u.unionId,
u.unionName,
u.member,
IFNULL(su.memberFeePaid, 0) AS memberFeePaid
FROM
vw_user
vw_user u
LEFT JOIN sys_user su ON su.id = u.id
$condition
""");
Cnd cnd = Cnd.NEW();
// 添加福利名单时复用弹窗的姓名/工号合并搜索条件,避免展示数量和实际添加数量不一致。
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup userSearchGroup = new SqlExpressionGroup();
userSearchGroup.or("u.username", "like", "%" + pageForm.getSearchKeyword() + "%");
userSearchGroup.or("u.loginname", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(userSearchGroup);
}
if (StrUtil.isNotBlank(pageForm.getUserName())) {
cnd.where().andLike("username", pageForm.getUserName());
cnd.where().andLike("u.username", pageForm.getUserName());
}
if (StrUtil.isNotBlank(pageForm.getLoginName())) {
cnd.where().andLike("loginname", pageForm.getLoginName());
cnd.where().andLike("u.loginname", pageForm.getLoginName());
}
cnd.andEX("sex", "=", pageForm.getSex());
cnd.andEX("birthday", "=", pageForm.getBirthday());
cnd.andEX("u.sex", "=", pageForm.getSex());
cnd.andEX("u.birthday", "=", pageForm.getBirthday());
if (pageForm.getBirthMonths() != null && pageForm.getBirthMonths().length > 0) {
cnd.andEX("MONTH(birthday)", "in", pageForm.getBirthMonths());
cnd.andEX("MONTH(u.birthday)", "in", pageForm.getBirthMonths());
}
cnd.andEX("unionId", "=", pageForm.getUnionId());
cnd.andEX("unitId", "in", pageForm.getUnitIds());
cnd.andEX("personType", "in", pageForm.getPersonTypes());
cnd.andEX("preparedBy", "in", pageForm.getPreparedBys());
cnd.andEX("userState", "in", pageForm.getUserStates());
cnd.andEX("member","=",pageForm.getIsMember());
applyWelfareUserUnionScope(cnd, "u.unionId", pageForm.getUnionId());
cnd.andEX("u.unitId", "in", pageForm.getUnitIds());
cnd.andEX("u.personType", "in", pageForm.getPersonTypes());
cnd.andEX("u.preparedBy", "in", pageForm.getPreparedBys());
cnd.andEX("u.userState", "in", pageForm.getUserStates());
cnd.andEX("u.member","=",pageForm.getIsMember());
// 是否缴费会员来源于会员分组管理设置,空值按未缴费处理。
cnd.andEX("IFNULL(su.memberFeePaid, 0)", "=", pageForm.getMemberFeePaid());
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.asc("unionCode");
cnd.asc("unitCode");
cnd.asc("sex");
cnd.asc("u.unionCode");
cnd.asc("u.unitCode");
cnd.asc("u.sex");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
cnd.orderBy(getWelfareUserOrderName(pageForm.getPageOrderName()), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
cnd.and("id", "not in", Sqls.create("select userId from `welfare_list` where projectId = @projectId").setParam("projectId", pageForm.getProjectId()));
cnd.and("u.id", "not in", Sqls.create("select userId from `welfare_list` where projectId = @projectId").setParam("projectId", pageForm.getProjectId()));
sql.setCondition(cnd);
List<NutMap> list = listMap(sql);
@@ -556,6 +579,32 @@ public class WelfareListServiceImpl extends BaseServiceImpl<WelfareList> impleme
dao().insert(welfareList);
}
/**
* 福利添加人员查询已关联 sys_user,排序字段统一加 vw_user 别名,避免同名字段歧义。
*/
private String getWelfareUserOrderName(String pageOrderName) {
if (StrUtil.isBlank(pageOrderName) || pageOrderName.contains(".")) {
return pageOrderName;
}
if ("memberFeePaid".equals(pageOrderName)) {
return "IFNULL(su.memberFeePaid, 0)";
}
return "u." + pageOrderName;
}
/**
* 分工会角色只能查询和添加本工会人员,其他角色按页面选择的工会筛选。
*/
private void applyWelfareUserUnionScope(Cnd cnd, String unionColumn, String unionId) {
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())
|| AuthUtil.hasRole(RoleConstant.BRANCH_UNION_ADMIN.name())
|| AuthUtil.hasRole(RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
cnd.and(unionColumn, "=", SecurityUtil.getUnionId());
} else {
cnd.andEX(unionColumn, "=", unionId);
}
}
@Override
public void exportXlsx(WelfareListPageForm pageForm, HttpServletResponse response) {
Sql sql = Sqls.create("""
@@ -292,9 +292,9 @@ layout("/layouts/platform.html"){
<div class="dashboard">
<!-- 顶部四个统计卡片 - 高度固定200px -->
<div class="card stats-card">
<div class="card-title">会员数</div>
<div class="card-title">会员数/未缴费人数</div>
<div class="stat-value" v-loading="loading.memberNumber">
{{memberNumberData.memberNum}}
{{memberNumberData.memberNum}} / {{memberNumberData.unpaidMemberNum}}
<span style="font-size: 14px">&ensp;人</span>
</div>
<!-- <div class="stat-meta" v-loading="loading.memberNumber">-->
@@ -322,7 +322,7 @@ layout("/layouts/platform.html"){
<div class="content-left">
<!-- 工会会员数图表 -->
<div class="card">
<div class="card-title">工会会员数</div>
<div class="card-title">工会会员数/未缴费数</div>
<div class="chart-container" id="unionMemberChart" v-loading="loading.unionMember"></div>
</div>
@@ -392,6 +392,7 @@ layout("/layouts/platform.html"){
},
memberNumberData: {
memberNum: "--",
unpaidMemberNum: "--",
lastYearMemberNum: "--",
ratio: "0.0%",
diff: 0
@@ -411,11 +412,11 @@ layout("/layouts/platform.html"){
this.$axios.post("/platform/member/info/board/memberNumber").then((resp) => {
if (resp.code === 0) {
const {
data: { memberNum, lastYearMemberNum }
data: { memberNum, unpaidMemberNum, lastYearMemberNum }
} = resp
const diff = memberNum - lastYearMemberNum
const ratio = (lastYearMemberNum ? (Math.abs(diff) / lastYearMemberNum) * 100 : (diff / 1) * 10).toFixed(2) + " %"
this.memberNumberData = { memberNum, lastYearMemberNum, diff, ratio }
this.$set(this, "memberNumberData", { memberNum, unpaidMemberNum, lastYearMemberNum, diff, ratio })
this.loading.memberNumber = false
} else {
this.$message.warning(resp.msg)
@@ -571,6 +572,30 @@ layout("/layouts/platform.html"){
* 各工会会员数
* @returns {Promise<void>}
*/
getUnionUnpaidValue(item) {
// 兼容后端 Record 字段大小写,空值统一按 0 处理。
const unpaidValue = item.unpaidValue || item.unpaidvalue || 0
return Number(unpaidValue) || 0
},
formatUnionMemberValue(item) {
const unpaidValue = this.getUnionUnpaidValue(item)
if (unpaidValue > 0) {
return item.value + "/" + unpaidValue
}
return item.value
},
buildUnionMemberTooltip(title, items) {
if (!items || !items.length) {
return ""
}
const data = items[0].data || {}
const unpaidValue = this.getUnionUnpaidValue(data)
return '<div style="padding:8px 4px">' +
'<div style="font-weight:600;margin-bottom:4px">' + title + '</div>' +
'<div><span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:#217050;margin-right:6px"></span>会员数:' + data.value + '</div>' +
'<div><span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:#217050;margin-right:6px"></span>未缴费数:' + unpaidValue + '</div>' +
'</div>'
},
async getUnionMember() {
this.loading.unionMember = true
this.$axios.post("/platform/member/info/board/unionMember").then((resp) => {
@@ -580,11 +605,8 @@ layout("/layouts/platform.html"){
this.unionMember = tableData
const labels = chartData.map((v) => v.unionname)
const values = chartData.map((v) => v.value)
if (chart.unionMemberChart) {
chart.unionMemberChart.changeData(values)
chart.unionMemberChart.changeData(chartData)
return
}
@@ -612,7 +634,10 @@ layout("/layouts/platform.html"){
textShadow: '0 1px 2px rgba(0,0,0,0.5)',
opacity: 0.9
},
formatter: (datum) => datum.value // 显示原始值
formatter: (datum) => this.formatUnionMemberValue(datum)
},
tooltip: {
customContent: (title, items) => this.buildUnionMemberTooltip(title, items)
},
// X轴配置
xAxis: {
@@ -3,15 +3,9 @@ const addUser = {
<el-dialog title="添加用户" :visible.sync="visible" width="80%">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入姓名"
style="width: 100%" v-model="pageForm.userName">
</el-input>
</search-item>
<search-item label="工号">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入工号"
style="width: 100%" v-model="pageForm.loginName">
<search-item label="姓名/工号">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入姓名/工号"
style="width: 100%" v-model="pageForm.searchKeyword">
</el-input>
</search-item>
@@ -109,6 +103,13 @@ const addUser = {
<el-option label="否" :value="false"></el-option>
</el-select>
</search-item>
<search-item label="是否缴费会员">
<el-select clearable placeholder="请选择是否缴费会员" style="width: 100%"
v-model="pageForm.memberFeePaid">
<el-option label="是" :value="true"></el-option>
<el-option label="否" :value="false"></el-option>
</el-select>
</search-item>
</search>
</el-card>
@@ -154,8 +155,7 @@ const addUser = {
visible: false,
projectId: null,
pageForm: {
userName: null,
loginName: null,
searchKeyword: null,
sex: null,
birthday: null,
birthMonths: [],
@@ -164,7 +164,8 @@ const addUser = {
personTypes: [],
preparedBys: [],
userStates: [],
isMember: null
isMember: null,
memberFeePaid: null
},
sexOptions: ["男", "女"],
unionOptions: [],
@@ -187,30 +188,47 @@ const addUser = {
this.visible = true
this.resetPageForm()
this.pageForm.projectId = id
this.unionOptions = await this.$businessTool.listUnion()
this.unitOptions = await this.$businessTool.listUnit()
await this.initUnionAndUnitOptions()
this.pageData()
},
resetPageForm() {
this.$set(this.pageForm, "userName", null)
this.$set(this.pageForm, "loginName", null)
this.$set(this.pageForm, "searchKeyword", null)
this.$set(this.pageForm, "sex", null)
this.$set(this.pageForm, "birthday", null)
this.$set(this.pageForm, "birthMonths", [])
this.$set(this.pageForm, "unionId", null)
this.$set(this.pageForm, "unitId", null)
this.$set(this.pageForm, "unitIds", [])
this.$set(this.pageForm, "personTypes", [])
this.$set(this.pageForm, "preparedBys", [])
this.$set(this.pageForm, "userStates", [])
this.$set(this.pageForm, "isMember", null)
this.$set(this.pageForm, "memberFeePaid", null)
},
async initUnionAndUnitOptions() {
const hasSchoolUnionRole = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"])
if (hasSchoolUnionRole) {
this.unionOptions = await this.$businessTool.listUnion()
this.unitOptions = await this.$businessTool.listUnit()
} else {
this.$set(this.pageForm, "unionId", this.$store.state.user.union.id)
this.unionOptions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
this.unitOptions = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
async unionIdChange(val) {
if (val) {
this.unitOptions = await this.$businessTool.listUnit(val)
} else {
this.pageForm.unitIds = []
this.$set(this.pageForm, "unitIds", [])
if (!this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"])) {
this.$set(this.pageForm, "unionId", this.$store.state.user.union.id)
this.unitOptions = await this.$businessTool.listUnit(this.$store.state.user.union.id)
} else {
this.unitOptions = await this.$businessTool.listUnit()
}
}
},
@@ -68,7 +68,7 @@ layout("/layouts/platform.html"){
</search-item>
<search-item label="所属工会">
<el-select clearable filterable placeholder="请选择所属工会" style="width: 100%" v-model="pageForm.unionId">
<el-select clearable filterable placeholder="请选择所属工会" style="width: 100%" v-model="pageForm.unionId" @change="unionIdChange">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
</el-select>
</search-item>
@@ -341,12 +341,33 @@ layout("/layouts/platform.html"){
.finally(() => {
this.tableLoading = false
})
},
async initUnionAndUnitOptions() {
const hasSchoolUnionRole = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"])
if (hasSchoolUnionRole) {
this.unionOptions = await this.$businessTool.listUnion()
this.unitOptions = await this.$businessTool.listUnit()
} else {
this.$set(this.pageForm, "unionId", this.$store.state.user.union.id)
this.unionOptions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
this.unitOptions = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
async unionIdChange(val) {
this.$set(this.pageForm, "unitIds", [])
if (val) {
this.unitOptions = await this.$businessTool.listUnit(val)
} else if (!this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN", "SCHOOL_UNION_WELFARE_ADMIN"])) {
this.$set(this.pageForm, "unionId", this.$store.state.user.union.id)
this.unitOptions = await this.$businessTool.listUnit(this.$store.state.user.union.id)
} else {
this.unitOptions = await this.$businessTool.listUnit()
}
}
},
async created() {
this.getWelfareList()
this.unionOptions = await this.$businessTool.listUnion()
this.unitOptions = await this.$businessTool.listUnit()
await this.initUnionAndUnitOptions()
this.pageData()
}
})