移植体育活动组队报名

This commit is contained in:
2024-10-30 17:23:05 +08:00
parent b0911d9522
commit 9fce5ac212
2 changed files with 42 additions and 2 deletions
@@ -870,5 +870,14 @@ public class ActivityApplyController {
return list;
}
@At
@ViReturn
@RequiresPermissions("activity.apply")
@Ok("json:{ignoreNull:true}")
public Object getUnits() {
List<Sys_unit> sysUnits = simpleService.dao().query(Sys_unit.class, Cnd.where("unitlevel", "=", 2).asc("unitcode"));
return sysUnits;
}
}
@@ -599,6 +599,11 @@ layout("/layouts/platform.html"){
v-if="substituteNum>0">
设置替补
</el-button>
<el-button @click="setAthletes" icon="el-icon-check"
plain
size="small" type="primary">
设置运动员
</el-button>
<!-- <el-button icon="el-icon-check" size="small"
plain type="primary"
@click="changeTeam" v-if="projectType==2&&teams.length>1">
@@ -1180,7 +1185,6 @@ layout("/layouts/platform.html"){
this.selection.forEach(v => {
v.identity.unshift('3')
})
this.$refs.multipleTable.clearSelection();
this.leader = 3
},
@@ -1228,6 +1232,25 @@ layout("/layouts/platform.html"){
this.$refs.multipleTable.clearSelection();
},
setAthletes() {
if (!this.selection.length) {
this.$notify({
title: '警告',
message: '请先勾选需要设置的用户!',
type: 'warning'
})
return
}
this.selection.forEach(v => {
if (!v.identity.includes('1')) {
v.identity = []
v.identity.push('1')
}
})
this.$refs.multipleTable.clearSelection()
},
setSubstitute() {
if (!this.selection.length) {
this.$notify({
@@ -2312,6 +2335,14 @@ layout("/layouts/platform.html"){
}
}, "json");
},
async getUnits() {
const resp = await $.post(loc() + "/getUnits")
if (resp.code === 0) {
this.unitOptions = resp.data
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
await this.activityInfoData()
@@ -2320,7 +2351,7 @@ layout("/layouts/platform.html"){
await this.userLeaderCoach()
await this.changeActivit()
this.planList = await activity.getSchoolActivityPlan()
this.unitOptions = await getUnits(null)
this.getUnits()
}