commit
This commit is contained in:
+66
-7
@@ -1,17 +1,24 @@
|
|||||||
package io.v.nutz.zhgh.activity.controller.school;
|
package io.v.nutz.zhgh.activity.controller.school;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.entity.ImageEntity;
|
||||||
import cn.wizzer.framework.base.Result;
|
import cn.wizzer.framework.base.Result;
|
||||||
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
|
import com.deepoove.poi.config.Configure;
|
||||||
|
import com.deepoove.poi.data.PictureRenderData;
|
||||||
|
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.SimpleService;
|
import io.v.nutz.base.service.SimpleService;
|
||||||
import io.v.nutz.base.service.ViService;
|
import io.v.nutz.base.service.ViService;
|
||||||
import io.v.nutz.base.utils.DateUtil;
|
import io.v.nutz.base.utils.DateUtil;
|
||||||
|
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
||||||
import io.v.nutz.base.utils.Vi;
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.models.Sys_file;
|
import io.v.nutz.sys.models.Sys_file;
|
||||||
import io.v.nutz.sys.models.Sys_unit;
|
import io.v.nutz.sys.models.Sys_unit;
|
||||||
import io.v.nutz.sys.models.Sys_user;
|
import io.v.nutz.sys.models.Sys_user;
|
||||||
import io.v.nutz.sys.services.SysUserService;
|
import io.v.nutz.sys.services.SysUserService;
|
||||||
|
import io.v.nutz.web.commons.base.Globals;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
import io.v.nutz.zhgh.activity.models.*;
|
import io.v.nutz.zhgh.activity.models.*;
|
||||||
import io.v.nutz.zhgh.activity.services.ActivitySchoolApplyService;
|
import io.v.nutz.zhgh.activity.services.ActivitySchoolApplyService;
|
||||||
@@ -19,7 +26,9 @@ import io.v.nutz.zhgh.activity.services.ActivitySchoolService;
|
|||||||
import io.v.nutz.zhgh.activity.services.ActivitySchoolTeamService;
|
import io.v.nutz.zhgh.activity.services.ActivitySchoolTeamService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||||
import org.nutz.aop.interceptor.async.Async;
|
import org.nutz.aop.interceptor.async.Async;
|
||||||
|
import org.nutz.boot.starter.ftp.FtpService;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Sqls;
|
import org.nutz.dao.Sqls;
|
||||||
@@ -37,6 +46,13 @@ 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.imageio.ImageIO;
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -70,6 +86,13 @@ public class ActivityApplyController {
|
|||||||
@Inject("ActivitySchoolEvent")
|
@Inject("ActivitySchoolEvent")
|
||||||
private ViService<ActivitySchoolEvent> activitySchoolEventViService;
|
private ViService<ActivitySchoolEvent> activitySchoolEventViService;
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OfficeTemplateUtil officeTemplateUtil;
|
||||||
|
@Inject
|
||||||
|
private FtpService ftpService;
|
||||||
|
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@Ok("beetl:platform/activity/school/ActivityApply.html")
|
@Ok("beetl:platform/activity/school/ActivityApply.html")
|
||||||
@RequiresPermissions("activity.apply")
|
@RequiresPermissions("activity.apply")
|
||||||
@@ -132,11 +155,8 @@ public class ActivityApplyController {
|
|||||||
school.personType,
|
school.personType,
|
||||||
school.activityLevel,
|
school.activityLevel,
|
||||||
school.applyType,
|
school.applyType,
|
||||||
school.athleteQualification,
|
school.isSign,
|
||||||
school.registrationMethod,
|
school.eventNotification,
|
||||||
school.competitionMethod,
|
|
||||||
school.rewardMethod,
|
|
||||||
school.precautions,
|
|
||||||
au.files promiseBookFiles,
|
au.files promiseBookFiles,
|
||||||
(SELECT count( 1 ) FROM activity_school_apply app WHERE app.activityId = school.id AND app.`status` = 2 ) apply_num,
|
(SELECT count( 1 ) FROM activity_school_apply app WHERE app.activityId = school.id AND app.`status` = 2 ) apply_num,
|
||||||
(SELECT count( 1 ) FROM activity_school_apply app WHERE app.activityId = school.id AND ( app.applyUser = @userid OR app.userId = @userid )) > 0 applyed,
|
(SELECT count( 1 ) FROM activity_school_apply app WHERE app.activityId = school.id AND ( app.applyUser = @userid OR app.userId = @userid )) > 0 applyed,
|
||||||
@@ -824,14 +844,15 @@ public class ActivityApplyController {
|
|||||||
asa.sex,
|
asa.sex,
|
||||||
asa.identity,
|
asa.identity,
|
||||||
asa.`status`,
|
asa.`status`,
|
||||||
|
asa.applyUserSign,
|
||||||
us.username applyUserName
|
us.username applyUserName
|
||||||
FROM
|
FROM
|
||||||
`activity_school_apply` asa
|
`activity_school_apply` asa
|
||||||
LEFT JOIN sys_user us ON asa.applyUser = us.id
|
LEFT JOIN sys_user us ON asa.applyUser = us.id
|
||||||
WHERE asa.activityId=@activityId and asa.eventId=@eventId and asa.activityUnionId=@activityUnionId
|
WHERE asa.activityId=@activityId and asa.eventId=@eventId and asa.activityUnionId=@activityUnionId
|
||||||
ORDER BY asa.applyUser
|
ORDER BY asa.applyUser
|
||||||
""").setParam("activityId",activityId).setParam("eventId", eventId).setParam("activityUnionId", getUnionId());
|
""").setParam("activityId", activityId).setParam("eventId", eventId).setParam("activityUnionId", getUnionId());
|
||||||
return activitySchoolApplyService.listMap(sql);
|
return activitySchoolApplyService.listMap(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -867,5 +888,43 @@ public class ActivityApplyController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok(("void"))
|
||||||
|
@RequiresPermissions("activity.apply")
|
||||||
|
public void doExport(String activityId, HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
ActivitySchool school = simpleService.dao().fetch(ActivitySchool.class, activityId);
|
||||||
|
List<ActivitySchoolApply> schoolApplyList = simpleService.dao().query(ActivitySchoolApply.class,
|
||||||
|
Cnd.where("activityId", "=", activityId)
|
||||||
|
.and("status", "=", 2)
|
||||||
|
.and("applyUserSign", "is not", null));
|
||||||
|
|
||||||
|
List<NutMap> signList = new ArrayList<>();
|
||||||
|
for (int i = 0; i < schoolApplyList.size(); i++) {
|
||||||
|
ActivitySchoolApply apply = schoolApplyList.get(i);
|
||||||
|
ByteArrayOutputStream signOs = new ByteArrayOutputStream();
|
||||||
|
ftpService.download(apply.getApplyUserSign(), signOs);
|
||||||
|
ByteArrayInputStream bais = new ByteArrayInputStream(signOs.toByteArray());
|
||||||
|
BufferedImage bufferImg = ImageIO.read(bais);
|
||||||
|
|
||||||
|
/*byte[] bytes = Base64.getDecoder().decode(bufferImg.toByteArray());
|
||||||
|
signList.add(NutMap.NEW().addv("sign", new PictureRenderData(70, 30, ".png", bytes)));*/
|
||||||
|
}
|
||||||
|
|
||||||
|
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||||
|
Configure config = Configure.newBuilder().bind("signList", policy).build();
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("activityName", school.getName());
|
||||||
|
map.put("signList", signList);
|
||||||
|
response.addHeader("Content-Type", "application/octet-stream");
|
||||||
|
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String((school.getName() + "自愿参赛责任及风险告知书").getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1) + "\".docx");
|
||||||
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
XWPFTemplate.compile(officeTemplateUtil.getPath("activity_fxtzs"), config).render(map).writeAndClose(outputStream);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,4 +17,6 @@ public class ActivityMobileSignUpParam {
|
|||||||
|
|
||||||
private List<String> userIds;
|
private List<String> userIds;
|
||||||
|
|
||||||
|
private String applyUserSign;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,4 +200,10 @@ public class ActivitySchool extends BaseModel implements Serializable {
|
|||||||
@Comment("是否开启")
|
@Comment("是否开启")
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
private Boolean isDisabled;
|
private Boolean isDisabled;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否需要签字")
|
||||||
|
@Default("0")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
private Boolean isSign;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,12 +173,18 @@ public class ActivitySchoolApply implements Serializable {
|
|||||||
@Excel(name = "姓名", width = 20)
|
@Excel(name = "姓名", width = 20)
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("电话")
|
@Comment("电话")
|
||||||
@Excel(name = "手机号码", width = 20)
|
@Excel(name = "手机号码", width = 20)
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("报名签字")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||||
|
private String applyUserSign;
|
||||||
|
|
||||||
|
|
||||||
@Excel(name = "身份证号", width = 20)
|
@Excel(name = "身份证号", width = 20)
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
|||||||
+3
-1
@@ -163,6 +163,8 @@ public class mobileActivityListController {
|
|||||||
school.applyEndTime,
|
school.applyEndTime,
|
||||||
school.applyType,
|
school.applyType,
|
||||||
school.activityGroupId,
|
school.activityGroupId,
|
||||||
|
school.isSign,
|
||||||
|
school.precautions,
|
||||||
eve.allName,
|
eve.allName,
|
||||||
eve.isInterest,
|
eve.isInterest,
|
||||||
eve.projectType,
|
eve.projectType,
|
||||||
@@ -262,7 +264,7 @@ public class mobileActivityListController {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
public Object doTeamSignUp(ActivityMobileSignUpParam param) {
|
public Object doTeamSignUp(ActivityMobileSignUpParam param) {
|
||||||
mobileActivityApplyService.doTeamSignUp(param.getActivityId(), param.getUserIds(), param.getEventId(), param.getTeamId(), param.getTeamName());
|
mobileActivityApplyService.doTeamSignUp(param.getActivityId(), param.getUserIds(), param.getEventId(), param.getTeamId(), param.getTeamName(),param.getApplyUserSign());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,5 +7,5 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface MobileActivityApplyService extends BaseService<ActivitySchoolApply> {
|
public interface MobileActivityApplyService extends BaseService<ActivitySchoolApply> {
|
||||||
void doDeleteApply(String activityId, String eventId);
|
void doDeleteApply(String activityId, String eventId);
|
||||||
void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName);
|
void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName,String applyUserSign);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -39,16 +39,16 @@ public class MobileActivityApplyServiceImpl extends BaseServiceImpl<ActivityScho
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName) {
|
public void doTeamSignUp(String activityId, List<String> userIds, String eventId, String teamId, String teamName, String applyUserSign) {
|
||||||
List<ActivitySchoolApply> schoolApplyArrayList = new ArrayList<>();
|
List<ActivitySchoolApply> schoolApplyArrayList = new ArrayList<>();
|
||||||
userIds.forEach(i -> {
|
userIds.forEach(i -> {
|
||||||
ActivitySchoolApply schoolApply = getApply(activityId, eventId, i, teamId, teamName);
|
ActivitySchoolApply schoolApply = getApply(activityId, eventId, i, teamId, teamName, applyUserSign);
|
||||||
schoolApplyArrayList.add(schoolApply);
|
schoolApplyArrayList.add(schoolApply);
|
||||||
});
|
});
|
||||||
insert(schoolApplyArrayList);
|
insert(schoolApplyArrayList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActivitySchoolApply getApply(String activityId, String eventId, String userId, String teamId, String teamName) {
|
public ActivitySchoolApply getApply(String activityId, String eventId, String userId, String teamId, String teamName, String applyUserSign) {
|
||||||
ActivitySchool activitySchool = dao().fetch(ActivitySchool.class, activityId);
|
ActivitySchool activitySchool = dao().fetch(ActivitySchool.class, activityId);
|
||||||
User user = dao().fetch(User.class, Cnd.where("id", "=", userId));
|
User user = dao().fetch(User.class, Cnd.where("id", "=", userId));
|
||||||
ActivityBasicUnit basicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", user.getUnitid()));
|
ActivityBasicUnit basicUnit = dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", user.getUnitid()));
|
||||||
@@ -82,6 +82,7 @@ public class MobileActivityApplyServiceImpl extends BaseServiceImpl<ActivityScho
|
|||||||
schoolApply.setUsername(user.getUsername());
|
schoolApply.setUsername(user.getUsername());
|
||||||
schoolApply.setBirthday(user.getBirthday());
|
schoolApply.setBirthday(user.getBirthday());
|
||||||
schoolApply.setApplyUnitId(basicUnit.getId());
|
schoolApply.setApplyUnitId(basicUnit.getId());
|
||||||
|
schoolApply.setApplyUserSign(userId.equals(ShiroUtil.getUserId()) ? applyUserSign : null);
|
||||||
return schoolApply;
|
return schoolApply;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="applyWay" label="报名方式">
|
<el-form-item prop="applyWay" label="报名方式">
|
||||||
<el-checkbox-group v-model="form.applyWay" @change="applyWayChange">
|
<el-checkbox-group v-model="form.applyWay" >
|
||||||
<el-checkbox :disabled="form.activityLevel !== 40001" :label="2"
|
<el-checkbox :disabled="form.activityLevel !== 40001" :label="2"
|
||||||
border>基层工会报名
|
border>基层工会报名
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
@@ -202,6 +202,14 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item prop="isSign" label="是否需要签字">
|
||||||
|
<el-radio-group v-model="form.isSign">
|
||||||
|
<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>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -225,43 +233,41 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :prop="form.gameStyle === 1 ? 'athleteQualification' : '-'"
|
<el-form-item :prop="form.gameStyle === 1 ? 'athleteQualification' : '-'"
|
||||||
label="运动员资格">
|
label="运动员资格">
|
||||||
<div id="athleteQualification"></div>
|
<text-editor v-model="form.athleteQualification"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :prop="form.gameStyle === 1 ? 'registrationMethod' : '-'"
|
<el-form-item :prop="form.gameStyle === 1 ? 'registrationMethod' : '-'"
|
||||||
label="报名方法">
|
label="报名方法">
|
||||||
<div id="registrationMethod"></div>
|
<text-editor v-model="form.registrationMethod"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :prop="form.gameStyle === 1 ? 'competitionMethod' : '-'"
|
<el-form-item :prop="form.gameStyle === 1 ? 'competitionMethod' : '-'"
|
||||||
label="竞赛方法">
|
label="竞赛方法">
|
||||||
<div id="competitionMethod"></div>
|
<text-editor v-model="form.competitionMethod"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :prop="form.gameStyle === 1 ? 'rewardMethod' : '-'"
|
<el-form-item :prop="form.gameStyle === 1 ? 'rewardMethod' : '-'"
|
||||||
label="奖励方法">
|
label="奖励方法">
|
||||||
<div id="rewardMethod"></div>
|
<text-editor v-model="form.rewardMethod"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item :prop="form.gameStyle === 1 ? 'precautions' : '-'"
|
<el-form-item :prop="form.gameStyle === 1 ? 'precautions' : '-'"
|
||||||
label="注意事项">
|
label="注意事项">
|
||||||
<div id="precautions"></div>
|
<text-editor v-model="form.precautions"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :prop="form.gameStyle === 2 ? 'eventNotification' : '-'"
|
||||||
|
label="活动通知">
|
||||||
|
<text-editor v-model="form.eventNotification"></text-editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row gutter="40" v-if="form.gameStyle === 2 || form.applyWay.includes(3)">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item :prop="form.gameStyle === 2 ? 'eventNotification' : '-'"
|
|
||||||
label="活动通知">
|
|
||||||
<div id="eventNotification"></div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-form-item prop="files" label="封面图" v-if="form.applyWay.includes(1)">
|
<el-form-item prop="files" label="封面图" v-if="form.applyWay.includes(1)">
|
||||||
<file-upload :files.sync="form.image" :max="1" :type="['jpg', 'jpeg', 'png']"
|
<file-upload :files.sync="form.image" :max="1" :type="['jpg', 'jpeg', 'png']"
|
||||||
@@ -923,11 +929,6 @@ module.exports = {
|
|||||||
return v
|
return v
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
applyWayChange() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.initEditor()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async eventChange(val) {
|
async eventChange(val) {
|
||||||
const data = this.checkedEventInfo.find((v) => v.eventId === val)
|
const data = this.checkedEventInfo.find((v) => v.eventId === val)
|
||||||
const resp = await $.get("/platform/activity/school/info/mange/getEventData", { id: val })
|
const resp = await $.get("/platform/activity/school/info/mange/getEventData", { id: val })
|
||||||
@@ -990,9 +991,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
prev() {
|
prev() {
|
||||||
this.active--
|
this.active--
|
||||||
this.$nextTick(() => {
|
|
||||||
this.initEditor()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
getArrDifference(arr1, arr2) {
|
getArrDifference(arr1, arr2) {
|
||||||
return arr1.concat(arr2).filter(function(v, i, arr) {
|
return arr1.concat(arr2).filter(function(v, i, arr) {
|
||||||
@@ -1096,7 +1095,6 @@ module.exports = {
|
|||||||
if (this.$refs["activityForm"]) {
|
if (this.$refs["activityForm"]) {
|
||||||
this.$refs["activityForm"].resetFields()
|
this.$refs["activityForm"].resetFields()
|
||||||
}
|
}
|
||||||
this.initEditor()
|
|
||||||
const data = await this.getActivityCode(40001)
|
const data = await this.getActivityCode(40001)
|
||||||
this.form = {
|
this.form = {
|
||||||
planId: "",
|
planId: "",
|
||||||
@@ -1105,6 +1103,7 @@ module.exports = {
|
|||||||
eventsIds: [],
|
eventsIds: [],
|
||||||
unitJointly: [],
|
unitJointly: [],
|
||||||
applyType: 2,
|
applyType: 2,
|
||||||
|
isSign: false,
|
||||||
activityCode: data,
|
activityCode: data,
|
||||||
activityLevel: 40001
|
activityLevel: 40001
|
||||||
}
|
}
|
||||||
@@ -1166,9 +1165,6 @@ module.exports = {
|
|||||||
this.checkedEventInfo.unshift(item)
|
this.checkedEventInfo.unshift(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$nextTick(async () => {
|
|
||||||
this.initEditor()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async doOperate() {
|
async doOperate() {
|
||||||
@@ -1328,20 +1324,7 @@ module.exports = {
|
|||||||
form.time = undefined
|
form.time = undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initEditor() {
|
|
||||||
let keys = ["athleteQualification", "registrationMethod", "competitionMethod", "rewardMethod", "precautions", "eventNotification"]
|
|
||||||
keys.forEach((key) => {
|
|
||||||
$("#" + key).html("")
|
|
||||||
editors[key] = new E("#" + key)
|
|
||||||
editors[key].config.onchange = (html) => {
|
|
||||||
this.form[key] = html
|
|
||||||
}
|
|
||||||
editors[key].create()
|
|
||||||
if (this.form[key]) {
|
|
||||||
editors[key].txt.html(this.form[key])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
isLeaderChange() {
|
isLeaderChange() {
|
||||||
this.$set(this.eventForm, "leanderNum", 1)
|
this.$set(this.eventForm, "leanderNum", 1)
|
||||||
this.$set(this.eventForm, "coachNum", 0)
|
this.$set(this.eventForm, "coachNum", 0)
|
||||||
|
|||||||
@@ -144,7 +144,8 @@ layout("/mobile/platform.html"){
|
|||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
|
|
||||||
<van-row class="info" v-if="JSON.parse(o.applyWay).length===2&&JSON.parse(o.applyWay).includes(1)">
|
<van-row class="info"
|
||||||
|
v-if="JSON.parse(o.applyWay).length===2&&JSON.parse(o.applyWay).includes(1)">
|
||||||
<van-col span="24">
|
<van-col span="24">
|
||||||
<span>已报名人员:</span>
|
<span>已报名人员:</span>
|
||||||
<span v-if="o.userApplyNames" style="color: #0e78c5"
|
<span v-if="o.userApplyNames" style="color: #0e78c5"
|
||||||
@@ -211,19 +212,35 @@ layout("/mobile/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||||
|
<div class="van-card-header">
|
||||||
|
签字
|
||||||
|
</div>
|
||||||
|
<div class="van-card-body">
|
||||||
|
<mobile-sign ref="signature" :my_sign.sync="applyUserSign"
|
||||||
|
:is_value_base64="false"></mobile-sign>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||||
<van-button @click="openUserActionSheet" style="border-radius: 10px" block
|
<van-button @click="openUserActionSheet" style="border-radius: 10px" block
|
||||||
type="info">
|
type="info">
|
||||||
添加队友
|
添加队友
|
||||||
</van-button>
|
</van-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex;justify-content: center" v-if="!isView">
|
||||||
|
<van-radio-group v-model="formData.isCy" direction="horizontal" v-if="activityData.isSign">
|
||||||
|
<van-radio name="1"></van-radio>
|
||||||
|
<span style="color: red" @click="fxgzsActionPopup=true">自愿参赛责任及风险告知书</span>
|
||||||
|
</van-radio-group>
|
||||||
|
</div>
|
||||||
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
<div style="margin: 20px 20px 10px 20px" v-if="!isView">
|
||||||
<van-button @click="doTeamSignUp()" style="border-radius: 10px" block
|
<van-button @click="doTeamSignUp()" style="border-radius: 10px" block
|
||||||
type="info">
|
type="info">
|
||||||
提 交
|
提 交
|
||||||
</van-button>
|
</van-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</van-action-sheet>
|
</van-action-sheet>
|
||||||
|
|
||||||
<van-action-sheet v-model="userActionSheet" title="选择人员" class="userActionPopup">
|
<van-action-sheet v-model="userActionSheet" title="选择人员" class="userActionPopup">
|
||||||
@@ -260,6 +277,9 @@ layout("/mobile/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
<van-empty v-else image="search" description="请输入姓名或者工号搜索"></van-empty>
|
<van-empty v-else image="search" description="请输入姓名或者工号搜索"></van-empty>
|
||||||
</van-action-sheet>
|
</van-action-sheet>
|
||||||
|
<van-action-sheet v-model="fxgzsActionPopup" title="自愿参赛责任及风险告知书">
|
||||||
|
<div v-html="activityData.precautions"></div>
|
||||||
|
</van-action-sheet>
|
||||||
|
|
||||||
<van-dialog
|
<van-dialog
|
||||||
@confirm="doActivityConfirm"
|
@confirm="doActivityConfirm"
|
||||||
@@ -344,7 +364,9 @@ layout("/mobile/platform.html"){
|
|||||||
searchLoading: false,
|
searchLoading: false,
|
||||||
addRegisterList: [],
|
addRegisterList: [],
|
||||||
isView: false,
|
isView: false,
|
||||||
activityData: {}
|
activityData: {},
|
||||||
|
applyUserSign: "",
|
||||||
|
fxgzsActionPopup:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -369,15 +391,24 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
},
|
},
|
||||||
async doTeamSignUp() {
|
async doTeamSignUp() {
|
||||||
// if (this.registerList.length !== 2) {
|
if (this.activityData.isSign && !this.applyUserSign) {
|
||||||
// this.$dialog.alert({
|
this.$dialog.alert({
|
||||||
// title: '温馨提示',
|
title: "温馨提示",
|
||||||
// message: '此活动是组队模式只需一位队友!',
|
message: "请签字后再提交!"
|
||||||
// }).then(() => {
|
}).then(() => {
|
||||||
//
|
|
||||||
// });
|
})
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
|
if (this.activityData.isSign && !this.formData.isCy) {
|
||||||
|
this.$dialog.alert({
|
||||||
|
title: "温馨提示",
|
||||||
|
message: "请先阅读自愿参赛责任及风险告知书!"
|
||||||
|
}).then(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
athletesMaxNum,
|
athletesMaxNum,
|
||||||
@@ -443,7 +474,9 @@ layout("/mobile/platform.html"){
|
|||||||
eventId: this.formData.eventId,
|
eventId: this.formData.eventId,
|
||||||
teamId: this.formData.teamId,
|
teamId: this.formData.teamId,
|
||||||
teamName: this.formData.teamName,
|
teamName: this.formData.teamName,
|
||||||
userIds: JSON.stringify(userIds)
|
userIds: JSON.stringify(userIds),
|
||||||
|
applyUserSign: this.applyUserSign
|
||||||
|
|
||||||
})
|
})
|
||||||
await this.onRefresh()
|
await this.onRefresh()
|
||||||
this.teamSignUpShow = false
|
this.teamSignUpShow = false
|
||||||
@@ -567,6 +600,7 @@ layout("/mobile/platform.html"){
|
|||||||
restrictRegNumber
|
restrictRegNumber
|
||||||
} = o
|
} = o
|
||||||
this.projectType = projectType
|
this.projectType = projectType
|
||||||
|
this.activityData = o
|
||||||
this.formData.activityId = activityId
|
this.formData.activityId = activityId
|
||||||
this.formData.eventId = eventId
|
this.formData.eventId = eventId
|
||||||
this.formData.isTeamSignUp = isTeamSignUp
|
this.formData.isTeamSignUp = isTeamSignUp
|
||||||
@@ -691,6 +725,7 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
//如果是组队报名
|
//如果是组队报名
|
||||||
if (isTeamSignUp) {
|
if (isTeamSignUp) {
|
||||||
|
this.registerList = []
|
||||||
this.formData.isMenWomen = isMenWomen
|
this.formData.isMenWomen = isMenWomen
|
||||||
if (this.registerList.length === 0) {
|
if (this.registerList.length === 0) {
|
||||||
this.registerList.push({
|
this.registerList.push({
|
||||||
|
|||||||
@@ -80,30 +80,7 @@ layout("/mobile/platform.html"){
|
|||||||
description="暂无数据"></van-empty>
|
description="暂无数据"></van-empty>
|
||||||
|
|
||||||
<van-action-sheet v-model="show" title="活动通知">
|
<van-action-sheet v-model="show" title="活动通知">
|
||||||
<div class="van-cell-group__title">
|
<div v-html="activityInfo.eventNotification" style="padding-bottom: 30px"></div>
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">运动员资格</div>
|
|
||||||
</div>
|
|
||||||
<div v-html="activityInfo.athleteQualification" style="padding: 0 30px;"></div>
|
|
||||||
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">报名方法</div>
|
|
||||||
</div>
|
|
||||||
<div v-html="activityInfo.registrationMethod" style="padding: 0 30px;"></div>
|
|
||||||
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">竞赛方法</div>
|
|
||||||
</div>
|
|
||||||
<div v-html="activityInfo.competitionMethod" style="padding: 0 30px;"></div>
|
|
||||||
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">奖励方法</div>
|
|
||||||
</div>
|
|
||||||
<div v-html="activityInfo.rewardMethod" style="padding: 0 30px;"></div>
|
|
||||||
|
|
||||||
<div class="van-cell-group__title">
|
|
||||||
<div class="van-sidebar-item van-sidebar-item--select">注意事项</div>
|
|
||||||
</div>
|
|
||||||
<div v-html="activityInfo.precautions" style="padding: 0 30px;"></div>
|
|
||||||
|
|
||||||
<van-button type="primary" block @click="openApply"
|
<van-button type="primary" block @click="openApply"
|
||||||
style="position: fixed; bottom: 0; ">进入报名
|
style="position: fixed; bottom: 0; ">进入报名
|
||||||
|
|||||||
@@ -235,17 +235,17 @@ layout("/layouts/platform.html"){
|
|||||||
.format('YYYY/MM/DD HH:mm')}} 至
|
.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" v-if="item.isSign">
|
||||||
<div style="display: flex;justify-content: flex-end">
|
<div style="display: flex;justify-content: flex-end">
|
||||||
<el-button @click.stop="openPromiseBook(item)"
|
<el-button @click.stop="openPromiseBook(item)"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary">
|
type="primary">
|
||||||
上传参赛承诺书
|
上传风险告知书
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- <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 HH:mm')}}-->
|
{{moment(item.endTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -729,8 +729,6 @@ layout("/layouts/platform.html"){
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
|
|
||||||
|
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -744,7 +742,7 @@ layout("/layouts/platform.html"){
|
|||||||
<vi-title2 title="批量审核">
|
<vi-title2 title="批量审核">
|
||||||
<template #func>
|
<template #func>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-close"
|
icon="el-icon-check"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
:loading="submitLoading"
|
:loading="submitLoading"
|
||||||
@@ -759,6 +757,13 @@ layout("/layouts/platform.html"){
|
|||||||
@click="doAuditApplyUser(3)"
|
@click="doAuditApplyUser(3)"
|
||||||
>批量拒绝
|
>批量拒绝
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-download"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="doExport"
|
||||||
|
>下载风险告知书
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vi-title2>
|
</vi-title2>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -840,6 +845,19 @@ layout("/layouts/platform.html"){
|
|||||||
<span v-if="row.status===3" style="color: red">审核不通过</span>
|
<span v-if="row.status===3" style="color: red">审核不通过</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
prop="applyUserSign"
|
||||||
|
label="签字" v-if="activityData2.isSign">
|
||||||
|
<template scope="{row}">
|
||||||
|
<el-image
|
||||||
|
:src="APP_DOMAIN + '/file_server/fileStreamPreview?id=' + row.applyUserSign"
|
||||||
|
fit="cover"
|
||||||
|
style="width: 100%; height: 100%;" v-if="row.applyUserSign"></el-image>
|
||||||
|
<span v-else>暂未签字</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -1263,7 +1281,7 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
promiseBookFileList: [],
|
promiseBookFileList: [],
|
||||||
isPromiseBookFileView: true,
|
isPromiseBookFileView: true,
|
||||||
promiseBookDialogVisible: false,
|
promiseBookDialogVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -1279,9 +1297,12 @@ layout("/layouts/platform.html"){
|
|||||||
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
|
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
doExport(){
|
||||||
|
window.open("/platform/activity/apply/doExport?activityId=" + this.activityData2.id)
|
||||||
|
},
|
||||||
async doPromiseBook() {
|
async doPromiseBook() {
|
||||||
if (this.promiseBookFileList && this.promiseBookFileList.length === 0) {
|
if (this.promiseBookFileList && this.promiseBookFileList.length === 0) {
|
||||||
this.notifyWarning('请先上传参赛承诺书')
|
this.notifyWarning("请先上传参赛承诺书")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const resp = await $.post(loc() + "/doPromiseBook", {
|
const resp = await $.post(loc() + "/doPromiseBook", {
|
||||||
@@ -2040,7 +2061,7 @@ layout("/layouts/platform.html"){
|
|||||||
eventId: this.eventData.eventId,
|
eventId: this.eventData.eventId,
|
||||||
projectType: this.projectType,
|
projectType: this.projectType,
|
||||||
data: JSON.stringify(this.appliedData),
|
data: JSON.stringify(this.appliedData),
|
||||||
activityId: this.pageForm.activityId,
|
activityId: this.pageForm.activityId
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2065,7 +2086,7 @@ layout("/layouts/platform.html"){
|
|||||||
eventId: this.eventData.eventId,
|
eventId: this.eventData.eventId,
|
||||||
projectType: this.projectType,
|
projectType: this.projectType,
|
||||||
data: JSON.stringify(this.appliedData),
|
data: JSON.stringify(this.appliedData),
|
||||||
activityId: this.pageForm.activityId,
|
activityId: this.pageForm.activityId
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2324,7 +2345,7 @@ layout("/layouts/platform.html"){
|
|||||||
this.applyedTabLoading = true
|
this.applyedTabLoading = true
|
||||||
//如果项目等于单项
|
//如果项目等于单项
|
||||||
debugger
|
debugger
|
||||||
if (this.eventData.projectType === '1') {
|
if (this.eventData.projectType === "1") {
|
||||||
this.appliedData3 = applyed.filter(v => {
|
this.appliedData3 = applyed.filter(v => {
|
||||||
return v.teamId == this.team
|
return v.teamId == this.team
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user