This commit is contained in:
2025-09-05 14:51:26 +08:00
parent 1c19e6fa05
commit 609a959e58
4 changed files with 78 additions and 61 deletions
@@ -302,7 +302,18 @@ public class ActivityApplyController {
result.put("awardsModeT", awardsModeT); result.put("awardsModeT", awardsModeT);
result.put("awardsModeG", awardsModeG); result.put("awardsModeG", awardsModeG);
result.put("team", activitySchoolTeamService.query(Cnd.where("eventId", "=", eventId).and("activityId", "=", activityId).asc("location"))); Cnd cndTeam = Cnd.NEW();
cndTeam.and("eventId", "=", eventId);
cndTeam.and("activityId", "=", activityId);
cnd.asc("location");
List<ActivitySchoolTeam> teamList = activitySchoolTeamService.query(cndTeam);
if (activity.getApplyMultipleTeamsUnionIds().contains(Vi.getUnionId())) {
result.put("team", teamList);
} else {
result.put("team", Lang.isNotEmpty(teamList) ? List.of(teamList.get(0)) : teamList);
}
result.put("activity", activity); result.put("activity", activity);
List<NutMap> events = (List<NutMap>) getEvents(activityId); List<NutMap> events = (List<NutMap>) getEvents(activityId);
@@ -206,4 +206,9 @@ public class ActivitySchool extends BaseModel implements Serializable {
@Default("0") @Default("0")
@ColDefine(type = ColType.BOOLEAN) @ColDefine(type = ColType.BOOLEAN)
private Boolean isSign; private Boolean isSign;
@Column
@Comment("可报多队的工会id")
@ColDefine(type = ColType.MYSQL_JSON)
private List<String> applyMultipleTeamsUnionIds;
} }
@@ -157,6 +157,15 @@
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item prop="funding" label="哪个工会可以报多队(只有选中的工会能全部报,否则只能报一队)">
<el-select v-model="form.applyMultipleTeamsUnionIds" clearable filterable multiple collapse-tags
placeholder="请选择可报多队的工会" style="width: 100%">
<el-option v-for="item in unionOptions" :key="item.id"
:label="item.unionname" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="8"> <!-- <el-col :span="8">
<el-form-item prop="xlFlag" label="活动提醒"> <el-form-item prop="xlFlag" label="活动提醒">
<el-switch <el-switch
@@ -736,6 +745,7 @@ module.exports = {
checkedEventInfo2: [], checkedEventInfo2: [],
checkedEvents: [], checkedEvents: [],
unitOptions: [], unitOptions: [],
unionOptions: [],
clubOptions: [], clubOptions: [],
planList: [], planList: [],
events: [], events: [],
@@ -1134,6 +1144,7 @@ module.exports = {
v.eventsIds = JSON.parse(v.eventsIds) v.eventsIds = JSON.parse(v.eventsIds)
v.applyWay = JSON.parse(v.applyWay) v.applyWay = JSON.parse(v.applyWay)
v.unitSponsor = JSON.parse(v.unitSponsor) v.unitSponsor = JSON.parse(v.unitSponsor)
v.applyMultipleTeamsUnionIds = JSON.parse(v.applyMultipleTeamsUnionIds)
v.undertakeUnit = JSON.parse(v.undertakeUnit) v.undertakeUnit = JSON.parse(v.undertakeUnit)
v.unitJointly = JSON.parse(v.unitJointly) v.unitJointly = JSON.parse(v.unitJointly)
v.activityGroupId = parseInt(v.activityGroupId) v.activityGroupId = parseInt(v.activityGroupId)
@@ -1376,6 +1387,7 @@ module.exports = {
}, },
async created() { async created() {
await this.initCnd() await this.initCnd()
this.unionOptions = await getUnions(null)
const clubs = await getClubs() const clubs = await getClubs()
const units = await getUnits(null) const units = await getUnits(null)
this.unitOptions = clubs.concat(units) this.unitOptions = clubs.concat(units)
@@ -330,21 +330,21 @@ layout("/layouts/platform.html"){
</template> </template>
<!--<template #func> <template #func>
<div class="mr10" v-if="unionLeaderCoach"> <div class="mr10" v-if="unionLeaderCoach">
&lt;!&ndash;团长:<span style="color: #419BF8">{{headData.username | str}}</span>&emsp13;&ndash;&gt;&ndash;&gt; <!--团长:<span style="color: #419BF8">{{headData.username | str}}</span>&emsp13;&ndash;&gt;-->
领队:<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>
&lt;!&ndash; 工作人员:<span <!-- 工作人员:<span
style="color: #419BF8">{{staffData.username | str}}</span>&ndash;&gt; style="color: #419BF8">{{staffData.username | str}}</span>-->
</div> </div>
<div> <div>
<el-button @click="openLeaderCoach" plain type="primary" <el-button @click="openLeaderCoach" type="primary"
v-if="unionLeaderCoach">设置领队/教练 v-if="unionLeaderCoach">设置领队/教练
</el-button> </el-button>
</div> </div>
</template>--> </template>
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" <el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
@@ -625,7 +625,7 @@ layout("/layouts/platform.html"){
v-if="substituteNum>0"> v-if="substituteNum>0">
设置替补 设置替补
</el-button> </el-button>
<!-- <el-button icon="el-icon-check" size="small" <el-button icon="el-icon-check" size="small"
plain type="primary" plain type="primary"
@click="changeTeam" v-if="projectType==2&&teams.length>1"> @click="changeTeam" v-if="projectType==2&&teams.length>1">
修改小队 修改小队
@@ -638,20 +638,20 @@ layout("/layouts/platform.html"){
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select>--> </el-select>
<!--<el-dropdown @command="changeTeam" <el-dropdown @command="changeTeam"
v-if="projectType==2&&teams.length>1"> v-if="projectType==2&&teams.length>1">
<el-button size="small" type="primary"> <el-button size="small" type="primary">
修改小队<i 修改小队<i
class="el-icon-arrow-down el-icon&#45;&#45;right"></i> class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{item}" <el-dropdown-item :command="{item}"
v-for="item in teams">{{item.name}} v-for="item in teams">{{item.name}}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown>--> </el-dropdown>
</div> </div>
<el-table :data="appliedData2" :key="tabkey" <el-table :data="appliedData2" :key="tabkey"
@@ -711,7 +711,8 @@ layout("/layouts/platform.html"){
align="center" header-align="center" label="职务" align="center" header-align="center" label="职务"
prop="position"> prop="position">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.position" placeholder="请填写填写职称职务"></el-input> <el-input v-model="row.position"
placeholder="请填写填写职称职务"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@@ -2481,18 +2482,6 @@ layout("/layouts/platform.html"){
this.rightChecked = v this.rightChecked = v
}, },
flushApplyed(applyed) { flushApplyed(applyed) {
if (this.activityData2.id === "6a2546b6df41457b871d590c0290eb07") {
if (["00dfa3b4f2ad4d238277b1345e6437f3", "6748ad4bd12c4af5b32c3ceace7fc694"].includes(this.team)
&& "${@shiro.getPrincipalProperty('unit').getUnionid()}" !== "6234c0450ef0414f87a38794faac6c3d") {
this.$notify({
title: "警告",
message: "您只能报一队暂时不能报两队!",
type: "warning"
})
this.team = this.teams[0].id
return
}
}
this.applyedTabLoading = true this.applyedTabLoading = true
//如果项目等于单项 //如果项目等于单项
if (this.eventData.projectType === "1") { if (this.eventData.projectType === "1") {