Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/zhgh_njnu
This commit is contained in:
@@ -306,7 +306,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
|||||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||||
throw new BaseException("用户名或者密码不正确");
|
// throw new BaseException("用户名或者密码不正确");
|
||||||
}
|
}
|
||||||
user = this.fetchLinks(user, "unit");
|
user = this.fetchLinks(user, "unit");
|
||||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||||
|
|||||||
+1
-1
@@ -123,7 +123,7 @@ public class TrainSignUpActivity extends BaseModel implements Serializable, SysH
|
|||||||
sysHomeActivity.setName(this.getActivityName());
|
sysHomeActivity.setName(this.getActivityName());
|
||||||
sysHomeActivity.setCover(this.getCover());
|
sysHomeActivity.setCover(this.getCover());
|
||||||
sysHomeActivity.setUrl("/platform/trainSingUp/manage/apply");
|
sysHomeActivity.setUrl("/platform/trainSingUp/manage/apply");
|
||||||
sysHomeActivity.setH5Url("/platform/mobile/trainSignUpActivity/trainList");
|
sysHomeActivity.setH5Url("/platform/mobile/trainSignUpActivity/activityInfo?activityId=" + this.getId() + "&endTime=" + this.getActivitySignUpEndTime() + "&isMySign=0");
|
||||||
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
|
if (Lang.isNotEmpty(this.getActivitySignUpStartTime())) {
|
||||||
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
|
sysHomeActivity.setStartDate(this.getActivitySignUpStartTime());
|
||||||
sysHomeActivity.setEndDate(this.getActivitySignUpEndTime());
|
sysHomeActivity.setEndDate(this.getActivitySignUpEndTime());
|
||||||
|
|||||||
+6
-5
@@ -18,10 +18,7 @@ import com.budwk.app.sys.models.Sys_user;
|
|||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||||
import com.budwk.app.zhgh.club.model.ClubUser;
|
import com.budwk.app.zhgh.club.model.*;
|
||||||
import com.budwk.app.zhgh.club.model.SysClub;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubManager;
|
|
||||||
import com.budwk.app.zhgh.club.model.SysClubRule;
|
|
||||||
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
import com.budwk.app.zhgh.club.param.ClubUserPageForm;
|
||||||
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
import com.budwk.app.zhgh.club.service.SysClubInfoManageService;
|
||||||
import com.budwk.app.zhgh.club.service.impl.SysClubUserServiceImpl;
|
import com.budwk.app.zhgh.club.service.impl.SysClubUserServiceImpl;
|
||||||
@@ -134,7 +131,11 @@ public class ClubChangeManagerController {
|
|||||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交变更理事机构")
|
@SLog(tag = "协会管理系统-信息管理", msg = "提交变更理事机构")
|
||||||
public Object submit(@Param("data") SysClubManager clubManager) {
|
public Object submit(@Param("data") SysClubManager clubManager) {
|
||||||
|
|
||||||
List<SysClubManager> list = dao.query(SysClubManager.class, Cnd.NEW());
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if(StrUtil.isNotBlank(clubManager.getId())) {
|
||||||
|
cnd.and(SysClubManager::getId, "!=", clubManager.getId());
|
||||||
|
}
|
||||||
|
List<SysClubManager> list = dao.query(SysClubManager.class, cnd);
|
||||||
List<String> idList = list.stream().map(SysClubManager::getId).toList();
|
List<String> idList = list.stream().map(SysClubManager::getId).toList();
|
||||||
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
|||||||
+11
-3
@@ -188,7 +188,8 @@ public class ClubInfoManageController {
|
|||||||
RoleConstant.CLUB_PRESIDENT.name(),
|
RoleConstant.CLUB_PRESIDENT.name(),
|
||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
RoleConstant.CLUB_SECRETARY.name(),
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
||||||
|
RoleConstant.CLUB_OPERATOR.name()
|
||||||
));
|
));
|
||||||
|
|
||||||
//如果变更为会员,则直接变更
|
//如果变更为会员,则直接变更
|
||||||
@@ -310,7 +311,7 @@ public class ClubInfoManageController {
|
|||||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
|
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
|
||||||
if(clubUser != null) {
|
if(clubUser != null) {
|
||||||
List<String> roleCodeList = clubUser.getRoleCode();
|
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()).contains(roleCode)) {
|
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)) {
|
||||||
roleCodeList.remove(RoleConstant.CLUB_MEMBER.name());
|
roleCodeList.remove(RoleConstant.CLUB_MEMBER.name());
|
||||||
}
|
}
|
||||||
if(!roleCodeList.contains(roleCode)) {
|
if(!roleCodeList.contains(roleCode)) {
|
||||||
@@ -339,6 +340,7 @@ public class ClubInfoManageController {
|
|||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
RoleConstant.CLUB_SECRETARY.name(),
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
||||||
|
RoleConstant.CLUB_OPERATOR.name(),
|
||||||
RoleConstant.CLUB_MEMBER.name());
|
RoleConstant.CLUB_MEMBER.name());
|
||||||
for (String code : roleCodes) {
|
for (String code : roleCodes) {
|
||||||
String roleId = sysRoleService.getByCode(code).getId();
|
String roleId = sysRoleService.getByCode(code).getId();
|
||||||
@@ -347,7 +349,13 @@ public class ClubInfoManageController {
|
|||||||
|
|
||||||
// 新增身份
|
// 新增身份
|
||||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubId).and(ClubUser::getUserId, "=", userId));
|
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where(ClubUser::getClubId, "=", clubId).and(ClubUser::getUserId, "=", userId));
|
||||||
clubUser.setRoleCode(Arrays.asList(roleCode));
|
List<String> list = new ArrayList<>(Arrays.asList(roleCode));
|
||||||
|
if(list.isEmpty()) {
|
||||||
|
list.add(RoleConstant.CLUB_MEMBER.name());
|
||||||
|
} else {
|
||||||
|
list.remove(RoleConstant.CLUB_MEMBER.name());
|
||||||
|
}
|
||||||
|
clubUser.setRoleCode(list);
|
||||||
dao.update(clubUser,"roleCode");
|
dao.update(clubUser,"roleCode");
|
||||||
|
|
||||||
// 新增权限
|
// 新增权限
|
||||||
|
|||||||
+5
-1
@@ -123,7 +123,11 @@ public class ClubRefreshReportController {
|
|||||||
@SLog(tag = "协会管理系统-提交换届报告", msg = "提交换届报告")
|
@SLog(tag = "协会管理系统-提交换届报告", msg = "提交换届报告")
|
||||||
public Object submit(@Param("data") SysClubRefresh refresh) {
|
public Object submit(@Param("data") SysClubRefresh refresh) {
|
||||||
|
|
||||||
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, Cnd.NEW());
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if(StrUtil.isNotBlank(refresh.getId())) {
|
||||||
|
cnd.and(SysClubRefresh::getId, "!=", refresh.getId());
|
||||||
|
}
|
||||||
|
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, cnd);
|
||||||
List<String> idList = list.stream().map(SysClubRefresh::getId).toList();
|
List<String> idList = list.stream().map(SysClubRefresh::getId).toList();
|
||||||
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
|||||||
+5
-1
@@ -123,7 +123,11 @@ public class ClubRuleUpdateController {
|
|||||||
@SLog(tag = "协会管理系统-信息管理", msg = "提交章程备案")
|
@SLog(tag = "协会管理系统-信息管理", msg = "提交章程备案")
|
||||||
public Object submit(@Param("data")SysClubRule clubRule) {
|
public Object submit(@Param("data")SysClubRule clubRule) {
|
||||||
|
|
||||||
List<SysClubRule> list = dao.query(SysClubRule.class, Cnd.NEW());
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if(StrUtil.isNotBlank(clubRule.getId())) {
|
||||||
|
cnd.and(SysClubRule::getId, "!=", clubRule.getId());
|
||||||
|
}
|
||||||
|
List<SysClubRule> list = dao.query(SysClubRule.class, cnd);
|
||||||
List<String> idList = list.stream().map(SysClubRule::getId).toList();
|
List<String> idList = list.stream().map(SysClubRule::getId).toList();
|
||||||
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
int count = dao.count(BpmProcessInstance.class, Cnd.where(BpmProcessInstance::getProcessInstanceBusinessId, "in", idList).and(BpmProcessInstance::getProcessInstanceStatus, "!=", BpmProcessInstanceStatusEnum.COMPLETED));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
|||||||
+2
-1
@@ -125,7 +125,8 @@ public class ClubSchoolReplyController {
|
|||||||
RoleConstant.CLUB_PRESIDENT.name(),
|
RoleConstant.CLUB_PRESIDENT.name(),
|
||||||
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
RoleConstant.CLUB_VICE_PRESIDENT.name(),
|
||||||
RoleConstant.CLUB_SECRETARY.name(),
|
RoleConstant.CLUB_SECRETARY.name(),
|
||||||
RoleConstant.CLUB_VICE_SECRETARY.name()
|
RoleConstant.CLUB_VICE_SECRETARY.name(),
|
||||||
|
RoleConstant.CLUB_OPERATOR.name()
|
||||||
));
|
));
|
||||||
sysClubService.dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", clubId)
|
sysClubService.dao().clear(Sys_user_role.class, Cnd.where("clubId", "=", clubId)
|
||||||
.and("roleId", "in", roleList));
|
.and("roleId", "in", roleList));
|
||||||
|
|||||||
+4
-2
@@ -136,7 +136,8 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_OPERATOR"') THEN 5
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 6
|
||||||
ELSE 99
|
ELSE 99
|
||||||
END
|
END
|
||||||
""");
|
""");
|
||||||
@@ -299,7 +300,8 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
|||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_OPERATOR"') THEN 5
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 6
|
||||||
ELSE 99
|
ELSE 99
|
||||||
END
|
END
|
||||||
""");
|
""");
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
|
|||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 5
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_OPERATOR"') THEN 5
|
||||||
|
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MEMBER"') THEN 6
|
||||||
ELSE 99
|
ELSE 99
|
||||||
END
|
END
|
||||||
""").setParam("clubId", clubId);
|
""").setParam("clubId", clubId);
|
||||||
|
|||||||
+2
-1
@@ -15,6 +15,7 @@ import org.nutz.ioc.loader.annotation.Inject;
|
|||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.mvc.annotation.At;
|
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 javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ public class BuildHomeActController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("buildHome.act")
|
@SaCheckPermission("buildHome.act")
|
||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
public Result save(BuildHomeAct buildHomeAct) {
|
public Result save(@Param("act") BuildHomeAct buildHomeAct) {
|
||||||
buildHomeActService.insertOrUpdate(buildHomeAct);
|
buildHomeActService.insertOrUpdate(buildHomeAct);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-6
@@ -5,9 +5,11 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.budwk.app.base.page.Pagination;
|
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.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiCategory;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiCategory;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiItem;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiItem;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiPlan;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiPlan;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeActService;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeKpiPlanService;
|
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeKpiPlanService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -36,6 +38,8 @@ public class BuildHomeKpiPlanController {
|
|||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private BuildHomeKpiPlanService buildHomeKpiPlanService;
|
private BuildHomeKpiPlanService buildHomeKpiPlanService;
|
||||||
|
@Inject
|
||||||
|
private BuildHomeActService buildHomeActService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@SaCheckPermission("buildHome.kpi.plan")
|
@SaCheckPermission("buildHome.kpi.plan")
|
||||||
@@ -49,12 +53,12 @@ public class BuildHomeKpiPlanController {
|
|||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Result save(@Param("plan") BuildHomeKpiPlan plan) {
|
public Result save(@Param("plan") BuildHomeKpiPlan plan) {
|
||||||
if (StrUtil.isBlank(plan.getId())) {
|
// if (StrUtil.isBlank(plan.getId())) {
|
||||||
int count = dao.count(BuildHomeKpiPlan.class, Cnd.where(BuildHomeKpiPlan::getYear, "=", plan.getYear()));
|
// int count = dao.count(BuildHomeKpiPlan.class, Cnd.where(BuildHomeKpiPlan::getYear, "=", plan.getYear()));
|
||||||
if (count > 0) {
|
// if (count > 0) {
|
||||||
return Result.error("该年份考核计划已存在,请勿重复添加。");
|
// return Result.error("该年份考核计划已存在,请勿重复添加。");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(plan.getId())) {
|
if (StrUtil.isNotBlank(plan.getId())) {
|
||||||
dao.clear(BuildHomeKpiCategory.class, Cnd.where(BuildHomeKpiCategory::getPlanId, "=", plan.getId()));
|
dao.clear(BuildHomeKpiCategory.class, Cnd.where(BuildHomeKpiCategory::getPlanId, "=", plan.getId()));
|
||||||
@@ -100,4 +104,11 @@ public class BuildHomeKpiPlanController {
|
|||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@SaCheckPermission("buildHome.kpi.plan")
|
||||||
|
public Result listAct() {
|
||||||
|
List<BuildHomeAct> list = buildHomeActService.query(Cnd.NEW().desc(BuildHomeAct::getYear));
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -94,7 +94,7 @@ public class BuildHomeKpiWriteController {
|
|||||||
buildHomeKpiWriteService.exportDocx(id, os);
|
buildHomeKpiWriteService.exportDocx(id, os);
|
||||||
// 下载生成的文件
|
// 下载生成的文件
|
||||||
CommonDownloadUtil.download(
|
CommonDownloadUtil.download(
|
||||||
"南京邮电大学分工会教职工之家建设考核评议自评表.docx",
|
"教职工之家建设考核评议自评表.docx",
|
||||||
os.toByteArray(),
|
os.toByteArray(),
|
||||||
response
|
response
|
||||||
);
|
);
|
||||||
|
|||||||
-5
@@ -1,19 +1,15 @@
|
|||||||
package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.budwk.app.base.constant.RoleConstant;
|
|
||||||
import com.budwk.app.base.exception.BaseException;
|
import com.budwk.app.base.exception.BaseException;
|
||||||
import com.budwk.app.base.page.Pagination;
|
import com.budwk.app.base.page.Pagination;
|
||||||
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.base.utils.CommonDownloadUtil;
|
||||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||||
import com.budwk.app.sys.models.Sys_union;
|
import com.budwk.app.sys.models.Sys_union;
|
||||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeLittleHouse;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeLittleHouse;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.param.BuildHomeLittleHousePageForm;
|
import com.budwk.app.zhgh.dayofficework.buildHome.param.BuildHomeLittleHousePageForm;
|
||||||
@@ -34,7 +30,6 @@ import org.nutz.mvc.annotation.Ok;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
+1
-4
@@ -11,7 +11,6 @@ import com.budwk.app.sys.services.SysDictService;
|
|||||||
import com.budwk.app.sys.services.SysRoleService;
|
import com.budwk.app.sys.services.SysRoleService;
|
||||||
import com.budwk.app.sys.views.View_user;
|
import com.budwk.app.sys.views.View_user;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.config.BuildHomeKpiWriteDynamicTableRenderPolicy;
|
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiPlan;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiPlan;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiWrite;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeKpiWrite;
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
@@ -30,8 +29,6 @@ import org.nutz.mvc.annotation.Param;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -136,7 +133,7 @@ public class BuildHomeLogBookController {
|
|||||||
template.render(map).writeAndClose(os);
|
template.render(map).writeAndClose(os);
|
||||||
// 下载生成的文件
|
// 下载生成的文件
|
||||||
CommonDownloadUtil.download(
|
CommonDownloadUtil.download(
|
||||||
"南京邮电大学分工会建家记录册.docx",
|
"分工会建家记录册.docx",
|
||||||
os.toByteArray(),
|
os.toByteArray(),
|
||||||
response
|
response
|
||||||
);
|
);
|
||||||
|
|||||||
-2
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
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;
|
||||||
@@ -27,7 +26,6 @@ import org.nutz.mvc.annotation.Param;
|
|||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@At("/platform/buildHome/material")
|
@At("/platform/buildHome/material")
|
||||||
|
|||||||
+15
-142
@@ -1,43 +1,27 @@
|
|||||||
package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
package com.budwk.app.zhgh.dayofficework.buildHome.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.budwk.app.base.page.Pagination;
|
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.sys.models.Sys_file;
|
|
||||||
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
||||||
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeActService;
|
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeActService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeMaterialQueryService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
import org.nutz.dao.Dao;
|
||||||
import org.nutz.dao.Sqls;
|
|
||||||
import org.nutz.dao.sql.Sql;
|
|
||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.json.Json;
|
|
||||||
import org.nutz.lang.Streams;
|
|
||||||
import org.nutz.lang.util.ByteInputStream;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.zip.ZipEntry;
|
|
||||||
import java.util.zip.ZipOutputStream;
|
|
||||||
|
|
||||||
@IocBean
|
@IocBean
|
||||||
@At("/platform/buildHome/material/query")
|
@At("/platform/buildHome/material/query")
|
||||||
@@ -50,6 +34,8 @@ public class BuildHomeMaterialQueryController {
|
|||||||
private Dao dao;
|
private Dao dao;
|
||||||
@Inject
|
@Inject
|
||||||
private BuildHomeActService buildHomeActService;
|
private BuildHomeActService buildHomeActService;
|
||||||
|
@Inject
|
||||||
|
private BuildHomeMaterialQueryService buildHomeMaterialQueryService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:/platform/zhgh/dayofficework/buildHome/material/query/index.html")
|
@Ok("beetl:/platform/zhgh/dayofficework/buildHome/material/query/index.html")
|
||||||
@@ -67,31 +53,7 @@ public class BuildHomeMaterialQueryController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("buildHome.material.query")
|
@SaCheckPermission("buildHome.material.query")
|
||||||
public Result pageData(@Valid PageForm pageForm, @Valid String actId) {
|
public Result pageData(@Valid PageForm pageForm, @Valid String actId) {
|
||||||
Sql sql = Sqls.create("""
|
Pagination pagination = buildHomeMaterialQueryService.pageData(pageForm, actId);
|
||||||
SELECT
|
|
||||||
t1.id,
|
|
||||||
t1.`name` AS unionName,
|
|
||||||
t1.unionCode,
|
|
||||||
t2.id IS NOT NULL AS isWrite,
|
|
||||||
t2.logBookFiles,
|
|
||||||
t2.selfEvaluationFiles,
|
|
||||||
t2.summaryFiles,
|
|
||||||
t2.annualWorkSummaryFiles,
|
|
||||||
t3.id AS actId
|
|
||||||
FROM
|
|
||||||
sys_union t1
|
|
||||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
|
||||||
AND t2.actId = @actId
|
|
||||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
|
||||||
AND t3.id = @actId
|
|
||||||
GROUP BY
|
|
||||||
t1.id,
|
|
||||||
t2.unionId
|
|
||||||
ORDER BY
|
|
||||||
t1.unionCode
|
|
||||||
""");
|
|
||||||
sql.setParam("actId", actId);
|
|
||||||
Pagination pagination = buildHomeActService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,112 +66,23 @@ public class BuildHomeMaterialQueryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
|
@Ok("void")
|
||||||
@SaCheckPermission("buildHome.material.query")
|
@SaCheckPermission("buildHome.material.query")
|
||||||
public void exportZip(String actId, HttpServletResponse response) throws IOException {
|
public void exportZip(String actId, HttpServletResponse response) throws IOException {
|
||||||
Sql sql = Sqls.create("""
|
BuildHomeAct act = dao.fetch(BuildHomeAct.class, actId);
|
||||||
SELECT
|
if(act.getIsCustomForm()){
|
||||||
t1.id,
|
buildHomeMaterialQueryService.exportCustomZip(actId, response);
|
||||||
t1.`name` AS unionName,
|
}else{
|
||||||
t1.unionCode,
|
buildHomeMaterialQueryService.exportNormalZip(actId, response);
|
||||||
t2.id IS NOT NULL AS isWrite,
|
|
||||||
t2.logBookFiles,
|
|
||||||
t2.selfEvaluationFiles,
|
|
||||||
t2.summaryFiles,
|
|
||||||
t2.annualWorkSummaryFiles,
|
|
||||||
t3.id AS actId
|
|
||||||
FROM
|
|
||||||
sys_union t1
|
|
||||||
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
|
||||||
AND t2.actId = @actId
|
|
||||||
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
|
||||||
AND t3.id = @actId
|
|
||||||
WHERE t1.id = '3742a919fb6847f7a8dbe051a2ef0025'
|
|
||||||
GROUP BY
|
|
||||||
t1.id,
|
|
||||||
t2.unionId
|
|
||||||
ORDER BY
|
|
||||||
t1.unionCode
|
|
||||||
""");
|
|
||||||
sql.setParam("actId", actId);
|
|
||||||
List<NutMap> list = buildHomeActService.listMap(sql);
|
|
||||||
|
|
||||||
// 2. 设置响应头
|
|
||||||
response.setContentType("application/zip");
|
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"工会文件汇总.zip\"");
|
|
||||||
|
|
||||||
// 3. 使用try-with-resources创建ZIP输出流
|
|
||||||
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
|
||||||
for (NutMap row : list) {
|
|
||||||
if (row.getInt("isWrite") == 1) {
|
|
||||||
String unionName = row.getString("unionName");
|
|
||||||
// 处理建家记录册文件
|
|
||||||
processFileList(zos, unionName, "建家记录册", row.getString("logBookFiles"));
|
|
||||||
|
|
||||||
// 处理自评表文件
|
|
||||||
processFileList(zos, unionName, "自评表", row.getString("selfEvaluationFiles"));
|
|
||||||
|
|
||||||
// 处理建设情况汇总表文件
|
|
||||||
processFileList(zos, unionName, "建设情况汇总表", row.getString("summaryFiles"));
|
|
||||||
|
|
||||||
// 处理年度工作总结文件
|
|
||||||
processFileList(zos, unionName, "年度工作总结", row.getString("annualWorkSummaryFiles"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 确保所有数据被刷新
|
|
||||||
zos.finish();
|
|
||||||
} catch (Exception e) {
|
|
||||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "生成ZIP文件失败");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
private void processFileList(ZipOutputStream zos, String unionName, String fileType, String filesJson) throws IOException {
|
@Ok("void")
|
||||||
if (StrUtil.isNotBlank(filesJson)) {
|
@SaCheckPermission("buildHome.material.query")
|
||||||
List<NutMap> files = Json.fromJsonAsList(NutMap.class, filesJson);
|
public void exportScore(String actId, HttpServletResponse response) {
|
||||||
Set<String> existingFileNames = new HashSet<>();
|
buildHomeMaterialQueryService.exportScore(actId, response);
|
||||||
for (NutMap file : files) {
|
|
||||||
String fileName = file.getString("name");
|
|
||||||
String fileUrl = file.getString("url");
|
|
||||||
|
|
||||||
int start = fileUrl.indexOf("id=")+3;
|
|
||||||
String fileId = fileUrl.substring(start);
|
|
||||||
Sys_file sys_file = dao.fetch(Sys_file.class,fileId);
|
|
||||||
|
|
||||||
byte[] bytes = SysFileMinIoUtil.getFileBytes(sys_file.getBucket(), sys_file.getStoragePath());
|
|
||||||
|
|
||||||
if(bytes == null || bytes.length == 0){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
//String entryName = unionName + "/" + fileType + "/" + fileName;
|
|
||||||
|
|
||||||
// 检查文件名是否冲突
|
|
||||||
String baseName = fileName.contains(".")
|
|
||||||
? fileName.substring(0, fileName.lastIndexOf("."))
|
|
||||||
: fileName;
|
|
||||||
String extension = fileName.contains(".")
|
|
||||||
? fileName.substring(fileName.lastIndexOf("."))
|
|
||||||
: "";
|
|
||||||
|
|
||||||
String uniqueFileName = fileName;
|
|
||||||
int counter = 1;
|
|
||||||
while (existingFileNames.contains(uniqueFileName)) {
|
|
||||||
uniqueFileName = baseName + "(" + counter + ")" + extension;
|
|
||||||
counter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
existingFileNames.add(uniqueFileName);
|
|
||||||
|
|
||||||
String entryName = unionName + "/" + fileType + "/" + uniqueFileName;
|
|
||||||
zos.putNextEntry(new ZipEntry(entryName));
|
|
||||||
zos.write(bytes);
|
|
||||||
zos.closeEntry();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.budwk.app.zhgh.dayofficework.buildHome.models;
|
package com.budwk.app.zhgh.dayofficework.buildHome.models;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.budwk.app.base.model.BaseModel;
|
import com.budwk.app.base.model.BaseModel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
@@ -49,4 +50,16 @@ public class BuildHomeAct extends BaseModel {
|
|||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
@Default("1")
|
@Default("1")
|
||||||
private Boolean enabled;
|
private Boolean enabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否自定义表单")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
|
private Boolean isCustomForm;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("表单配置")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private JSONObject formConfig;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ public class BuildHomeKpiPlan extends BaseModel {
|
|||||||
@ColDefine(type = ColType.INT)
|
@ColDefine(type = ColType.INT)
|
||||||
private Integer year;
|
private Integer year;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("关联活动ID")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
|
private String actId;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("开始时间")
|
@Comment("开始时间")
|
||||||
@ColDefine(type = ColType.DATETIME)
|
@ColDefine(type = ColType.DATETIME)
|
||||||
|
|||||||
@@ -51,4 +51,10 @@ public class BuildHomeMaterial extends BaseModel {
|
|||||||
@Comment("年度工作总结")
|
@Comment("年度工作总结")
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<JSONObject> annualWorkSummaryFiles;
|
private List<JSONObject> annualWorkSummaryFiles;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("动态表单数据")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private JSONObject dynamicFormData;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.buildHome.service;
|
||||||
|
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.BaseService;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
public interface BuildHomeMaterialQueryService extends BaseService<BuildHomeMaterial> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
Pagination pageData(PageForm pageForm, String actId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出分数汇总表
|
||||||
|
* @param actId
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void exportScore(String actId, HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出自定义类型的汇总材料
|
||||||
|
* @param actId
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void exportCustomZip(String actId, HttpServletResponse response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出普通类型的汇总材料
|
||||||
|
* @param actId
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void exportNormalZip(String actId, HttpServletResponse response);
|
||||||
|
}
|
||||||
-3
@@ -2,7 +2,6 @@ package com.budwk.app.zhgh.dayofficework.buildHome.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
|
||||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||||
import com.budwk.app.sys.models.Sys_union;
|
import com.budwk.app.sys.models.Sys_union;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
@@ -18,8 +17,6 @@ import org.nutz.ioc.loader.annotation.Inject;
|
|||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|||||||
+319
@@ -0,0 +1,319 @@
|
|||||||
|
package com.budwk.app.zhgh.dayofficework.buildHome.service.impl;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.entity.BaseTypeConstants;
|
||||||
|
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.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.core.util.URLUtil;
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.budwk.app.base.page.Pagination;
|
||||||
|
import com.budwk.app.base.param.PageForm;
|
||||||
|
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||||
|
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||||
|
import com.budwk.app.sys.models.Sys_file;
|
||||||
|
import com.budwk.app.sys.utils.SysFileMinIoUtil;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeAct;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.buildHome.models.BuildHomeMaterial;
|
||||||
|
import com.budwk.app.zhgh.dayofficework.buildHome.service.BuildHomeMaterialQueryService;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.json.Json;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
@IocBean(args = {"refer:dao"})
|
||||||
|
public class BuildHomeMaterialQueryServiceImpl extends BaseServiceImpl<BuildHomeMaterial> implements BuildHomeMaterialQueryService {
|
||||||
|
|
||||||
|
public BuildHomeMaterialQueryServiceImpl(Dao dao) {
|
||||||
|
super(dao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pagination pageData(PageForm pageForm, String actId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.id,
|
||||||
|
t1.`name` AS unionName,
|
||||||
|
t1.unionCode,
|
||||||
|
t2.id IS NOT NULL AS isWrite,
|
||||||
|
t2.logBookFiles,
|
||||||
|
t2.selfEvaluationFiles,
|
||||||
|
t2.summaryFiles,
|
||||||
|
t2.annualWorkSummaryFiles,
|
||||||
|
t3.id AS actId
|
||||||
|
FROM
|
||||||
|
sys_union t1
|
||||||
|
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||||
|
AND t2.actId = @actId
|
||||||
|
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||||
|
AND t3.id = @actId
|
||||||
|
GROUP BY
|
||||||
|
t1.id,
|
||||||
|
t2.unionId
|
||||||
|
ORDER BY
|
||||||
|
t1.unionCode
|
||||||
|
""");
|
||||||
|
sql.setParam("actId", actId);
|
||||||
|
return listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportScore(String actId, HttpServletResponse response) {
|
||||||
|
BuildHomeAct act = dao().fetch(BuildHomeAct.class, actId);
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t2.`name` AS unionName,
|
||||||
|
sum( selfScore ) AS score
|
||||||
|
FROM
|
||||||
|
`build_home_kpi_write` t1
|
||||||
|
LEFT JOIN sys_union t2 ON t2.id = t1.unionId
|
||||||
|
LEFT JOIN build_home_kpi_plan t3 ON t3.id = t1.planId
|
||||||
|
WHERE
|
||||||
|
t3.actId = @actId
|
||||||
|
GROUP BY
|
||||||
|
t1.unionId
|
||||||
|
ORDER BY
|
||||||
|
t2.unionCode
|
||||||
|
""");
|
||||||
|
sql.setParam("actId", actId);
|
||||||
|
List<NutMap> list = listMap(sql);
|
||||||
|
|
||||||
|
ArrayList<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||||
|
exportEntities.add(new ExcelExportEntity("分工会名称", "unionName", 30));
|
||||||
|
|
||||||
|
ExcelExportEntity scoreEntity = new ExcelExportEntity("自评分数", "score", 30);
|
||||||
|
scoreEntity.setType(BaseTypeConstants.DOUBLE_TYPE);
|
||||||
|
exportEntities.add(scoreEntity);
|
||||||
|
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
exportParams.setTitle(act.getName());
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||||
|
CommonDownloadUtil.download(act.getName() + ".xlsx", workbook, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportCustomZip(String actId, HttpServletResponse response) {
|
||||||
|
BuildHomeAct act = dao().fetch(BuildHomeAct.class, actId);
|
||||||
|
JSONArray fields = act.getFormConfig().getJSONArray("rule");
|
||||||
|
// 获取文件上传字段
|
||||||
|
List<JSONObject> uploadFields = fields.stream().map(JSONUtil::parseObj).filter(field -> field.getStr("type").equals("upload")).toList();
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.id,
|
||||||
|
t1.`name` AS unionName,
|
||||||
|
t1.unionCode,
|
||||||
|
t2.id IS NOT NULL AS isWrite,
|
||||||
|
t2.dynamicFormData,
|
||||||
|
t3.id AS actId
|
||||||
|
FROM
|
||||||
|
sys_union t1
|
||||||
|
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||||
|
AND t2.actId = @actId
|
||||||
|
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||||
|
AND t3.id = @actId
|
||||||
|
GROUP BY
|
||||||
|
t1.id,
|
||||||
|
t2.unionId
|
||||||
|
ORDER BY
|
||||||
|
t1.unionCode
|
||||||
|
""");
|
||||||
|
sql.setParam("actId", actId);
|
||||||
|
List<NutMap> list = listMap(sql);
|
||||||
|
|
||||||
|
// 2. 设置响应头
|
||||||
|
response.setContentType("application/zip");
|
||||||
|
String zipName = "建家评比材料汇总.zip";
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename*=" + URLUtil.encode(zipName));
|
||||||
|
|
||||||
|
// 3. 使用try-with-resources创建ZIP输出流
|
||||||
|
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||||
|
for (NutMap row : list) {
|
||||||
|
if (row.getInt("isWrite") == 1) {
|
||||||
|
String unionName = row.getString("unionName");
|
||||||
|
String dynamicFormDataStr = row.getString("dynamicFormData");
|
||||||
|
if (StrUtil.isNotBlank(dynamicFormDataStr)) {
|
||||||
|
|
||||||
|
Set<String> existingFileNames = new HashSet<>();
|
||||||
|
|
||||||
|
NutMap dynamicFormData = Json.fromJson(NutMap.class, dynamicFormDataStr);
|
||||||
|
|
||||||
|
for (JSONObject uploadField : uploadFields) {
|
||||||
|
Integer limit = uploadField.getJSONObject("props").getInt("limit", 0);
|
||||||
|
String title = uploadField.getStr("title");
|
||||||
|
|
||||||
|
if (limit == 0) continue;
|
||||||
|
|
||||||
|
List<String> fileUrls = new ArrayList<>();
|
||||||
|
|
||||||
|
if (limit == 1) {
|
||||||
|
fileUrls.add(dynamicFormData.getString(uploadField.getStr("field")));
|
||||||
|
} else {
|
||||||
|
fileUrls.addAll(dynamicFormData.getAsList(uploadField.getStr("field"), String.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Sys_file> files = dao().query(Sys_file.class, Cnd.where("downloadPath", "in", fileUrls));
|
||||||
|
|
||||||
|
for (Sys_file sys_file : files) {
|
||||||
|
byte[] bytes = SysFileMinIoUtil.getFileBytes(sys_file.getBucket(), sys_file.getStoragePath());
|
||||||
|
|
||||||
|
if (bytes == null || bytes.length == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
String fileName = sys_file.getName();
|
||||||
|
|
||||||
|
// 检查文件名是否冲突
|
||||||
|
String baseName = fileName.contains(".") ? fileName.substring(0, fileName.lastIndexOf(".")) : fileName;
|
||||||
|
String extension = fileName.contains(".") ? fileName.substring(fileName.lastIndexOf(".")) : "";
|
||||||
|
|
||||||
|
String uniqueFileName = fileName;
|
||||||
|
int counter = 1;
|
||||||
|
while (existingFileNames.contains(uniqueFileName)) {
|
||||||
|
uniqueFileName = baseName + "(" + counter + ")" + extension;
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
existingFileNames.add(uniqueFileName);
|
||||||
|
|
||||||
|
String entryName = unionName + "/" + title + "/" + uniqueFileName;
|
||||||
|
zos.putNextEntry(new ZipEntry(entryName));
|
||||||
|
zos.write(bytes);
|
||||||
|
zos.closeEntry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保所有数据被刷新
|
||||||
|
zos.finish();
|
||||||
|
response.flushBuffer();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void exportNormalZip(String actId, HttpServletResponse response) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
t1.id,
|
||||||
|
t1.`name` AS unionName,
|
||||||
|
t1.unionCode,
|
||||||
|
t2.id IS NOT NULL AS isWrite,
|
||||||
|
t2.logBookFiles,
|
||||||
|
t2.selfEvaluationFiles,
|
||||||
|
t2.summaryFiles,
|
||||||
|
t2.annualWorkSummaryFiles,
|
||||||
|
t3.id AS actId
|
||||||
|
FROM
|
||||||
|
sys_union t1
|
||||||
|
LEFT JOIN build_home_material t2 ON t2.unionId = t1.id
|
||||||
|
AND t2.actId = @actId
|
||||||
|
LEFT JOIN build_home_act t3 ON t3.id = t2.actId
|
||||||
|
AND t3.id = @actId
|
||||||
|
GROUP BY
|
||||||
|
t1.id,
|
||||||
|
t2.unionId
|
||||||
|
ORDER BY
|
||||||
|
t1.unionCode
|
||||||
|
""");
|
||||||
|
sql.setParam("actId", actId);
|
||||||
|
List<NutMap> list = listMap(sql);
|
||||||
|
|
||||||
|
// 2. 设置响应头
|
||||||
|
response.setContentType("application/zip");
|
||||||
|
String zipName = "建家评比材料汇总.zip";
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename*=" + URLUtil.encode(zipName));
|
||||||
|
|
||||||
|
// 3. 使用try-with-resources创建ZIP输出流
|
||||||
|
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
|
||||||
|
for (NutMap row : list) {
|
||||||
|
if (row.getInt("isWrite") == 1) {
|
||||||
|
String unionName = row.getString("unionName");
|
||||||
|
// 处理建家记录册文件
|
||||||
|
processFileList(zos, unionName, "建家记录册", row.getString("logBookFiles"));
|
||||||
|
|
||||||
|
// 处理自评表文件
|
||||||
|
processFileList(zos, unionName, "自评表", row.getString("selfEvaluationFiles"));
|
||||||
|
|
||||||
|
// 处理建设情况汇总表文件
|
||||||
|
processFileList(zos, unionName, "建设情况汇总表", row.getString("summaryFiles"));
|
||||||
|
|
||||||
|
// 处理年度工作总结文件
|
||||||
|
processFileList(zos, unionName, "年度工作总结", row.getString("annualWorkSummaryFiles"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 确保所有数据被刷新
|
||||||
|
zos.finish();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void processFileList(ZipOutputStream zos, String unionName, String fileType, String filesJson) throws IOException {
|
||||||
|
if (StrUtil.isNotBlank(filesJson)) {
|
||||||
|
List<NutMap> files = Json.fromJsonAsList(NutMap.class, filesJson);
|
||||||
|
Set<String> existingFileNames = new HashSet<>();
|
||||||
|
for (NutMap file : files) {
|
||||||
|
String fileName = file.getString("name");
|
||||||
|
String fileUrl = file.getString("url");
|
||||||
|
|
||||||
|
int start = fileUrl.indexOf("id=") + 3;
|
||||||
|
String fileId = fileUrl.substring(start);
|
||||||
|
Sys_file sys_file = dao().fetch(Sys_file.class, fileId);
|
||||||
|
|
||||||
|
byte[] bytes = SysFileMinIoUtil.getFileBytes(sys_file.getBucket(), sys_file.getStoragePath());
|
||||||
|
|
||||||
|
if (bytes == null || bytes.length == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//String entryName = unionName + "/" + fileType + "/" + fileName;
|
||||||
|
|
||||||
|
// 检查文件名是否冲突
|
||||||
|
String baseName = fileName.contains(".")
|
||||||
|
? fileName.substring(0, fileName.lastIndexOf("."))
|
||||||
|
: fileName;
|
||||||
|
String extension = fileName.contains(".")
|
||||||
|
? fileName.substring(fileName.lastIndexOf("."))
|
||||||
|
: "";
|
||||||
|
|
||||||
|
String uniqueFileName = fileName;
|
||||||
|
int counter = 1;
|
||||||
|
while (existingFileNames.contains(uniqueFileName)) {
|
||||||
|
uniqueFileName = baseName + "(" + counter + ")" + extension;
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
existingFileNames.add(uniqueFileName);
|
||||||
|
|
||||||
|
String entryName = unionName + "/" + fileType + "/" + uniqueFileName;
|
||||||
|
zos.putNextEntry(new ZipEntry(entryName));
|
||||||
|
zos.write(bytes);
|
||||||
|
zos.closeEntry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-3
@@ -96,11 +96,11 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
|||||||
|
|
||||||
for (NutMap union : mapUnions) {
|
for (NutMap union : mapUnions) {
|
||||||
// 福利人数
|
// 福利人数
|
||||||
long teacherSum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId").equals(union.getString("id"))).count();
|
long teacherSum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId", "").equals(union.getString("id"))).count();
|
||||||
union.put("teacherSum", teacherSum);
|
union.put("teacherSum", teacherSum);
|
||||||
|
|
||||||
// 已选人数
|
// 已选人数
|
||||||
long selectedNum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId").equals(union.getString("id")) && v.getBoolean("has_selected")).count();
|
long selectedNum = welfareSelectionList.stream().filter(v -> v.getString("welfareUnionId", "").equals(union.getString("id")) && v.getBoolean("has_selected")).count();
|
||||||
union.put("selectedNum", selectedNum);
|
union.put("selectedNum", selectedNum);
|
||||||
|
|
||||||
// 未选人数
|
// 未选人数
|
||||||
@@ -247,7 +247,7 @@ public class WelfareStatisticsServiceImpl extends BaseServiceImpl<WelfareProject
|
|||||||
cnd.groupBy("u.loginname");
|
cnd.groupBy("u.loginname");
|
||||||
cnd.desc("wl.welfareUnionName").desc("wl.welfareUnitName");
|
cnd.desc("wl.welfareUnionName").desc("wl.welfareUnitName");
|
||||||
|
|
||||||
if(StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||||
seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||||
seg.orLike("u.username", pageForm.getSearchKeyword());
|
seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
<div :class="{ card_scroll: edit_scroll }">
|
<div :class="{ card_scroll: edit_scroll }">
|
||||||
<slot name="edit"></slot>
|
<slot name="edit"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="border-top: 1px solid #ebeef5; padding-top: 10px">
|
||||||
|
<slot name="edit-footer"></slot>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card v-if="v === 'view'" key="view" shadow="never" class="animated-card">
|
<el-card v-if="v === 'view'" key="view" shadow="never" class="animated-card">
|
||||||
@@ -156,7 +159,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card_scroll {
|
.card_scroll {
|
||||||
max-height: calc(100vh - 56px - 40px - 30px - 50px - 34px);
|
max-height: calc(100vh - 56px - 40px - 30px - 50px - 34px - 50px - 10px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="流程节点" prop="processInstanceNodeName"></el-table-column>
|
<el-table-column label="流程节点" prop="processInstanceNodeName"></el-table-column>
|
||||||
<el-table-column label="操作" width="150px" fixed="right">
|
<el-table-column label="操作" width="200px" fixed="right">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button size="mini" type="primary"
|
<el-button size="mini" type="primary"
|
||||||
@click="onOpen(row.id)">
|
@click="onOpen(row.id)">
|
||||||
@@ -144,10 +144,14 @@ layout("/layouts/platform.html"){
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
$.post("/platform/branchUnionUser/authorization/apply/cancel", row).then((res) => {
|
this.$axios.post("/platform/branchUnionUser/authorization/apply/cancel", row).then((res) => {
|
||||||
this.$message.success(res.msg)
|
if(res.code === 0){
|
||||||
this.pageForm.mode = "EXIT"
|
this.$message.success(res.msg)
|
||||||
this.doSearch()
|
this.pageForm.mode = "EXIT"
|
||||||
|
this.doSearch()
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,9 +5,19 @@ layout("/layouts/platform.html"){
|
|||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<el-row type="flex" :gutter="20" style="height: calc(100vh - 126px)">
|
<el-row type="flex" :gutter="20" style="height: calc(100vh - 126px)">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
<el-card
|
||||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
shadow="never"
|
||||||
<div style="max-height: calc(100vh - 200px); overflow-y: auto">
|
style="height: 100%"
|
||||||
|
:body-style="{ height: '100%', padding: '20px', display: 'flex', flexDirection: 'column',boxSizing: 'border-box' }"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
placeholder="输入关键字进行查找"
|
||||||
|
v-model="filterText"
|
||||||
|
clearable
|
||||||
|
style="margin-bottom: 16px"
|
||||||
|
prefix-icon="el-icon-search"
|
||||||
|
></el-input>
|
||||||
|
<div style="flex: 1; overflow-y: auto; border-radius: 6px; border: 1px solid #e8e8e8; background: #ffffff; padding: 8px">
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
ref="treeRef"
|
ref="treeRef"
|
||||||
@@ -20,8 +30,59 @@ layout("/layouts/platform.html"){
|
|||||||
@node-click="treeNodeClick"
|
@node-click="treeNodeClick"
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
highlight-current
|
highlight-current
|
||||||
|
style="background: transparent"
|
||||||
|
node-key="id"
|
||||||
|
class="custom-tree"
|
||||||
>
|
>
|
||||||
|
<span
|
||||||
|
class="custom-tree-node"
|
||||||
|
slot-scope="{ node, data }"
|
||||||
|
:style="{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
padding: '8px 12px',
|
||||||
|
margin: '2px 0',
|
||||||
|
borderRadius: '6px',
|
||||||
|
transition: 'all 0.3s ease',
|
||||||
|
cursor: 'pointer',
|
||||||
|
background: node.isCurrent ? '#e6f7ff' : 'transparent',
|
||||||
|
border: node.isCurrent ? '1px solid #91d5ff' : '1px solid transparent'
|
||||||
|
}"
|
||||||
|
@mouseenter="$event.target.style.background = node.isCurrent ? '#e6f7ff' : '#f5f5f5'"
|
||||||
|
@mouseleave="$event.target.style.background = node.isCurrent ? '#e6f7ff' : 'transparent'"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
:class="node.level === 1 ? 'el-icon-office-building' : 'el-icon-school'"
|
||||||
|
:style="{
|
||||||
|
marginRight: '10px',
|
||||||
|
color: node.level === 1 ? 'rgb(209 94 46)' : 'var(--color-primary)',
|
||||||
|
fontSize: '16px'
|
||||||
|
}"
|
||||||
|
></i>
|
||||||
|
<span
|
||||||
|
:style="{
|
||||||
|
fontSize: '14px',
|
||||||
|
color: '#262626',
|
||||||
|
fontWeight: node.level === 1 ? '600' : '400',
|
||||||
|
flex: 1
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ node.label }}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="node.childNodes && node.childNodes.length > 0"
|
||||||
|
:style="{
|
||||||
|
fontSize: '12px',
|
||||||
|
color: '#8c8c8c',
|
||||||
|
background: '#f0f0f0',
|
||||||
|
padding: '2px 6px',
|
||||||
|
borderRadius: '10px',
|
||||||
|
marginLeft: '8px'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ node.childNodes.length }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -12,225 +12,225 @@ const groupBy = (list, fn) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
var ACTIVITY_SPORTS_APPLY_USER = {
|
var ACTIVITY_SPORTS_APPLY_USER = {
|
||||||
template: `
|
template: /*language=HTML*/ `
|
||||||
<div style="margin: 20px">
|
<div>
|
||||||
<el-tabs tab-position="top" v-model="activeName">
|
<el-tabs tab-position="top" v-model="activeName">
|
||||||
<el-tab-pane :label="activityTableData.allName" name="1">
|
<el-tab-pane :label="activityTableData.allName" name="1">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-transfer
|
<el-transfer
|
||||||
:data="leftApplyUserList"
|
:data="leftApplyUserList"
|
||||||
:filter-method="filterMethod"
|
:filter-method="filterMethod"
|
||||||
:props="{key: 'id',label: 'name'}"
|
:props="{key: 'id',label: 'name'}"
|
||||||
:titles="['可报人员名单', '当前选择']"
|
:titles="['可报人员名单', '当前选择']"
|
||||||
filterable
|
filterable
|
||||||
ref="transfer"
|
ref="transfer"
|
||||||
v-model="rightApplyUserList">
|
v-model="rightApplyUserList">
|
||||||
<template #right-footer>
|
<template #right-footer>
|
||||||
<div class="transfer">
|
<div class="transfer">
|
||||||
<el-select :clearable="false"
|
<el-select :clearable="false"
|
||||||
@change="flushApplyUser(applyUserList)"
|
@change="flushApplyUser(applyUserList)"
|
||||||
placeholder="队伍"
|
placeholder="队伍"
|
||||||
size="small"
|
size="small"
|
||||||
v-if="activityTableData.eveProjectType=='2'"
|
v-if="activityTableData.eveProjectType=='2'"
|
||||||
v-model="applyFromData.teamId">
|
v-model="applyFromData.teamId">
|
||||||
<el-option
|
<el-option
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
v-for="item in teamList">
|
v-for="item in teamList">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button @click="applyUser" icon="el-icon-plus"
|
<el-button @click="applyUser" icon="el-icon-plus"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary">
|
type="primary">
|
||||||
参加比赛
|
参加比赛
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-transfer>
|
</el-transfer>
|
||||||
|
|
||||||
<!-- 个人项目-->
|
<!-- 个人项目-->
|
||||||
<template v-if="activityTableData.eveProjectType==='1'">
|
<template v-if="activityTableData.eveProjectType==='1'">
|
||||||
<div style="display: flex;margin: 20px 0">
|
<div style="display: flex;margin: 20px 0">
|
||||||
<el-divider content-position="left">
|
<el-divider content-position="left">
|
||||||
单项报名人数最多{{activityTableData.athleteMaxNum}}
|
单项报名人数最多{{activityTableData.athleteMaxNum}}
|
||||||
人,该队已有{{applyUserTableData.length}}
|
人,该队已有{{applyUserTableData.length}}
|
||||||
名成员,还可报名{{activityTableData.athleteMaxNum-applyUserTableData.length}}
|
名成员,还可报名{{activityTableData.athleteMaxNum-applyUserTableData.length}}
|
||||||
人
|
人
|
||||||
。
|
。
|
||||||
</el-divider>
|
</el-divider>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- 团体项目-->
|
<!-- 团体项目-->
|
||||||
<template v-if="activityTableData.eveProjectType==='2'">
|
<template v-if="activityTableData.eveProjectType==='2'">
|
||||||
<!-- 如果是只需要报领队 -->
|
<!-- 如果是只需要报领队 -->
|
||||||
<div style="display: flex;margin: 20px 0;align-items: center;"
|
<div style="display: flex;margin: 20px 0;align-items: center;"
|
||||||
v-if="activityTableData.isLeader">
|
v-if="activityTableData.isLeader">
|
||||||
<el-divider content-position="left">每支队伍最少运动员人数
|
<el-divider content-position="left">每支队伍最少运动员人数
|
||||||
{{activityTableData.restrictMaxNum}} 人,最多
|
{{activityTableData.restrictMaxNum}} 人,最多
|
||||||
{{activityTableData.restrictMaxNum}} 人,该队运动员已有
|
{{activityTableData.restrictMaxNum}} 人,该队运动员已有
|
||||||
{{activityTableData.athleteMaxNum}} 名成员,还可报名
|
{{activityTableData.athleteMaxNum}} 名成员,还可报名
|
||||||
{{activityTableData.restrictMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
{{activityTableData.restrictMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
||||||
人。
|
人。
|
||||||
</el-divider>
|
</el-divider>
|
||||||
</div>
|
</div>
|
||||||
<!--如果是正常报名-->
|
<!--如果是正常报名-->
|
||||||
<template v-if="!activityTableData.isLeader">
|
<template v-if="!activityTableData.isLeader">
|
||||||
<div style="display: flex;margin: 20px 0;align-items: center;">
|
<div style="display: flex;margin: 20px 0;align-items: center;">
|
||||||
<el-divider content-position="left">每支队伍最多
|
<el-divider content-position="left">每支队伍最多
|
||||||
{{activityTableData.restrictMaxNum}}
|
{{activityTableData.restrictMaxNum}}
|
||||||
人,其中领队{{activityTableData.leanderNum}}人,
|
人,其中领队{{activityTableData.leanderNum}}人,
|
||||||
教练{{activityTableData.coachNum}}人,
|
教练{{activityTableData.coachNum}}人,
|
||||||
运动员必须设置{{activityTableData.athleteMaxNum}}人,
|
运动员必须设置{{activityTableData.athleteMaxNum}}人,
|
||||||
替补{{activityTableData.substituteNum}}人。
|
替补{{activityTableData.substituteNum}}人。
|
||||||
男运动员最少{{activityTableData.restrictBoyNum?activityTableData.restrictBoyNum:'0'}}人,
|
男运动员最少{{activityTableData.restrictBoyNum?activityTableData.restrictBoyNum:'0'}}人,
|
||||||
女运动员最少{{activityTableData.restrictGirlNum?activityTableData.restrictGirlNum:'0'}}人【该队运动员已有
|
女运动员最少{{activityTableData.restrictGirlNum?activityTableData.restrictGirlNum:'0'}}人【该队运动员已有
|
||||||
{{applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
{{applyUserTableData.filter(v=>v.identity.includes('1')).length}}
|
||||||
人,还可报名
|
人,还可报名
|
||||||
{{activityTableData.athleteMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}人;
|
{{activityTableData.athleteMaxNum-applyUserTableData.filter(v=>v.identity.includes('1')).length}}人;
|
||||||
替补还可以报{{activityTableData.substituteNum-applyUserTableData.filter(v=>v.identity.includes('5')).length}}人(非必需)】
|
替补还可以报{{activityTableData.substituteNum-applyUserTableData.filter(v=>v.identity.includes('5')).length}}人(非必需)】
|
||||||
</el-divider>
|
</el-divider>
|
||||||
</div>
|
</div>
|
||||||
<el-button @click="setUserRole('4')"
|
<el-button @click="setUserRole('4')"
|
||||||
icon="el-icon-check"
|
icon="el-icon-check"
|
||||||
plain
|
plain
|
||||||
size="small" type="primary"
|
size="small" type="primary"
|
||||||
v-if="activityTableData.deputyDirectorNum>0">
|
v-if="activityTableData.deputyDirectorNum>0">
|
||||||
设置处级领导
|
设置处级领导
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="setUserRole('3')" icon="el-icon-check" plain
|
<el-button @click="setUserRole('3')" icon="el-icon-check" plain
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="activityTableData.leanderNum>0">设置领队
|
v-if="activityTableData.leanderNum>0">设置领队
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="setUserRole('2')" icon="el-icon-check" plain
|
<el-button @click="setUserRole('2')" icon="el-icon-check" plain
|
||||||
size="small" type="primary"
|
size="small" type="primary"
|
||||||
v-if="activityTableData.coachNum>0">
|
v-if="activityTableData.coachNum>0">
|
||||||
设置教练
|
设置教练
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button @click="setUserRole('5')" icon="el-icon-check"
|
<el-button @click="setUserRole('5')" icon="el-icon-check"
|
||||||
plain
|
plain
|
||||||
size="small" type="primary"
|
size="small" type="primary"
|
||||||
v-if="activityTableData.substituteNum>0">
|
v-if="activityTableData.substituteNum>0">
|
||||||
设置替补
|
设置替补
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-dropdown @command="changeTeam"
|
|
||||||
v-if="activityTableData.eveProjectType==2&&teamList.length>1">
|
|
||||||
<el-button size="small" type="primary">
|
|
||||||
修改小队<i class="el-icon-arrow-down el-icon--right"></i>
|
|
||||||
</el-button>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item :command="{item}"
|
|
||||||
:key="item.id" v-for="item in teamList">
|
|
||||||
{{item.name}}
|
|
||||||
</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<el-table :data="applyUserTableData"
|
|
||||||
@selection-change="handleSelectionChange" border
|
|
||||||
class="mt10" ref="multipleTable"
|
|
||||||
row-key="id" size="small"
|
|
||||||
stripe
|
|
||||||
v-loading="applyUserTabLoading">
|
|
||||||
|
|
||||||
<el-table-column :reserve-selection="true"
|
|
||||||
align="center" header-align="center"
|
|
||||||
type="selection"
|
|
||||||
width="55">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="序号"
|
|
||||||
type="index"
|
|
||||||
width="80">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="所属队"
|
|
||||||
prop="team" width="80">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="姓名"
|
|
||||||
prop="username" width="130">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="教工号"
|
|
||||||
prop="loginname" width="130">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="单位"
|
|
||||||
prop="unitname"
|
|
||||||
sortable>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="性别"
|
|
||||||
prop="sex" width="80">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="年龄"
|
|
||||||
prop="age" width="80">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center" header-align="center" label="身份"
|
|
||||||
prop="identity" width="300px">
|
|
||||||
<template scope="{$index,row}">
|
|
||||||
<el-tag :disable-transitions="false"
|
|
||||||
@close="delApplyUser($index,row,'4')"
|
|
||||||
closable
|
|
||||||
effect="light"
|
|
||||||
type="info"
|
|
||||||
v-if="row.identity.includes('4')">处级领导
|
|
||||||
</el-tag>
|
|
||||||
<el-tag :disable-transitions="false"
|
|
||||||
@close="delApplyUser($index,row,'3')"
|
|
||||||
closable
|
|
||||||
effect="light"
|
|
||||||
type="warning"
|
|
||||||
v-if="row.identity.includes('3')">领队
|
|
||||||
</el-tag>
|
|
||||||
<el-tag :disable-transitions="false"
|
|
||||||
@close="delApplyUser($index,row,'2')"
|
|
||||||
closable
|
|
||||||
effect="light"
|
|
||||||
type="success"
|
|
||||||
v-if="row.identity.includes('2')">教练
|
|
||||||
</el-tag>
|
|
||||||
<el-tag :disable-transitions="false"
|
|
||||||
@close="delApplyUser($index,row,'1')"
|
|
||||||
closable
|
|
||||||
effect="light"
|
|
||||||
v-if="row.identity.includes('1')">运动员
|
|
||||||
</el-tag>
|
|
||||||
<el-tag :disable-transitions="false"
|
|
||||||
@close="delApplyUser($index,row,'5')"
|
|
||||||
closable
|
|
||||||
effect="light"
|
|
||||||
type="danger"
|
|
||||||
v-if="row.identity.includes('5')">替补
|
|
||||||
</el-tag>
|
|
||||||
|
|
||||||
|
<el-dropdown @command="changeTeam"
|
||||||
|
v-if="activityTableData.eveProjectType==2&&teamList.length>1">
|
||||||
|
<el-button size="small" type="primary">
|
||||||
|
修改小队<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :command="{item}"
|
||||||
|
:key="item.id" v-for="item in teamList">
|
||||||
|
{{item.name}}
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</template>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
</el-card>
|
<el-table :data="applyUserTableData"
|
||||||
</el-tab-pane>
|
@selection-change="handleSelectionChange" border
|
||||||
</el-tabs>
|
class="mt10" ref="multipleTable"
|
||||||
</div>
|
row-key="id" size="small"
|
||||||
`,
|
stripe
|
||||||
|
v-loading="applyUserTabLoading">
|
||||||
|
|
||||||
|
<el-table-column :reserve-selection="true"
|
||||||
|
align="center" header-align="center"
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="序号"
|
||||||
|
type="index"
|
||||||
|
width="80">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="所属队"
|
||||||
|
prop="team" width="80">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="姓名"
|
||||||
|
prop="username" width="130">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="教工号"
|
||||||
|
prop="loginname" width="130">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="单位"
|
||||||
|
prop="unitname"
|
||||||
|
sortable>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="性别"
|
||||||
|
prop="sex" width="80">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="年龄"
|
||||||
|
prop="age" width="80">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
align="center" header-align="center" label="身份"
|
||||||
|
prop="identity" width="300px">
|
||||||
|
<template scope="{$index,row}">
|
||||||
|
<el-tag :disable-transitions="false"
|
||||||
|
@close="delApplyUser($index,row,'4')"
|
||||||
|
closable
|
||||||
|
effect="light"
|
||||||
|
type="info"
|
||||||
|
v-if="row.identity.includes('4')">处级领导
|
||||||
|
</el-tag>
|
||||||
|
<el-tag :disable-transitions="false"
|
||||||
|
@close="delApplyUser($index,row,'3')"
|
||||||
|
closable
|
||||||
|
effect="light"
|
||||||
|
type="warning"
|
||||||
|
v-if="row.identity.includes('3')">领队
|
||||||
|
</el-tag>
|
||||||
|
<el-tag :disable-transitions="false"
|
||||||
|
@close="delApplyUser($index,row,'2')"
|
||||||
|
closable
|
||||||
|
effect="light"
|
||||||
|
type="success"
|
||||||
|
v-if="row.identity.includes('2')">教练
|
||||||
|
</el-tag>
|
||||||
|
<el-tag :disable-transitions="false"
|
||||||
|
@close="delApplyUser($index,row,'1')"
|
||||||
|
closable
|
||||||
|
effect="light"
|
||||||
|
v-if="row.identity.includes('1')">运动员
|
||||||
|
</el-tag>
|
||||||
|
<el-tag :disable-transitions="false"
|
||||||
|
@close="delApplyUser($index,row,'5')"
|
||||||
|
closable
|
||||||
|
effect="light"
|
||||||
|
type="danger"
|
||||||
|
v-if="row.identity.includes('5')">替补
|
||||||
|
</el-tag>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
store,
|
store,
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
data() {
|
data() {
|
||||||
@@ -440,7 +440,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//如果是单项
|
//如果是单项
|
||||||
if (this.activityTableData.eveProjectType === '1') {
|
if (this.activityTableData.eveProjectType === "1") {
|
||||||
if (this.applyUserTableData.length + this.rightApplyUserList.length > this.activityTableData.athleteMaxNum) {
|
if (this.applyUserTableData.length + this.rightApplyUserList.length > this.activityTableData.athleteMaxNum) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: "警告",
|
title: "警告",
|
||||||
@@ -532,7 +532,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
this.applyUserList.push(data)
|
this.applyUserList.push(data)
|
||||||
|
|
||||||
//如果是单项判断每个人可以报几项
|
//如果是单项判断每个人可以报几项
|
||||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === '1') {
|
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === "1") {
|
||||||
cc.forEach((z) => {
|
cc.forEach((z) => {
|
||||||
if (z[0]) {
|
if (z[0]) {
|
||||||
const index = this.applyUserList.findIndex((x) => x.userId === z[0].userId && x.id === null)
|
const index = this.applyUserList.findIndex((x) => x.userId === z[0].userId && x.id === null)
|
||||||
@@ -545,7 +545,7 @@ var ACTIVITY_SPORTS_APPLY_USER = {
|
|||||||
})
|
})
|
||||||
|
|
||||||
//如果是单项判断每个人可以报几项
|
//如果是单项判断每个人可以报几项
|
||||||
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === '1') {
|
if (this.eventData.restrictRegNumber >= 0 && this.activityTableData.eveProjectType === "1") {
|
||||||
const usernames = cc.map((v) => v[0].username).join(",")
|
const usernames = cc.map((v) => v[0].username).join(",")
|
||||||
if (usernames) {
|
if (usernames) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
|
|||||||
@@ -20,18 +20,18 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava ref="guava">
|
<guava ref="guava" edit_scroll>
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<search @search="activityInfoData">
|
<search @search="activityInfoData">
|
||||||
<search-item label="">
|
<search-item label="">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@change="activityInfoData"
|
@change="activityInfoData"
|
||||||
placeholder="选择年"
|
placeholder="选择年"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
type="year"
|
type="year"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy"
|
value-format="yyyy"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</search-item>
|
</search-item>
|
||||||
|
|
||||||
@@ -42,18 +42,16 @@ layout("/layouts/platform.html"){
|
|||||||
<el-radio-button :label="3">已结束</el-radio-button>
|
<el-radio-button :label="3">已结束</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</search-item>
|
</search-item>
|
||||||
<search-item label=""
|
<search-item label="" v-if="$auth.hasRole('SYSADMIN')||$auth.hasRole('SCHOOL_UNION_ADMIN')">
|
||||||
v-if="$auth.hasRole('SYSADMIN')||$auth.hasRole('SCHOOL_UNION_ADMIN')">
|
|
||||||
<el-select
|
<el-select
|
||||||
@change="doSearch"
|
@change="doSearch"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="报名所属分工会"
|
placeholder="报名所属分工会"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="pageForm.unionId"
|
v-model="pageForm.unionId"
|
||||||
>
|
>
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unionOptions"></el-option>
|
||||||
v-for="item in unionOptions"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
@@ -61,23 +59,16 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<el-row class="el-table-container">
|
<el-row class="el-table-container">
|
||||||
<el-carousel :interval="5000" arrow="always" style="margin: 10px auto">
|
<el-carousel :interval="5000" arrow="always" style="margin: 10px auto">
|
||||||
<el-carousel-item :key="index"
|
<el-carousel-item :key="index" v-for="index in Math.ceil(activityList.length/4)">
|
||||||
v-for="index in Math.ceil(activityList.length/4)">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :key="item.id" :span="6"
|
<el-col :key="item.id" :span="6" v-for="item in activityList.slice((index-1)*4,index*4)">
|
||||||
v-for="item in activityList.slice((index-1)*4,index*4)">
|
<el-card :class="'box-card '+(item.id===pageForm.activityId?'activeCard':'')" style="border-radius: 10px">
|
||||||
<el-card
|
<div @click="openApply(item)" class="clearfix" slot="header" style="font-size: 16px; padding: 5px 0">
|
||||||
:class="'box-card '+(item.id===pageForm.activityId?'activeCard':'')"
|
<el-tooltip :content="item.NAME" class="item" effect="dark" placement="top-start">
|
||||||
style="border-radius: 10px">
|
|
||||||
<div @click="openApply(item)" class="clearfix" slot="header"
|
|
||||||
style="font-size: 16px; padding: 5px 0">
|
|
||||||
<el-tooltip :content="item.NAME" class="item" effect="dark"
|
|
||||||
placement="top-start">
|
|
||||||
<span v-if="item.NAME.length<=10">{{item.NAME}}</span>
|
<span v-if="item.NAME.length<=10">{{item.NAME}}</span>
|
||||||
<span v-else>{{item.NAME.substr(0,10)}}...</span>
|
<span v-else>{{item.NAME.substr(0,10)}}...</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-button @click="openApply(item)"
|
<el-button @click="openApply(item)" style="float: right; padding: 3px 0" type="text">
|
||||||
style="float: right; padding: 3px 0" type="text">
|
|
||||||
请选择活动报名
|
请选择活动报名
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,27 +78,26 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<span v-if="item.gameStyle===1">{{item.activityLevelName}}</span>
|
<span v-if="item.gameStyle===1">{{item.activityLevelName}}</span>
|
||||||
<el-tag
|
<el-tag
|
||||||
effect="dark"
|
effect="dark"
|
||||||
style="border-radius: 50%; float: right"
|
style="border-radius: 50%; float: right"
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="$moment(item.applyEndTime).valueOf() <$moment().valueOf()"
|
v-if="$moment(item.applyEndTime).valueOf() <$moment().valueOf()"
|
||||||
>
|
>
|
||||||
报名结束
|
报名结束
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag
|
<el-tag
|
||||||
effect="dark"
|
effect="dark"
|
||||||
style="border-radius: 50%; float: right"
|
style="border-radius: 50%; float: right"
|
||||||
type="success"
|
type="success"
|
||||||
v-else-if="$moment().valueOf()>$moment(item.applyStartTime).valueOf()
|
v-else-if="$moment().valueOf()>$moment(item.applyStartTime).valueOf() && $moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
||||||
&&$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
|
||||||
>
|
>
|
||||||
报名中
|
报名中
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag
|
<el-tag
|
||||||
effect="dark"
|
effect="dark"
|
||||||
style="border-radius: 50%; float: right"
|
style="border-radius: 50%; float: right"
|
||||||
type="danger"
|
type="danger"
|
||||||
v-else-if="$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
v-else-if="$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
|
||||||
>
|
>
|
||||||
报名未开始
|
报名未开始
|
||||||
</el-tag>
|
</el-tag>
|
||||||
@@ -118,13 +108,12 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
<div class="text e-item">
|
<div class="text e-item">
|
||||||
<span style="color: gray">报名时间:</span>
|
<span style="color: gray">报名时间:</span>
|
||||||
{{$moment(item.applyStartTime).format('YYYY/MM/DD HH:mm')}}
|
{{$moment(item.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||||
至 {{$moment(item.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
{{$moment(item.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
<span style="color: gray">活动时间:</span>
|
<span style="color: gray">活动时间:</span>
|
||||||
{{$moment(item.startTime).format('YYYY/MM/DD HH:mm')}}
|
{{$moment(item.startTime).format('YYYY/MM/DD HH:mm')}} 至 {{$moment(item.endTime).format('YYYY/MM/DD')}}
|
||||||
至 {{$moment(item.endTime).format('YYYY/MM/DD HH:mm')}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -138,73 +127,68 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool label="活动项目信息">
|
<table-tool label="活动项目信息">
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select
|
<el-select
|
||||||
@change="doSearch"
|
@change="doSearch"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择组别"
|
placeholder="请选择组别"
|
||||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||||
v-if="unionLeaderCoach"
|
v-if="unionLeaderCoach"
|
||||||
v-model="pageForm.groupName"
|
v-model="pageForm.groupName"
|
||||||
>
|
>
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.name"
|
<el-option :key="item.id" :label="item.name" :value="item.name" v-for="item in groupList"></el-option>
|
||||||
v-for="item in groupList"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-item-option">
|
<div class="search-item-option">
|
||||||
<el-select
|
<el-select
|
||||||
@change="doSearch"
|
@change="doSearch"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择活动项目"
|
placeholder="请选择活动项目"
|
||||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||||
v-if="unionLeaderCoach"
|
v-if="unionLeaderCoach"
|
||||||
v-model="pageForm.eventId"
|
v-model="pageForm.eventId"
|
||||||
>
|
>
|
||||||
<el-option :key="item.eventId" :label="item.allName"
|
<el-option :key="item.eventId" :label="item.allName" :value="item.eventId" v-for="item in eventList"></el-option>
|
||||||
:value="item.eventId" v-for="item in eventList"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr10 ml20" v-if="unionLeaderCoach">
|
<div class="mr10 ml20" v-if="unionLeaderCoach">
|
||||||
领队:
|
领队:
|
||||||
<span style="color: #419bf8">{{leaderData.username?leaderData.username:'暂无'}}</span>
|
<span style="color: #419bf8">{{leaderData.username?leaderData.username:'暂无'}}</span>
|
||||||
  教练:
|
  教练:
|
||||||
<span
|
<span style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
|
||||||
style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button @click="openLeaderCoach" size="medium" type="primary"
|
<el-button @click="openLeaderCoach" size="medium" type="primary" v-if="unionLeaderCoach">设置领队/教练</el-button>
|
||||||
v-if="unionLeaderCoach">设置领队/教练
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:size="tableSize"
|
:size="tableSize"
|
||||||
@sort-change="pageOrder"
|
@sort-change="pageOrder"
|
||||||
class="vi-table"
|
class="vi-table"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
style="width: 100%; margin-bottom: 20px"
|
style="width: 100%; margin-bottom: 20px"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:index="indexMethod"
|
:index="indexMethod"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
label="序号"
|
label="序号"
|
||||||
type="index"
|
type="index"
|
||||||
width="80px"
|
width="80px"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:key="column.prop"
|
:key="column.prop"
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-for="column in tableColumns"
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template scope="{row}" v-if="column.prop=='projectType'">
|
<template scope="{row}" v-if="column.prop=='projectType'">
|
||||||
<span v-if="row.eveProjectType==1">单项</span>
|
<span v-if="row.eveProjectType==1">单项</span>
|
||||||
@@ -213,9 +197,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
<template scope="{row}" v-else-if="column.prop=='applyNum'">
|
<template scope="{row}" v-else-if="column.prop=='applyNum'">
|
||||||
<span v-if="row.successUserApply>0&&row.applyType!==3">{{ row.successUserApply }}人</span>
|
<span v-if="row.successUserApply>0&&row.applyType!==3">{{ row.successUserApply }}人</span>
|
||||||
<span
|
<span v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">{{row.totalApplyNum}}人</span>
|
||||||
v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">
|
|
||||||
{{row.totalApplyNum}}人</span>
|
|
||||||
<span v-else-if="row.totalApplyNum>0&&row.applyType===3">{{ row.totalApplyNum }}人</span>
|
<span v-else-if="row.totalApplyNum>0&&row.applyType===3">{{ row.totalApplyNum }}人</span>
|
||||||
<span v-else>0人</span>
|
<span v-else>0人</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -226,98 +208,84 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="报名操作"
|
<el-table-column align="center" header-align="center" label="报名操作" width="300px">
|
||||||
width="300px">
|
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button :loading="row.loading" @click="openUniteApply(row)"
|
<el-button :loading="row.loading" @click="openUniteApply(row)" size="mini" type="primary" v-if="row.applyWay.includes(2)">
|
||||||
size="mini" type="primary"
|
|
||||||
v-if="row.applyWay.includes(2)">
|
|
||||||
项目报名
|
项目报名
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button :loading="row.loading" @click="doDelete(row)" size="mini" type="danger">删除报名人员</el-button>
|
||||||
:loading="row.loading"
|
|
||||||
@click="doDelete(row)"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
>
|
|
||||||
删除报名人员
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #edit_func>
|
<template #edit_func>
|
||||||
<el-button @click="doApplied(false)" type="primary">保 存</el-button>
|
<!-- <el-button @click="doApplied(false)" type="primary">保 存</el-button>-->
|
||||||
<el-button @click="doApplied(true)" type="primary">提 交</el-button>
|
<!-- <el-button @click="doApplied(true)" type="primary">提 交</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
<template #edit>
|
<template #edit>
|
||||||
<activity-sports-apply-user @flip="flip"
|
<activity-sports-apply-user @flip="flip" ref="activityApplyUser"></activity-sports-apply-user>
|
||||||
ref="activityApplyUser"></activity-sports-apply-user>
|
</template>
|
||||||
|
<template #edit-footer>
|
||||||
|
<el-row type="flex" justify="end">
|
||||||
|
<el-button @click="doApplied(false)" type="primary">保 存</el-button>
|
||||||
|
<el-button @click="doApplied(true)" type="primary">提 交</el-button>
|
||||||
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #public>
|
<template #public>
|
||||||
<activity-sports-delete-user @flip="flip"
|
<activity-sports-delete-user @flip="flip" ref="activityDeleteUser"></activity-sports-delete-user>
|
||||||
ref="activityDeleteUser"></activity-sports-delete-user>
|
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogLeaderCoach" title="添加领队/教练" width="60%">
|
<el-dialog :visible.sync="dialogLeaderCoach" title="添加领队/教练" width="60%">
|
||||||
<el-form :model="headData" :rules="formRules" label-width="100px" ref="form"
|
<el-form :model="headData" :rules="formRules" label-width="100px" ref="form" v-loading="formLoading">
|
||||||
v-loading="formLoading">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<table-tool label="填写领队信息"></table-tool>
|
<table-tool label="填写领队信息"></table-tool>
|
||||||
<el-form-item label="姓  名" prop="userId">
|
<el-form-item label="姓  名" prop="userId">
|
||||||
<user-select
|
<user-select
|
||||||
:option_label_func="(item)=>{return item.username + item.loginname}"
|
:option_label_func="(item)=>{return item.username + item.loginname}"
|
||||||
@change="changeLeader"
|
@change="changeLeader"
|
||||||
api="/platform/activity/apply/getUserUnion"
|
api="/platform/activity/apply/getUserUnion"
|
||||||
api_input_key_name="query"
|
api_input_key_name="query"
|
||||||
ref="userData"
|
ref="userData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="leaderData.userId"
|
v-model="leaderData.userId"
|
||||||
></user-select>
|
></user-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在单位" prop="unitId">
|
<el-form-item label="所在单位" prop="unitId">
|
||||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%"
|
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%" v-model="leaderData.unitId">
|
||||||
v-model="leaderData.unitId">
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
|
||||||
v-for="item in unitOptions"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电  话" prop="mobile">
|
<el-form-item label="电  话" prop="mobile">
|
||||||
<el-input maxlength="50" placeholder="请填写电话" type="text"
|
<el-input maxlength="50" placeholder="请填写电话" type="text" v-model="leaderData.mobile"></el-input>
|
||||||
v-model="leaderData.mobile"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<table-tool label="填写教练信息"></table-tool>
|
<table-tool label="填写教练信息"></table-tool>
|
||||||
<el-form-item label="姓  名" prop="userId">
|
<el-form-item label="姓  名" prop="userId">
|
||||||
<user-select
|
<user-select
|
||||||
:option_label_func="(item)=>{return item.username + item.loginname}"
|
:option_label_func="(item)=>{return item.username + item.loginname}"
|
||||||
@change="changeCoach"
|
@change="changeCoach"
|
||||||
api="/platform/activity/apply/getUserUnion"
|
api="/platform/activity/apply/getUserUnion"
|
||||||
api_input_key_name="query"
|
api_input_key_name="query"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
ref="userData2"
|
ref="userData2"
|
||||||
v-model="coachData.userId"
|
v-model="coachData.userId"
|
||||||
></user-select>
|
></user-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所在单位" prop="unitId">
|
<el-form-item label="所在单位" prop="unitId">
|
||||||
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%"
|
<el-select clearable filterable placeholder="请选择所在单位" style="width: 100%" v-model="coachData.unitId">
|
||||||
v-model="coachData.unitId">
|
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitOptions"></el-option>
|
||||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
|
||||||
v-for="item in unitOptions"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电  话" prop="mobile">
|
<el-form-item label="电  话" prop="mobile">
|
||||||
<el-input maxlength="50" placeholder="请填写电话" type="text"
|
<el-input maxlength="50" placeholder="请填写电话" type="text" v-model="coachData.mobile"></el-input>
|
||||||
v-model="coachData.mobile"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -328,18 +296,13 @@ layout("/layouts/platform.html"){
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog title="活动通知" :visible.sync="activityNoticeDialog" width="50%">
|
||||||
title="活动通知"
|
<div style="margin: 10px">
|
||||||
:visible.sync="activityNoticeDialog"
|
<div style="height: 500px; overflow: auto" v-html="activityData.eventNotification"></div>
|
||||||
width="50%"
|
|
||||||
>
|
|
||||||
<div style="margin: 10px; ">
|
|
||||||
<div style="height: 500px; overflow: auto;"
|
|
||||||
v-html="activityData.eventNotification"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="activityNoticeDialog = false">关 闭</el-button>
|
<el-button type="primary" @click="activityNoticeDialog = false">关 闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -367,10 +330,10 @@ layout("/layouts/platform.html"){
|
|||||||
groupList: [],
|
groupList: [],
|
||||||
eventList: [],
|
eventList: [],
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{prop: "allName", label: "项目名称"},
|
{ prop: "allName", label: "项目名称" },
|
||||||
{prop: "projectType", label: "项目类型"},
|
{ prop: "projectType", label: "项目类型" },
|
||||||
{prop: "applyNum", label: "已报名人数"},
|
{ prop: "applyNum", label: "已报名人数" },
|
||||||
{prop: "apply_num_bc", label: "暂保存人数"}
|
{ prop: "apply_num_bc", label: "暂保存人数" }
|
||||||
],
|
],
|
||||||
unionOptions: [],
|
unionOptions: [],
|
||||||
|
|
||||||
@@ -450,7 +413,6 @@ layout("/layouts/platform.html"){
|
|||||||
this.coachData = {}
|
this.coachData = {}
|
||||||
if (this.leaderData || this.coachData) {
|
if (this.leaderData || this.coachData) {
|
||||||
await this.getUnionCoachLeaderHead()
|
await this.getUnionCoachLeaderHead()
|
||||||
|
|
||||||
}
|
}
|
||||||
this.dialogLeaderCoach = true
|
this.dialogLeaderCoach = true
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
@@ -500,8 +462,8 @@ layout("/layouts/platform.html"){
|
|||||||
this.coachData = {}
|
this.coachData = {}
|
||||||
this.headData = {}
|
this.headData = {}
|
||||||
this.staffData = {}
|
this.staffData = {}
|
||||||
const resp = await this.$axios.post(loc() + "/getUnionCoachLeaderHead", {activityId: this.pageForm.activityId})
|
const resp = await this.$axios.post(loc() + "/getUnionCoachLeaderHead", { activityId: this.pageForm.activityId })
|
||||||
const {unionCoach, unionLeader, unionHead, unionStaff, userOptions} = resp.data
|
const { unionCoach, unionLeader, unionHead, unionStaff, userOptions } = resp.data
|
||||||
if (unionCoach) {
|
if (unionCoach) {
|
||||||
this.coachData = unionCoach
|
this.coachData = unionCoach
|
||||||
}
|
}
|
||||||
@@ -518,14 +480,14 @@ layout("/layouts/platform.html"){
|
|||||||
this.userOptions = userOptions
|
this.userOptions = userOptions
|
||||||
},
|
},
|
||||||
async changeActivity() {
|
async changeActivity() {
|
||||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
const resp = await this.$axios.post("/platform/activity/apply/getEvents", { activityId: this.pageForm.activityId })
|
||||||
this.eventList = resp.data
|
this.eventList = resp.data
|
||||||
},
|
},
|
||||||
pageData() {
|
pageData() {
|
||||||
this.tabLoading = true
|
this.tabLoading = true
|
||||||
const pageForm = clone(this.pageForm)
|
const pageForm = clone(this.pageForm)
|
||||||
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
|
||||||
this.$axios.post("/platform/activity/apply/pageData", {data: JSON.stringify(pageForm)}).then((res) => {
|
this.$axios.post("/platform/activity/apply/pageData", { data: JSON.stringify(pageForm) }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
this.pageForm.totalCount = res.data.totalCount
|
this.pageForm.totalCount = res.data.totalCount
|
||||||
|
|||||||
@@ -117,15 +117,14 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="授权身份" :visible.sync="authDialogVisible" width="50%">
|
<el-dialog title="授权身份" :visible.sync="authDialogVisible" width="50%">
|
||||||
<el-form :model="authFormData" ref="authForm" label-width="80px">
|
<el-form :model="authFormData" ref="authForm" label-width="60px">
|
||||||
<el-form-item label="姓名">
|
<el-form-item label="姓名">
|
||||||
<el-input placeholder="请输入姓名" v-model="authFormData.userName" disabled></el-input>
|
<el-input placeholder="请输入姓名" v-model="authFormData.userName" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工号">
|
<el-form-item label="工号">
|
||||||
<el-input placeholder="请输入工号" v-model="authFormData.loginName" disabled></el-input>
|
<el-input placeholder="请输入工号" v-model="authFormData.loginName" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="身份" prop="roleCode"
|
<el-form-item label="身份" prop="roleCode">
|
||||||
:rules="[{required: true, message: '请选择身份', trigger: 'blur'}]">
|
|
||||||
<el-checkbox-group v-model="authFormData.roleCode">
|
<el-checkbox-group v-model="authFormData.roleCode">
|
||||||
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
|
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox>
|
||||||
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
|
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
|
||||||
|
|||||||
@@ -15,15 +15,18 @@ layout("/layouts/platform.html"){
|
|||||||
<table-tool label="数据列表">
|
<table-tool label="数据列表">
|
||||||
<el-button type="primary" size="small" icon="el-icon-plus" @click="onOpen">新增</el-button>
|
<el-button type="primary" size="small" icon="el-icon-plus" @click="onOpen">新增</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
style="width: 100%">
|
||||||
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||||
|
width="80px"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name" sortable></el-table-column>
|
<el-table-column label="名称" prop="name" sortable></el-table-column>
|
||||||
<el-table-column label="年份" prop="year" sortable width="150px"></el-table-column>
|
<el-table-column label="年份" prop="year" sortable width="150px"></el-table-column>
|
||||||
<el-table-column label="开始时间" prop="startTime" sortable width="300px"></el-table-column>
|
<el-table-column label="开始时间" prop="startTime" sortable width="300px"></el-table-column>
|
||||||
<el-table-column label="结束时间" prop="endTime" sortable width="300px"></el-table-column>
|
<el-table-column label="结束时间" prop="endTime" sortable width="300px"></el-table-column>
|
||||||
<el-table-column label="是否启用" prop="enabled" sortable width="150px">
|
<el-table-column label="是否启用" prop="enabled" sortable width="150px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-tag :type="row.enabled ? 'success' : 'danger'" size="mini">{{row.enabled ? '是' : '否'}}</el-tag>
|
<el-tag :type="row.enabled ? 'success' : 'danger'" size="mini">{{row.enabled ? '是' : '否'}}
|
||||||
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="200px">
|
<el-table-column label="操作" fixed="right" width="200px">
|
||||||
@@ -37,10 +40,12 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" :close-on-click-modal="false" width="60%">
|
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible.sync="dialogVisible" :close-on-click-modal="false"
|
||||||
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
|
width="60%">
|
||||||
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px">
|
||||||
<el-form-item label="考核年份" prop="year">
|
<el-form-item label="考核年份" prop="year">
|
||||||
<el-date-picker v-model="formData.year" type="year" value-format="yyyy" placeholder="考核年份" style="width: 100%"></el-date-picker>
|
<el-date-picker v-model="formData.year" type="year" value-format="yyyy" placeholder="考核年份"
|
||||||
|
style="width: 100%"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="名称"></el-input>
|
<el-input v-model="formData.name" placeholder="名称"></el-input>
|
||||||
@@ -49,22 +54,22 @@ layout("/layouts/platform.html"){
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="开始时间" prop="startTime">
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.startTime"
|
v-model="formData.startTime"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="开始时间"
|
placeholder="开始时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="结束时间" prop="endTime">
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.endTime"
|
v-model="formData.endTime"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="结束时间"
|
placeholder="结束时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -72,6 +77,17 @@ layout("/layouts/platform.html"){
|
|||||||
<el-form-item label="通知内容" prop="content">
|
<el-form-item label="通知内容" prop="content">
|
||||||
<text-editor v-model="formData.content"></text-editor>
|
<text-editor v-model="formData.content"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="自定义表单">
|
||||||
|
<div style="display: flex;align-items: center;height: 40px">
|
||||||
|
<el-switch v-model="formData.isCustomForm" style="margin-right: 10px"></el-switch>
|
||||||
|
<custom-form-field v-model="formData.formConfig" v-if="formData.isCustomForm"></custom-form-field>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-form-item label="报名表单" prop="formConfig" v-if="formData.isCustomForm">-->
|
||||||
|
<!-- <custom-form-field v-model="formData.formConfig"></custom-form-field>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="是否启用" prop="enabled">
|
<el-form-item label="是否启用" prop="enabled">
|
||||||
<el-switch v-model="formData.enabled"></el-switch>
|
<el-switch v-model="formData.enabled"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -91,12 +107,12 @@ layout("/layouts/platform.html"){
|
|||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formRules: {
|
formRules: {
|
||||||
name: [{ required: true, message: "名称不能为空", trigger: ["blur", "change"] }],
|
name: [{required: true, message: "名称不能为空", trigger: ["blur", "change"]}],
|
||||||
content: [{ required: true, message: "通知内容不能为空", trigger: ["blur", "change"] }],
|
content: [{required: true, message: "通知内容不能为空", trigger: ["blur", "change"]}],
|
||||||
year: [{ required: true, message: "考核年份不能为空", trigger: ["blur", "change"] }],
|
year: [{required: true, message: "考核年份不能为空", trigger: ["blur", "change"]}],
|
||||||
startTime: [{ required: true, message: "开始时间不能为空", trigger: ["blur", "change"] }],
|
startTime: [{required: true, message: "开始时间不能为空", trigger: ["blur", "change"]}],
|
||||||
endTime: [{ required: true, message: "结束时间不能为空", trigger: ["blur", "change"] }],
|
endTime: [{required: true, message: "结束时间不能为空", trigger: ["blur", "change"]}],
|
||||||
enabled: [{ required: true, message: "是否启用不能为空", trigger: ["blur", "change"] }]
|
enabled: [{required: true, message: "是否启用不能为空", trigger: ["blur", "change"]}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -111,13 +127,15 @@ layout("/layouts/platform.html"){
|
|||||||
onEdit(row) {
|
onEdit(row) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formData = { ...row }
|
this.formData = {...row}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$axios.post("/platform/buildHome/act/save", this.formData).then((res) => {
|
this.$axios.post("/platform/buildHome/act/save", {
|
||||||
|
act: JSON.stringify(this.formData)
|
||||||
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
|
|||||||
+57
-30
@@ -7,22 +7,33 @@ const kpiForm = {
|
|||||||
<el-form-item label="考核名称" prop="name">
|
<el-form-item label="考核名称" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="请输入考核名称"></el-input>
|
<el-input v-model="formData.name" placeholder="请输入考核名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-row :gutter="20" type="flex">
|
<el-row>
|
||||||
<el-form-item label="考核年度" prop="year">
|
<el-col :span="8">
|
||||||
<el-date-picker v-model="formData.year" type="year" placeholder="选择年"
|
<el-form-item label="考核年度" prop="year">
|
||||||
value-format="yyyy"></el-date-picker>
|
<el-date-picker v-model="formData.year" type="year" placeholder="选择年"
|
||||||
</el-form-item>
|
value-format="yyyy"></el-date-picker>
|
||||||
<el-form-item label="开始时间" prop="startTime">
|
</el-form-item>
|
||||||
<el-date-picker v-model="formData.startTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
</el-col>
|
||||||
placeholder="选择日期"></el-date-picker>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
<el-form-item label="结束时间" prop="endTime">
|
<el-date-picker v-model="formData.startTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
<el-date-picker v-model="formData.endTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="选择日期"></el-date-picker>
|
||||||
placeholder="选择日期"></el-date-picker>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
|
<el-date-picker v-model="formData.endTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="选择日期"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="是否开启" prop="enable">
|
<el-form-item label="关联事项" prop="actId">
|
||||||
<el-switch v-model="formData.enable" :active-value="1" :inactive-value="0"></el-switch>
|
<el-select v-model="formData.actId">
|
||||||
|
<el-option v-for="item in actOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否开启" prop="enabled">
|
||||||
|
<el-switch v-model="formData.enabled"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<div class="process-title">考核内容</div>
|
<div class="process-title">考核内容</div>
|
||||||
@@ -48,7 +59,8 @@ const kpiForm = {
|
|||||||
<template v-for="(category,categoryIndex) in formData.categoryList">
|
<template v-for="(category,categoryIndex) in formData.categoryList">
|
||||||
<tr v-for="(item,itemIndex) in category.items"
|
<tr v-for="(item,itemIndex) in category.items"
|
||||||
:class="{'category-split':itemIndex+1===category.items.length}">
|
:class="{'category-split':itemIndex+1===category.items.length}">
|
||||||
<td v-if="itemIndex===0" :rowspan="category.items.length" class="text-center" style="width: 10%">
|
<td v-if="itemIndex===0" :rowspan="category.items.length" class="text-center"
|
||||||
|
style="width: 10%">
|
||||||
<div>{{categoryIndex+1}}</div>
|
<div>{{categoryIndex+1}}</div>
|
||||||
</td>
|
</td>
|
||||||
<td v-if="itemIndex===0" :rowspan="category.items.length" style="width: 10%">
|
<td v-if="itemIndex===0" :rowspan="category.items.length" style="width: 10%">
|
||||||
@@ -194,28 +206,31 @@ const kpiForm = {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formData: {
|
formData: {
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
scoreLevels:[]
|
scoreLevels: []
|
||||||
},
|
},
|
||||||
formRules: {
|
formRules: {
|
||||||
name: [{ required: true, message: "请输入考核名称", trigger: ["change", "blur"] }],
|
name: [{required: true, message: "请输入考核名称", trigger: ["change", "blur"]}],
|
||||||
code: [{ required: true, message: "请输入考核代码", trigger: ["change", "blur"] }],
|
code: [{required: true, message: "请输入考核代码", trigger: ["change", "blur"]}],
|
||||||
year: [{ required: true, message: "请输入考核年份", trigger: ["change", "blur"] }],
|
year: [{required: true, message: "请输入考核年份", trigger: ["change", "blur"]}],
|
||||||
startTime: [{ required: true, message: "请输入考核时间", trigger: ["change", "blur"] }],
|
startTime: [{required: true, message: "请输入考核时间", trigger: ["change", "blur"]}],
|
||||||
endTime: [{ required: true, message: "请输入考核时间", trigger: ["change", "blur"] }]
|
endTime: [{required: true, message: "请输入考核时间", trigger: ["change", "blur"]}],
|
||||||
|
actId: [{required: true, message: "请选择活动事项", trigger: ["change", "blur"]}]
|
||||||
},
|
},
|
||||||
newCategory: {
|
newCategory: {
|
||||||
name: "",
|
name: "",
|
||||||
code: "",
|
code: "",
|
||||||
sortOrder: 1,
|
sortOrder: 1,
|
||||||
items: []
|
items: []
|
||||||
}
|
},
|
||||||
|
actOptions: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(id = null) {
|
onOpen(id = null) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.listAct()
|
||||||
if (id) {
|
if (id) {
|
||||||
$.post("/platform/buildHome/kpi/plan/get", { id }).then((res) => {
|
$.post("/platform/buildHome/kpi/plan/get", {id}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
res.data.year = res.data.year.toString()
|
res.data.year = res.data.year.toString()
|
||||||
|
|
||||||
@@ -228,11 +243,19 @@ const kpiForm = {
|
|||||||
} else {
|
} else {
|
||||||
this.formData = {
|
this.formData = {
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
scoreLevels:[]
|
scoreLevels: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
listAct() {
|
||||||
|
this.$axios.get("/platform/buildHome/material/query/listAct").then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.actOptions = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs.formRef.validate((valid) => {
|
this.$refs.formRef.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -323,6 +346,7 @@ const kpiForm = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 添加考核分类
|
||||||
addCategory() {
|
addCategory() {
|
||||||
if (!this.newCategory.name || !this.newCategory.code) {
|
if (!this.newCategory.name || !this.newCategory.code) {
|
||||||
this.$message.warning("请填写完整信息")
|
this.$message.warning("请填写完整信息")
|
||||||
@@ -348,7 +372,7 @@ const kpiForm = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
$edit_status: { name: false }
|
$edit_status: {name: false}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formData.categoryList.push(category)
|
this.formData.categoryList.push(category)
|
||||||
@@ -356,6 +380,7 @@ const kpiForm = {
|
|||||||
this.$message.success("添加成功")
|
this.$message.success("添加成功")
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 添加考核项目
|
||||||
addNewItem(categoryIndex) {
|
addNewItem(categoryIndex) {
|
||||||
const category = this.formData.categoryList[categoryIndex]
|
const category = this.formData.categoryList[categoryIndex]
|
||||||
const newItem = {
|
const newItem = {
|
||||||
@@ -383,7 +408,8 @@ const kpiForm = {
|
|||||||
this.formData.categoryList.splice(cateGoryIndex, 1)
|
this.formData.categoryList.splice(cateGoryIndex, 1)
|
||||||
this.$message.success("删除成功")
|
this.$message.success("删除成功")
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除考核内容
|
// 删除考核内容
|
||||||
@@ -397,7 +423,8 @@ const kpiForm = {
|
|||||||
this.formData.categoryList[cateGoryIndex].items.splice(itemIndex, 1)
|
this.formData.categoryList[cateGoryIndex].items.splice(itemIndex, 1)
|
||||||
this.$message.success("删除成功")
|
this.$message.success("删除成功")
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: /*language=CSS*/ `
|
style: /*language=CSS*/ `
|
||||||
@@ -473,8 +500,8 @@ const kpiForm = {
|
|||||||
border-bottom: 1px solid rgb(33 40 53);
|
border-bottom: 1px solid rgb(33 40 53);
|
||||||
}
|
}
|
||||||
|
|
||||||
.kpi-plus .score-levels-table .el-input-number{
|
.kpi-plus .score-levels-table .el-input-number {
|
||||||
width: unset!important;
|
width: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ layout("/layouts/platform.html"){
|
|||||||
.alert {
|
.alert {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: #e8f4ff;
|
background-color: #e8f4ff;
|
||||||
border-left: 4px solid var(--color-primary);
|
border-left: 4px solid #1890ff;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
@@ -29,7 +29,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
.alert i {
|
.alert i {
|
||||||
color: var(--color-primary);
|
color: #1890ff;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book-header {
|
.book-header {
|
||||||
background: linear-gradient(120deg, var(--color-primary), var(--color-primary-8));
|
background: linear-gradient(120deg, #1e3c72, #2a5298);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -107,7 +107,7 @@ layout("/layouts/platform.html"){
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
color: var(--color-primary);
|
color: #1867b0;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--#include("/layouts/pagination.html"){}#-->
|
<!--#include("/layouts/pagination.html"){}#-->
|
||||||
</el-card>
|
</el-card>
|
||||||
<material-write ref="materialWriteRef"></material-write>
|
<material-write ref="materialWriteRef" @refresh="doSearch"></material-write>
|
||||||
<material-info ref="materialInfoRef"></material-info>
|
<material-info ref="materialInfoRef"></material-info>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+23
-9
@@ -7,22 +7,29 @@ layout("/layouts/platform.html"){
|
|||||||
<search @search="doSearch">
|
<search @search="doSearch">
|
||||||
<search-item label="评比事项">
|
<search-item label="评比事项">
|
||||||
<el-select v-model="pageForm.actId" placeholder="考核活动" clearable>
|
<el-select v-model="pageForm.actId" placeholder="考核活动" clearable>
|
||||||
<el-option v-for="item in actOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="item in actOptions" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</search-item>
|
</search-item>
|
||||||
</search>
|
</search>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" class="mt10">
|
<el-card shadow="never" class="mt10">
|
||||||
<table-tool label="数据列表">
|
<table-tool label="数据列表">
|
||||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportZip">导出汇总表</el-button>
|
<el-button size="small" type="primary" icon="el-icon-download" @click="exportZip">导出材料汇总表</el-button>
|
||||||
|
<el-button size="small" type="primary" icon="el-icon-download" @click="exportScore">导出自评分汇总表
|
||||||
|
</el-button>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index" width="80px"></el-table-column>
|
style="width: 100%">
|
||||||
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||||
|
width="80px"></el-table-column>
|
||||||
<el-table-column label="分工会名称" prop="unionName" sortable></el-table-column>
|
<el-table-column label="分工会名称" prop="unionName" sortable></el-table-column>
|
||||||
<el-table-column label="分工会编码" prop="unionCode" sortable></el-table-column>
|
<el-table-column label="分工会编码" prop="unionCode" sortable></el-table-column>
|
||||||
<el-table-column label="填写状态" prop="isWrite">
|
<el-table-column label="填写状态" prop="isWrite">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-tag :type="row.isWrite ? 'success' : 'danger'" size="mini">{{row.isWrite ? '已填写' : '未填写'}}</el-tag>
|
<el-tag :type="row.isWrite ? 'success' : 'danger'" size="mini">{{row.isWrite ? '已填写' :
|
||||||
|
'未填写'}}
|
||||||
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="建家记录册" prop="logBookFiles">-->
|
<!-- <el-table-column label="建家记录册" prop="logBookFiles">-->
|
||||||
@@ -33,7 +40,8 @@ layout("/layouts/platform.html"){
|
|||||||
<!-- <el-table-column label="年度工作总结和工作大事记录" prop="annualWorkSummaryFiles"></el-table-column>-->
|
<!-- <el-table-column label="年度工作总结和工作大事记录" prop="annualWorkSummaryFiles"></el-table-column>-->
|
||||||
<el-table-column label="操作" fixed="right" width="200px">
|
<el-table-column label="操作" fixed="right" width="200px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="$refs.infoRef.onOpen(pageForm.actId,row.id)">查看</el-button>
|
<el-button size="mini" type="primary" @click="$refs.infoRef.onOpen(pageForm.actId,row.id)">查看
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -49,7 +57,7 @@ layout("/layouts/platform.html"){
|
|||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
mixins: [initTableMixins],
|
mixins: [initTableMixins],
|
||||||
components: { info },
|
components: {info},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
actOptions: [],
|
actOptions: [],
|
||||||
@@ -57,6 +65,9 @@ layout("/layouts/platform.html"){
|
|||||||
actId: null
|
actId: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
listAct() {
|
listAct() {
|
||||||
@@ -70,8 +81,11 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
exportZip(){
|
exportZip() {
|
||||||
this.$downLoad('/platform/buildHome/material/query/exportZip', this.pageForm)
|
this.$downLoad('/platform/buildHome/material/query/exportZip', this.pageForm)
|
||||||
|
},
|
||||||
|
exportScore() {
|
||||||
|
this.$downLoad('/platform/buildHome/material/query/exportScore', this.pageForm)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
+35
-4
@@ -1,7 +1,7 @@
|
|||||||
const info = {
|
const info = {
|
||||||
template: /*language=HTML*/ `
|
template: /*language=HTML*/ `
|
||||||
<el-dialog title="查看详情" :visible.sync="visible" width="50%">
|
<el-dialog title="查看详情" :visible.sync="visible" width="50%">
|
||||||
<div class="upload-list">
|
<div class="upload-list" v-if="!isCustomForm">
|
||||||
<div class="upload-item">
|
<div class="upload-item">
|
||||||
<div class="upload-item-title">
|
<div class="upload-item-title">
|
||||||
<i class="fa fa-book"></i>
|
<i class="fa fa-book"></i>
|
||||||
@@ -34,17 +34,48 @@ const info = {
|
|||||||
<file-preview :files="viewData.annualWorkSummaryFiles" complete_result></file-preview>
|
<file-preview :files="viewData.annualWorkSummaryFiles" complete_result></file-preview>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<form-create
|
||||||
|
v-if="visible"
|
||||||
|
:key="actId+unionId"
|
||||||
|
:value.sync="viewData.dynamicFormData"
|
||||||
|
:rule="formCreateRule"
|
||||||
|
:option="formCreateOption"
|
||||||
|
disabled
|
||||||
|
></form-create>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
`,
|
`,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activity: {},
|
||||||
viewData: {},
|
viewData: {},
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isCustomForm() {
|
||||||
|
if(this.activity){
|
||||||
|
return this.activity.isCustomForm
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(actId, unionId) {
|
async onOpen(actId, unionId) {
|
||||||
|
this.viewData = {}
|
||||||
|
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
|
||||||
|
const {code,data,msg} = await this.$axios.post("/platform/buildHome/material/act", {actId})
|
||||||
|
if (code === 0) {
|
||||||
|
this.activity = data
|
||||||
|
if (this.activity.isCustomForm) {
|
||||||
|
this.formCreateRule = formCreate.parseJson(this.activity.formConfig.rule)
|
||||||
|
this.formCreateOption = formCreate.parseJson(this.activity.formConfig.options)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.$axios
|
this.$axios
|
||||||
.post("/platform/buildHome/material/query/infoByUnionId", {
|
.post("/platform/buildHome/material/query/infoByUnionId", {
|
||||||
actId,
|
actId,
|
||||||
@@ -52,9 +83,9 @@ const info = {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
if(res.data){
|
if (res.data) {
|
||||||
this.viewData = res.data
|
this.viewData = res.data
|
||||||
}else{
|
} else {
|
||||||
this.viewData = {}
|
this.viewData = {}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ const write = {
|
|||||||
{{ activity.startTime }} 至 {{ activity.endTime }}
|
{{ activity.startTime }} 至 {{ activity.endTime }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="upload-list">
|
<!--非自定义表单-->
|
||||||
|
<div class="upload-list" v-if="!isCustomForm">
|
||||||
<div class="upload-item">
|
<div class="upload-item">
|
||||||
<div class="upload-item-title">
|
<div class="upload-item-title">
|
||||||
<i class="fa fa-book"></i>
|
<i class="fa fa-book"></i>
|
||||||
@@ -19,13 +20,13 @@ const write = {
|
|||||||
,导出签字盖章后上传扫描件
|
,导出签字盖章后上传扫描件
|
||||||
</div>
|
</div>
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="formData.logBookFiles"
|
:value.sync="formData.logBookFiles"
|
||||||
:upload_number="1"
|
:upload_number="1"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_text="选择文件"
|
upload_text="选择文件"
|
||||||
upload_button_size="medium"
|
upload_button_size="medium"
|
||||||
:disabled="!isWithinTimeRange"
|
:disabled="!isWithinTimeRange"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -40,13 +41,13 @@ const write = {
|
|||||||
,填写完导出后签字盖章后上传扫描件
|
,填写完导出后签字盖章后上传扫描件
|
||||||
</div>
|
</div>
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="formData.selfEvaluationFiles"
|
:value.sync="formData.selfEvaluationFiles"
|
||||||
:upload_number="1"
|
:upload_number="1"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_text="选择文件"
|
upload_text="选择文件"
|
||||||
upload_button_size="medium"
|
upload_button_size="medium"
|
||||||
:disabled="!isWithinTimeRange"
|
:disabled="!isWithinTimeRange"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -61,13 +62,13 @@ const write = {
|
|||||||
,填写完导出后签字盖章后上传扫描件
|
,填写完导出后签字盖章后上传扫描件
|
||||||
</div>
|
</div>
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="formData.summaryFiles"
|
:value.sync="formData.summaryFiles"
|
||||||
:upload_number="1"
|
:upload_number="1"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_text="选择文件"
|
upload_text="选择文件"
|
||||||
upload_button_size="medium"
|
upload_button_size="medium"
|
||||||
:disabled="!isWithinTimeRange"
|
:disabled="!isWithinTimeRange"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -78,23 +79,34 @@ const write = {
|
|||||||
</div>
|
</div>
|
||||||
<div class="upload-hint">请上传年度工作总结和工作大事记电子版</div>
|
<div class="upload-hint">请上传年度工作总结和工作大事记电子版</div>
|
||||||
<file-upload
|
<file-upload
|
||||||
:value.sync="formData.annualWorkSummaryFiles"
|
:value.sync="formData.annualWorkSummaryFiles"
|
||||||
:upload_number="5"
|
:upload_number="5"
|
||||||
upload_result_category="array"
|
upload_result_category="array"
|
||||||
complete_result
|
complete_result
|
||||||
upload_text="选择文件"
|
upload_text="选择文件"
|
||||||
upload_button_size="medium"
|
upload_button_size="medium"
|
||||||
:disabled="!isWithinTimeRange"
|
:disabled="!isWithinTimeRange"
|
||||||
></file-upload>
|
></file-upload>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="notice-box">
|
<!--自定义表单-->
|
||||||
|
<div v-if="isCustomForm">
|
||||||
|
<!-- <div class="process-title">填写报名信息</div>-->
|
||||||
|
<form-create
|
||||||
|
:value.sync="formData.dynamicFormData"
|
||||||
|
v-model="fapi"
|
||||||
|
:rule="formCreateRule"
|
||||||
|
:option="formCreateOption"
|
||||||
|
></form-create>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="notice-box" v-if="!isCustomForm">
|
||||||
<i class="fa fa-exclamation-triangle"></i>
|
<i class="fa fa-exclamation-triangle"></i>
|
||||||
<strong>重要提示:</strong>
|
<strong>重要提示:</strong>
|
||||||
建家记录册、教职工之家建设考核评议自评表需由党委主要负责人签字盖章后扫描件上传
|
建家记录册、教职工之家建设考核评议自评表需由党委主要负责人签字盖章后扫描件上传
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="visible = false">取 消</el-button>
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
@@ -113,7 +125,12 @@ const write = {
|
|||||||
selfEvaluationFiles: [],
|
selfEvaluationFiles: [],
|
||||||
summaryFiles: [],
|
summaryFiles: [],
|
||||||
annualWorkSummaryFiles: []
|
annualWorkSummaryFiles: []
|
||||||
}
|
},
|
||||||
|
|
||||||
|
formCreateRule: [],
|
||||||
|
formCreateOption: {},
|
||||||
|
fapi: null,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -126,20 +143,27 @@ const write = {
|
|||||||
const endTime = new Date(this.activity.endTime).getTime()
|
const endTime = new Date(this.activity.endTime).getTime()
|
||||||
|
|
||||||
return now >= startTime && now <= endTime
|
return now >= startTime && now <= endTime
|
||||||
}
|
},
|
||||||
|
isCustomForm() {
|
||||||
|
return this.activity && this.activity.isCustomForm
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onOpen(id) {
|
onOpen(id) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.actId = id
|
this.actId = id
|
||||||
this.$axios.post("/platform/buildHome/material/act", { actId: id }).then((res) => {
|
this.$axios.post("/platform/buildHome/material/act", {actId: id}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.activity = res.data
|
this.activity = res.data
|
||||||
|
if (this.activity.formConfig) {
|
||||||
|
this.formCreateRule = formCreate.parseJson(this.activity.formConfig.rule)
|
||||||
|
this.formCreateOption = formCreate.parseJson(this.activity.formConfig.options)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$axios.post("/platform/buildHome/material/info", { actId: id }).then((res) => {
|
this.$axios.post("/platform/buildHome/material/info", {actId: id}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.formData = res.data
|
this.formData = res.data
|
||||||
} else {
|
} else {
|
||||||
@@ -148,29 +172,42 @@ const write = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmit() {
|
async onSubmit() {
|
||||||
if (!this.isWithinTimeRange) {
|
if (!this.isWithinTimeRange) {
|
||||||
this.$message.error("当前时间不在活动时间范围内,无法提交材料")
|
this.$message.error("当前时间不在活动时间范围内,无法提交材料")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.formData.logBookFiles.length === 0) {
|
if(!this.isCustomForm){
|
||||||
this.$message.warning("请上传建家记录册")
|
if (this.formData.logBookFiles.length === 0) {
|
||||||
return false
|
this.$message.warning("请上传建家记录册")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.formData.selfEvaluationFiles.length === 0) {
|
||||||
|
this.$message.warning("请上传自评表")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.formData.summaryFiles.length === 0) {
|
||||||
|
this.$message.warning("请上传职工小家建设情况汇总")
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.formData.selfEvaluationFiles.length === 0) {
|
if (this.isCustomForm && this.fapi) {
|
||||||
this.$message.warning("请上传自评表")
|
let formValid = false
|
||||||
return false
|
try {
|
||||||
}
|
await this.fapi.validate()
|
||||||
|
formValid = true
|
||||||
if (this.formData.summaryFiles.length === 0) {
|
} catch (e) {
|
||||||
this.$message.warning("请上传职工小家建设情况汇总")
|
formValid = false
|
||||||
return false
|
}
|
||||||
|
if (!formValid) return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$axios
|
this.$axios
|
||||||
.post("/platform/buildHome/material/submit", { material: JSON.stringify(this.formData) })
|
.post("/platform/buildHome/material/submit", {material: JSON.stringify(this.formData)})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$message.success("提交成功")
|
this.$message.success("提交成功")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column prop="honorTypeName" label="荣誉类型"></el-table-column>
|
<el-table-column prop="honorTypeName" label="荣誉类型"></el-table-column>
|
||||||
<el-table-column label="操作" width="200px">
|
<el-table-column label="操作" width="200px">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
<!-- <el-button size="mini" type="primary" @click="openView(row)">查看</el-button>-->
|
||||||
<el-button size="mini" type="primary" @click="openApply(row)">申请</el-button>
|
<el-button size="mini" type="primary" @click="openApply(row)">申请</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
+1
-6
@@ -47,12 +47,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<van-nav-bar
|
<van-nav-bar title="活动详情" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||||
title="活动详情"
|
|
||||||
left-text="返回"
|
|
||||||
left-arrow
|
|
||||||
@click-left="$pjaxReplace('/platform/mobile/trainSignUpActivity/trainList')"
|
|
||||||
></van-nav-bar>
|
|
||||||
|
|
||||||
<van-image height="186" src="/assets/mobile/img/trainSignUp/3quhtakfd4heeqsk6irqhft60p.png"></van-image>
|
<van-image height="186" src="/assets/mobile/img/trainSignUp/3quhtakfd4heeqsk6irqhft60p.png"></van-image>
|
||||||
<div class="title">{{activity.activityName}}</div>
|
<div class="title">{{activity.activityName}}</div>
|
||||||
|
|||||||
@@ -147,12 +147,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<van-nav-bar
|
<van-nav-bar :title="trainType + '列表'" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||||
:title="trainType + '列表'"
|
|
||||||
left-text="返回"
|
|
||||||
left-arrow
|
|
||||||
@click-left="$pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?isMySign=' + isMySign)"
|
|
||||||
></van-nav-bar>
|
|
||||||
|
|
||||||
<van-sticky>
|
<van-sticky>
|
||||||
<van-dropdown-menu>
|
<van-dropdown-menu>
|
||||||
@@ -727,7 +722,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
async pageData() {
|
async pageData() {
|
||||||
const resp = await this.$axios.post("/platform/mobile/trainSignUpActivity/findOne", {
|
const resp = await this.$axios.post("/platform/mobile/trainSignUpActivity/findOne", {
|
||||||
id: this.activityId,
|
id: this.activityId,
|
||||||
tabIndex: this.activityStatus
|
tabIndex: this.activityStatus,
|
||||||
|
fromMode: 'mobile',
|
||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.tableData = resp.data
|
this.tableData = resp.data
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
|
|
||||||
<van-tabbar v-model="pageForm.activityType" @change="doSearch">
|
<van-tabbar v-model="pageForm.activityType" @change="doSearch">
|
||||||
<van-tabbar-item icon="wap-home-o">活动列表</van-tabbar-item>
|
<van-tabbar-item icon="wap-home-o">活动列表</van-tabbar-item>
|
||||||
<van-tabbar-item icon="user-o">我报名的</van-tabbar-item>
|
<van-tabbar-item icon="user-o">我的报名</van-tabbar-item>
|
||||||
</van-tabbar>
|
</van-tabbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user