commit
This commit is contained in:
@@ -5,15 +5,11 @@ import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.expression.ExpressionUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.handlers.IHandler;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.CountersignTypeEnum;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -85,6 +81,13 @@ public class CountersignHandler implements IHandler {
|
||||
if (!isMerged && CountersignTypeEnum.PARALLEL.toString().equalsIgnoreCase(countersignType)) {
|
||||
// 是否所有会签任务已完成
|
||||
boolean finished = execution.getEngine().processTaskService().getDoingTaskList(execution.getProcessInstanceId(), new String[]{taskModel.getName()}).size() == 0;
|
||||
|
||||
if(StrUtil.isNotBlank(countersignCompletionCondition) && finished) {
|
||||
execution.getEngine().processTaskService().rejectTask(execution.getProcessModel(), execution.getProcessTask());
|
||||
} else {
|
||||
isMerged = finished;
|
||||
}
|
||||
|
||||
if (!isMerged) {
|
||||
// 未通过,更新已完成实例数量
|
||||
Dict addVariable = Dict.create();
|
||||
@@ -92,9 +95,6 @@ public class CountersignHandler implements IHandler {
|
||||
addVariable.put(prefix + FlowConst.NR_OF_COMPLETED_AGREE_INSTANCES, execution.getArgs().get(prefix + FlowConst.NR_OF_COMPLETED_AGREE_INSTANCES));
|
||||
execution.getEngine().processInstanceService().addVariable(execution.getProcessInstanceId(), addVariable);
|
||||
}
|
||||
if(finished) {
|
||||
execution.getEngine().processTaskService().rejectTask(execution.getProcessModel(), execution.getProcessTask());
|
||||
}
|
||||
}
|
||||
if (isMerged) {
|
||||
// 获取所有会签参数键值
|
||||
|
||||
+305
@@ -0,0 +1,305 @@
|
||||
package com.budwk.app.zhgh.activity.sports.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.services.SysUnionService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2021/5/27 15:57
|
||||
* @description 奖品名单
|
||||
*/
|
||||
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/activity/prize/list")
|
||||
public class ActivityPrizeListController {
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:platform/zhgh/activity/sports/ActivityPrize/index.html")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@Inject
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
/**
|
||||
* 各个分工会奖品
|
||||
*
|
||||
* @param activityId
|
||||
* @param unionId
|
||||
* @return
|
||||
*/
|
||||
|
||||
@At
|
||||
@ApiOperation("获取各个分工会每个项目前八名")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public Result getPrizes(Integer year, String activityId, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
acr.activityId,
|
||||
ace.allName,
|
||||
acr.userId,
|
||||
acr.ranking,
|
||||
acr.numberOfPeople,
|
||||
ace.isMenWomen,
|
||||
acs.`name` as activityName,
|
||||
u.username,
|
||||
RIGHT(ace.allName,4) xmlx,
|
||||
LEFT(ace.allName,2) xblx
|
||||
FROM activity_school_event acse
|
||||
left join activity_school acs on acs.id = acse.activityId
|
||||
left join activity_event ace on ace.id = acse.eventId
|
||||
left join activity_results acr on acr.eventId = acse.eventId
|
||||
left join sys_user u on u.id = acr.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("acr.activityId", "=", activityId);
|
||||
cnd.and("YEAR(acs.applyStartTime)", "=", year);
|
||||
// cnd.and("ace.isInterest", "=", 0);
|
||||
cnd.and("acr.unionId", "=", unionId);
|
||||
cnd.asc("ace.allName").asc("acr.ranking");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> allList = baseService.listMap(sql);
|
||||
if (Lang.isEmpty(allList)) {
|
||||
return Result.success(Map.of("团体项目", Map.of(), "男子项目", Map.of(), "女子项目", Map.of(), "其他", Map.of()));
|
||||
}
|
||||
|
||||
Map maleMap = NutMap.NEW();
|
||||
Map femaleMap = NutMap.NEW();
|
||||
Map teamMap = NutMap.NEW();
|
||||
Map otherMap = NutMap.NEW();
|
||||
|
||||
Map<String, List<NutMap>> xmlxList = allList.stream().collect(Collectors.groupingBy(v -> v.getString("xmlx")));
|
||||
|
||||
if (Lang.isNotEmpty(xmlxList.get("(团体)"))) {
|
||||
teamMap = xmlxList.get("(团体)").stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(xmlxList.get("(单项)")) && xmlxList.get("(单项)").stream().anyMatch(v -> v.getString("xblx").equals("男子"))) {
|
||||
maleMap = xmlxList.get("(单项)").stream().filter(v -> v.getString("xblx").equals("男子")).collect(Collectors.groupingBy(h -> h.getString("allName")));
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(xmlxList.get("(单项)")) && xmlxList.get("(单项)").stream().anyMatch(v -> v.getString("xblx").equals("女子"))) {
|
||||
femaleMap = xmlxList.get("(单项)").stream().filter(v -> v.getString("xblx").equals("女子")).collect(Collectors.groupingBy(h -> h.getString("allName")));
|
||||
}
|
||||
return Result.success(Map.of("团体项目", teamMap, "男子项目", maleMap, "女子项目", femaleMap, "其他", otherMap));
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("获取每一年每个项目前八都是谁")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public Result getSummaryYearPrizes(Integer year, String sex) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ace.projectCode,
|
||||
acs.id activityId,
|
||||
ace.allName,
|
||||
acr.userId,
|
||||
acr.ranking,
|
||||
acr.numberOfPeople,
|
||||
acr.integral,
|
||||
ace.isMenWomen,
|
||||
acs.`name` AS activityName,
|
||||
CONCAT(u.username,'/',u.unionname) username,
|
||||
un.name unionname,
|
||||
ace.isInterest,
|
||||
bszb.`code` bszbCode,
|
||||
bszb.`name` bszbName,
|
||||
RIGHT ( ace.allName, 4 ) xmlx,
|
||||
LEFT ( ace.allName, 2 ) xblx
|
||||
FROM
|
||||
activity_school_event acse
|
||||
LEFT JOIN activity_school acs ON acs.id = acse.activityId
|
||||
LEFT JOIN activity_event ace ON ace.id = acse.eventId
|
||||
LEFT JOIN activity_basic_settings bszb ON bszb.id=ace.competitionCategory
|
||||
LEFT JOIN activity_results acr ON acr.eventId = acse.eventId
|
||||
AND acr.activityId = acs.id
|
||||
LEFT JOIN sys_union un ON un.id=acr.unionId
|
||||
LEFT JOIN `vw_user` u ON u.id = acr.userId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("YEAR(acs.startTime)", "=", year);
|
||||
if ("男".equals(sex)) {
|
||||
cnd.and(Cnd.exps("ace.isMenWomen", "=", "1").or("ace.isMenWomen", "is", null));
|
||||
} else {
|
||||
cnd.and(Cnd.exps("ace.isMenWomen", "=", "2").or("ace.isMenWomen", "is", null));
|
||||
}
|
||||
cnd.asc("ace.projectCode").asc("acr.ranking");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> allList =baseService.listMap( sql);
|
||||
if (Lang.isEmpty(allList)) {
|
||||
return Result.success(Map.of("甲组", Map.of(), "乙组", Map.of(), "丙组", Map.of(), "丁组", Map.of(), "集体项目", Map.of()));
|
||||
}
|
||||
allList.forEach(a -> {
|
||||
a.setv("allName", a.getString("allName").replaceAll("男子|女子|\\(单项\\)|\\(团体\\)|甲组|乙组|丙组|丁组|团体", ""));
|
||||
});
|
||||
|
||||
Map oneMap = NutMap.NEW();
|
||||
Map twoMap = NutMap.NEW();
|
||||
Map threeMap = NutMap.NEW();
|
||||
Map fourMap = NutMap.NEW();
|
||||
Map fiveMap = NutMap.NEW();
|
||||
|
||||
//甲组
|
||||
List<NutMap> oneList = allList.stream().filter(a -> a.getString("bszbName").equals("甲组")).collect(toList());
|
||||
if (Lang.isNotEmpty(oneList)) {
|
||||
oneMap = oneList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
//乙组
|
||||
List<NutMap> twoList = allList.stream().filter(a -> a.getString("bszbName").equals("乙组")).collect(toList());
|
||||
if (Lang.isNotEmpty(twoList)) {
|
||||
twoMap = twoList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
|
||||
//丙组
|
||||
List<NutMap> threeList = allList.stream().filter(a -> a.getString("bszbName").equals("丙组")).collect(toList());
|
||||
if (Lang.isNotEmpty(threeList)) {
|
||||
threeMap = threeList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
|
||||
//丁组
|
||||
List<NutMap> fourList = allList.stream().filter(a -> a.getString("bszbName").equals("丁组")).collect(toList());
|
||||
if (Lang.isNotEmpty(fourList)) {
|
||||
fourMap = fourList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
|
||||
//团体
|
||||
List<NutMap> fiveList = allList.stream().filter(a -> a.getString("bszbName").equals("团体")).collect(toList());
|
||||
if (Lang.isNotEmpty(fiveList)) {
|
||||
fiveMap = fiveList.stream().collect(Collectors.groupingBy(v -> v.getString("allName")));
|
||||
}
|
||||
NutMap map = new NutMap();
|
||||
map.put("甲组", oneMap);
|
||||
map.put("乙组", twoMap);
|
||||
map.put("丙组", threeMap);
|
||||
map.put("丁组", fourMap);
|
||||
map.put("集体项目", fiveMap);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("获取各个分工会年度前八名的个数")
|
||||
@SaCheckPermission("activity.prize.list")
|
||||
public Result summary(String activityId) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
//查询所有的工会
|
||||
List<Sys_union> query = sysUnionService.query();
|
||||
for (Sys_union sys_union : query) {
|
||||
NutMap nutMap = new NutMap();
|
||||
|
||||
//记录总人数
|
||||
int totalPeople = 0;
|
||||
nutMap.setv("unionname", sys_union.getName());
|
||||
for (int i = 1; i <= 8; i++) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
IFNULL((
|
||||
SELECT
|
||||
COUNT( 1 )
|
||||
FROM
|
||||
activity_results ar1
|
||||
WHERE
|
||||
ar1.activityId = ar2.activityId
|
||||
AND ar1.ranking = ar2.ranking
|
||||
AND ar1.isTeamPersonal = 1
|
||||
AND ar1.unionId = ar2.unionId
|
||||
),
|
||||
0
|
||||
) num,
|
||||
IFNULL( SUM( numberOfPeople ), 0 ) numberOfPeople
|
||||
FROM
|
||||
activity_results ar2 $condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ar2.activityId", "=", activityId);
|
||||
cnd.and("ar2.ranking", "=", i);
|
||||
cnd.and("ar2.unionId", "=", sys_union.getId());
|
||||
cnd.and("ar2.isTeamPersonal", "in", "1,2");
|
||||
sql.setCondition(cnd);
|
||||
int number = 0;
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
if (!list.isEmpty()) {
|
||||
number = list.get(0).getInt("num") + list.get(0).getInt("numberOfPeople");
|
||||
}
|
||||
totalPeople += number;
|
||||
if (i == 1) {
|
||||
nutMap.setv("one", number);
|
||||
} else if (i == 2) {
|
||||
nutMap.setv("two", number);
|
||||
} else if (i == 3) {
|
||||
nutMap.setv("three", number);
|
||||
} else if (i == 4) {
|
||||
nutMap.setv("four", number);
|
||||
} else if (i == 5) {
|
||||
nutMap.setv("fives", number);
|
||||
} else if (i == 6) {
|
||||
nutMap.setv("six", number);
|
||||
} else if (i == 7) {
|
||||
nutMap.setv("seven", number);
|
||||
} else if (i == 8) {
|
||||
nutMap.setv("eight", number);
|
||||
}
|
||||
|
||||
}
|
||||
nutMap.setv("totalPeople", totalPeople);
|
||||
result.add(nutMap);
|
||||
|
||||
|
||||
}
|
||||
map.put("score", result);
|
||||
return Result.success(map);
|
||||
}
|
||||
|
||||
@Data
|
||||
private class Ranking {
|
||||
|
||||
private int one;
|
||||
private int two;
|
||||
private int three;
|
||||
private int four;
|
||||
private int fives;
|
||||
private int six;
|
||||
private int seven;
|
||||
private int eight;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-3
@@ -222,16 +222,15 @@ public class ActivitySportsResultsController {
|
||||
|
||||
SELECT
|
||||
un.id,
|
||||
un.unionname
|
||||
un.name unionname
|
||||
FROM
|
||||
activity_school_apply asa
|
||||
LEFT JOIN sys_union un ON un.id = asa.unionId
|
||||
WHERE
|
||||
asa.activityId = @activityId
|
||||
AND asa.eventId = @eventId
|
||||
|
||||
GROUP BY
|
||||
un.unionname
|
||||
un.name
|
||||
""").setParam("activityId", activityId).setParam("eventId", eventId);
|
||||
return Result.success(activitySchoolApplyViService.list(sql));
|
||||
}
|
||||
|
||||
+23
-135
@@ -13,6 +13,7 @@ import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.services.SysUnionService;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolEvent;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -64,7 +65,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子项目分工会积分/女子项目分工会积分")
|
||||
public Result isMaleFemale(String activityId, String sex, Integer awardsMode) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
@@ -91,13 +93,13 @@ public class ActivitySportsScoreStatisticsController {
|
||||
if (awardsMode < 3) {
|
||||
cndX.and("eve.projectType", "=", awardsMode);
|
||||
cndX.and("eve.isInterest", "=", false);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
}
|
||||
if (awardsMode == 3) {
|
||||
cndX.and("eve.isInterest", "=", true);
|
||||
}
|
||||
if (awardsMode == 4) {
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
}
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
@@ -122,11 +124,11 @@ public class ActivitySportsScoreStatisticsController {
|
||||
Cnd cndC = Cnd.NEW();
|
||||
if ((awardsMode == 1 && event.getString("awardsMode").equals("1")) || (awardsMode == 2 && event.getString("awardsMode").equals("2"))) {
|
||||
cndC.and("ev.isInterest", "=", false);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
} else if (awardsMode == 3) {
|
||||
cndC.and("ev.isInterest", "=", true);
|
||||
} else if (awardsMode == 4) {
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
}
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
@@ -165,7 +167,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("单子单项前八/女子单项前八/团体项目前八")
|
||||
public Result isTopEight(String activityId, String sex, Integer awardsMode) {
|
||||
NutMap map = new NutMap();
|
||||
Cnd cndX = Cnd.NEW();
|
||||
@@ -184,7 +187,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
if (awardsMode == 1) {
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男性") ? 2 : 1);
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男") ? 2 : 1);
|
||||
cndX.and("eve.projectType", "=", 1);
|
||||
|
||||
} else {
|
||||
@@ -249,7 +252,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子总分前八/女子总分前八")
|
||||
public Result isScoreTopEight(String activityId, String sex) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
@@ -269,7 +273,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
LEFT JOIN activity_basic_settings ba ON eve.competitionCategory = ba.id $condition
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
List<Record> eventList = baseService.list(sqlX);
|
||||
@@ -293,7 +297,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
LEFT JOIN activity_event ev ON ar.eventId = ev.id $condition
|
||||
""");
|
||||
Cnd cndC = Cnd.NEW();
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.activityId", "=", activityId);
|
||||
@@ -318,7 +322,8 @@ public class ActivitySportsScoreStatisticsController {
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("年度团体总分")
|
||||
public Result getAnnualResults(Integer year) {
|
||||
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
@@ -349,7 +354,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
unionMap.put(x.getName(), score);
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
});
|
||||
labelList.add("总分");
|
||||
@@ -359,11 +364,12 @@ public class ActivitySportsScoreStatisticsController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("年度男子团体总分/年度女子团体总分")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public Result getYear8(Integer isMenWomen, Integer year) {
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
|
||||
// int isMenWomen = sex.equals("男性") ? 1 : 2;
|
||||
// int isMenWomen = sex.equals("男") ? 1 : 2;
|
||||
|
||||
Dao dao = sysUnionService.dao();
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
@@ -408,7 +414,7 @@ public class ActivitySportsScoreStatisticsController {
|
||||
unionMap.put(a.getName(), sexScore + (qwScore * 0.5));
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
|
||||
});
|
||||
@@ -416,139 +422,21 @@ public class ActivitySportsScoreStatisticsController {
|
||||
return Result.success(Map.of("label", activityNameList, "score", resultMap));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@Ok("void")
|
||||
public void doGetYear8(HttpServletResponse response, Integer isMenWomen, Integer year) throws Exception {
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
|
||||
unionList.forEach(u -> {
|
||||
NutMap nutMap = new NutMap();
|
||||
nutMap.setv("unionname", u.getName());
|
||||
double score = 0;
|
||||
for (int i = 1; i <= 2; i++) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SUM( ar.integral ) score
|
||||
FROM
|
||||
activity_results ar
|
||||
LEFT JOIN activity_event eve ON ar.eventId = eve.id
|
||||
LEFT JOIN activity_school `as` ON `as`.id = ar.activityId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("YEAR ( `as`.applyStartTime )", "=", year);
|
||||
cnd.and("ar.unionId", "=", u.getId());
|
||||
if (i == 1) {
|
||||
cnd.and("eve.isMenWomen", "=", isMenWomen);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score");
|
||||
} else {
|
||||
cnd.and("eve.isInterest", "=", 1);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score") * 0.5;
|
||||
}
|
||||
}
|
||||
nutMap.setv("score", score);
|
||||
result.add(nutMap);
|
||||
});
|
||||
List<NutMap> scoreList = result.stream().sorted(Comparator.comparing(ActivitySportsScoreStatisticsController::getDouble).reversed()).collect(Collectors.toList()).subList(0, 8);
|
||||
|
||||
for (int i = 0; i < scoreList.size(); i++) {
|
||||
scoreList.get(i).put("ranking", i + 1);
|
||||
}
|
||||
|
||||
|
||||
/* HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("scoreList", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("year", year);
|
||||
map.put("sex", isMenWomen == 1 ? '男性' : '女');
|
||||
map.put("scoreList", scoreList);
|
||||
String fileName = "%s年运动会%s子积分表".formatted(year, isMenWomen == 1 ? '男性' : '女');
|
||||
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(officeTemplateUtil.getPath("activity_getYear8"), config).render(map).writeAndClose(response.getOutputStream());*/
|
||||
}
|
||||
|
||||
public static Double getDouble(NutMap o) {
|
||||
return o.getDouble("score");
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckLogin
|
||||
public void doExport8ByActivity(HttpServletResponse response, String activityId, Integer isMenWomen) throws Exception {
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
unionList.forEach(u -> {
|
||||
NutMap nutMap = new NutMap();
|
||||
nutMap.setv("unionname", u.getName());
|
||||
double score = 0;
|
||||
for (int i = 1; i <= 2; i++) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SUM( ar.integral ) score
|
||||
FROM
|
||||
activity_results ar
|
||||
LEFT JOIN activity_event eve ON ar.eventId = eve.id
|
||||
LEFT JOIN activity_school `as` ON `as`.id = ar.activityId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("activityId", "=", activityId);
|
||||
cnd.and("ar.unionId", "=", u.getId());
|
||||
if (i == 1) {
|
||||
cnd.and("eve.isMenWomen", "=", isMenWomen);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score");
|
||||
} else {
|
||||
cnd.and("eve.isInterest", "=", 1);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
score += list.get(0).getDouble("score") * 0.5;
|
||||
}
|
||||
}
|
||||
nutMap.setv("score", score);
|
||||
result.add(nutMap);
|
||||
});
|
||||
List<NutMap> scoreList = result.stream().sorted(Comparator.comparing(ActivitySportsScoreStatisticsController::getDouble).reversed()).collect(Collectors.toList()).subList(0, 8);
|
||||
|
||||
for (int i = 0; i < scoreList.size(); i++) {
|
||||
scoreList.get(i).put("ranking", i + 1);
|
||||
}
|
||||
|
||||
/*HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
Configure config = Configure.newBuilder().bind("scoreList", policy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("sex", isMenWomen == 1 ? '男性' : '女');
|
||||
map.put("scoreList", scoreList);
|
||||
String fileName = "%s子积分表".formatted(isMenWomen == 1 ? '男性' : '女');
|
||||
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
XWPFTemplate.compile(officeTemplateUtil.getPath("activity_getYear8"), config).render(map, response.getOutputStream());*/
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public void doExcelCj(String activityId, String unionId, HttpServletResponse response) throws IOException {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
un.unioncode,
|
||||
un.unionname,
|
||||
un.name unionname,
|
||||
us.loginname,
|
||||
us.username,
|
||||
us.sex,
|
||||
|
||||
+24
-17
@@ -6,12 +6,14 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.services.SysUnionService;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolEvent;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -48,7 +50,8 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@Ok("void")
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("年度男子团体总分/年度女子团体总分")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public void getYear8(Integer isMenWomen, Integer year, HttpServletResponse response) {
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
List<Sys_union> unionList = sysUnionService.query();
|
||||
@@ -90,7 +93,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
unionMap.put(a.getName(), sexScore + (qwScore * 0.5));
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
|
||||
});
|
||||
@@ -120,7 +123,8 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@Ok("void")
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("年度团体总分")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
public void getAnnualResults(Integer year, HttpServletResponse response) {
|
||||
ArrayList<Map> resultMap = new ArrayList<>();
|
||||
|
||||
@@ -150,7 +154,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
unionMap.put(x.getName(), score);
|
||||
});
|
||||
unionMap.put("总分", scoreSum.get());
|
||||
unionMap.put("分工会", unionMap.getString("unionname"));
|
||||
unionMap.put("分工会", unionMap.getString("name"));
|
||||
resultMap.add(unionMap);
|
||||
});
|
||||
labelList.add("总分");
|
||||
@@ -180,6 +184,8 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子项目分工会积分/女子项目分工会积分")
|
||||
public void isMaleFemale(String activityId, String sex, Integer awardsMode, HttpServletResponse response) {
|
||||
NutMap map = new NutMap();
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
@@ -205,13 +211,13 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
if (awardsMode < 3) {
|
||||
cndX.and("eve.projectType", "=", awardsMode);
|
||||
cndX.and("eve.isInterest", "=", false);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndX.and("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
}
|
||||
if (awardsMode == 3) {
|
||||
cndX.and("eve.isInterest", "=", true);
|
||||
}
|
||||
if (awardsMode == 4) {
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
}
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
@@ -236,11 +242,11 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
Cnd cndC = Cnd.NEW();
|
||||
if ((awardsMode == 1 && event.getString("awardsMode").equals("1")) || (awardsMode == 2 && event.getString("awardsMode").equals("2"))) {
|
||||
cndC.and("ev.isInterest", "=", false);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2);
|
||||
cndC.and("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2);
|
||||
} else if (awardsMode == 3) {
|
||||
cndC.and("ev.isInterest", "=", true);
|
||||
} else if (awardsMode == 4) {
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
}
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
@@ -296,9 +302,9 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("单子单项前八/女子单项前八/团体项目前八")
|
||||
public void isTopEight(String activityId, String sex, Integer awardsMode, HttpServletResponse response) {
|
||||
NutMap map = new NutMap();
|
||||
List<Record> result = new ArrayList<>();
|
||||
Cnd cndX = Cnd.NEW();
|
||||
//查询所有的项目
|
||||
Sql sqlX = Sqls.create("""
|
||||
@@ -315,7 +321,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
if (awardsMode == 1) {
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男性") ? 2 : 1);
|
||||
cndX.and("eve.isMenWomen", "!=", sex.equals("男") ? 2 : 1);
|
||||
cndX.and("eve.projectType", "=", 1);
|
||||
|
||||
} else {
|
||||
@@ -330,7 +336,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
NutMap nutMap = new NutMap();
|
||||
Sql sqlC = Sqls.create("");
|
||||
Sql sqlC;
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (awardsMode == 1) {
|
||||
sqlC = Sqls.create("""
|
||||
@@ -386,12 +392,12 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
eventList.forEach(v -> {
|
||||
entityList.add(new ExcelExportEntity(v.getString("label"), v.getString("label"), 40));
|
||||
});
|
||||
String sex2 = awardsMode == 2 ? "团体" : sex.equals("男性") ? "男子" : "女子";
|
||||
String sex2 = awardsMode == 2 ? "团体" : sex.equals("男") ? "男子" : "女子";
|
||||
try {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, nutMaps);
|
||||
CommonDownloadUtil.download("项目前八.xlsx", workbook, response);
|
||||
CommonDownloadUtil.download(sex2 + "项目前八.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -402,9 +408,10 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activity.score.statistics")
|
||||
@ApiOperation("男子总分前八/女子总分前八")
|
||||
public void isScoreTopEight(String activityId, String sex, HttpServletResponse response) {
|
||||
|
||||
NutMap map = new NutMap();
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
Cnd cndX = Cnd.NEW();
|
||||
//查询所有的项目
|
||||
@@ -421,7 +428,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
LEFT JOIN activity_basic_settings ba ON eve.competitionCategory = ba.id $condition
|
||||
""");
|
||||
cndX.and("ev.activityId", "=", activityId);
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(Cnd.exps("eve.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("eve.isMenWomen", "is", null));
|
||||
cndX.and(new Static("1=1 order by case ba.`name` when '甲组' then 1 when '乙组' then 2 when '丙组' then 3 when '丁组' then 4 when '团体' then 5 end"));
|
||||
sqlX.setCondition(cndX);
|
||||
List<Record> eventList = baseService.list(sqlX);
|
||||
@@ -445,7 +452,7 @@ public class ActivitySportsStatisticsTypeExportController {
|
||||
LEFT JOIN activity_event ev ON ar.eventId = ev.id $condition
|
||||
""");
|
||||
Cnd cndC = Cnd.NEW();
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男性") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and(Cnd.exps("ev.isMenWomen", "=", sex.equals("男") ? 1 : 2).or("ev.isMenWomen", "is", null));
|
||||
cndC.and("ar.unionid", "=", sys_union.getId());
|
||||
cndC.and("ar.eventId", "=", event.getString("eventid"));
|
||||
cndC.and("ar.activityId", "=", activityId);
|
||||
|
||||
@@ -99,30 +99,31 @@ module.exports = {
|
||||
},
|
||||
methods: {
|
||||
async isMaleFemale() {
|
||||
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableColumns2 = []
|
||||
this.tableColumns3 = []
|
||||
this.tableColumns4 = []
|
||||
this.tableColumns5 = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
|
||||
try {
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/isMaleFemale", this.Form)
|
||||
data.eventList.forEach(v => {
|
||||
if (v.baname == "甲组" || v.baname == "乙组" || v.baname == "丙组" || v.baname == "丁组") {
|
||||
this.tableColumns.push({label: v.isMenWomen ? v.label.substr(4) : v.label.substr(2), prop: v.label})
|
||||
} else {
|
||||
this.tableColumns5.push({label: v.label, prop: v.label})
|
||||
}
|
||||
})
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}
|
||||
})
|
||||
|
||||
this.tableData = data.score.sort(this.compare("totalScore"))
|
||||
if (this.Form.unionname) {
|
||||
this.tableData = this.tableData.filter(v => v.unionname == this.Form.unionname)
|
||||
}catch ( e){
|
||||
this.$message.error(e.msg)
|
||||
}finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
compare(prop) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<el-table :data="tableData" style="width: 100%;height: 100%" stripe border
|
||||
ref="MaleFemaleTab"
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed >
|
||||
<!--:max-height="maxHeight"-->
|
||||
v-loading="tableLoading" size="mini" fixed>
|
||||
<!--:max-height="maxHeight"-->
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionname" header-align="center"
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-table-column label="总分" prop="totalScore" header-align="center"
|
||||
align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="名次"
|
||||
width="80px" ></el-table-column>
|
||||
width="80px"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
@@ -41,12 +41,18 @@ module.exports = {
|
||||
methods: {
|
||||
async isScoreTopEight() {
|
||||
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
|
||||
try {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form)
|
||||
const table = data.score.sort(this.compare("totalScore"))
|
||||
this.tableData = table.slice(0, 8)
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="tableLoading">
|
||||
<!-- <el-table :data="tableData" style="width: 100%" stripe border
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini">
|
||||
@@ -62,27 +62,27 @@ module.exports = {
|
||||
}).toString()
|
||||
},
|
||||
async isTopEight() {
|
||||
var loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据正在查询中,请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
try {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post(loc() + "/isTopEight", this.Form)
|
||||
data.eventList.map(v => {
|
||||
v.sss = []
|
||||
data.userList.map(x => {
|
||||
if (v.label === x.allname) {
|
||||
console.log(x)
|
||||
v.sss.push(x)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.tableData = data.eventList
|
||||
loading.close();
|
||||
this.tableData = data.eventList
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<slot></slot>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search', null)">搜索</el-button>
|
||||
</div>
|
||||
<div class="search">
|
||||
<slot></slot>
|
||||
<div class="search-query" v-if="isSearchButton">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search', null)">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "pageFormSearch"
|
||||
name: "pageFormSearch",
|
||||
props: {
|
||||
isSearchButton: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,486 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div class="platform" id="app" v-cloak>
|
||||
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch" :is-search-button="false">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="getActivitys"
|
||||
placeholder="选择年"
|
||||
style="width: 100%" type="year"
|
||||
v-model="pageForm.year" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称" v-if="!pageForm.status">
|
||||
<el-select :clearable="false" @change="actChange(pageForm.activityId)"
|
||||
filterable
|
||||
placeholder="请选择活动名称"
|
||||
style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in activityList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称" v-if="!pageForm.status">
|
||||
<el-select :clearable="false" @change="unionChange(pageForm.unionId)"
|
||||
filterable
|
||||
placeholder="请选择工会"
|
||||
style="width: 100%" v-model="pageForm.unionId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in unionList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="性别" v-if="pageForm.status==='1'||!pageForm.status">
|
||||
<el-select filterable
|
||||
placeholder="请选择性别"
|
||||
style="width: 100%" v-model="pageForm.sex">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool
|
||||
:label="pageForm.status==='2'?('中国地质大学(武汉)'+pageForm.year+'年教职工运动会获奖个数汇总表'):'奖品名单'">
|
||||
<el-tag
|
||||
:effect="pageForm.status===item.code?'dark':'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="statusType(item.code)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in statusOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-button @click="print" icon="el-icon-printer" type="primary" size="small">打 印</el-button>
|
||||
</table-tool>
|
||||
|
||||
|
||||
<div id=print>
|
||||
<template v-if="pageForm.activityId!=null">
|
||||
<table class="table table-bordered" v-if="isSummary==1" v-loading="tableLoading">
|
||||
<tr>
|
||||
<td class="text-center" colspan="11">
|
||||
<span v-if="activityList.find(v=>v.id === pageForm.activityId)">
|
||||
中国地质大学(武汉){{ activityList.find(v=>v.id === pageForm.activityId).name }}
|
||||
({{unionName}})获奖名单
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>项目</td>
|
||||
<td v-for="i in 8">
|
||||
第{{i}}名
|
||||
</td>
|
||||
<td>备注</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['团体项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['团体项目']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">团体项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span v-if="o.filter(f=>f.ranking==i && f.numberOfPeople!=null) && o.filter(f=>f.ranking==i && f.numberOfPeople!=null).length>0">
|
||||
{{o.filter(f=>f.ranking==i && f.numberOfPeople!=null).map(g=>g.numberOfPeople).reduce((a,b)=>a+b)}}
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['男子项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['男子项目']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">男子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataUnionPrize['女子项目']">
|
||||
<td :rowspan="Object.keys(tableDataUnionPrize['女子项目']).length" dd
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">女子项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
{{o.filter(f=>f.ranking==i).map(g=>g.username).join('、')}}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>合计</td>
|
||||
<td></td>
|
||||
<td v-for="i in 9">
|
||||
{{lastSum[i]}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<el-table :data="tableData" :header-cell-style="{background:'#FAFAFA'}"
|
||||
@sort-change="pageOrder"
|
||||
border row-key="id"
|
||||
show-summary
|
||||
size="mini" stripe style="width: 100%"
|
||||
v-if="isSummary==2" v-loading="tableLoading">
|
||||
|
||||
|
||||
<el-table-column :index="indexMethod" align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip
|
||||
v-for="column in summaryColumns"
|
||||
v-if="isSummary==2">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="签字"
|
||||
show-overflow-tooltip
|
||||
v-if="isSummary==2"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</template>
|
||||
<template v-else>
|
||||
<table class="table table-bordered" v-if="isSummary==3">
|
||||
<tr>
|
||||
<td class="text-center" colspan="11">
|
||||
{{pageForm.year}}田径运动会教工{{pageForm.sex}}子甲、乙、丙、丁、前八名记录表
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<div style="display: flex;justify-content: center;">项目</div>
|
||||
</td>
|
||||
<td v-for="i in 8">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
第{{i}}名
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['甲组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['甲组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">甲组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'甲组')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['乙组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['乙组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">乙组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'乙组')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['丙组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['丙组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">丙组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'丙组')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['丁组']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['丁组']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">丁组
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'丁组')}}
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(o,k,index) in tableDataPrize['集体项目']">
|
||||
<td :rowspan="Object.keys(tableDataPrize['集体项目']).length"
|
||||
style="vertical-align:middle"
|
||||
v-if="0==index">集体项目
|
||||
</td>
|
||||
<td>{{k}}</td>
|
||||
<td v-for="i in 8">
|
||||
<span>
|
||||
{{getSummaryByYear(o,i,'集体项目')}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</div>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isSummary: 1,
|
||||
activityList: [],
|
||||
unionList: [],
|
||||
unionName: "",
|
||||
pageForm: {
|
||||
activityId: "",
|
||||
unionId: "",
|
||||
status: null,
|
||||
sex: null,
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
summaryColumns: [
|
||||
{prop: 'unionname', label: '分工会'},
|
||||
{prop: 'one', label: '第一名'},
|
||||
{prop: 'two', label: '第二名'},
|
||||
{prop: 'three', label: '第三名'},
|
||||
{prop: 'four', label: '第四名'},
|
||||
{prop: 'fives', label: '第五名'},
|
||||
{prop: 'six', label: '第六名'},
|
||||
{prop: 'seven', label: '第七名'},
|
||||
{prop: 'eight', label: '第八名'},
|
||||
{prop: 'totalPeople', label: '合计'},
|
||||
],
|
||||
tableDataUnionPrize: {},
|
||||
lastSum: {},
|
||||
tableDataPrize: [],
|
||||
|
||||
statusOptions: [{code: "1", name: "分组汇总年度前八"}, {code: "2", name: "奖品个数年度汇总表"}]
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
async statusType(state) {
|
||||
this.tableLoading = true
|
||||
if (state === "1") {
|
||||
const data = await this.summaryYearPrizes()
|
||||
if (!data) {
|
||||
this.tableLoading = false
|
||||
return
|
||||
}
|
||||
} else if (state === "2") {
|
||||
this.pageForm.sex = null
|
||||
await this.summary()
|
||||
}
|
||||
|
||||
if (this.pageForm.status === state) {
|
||||
this.pageForm.status = null
|
||||
this.pageForm.sex = null
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
this.pageForm.unionId = this.unionList[0].id
|
||||
this.unionChange(this.unionList[0].id)
|
||||
} else {
|
||||
this.pageForm.status = state
|
||||
}
|
||||
this.tableLoading = false
|
||||
|
||||
},
|
||||
getSummaryByYear(o, i, type) {
|
||||
if (type === "集体项目") {
|
||||
const datas = o.filter(o => o.ranking === i).map(o => o.unionname)
|
||||
if (datas) {
|
||||
return datas.join(",")
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
} else {
|
||||
//甲组里面有可能有团体项目,所以说如果这个没有username就代表是团体
|
||||
return o.filter(f => f.ranking === i).map(g => g.username ? g.username : g.unionname).join('、')
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async summaryYearPrizes() {
|
||||
try {
|
||||
if (!this.pageForm.sex) {
|
||||
this.$message.warning("请选择性别")
|
||||
return false
|
||||
}
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.isSummary = 3
|
||||
const {data} = await this.$axios.post(loc() + "/getSummaryYearPrizes", this.pageForm)
|
||||
this.tableDataPrize = data
|
||||
return true
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getTableTdContent(d, i) {
|
||||
return d.filter(v => {
|
||||
if (v.isteampersonal === 1) {
|
||||
if (v.ranking == i) {
|
||||
console.log(v, i)
|
||||
return v.username
|
||||
}
|
||||
} else {
|
||||
if (v.ranking == i) {
|
||||
return v.numberofpeople
|
||||
}
|
||||
}
|
||||
}).map(v => {
|
||||
return v.isteampersonal === 1 ? v.username : v.numberofpeople
|
||||
}).toString()
|
||||
},
|
||||
|
||||
async summary() {
|
||||
try {
|
||||
if (this.activityList.length === 0) {
|
||||
return
|
||||
}
|
||||
if (!this.pageForm.activityId) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
}
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
this.isSummary = 2
|
||||
this.tableData = []
|
||||
|
||||
const {data} = await this.$axios.post(loc() + "/summary", this.pageForm)
|
||||
this.$set(this, "tableData", data.score)
|
||||
this.unionName = "汇总"
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
}
|
||||
|
||||
},
|
||||
print() {
|
||||
let subOutputRankPrint = document.getElementById('print');
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
document.body.innerHTML = newContent;
|
||||
window.print();
|
||||
window.location.reload();
|
||||
document.body.innerHTML = oldContent;
|
||||
return false;
|
||||
},
|
||||
actChange(activityId) {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.activityId = ""
|
||||
const activityData = this.activityList.find(v => v.id == activityId)
|
||||
this.pageForm.activityId = activityData.id
|
||||
this.getPrizes()
|
||||
},
|
||||
unionChange(unionId) {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.unionId = ""
|
||||
this.isSummary = 1
|
||||
const unionData = this.unionList.find(v => v.id == unionId)
|
||||
this.pageForm.unionId = unionData.id
|
||||
this.unionName = unionData.name
|
||||
this.getPrizes()
|
||||
},
|
||||
async getActivitys() {
|
||||
this.tableData = []
|
||||
const {data} = await this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm.activityId = ""
|
||||
this.activityList = data
|
||||
if (data && data.length > 0) {
|
||||
this.pageForm.activityId = data[0].id
|
||||
}
|
||||
await this.getPrizes()
|
||||
|
||||
},
|
||||
async getPrizes() {
|
||||
try {
|
||||
this.tableLoading = true
|
||||
const {data} = await this.$axios.post(loc() + "/getPrizes", this.pageForm)
|
||||
this.tableDataUnionPrize = data
|
||||
const lastSum = {}
|
||||
for (let i = 1; i <= 8; i++) {
|
||||
let sum = 0
|
||||
if (!$.isEmptyObject(data['男子项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['男子项目']) {
|
||||
xm = xm.concat(data['男子项目'][key])
|
||||
}
|
||||
sum += xm.filter(v => v.ranking === i).length
|
||||
}
|
||||
if (!$.isEmptyObject(data['女子项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['女子项目']) {
|
||||
xm = xm.concat(data['女子项目'][key])
|
||||
}
|
||||
sum += xm.filter(v => v.ranking === i).length
|
||||
}
|
||||
if (!$.isEmptyObject(data['团体项目'])) {
|
||||
let xm = []
|
||||
for (let key in data['团体项目']) {
|
||||
xm = xm.concat(data['团体项目'][key])
|
||||
}
|
||||
const teams = xm.filter(v => v.ranking === i).map(v => Number(v.numberOfPeople))
|
||||
if (teams && teams.length > 0) {
|
||||
sum += teams.reduce((a, b) => a + b)
|
||||
}
|
||||
}
|
||||
lastSum[i] = sum
|
||||
}
|
||||
|
||||
lastSum[9] = Object.values(lastSum).reduce((a, b) => a + b)
|
||||
this.lastSum = lastSum
|
||||
} catch (e) {
|
||||
this.$message.error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getActivitys()
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
if (this.unionList.length > 0) {
|
||||
this.pageForm.unionId = this.unionList[0].id
|
||||
this.unionName = this.unionList[0].unionname
|
||||
}
|
||||
await this.getPrizes()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -423,7 +423,7 @@ layout("/layouts/platform.html"){
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
|
||||
+244
-197
@@ -39,69 +39,75 @@ layout("/layouts/platform.html"){
|
||||
<guava ref="guava"
|
||||
style="width: 100%;min-height: 100%;background-color: #f0f2f5;padding: 20px;box-sizing: border-box;">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch" :is-search-button="false">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="getActivitys"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
v-model="pageForm.year" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称" v-if="!pageForm.status">
|
||||
<el-select :clearable="false" @change="activityChange" filterable
|
||||
placeholder="请选择活动名称" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in activityList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会" v-if="isUnion">
|
||||
<el-select @change="unionChange(pageForm.unionId)" clearable filterable placeholder="请选择工会"
|
||||
style="width: 100%" v-model="pageForm.unionname">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in unionList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item>
|
||||
<el-button @click="doExcelCj" icon="el-icon-printer" type="primary">导出成绩excel
|
||||
</el-button>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<div style="max-height: 250px">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="getActivitys"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
v-model="pageForm.year" value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称">
|
||||
<el-select :clearable="false" @change="activityChange" filterable
|
||||
placeholder="请选择活动名称" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in activityList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select @change="unionChange(pageForm.unionId)" clearable filterable
|
||||
placeholder="请选择工会"
|
||||
style="width: 100%" v-model="pageForm.name">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in unionList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
|
||||
</search>
|
||||
|
||||
|
||||
<!-- <div class="pull-right offscreen-right">
|
||||
<el-button @click="getYear8(1)" icon="el-icon-search" type="primary">年度男子团体总分
|
||||
</el-button>
|
||||
<el-button @click="getYear8(2)" icon="el-icon-search" type="primary">年度女子团体总分
|
||||
</el-button>
|
||||
<el-button @click="annualResults" icon="el-icon-search" type="primary">年度团体总分</el-button>
|
||||
<el-button @click="doExcelCj" class="mr10" icon="el-icon-printer" type="primary">导出成绩excel
|
||||
</el-button>
|
||||
</div>-->
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" style="margin-top: 10px">
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">按活动统计:</el-col>
|
||||
<el-col class="query-row-title">按年度统计:</el-col>
|
||||
<el-col class="query-row-content" v-if="isSearchOptions">
|
||||
<el-button
|
||||
style="margin-left: 10px"
|
||||
size="medium"
|
||||
v-for="item in searchOptions"
|
||||
<el-tag
|
||||
:effect="pageForm.status===item.code?'dark':'plain'"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
@click="statusType(item.code)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in statusOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">运动会成绩统计:</el-col>
|
||||
<el-col class="query-row-content" v-if="isSearchOptions">
|
||||
<el-tag
|
||||
:effect="pageForm.status2===item.id?'dark':'plain'"
|
||||
:key="item.id"
|
||||
:type="item.name" @click="searchClick(item.id)">{{item.name}}
|
||||
</el-button>
|
||||
:type="item.name"
|
||||
@click="status2Type(item.id)"
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in searchOptions">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
<el-col class="query-row-content" v-else>
|
||||
<el-button style="margin-left: 10px"
|
||||
@@ -111,77 +117,70 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<div class="pull-right offscreen-right" style="margin-left: auto">
|
||||
<!--
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doExport8ByActivity"
|
||||
v-if="[11,12].includes(isSearchOptions)&&pageForm.activityId">导出
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="doGetYear8" v-else-if="isYear8">导出
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-printer" @click="print" v-else>打 印</el-button>-->
|
||||
<el-button @click="doExportByActivityStatisticsType" icon="el-icon-printer" type="primary">
|
||||
导出
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
<div id=print ref="print">
|
||||
<el-card shadow="never" class="mt10"
|
||||
v-show="[1,2,3,4,5,9,10].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==1" label="男子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==2" label="女子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==3" label="男子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==4" label="女子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==5" label="男女混合类成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&isSearch" label="分工会男子项目积分"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&!isSearch" label="分工会项目成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==10" label="分工会女子项目积分"></table-tool>
|
||||
<is-male-female :form="pageForm" ref="female"></is-male-female>
|
||||
<el-card shadow="never" class="mt10"
|
||||
v-show="[1,2,3,4,5,9,10].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==1" label="男子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==2" label="女子单项成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==3" label="男子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==4" label="女子团体成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==5" label="男女混合类成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&isSearch" label="男子项目分工会积分"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==9&&!isSearch" label="分工会项目成绩"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==10" label="女子项目分工会积分"></table-tool>
|
||||
<is-male-female :form="pageForm" ref="female"></is-male-female>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[6,7,8].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==6" label="男子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==7" label="女子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==8" label="综合类前八"></table-tool>
|
||||
<el-row>
|
||||
<top-eight :form="pageForm" ref="doeight"></top-eight>
|
||||
</el-row>
|
||||
<el-card shadow="never" class="mt10" v-show="[6,7,8].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==6" label="男子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==7" label="女子项目前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==8" label="综合类前八"></table-tool>
|
||||
<el-row>
|
||||
<top-eight :form="pageForm" ref="doeight"></top-eight>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[11,12].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==11" label="分工会男子总分前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==12" label="分工会女子总分前八"></table-tool>
|
||||
<score-top-eight :form="pageForm" ref="doTopEight"></score-top-eight>
|
||||
<el-card shadow="never" class="mt10" v-show="[11,12].includes(isSearchOptions)&&isSearchOptions">
|
||||
<table-tool v-if="isSearchOptions==11" label="男子总分前八"></table-tool>
|
||||
<table-tool v-if="isSearchOptions==12" label="女子总分前八"></table-tool>
|
||||
<score-top-eight :form="pageForm" ref="doTopEight"></score-top-eight>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10" v-show="[99].includes(isSearchOptions)">
|
||||
<table-tool v-if="isSearchOptions==99" label="全年成绩"></table-tool>
|
||||
<el-table :data="annualResultsTableData" style="width: 100%;height: 100%" stripe border
|
||||
show-summary
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed ref="annualResults"
|
||||
>
|
||||
<el-card shadow="never" class="mt10" v-show="[99].includes(isSearchOptions)">
|
||||
<table-tool v-if="isSearchOptions==99" label="全年成绩"></table-tool>
|
||||
<el-table :data="annualResultsTableData" style="width: 100%;height: 100%" stripe border
|
||||
show-summary
|
||||
:header-cell-style="{background:'#FAFAFA'}" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading" size="mini" fixed ref="annualResults"
|
||||
>
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
label="名次"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in annualTableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
label="名次"
|
||||
width="80px" fixed></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in annualTableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
@@ -189,7 +188,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
|
||||
<script>
|
||||
<script nonce="${cspNonce!}">
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
@@ -218,24 +217,31 @@ layout("/layouts/platform.html"){
|
||||
{id: 3, name: "男子团体"},
|
||||
{id: 4, name: "女子团体"},
|
||||
{id: 5, name: "男女混合类"},*/
|
||||
{id: 9, name: "分工会男子项目积分"},
|
||||
{id: 10, name: "分工会女子项目积分"},
|
||||
{id: 6, name: "男子项目前八"},
|
||||
{id: 7, name: "女子项目前八"},
|
||||
{id: 8, name: "团体前八"},
|
||||
{id: 9, name: "男子项目分工会积分"},
|
||||
{id: 10, name: "女子项目分工会积分"},
|
||||
{id: 6, name: "男子单项前八"},
|
||||
{id: 7, name: "女子单项前八"},
|
||||
{id: 8, name: "团体项目前八"},
|
||||
|
||||
{id: 11, name: "分工会男子总分前八"},
|
||||
{id: 12, name: "分工会女子总分前八"},
|
||||
{id: 11, name: "男子总分前八"},
|
||||
{id: 12, name: "女子总分前八"},
|
||||
|
||||
],
|
||||
isSearchOptions: 9,
|
||||
pageForm: {
|
||||
status2: 9,
|
||||
status: '',
|
||||
unionname: '',
|
||||
activityId: "",
|
||||
personTypes: [],
|
||||
year: new Date().getFullYear() + "",
|
||||
},
|
||||
activityStatisticsType: 0//统计类型说明:1 年度男子团体总分2.年度女子团体总分3.年度团体总分4.分工会男子项目积分5.分工会女子项目积分,依次后推
|
||||
activityStatisticsType: 0,//统计类型说明:1 年度男子团体总分2.年度女子团体总分3.年度团体总分4.分工会男子项目积分5.分工会女子项目积分,依次后推
|
||||
statusOptions: [
|
||||
{code: "1", name: "年度男子团体总分"},
|
||||
{code: "2", name: "年度女子团体总分"},
|
||||
{code: "3", name: "年度团体总分"}
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -244,29 +250,55 @@ layout("/layouts/platform.html"){
|
||||
'score-top-eight': httpVueLoader('/components/module/activity/score/scoreTopEight.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async status2Type(id) {
|
||||
if (this.pageForm.status2 === id) {
|
||||
this.$set(this.pageForm, "status2", 9)
|
||||
this.$set(this.pageForm, "sex", "男")
|
||||
this.$set(this.pageForm, "activityId", this.activityList[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "status2", id)
|
||||
}
|
||||
this.searchClick(id)
|
||||
},
|
||||
async statusType(state) {
|
||||
if (state === "1") {
|
||||
await this.getYear8(1)
|
||||
} else if (state === "2") {
|
||||
await this.getYear8(2)
|
||||
} else if (state === "3") {
|
||||
await this.annualResults()
|
||||
}
|
||||
|
||||
if (this.pageForm.status === state) {
|
||||
this.$set(this.pageForm, "status", null)
|
||||
this.$set(this.pageForm, "activityId", this.activityList[0].id)
|
||||
this.activityChange()
|
||||
this.$set(this.pageForm, "status2", 9)
|
||||
} else {
|
||||
this.$set(this.pageForm, "status", state)
|
||||
this.$set(this.pageForm, "status2", '')
|
||||
|
||||
}
|
||||
},
|
||||
async doExportByActivityStatisticsType() {
|
||||
const {activityId, year} = this.pageForm
|
||||
const url = "/platform/activity/statistics/export"
|
||||
if (this.activityStatisticsType === 1 || this.activityStatisticsType === 2) {
|
||||
window.open(url + "/getYear8?year=" + year + "&isMenWomen=" + this.isMenWomen)
|
||||
this.$downLoad(url + "/getYear8", {year: year, isMenWomen: this.isMenWomen})
|
||||
} else if (this.activityStatisticsType === 3) {
|
||||
window.open(url + "/getAnnualResults?year=" + year)
|
||||
this.$downLoad(url + "/getAnnualResults", {year})
|
||||
} else if (this.activityStatisticsType === 4 || this.activityStatisticsType === 5) {
|
||||
let sex = this.activityStatisticsType === 4 ? "男性" : "女性"
|
||||
window.open(url + "/isMaleFemale?activityId=" + activityId + "&sex=" + sex + "&awardsMode=4")
|
||||
let sex = this.activityStatisticsType === 4 ? "男" : "女"
|
||||
this.$downLoad(url + "/isMaleFemale", {activityId: activityId, sex: sex, awardsMode: 4})
|
||||
} else if (this.activityStatisticsType === 6 || this.activityStatisticsType === 7 || this.activityStatisticsType === 8) {
|
||||
let sex = this.activityStatisticsType === 6 ? "男性" : "女性"
|
||||
let sex = this.activityStatisticsType === 6 ? "男" : "女"
|
||||
let awardsMode = this.activityStatisticsType === 8 ? 2 : 1
|
||||
window.open(url + "/isTopEight?activityId=" + activityId + "&sex=" + sex + "&awardsMode=" + awardsMode)
|
||||
this.$downLoad(url + "/isTopEight", {activityId: activityId, sex: sex, awardsMode: awardsMode})
|
||||
} else if (this.activityStatisticsType === 9 || this.activityStatisticsType === 10) {
|
||||
let sex = this.activityStatisticsType === 9 ? "男性" : "女性"
|
||||
window.open(url + "/isScoreTopEight?activityId=" + activityId + "&sex=" + sex)
|
||||
let sex = this.activityStatisticsType === 9 ? "男" : "女"
|
||||
this.$downLoad(url + "/isScoreTopEight", {activityId: activityId, sex: sex})
|
||||
}
|
||||
},
|
||||
doExport8ByActivity() {
|
||||
window.open(loc() + "/doExport8ByActivity?activityId=" + this.pageForm.activityId + "&isMenWomen=" + (this.isSearchOptions === 11 ? 1 : 2))
|
||||
|
||||
},
|
||||
doExcelCj() {
|
||||
const {activityId, unionname} = this.pageForm
|
||||
let unionId = ''
|
||||
@@ -274,21 +306,11 @@ layout("/layouts/platform.html"){
|
||||
const unionlist = clone(this.unionList)
|
||||
unionId = unionlist.find(v => v.unionname === unionname).id
|
||||
}
|
||||
window.open(loc() + "/doExcelCj?activityId=" + activityId + "&unionId=" + unionId)
|
||||
|
||||
},
|
||||
print() {
|
||||
let subOutputRankPrint = document.getElementById('print');
|
||||
let newContent = subOutputRankPrint.innerHTML;
|
||||
let oldContent = document.body.innerHTML;
|
||||
document.body.innerHTML = newContent;
|
||||
window.print();
|
||||
window.location.reload();
|
||||
document.body.innerHTML = oldContent;
|
||||
return false;
|
||||
this.$downLoad(loc() + "/doExcelCj", {activityId: activityId, unionId: unionId})
|
||||
|
||||
},
|
||||
activityChange() {
|
||||
this.$set(this.pageForm, "yearDoSearch", null)
|
||||
const aa = this.activityList.find(v => v.id == this.pageForm.activityId)
|
||||
if (aa.applyType == 1) {
|
||||
this.isSearch = false
|
||||
@@ -302,6 +324,10 @@ layout("/layouts/platform.html"){
|
||||
this.searchClick(9)
|
||||
},
|
||||
searchClick(id) {
|
||||
this.$set(this.pageForm, "status", null)
|
||||
if (!this.pageForm.activityId) {
|
||||
this.$set(this.pageForm, "activityId", this.activityList[0].id)
|
||||
}
|
||||
if (id === 9) {
|
||||
this.activityStatisticsType = 4
|
||||
} else if (id === 10) {
|
||||
@@ -322,16 +348,16 @@ layout("/layouts/platform.html"){
|
||||
if (id == 1 || id == 2) {
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.pageForm.sex = id == 1 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 1 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 1
|
||||
} else if (id == 3 || id == 4) {
|
||||
this.isUnion = false
|
||||
this.isUnionisYear8 = false
|
||||
this.pageForm.sex = id == 3 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 3 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 2
|
||||
} else if (id == 9 || id == 10) {
|
||||
this.isUnion = true
|
||||
this.pageForm.sex = id == 9 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 9 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 4
|
||||
} else {
|
||||
this.pageForm.awardsMode = 3
|
||||
@@ -341,76 +367,97 @@ layout("/layouts/platform.html"){
|
||||
if (id == 6 || id == 7) {
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.pageForm.sex = id == 6 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 6 ? "男" : "女"
|
||||
this.pageForm.awardsMode = 1
|
||||
} else if (id == 8) {
|
||||
this.pageForm.awardsMode = 2
|
||||
}
|
||||
this.$refs.doeight.isTopEight()
|
||||
} else if (id == 11 || id == 12) {
|
||||
this.pageForm.sex = id == 11 ? "男性" : "女性"
|
||||
this.pageForm.sex = id == 11 ? "男" : "女"
|
||||
this.$refs.doTopEight.isScoreTopEight()
|
||||
}
|
||||
},
|
||||
async doGetYear8() {
|
||||
location.href = loc() + "/doGetYear8?year=" + this.pageForm.year + "&isMenWomen=" + this.isMenWomen
|
||||
},
|
||||
async getYear8(isMenWomen) {
|
||||
this.activityStatisticsType = isMenWomen
|
||||
this.isMenWomen = isMenWomen
|
||||
this.isUnion = false
|
||||
this.isYear8 = true
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
try {
|
||||
this.activityStatisticsType = isMenWomen
|
||||
this.isMenWomen = isMenWomen
|
||||
this.isUnion = false
|
||||
this.isYear8 = true
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
this.tableLoading = true
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getYear8", {
|
||||
year: this.pageForm.year,
|
||||
isMenWomen: isMenWomen
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getYear8", {
|
||||
year: this.pageForm.year,
|
||||
isMenWomen: isMenWomen
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
},
|
||||
|
||||
async annualResults() {
|
||||
this.activityStatisticsType = 3
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
try {
|
||||
this.activityStatisticsType = 3
|
||||
this.isUnion = false
|
||||
this.isYear8 = false
|
||||
this.$set(this.pageForm, "activityId", null)
|
||||
this.$set(this.pageForm, "unionname", null)
|
||||
this.annualTableColumns = []
|
||||
this.annualResultsTableData = []
|
||||
this.tableLoading = true;
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getAnnualResults", {
|
||||
year: this.pageForm.year
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
this.isSearchOptions = 99
|
||||
const {data} = await this.$axios.post(loc() + "/getAnnualResults", {
|
||||
year: this.pageForm.year
|
||||
})
|
||||
this.annualResultsTableData = data.score
|
||||
this.annualResultsTableData = this.annualResultsTableData.sort((a, b) => b['总分'] - a['总分'])
|
||||
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
data.label.forEach(v => {
|
||||
this.annualTableColumns.push({label: v, prop: v})
|
||||
})
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
} finally {
|
||||
this.tableLoading = false
|
||||
}
|
||||
},
|
||||
async getActivitys() {
|
||||
|
||||
const {data} = await this.$axios.post(loc() + "/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm = {
|
||||
activityId: "",
|
||||
year: this.pageForm.year
|
||||
try {
|
||||
const {data} = await this.$axios.post(loc() + "/getActivitys", {year: this.pageForm.year})
|
||||
this.pageForm = {
|
||||
activityId: "",
|
||||
status2: 9,
|
||||
year: this.pageForm.year
|
||||
}
|
||||
this.activityList = data
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
}
|
||||
this.activityList = data
|
||||
|
||||
|
||||
},
|
||||
async changeActivit() {
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
try {
|
||||
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
|
||||
this.events = resp
|
||||
} catch (e) {
|
||||
this.$message().error(e.msg)
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
|
||||
Reference in New Issue
Block a user