Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -89,7 +89,7 @@ public class MsgApi {
|
|||||||
*/
|
*/
|
||||||
public void sendWxMsg(String title, String url, String msgtype, String description, List<String> loginNames, String contentUrl) {
|
public void sendWxMsg(String title, String url, String msgtype, String description, List<String> loginNames, String contentUrl) {
|
||||||
|
|
||||||
if ("否".equals(Globals.MyConfig.getString("SengMsg"))) {
|
if ("false".equals(Strings.trim(Globals.MyConfig.getString("SengMsg")))) {
|
||||||
log.info("发送失败,消息暂未开启!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
log.info("发送失败,消息暂未开启!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ public class MsgApi {
|
|||||||
// if (!"news".equals(msgtype)) {
|
// if (!"news".equals(msgtype)) {
|
||||||
// title = "智慧工会";
|
// title = "智慧工会";
|
||||||
// }
|
// }
|
||||||
if (Globals.isEnv(Env.dev)){
|
if (Globals.isEnv(Env.dev)) {
|
||||||
log.info("发送失败,本地环境禁止发送!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
log.info("发送失败,本地环境禁止发送!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -146,7 +146,7 @@ public class MsgApi {
|
|||||||
m.put("title", title);
|
m.put("title", title);
|
||||||
m.put("description", description);
|
m.put("description", description);
|
||||||
//m.put("url", "");
|
//m.put("url", "");
|
||||||
m.put("picurl", "https://zhghydd.cpu.edu.cn/file_server/fileStreamPreview?id="+contentUrl);
|
m.put("picurl", "https://zhghydd.cpu.edu.cn/file_server/fileStreamPreview?id=" + contentUrl);
|
||||||
list.add(m);
|
list.add(m);
|
||||||
map.put("news", Map.of("articles", list));
|
map.put("news", Map.of("articles", list));
|
||||||
}
|
}
|
||||||
@@ -175,10 +175,20 @@ public class MsgApi {
|
|||||||
public void sendMsg(String content, List<String> toLoginNameList) {
|
public void sendMsg(String content, List<String> toLoginNameList) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
if ("false".equals(Strings.trim(Globals.MyConfig.getString("SengMsg")))) {
|
||||||
|
log.info("发送失败,消息暂未开启!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (Globals.isEnv(Env.dev)) {
|
||||||
|
log.info("发送失败,本地环境禁止发送!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
List<NutMap> mapList = new ArrayList<>();
|
List<NutMap> mapList = new ArrayList<>();
|
||||||
toLoginNameList.forEach(v->{
|
toLoginNameList.forEach(v -> {
|
||||||
NutMap nutMap = new NutMap();
|
NutMap nutMap = new NutMap();
|
||||||
nutMap.setv("touser",v);
|
nutMap.setv("touser", v);
|
||||||
mapList.add(nutMap);
|
mapList.add(nutMap);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -209,7 +219,7 @@ public class MsgApi {
|
|||||||
body.put("message", Json.toJson(a));
|
body.put("message", Json.toJson(a));
|
||||||
log.info(Json.toJson(body));
|
log.info(Json.toJson(body));
|
||||||
String postUrl = MSG_API + "?appid=" + APPID + "&tokenid=" + token + "&schoolcode=4";
|
String postUrl = MSG_API + "?appid=" + APPID + "&tokenid=" + token + "&schoolcode=4";
|
||||||
String post = Http.post(postUrl, body,10000);
|
String post = Http.post(postUrl, body, 10000);
|
||||||
|
|
||||||
JSONObject parseObject = JSON.parseObject(post);
|
JSONObject parseObject = JSON.parseObject(post);
|
||||||
|
|
||||||
|
|||||||
+17
@@ -204,6 +204,23 @@ public class ClubUserCountController {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无业务请求参数,response 为文件下载响应;返回 XLSX 文件流而非 JSON。
|
||||||
|
* 文件首列为社团名称,包含当前用户权限范围内的全部有效成员,不受页面筛选影响。
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@Ok("void")
|
||||||
|
@RequiresPermissions("sys.club.count")
|
||||||
|
public void exportAllUserExcel(HttpServletResponse response) throws IOException {
|
||||||
|
try (Workbook workbook = sysClubService.exportAllUserExcel()) {
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setHeader("Content-Disposition", "attachment;filename="
|
||||||
|
+ URLEncoder.encode("全部人员明细.xlsx", "UTF-8"));
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("void")
|
@Ok("void")
|
||||||
@RequiresPermissions("sys.club.count")
|
@RequiresPermissions("sys.club.count")
|
||||||
|
|||||||
+46
-2
@@ -1,6 +1,7 @@
|
|||||||
package io.v.nutz.sys.controllers.platform.sys.club.applyIn;
|
package io.v.nutz.sys.controllers.platform.sys.club.applyIn;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.wizzer.framework.base.Result;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.service.BaseService;
|
import io.v.nutz.base.service.BaseService;
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
import io.v.nutz.base.utils.DateUtil;
|
||||||
@@ -33,6 +34,9 @@ import org.nutz.mvc.annotation.At;
|
|||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -53,10 +57,32 @@ public class ClubApplyInController {
|
|||||||
public void index() {
|
public void index() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clubId 为二维码携带的社团主键,普通列表访问可不传。
|
||||||
|
* 返回手机页面,并将 URL 编码后的 scanClubId 写入页面,供挂载后打开指定社团使用;
|
||||||
|
* 编码避免请求参数中的引号、标签等内容进入页面脚本。
|
||||||
|
*/
|
||||||
@At("/mobile")
|
@At("/mobile")
|
||||||
@Ok("beetl:/mobile/club/inClub.html")
|
@Ok("beetl:/mobile/club/inClub.html")
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
public void mobile() {
|
public void mobile(@Param("clubId") String clubId, HttpServletRequest request) {
|
||||||
|
request.setAttribute("scanClubId",
|
||||||
|
URLEncoder.encode(StrUtil.blankToDefault(clubId, ""), StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clubId 必须传社团主键;当前用户从登录会话获取。
|
||||||
|
* 返回统一 JSON 结果,成功 data 为社团详情及当前用户 status,无效社团返回错误提示。
|
||||||
|
*/
|
||||||
|
@At
|
||||||
|
@RequiresAuthentication
|
||||||
|
public Object scanDetail(@Param("clubId") String clubId) {
|
||||||
|
if (StrUtil.isBlank(clubId)) {
|
||||||
|
return Result.error("请提供社团编号");
|
||||||
|
}
|
||||||
|
Object detail = sysClubService.scanDetail(clubId, ShiroUtil.getPlatformUid());
|
||||||
|
return detail == null ? Result.error("社团不存在或暂不可申请")
|
||||||
|
: Result.success("获取成功", detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -122,11 +148,29 @@ public class ClubApplyInController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clubid 为申请社团主键;birthday、mobile 为本次申请的出生日期和联系电话;
|
||||||
|
* medicalHistory 必须明确选择是或否,otherThing 为可选说明(最多 100 字);
|
||||||
|
* emergencyContact、emergencyMobile 为必填紧急联系人及电话。
|
||||||
|
* 申请人由登录会话确定;返回值由 ViReturn 包装为 code、msg、data 的 JSON 结果。
|
||||||
|
*/
|
||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("sys.club.sq")
|
@RequiresPermissions("sys.club.sq")
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object submit(Sys_club_user sys_club_user) {
|
public Object submit(Sys_club_user sys_club_user) {
|
||||||
|
// 在清理旧申请前校验必填项,false 表示无特殊病史,是有效选择。
|
||||||
|
if (StrUtil.isBlank(sys_club_user.getClubid()) || sys_club_user.getBirthday() == null
|
||||||
|
|| StrUtil.isBlank(sys_club_user.getMobile()) || sys_club_user.getMedicalHistory() == null
|
||||||
|
|| StrUtil.isBlank(sys_club_user.getEmergencyContact())
|
||||||
|
|| StrUtil.isBlank(sys_club_user.getEmergencyMobile())) {
|
||||||
|
throw new IllegalArgumentException("请完整填写出生年月、联系电话、特殊病史和紧急联系人信息");
|
||||||
|
}
|
||||||
|
if (sys_club_user.getMobile().length() > 20 || sys_club_user.getEmergencyContact().length() > 50
|
||||||
|
|| sys_club_user.getEmergencyMobile().length() > 20
|
||||||
|
|| (sys_club_user.getOtherThing() != null && sys_club_user.getOtherThing().length() > 100)) {
|
||||||
|
throw new IllegalArgumentException("联系电话最多20字,紧急联系人最多50字,特别说明最多100字");
|
||||||
|
}
|
||||||
sysClubUserService.clear(Cnd.where("clubid", "=", sys_club_user.getClubid()).and("userid", "=", ShiroUtil.getPrincipalProperty("id")));
|
sysClubUserService.clear(Cnd.where("clubid", "=", sys_club_user.getClubid()).and("userid", "=", ShiroUtil.getPrincipalProperty("id")));
|
||||||
|
|
||||||
String dateTime = DateUtil.getDateTime();
|
String dateTime = DateUtil.getDateTime();
|
||||||
@@ -269,7 +313,7 @@ public class ClubApplyInController {
|
|||||||
c.*,
|
c.*,
|
||||||
u.username,
|
u.username,
|
||||||
u.sex,
|
u.sex,
|
||||||
u.birthday
|
u.loginname
|
||||||
FROM
|
FROM
|
||||||
sys_club_user c
|
sys_club_user c
|
||||||
LEFT JOIN USER u ON c.userid = u.id
|
LEFT JOIN USER u ON c.userid = u.id
|
||||||
|
|||||||
@@ -136,6 +136,18 @@ public class Sys_club_user extends BaseModel {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
/** 本次入会申请的紧急联系人,不回写用户档案。 */
|
||||||
|
@Column
|
||||||
|
@Comment("紧急联系人")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
|
private String emergencyContact;
|
||||||
|
|
||||||
|
/** 紧急联系号码按文本保存,允许座机区号及国际区号。 */
|
||||||
|
@Column
|
||||||
|
@Comment("紧急联系电话")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String emergencyMobile;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("邮箱")
|
@Comment("邮箱")
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
|||||||
@@ -5,9 +5,23 @@ import cn.wizzer.framework.page.Pagination;
|
|||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.sys.models.Sys_club;
|
import io.v.nutz.sys.models.Sys_club;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
|
import org.nutz.dao.entity.Record;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
|
||||||
|
|
||||||
public interface SysClubService extends BaseService<Sys_club> {
|
public interface SysClubService extends BaseService<Sys_club> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按社团主键和当前登录用户主键查询扫码详情;返回社团字段、联系人、人数及 status
|
||||||
|
* (1/3 待审核、5 已加入、2/4 被拒绝、null 未申请),无有效社团时返回 null。
|
||||||
|
*/
|
||||||
|
Record scanDetail(String clubId, String userId);
|
||||||
|
|
||||||
Pagination pageData(Cnd cnd, PageForm page, Integer year, String name);
|
Pagination pageData(Cnd cnd, PageForm page, Integer year, String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无筛选及分页参数,按当前登录用户的数据权限导出全部正常且审核通过的社团成员。
|
||||||
|
* 返回 XSSF 工作簿,首列为社团名称,其余列为人员明细;调用方负责关闭工作簿。
|
||||||
|
*/
|
||||||
|
Workbook exportAllUserExcel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,133 @@
|
|||||||
package io.v.nutz.sys.services.impl;
|
package io.v.nutz.sys.services.impl;
|
||||||
|
|
||||||
|
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.wizzer.framework.base.service.BaseServiceImpl;
|
import cn.wizzer.framework.base.service.BaseServiceImpl;
|
||||||
import cn.wizzer.framework.page.Pagination;
|
import cn.wizzer.framework.page.Pagination;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
|
import io.v.nutz.base.service.BaseService;
|
||||||
import io.v.nutz.sys.models.Sys_club;
|
import io.v.nutz.sys.models.Sys_club;
|
||||||
import io.v.nutz.sys.services.SysClubService;
|
import io.v.nutz.sys.services.SysClubService;
|
||||||
|
import io.v.nutz.base.utils.Roles;
|
||||||
|
import io.v.nutz.sys.constant.club.ClubRegistAuditState;
|
||||||
|
import io.v.nutz.sys.models.Sys_user_role;
|
||||||
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
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.Sqls;
|
||||||
import org.nutz.dao.sql.Sql;
|
import org.nutz.dao.sql.Sql;
|
||||||
|
import org.nutz.dao.entity.Record;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@IocBean(args = {"refer:dao"})
|
@IocBean(args = {"refer:dao"})
|
||||||
public class SysClubServiceImpl extends BaseServiceImpl<Sys_club> implements SysClubService {
|
public class SysClubServiceImpl extends BaseServiceImpl<Sys_club> implements SysClubService {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseService baseService;
|
||||||
|
|
||||||
public SysClubServiceImpl(Dao dao) {
|
public SysClubServiceImpl(Dao dao) {
|
||||||
super(dao);
|
super(dao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合并导出所有可见社团的有效成员,不接收页面筛选参数;一条社团成员关系对应一行。
|
||||||
|
* 返回首列为社团名称的 XSSF 工作簿,同一人员加入多个社团时分别保留。
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Workbook exportAllUserExcel() {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
club.name AS clubName,
|
||||||
|
u.username,
|
||||||
|
u.loginname,
|
||||||
|
u.sex,
|
||||||
|
u.mobile,
|
||||||
|
u.unitname,
|
||||||
|
u.userState AS userState,
|
||||||
|
IF(c.giveMoney = true, '拨付', '不拨付') AS giveMoney,
|
||||||
|
IF(c.isjf = true, '已缴费', '未缴费') AS isjf,
|
||||||
|
(CASE c.sf WHEN 1 THEN '会长' WHEN 2 THEN '成员'
|
||||||
|
WHEN 3 THEN '副会长' WHEN 4 THEN '秘书长' WHEN 5 THEN '副秘书长' END) AS sf
|
||||||
|
FROM sys_club_user c
|
||||||
|
INNER JOIN sys_club club ON club.id = c.clubid
|
||||||
|
LEFT JOIN `user` u ON u.id = c.userid
|
||||||
|
$condition
|
||||||
|
ORDER BY club.code ASC, club.id ASC, FIELD(c.sf, 1, 3, 4, 5, 2), u.loginname ASC, c.id ASC
|
||||||
|
""");
|
||||||
|
// 社团范围及成员有效性与统计列表、人员明细保持一致。
|
||||||
|
Cnd cnd = Cnd.where("club.isjs", "=", false)
|
||||||
|
.and("club.state", "=", ClubRegistAuditState.SCHOOL_PASS)
|
||||||
|
.and("c.isNormal", "=", true)
|
||||||
|
.and("c.status", "=", 5);
|
||||||
|
List<NutMap> members = new ArrayList<>();
|
||||||
|
boolean canExport = true;
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly")) {
|
||||||
|
List<Sys_user_role> userRoles = dao().query(Sys_user_role.class,
|
||||||
|
Cnd.where("userid", "=", ShiroUtil.getPlatformUid()).and("roleid", "=", Roles.club01));
|
||||||
|
List<String> clubIds = userRoles.stream().map(Sys_user_role::getStid)
|
||||||
|
.filter(id -> id != null && !id.trim().isEmpty()).collect(Collectors.toList());
|
||||||
|
// 未分配社团时仅导出表头,防止空 IN 条件导致数据权限失效。
|
||||||
|
canExport = !clubIds.isEmpty();
|
||||||
|
if (canExport) {
|
||||||
|
cnd.and("club.id", "in", clubIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (canExport) {
|
||||||
|
sql.setCondition(cnd);
|
||||||
|
members = baseService.listMap(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ExcelExportEntity> columns = new ArrayList<>();
|
||||||
|
columns.add(new ExcelExportEntity("社团名称", "clubName", 30));
|
||||||
|
columns.add(new ExcelExportEntity("姓名", "username", 20));
|
||||||
|
columns.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||||
|
columns.add(new ExcelExportEntity("性别", "sex", 20));
|
||||||
|
columns.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
||||||
|
columns.add(new ExcelExportEntity("所在单位", "unitname", 30));
|
||||||
|
columns.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||||
|
columns.add(new ExcelExportEntity("是否拨付", "giveMoney", 20));
|
||||||
|
columns.add(new ExcelExportEntity("是否缴费", "isjf", 20));
|
||||||
|
columns.add(new ExcelExportEntity("职务", "sf", 20));
|
||||||
|
ExportParams exportParams = new ExportParams();
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
exportParams.setSheetName("全部人员明细");
|
||||||
|
return ExcelExportUtil.exportExcel(exportParams, columns, members);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫码仅展示已通过审批且未解散的社团;申请状态取当前用户的有效成员记录。
|
||||||
|
* clubId 为社团主键,userId 为登录用户主键,返回详情记录,无匹配记录返回 null。
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Record scanDetail(String clubId, String userId) {
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT club.*, fzr.username fzrname, unit.name fzr_unit_name,
|
||||||
|
(SELECT COUNT(1) FROM sys_club_user cu
|
||||||
|
WHERE cu.clubid = club.id AND cu.status = 5 AND cu.isNormal = true) cynum,
|
||||||
|
(SELECT cu.status FROM sys_club_user cu
|
||||||
|
WHERE cu.clubid = club.id AND cu.userid = @userId AND cu.isNormal = true
|
||||||
|
ORDER BY cu.join_time DESC LIMIT 1) status
|
||||||
|
FROM sys_club club
|
||||||
|
LEFT JOIN sys_user fzr ON fzr.id = club.concatPerson
|
||||||
|
LEFT JOIN sys_unit unit ON unit.id = fzr.unitid
|
||||||
|
WHERE club.id = @clubId AND club.isjs = false AND club.state = @state
|
||||||
|
""");
|
||||||
|
sql.setParam("clubId", clubId).setParam("userId", userId)
|
||||||
|
.setParam("state", ClubRegistAuditState.SCHOOL_PASS);
|
||||||
|
List<Record> records = list(sql);
|
||||||
|
return records.isEmpty() ? null : records.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Pagination pageData(Cnd cnd, PageForm page, Integer year, String name) {
|
public Pagination pageData(Cnd cnd, PageForm page, Integer year, String name) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class NutShiroProcessor extends AbstractProcessor {
|
|||||||
"/platform/login(/doLogin|/logout|/captcha)",
|
"/platform/login(/doLogin|/logout|/captcha)",
|
||||||
"/platform/qywechat/.*",
|
"/platform/qywechat/.*",
|
||||||
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
||||||
// "/mobile/login",
|
"/mobile/login",
|
||||||
"/mobile/login/doLogin",
|
"/mobile/login/doLogin",
|
||||||
"/platform/jsz/login",
|
"/platform/jsz/login",
|
||||||
"/platform/activity/basic/scope/getScopeUser",
|
"/platform/activity/basic/scope/getScopeUser",
|
||||||
|
|||||||
@@ -34,6 +34,67 @@ const clone = (val) => {
|
|||||||
return JSON.parse(JSON.stringify(val))
|
return JSON.parse(JSON.stringify(val))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// H5 页面按需注册弹框同步回调;全站只保留一个 popstate 监听,弹框按后进先出关闭。
|
||||||
|
const mobilePopupHistory = {
|
||||||
|
owner: null,
|
||||||
|
token: null,
|
||||||
|
stack: [],
|
||||||
|
pending: null,
|
||||||
|
register(sync) {
|
||||||
|
this.owner = sync
|
||||||
|
this.token = String(Date.now()) + Math.random()
|
||||||
|
this.stack = []
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
open(key) {
|
||||||
|
if (!this.owner || this.pending || this.stack.includes(key)) return
|
||||||
|
this.stack.push(key)
|
||||||
|
window.history.pushState(Object.assign({}, window.history.state, {
|
||||||
|
mobilePopupDepth: this.stack.length,
|
||||||
|
mobilePopupOwner: this.token
|
||||||
|
}), '', window.location.href)
|
||||||
|
this.owner(key, true)
|
||||||
|
},
|
||||||
|
// 返回 Promise,关闭确认框后再提交,避免回退尚未完成便清理父级弹框。
|
||||||
|
close() {
|
||||||
|
if (this.pending) return this.pending.promise
|
||||||
|
if (!this.stack.length) return Promise.resolve()
|
||||||
|
return this.back(1)
|
||||||
|
},
|
||||||
|
back(count) {
|
||||||
|
let complete
|
||||||
|
const promise = new Promise(resolve => { complete = resolve })
|
||||||
|
this.pending = {promise, complete}
|
||||||
|
window.history.go(-count)
|
||||||
|
return promise
|
||||||
|
},
|
||||||
|
clear() {
|
||||||
|
if (this.pending) return this.pending.promise.then(() => this.clear())
|
||||||
|
return this.stack.length ? this.back(this.stack.length) : Promise.resolve()
|
||||||
|
},
|
||||||
|
unregister(sync) {
|
||||||
|
if (this.owner !== sync) return
|
||||||
|
this.owner = null
|
||||||
|
this.stack = []
|
||||||
|
},
|
||||||
|
onPop(event) {
|
||||||
|
if (!this.owner) return
|
||||||
|
const depth = event.state && event.state.mobilePopupOwner === this.token
|
||||||
|
? event.state.mobilePopupDepth : 0
|
||||||
|
// 弹框回退由本管理器消费,避免 PJAX 同时将其识别为业务页面切换。
|
||||||
|
if (this.stack.length > depth || this.pending) event.stopImmediatePropagation()
|
||||||
|
while (this.stack.length > depth) {
|
||||||
|
this.owner(this.stack.pop(), false)
|
||||||
|
}
|
||||||
|
if (this.pending) {
|
||||||
|
const complete = this.pending.complete
|
||||||
|
this.pending = null
|
||||||
|
complete()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.addEventListener('popstate', event => mobilePopupHistory.onPop(event), true)
|
||||||
|
|
||||||
const toChinesNum = (num) => {
|
const toChinesNum = (num) => {
|
||||||
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||||
let unit = ["", "十", "百", "千", "万"];
|
let unit = ["", "十", "百", "千", "万"];
|
||||||
|
|||||||
@@ -6,74 +6,15 @@
|
|||||||
<vi-title title="基础信息"></vi-title>
|
<vi-title title="基础信息"></vi-title>
|
||||||
|
|
||||||
<el-descriptions :column="3" border class="table_fixed">
|
<el-descriptions :column="3" border class="table_fixed">
|
||||||
<el-descriptions-item label="姓名">
|
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
|
||||||
{{viewData.username}}
|
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">
|
<el-descriptions-item label="出生年月">{{ viewData.birthday ? moment(viewData.birthday).format('YYYY-MM-DD') : '' }}</el-descriptions-item>
|
||||||
{{viewData.sex}}
|
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="是否有特殊病史">{{ viewData.medicalHistory === true ? '是' : viewData.medicalHistory === false ? '否' : '' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="出生年月">
|
<el-descriptions-item label="是否有特别需要说明的问题" :span="3">{{ viewData.otherThing }}</el-descriptions-item>
|
||||||
{{moment(viewData.birthday).format('YYYY-MM-DD')}}
|
<el-descriptions-item label="紧急联系人">{{ viewData.emergencyContact }}</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="紧急联系电话">{{ viewData.emergencyMobile }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="出生地">
|
|
||||||
{{viewData.birthPlace}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="文化程度">
|
|
||||||
{{viewData.education}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="爱好">
|
|
||||||
{{viewData.hobby}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="工作部门">
|
|
||||||
{{viewData.unitName}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="职务">
|
|
||||||
{{viewData.position}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="电话">
|
|
||||||
{{viewData.mobile}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="电子邮箱">
|
|
||||||
{{viewData.email}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="家庭住址">
|
|
||||||
{{viewData.homeAddress}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="QQ">
|
|
||||||
{{viewData.QQNumber}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="身高">
|
|
||||||
{{viewData.bodyHeight}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="体重">
|
|
||||||
{{viewData.bodyWeight}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="身体状况">
|
|
||||||
{{viewData.health}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="经常从事的运动">
|
|
||||||
{{viewData.sport}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="是否有过特殊病史">
|
|
||||||
{{viewData.medicalHistory === true ? '是' : '否'}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="是否愿意参加本协会的活动">
|
|
||||||
{{viewData.joinActivity === true ? '是' : '否'}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3" label="特别需要说明的问题(身体或心理)">
|
|
||||||
<div class="text-left" v-html="viewData.otherThing"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3" label="备注">
|
|
||||||
<div class="text-left" v-html="viewData.remark"></div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item span="3">
|
|
||||||
<template slot="label">两寸登记照</template>
|
|
||||||
<div class="text-left">
|
|
||||||
<el-image
|
|
||||||
style="width: 100px; height: 120px"
|
|
||||||
:src="FILE_STREAM_PREVIEW_ADDRESS + '?id=' + viewData.photo"></el-image>
|
|
||||||
</div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -139,14 +80,15 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
return this.panes.includes(name)
|
return this.panes.includes(name)
|
||||||
},
|
},
|
||||||
async getInfo(id) {
|
// id 为入会记录主键;data 返回申请资料和审核信息,历史新增字段可为空。
|
||||||
this.loading = true
|
getInfo(id) {
|
||||||
const {data, code, msg} = await $.get('/platform/sys/club/sq/findOne', {id})
|
this.$set(this, 'loading', true)
|
||||||
this.loading = false
|
$.post('/platform/sys/club/sq/findOne', {id}).then(res => {
|
||||||
if (data) {
|
if (res.code === 0 && res.data) {
|
||||||
this.clubUserInfo = this.handle ? "999" : "1"
|
this.$set(this, 'clubUserInfo', this.handle ? '999' : '1')
|
||||||
this.viewData = data
|
this.$set(this, 'viewData', res.data)
|
||||||
}
|
}
|
||||||
|
}).always(() => { this.$set(this, 'loading', false) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ layout("/mobile/platform.html"){
|
|||||||
left-arrow
|
left-arrow
|
||||||
placeholder
|
placeholder
|
||||||
fixed
|
fixed
|
||||||
@click-left="pjaxReplace('/mobile/index')"
|
@click-left="leavePage"
|
||||||
safe-area-inset-top
|
safe-area-inset-top
|
||||||
></van-nav-bar>
|
></van-nav-bar>
|
||||||
|
|
||||||
@@ -207,13 +207,13 @@ layout("/mobile/platform.html"){
|
|||||||
></van-empty>
|
></van-empty>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<van-popup v-model="infoShow" get-container="#app" position="right" :style="{ height: '100%', width: '100%' }">
|
<van-popup v-model="infoShow" :close-on-click-overlay="false" get-container="#app" position="right" :style="{ height: '100%', width: '100%' }">
|
||||||
<van-nav-bar
|
<van-nav-bar
|
||||||
title="社团详细信息"
|
title="社团详细信息"
|
||||||
left-arrow
|
left-arrow
|
||||||
placeholder
|
placeholder
|
||||||
fixed
|
fixed
|
||||||
@click-left="infoShow = false"
|
@click-left="closePopup"
|
||||||
safe-area-inset-top></van-nav-bar>
|
safe-area-inset-top></van-nav-bar>
|
||||||
<van-tabs v-model="infoActive">
|
<van-tabs v-model="infoActive">
|
||||||
<van-tab title="社团信息">
|
<van-tab title="社团信息">
|
||||||
@@ -233,94 +233,29 @@ layout("/mobile/platform.html"){
|
|||||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
|
<div class="footer" v-if="canJoin">
|
||||||
|
<van-button class="join" @click="startJoin">我要加入</van-button>
|
||||||
|
</div>
|
||||||
|
<van-cell v-else title="申请状态" :value="joinStatus"></van-cell>
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab v-if="viewType === 'join'" title="个人信息">
|
<van-tab v-if="viewType === 'join'" title="个人信息">
|
||||||
<van-form @submit="needJoin" ref="form" :show-error-message="false">
|
<van-form @submit="needJoin" ref="form" :show-error-message="false">
|
||||||
<van-cell-group inset class="mt10">
|
<van-cell-group inset class="mt10">
|
||||||
<van-field readonly v-model="formData.username" name="username"
|
<van-field v-model="formData.username" name="username" label="姓名" placeholder="请填写姓名" readonly required :rules="[{ required: true, message: '请填写姓名' }]"></van-field>
|
||||||
label="姓名" :rules="[{ required: true }]"></van-field>
|
<van-field v-model="formData.sex" name="sex" label="性别" placeholder="请填写性别" readonly required :rules="[{ required: true, message: '请填写性别' }]"></van-field>
|
||||||
<van-field readonly v-model="formData.sex" name="sex"
|
<van-field v-model="formData.loginname" name="loginname" label="工号" placeholder="请填写工号" readonly required :rules="[{ required: true, message: '请填写工号' }]"></van-field>
|
||||||
label="性别" :rules="[{ required: true }]"></van-field>
|
<van-field v-model="formData.birthday" name="birthday" label="出生年月" placeholder="请填写出生年月" readonly @click="openBirthday" required :rules="[{ required: true, message: '请填写出生年月' }]"></van-field>
|
||||||
<van-field v-model="formData.birthday" name="birthday" required
|
<van-popup v-model="showPicker" position="bottom" :close-on-click-overlay="false">
|
||||||
@click="showPicker = true"
|
<van-datetime-picker v-model="birthdayPickerValue" type="date" :min-date="birthdayMinDate" :max-date="birthdayMaxDate" title="选择出生日期" @confirm="confirmBirthday" @cancel="closePopup"></van-datetime-picker>
|
||||||
placeholder="请填写出生年月" label="出生年月" :rules="[{ required: true }]">
|
|
||||||
</van-field>
|
|
||||||
<van-popup v-model="showPicker" position="bottom">
|
|
||||||
<van-datetime-picker
|
|
||||||
type="date"
|
|
||||||
title="选择年月日"
|
|
||||||
@confirm="(val) => {formData.birthday = moment(val).format('YYYY-MM-DD'); showPicker = false}"
|
|
||||||
@cancel="showPicker = false"
|
|
||||||
></van-datetime-picker>
|
|
||||||
</van-popup>
|
</van-popup>
|
||||||
<van-field v-model="formData.birthPlace" name="birthPlace" required
|
<van-field v-model="formData.mobile" name="mobile" label="联系电话" placeholder="请填写联系电话" maxlength="20" required :rules="[{ required: true, message: '请填写联系电话' }]"></van-field>
|
||||||
placeholder="请填写出生地" label="出生地" :rules="[{ required: true }]"></van-field>
|
<van-field name="medicalHistory" label="是否有特殊病史" required><template #input><van-radio-group v-model="formData.medicalHistory" direction="horizontal"><van-radio :name="true">是</van-radio><van-radio :name="false">否</van-radio></van-radio-group></template></van-field>
|
||||||
<van-field v-model="formData.education" name="education" required
|
<van-field v-model="formData.otherThing" name="otherThing" label="是否有特别需要说明的问题" placeholder="如有,请填写特别需要说明的问题" maxlength="100" type="textarea" autosize></van-field>
|
||||||
placeholder="请填写文化程度" label="文化程度" :rules="[{ required: true }]"></van-field>
|
<van-field v-model="formData.emergencyContact" name="emergencyContact" label="紧急联系人" placeholder="请填写紧急联系人" maxlength="50" required :rules="[{ required: true, message: '请填写紧急联系人' }]"></van-field>
|
||||||
<van-field v-model="formData.hobby" name="hobby" required
|
<van-field v-model="formData.emergencyMobile" name="emergencyMobile" label="紧急联系电话" placeholder="请填写紧急联系电话" maxlength="20" required :rules="[{ required: true, message: '请填写紧急联系电话' }]"></van-field>
|
||||||
placeholder="请填写爱好" label="爱好" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.unitName" name="unitName" required
|
|
||||||
readonly label="工作部门" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.position" name="position" required
|
|
||||||
placeholder="请填写职务" label="职务" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.mobile" name="mobile" required
|
|
||||||
placeholder="请填写电话" label="电话" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.email" name="email" required
|
|
||||||
placeholder="请填写电子邮箱" label="电子邮箱" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.homeAddress" name="homeAddress" required
|
|
||||||
placeholder="请填写家庭住址" label="家庭住址" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.QQNumber" name="QQNumber" required
|
|
||||||
placeholder="请填写QQ" label="QQ" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.bodyHeight" name="bodyHeight" required
|
|
||||||
placeholder="请填写身高" label="身高" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.bodyWeight" name="bodyWeight" required
|
|
||||||
placeholder="请填写体重" label="体重" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.health" name="health" required
|
|
||||||
placeholder="请填写身体状况" label="身体状况" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field v-model="formData.sport" name="sport" required
|
|
||||||
placeholder="请填写经常从事的运动" label="经常从事的运动" :rules="[{ required: true }]"></van-field>
|
|
||||||
<van-field name="medicalHistory" required
|
|
||||||
placeholder="是否有过特殊病史" label="是否有过特殊病史">
|
|
||||||
<template #input>
|
|
||||||
<van-radio-group v-model="formData.medicalHistory" direction="horizontal">
|
|
||||||
<van-radio :name="true">是</van-radio>
|
|
||||||
<van-radio :name="false">否</van-radio>
|
|
||||||
</van-radio-group>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
<van-field name="joinActivity" required
|
|
||||||
placeholder="是否愿意参加本协会的活动" label="是否愿意参加本协会的活动">
|
|
||||||
<template #input>
|
|
||||||
<van-radio-group v-model="formData.joinActivity" direction="horizontal">
|
|
||||||
<van-radio :name="true">是</van-radio>
|
|
||||||
<van-radio :name="false">否</van-radio>
|
|
||||||
</van-radio-group>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
<van-field v-model="formData.otherThing" name="otherThing"
|
|
||||||
rows="1"
|
|
||||||
autosize
|
|
||||||
type="textarea"
|
|
||||||
placeholder="是否有特别需要说明的问题(身体或心理)" label="是否有特别需要说明的问题"></van-field>
|
|
||||||
<van-field v-model="formData.remark" name="remark"
|
|
||||||
rows="1"
|
|
||||||
autosize
|
|
||||||
type="textarea"
|
|
||||||
placeholder="备注" label="备注"></van-field>
|
|
||||||
<van-field name="photo" label="两寸登记照" required
|
|
||||||
style="flex-flow: column" input-align="left">
|
|
||||||
<template #label>
|
|
||||||
<div class="mb10">两寸登记照</div>
|
|
||||||
</template>
|
|
||||||
<template #input>
|
|
||||||
<vant-file-upload
|
|
||||||
:max="1"
|
|
||||||
:files.sync="formData.photo"></vant-file-upload>
|
|
||||||
</template>
|
|
||||||
</van-field>
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<van-button class="join join_submit" native-type="submit">申请加入</van-button>
|
<van-button class="join join_submit" :loading="formLoading" native-type="submit">申请加入</van-button>
|
||||||
</div>
|
</div>
|
||||||
</van-form>
|
</van-form>
|
||||||
</van-tab>
|
</van-tab>
|
||||||
@@ -336,6 +271,9 @@ layout("/mobile/platform.html"){
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showPicker: false,
|
showPicker: false,
|
||||||
|
birthdayPickerValue: new Date(),
|
||||||
|
birthdayMinDate: new Date(1900, 0, 1),
|
||||||
|
birthdayMaxDate: new Date(),
|
||||||
infoActive: 0,
|
infoActive: 0,
|
||||||
clickRow: {},
|
clickRow: {},
|
||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
@@ -343,17 +281,77 @@ layout("/mobile/platform.html"){
|
|||||||
infoShow: false,
|
infoShow: false,
|
||||||
detailData: {},
|
detailData: {},
|
||||||
viewType: '',
|
viewType: '',
|
||||||
|
formLoading: false,
|
||||||
|
// 服务端保留本次页面请求的社团 ID,避免依赖页面切换时的地址栏状态。
|
||||||
|
scanClubId: decodeURIComponent('${scanClubId!}'.replace(/\+/g, '%20')),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
canJoin() {
|
||||||
|
return !!this.detailData.id && ![1, 3, 5].includes(Number(this.detailData.status))
|
||||||
|
},
|
||||||
|
joinStatus() {
|
||||||
|
return {1: '待社团审核', 3: '待校工会审核', 5: '已加入'}[this.detailData.status] || ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showCode(type) {
|
// 所有弹层由统一历史栈同步;页面不单独监听 popstate。
|
||||||
if(type === 'QQ' && this.clickRow.qqgroupcode) {
|
syncPopup(key, visible) {
|
||||||
const ids = JSON.parse(this.clickRow.qqgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
if (key === 'info') this.$set(this, 'infoShow', visible)
|
||||||
vant.ImagePreview({images: ids})
|
if (key === 'birthday') this.$set(this, 'showPicker', visible)
|
||||||
} else if(type === 'weChat' && this.clickRow.wechatgroupcode) {
|
if (key === 'confirm' && !visible) vant.Dialog.close()
|
||||||
const ids = JSON.parse(this.clickRow.wechatgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
if (key === 'preview' && !visible && this.clubPreview) this.clubPreview.close()
|
||||||
vant.ImagePreview({images: ids})
|
},
|
||||||
|
closePopup() {
|
||||||
|
return mobilePopupHistory.close()
|
||||||
|
},
|
||||||
|
leavePage() {
|
||||||
|
if (mobilePopupHistory.stack.length) {
|
||||||
|
this.closePopup()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
this.disposePopup()
|
||||||
|
pjaxReplace('/mobile/index')
|
||||||
|
},
|
||||||
|
disposePopup() {
|
||||||
|
mobilePopupHistory.unregister(this.syncPopup)
|
||||||
|
$(document).off('pjax:beforeSend.clubScan')
|
||||||
|
},
|
||||||
|
openBirthday() {
|
||||||
|
// 选择器定位到系统出生日期;档案为空时允许用户补填。
|
||||||
|
const date = moment(this.formData.birthday, 'YYYY-MM-DD', true)
|
||||||
|
this.$set(this, 'birthdayPickerValue', date.isValid() ? date.toDate() : new Date())
|
||||||
|
mobilePopupHistory.open('birthday')
|
||||||
|
},
|
||||||
|
confirmBirthday(value) {
|
||||||
|
this.$set(this.formData, 'birthday', moment(value).format('YYYY-MM-DD'))
|
||||||
|
this.closePopup()
|
||||||
|
},
|
||||||
|
// 确认/取消先回退本层历史,系统返回由同步回调关闭确认框。
|
||||||
|
confirmAction(message) {
|
||||||
|
mobilePopupHistory.open('confirm')
|
||||||
|
return vant.Dialog.confirm({title: '提示', message, closeOnPopstate: false})
|
||||||
|
.then(() => this.closePopup())
|
||||||
|
.catch(() => {
|
||||||
|
if (mobilePopupHistory.stack.includes('confirm')) {
|
||||||
|
return this.closePopup().then(() => Promise.reject())
|
||||||
|
}
|
||||||
|
return Promise.reject()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showCode(type) {
|
||||||
|
const files = type === 'QQ' ? this.detailData.qqgroupcode : this.detailData.wechatgroupcode
|
||||||
|
if (!files) return
|
||||||
|
const images = (typeof files === 'string' ? JSON.parse(files) : files)
|
||||||
|
.map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||||
|
if (!images.length) return
|
||||||
|
mobilePopupHistory.open('preview')
|
||||||
|
this.clubPreview = vant.ImagePreview({
|
||||||
|
images, closeOnPopstate: false,
|
||||||
|
onClose: () => {
|
||||||
|
if (mobilePopupHistory.stack.includes('preview')) this.closePopup()
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
doSearch() {
|
doSearch() {
|
||||||
this.pageForm.pageNumber = 1
|
this.pageForm.pageNumber = 1
|
||||||
@@ -361,7 +359,7 @@ layout("/mobile/platform.html"){
|
|||||||
this.finished = false
|
this.finished = false
|
||||||
this.onLoad()
|
this.onLoad()
|
||||||
},
|
},
|
||||||
async onLoad() {
|
onLoad() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
|
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@@ -372,99 +370,139 @@ layout("/mobile/platform.html"){
|
|||||||
this.pageForm.pageNumber++
|
this.pageForm.pageNumber++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false
|
}).always(() => { this.loading = false })
|
||||||
})
|
|
||||||
},
|
},
|
||||||
openInfo(row, type) {
|
openInfo(row, type) {
|
||||||
this.viewType = type
|
if (this.mLoading) return
|
||||||
this.infoActive = type === 'view' ? 0 : 1
|
this.mLoading = true
|
||||||
if(type === 'join') {
|
// clubId 是社团主键;data 返回详情及登录用户状态,不受列表页码、筛选影响。
|
||||||
this.formData = {
|
$.post('/platform/sys/club/sq/scanDetail', {clubId: row.id}).then(res => {
|
||||||
|
if (res.code !== 0) {
|
||||||
|
vant.Toast(res.msg || '社团信息加载失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.detailData = res.data
|
||||||
|
this.clickRow = res.data
|
||||||
|
this.viewType = 'view'
|
||||||
|
this.infoActive = 0
|
||||||
|
if (this.canJoin && (type === 'join' || type === 'scan')) {
|
||||||
|
this.prepareJoin()
|
||||||
|
}
|
||||||
|
// 等待条件页签及弹框渲染后再打开;扫码先展示社团信息,列表申请展示个人信息。
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.infoActive = type === 'join' && this.canJoin ? 1 : 0
|
||||||
|
mobilePopupHistory.open('info')
|
||||||
|
})
|
||||||
|
}).fail(() => vant.Toast('社团信息加载失败,请重试'))
|
||||||
|
.always(() => { this.mLoading = false })
|
||||||
|
},
|
||||||
|
startJoin() {
|
||||||
|
if (!this.canJoin) return
|
||||||
|
// 已进入加入模式时保留用户填写的数据,不因切换页签再次清空。
|
||||||
|
if (this.viewType !== 'join') this.prepareJoin()
|
||||||
|
this.$nextTick(() => { this.infoActive = 1 })
|
||||||
|
},
|
||||||
|
// 初始化当前社团的加入表单;扫码展示两个页签时也复用此方法。
|
||||||
|
prepareJoin() {
|
||||||
|
this.viewType = 'join'
|
||||||
|
this.$set(this, 'formData', {
|
||||||
username: "${@shiro.getPrincipalProperty('username')}",
|
username: "${@shiro.getPrincipalProperty('username')}",
|
||||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||||
|
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||||
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
|
|
||||||
education: "${@shiro.getPrincipalProperty('education')}",
|
|
||||||
hobby: "${@shiro.getPrincipalProperty('hobby')}",
|
|
||||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
|
||||||
position: "${@shiro.getPrincipalProperty('position')}",
|
|
||||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||||
email: "${@shiro.getPrincipalProperty('email')}",
|
medicalHistory: null, otherThing: '', emergencyContact: '', emergencyMobile: ''
|
||||||
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
|
})
|
||||||
}
|
|
||||||
}
|
|
||||||
this.clickRow = row
|
|
||||||
$.get("/platform/sys/club/mange/findOne", {id: row.id}, (data) => {
|
|
||||||
if (data.code === 0) {
|
|
||||||
this.detailData = data.data
|
|
||||||
this.infoShow = true
|
|
||||||
}
|
|
||||||
}, "json");
|
|
||||||
},
|
},
|
||||||
async needJoin() {
|
needJoin() {
|
||||||
|
if (this.formLoading || !this.canJoin) return
|
||||||
const row = this.clickRow
|
const row = this.clickRow
|
||||||
if(this.formData.medicalHistory === '' || this.formData.medicalHistory === undefined || this.formData.medicalHistory === null) {
|
if(this.formData.medicalHistory === '' || this.formData.medicalHistory === undefined || this.formData.medicalHistory === null) {
|
||||||
vant.Toast('请选择是否有过特殊病史')
|
vant.Toast('请选择是否有特殊病史')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(this.formData.joinActivity === '' || this.formData.joinActivity === undefined || this.formData.joinActivity === null) {
|
this.$set(this, 'formLoading', true)
|
||||||
vant.Toast('请选择是否愿意参加本协会的活动')
|
$.post('/platform/sys/club/sq/getInClubByCurUser').then(res => {
|
||||||
return
|
if (res.code !== 0) {
|
||||||
}
|
vant.Toast(res.msg)
|
||||||
if(this.formData.photo === '' || this.formData.photo === undefined || this.formData.photo === null) {
|
return
|
||||||
vant.Toast('请上传两寸登记照')
|
}
|
||||||
return
|
const data = res.data
|
||||||
}
|
let str = ''
|
||||||
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
|
if (data && data.length > 0) {
|
||||||
let str = ''
|
str = '您已经加入了'
|
||||||
if (data && data.length > 0) {
|
data.forEach((item) => {
|
||||||
str = '您已经加入了'
|
str += '【' + item.name + '】'
|
||||||
data.forEach((item) => {
|
})
|
||||||
str += '【' + item.name + '】'
|
str += ','
|
||||||
})
|
}
|
||||||
str += ','
|
str += '请确认是否申请加入【' + row.name + '】?'
|
||||||
}
|
this.confirmAction(str).then(() => {
|
||||||
str += '请确认是否申请加入【' + row.name + '】?'
|
this.$set(this, 'formLoading', true)
|
||||||
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
|
// 仅提交精简后的入会资料,出生年月和电话不回写用户档案。
|
||||||
this.formData.clubid = row.id
|
const params = Object.assign({}, this.formData, {
|
||||||
this.formData.photo = this.formData.photo[0].filepath
|
clubid: row.id
|
||||||
$.post("/platform/sys/club/sq/submit", this.formData, (data) => {
|
})
|
||||||
if (data.code === 0) {
|
$.post("/platform/sys/club/sq/submit", params).then(data => {
|
||||||
vant.Toast(data.msg)
|
if (data.code === 0) {
|
||||||
this.doSearch()
|
vant.Toast(data.msg)
|
||||||
this.infoShow = false
|
mobilePopupHistory.clear().then(() => this.doSearch())
|
||||||
} else {
|
} else {
|
||||||
vant.Toast(data.msg)
|
vant.Toast(data.msg)
|
||||||
}
|
}
|
||||||
}, "json");
|
}).always(() => { this.$set(this, 'formLoading', false) })
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
|
}).always(() => { this.$set(this, 'formLoading', false) })
|
||||||
},
|
},
|
||||||
rollback(o) {
|
rollback(o) {
|
||||||
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
|
this.confirmAction('请确定是否撤销申请?').then(() => {
|
||||||
const id = o.id
|
const id = o.id
|
||||||
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
|
this.$set(this, 'formLoading', true)
|
||||||
|
$.post("/platform/sys/club/sq/revocation", {id}).then(data => {
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
vant.Toast('撤销申请成功');
|
vant.Toast('撤销申请成功');
|
||||||
this.doSearch();
|
this.doSearch();
|
||||||
} else {
|
} else {
|
||||||
vant.Toast(data.msg);
|
vant.Toast(data.msg);
|
||||||
}
|
}
|
||||||
}, "json");
|
}).always(() => { this.$set(this, 'formLoading', false) })
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
created() {
|
||||||
const data = await getClubType()
|
mobilePopupHistory.register(this.syncPopup)
|
||||||
data.forEach(item => {
|
// PJAX 离开前先清理弹框历史,重新发起原页面跳转,并注销本页回调。
|
||||||
this.typeOptions.push({text: item.name, value: item.code})
|
$(document).on('pjax:beforeSend.clubScan', (event, xhr, options) => {
|
||||||
|
if (mobilePopupHistory.stack.length) {
|
||||||
|
event.preventDefault()
|
||||||
|
mobilePopupHistory.clear().then(() => {
|
||||||
|
this.disposePopup()
|
||||||
|
pjaxReplace(options.url)
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.disposePopup()
|
||||||
})
|
})
|
||||||
this.typeOptions.unshift({text: '全部类型'})
|
this.$set(this.pageForm, 'isjr', false)
|
||||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
this.$set(this.pageForm, 'searchName', 'club.name')
|
||||||
this.$set(this.pageForm, "isjr", this.clubType[0].value)
|
|
||||||
this.pageForm.searchName = 'club.name'
|
|
||||||
this.onLoad()
|
this.onLoad()
|
||||||
|
getClubType().then(data => {
|
||||||
|
data.forEach(item => {
|
||||||
|
this.typeOptions.push({text: item.name, value: item.code})
|
||||||
|
})
|
||||||
|
this.typeOptions.unshift({text: '全部类型'})
|
||||||
|
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 兼容已有二维码;无 clubId 的普通入口仍显示列表,不猜测目标社团。
|
||||||
|
const clubId = this.scanClubId || new URLSearchParams(window.location.search).get('clubId')
|
||||||
|
if (clubId) this.openInfo({id: clubId}, 'scan')
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
mobilePopupHistory.clear().then(() => this.disposePopup())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -58,6 +58,38 @@ layout("/layouts/platform.html"){
|
|||||||
margin: 0 0 18px;
|
margin: 0 0 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 仅调整入会表单,避免影响公共表格组件及其他业务页面。 */
|
||||||
|
#app .club-apply-form th,
|
||||||
|
#app .club-apply-form .el-form-item__label {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .club-apply-form .el-form-item__label {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app .club-apply-form th.club-required::before {
|
||||||
|
content: "*";
|
||||||
|
color: #f56c6c;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 校验信息占据字段下方的正常文档流,长提示也不会遮挡下一行。 */
|
||||||
|
#app .club-apply-form .el-form-item__error {
|
||||||
|
position: relative;
|
||||||
|
top: auto;
|
||||||
|
left: auto;
|
||||||
|
z-index: auto;
|
||||||
|
background: transparent;
|
||||||
|
color: #f56c6c;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 4px 0 0;
|
||||||
|
min-width: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
|
|
||||||
@@ -142,10 +174,11 @@ layout("/layouts/platform.html"){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="操作" width="350px">
|
<el-table-column align="center" header-align="center" label="操作" width="430px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" @click="openDetail(scope.row, 'view')">查看
|
<el-button size="mini" type="primary" @click="openDetail(scope.row, 'view')">查看
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button size="mini" type="primary" @click="openClubCode(scope.row)">二维码</el-button>
|
||||||
<el-button type="primary" size="mini" v-if="activeName=='true'" @click="doExportApply(scope.row)">导出申请表</el-button>
|
<el-button type="primary" size="mini" v-if="activeName=='true'" @click="doExportApply(scope.row)">导出申请表</el-button>
|
||||||
<!-- <el-button size="mini" v-if="activeName=='false'" type="primary"-->
|
<!-- <el-button size="mini" v-if="activeName=='false'" type="primary"-->
|
||||||
<!-- @click="openDetail(scope.row, 'join')">-->
|
<!-- @click="openDetail(scope.row, 'join')">-->
|
||||||
@@ -254,157 +287,57 @@ layout("/layouts/platform.html"){
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane v-if="viewType === 'join'" name="second" label="个人信息">
|
<el-tab-pane v-if="viewType === 'join'" name="second" label="个人信息">
|
||||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="top"
|
<el-form class="club-apply-form" :model="formData" ref="form" :rules="formRules" label-position="top" label-width="160px">
|
||||||
label-width="120px">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="username" label="姓名">
|
<el-form-item prop="username" label="姓名">
|
||||||
<el-input v-model="formData.username" disabled></el-input>
|
<el-input v-model="formData.username" readonly></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="sex" label="性别">
|
<el-form-item prop="sex" label="性别">
|
||||||
<el-input v-model="formData.sex" disabled></el-input>
|
<el-input v-model="formData.sex" readonly></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="birthday" label="出生年月">
|
<el-form-item prop="loginname" label="工号">
|
||||||
<el-date-picker
|
<el-input v-model="formData.loginname" readonly></el-input>
|
||||||
v-model="formData.birthday"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择出生年月">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="birthPlace" label="出生地">
|
<el-form-item prop="birthday" label="出生年月">
|
||||||
<el-input v-model="formData.birthPlace"
|
<el-date-picker v-model="formData.birthday" type="date" value-format="yyyy-MM-dd" style="width: 100%" placeholder="请选择出生年月"></el-date-picker>
|
||||||
placeholder="请填写出生地"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="education" label="文化程度">
|
|
||||||
<el-input v-model="formData.education" placeholder="请填写文化程度"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="hobby" label="爱好">
|
<el-form-item prop="mobile" label="联系电话">
|
||||||
<el-input v-model="formData.hobby" placeholder="请填写爱好"></el-input>
|
<el-input v-model="formData.mobile" maxlength="20" placeholder="请填写联系电话"></el-input>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="unitName" label="工作部门">
|
|
||||||
<el-input v-model="formData.unitName" disabled></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item prop="position" label="职务">
|
<el-form-item prop="medicalHistory" label="是否有特殊病史">
|
||||||
<el-input v-model="formData.position" placeholder="请填写职务"></el-input>
|
<el-radio-group v-model="formData.medicalHistory"><el-radio :label="true">是</el-radio><el-radio :label="false">否</el-radio></el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="mobile" label="电话">
|
|
||||||
<el-input v-model="formData.mobile" placeholder="请填写电话"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="email" label="电子邮箱">
|
|
||||||
<el-input v-model="formData.email" placeholder="请填写电子邮箱"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="homeAddress" label="家庭住址">
|
|
||||||
<el-input v-model="formData.homeAddress" placeholder="请填写家庭住址"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="QQNumber" label="QQ">
|
|
||||||
<el-input v-model="formData.QQNumber" placeholder="请填写QQ"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="bodyHeight" label="身高">
|
|
||||||
<el-input v-model="formData.bodyHeight" placeholder="请填写身高"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="bodyWeight" label="体重">
|
|
||||||
<el-input v-model="formData.bodyWeight" placeholder="请填写体重"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="health" label="身体状况">
|
|
||||||
<el-input v-model="formData.health" placeholder="请填写身体状况"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="sport" label="经常从事的运动">
|
|
||||||
<el-input v-model="formData.sport" placeholder="请填写经常从事的运动"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="medicalHistory" label="是否有过特殊病史">
|
|
||||||
<el-radio-group v-model="formData.medicalHistory">
|
|
||||||
<el-radio :label="true" border>是</el-radio>
|
|
||||||
<el-radio :label="false" border>否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="joinActivity" label="是否愿意参加本协会的活动">
|
|
||||||
<el-radio-group v-model="formData.joinActivity">
|
|
||||||
<el-radio :label="true" border>是</el-radio>
|
|
||||||
<el-radio :label="false" border>否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item prop="otherThing" label="是否有特别需要说明的问题(身体或心理)">
|
<el-form-item prop="otherThing" label="是否有特别需要说明的问题">
|
||||||
<el-input maxlength="500" v-model="formData.otherThing"
|
<el-input v-model="formData.otherThing" maxlength="100" type="textarea" placeholder="如有,请填写特别需要说明的问题"></el-input>
|
||||||
placeholder="如有,请填写特别需要说明的问题"
|
|
||||||
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="20">
|
<el-form-item prop="emergencyContact" label="紧急联系人">
|
||||||
<el-col :span="24">
|
<el-input v-model="formData.emergencyContact" maxlength="50" placeholder="请填写紧急联系人"></el-input>
|
||||||
<el-form-item prop="remark" label="备注">
|
|
||||||
<el-input maxlength="100" v-model="formData.remark" placeholder="请填写备注"
|
|
||||||
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="20">
|
<el-form-item prop="emergencyMobile" label="紧急联系电话">
|
||||||
<el-col :span="24">
|
<el-input v-model="formData.emergencyMobile" maxlength="20" placeholder="请填写紧急联系电话"></el-input>
|
||||||
<el-form-item prop="photo" label="两寸登记照">
|
|
||||||
<image-Upload :height="50" :limit="1" :file-type="['png', 'jpg']" :file-size="1"
|
|
||||||
v-model="formData.photo"></image-Upload>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="float: right;margin: 20px 0">
|
<div style="float: right;margin: 20px 0">
|
||||||
<el-button @click="doSubmit()" type="primary">申请加入</el-button>
|
<el-button @click="doSubmit()" :loading="formLoading" type="primary">申请加入</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -417,190 +350,98 @@ layout("/layouts/platform.html"){
|
|||||||
<div>填表时间:{{moment().format('YYYY年MM月DD日')}}</div>
|
<div>填表时间:{{moment().format('YYYY年MM月DD日')}}</div>
|
||||||
<div>编号:NO._____(自动生成)</div>
|
<div>编号:NO._____(自动生成)</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form :model="formData"
|
<el-form class="club-apply-form" :model="formData" ref="form" :rules="formRules" label-position="top" label-width="160px">
|
||||||
ref="form"
|
|
||||||
:rules="formRules"
|
|
||||||
label-position="top"
|
|
||||||
class="applyForm"
|
|
||||||
label-width="0">
|
|
||||||
|
|
||||||
<border-table>
|
<border-table>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>姓名</th>
|
<th class="club-required">姓名</th>
|
||||||
<td>{{formData.username}}</td>
|
<td>
|
||||||
<th>性别</th>
|
<el-form-item prop="username">
|
||||||
<th>{{formData.sex}}</th>
|
<el-input v-model="formData.username" readonly></el-input>
|
||||||
<th rowspan="4">
|
|
||||||
<el-form-item prop="photo">
|
|
||||||
<image-Upload :limit="1"
|
|
||||||
:file-type="['png', 'jpg','jpeg']"
|
|
||||||
:file-size="5"
|
|
||||||
width="150"
|
|
||||||
height="200"
|
|
||||||
:file-size="1"
|
|
||||||
v-model="formData.photo"></image-Upload>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</th>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>出生年月</th>
|
<th class="club-required">性别</th>
|
||||||
|
<td>
|
||||||
|
<el-form-item prop="sex">
|
||||||
|
<el-input v-model="formData.sex" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="club-required">工号</th>
|
||||||
|
<td>
|
||||||
|
<el-form-item prop="loginname">
|
||||||
|
<el-input v-model="formData.loginname" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="club-required">出生年月</th>
|
||||||
<td>
|
<td>
|
||||||
<el-form-item prop="birthday">
|
<el-form-item prop="birthday">
|
||||||
<el-date-picker
|
<el-date-picker v-model="formData.birthday" type="date" value-format="yyyy-MM-dd" style="width: 100%" placeholder="请选择出生年月"></el-date-picker>
|
||||||
v-model="formData.birthday"
|
|
||||||
type="date"
|
|
||||||
style="width: 100%"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择出生年月">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>出生地</th>
|
|
||||||
<td>
|
|
||||||
<el-form-item prop="birthPlace">
|
|
||||||
<el-input v-model="formData.birthPlace"
|
|
||||||
maxlength="50"
|
|
||||||
placeholder="请填写出生地"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>文化程度</th>
|
<th class="club-required">联系电话</th>
|
||||||
<td>
|
|
||||||
<el-form-item prop="education">
|
|
||||||
<el-input v-model="formData.education" placeholder="请填写文化程度"
|
|
||||||
maxlength="20"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>爱好</th>
|
|
||||||
<td>
|
|
||||||
<el-form-item prop="hobby">
|
|
||||||
<el-input v-model="formData.hobby" placeholder="请填写爱好" maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>工作部门</th>
|
|
||||||
<td>
|
|
||||||
<el-form-item prop="unitName">
|
|
||||||
<el-input v-model="formData.unitName" disabled maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>职务</th>
|
|
||||||
<td>
|
|
||||||
<el-form-item prop="position">
|
|
||||||
<el-input v-model="formData.position" placeholder="请填写职务" maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>电话</th>
|
|
||||||
<td>
|
<td>
|
||||||
<el-form-item prop="mobile">
|
<el-form-item prop="mobile">
|
||||||
<el-input v-model="formData.mobile" placeholder="请填写电话" maxlength="20"></el-input>
|
<el-input v-model="formData.mobile" maxlength="20" placeholder="请填写联系电话"></el-input>
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>电子邮箱</th>
|
|
||||||
<td colspan="2">
|
|
||||||
<el-form-item prop="email">
|
|
||||||
<el-input v-model="formData.email" placeholder="请填写电子邮箱" maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>家庭住址</th>
|
<th class="club-required">是否有特殊病史</th>
|
||||||
<td>
|
<td>
|
||||||
<el-form-item prop="homeAddress">
|
|
||||||
<el-input v-model="formData.homeAddress" placeholder="请填写家庭住址" maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>QQ</th>
|
|
||||||
<td colspan="2">
|
|
||||||
<el-form-item prop="QQNumber">
|
|
||||||
<el-input v-model="formData.QQNumber" placeholder="请填写QQ" maxlength="12"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>身高</th>
|
|
||||||
<td>
|
|
||||||
<el-form-item prop="bodyHeight">
|
|
||||||
<el-input v-model="formData.bodyHeight" placeholder="请填写身高" maxlength="10"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>体重</th>
|
|
||||||
<td colspan="2">
|
|
||||||
<el-form-item prop="bodyWeight">
|
|
||||||
<el-input v-model="formData.bodyWeight" placeholder="请填写体重" maxlength="10"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>身体状况</th>
|
|
||||||
<td>
|
|
||||||
<el-form-item prop="health">
|
|
||||||
<el-input v-model="formData.health" placeholder="请填写身体状况" maxlength="10"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
<th>经常从事的运动</th>
|
|
||||||
<td colspan="2">
|
|
||||||
<el-form-item prop="sport">
|
|
||||||
<el-input v-model="formData.sport" placeholder="请填写经常从事的运动" maxlength="100"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>是否有过特殊病史</th>
|
|
||||||
<td colspan="4">
|
|
||||||
<el-form-item prop="medicalHistory">
|
<el-form-item prop="medicalHistory">
|
||||||
<el-radio-group v-model="formData.medicalHistory">
|
<el-radio-group v-model="formData.medicalHistory"><el-radio :label="true">是</el-radio><el-radio :label="false">否</el-radio></el-radio-group>
|
||||||
<el-radio :label="true" border>是</el-radio>
|
|
||||||
<el-radio :label="false" border>否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>是否愿意参加本协会的活动</th>
|
<th>是否有特别需要说明的问题</th>
|
||||||
<td colspan="4">
|
<td>
|
||||||
<el-form-item prop="joinActivity">
|
|
||||||
<el-radio-group v-model="formData.joinActivity">
|
|
||||||
<el-radio :label="true" border>是</el-radio>
|
|
||||||
<el-radio :label="false" border>否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>是否有特别需要说明的问题(身体或心理)</th>
|
|
||||||
<td colspan="4">
|
|
||||||
<el-form-item prop="otherThing">
|
<el-form-item prop="otherThing">
|
||||||
<el-input maxlength="100" v-model="formData.otherThing"
|
<el-input v-model="formData.otherThing" maxlength="100" type="textarea" placeholder="如有,请填写特别需要说明的问题"></el-input>
|
||||||
placeholder="如有,请填写特别需要说明的问题"
|
</el-form-item>
|
||||||
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="club-required">紧急联系人</th>
|
||||||
|
<td>
|
||||||
|
<el-form-item prop="emergencyContact">
|
||||||
|
<el-input v-model="formData.emergencyContact" maxlength="50" placeholder="请填写紧急联系人"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="club-required">紧急联系电话</th>
|
||||||
|
<td>
|
||||||
|
<el-form-item prop="emergencyMobile">
|
||||||
|
<el-input v-model="formData.emergencyMobile" maxlength="20" placeholder="请填写紧急联系电话"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</border-table>
|
</border-table>
|
||||||
<!-- <el-row :gutter="20">-->
|
|
||||||
<!-- <el-col :span="24">-->
|
|
||||||
<!-- <el-form-item prop="remark" label="备注">-->
|
|
||||||
<!-- <el-input maxlength="100" v-model="formData.remark" placeholder="请填写备注"-->
|
|
||||||
<!-- type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: center;margin: 20px 0">
|
<div style="text-align: center;margin: 20px 0">
|
||||||
<el-button @click="doSubmit()" type="primary">申请加入</el-button>
|
<el-button @click="doSubmit()" :loading="formLoading" type="primary">申请加入</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</guava>
|
</guava>
|
||||||
|
<el-dialog title="社团二维码" :visible.sync="clubCodeShow" width="360px" :close-on-click-modal="false">
|
||||||
|
<div style="text-align: center">
|
||||||
|
<p>{{clubCodeName}}</p>
|
||||||
|
<img :src="clubCodeImage" alt="扫码查看社团并申请加入" style="width: 260px; height: 260px">
|
||||||
|
<p>手机扫码查看社团并申请加入</p>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
const vue = new Vue({
|
const vue = new Vue({
|
||||||
@@ -608,26 +449,19 @@ layout("/layouts/platform.html"){
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formData: {},
|
formData: {},
|
||||||
|
formLoading: false,
|
||||||
|
clubCodeShow: false,
|
||||||
|
clubCodeName: '',
|
||||||
|
clubCodeImage: '',
|
||||||
formRules: {
|
formRules: {
|
||||||
username: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
username: [{required: true, message: '请填写姓名', trigger: ['blur', 'change']}],
|
||||||
sex: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
sex: [{required: true, message: '请填写性别', trigger: ['blur', 'change']}],
|
||||||
birthday: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
loginname: [{required: true, message: '请填写工号', trigger: ['blur', 'change']}],
|
||||||
birthPlace: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
birthday: [{required: true, message: '请填写出生年月', trigger: ['blur', 'change']}],
|
||||||
education: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
mobile: [{required: true, message: '请填写联系电话', trigger: ['blur', 'change']}],
|
||||||
hobby: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
medicalHistory: [{required: true, message: '请选择是否有特殊病史', trigger: ['blur', 'change']}],
|
||||||
unitName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
emergencyContact: [{required: true, message: '请填写紧急联系人', trigger: ['blur', 'change']}],
|
||||||
position: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
emergencyMobile: [{required: true, message: '请填写紧急联系电话', trigger: ['blur', 'change']}],
|
||||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
email: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
homeAddress: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
QQNumber: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
bodyHeight: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
bodyWeight: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
health: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
sport: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
medicalHistory: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
joinActivity: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
photo: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
||||||
},
|
},
|
||||||
infoActive: 'first',
|
infoActive: 'first',
|
||||||
detailData: {},
|
detailData: {},
|
||||||
@@ -650,6 +484,13 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 二维码携带当前行社团主键,使用系统配置域名供手机访问。
|
||||||
|
openClubCode(row) {
|
||||||
|
this.clubCodeName = row.name
|
||||||
|
this.clubCodeImage = jrQrcode.getQrBase64(APP_DOMAIN.replace(/\/$/, '') +
|
||||||
|
'/platform/sys/club/sq/mobile?clubId=' + encodeURIComponent(row.id))
|
||||||
|
this.clubCodeShow = true
|
||||||
|
},
|
||||||
doExportApply(row){
|
doExportApply(row){
|
||||||
location.href = '/platform/sys/club/clubInfoManage/exportInfo?clubId=' + row.id
|
location.href = '/platform/sys/club/clubInfoManage/exportInfo?clubId=' + row.id
|
||||||
},
|
},
|
||||||
@@ -672,56 +513,50 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async doSubmit() {
|
// 两处 PC 申请入口共用校验与提交,仅保存本次入会资料。
|
||||||
const row = this.clickRow
|
doSubmit() {
|
||||||
const valid = await this.$refs.form.validate()
|
if (this.formLoading) return
|
||||||
if (!valid) return
|
this.$refs.form.validate(valid => {
|
||||||
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
|
if (!valid) return
|
||||||
let str = '您还没有参加协会'
|
this.$set(this, 'formLoading', true)
|
||||||
if (data && data.length > 0) {
|
$.post('/platform/sys/club/sq/getInClubByCurUser').then(res => {
|
||||||
str = '您已经加入了'
|
if (res.code !== 0) {
|
||||||
data.forEach((item) => {
|
this.$message.warning(res.msg)
|
||||||
str += '【' + item.name + '】'
|
return
|
||||||
})
|
|
||||||
}
|
|
||||||
str += ',请确认是否申请加入【' + row.name + '】?'
|
|
||||||
this.$confirm(str, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
callback: async (a, b) => {
|
|
||||||
if ("confirm" === a) {//确认后再执行
|
|
||||||
this.formData.clubid = row.id
|
|
||||||
const resp = await $.post("/platform/sys/club/sq/submit", this.formData);
|
|
||||||
if (resp.code === 0) {
|
|
||||||
this.$message.success(resp.msg)
|
|
||||||
await this.getCount()
|
|
||||||
this.pageData()
|
|
||||||
this.$refs.guava.index()
|
|
||||||
} else {
|
|
||||||
this.$message.warning(resp.msg)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
const clubs = res.data || []
|
||||||
});
|
const prefix = clubs.length ? '您已经加入了' + clubs.map(item => '【' + item.name + '】').join('') : '您还没有参加协会'
|
||||||
|
this.$confirm(prefix + ',请确认是否申请加入【' + this.clickRow.name + '】?', '提示', {
|
||||||
|
confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$set(this, 'formLoading', true)
|
||||||
|
const params = Object.assign({}, this.formData, {clubid: this.clickRow.id})
|
||||||
|
$.post('/platform/sys/club/sq/submit', params).then(resp => {
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.getCount()
|
||||||
|
this.pageData()
|
||||||
|
this.$refs.guava.index()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(resp.msg)
|
||||||
|
}
|
||||||
|
}).always(() => { this.$set(this, 'formLoading', false) })
|
||||||
|
}).catch(() => {})
|
||||||
|
}).always(() => { this.$set(this, 'formLoading', false) })
|
||||||
|
})
|
||||||
},
|
},
|
||||||
openDetail(row, type) {
|
openDetail(row, type) {
|
||||||
this.viewType = type
|
this.viewType = type
|
||||||
this.infoActive = type === 'view' ? 'first' : 'second'
|
this.infoActive = type === 'view' ? 'first' : 'second'
|
||||||
if (type === 'join') {
|
if (type === 'join') {
|
||||||
this.formData = {
|
this.$set(this, 'formData', {
|
||||||
username: "${@shiro.getPrincipalProperty('username')}",
|
username: "${@shiro.getPrincipalProperty('username')}",
|
||||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||||
|
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||||
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
|
|
||||||
education: "${@shiro.getPrincipalProperty('education')}",
|
|
||||||
hobby: "${@shiro.getPrincipalProperty('hobby')}",
|
|
||||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
|
||||||
position: "${@shiro.getPrincipalProperty('position')}",
|
|
||||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||||
email: "${@shiro.getPrincipalProperty('email')}",
|
medicalHistory: null, otherThing: '', emergencyContact: '', emergencyMobile: ''
|
||||||
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
|
})
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.form.clearValidate()
|
this.$refs.form.clearValidate()
|
||||||
})
|
})
|
||||||
@@ -743,19 +578,14 @@ layout("/layouts/platform.html"){
|
|||||||
openApply(row) {
|
openApply(row) {
|
||||||
this.$refs.guava.edit()
|
this.$refs.guava.edit()
|
||||||
this.clickRow = row
|
this.clickRow = row
|
||||||
this.formData = {
|
this.$set(this, 'formData', {
|
||||||
username: "${@shiro.getPrincipalProperty('username')}",
|
username: "${@shiro.getPrincipalProperty('username')}",
|
||||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||||
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
|
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||||
education: "${@shiro.getPrincipalProperty('education')}",
|
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||||
hobby: "${@shiro.getPrincipalProperty('hobby')}",
|
medicalHistory: null, otherThing: '', emergencyContact: '', emergencyMobile: ''
|
||||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
})
|
||||||
position: "${@shiro.getPrincipalProperty('position')}",
|
|
||||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
|
||||||
email: "${@shiro.getPrincipalProperty('email')}",
|
|
||||||
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.form.clearValidate()
|
this.$refs.form.clearValidate()
|
||||||
})
|
})
|
||||||
@@ -800,15 +630,17 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
}, "json");
|
}, "json");
|
||||||
},
|
},
|
||||||
async getCount() {
|
getCount() {
|
||||||
const resp = await $.post('/platform/sys/club/sq/getCount')
|
return $.post('/platform/sys/club/sq/getCount').then(resp => {
|
||||||
this.hasJoinCount = resp.data.hasJoinCount
|
if (resp.code === 0) {
|
||||||
this.noJoinCount = resp.data.noJoinCount
|
this.$set(this, 'hasJoinCount', resp.data.hasJoinCount)
|
||||||
|
this.$set(this, 'noJoinCount', resp.data.noJoinCount)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
created() {
|
||||||
await this.getCount()
|
this.getCount().always(() => this.pageData())
|
||||||
this.pageData()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ layout("/layouts/platform.html"){
|
|||||||
<template #func>
|
<template #func>
|
||||||
<el-button @click="exportData" type="primary" size="medium">导出全部统计数据</el-button>
|
<el-button @click="exportData" type="primary" size="medium">导出全部统计数据</el-button>
|
||||||
<el-button @click="exportUserData(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
<el-button @click="exportUserData(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
||||||
type="primary" size="medium">导出全部人员明细</el-button>
|
type="primary" size="medium">导出全部人员明细(Zip)</el-button>
|
||||||
|
<el-button @click="exportAllUserExcel" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
||||||
|
type="primary" size="medium">导出全部人员明细(Excel)</el-button>
|
||||||
<el-button @click="exportFiles(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
<el-button @click="exportFiles(null)" v-if="${@shiro.hasAnyRoles('sysadmin', 'A06', 'xxhgly')}"
|
||||||
type="primary" size="medium">导出全部上传资料</el-button>
|
type="primary" size="medium">导出全部上传资料</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -225,6 +227,10 @@ layout("/layouts/platform.html"){
|
|||||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
exportAllUserExcel() {
|
||||||
|
// 导出权限范围内全部有效成员,不携带页面筛选或分页参数。
|
||||||
|
window.open('/platform/sys/club/clubUserCount/exportAllUserExcel')
|
||||||
|
},
|
||||||
exportUserData(row) {
|
exportUserData(row) {
|
||||||
const id = row === null ? '' : row.id
|
const id = row === null ? '' : row.id
|
||||||
let url = '/platform/sys/club/clubUserCount/exportUserData?clubId=' + id +
|
let url = '/platform/sys/club/clubUserCount/exportUserData?clubId=' + id +
|
||||||
|
|||||||
Reference in New Issue
Block a user