This commit is contained in:
2025-04-22 15:29:54 +08:00
parent 619ac59470
commit 80b27850f3
6 changed files with 364 additions and 339 deletions
@@ -151,8 +151,8 @@ public class ActivityApplyController {
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,
(SELECT COUNT(1) FROM activity_school_apply app WHERE app.activityId=school.id AND app.unionId=@unionId AND app.unionLeader=TRUE) LeaderCount, (SELECT COUNT(1) FROM activity_school_apply app WHERE app.activityId=school.id AND app.activityUnionId=@unionId AND app.unionLeader=TRUE) LeaderCount,
(SELECT COUNT(1) FROM activity_school_apply app WHERE app.activityId=school.id AND app.unionId=@unionId AND app.unionCoach=TRUE) CoachCount (SELECT COUNT(1) FROM activity_school_apply app WHERE app.activityId=school.id AND app.activityUnionId=@unionId AND app.unionCoach=TRUE) CoachCount
FROM FROM
activity_school school activity_school school
LEFT JOIN activity_basic_settings ba ON ba.`code` = school.activityLevel LEFT JOIN activity_basic_settings ba ON ba.`code` = school.activityLevel
@@ -168,8 +168,7 @@ public class ActivityApplyController {
switch (isActivity) { switch (isActivity) {
//报名中 //报名中
case 2 -> case 2 -> cnd.and(new Static("now() > school.applyStartTime and now() < school.applyEndTime"));
cnd.and(new Static("now() > school.applyStartTime and now() < school.applyEndTime"));
//已结束 //已结束
case 3 -> cnd.and(new Static("now() > school.applyEndTime")); case 3 -> cnd.and(new Static("now() > school.applyEndTime"));
//进行中 //进行中
@@ -538,7 +537,10 @@ public class ActivityApplyController {
group.orLike("u.loginname", query); group.orLike("u.loginname", query);
cnd.and(group); cnd.and(group);
} }
cnd.and("un.unionid", "=", union_id); SqlExpressionGroup group = new SqlExpressionGroup();
group.or("un.unionid", "=", union_id);
group.or("un.id", "=", "223");
cnd.and(group);
sql.setCondition(cnd); sql.setCondition(cnd);
return sysUserService.list(sql); return sysUserService.list(sql);
} }
@@ -696,50 +698,54 @@ public class ActivityApplyController {
public Object doLeaderCoachHead(@Param(value = "staffData", required = false) ActivitySchoolApply staffData, public Object doLeaderCoachHead(@Param(value = "staffData", required = false) ActivitySchoolApply staffData,
@Param(value = "LeaderData", required = false) ActivitySchoolApply LeaderData, @Param(value = "LeaderData", required = false) ActivitySchoolApply LeaderData,
@Param(value = "CoachData", required = false) ActivitySchoolApply CoachData, @Param(value = "CoachData", required = false) ActivitySchoolApply CoachData,
@Param(value = "headData", required = false) ActivitySchoolApply headData) { @Param(value = "headData", required = false) ActivitySchoolApply headData,
@Param(value = "headData") String activityId) {
ActivityBasicUnit thisBasicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=",ShiroUtil.getUnitId()));
ActivityBasicUnion thisBasicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", thisBasicUnit.getUnionid()));
Cnd cnd = Cnd.NEW();
cnd.and("activityId", "=", activityId);
cnd.and("activityUnionId", "=", getUnionId());
SqlExpressionGroup group = new SqlExpressionGroup();
group.or("unionStaff", "=", 1);
group.or("unionLeader", "=", 1);
group.or("unionCoach", "=", 1);
group.or("unionHead", "=", 1);
cnd.and(group);
activitySchoolApplyService.clear(cnd);
if (staffData.getUserId() != null) { if (staffData.getUserId() != null) {
ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", staffData.getUnitId())); ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", staffData.getUnitId()));
ActivityBasicUnion basicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionid()));
activitySchoolApplyService.clear(Cnd.where("activityId", "=", staffData.getActivityId()).and("unionStaff", "=", true).and("unionId", "=", getUnionId()));
staffData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString()); staffData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString());
staffData.setApplyDate(DateUtil.getDate()); staffData.setApplyDate(DateUtil.getDate());
staffData.setUnitname(basicUnit.getName()); staffData.setUnitname(basicUnit.getName());
staffData.setActivityUnionId(basicUnion.getId()); staffData.setActivityUnionId(thisBasicUnion.getId());
staffData.setActivityUnionName(basicUnion.getUnionname()); staffData.setActivityUnionName(thisBasicUnion.getUnionname());
activitySchoolApplyService.insert(staffData); activitySchoolApplyService.insert(staffData);
} }
if (LeaderData.getUserId() != null) { if (LeaderData.getUserId() != null) {
ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", LeaderData.getUnitId())); ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", LeaderData.getUnitId()));
ActivityBasicUnion basicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionid()));
activitySchoolApplyService.clear(Cnd.where("activityId", "=", LeaderData.getActivityId()).and("unionLeader", "=", true).and("unionId", "=", getUnionId()));
LeaderData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString()); LeaderData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString());
LeaderData.setApplyDate(DateUtil.getDate()); LeaderData.setApplyDate(DateUtil.getDate());
LeaderData.setUnitname(basicUnit.getName()); LeaderData.setUnitname(basicUnit.getName());
LeaderData.setActivityUnionId(basicUnion.getId()); LeaderData.setActivityUnionId(thisBasicUnion.getId());
LeaderData.setActivityUnionName(basicUnion.getUnionname()); LeaderData.setActivityUnionName(thisBasicUnion.getUnionname());
activitySchoolApplyService.insert(LeaderData); activitySchoolApplyService.insert(LeaderData);
} }
if (CoachData.getUserId() != null) { if (CoachData.getUserId() != null) {
ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", CoachData.getUnitId())); ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", CoachData.getUnitId()));
ActivityBasicUnion basicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionid()));
activitySchoolApplyService.clear(Cnd.where("activityId", "=", CoachData.getActivityId()).and("unionCoach", "=", true).and("unionId", "=", getUnionId()));
CoachData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString()); CoachData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString());
CoachData.setApplyDate(DateUtil.getDate()); CoachData.setApplyDate(DateUtil.getDate());
CoachData.setUnitname(basicUnit.getName()); CoachData.setUnitname(basicUnit.getName());
CoachData.setActivityUnionId(basicUnion.getId()); CoachData.setActivityUnionId(thisBasicUnion.getId());
CoachData.setActivityUnionName(basicUnion.getUnionname()); CoachData.setActivityUnionName(thisBasicUnion.getUnionname());
activitySchoolApplyService.insert(CoachData); activitySchoolApplyService.insert(CoachData);
} }
if (headData.getUserId() != null) { if (headData.getUserId() != null) {
ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", headData.getUnitId())); ActivityBasicUnit basicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", headData.getUnitId()));
ActivityBasicUnion basicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", basicUnit.getUnionid()));
activitySchoolApplyService.clear(Cnd.where("activityId", "=", headData.getActivityId()).and("unionHead", "=", true).and("unionId", "=", getUnionId()));
headData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString()); headData.setApplyUser(ShiroUtil.getPrincipalProperty("id").toString());
headData.setApplyDate(DateUtil.getDate()); headData.setApplyDate(DateUtil.getDate());
headData.setUnitname(basicUnit.getName()); headData.setUnitname(basicUnit.getName());
headData.setActivityUnionId(basicUnion.getId()); headData.setActivityUnionId(thisBasicUnion.getId());
headData.setActivityUnionName(basicUnion.getUnionname()); headData.setActivityUnionName(thisBasicUnion.getUnionname());
activitySchoolApplyService.insert(headData); activitySchoolApplyService.insert(headData);
} }
@@ -755,9 +761,9 @@ public class ActivityApplyController {
public Object getUnionCoachLeaderHead(@Param(value = "activityId", required = false) String activityId) { public Object getUnionCoachLeaderHead(@Param(value = "activityId", required = false) String activityId) {
Map result = new HashMap(); Map result = new HashMap();
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT apply.*,us.unitname FROM activity_school_apply apply LEFT JOIN `user` us ON us.id=apply.userId WHERE apply.activityId=@activityId and apply.unionId=@unionId SELECT apply.*,us.unitname FROM activity_school_apply apply LEFT JOIN `user` us ON us.id=apply.userId WHERE apply.activityId=@activityId and apply.activityUnionId=@activityUnionId
"""); """);
sql.setParam("unionId", getUnionId()); sql.setParam("activityUnionId", getUnionId());
sql.setParam("activityId", activityId); sql.setParam("activityId", activityId);
List<NutMap> list = activitySchoolApplyService.listMap(sql); List<NutMap> list = activitySchoolApplyService.listMap(sql);
NutMap unionCoach = list.stream().filter(v -> { NutMap unionCoach = list.stream().filter(v -> {
@@ -897,6 +903,7 @@ public class ActivityApplyController {
/** /**
* 下载签名告知书 * 下载签名告知书
*
* @param activityId * @param activityId
* @param response * @param response
*/ */
@@ -304,6 +304,7 @@ public class ActivityCommonController {
LEFT JOIN activity_school sc ON sc.id=app.activityId LEFT JOIN activity_school sc ON sc.id=app.activityId
WHERE WHERE
activityId = @id activityId = @id
and app.status=2
$cnd $cnd
ORDER BY ORDER BY
app.applyUser DESC, app.applyUser DESC,
@@ -323,7 +324,7 @@ public class ActivityCommonController {
list.forEach(z -> { list.forEach(z -> {
List<String> identity = Json.fromJsonAsList(String.class, z.getString("identity")); List<String> identity = Json.fromJsonAsList(String.class, z.getString("identity"));
String s = identity.stream().map(personType::getName).collect(Collectors.toList()).toString(); String s = identity.stream().map(personType::getName).collect(Collectors.toList()).toString();
z.addv("sf", s); z.addv("sf", s.replaceAll("[\\[\\]]", ""));
}); });
List<ExcelExportEntity> exportEntities = new ArrayList<>(); List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("小队名称", "team", 20)); exportEntities.add(new ExcelExportEntity("小队名称", "team", 20));
@@ -336,7 +337,7 @@ public class ActivityCommonController {
exportEntities.add(new ExcelExportEntity("身份", "sf", 20)); exportEntities.add(new ExcelExportEntity("身份", "sf", 20));
exportEntities.add(new ExcelExportEntity("报名人", "applyUserName", 20)); exportEntities.add(new ExcelExportEntity("报名人", "applyUserName", 20));
Map<String, List<NutMap>> listMap = list.stream().collect(Collectors.groupingBy(v -> v.getString("allName"))); Map<String, List<NutMap>> listMap = list.stream().collect(Collectors.groupingBy(v -> v.getString("unionname")));
Workbook workbook = new XSSFWorkbook(); Workbook workbook = new XSSFWorkbook();
listMap.forEach((k, v) -> { listMap.forEach((k, v) -> {
ExcelExportService service = new ExcelExportService(); ExcelExportService service = new ExcelExportService();
@@ -133,6 +133,8 @@ public class ActivityReadingController {
"""); """);
cnd.and("app.activityId", "=", id); cnd.and("app.activityId", "=", id);
cnd.and("app.status", "=", 2);
// cnd.and("YEAR(app.applyDate)", "=", year); // cnd.and("YEAR(app.applyDate)", "=", year);
sql.setCondition(cnd); sql.setCondition(cnd);
if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) { if (!ShiroUtil.hasAnyRoles("sysadmin,A06,SCHOOL_UNION_SPORTS_ADMIN")) {
@@ -1,3 +1,4 @@
<template> <template>
<div> <div>
<el-steps :active="active" finish-status="success" simple> <el-steps :active="active" finish-status="success" simple>
@@ -255,14 +255,15 @@ 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" v-if="item.isSign" style="display: flex;justify-content: space-around;"> <div class="text item" v-if="item.isSign"
<div> style="display: flex;justify-content: space-around;">
<!-- <div>
<el-button @click.stop="doExport" <el-button @click.stop="doExport"
size="mini" size="mini"
type="primary"> type="primary">
下载风险告知书(签名) 下载风险告知书(签名)
</el-button> </el-button>
</div> </div>-->
<div> <div>
<el-button @click.stop="openPromiseBook(item)" <el-button @click.stop="openPromiseBook(item)"
size="mini" size="mini"
@@ -334,12 +335,12 @@ layout("/layouts/platform.html"){
<!-- 团长:<span style="color: #419BF8">{{headData.username | str}}</span>&emsp13;--> <!-- 团长:<span style="color: #419BF8">{{headData.username | str}}</span>&emsp13;-->
领队:<span style="color: #419BF8">{{LeaderData.username | str}} </span>&emsp13; 领队:<span style="color: #419BF8">{{LeaderData.username | str}} </span>&emsp13;
教练:<span style="color: #419BF8">{{CoachData.username | str}}</span> 教练:<span style="color: #419BF8">{{CoachData.username | str}}</span>
工作人员:<span <!-- 工作人员:<span
style="color: #419BF8">{{staffData.username | str}}</span> style="color: #419BF8">{{staffData.username | str}}</span>-->
</div> </div>
<div> <div>
<el-button @click="openLeaderCoach" plain type="primary" <el-button @click="openLeaderCoach" plain type="primary"
v-if="unionLeaderCoach">设置领队/教练/工作人员 v-if="unionLeaderCoach">设置领队/教练
</el-button> </el-button>
</div> </div>
@@ -371,14 +372,14 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-else-if="column.prop=='applyNum'"> <template scope="{row}" v-else-if="column.prop=='applyNum'">
{{ row.totalApplyNum }} {{ row.totalApplyNum }}
<!-- <span v-if="row.successUserApply>0&&row.applyType !== 3">--> <!-- <span v-if="row.successUserApply>0&&row.applyType !== 3">-->
<!-- {{row.successUserApply}}人</span>--> <!-- {{row.successUserApply}}人</span>-->
<!-- <span--> <!-- <span-->
<!-- v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">--> <!-- v-else-if="JSON.parse(row.applyWay).length===2&&row.applyWay.includes(1)">-->
<!-- {{row.totalApplyNum}}人</span>--> <!-- {{row.totalApplyNum}}人</span>-->
<!-- <span v-else-if="row.totalApplyNum>0&&row.applyType === 3">--> <!-- <span v-else-if="row.totalApplyNum>0&&row.applyType === 3">-->
<!-- {{ row.totalApplyNum }}人</span>--> <!-- {{ row.totalApplyNum }}人</span>-->
<!-- <span v-else>0人</span>--> <!-- <span v-else>0人</span>-->
</template> </template>
@@ -769,7 +770,8 @@ layout("/layouts/platform.html"){
<template #public> <template #public>
<vi-title2 title="批量审核"> <vi-title2 title="批量审核">
<template #func> <template #func>
<el-radio-group v-model="activityIsAudit" @change="openAuditApplyUser(null)" size="small" style="margin-right: 10px"> <el-radio-group v-model="activityIsAudit" @change="openAuditApplyUser(null)" size="small"
style="margin-right: 10px">
<el-radio-button label="true">已审核</el-radio-button> <el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button> <el-radio-button label="false">未审核</el-radio-button>
</el-radio-group> </el-radio-group>
@@ -899,7 +901,7 @@ layout("/layouts/platform.html"){
<el-dialog <el-dialog
:visible.sync="dialogLeaderCoach" :visible.sync="dialogLeaderCoach"
title="添加领队/教练/工作人员" title="添加领队/教练"
width="60%" width="60%"
> >
<el-form :model="headData" :rules="formRules" label-width="100px" ref="form"> <el-form :model="headData" :rules="formRules" label-width="100px" ref="form">
@@ -1021,7 +1023,7 @@ layout("/layouts/platform.html"){
v-model="CoachData.mobile"></el-input> v-model="CoachData.mobile"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<vi-title title="填写工作人员信息"></vi-title> <vi-title title="填写工作人员信息"></vi-title>
<el-form-item label="姓&emsp;&emsp;名" prop="userId"> <el-form-item label="姓&emsp;&emsp;名" prop="userId">
<el-select <el-select
@@ -1059,14 +1061,14 @@ layout("/layouts/platform.html"){
<el-input maxlength="50" placeholder="请填写电话" type="text" <el-input maxlength="50" placeholder="请填写电话" type="text"
v-model="staffData.mobile"></el-input> v-model="staffData.mobile"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>-->
</el-row> </el-row>
</el-form> </el-form>
<span class="dialog-footer" slot="footer"> <span class="dialog-footer" slot="footer">
<el-button @click="dialogLeaderCoach = false">取 消</el-button> <el-button @click="dialogLeaderCoach = false">取 消</el-button>
<el-button @click="doLeaderCoach" plain type="primary">确 认</el-button> <el-button @click="doLeaderCoach" type="primary">确 认</el-button>
</span> </span>
</el-dialog> </el-dialog>
@@ -1197,20 +1199,20 @@ layout("/layouts/platform.html"){
//分组 //分组
const groupBy = (list, fn) => { const groupBy = (list, fn) => {
const groups = {} const groups = {}
list.forEach(function(o) { list.forEach(function (o) {
const group = JSON.stringify(fn(o)) const group = JSON.stringify(fn(o))
groups[group] = groups[group] || [] groups[group] = groups[group] || []
groups[group].push(o) groups[group].push(o)
}) })
return Object.keys(groups).map(function(group) { return Object.keys(groups).map(function (group) {
return groups[group] return groups[group]
}) })
} }
const groupBy2 = (list, fn) => { const groupBy2 = (list, fn) => {
const groups = {} const groups = {}
list.forEach(function(o) { list.forEach(function (o) {
const group = JSON.stringify(fn(o)) const group = JSON.stringify(fn(o))
groups[group] = groups[group] || [] groups[group] = groups[group] || []
groups[group].push(o) groups[group].push(o)
@@ -1292,24 +1294,24 @@ layout("/layouts/platform.html"){
restrictGirlNum: 0, restrictGirlNum: 0,
tableColumns: [ tableColumns: [
/* {prop: 'name', label: '活动名称'},*/ /* {prop: 'name', label: '活动名称'},*/
{ prop: "allName", label: "项目名称" }, {prop: "allName", label: "项目名称"},
{ prop: "projectType", label: "项目类型" }, {prop: "projectType", label: "项目类型"},
{ prop: "applyNum", label: "已报名人数" }, {prop: "applyNum", label: "已报名人数"},
{ prop: "apply_num_bc", label: "暂保存人数" }, {prop: "apply_num_bc", label: "暂保存人数"},
{ prop: "apply_num_dsh", label: "待审核人数" } {prop: "apply_num_dsh", label: "待审核人数"}
], ],
formRules: { formRules: {
name: [{ required: true, message: "必填", trigger: ["blur", "change"] }], name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
teamId: [{ required: true, message: "必填", trigger: ["blur", "change"] }] teamId: [{required: true, message: "必填", trigger: ["blur", "change"]}]
// userId: [{required: true, message: '必填', trigger: ['blur', 'change']}], // userId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
}, },
submitLoading: false, submitLoading: false,
groupList: [ groupList: [
{ value: 1, name: "甲组" }, {value: 1, name: "甲组"},
{ value: 2, name: "乙组" }, {value: 2, name: "乙组"},
{ value: 3, name: "丙组" }, {value: 3, name: "丙组"},
{ value: 4, name: "丁组" } {value: 4, name: "丁组"}
], ],
activityNoticeDialog: false, activityNoticeDialog: false,
dshApplyUserList: [], dshApplyUserList: [],
@@ -1336,11 +1338,11 @@ layout("/layouts/platform.html"){
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue") "delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
}, },
methods: { methods: {
tableRowClassName({ row }) { tableRowClassName({row}) {
debugger debugger
return row.color; return row.color;
}, },
doExport(){ doExport() {
window.open("/platform/activity/apply/doExport?activityId=" + this.activityData2.id) window.open("/platform/activity/apply/doExport?activityId=" + this.activityData2.id)
}, },
async doPromiseBook() { async doPromiseBook() {
@@ -1523,7 +1525,7 @@ layout("/layouts/platform.html"){
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
}, },
changeTeam(command) { changeTeam(command) {
const { item } = command const {item} = command
if (!this.selection.length) { if (!this.selection.length) {
this.$notify({ this.$notify({
title: "警告", title: "警告",
@@ -1668,7 +1670,8 @@ layout("/layouts/platform.html"){
LeaderData: JSON.stringify(this.LeaderData), LeaderData: JSON.stringify(this.LeaderData),
CoachData: JSON.stringify(this.CoachData), CoachData: JSON.stringify(this.CoachData),
headData: JSON.stringify(this.headData), headData: JSON.stringify(this.headData),
staffData: JSON.stringify(this.staffData) staffData: JSON.stringify(this.staffData),
activityId: this.activityData2.id
} }
) )
loading.close() loading.close()
@@ -1689,8 +1692,8 @@ layout("/layouts/platform.html"){
this.CoachData = {} this.CoachData = {}
this.headData = {} this.headData = {}
this.staffData = {} this.staffData = {}
const resp = await $.get(loc() + "/getUnionCoachLeaderHead", { activityId: this.activityData2.id }) const resp = await $.get(loc() + "/getUnionCoachLeaderHead", {activityId: this.activityData2.id})
const { unionCoach, unionLeader, unionHead, unionStaff, userOptions } = resp.data const {unionCoach, unionLeader, unionHead, unionStaff, userOptions} = resp.data
if (unionCoach) { if (unionCoach) {
this.CoachData = unionCoach this.CoachData = unionCoach
} }
@@ -1722,7 +1725,7 @@ layout("/layouts/platform.html"){
async userLeaderCoach(query) { async userLeaderCoach(query) {
if (query) { if (query) {
this.userLoading = true this.userLoading = true
const resp = await $.get(loc() + "/getUserUnion", { query }) const resp = await $.get(loc() + "/getUserUnion", {query})
this.userOptions = resp this.userOptions = resp
this.userLoading = false this.userLoading = false
} }
@@ -1742,7 +1745,7 @@ layout("/layouts/platform.html"){
type: "warning" type: "warning"
}).then(async () => { }).then(async () => {
this.submitLoading = true this.submitLoading = true
const resp = await $.post(loc() + "/joinMemberFamily", { applysId: JSON.stringify(this.selection.map(v => v.id)) }) const resp = await $.post(loc() + "/joinMemberFamily", {applysId: JSON.stringify(this.selection.map(v => v.id))})
this.submitLoading = false this.submitLoading = false
if (resp.code === 0) { if (resp.code === 0) {
this.$refs.delete_info.applyPageData() this.$refs.delete_info.applyPageData()
@@ -1757,7 +1760,7 @@ layout("/layouts/platform.html"){
await this.pageData() await this.pageData()
}, },
dropdownCommand(command) { dropdownCommand(command) {
const { type, row } = command const {type, row} = command
if (type === "openUniteApply") { if (type === "openUniteApply") {
this.openUniteApply(row) this.openUniteApply(row)
} else if (type === "delete") { } else if (type === "delete") {
@@ -1783,11 +1786,11 @@ layout("/layouts/platform.html"){
async changeYear() { async changeYear() {
const resp = await $.post(loc() + "/getActivits", { year: this.pageForm.year }) const resp = await $.post(loc() + "/getActivits", {year: this.pageForm.year})
this.activitys = resp this.activitys = resp
}, },
async changeActivit() { async changeActivit() {
const resp = await $.post("/platform/activity/apply/getEvents", { activityId: this.pageForm.activityId }) const resp = await $.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
this.events = resp this.events = resp
}, },
@@ -1887,7 +1890,7 @@ layout("/layouts/platform.html"){
}) })
this.$set(data, "loading", false) this.$set(data, "loading", false)
if (resp.code === 0) { if (resp.code === 0) {
const { users, awardsModeT, awardsModeG, team, activity, getEvent } = resp.data const {users, awardsModeT, awardsModeG, team, activity, getEvent} = resp.data
this.activityData = activity this.activityData = activity
this.eventData = getEvent this.eventData = getEvent
this.teams = team this.teams = team
@@ -1923,7 +1926,7 @@ layout("/layouts/platform.html"){
}, },
async getUserData(userId) { async getUserData(userId) {
const { data } = await $.get(loc() + "/getUserData", { userId }) const {data} = await $.get(loc() + "/getUserData", {userId})
return data return data
}, },
@@ -1944,13 +1947,13 @@ layout("/layouts/platform.html"){
async userRemoteMethod(query) { async userRemoteMethod(query) {
if (query) { if (query) {
this.userLoading = true this.userLoading = true
const resp = await $.get(loc() + "/getUserUnion", { query }) const resp = await $.get(loc() + "/getUserUnion", {query})
this.userOptions = resp this.userOptions = resp
this.userLoading = false this.userLoading = false
} }
}, },
async getActivityCount(teamId) { async getActivityCount(teamId) {
const resp = await $.post(loc() + "/getActivityCount", { teamId }) const resp = await $.post(loc() + "/getActivityCount", {teamId})
return resp return resp
}, },
@@ -1986,10 +1989,10 @@ layout("/layouts/platform.html"){
this.appliedData.push(data) this.appliedData.push(data)
this.sortApplyed() this.sortApplyed()
this.flushApplyed(this.appliedData) this.flushApplyed(this.appliedData)
this.$notify.success({ title: "成功", message: "已添加" }) this.$notify.success({title: "成功", message: "已添加"})
this.dialogVisible = false this.dialogVisible = false
} else { } else {
this.$notify.error({ title: "错误", message: "存在未填写的的必填项" }) this.$notify.error({title: "错误", message: "存在未填写的的必填项"})
} }
}) })
}, },
@@ -2005,22 +2008,22 @@ layout("/layouts/platform.html"){
this.appliedData3.push(data) this.appliedData3.push(data)
this.sortApplyed() this.sortApplyed()
this.flushApplyed(this.appliedData) this.flushApplyed(this.appliedData)
this.$notify.success({ title: "成功", message: "已添加" }) this.$notify.success({title: "成功", message: "已添加"})
this.dialogVisible2 = false this.dialogVisible2 = false
} else { } else {
this.$notify.error({ title: "错误", message: "存在未填写的的必填项" }) this.$notify.error({title: "错误", message: "存在未填写的的必填项"})
} }
}) })
}, },
openAddUser() { openAddUser() {
this.formData = { teamId: this.team, identity: ["1"] } this.formData = {teamId: this.team, identity: ["1"]}
this.dialogVisible = true this.dialogVisible = true
if (this.$refs["form"]) { if (this.$refs["form"]) {
this.$refs["form"].resetFields() this.$refs["form"].resetFields()
} }
}, },
openAddUserD() { openAddUserD() {
this.formData = { identity: ["1"] } this.formData = {identity: ["1"]}
this.dialogVisible2 = true this.dialogVisible2 = true
if (this.$refs["form"]) { if (this.$refs["form"]) {
@@ -2103,12 +2106,12 @@ layout("/layouts/platform.html"){
} }
} }
if (!flag && this.isLeader == false) { if (!flag && this.isLeader == false) {
this.$notify.warning({ title: "警告", message: msg }) this.$notify.warning({title: "警告", message: msg})
return return
} }
} }
if (!flag1) { if (!flag1) {
const confirm = await this.$confirm("如果选择保存,报名人员会发生调整,需重新提交! 是否保存?", "提示", { type: "warning" }) const confirm = await this.$confirm("如果选择保存,报名人员会发生调整,需重新提交! 是否保存?", "提示", {type: "warning"})
if (confirm === "confirm") { if (confirm === "confirm") {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
@@ -2193,7 +2196,7 @@ layout("/layouts/platform.html"){
}, },
async findUserOne(id) { async findUserOne(id) {
const { data } = await $.get(loc() + "/findUserOne", { id }) const {data} = await $.get(loc() + "/findUserOne", {id})
return data return data
}, },
getTransProp(user) { getTransProp(user) {
@@ -2225,12 +2228,12 @@ layout("/layouts/platform.html"){
} }
if (!this.rightChecked.length) { if (!this.rightChecked.length) {
this.$notify.warning({ title: "警告", message: "请在右侧列表中选择人员" }) this.$notify.warning({title: "警告", message: "请在右侧列表中选择人员"})
return return
} }
const activityId = this.pageForm.activityId const activityId = this.pageForm.activityId
const resp = await $.post(loc() + "/getActivityData", { activityId }) const resp = await $.post(loc() + "/getActivityData", {activityId})
const aa = resp.data.filter(v => { const aa = resp.data.filter(v => {
return this.rightChecked.includes(v.userId) return this.rightChecked.includes(v.userId)
}) })
@@ -2403,9 +2406,19 @@ layout("/layouts/platform.html"){
this.rightChecked = v this.rightChecked = v
}, },
flushApplyed(applyed) { flushApplyed(applyed) {
if (this.activityData2.id==="6a2546b6df41457b871d590c0290eb07"){
if (this.team==="00dfa3b4f2ad4d238277b1345e6437f3"&&"${@shiro.getPrincipalProperty('unit').getUnionid()}"!=="6234c0450ef0414f87a38794faac6c3d"){
this.$notify({
title: "警告",
message: "您只能报一队暂时不能报两队!",
type: "warning"
})
this.team="ad85ba7540494c0d849936555287fa78"
return
}
}
this.applyedTabLoading = true this.applyedTabLoading = true
//如果项目等于单项 //如果项目等于单项
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
@@ -2442,7 +2455,7 @@ layout("/layouts/platform.html"){
}, },
openView(row) { openView(row) {
const { id } = row const {id} = row
this.$refs.info.getInfo(id) this.$refs.info.getInfo(id)
this.$refs.guava.add() this.$refs.guava.add()
}, },
@@ -2481,7 +2494,7 @@ layout("/layouts/platform.html"){
this.notifyWarning(resp.msg) this.notifyWarning(resp.msg)
} }
} else { } else {
this.$notify.error({ title: "错误", message: "存在未填写的的必填项" }) this.$notify.error({title: "错误", message: "存在未填写的的必填项"})
} }
}) })
}, },
@@ -2527,13 +2540,13 @@ layout("/layouts/platform.html"){
} }
}, },
async created() { async created() {
this.unitOptions = await getUnits(null)
await this.activityInfoData() await this.activityInfoData()
/*this.pageData()*/ /*this.pageData()*/
await this.changeYear() await this.changeYear()
await this.userLeaderCoach() await this.userLeaderCoach()
await this.changeActivit() await this.changeActivit()
this.planList = await activity.getSchoolActivityPlan() this.planList = await activity.getSchoolActivityPlan()
this.unitOptions = await getUnits(null)
} }
@@ -215,6 +215,7 @@ layout("/layouts/platform.html"){
</guava> </guava>
</div> </div>
<script src="/assets/platform/module/activity/activity.js?v=1.0.0"></script>
<script> <script>
let E = window.wangEditor let E = window.wangEditor
const editors = {} const editors = {}
@@ -328,8 +329,8 @@ layout("/layouts/platform.html"){
} else if (type === 'export') { } else if (type === 'export') {
window.open("/platform/activity/common/export?id=" + row.id) window.open("/platform/activity/common/export?id=" + row.id)
} else if (type === 'exportXlsx') { } else if (type === 'exportXlsx') {
location.href = "/platform/activity/common/exportXlsx?id=" + row.id window.open("/platform/activity/common/exportXlsx?id=" + row.id)
} else if (type == 'sendMsg') { }else if (type == 'sendMsg') {
this.sendMsg(row) this.sendMsg(row)
} else if (type === 'openCode') { } else if (type === 'openCode') {
this.openCode(row) this.openCode(row)