..
This commit is contained in:
@@ -161,12 +161,11 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
|||||||
|
|
||||||
// 特别人员
|
// 特别人员
|
||||||
List<SpecialStaff> specialStaffs = dao.query(SpecialStaff.class, Cnd.NEW());
|
List<SpecialStaff> specialStaffs = dao.query(SpecialStaff.class, Cnd.NEW());
|
||||||
List<SpecialStaff> specialManyUnitStaffs = specialStaffs.stream().filter(SpecialStaff::getIsManyUnit).toList();
|
List<String> specialStaffUserIds = specialStaffs.stream().map(SpecialStaff::getUserId).toList();
|
||||||
List<String> specialManyUnitStaffUserIds = specialManyUnitStaffs.stream().map(SpecialStaff::getUserId).toList();
|
List<String> specialStaffUserLoginNames = dao.query(Sys_user.class, Cnd.where(Sys_user::getId, "in", specialStaffUserIds)).stream().map(Sys_user::getLoginname).toList();
|
||||||
List<String> specialManyUnitStaffUserLoginNames = dao.query(Sys_user.class, Cnd.where(Sys_user::getId, "in", specialManyUnitStaffUserIds)).stream().map(Sys_user::getLoginname).toList();
|
|
||||||
|
|
||||||
// 排除掉多单位人员不更新
|
// 排除掉其他人员不更新
|
||||||
cnd.andEX(Sys_user_source::getLoginname, "not in", specialManyUnitStaffUserLoginNames);
|
cnd.andEX(Sys_user_source::getLoginname, "not in", specialStaffUserLoginNames);
|
||||||
|
|
||||||
List<Sys_user_source> sources = dao.query(Sys_user_source.class, cnd.groupBy("loginname"));
|
List<Sys_user_source> sources = dao.query(Sys_user_source.class, cnd.groupBy("loginname"));
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -353,7 +353,7 @@ public class ActivityBasicScopeController {
|
|||||||
|
|
||||||
cnd.andEX("u.unionid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnionId());
|
cnd.andEX("u.unionid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnionId());
|
||||||
cnd.andEX("u.unitid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnitId());
|
cnd.andEX("u.unitid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnitId());
|
||||||
cnd.andEX("u.personType", IN_OR_NIN_OP, activityUserScopePageParam.getPersonTypes());
|
cnd.andEX("u.preparedBy", IN_OR_NIN_OP, activityUserScopePageParam.getPersonTypes());
|
||||||
cnd.andEX("u.userState", IN_OR_NIN_OP, activityUserScopePageParam.getUserStates());
|
cnd.andEX("u.userState", IN_OR_NIN_OP, activityUserScopePageParam.getUserStates());
|
||||||
cnd.andEX("u.sex", IN_OR_NIN_OP, activityUserScopePageParam.getSexTypes());
|
cnd.andEX("u.sex", IN_OR_NIN_OP, activityUserScopePageParam.getSexTypes());
|
||||||
cnd.andEX("sur.roleid", IN_OR_NIN_OP, activityUserScopePageParam.getRoleIds());
|
cnd.andEX("sur.roleid", IN_OR_NIN_OP, activityUserScopePageParam.getRoleIds());
|
||||||
|
|||||||
+60
-22
@@ -1,5 +1,9 @@
|
|||||||
package com.budwk.app.zhgh.activity.basic.controller;
|
package com.budwk.app.zhgh.activity.basic.controller;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
@@ -9,8 +13,10 @@ import com.budwk.app.base.page.Pagination;
|
|||||||
import com.budwk.app.base.param.PageForm;
|
import com.budwk.app.base.param.PageForm;
|
||||||
import com.budwk.app.base.result.Result;
|
import com.budwk.app.base.result.Result;
|
||||||
import com.budwk.app.base.service.BaseService;
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
import com.budwk.app.zhgh.activity.basic.models.ActivityUserScope;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -23,6 +29,10 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName ActivityBasicScopeUserDataController
|
* @ClassName ActivityBasicScopeUserDataController
|
||||||
* @Description TODO
|
* @Description TODO
|
||||||
@@ -52,28 +62,6 @@ public class ActivityBasicScopeUserDataController {
|
|||||||
@Param(value = "personType") String personType,
|
@Param(value = "personType") String personType,
|
||||||
@Param(value = "userState") String userState,
|
@Param(value = "userState") String userState,
|
||||||
@Param(value = "groupId") Integer groupId) {
|
@Param(value = "groupId") Integer groupId) {
|
||||||
/* Sql sql = Sqls.create("""
|
|
||||||
SELECT
|
|
||||||
aus.id,
|
|
||||||
u.username AS userName,
|
|
||||||
u.loginname AS loginName,
|
|
||||||
u.sex,
|
|
||||||
u.birthday,
|
|
||||||
u.mobile,
|
|
||||||
u.personType,
|
|
||||||
u.userState,
|
|
||||||
u.unitname AS unitName,
|
|
||||||
u.unionname AS unionName,
|
|
||||||
aus.groupId,
|
|
||||||
aus.groupName,
|
|
||||||
actun.unionname AS activityUnionName
|
|
||||||
FROM
|
|
||||||
activity_user_scope aus
|
|
||||||
LEFT JOIN `vw_user` u ON u.id = aus.userId
|
|
||||||
LEFT JOIN activity_basic_unit actit ON actit.id=u.unitid
|
|
||||||
LEFT JOIN activity_basic_union actun ON actit.unionid=actun.id
|
|
||||||
$condition
|
|
||||||
""");*/
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
aus.id,
|
aus.id,
|
||||||
@@ -83,6 +71,7 @@ public class ActivityBasicScopeUserDataController {
|
|||||||
u.birthday,
|
u.birthday,
|
||||||
u.mobile,
|
u.mobile,
|
||||||
u.personType,
|
u.personType,
|
||||||
|
u.preparedBy,
|
||||||
u.userState,
|
u.userState,
|
||||||
u.unitname AS unitName,
|
u.unitname AS unitName,
|
||||||
u.unionname AS unionName,
|
u.unionname AS unionName,
|
||||||
@@ -164,4 +153,53 @@ public class ActivityBasicScopeUserDataController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("activity.basic.user")
|
||||||
|
@Ok("void")
|
||||||
|
public void doExportUser(Integer groupId, HttpServletResponse response){
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
aus.id,
|
||||||
|
u.username AS userName,
|
||||||
|
u.loginname AS loginName,
|
||||||
|
u.sex,
|
||||||
|
u.birthday,
|
||||||
|
u.mobile,
|
||||||
|
u.personType,
|
||||||
|
u.preparedBy,
|
||||||
|
u.userState,
|
||||||
|
u.unitname AS unitName,
|
||||||
|
u.unionname AS unionName,
|
||||||
|
aus.groupId,
|
||||||
|
aus.groupName
|
||||||
|
FROM
|
||||||
|
activity_user_scope aus
|
||||||
|
LEFT JOIN `vw_user` u ON u.id = aus.userId
|
||||||
|
WHERE aus.groupId = @groupId
|
||||||
|
ORDER BY u.unionId,unitId
|
||||||
|
""");
|
||||||
|
sql.setParam("groupId",groupId);
|
||||||
|
List list = baseService.listMap(sql);
|
||||||
|
|
||||||
|
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
exportEntities.add(new ExcelExportEntity("工号","loginName",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("姓名","userName",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("性别","sex",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("出生年月","birthday",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("手机号","mobile",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("在职状态","userState",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("聘用方式","preparedBy",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("人员类型","personType",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属单位","unitName",20));
|
||||||
|
exportEntities.add(new ExcelExportEntity("所属工会","unionName",20));
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
|
CommonDownloadUtil.download("名单.xlsx", workbook, response);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -349,6 +349,10 @@ public class FamilyActivityApplyController {
|
|||||||
public Result doSignUp(FamilyUser familyUser) {
|
public Result doSignUp(FamilyUser familyUser) {
|
||||||
try {
|
try {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
FamilyActivity activity = dao.fetch(FamilyActivity.class, familyUser.getActivityId());
|
||||||
|
if(Lang.isEmpty(familyUser.getMobileColumnsValue())) {
|
||||||
|
return Result.error(99,"请填写" + activity.getKeyWord() + "信息");
|
||||||
|
}
|
||||||
boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId());
|
boolean courseByUser = familyActivityService.isSignCourseByUser(familyUser.getCourseId(), SecurityUtil.getUserId());
|
||||||
if(courseByUser) {
|
if(courseByUser) {
|
||||||
return Result.error(99,"您已报过该活动");
|
return Result.error(99,"您已报过该活动");
|
||||||
|
|||||||
@@ -1,319 +1,336 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">活动分组:</div>
|
<div class="search-item-label">活动分组:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select
|
<el-select
|
||||||
placeholder="活动分组"
|
placeholder="活动分组"
|
||||||
v-model="pageForm.groupId"
|
v-model="pageForm.groupId"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="
|
@change="
|
||||||
doSearch()
|
doSearch()
|
||||||
viewGroupName()
|
viewGroupName()
|
||||||
"
|
"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in activityGroupList"
|
v-for="item in activityGroupList"
|
||||||
:label="item.groupName"
|
:label="item.groupName"
|
||||||
:value="item.groupId"
|
:value="item.groupId"
|
||||||
:key="item.groupId"
|
:key="item.groupId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">姓名工号:</div>
|
<div class="search-item-label">姓名工号:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-input
|
<el-input
|
||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
clearable
|
clearable
|
||||||
v-model="pageForm.searchKeyword"
|
v-model="pageForm.searchKeyword"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@keyup.enter.native="doSearch"
|
@keyup.enter.native="doSearch"
|
||||||
>
|
>
|
||||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||||
<el-option label="姓名" value="username"></el-option>
|
<el-option label="姓名" value="username"></el-option>
|
||||||
<el-option label="工号" value="loginname"></el-option>
|
<el-option label="工号" value="loginname"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-item" v-if="is_sysadmin || is_A06">
|
<div class="search-item" v-if="is_sysadmin || is_A06">
|
||||||
<div class="search-item-label">所属工会:</div>
|
<div class="search-item-label">所属工会:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select
|
<el-select
|
||||||
placeholder="所属工会"
|
placeholder="所属工会"
|
||||||
v-model="pageForm.unionId"
|
v-model="pageForm.unionId"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
clearable
|
clearable
|
||||||
@change="flushUnits"
|
@change="flushUnits"
|
||||||
@clear="flushUnits"
|
@clear="flushUnits"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
<el-option v-for="item in unions" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
<el-option v-for="item in unions" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<div class="search-item-label">所属单位:</div>
|
<div class="search-item-label">所属单位:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%" clearable @change="doSearch" filterable>
|
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%" clearable @change="doSearch"
|
||||||
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
filterable>
|
||||||
</el-select>
|
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||||
</div>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--<div class="search-item"
|
<!--<div class="search-item"
|
||||||
v-if="${@shiro.hasRole('sysadmin')}">
|
v-if="${@shiro.hasRole('sysadmin')}">
|
||||||
<div class="search-item-label">活动工会:</div>
|
<div class="search-item-label">活动工会:</div>
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select placeholder="所属工会" v-model="pageForm.activityUnionId"
|
<el-select placeholder="所属工会" v-model="pageForm.activityUnionId"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
clearable="true"
|
clearable="true"
|
||||||
@change="flushUnits" @clear="flushUnits"
|
@change="flushUnits" @clear="flushUnits"
|
||||||
filterable="true">
|
filterable="true">
|
||||||
<el-option v-for="item in ActivityUnions" :label="item.unionname"
|
<el-option v-for="item in ActivityUnions" :label="item.unionname"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')}">
|
|
||||||
<div class="search-item-label">活动单位:</div>
|
|
||||||
<div class="search-item-option">
|
|
||||||
<el-select placeholder="所属单位" v-model="pageForm.activityUnitId"
|
|
||||||
style="width: 100%;"
|
|
||||||
clearable="true"
|
|
||||||
@change="doSearch"
|
|
||||||
filterable="true">
|
|
||||||
<el-option v-for="item in ActivityUnits" :label="item.name"
|
|
||||||
:value="item.id"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
<div class="search-item">
|
|
||||||
<div class="search-item-label">人员类型:</div>
|
|
||||||
<div class="search-item-option">
|
|
||||||
<dict-select v-model="pageForm.personType" code="PERSON_TYPE" @change="doSearch" style="width: 100%"></dict-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="search-item">
|
|
||||||
<div class="search-item-label">在职状态:</div>
|
|
||||||
<div class="search-item-option">
|
|
||||||
<dict-select
|
|
||||||
v-model="pageForm.userState"
|
|
||||||
style="width: 100%"
|
|
||||||
clearable
|
|
||||||
placeholder="在职状态"
|
|
||||||
@change="doSearch"
|
|
||||||
code="USER_STATE"
|
|
||||||
></dict-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="search-query">
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</div>
|
||||||
|
|
||||||
<el-card shadow="never" class="mt10">
|
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')}">
|
||||||
<table-tool :label="currentGroupName">
|
<div class="search-item-label">活动单位:</div>
|
||||||
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary" :disabled="!pageForm.groupId">
|
<div class="search-item-option">
|
||||||
导出活动分组人员xlsx
|
<el-select placeholder="所属单位" v-model="pageForm.activityUnitId"
|
||||||
</el-button>
|
style="width: 100%;"
|
||||||
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
clearable="true"
|
||||||
删除{{ currentGroupName }}
|
@change="doSearch"
|
||||||
</el-button>
|
filterable="true">
|
||||||
</table-tool>
|
<el-option v-for="item in ActivityUnits" :label="item.name"
|
||||||
<el-table ref="userTable" :data="tableData" stripe border :size="tableSize" @sort-change="pageOrder">
|
:value="item.id"></el-option>
|
||||||
<el-table-column label="序号" type="index" width="80">
|
</el-select>
|
||||||
<template slot-scope="scope">
|
</div>
|
||||||
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }}</span>
|
</div>-->
|
||||||
</template>
|
|
||||||
</el-table-column>
|
<div class="search-item">
|
||||||
<el-table-column
|
<div class="search-item-label">人员类型:</div>
|
||||||
align="center"
|
<div class="search-item-option">
|
||||||
header-align="center"
|
<dict-select v-model="pageForm.personType" code="USER_PERSON_TYPE" @change="doSearch"
|
||||||
v-for="column in tableColumns"
|
style="width: 100%"></dict-select>
|
||||||
show-overflow-tooltip
|
</div>
|
||||||
:label="column.label"
|
</div>
|
||||||
:prop="column.prop"
|
|
||||||
:key="column.prop"
|
<div class="search-item">
|
||||||
:sortable="column.sortable"
|
<div class="search-item-label">在职状态:</div>
|
||||||
></el-table-column>
|
<div class="search-item-option">
|
||||||
<el-table-column align="center" header-align="center" label="操作" width="100">
|
<dict-select
|
||||||
<template slot-scope="{ row }">
|
v-model="pageForm.userState"
|
||||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
style="width: 100%"
|
||||||
</template>
|
clearable
|
||||||
</el-table-column>
|
placeholder="在职状态"
|
||||||
</el-table>
|
@change="doSearch"
|
||||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
code="USER_STATE"
|
||||||
<el-pagination
|
></dict-select>
|
||||||
@size-change="pageSizeChange"
|
</div>
|
||||||
@current-change="pageNumberChange"
|
</div>
|
||||||
:current-page="pageForm.pageNumber"
|
|
||||||
:page-sizes="[5, 10, 20, 30, 50]"
|
<div class="search-item">
|
||||||
:page-size="pageForm.pageSize"
|
<div class="search-item-label">聘用方式:</div>
|
||||||
layout="total, sizes, prev, pager, next"
|
<dict-select
|
||||||
:total="pageForm.totalCount"
|
clearable
|
||||||
></el-pagination>
|
code="USER_PREPARED_BY_TYPE"
|
||||||
</el-row>
|
multiple
|
||||||
</el-card>
|
collapse-tags
|
||||||
</div>
|
placeholder="请选择聘用方式"
|
||||||
|
v-model="pageForm.preparedBys"
|
||||||
|
></dict-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="search-query">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="mt10">
|
||||||
|
<table-tool :label="currentGroupName">
|
||||||
|
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary"
|
||||||
|
:disabled="!pageForm.groupId">
|
||||||
|
导出活动分组人员xlsx
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
||||||
|
删除{{ currentGroupName }}
|
||||||
|
</el-button>
|
||||||
|
</table-tool>
|
||||||
|
<el-table ref="userTable" :data="tableData" stripe border :size="tableSize" @sort-change="pageOrder">
|
||||||
|
<el-table-column label="序号" type="index" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
v-for="column in tableColumns"
|
||||||
|
show-overflow-tooltip
|
||||||
|
:label="column.label"
|
||||||
|
:prop="column.prop"
|
||||||
|
:key="column.prop"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" label="操作" width="100">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="pageSizeChange"
|
||||||
|
@current-change="pageNumberChange"
|
||||||
|
:current-page="pageForm.pageNumber"
|
||||||
|
:page-sizes="[5, 10, 20, 30, 50]"
|
||||||
|
:page-size="pageForm.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next"
|
||||||
|
:total="pageForm.totalCount"
|
||||||
|
></el-pagination>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
module.exports = {
|
module.exports = {
|
||||||
props: {
|
props: {
|
||||||
group_id: {
|
group_id: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ""
|
default: ""
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
is_H10() {
|
|
||||||
return this.roleData.is_H10
|
|
||||||
},
|
|
||||||
is_A06() {
|
|
||||||
return this.roleData.is_A06
|
|
||||||
},
|
|
||||||
is_H04() {
|
|
||||||
return this.roleData.is_H04
|
|
||||||
},
|
|
||||||
is_H02() {
|
|
||||||
return this.roleData.is_H02
|
|
||||||
},
|
|
||||||
is_H03() {
|
|
||||||
return this.roleData.is_H03
|
|
||||||
},
|
|
||||||
is_sysadmin() {
|
|
||||||
return this.roleData.is_sysadmin
|
|
||||||
},
|
|
||||||
unionid() {
|
|
||||||
return this.roleData.unionid
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
activityGroupList: [],
|
|
||||||
ActivityUnions: [],
|
|
||||||
ActivityUnits: [],
|
|
||||||
unions: [],
|
|
||||||
units: [],
|
|
||||||
pageForm: {
|
|
||||||
unionId: "",
|
|
||||||
unitId: "",
|
|
||||||
searchName: "username",
|
|
||||||
personTypes: [],
|
|
||||||
userStates: [],
|
|
||||||
memberStatus: [],
|
|
||||||
year: moment().format("YYYY")
|
|
||||||
},
|
|
||||||
tableColumns: [
|
|
||||||
{ prop: "loginName", label: "工号" },
|
|
||||||
{ prop: "userName", label: "姓名" },
|
|
||||||
{ prop: "sex", label: "性别", sortable: true },
|
|
||||||
{ prop: "birthday", label: "出生年月" },
|
|
||||||
{ prop: "mobile", label: "联系电话" },
|
|
||||||
{ prop: "personType", label: "人员类型", sortable: true },
|
|
||||||
{ prop: "userState", label: "在职状态", sortable: true },
|
|
||||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
|
||||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
|
||||||
{ prop: "groupName", label: "所属分组", sortable: true }
|
|
||||||
],
|
|
||||||
roleData: {},
|
|
||||||
currentGroupName: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mixins: [initTableMixins],
|
|
||||||
components: {},
|
|
||||||
methods: {
|
|
||||||
viewGroupName() {
|
|
||||||
if (this.pageForm?.groupId) {
|
|
||||||
const group = this.activityGroupList.find((v) => v.groupId === this.pageForm.groupId)
|
|
||||||
this.currentGroupName = group.groupName + "人员"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.currentGroupName = "全部人员"
|
|
||||||
},
|
|
||||||
doExportUser() {
|
|
||||||
window.open("/platform/activity/basic/user/doExportUser?groupId=" + this.pageForm.groupId)
|
|
||||||
},
|
|
||||||
doSearch2() {
|
|
||||||
this.getActivityGroup()
|
|
||||||
this.doSearch()
|
|
||||||
},
|
|
||||||
async doDelete(id, groupId) {
|
|
||||||
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
if (confirm === "confirm") {
|
|
||||||
let pageForm = clone(this.pageForm)
|
|
||||||
pageForm.id = id
|
|
||||||
const resp = await $.post("/platform/activity/basic/user/doDelete", pageForm)
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
await this.getActivityGroup(this.pageForm.groupId)
|
|
||||||
this.$emit("group_change")
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async flushUnits() {
|
|
||||||
this.$set(this.pageForm, "unitId", "")
|
|
||||||
if (this.is_A06 || this.is_sysadmin) {
|
|
||||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
|
||||||
// this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
|
||||||
} else {
|
|
||||||
this.units = await this.$businessTool.listUnit(this.unionid)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async getActivityGroup(id) {
|
|
||||||
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
|
||||||
this.activityGroupList = resp.data
|
|
||||||
if (resp.data && resp.data.length > 0) {
|
|
||||||
if (id) {
|
|
||||||
if (this.activityGroupList.some((v) => v.groupId === id)) {
|
|
||||||
this.$set(this.pageForm, "groupId", id)
|
|
||||||
} else {
|
|
||||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await this.doSearch()
|
|
||||||
},
|
|
||||||
async getRolesAndUnion() {
|
|
||||||
const { data } = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
|
||||||
this.roleData = data
|
|
||||||
},
|
|
||||||
async pageData() {
|
|
||||||
const resp = await $.post("/platform/activity/basic/user/pageData", this.pageForm)
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.tableData = resp.data.list
|
|
||||||
this.pageForm.totalCount = resp.data.totalCount
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async created() {
|
|
||||||
this.unions = await this.$businessTool.listUnion()
|
|
||||||
// this.ActivityUnions = await getActivityUnions()
|
|
||||||
await this.flushUnits()
|
|
||||||
await this.getActivityGroup()
|
|
||||||
await this.getRolesAndUnion()
|
|
||||||
this.viewGroupName()
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
is_H10() {
|
||||||
|
return this.roleData.is_H10
|
||||||
|
},
|
||||||
|
is_A06() {
|
||||||
|
return this.roleData.is_A06
|
||||||
|
},
|
||||||
|
is_H04() {
|
||||||
|
return this.roleData.is_H04
|
||||||
|
},
|
||||||
|
is_H02() {
|
||||||
|
return this.roleData.is_H02
|
||||||
|
},
|
||||||
|
is_H03() {
|
||||||
|
return this.roleData.is_H03
|
||||||
|
},
|
||||||
|
is_sysadmin() {
|
||||||
|
return this.roleData.is_sysadmin
|
||||||
|
},
|
||||||
|
unionid() {
|
||||||
|
return this.roleData.unionid
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activityGroupList: [],
|
||||||
|
ActivityUnions: [],
|
||||||
|
ActivityUnits: [],
|
||||||
|
unions: [],
|
||||||
|
units: [],
|
||||||
|
pageForm: {
|
||||||
|
unionId: "",
|
||||||
|
unitId: "",
|
||||||
|
searchName: "username",
|
||||||
|
personTypes: [],
|
||||||
|
userStates: [],
|
||||||
|
memberStatus: [],
|
||||||
|
year: moment().format("YYYY")
|
||||||
|
},
|
||||||
|
tableColumns: [
|
||||||
|
{prop: "loginName", label: "工号"},
|
||||||
|
{prop: "userName", label: "姓名"},
|
||||||
|
{prop: "sex", label: "性别", sortable: true},
|
||||||
|
{prop: "birthday", label: "出生年月"},
|
||||||
|
{prop: "mobile", label: "联系电话"},
|
||||||
|
{prop: "userState", label: "在职状态", sortable: true},
|
||||||
|
{prop: "preparedBy", label: "聘用方式", sortable: true},
|
||||||
|
{prop: "personType", label: "人员类型", sortable: true},
|
||||||
|
{prop: "unitName", label: "所属单位", sortable: true},
|
||||||
|
{prop: "unionName", label: "所属工会", sortable: true},
|
||||||
|
{prop: "groupName", label: "所属分组", sortable: true}
|
||||||
|
],
|
||||||
|
roleData: {},
|
||||||
|
currentGroupName: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mixins: [initTableMixins],
|
||||||
|
components: {},
|
||||||
|
methods: {
|
||||||
|
viewGroupName() {
|
||||||
|
if (this.pageForm?.groupId) {
|
||||||
|
const group = this.activityGroupList.find((v) => v.groupId === this.pageForm.groupId)
|
||||||
|
this.currentGroupName = group.groupName + "人员"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.currentGroupName = "全部人员"
|
||||||
|
},
|
||||||
|
doExportUser() {
|
||||||
|
window.open("/platform/activity/basic/user/doExportUser?groupId=" + this.pageForm.groupId)
|
||||||
|
},
|
||||||
|
doSearch2() {
|
||||||
|
this.getActivityGroup()
|
||||||
|
this.doSearch()
|
||||||
|
},
|
||||||
|
async doDelete(id, groupId) {
|
||||||
|
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
})
|
||||||
|
if (confirm === "confirm") {
|
||||||
|
let pageForm = clone(this.pageForm)
|
||||||
|
pageForm.id = id
|
||||||
|
const resp = await $.post("/platform/activity/basic/user/doDelete", pageForm)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
await this.getActivityGroup(this.pageForm.groupId)
|
||||||
|
this.$emit("group_change")
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async flushUnits() {
|
||||||
|
this.$set(this.pageForm, "unitId", "")
|
||||||
|
if (this.is_A06 || this.is_sysadmin) {
|
||||||
|
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||||
|
// this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||||
|
} else {
|
||||||
|
this.units = await this.$businessTool.listUnit(this.unionid)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getActivityGroup(id) {
|
||||||
|
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||||
|
this.activityGroupList = resp.data
|
||||||
|
if (resp.data && resp.data.length > 0) {
|
||||||
|
if (id) {
|
||||||
|
if (this.activityGroupList.some((v) => v.groupId === id)) {
|
||||||
|
this.$set(this.pageForm, "groupId", id)
|
||||||
|
} else {
|
||||||
|
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await this.doSearch()
|
||||||
|
},
|
||||||
|
async getRolesAndUnion() {
|
||||||
|
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||||
|
this.roleData = data
|
||||||
|
},
|
||||||
|
async pageData() {
|
||||||
|
const resp = await $.post("/platform/activity/basic/user/pageData", this.pageForm)
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.tableData = resp.data.list
|
||||||
|
this.pageForm.totalCount = resp.data.totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.unions = await this.$businessTool.listUnion()
|
||||||
|
// this.ActivityUnions = await getActivityUnions()
|
||||||
|
await this.flushUnits()
|
||||||
|
await this.getActivityGroup()
|
||||||
|
await this.getRolesAndUnion()
|
||||||
|
this.viewGroupName()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
<el-row class="query-row" v-if="is_A06 === true || is_sysadmin === true || is_H04 === true">
|
||||||
<el-col class="query-title">人员类型:</el-col>
|
<el-col class="query-title">编制类型:</el-col>
|
||||||
<el-col class="query-content">
|
<el-col class="query-content">
|
||||||
<el-tag
|
<el-tag
|
||||||
:effect="pageForm.personTypes.includes(item.name) ? 'dark' : 'plain'"
|
:effect="pageForm.personTypes.includes(item.name) ? 'dark' : 'plain'"
|
||||||
@@ -610,7 +610,7 @@ module.exports = {
|
|||||||
|
|
||||||
await this.flushUnits()
|
await this.flushUnits()
|
||||||
await this.getActivityGroup()
|
await this.getActivityGroup()
|
||||||
this.personTypeOptions = await this.$businessTool.getDictOptions("PERSON_TYPE")
|
this.personTypeOptions = await this.$businessTool.getDictOptions("USER_PREPARED_BY_TYPE")
|
||||||
this.userStateOptions = await this.$businessTool.getDictOptions("USER_STATE")
|
this.userStateOptions = await this.$businessTool.getDictOptions("USER_STATE")
|
||||||
await this.getRoleListByMenuId()
|
await this.getRoleListByMenuId()
|
||||||
await this.pageData()
|
await this.pageData()
|
||||||
|
|||||||
Reference in New Issue
Block a user