This commit is contained in:
2025-07-02 20:30:46 +08:00
parent 8dc7a62efe
commit ab4c69c34a
13 changed files with 572 additions and 430 deletions
@@ -134,6 +134,7 @@ public class ActivityCultureUserStatisticsController {
public Result getActivityByYearOrType(Integer year, public Result getActivityByYearOrType(Integer year,
@Valid Integer activity_type) { @Valid Integer activity_type) {
Cnd cnd = Cnd.where("activity_type", "=", activity_type); Cnd cnd = Cnd.where("activity_type", "=", activity_type);
cnd.and("projectTypeCode", "!=", 50004);
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("signUpMethod", "in", List.of(1, 2, 3)); cnd.and("signUpMethod", "in", List.of(1, 2, 3));
if (activity_type == 40002) { if (activity_type == 40002) {
@@ -83,7 +83,7 @@ public class ActivitySportsInfoManageController {
school.activityCode, school.activityCode,
school.foundDate, school.foundDate,
school.applyType, school.applyType,
(SELECT COUNT(1) FROM activity_school_apply asa WHERE asa.activityId = school.id) applyNum (SELECT COUNT(1) FROM activity_school_apply asa WHERE asa.activityId = school.id and status=2) applyNum
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
@@ -17,6 +17,7 @@ import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolTeam;
import com.budwk.app.zhgh.activity.sports.param.ActivitySportsApplyUserPageParam; import com.budwk.app.zhgh.activity.sports.param.ActivitySportsApplyUserPageParam;
import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService; import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService;
import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
import org.nutz.dao.Dao; import org.nutz.dao.Dao;
import org.nutz.dao.Sqls; import org.nutz.dao.Sqls;
@@ -384,6 +385,13 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
.and("activityUnionId", "=", basicUnion.getId()) .and("activityUnionId", "=", basicUnion.getId())
.and("eventId", "=", eventId)); .and("eventId", "=", eventId));
} }
if (pass) {
dao().update(ActivitySchoolApply.class,
Chain.make("status", 2),
Cnd.where("activityId", "=", activityId)
.and("activityUnionId", "=", basicUnion.getId()));
}
} }
@Override @Override
@@ -211,7 +211,8 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl<ActivitySchool> i
LEFT JOIN activity_event ev ON ev.id = app.eventId LEFT JOIN activity_event ev ON ev.id = app.eventId
LEFT JOIN activity_school sc ON sc.id=app.activityId LEFT JOIN activity_school sc ON sc.id=app.activityId
WHERE WHERE
activityId = @id app.activityId = @id
and app.status = 2
$cnd $cnd
ORDER BY ORDER BY
ev.allName DESC, ev.allName DESC,
@@ -1,115 +1,121 @@
<template> <template>
<el-select v-model="selectValue" filterable remote :remote-method="selectUser" @change="onChange" v-bind="$attrs"> <el-select v-model="selectValue" :clearable="clearable" filterable remote :remote-method="selectUser"
<el-option @change="onChange" v-bind="$attrs">
v-for="item in options" <el-option
v-if="!item.disabled" v-for="item in options"
:key="item[option_value]" v-if="!item.disabled"
:label="option_label_func ? option_label_func(item) : item[option_label]" :key="item[option_value]"
:value="item[option_value]" :label="option_label_func ? option_label_func(item) : item[option_label]"
></el-option> :value="item[option_value]"
</el-select> ></el-option>
</el-select>
</template> </template>
<script> <script>
module.exports = { module.exports = {
model: { model: {
prop: "value", prop: "value",
event: "change" event: "change"
}, },
props: { props: {
value: { type: [String, Array] }, value: {type: [String, Array]},
api: { api: {
type: String, type: String,
required: false, required: false,
default: "/open/common/userOptions" default: "/open/common/userOptions"
},
api_params: {
type: Object,
required: false,
default: () => {
return {}
}
},
api_input_key_name: {
type: String,
required: false,
default: "keyWord"
},
option_list: {
type: Array,
default: () => {
return []
}
},
option_value: {
type: String,
default: "id"
},
option_label: {
type: String,
default: "username"
},
option_label_func: {
type: Function,
required: false
}
}, },
data() { api_params: {
return { type: Object,
options: [], required: false,
selectValue: null default: () => {
} return {}
}
}, },
watch: { clearable: {
value: { type: Boolean,
handler: function (val) { default: true
if (this.$attrs.multiple) {
this.selectValue = [...val]
} else {
this.selectValue = val ? val.toString() : ""
}
},
immediate: true,
deep: true
},
option_list: {
handler: function (val) {
if (val) {
this.options = val
}
},
immediate: true
}
}, },
methods: { api_input_key_name: {
selectUser(query) { type: String,
if (query !== "") { required: false,
$.get(this.api, { [this.api_input_key_name]: query, ...this.api_params }).then((res) => { default: "keyWord"
this.options = res.data
})
}
},
onChange(val) {
this.$emit("change", val)
},
clearOptions() {
this.options = []
}
}, },
created() {
this.clearOptions() option_list: {
type: Array,
default: () => {
return []
}
},
option_value: {
type: String,
default: "id"
},
option_label: {
type: String,
default: "username"
},
option_label_func: {
type: Function,
required: false
} }
},
data() {
return {
options: [],
selectValue: null
}
},
watch: {
value: {
handler: function (val) {
if (this.$attrs.multiple) {
this.selectValue = [...val]
} else {
this.selectValue = val ? val.toString() : ""
}
},
immediate: true,
deep: true
},
option_list: {
handler: function (val) {
if (val) {
this.options = val
}
},
immediate: true
}
},
methods: {
selectUser(query) {
if (query !== "") {
$.get(this.api, {[this.api_input_key_name]: query, ...this.api_params}).then((res) => {
this.options = res.data
})
}
},
onChange(val) {
this.$emit("change", val)
},
clearOptions() {
this.options = []
}
},
created() {
this.clearOptions()
}
} }
</script> </script>
@@ -4,7 +4,7 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<guava ref="guava"> <guava ref="guava">
<activity-culture-apply-activity :activity_type="activityType"></activity-culture-apply-activity> <activity-culture-apply-activity :activity_type="activityType" ref="activityApply"></activity-culture-apply-activity>
</guava> </guava>
</div> </div>
<script> <script>
@@ -22,7 +22,9 @@ layout("/layouts/platform.html"){
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY "activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY
}, },
methods: {}, methods: {},
async created() {} async created() {
setTimeout(()=>{this.$refs.activityApply.init()},500)
}
}) })
</script> </script>
@@ -31,10 +31,10 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
style="width: 100%;" style="width: 100%;"
v-model="formData.projectTypeCode"> v-model="formData.projectTypeCode">
<el-option <el-option
:key="item.id" :key="item.id"
:label="item.name+' ('+item.code+')'" :label="item.name+' ('+item.code+')'"
:value="item.code" :value="item.code"
v-for="item in projectTypeList"> v-for="item in projectTypeList">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -68,10 +68,10 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
reserve-keyword reserve-keyword
style="width: 100%" v-model="formData.userId"> style="width: 100%" v-model="formData.userId">
<el-option <el-option
:key="item.userId" :key="item.userId"
:label="item.userName+'-'+item.loginName+'-'+item.unitName" :label="item.userName+'-'+item.loginName+'-'+item.unitName"
:value="item.userId" :value="item.userId"
v-for="item in userList"> v-for="item in userList">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -84,48 +84,48 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12"--> <!-- <el-col :span="12"-->
<!-- v-if="formData.isEnrollSystem === true">--> <!-- v-if="formData.isEnrollSystem === true">-->
<!-- <el-form-item label="活动计划时间" prop="plannedDate">--> <!-- <el-form-item label="活动计划时间" prop="plannedDate">-->
<!-- <el-date-picker--> <!-- <el-date-picker-->
<!-- @change="plannedDateChange"--> <!-- @change="plannedDateChange"-->
<!-- end-placeholder="结束日期"--> <!-- end-placeholder="结束日期"-->
<!-- range-separator="-"--> <!-- range-separator="-"-->
<!-- start-placeholder="开始日期"--> <!-- start-placeholder="开始日期"-->
<!-- style="width: 100%"--> <!-- style="width: 100%"-->
<!-- type="daterange"--> <!-- type="daterange"-->
<!-- v-model="formData.plannedDate" value-format="yyyy-MM-dd">--> <!-- v-model="formData.plannedDate" value-format="yyyy-MM-dd">-->
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实际活动时间" prop="time"> <el-form-item label="实际活动时间" prop="time">
<el-date-picker <el-date-picker
end-placeholder="结束日期" end-placeholder="结束日期"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
style="width: 100%" style="width: 100%"
type="daterange" type="daterange"
v-model="formData.time" v-model="formData.time"
value-format="yyyy-MM-dd"> value-format="yyyy-MM-dd">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
:rules="[{required:[1,2].includes(formData.signUpMethod),message:'请选择报名日期',trigger:['change','blur']}]" :rules="[{required:[1,2].includes(formData.signUpMethod),message:'请选择报名日期',trigger:['change','blur']}]"
label="报名日期" label="报名日期"
prop="applyTime2"> prop="applyTime2">
<el-date-picker <el-date-picker
end-placeholder="结束时间" end-placeholder="结束时间"
range-separator="-" range-separator="-"
start-placeholder="开始时间" start-placeholder="开始时间"
style="width: 100%" style="width: 100%"
type="datetimerange" type="datetimerange"
v-model="formData.applyTime2" v-model="formData.applyTime2"
value-format="yyyy-MM-dd HH:mm"> value-format="yyyy-MM-dd HH:mm">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -133,9 +133,9 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
<el-col :span="12" v-if="!formData.isEnrollSystem"> <el-col :span="12" v-if="!formData.isEnrollSystem">
<el-form-item label="活动人数" prop="peopleNum"> <el-form-item label="活动人数" prop="peopleNum">
<el-input <el-input
maxlength="10" maxlength="10"
placeholder="请填写活动人数" placeholder="请填写活动人数"
v-model="formData.peopleNum"></el-input> v-model="formData.peopleNum"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -156,8 +156,8 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
</div> </div>
<div> <div>
<el-button <el-button
@click="$refs.drawerUserScope.userScopeDialog = true" @click="$refs.drawerUserScope.userScopeDialog = true"
type="primary">设置 type="primary">设置
</el-button> </el-button>
</div> </div>
</div> </div>
@@ -181,15 +181,13 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
<el-form-item label="报名人数限制" prop="userNumberLimit"> <el-form-item label="报名人数限制" prop="userNumberLimit">
<el-radio-group v-model="formData.userNumberLimit" size="small"> <el-radio-group v-model="formData.userNumberLimit" size="small">
<el-radio border :label="1">总人数限制</el-radio> <el-radio border :label="1">总人数限制</el-radio>
<el-radio border :label="2" v-if="activity_type===40001"> <el-radio border :label="2" v-if="activity_type===40001">分工会人数限制</el-radio>
分工会人数限制
</el-radio>
<el-radio border :label="null">不限制</el-radio> <el-radio border :label="null">不限制</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :lg="12" :xl="12" :xs="12" <el-col :lg="12" :xl="12" :xs="12"
v-if="[3].includes(formData.signUpMethod)"> v-if="[2].includes(formData.signUpMethod)">
<el-form-item label="组队人数" prop="totalUserNumberLimit"> <el-form-item label="组队人数" prop="totalUserNumberLimit">
<el-input-number :max="2000" :min="1" <el-input-number :max="2000" :min="1"
:precision="0" :precision="0"
@@ -317,10 +315,10 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
<el-col :span="24" v-if="formData.isEnrollSystem === false"> <el-col :span="24" v-if="formData.isEnrollSystem === false">
<el-form-item label="活动考核内容" prop="activityExamineContent"> <el-form-item label="活动考核内容" prop="activityExamineContent">
<el-input <el-input
:rows="7" :rows="7"
placeholder="请输入活动考核内容" placeholder="请输入活动考核内容"
type="textarea" type="textarea"
v-model="formData.activityExamineContent"> v-model="formData.activityExamineContent">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -430,16 +428,16 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
<el-table :data="userData" border height="500" size="small" <el-table :data="userData" border height="500" size="small"
stripe v-loading="userTabLoading" row-key="userId"> stripe v-loading="userTabLoading" row-key="userId">
<el-table-column <el-table-column
label="序号" type="index" label="序号" type="index"
width="100"> width="100">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="column.label" :label="column.label"
:prop="column.prop" :prop="column.prop"
:key="column.prop" :key="column.prop"
:sortable="column.sortable" :sortable="column.sortable"
v-for="column in userColumns"> v-for="column in userColumns">
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
prop="userOnline" prop="userOnline"
@@ -457,25 +455,26 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
</table-tool> </table-tool>
<el-form-item label="" prop="activitySummary"> <el-form-item label="" prop="activitySummary">
<el-input <el-input
:disabled="!formData.time || Date.now() < Date.parse(formData.time[1])" :disabled="!formData.time || Date.now() < Date.parse(formData.time[1])"
:rows="5" :rows="5"
placeholder="请输入活动内容" placeholder="请输入活动内容"
type="textarea" type="textarea"
v-model="formData.activitySummary"> v-model="formData.activitySummary">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-alert <el-alert
class="mb20" class="mb20"
show-icon show-icon
style="margin-left: 130px" style="margin-left: 130px"
title="活动结束后可输入活动总结" title="活动结束后可输入活动总结"
type="info" type="info"
v-if="!formData.time || Date.now() < Date.parse(formData.time[1])"> v-if="!formData.time || Date.now() < Date.parse(formData.time[1])">
</el-alert> </el-alert>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div style="padding: 20px;text-align: center;"> <div style="padding: 20px;text-align: center;">
<el-button @click="operation" style="width: 300px" type="primary" :disabled="formLoading"> <el-button @click="operation" style="width: 300px" type="primary" :disabled="formLoading">
确 定 确 定
@@ -485,12 +484,12 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
</el-card> </el-card>
<drawer-user-scope <drawer-user-scope
@group_change="getActivityGroup" @group_change="getActivityGroup"
ref="drawerUserScope" ref="drawerUserScope"
:group_id.sync="formData.groupId" :group_id.sync="formData.groupId"
></drawer-user-scope> ></drawer-user-scope>
<el-dialog :close-on-click-modal="false" :visible.sync="userDialogVisible" append-to-body title="添加人员" width="40%"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="userDialogVisible" title="添加人员" width="40%">
<el-form :model="formData" label-width="100px"> <el-form :model="formData" label-width="100px">
<el-form-item label="参加人员" prop="userId"> <el-form-item label="参加人员" prop="userId">
@@ -502,11 +501,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
style="width: 100%" style="width: 100%"
v-model="formData.tissuePersonList"> v-model="formData.tissuePersonList">
<el-option <el-option
:disabled="userData.map(v=>v.userId).includes(item.userId)" :disabled="userData.map(v=>v.userId).includes(item.userId)"
:key="item.userId" :key="item.userId"
:label="item.userName+'-'+item.loginName+'-'+item.unitName" :label="item.userName+'-'+item.loginName+'-'+item.unitName"
:value="item.userId" :value="item.userId"
v-for="item in userList"> v-for="item in userList">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -733,29 +732,34 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
}) })
return data return data
}, },
init() { init(id) {
this.formData = { if (id){
time: [], this.activeName = "1"
applyTime2: [], this.findOne(id)
plannedDate: [], }else{
goods: [], this.formData = {
billFiles: [], time: [],
photoFiles: [], applyTime2: [],
otherFiles: [], plannedDate: [],
tissuePersonList: [], goods: [],
unionUserNumberLimit: [], billFiles: [],
signUpMethod: null, photoFiles: [],
rangerMeter: 100, otherFiles: [],
isEnrollSystem: true, tissuePersonList: [],
isPushHome: 0, unionUserNumberLimit: [],
isIntegral: false signUpMethod: null,
rangerMeter: 100,
isEnrollSystem: true,
isPushHome: 0,
isIntegral: false
}
this.generateActivityCode().then((data) => {
this.$set(this.formData, "activityCode", data)
})
this.getUnionData().then((data) => {
this.$set(this.formData, "unionUserNumberLimit", data)
})
} }
this.generateActivityCode().then((data) => {
this.$set(this.formData, "activityCode", data)
})
this.getUnionData().then((data) => {
this.$set(this.formData, "unionUserNumberLimit", data)
})
}, },
async queryUserByIds(ids) { async queryUserByIds(ids) {
const { data } = await this.$axios.post("/platform/activity/culture/applyActivity/queryUserByIds", { ids: JSON.stringify(ids) }) const { data } = await this.$axios.post("/platform/activity/culture/applyActivity/queryUserByIds", { ids: JSON.stringify(ids) })
@@ -787,7 +791,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
}, },
openEdit(id) { openEdit(id) {
this.activeName = "1" this.activeName = "1"
this.findOne(id) this.init(id)
} }
}, },
async created() { async created() {
@@ -799,6 +803,6 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
}) })
}) })
this.getActivityGroup() this.getActivityGroup()
this.init() // this.init()
} }
} }
@@ -25,9 +25,9 @@ const singleSignUp = {
: :
'协会/社团活动' }} '协会/社团活动' }}
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item label="活动计划时间">--> <!-- <el-descriptions-item label="活动计划时间">-->
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}--> <!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<el-descriptions-item label="活动时间"> <el-descriptions-item label="活动时间">
{{ viewData.startTime + ' - ' + viewData.endTime }} {{ viewData.startTime + ' - ' + viewData.endTime }}
</el-descriptions-item> </el-descriptions-item>
@@ -107,19 +107,19 @@ const singleSignUp = {
</div> </div>
<span v-if="!isApplyUser" class="text-primary">如需取消报名,请联系报名人。</span> <span v-if="!isApplyUser" class="text-primary">如需取消报名,请联系报名人。</span>
<el-select <el-select
v-if="isApplyUser && inApplyTime" v-if="isApplyUser && inApplyTime"
v-model="searchTeammateUserId" v-model="searchTeammateUserId"
filterable filterable
clearable clearable
remote remote
reserve-keyword reserve-keyword
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="queryTeammate"> :remote-method="queryTeammate">
<el-option <el-option
v-for="item in teammateOptions" v-for="item in teammateOptions"
:key="item.userId" :key="item.userId"
:label="item.userName + '(' + item.loginName + ')'" :label="item.userName + '(' + item.loginName + ')'"
:value="item.userId"> :value="item.userId">
</el-option> </el-option>
</el-select> </el-select>
<el-button v-if="isApplyUser && inApplyTime" class="ml5" type="primary" icon="el-icon-plus" <el-button v-if="isApplyUser && inApplyTime" class="ml5" type="primary" icon="el-icon-plus"
@@ -160,10 +160,10 @@ const singleSignUp = {
<template v-if="isCustomForm"> <template v-if="isCustomForm">
<div class="process-title">填写报名信息</div> <div class="process-title">填写报名信息</div>
<form-create <form-create
:value.sync="dynamicFormData" :value.sync="dynamicFormData"
v-model="fapi" v-model="fapi"
:rule="formCreateRule" :rule="formCreateRule"
:option="formCreateOption" :option="formCreateOption"
></form-create> ></form-create>
</template> </template>
@@ -233,7 +233,7 @@ const singleSignUp = {
//查询报名人员 //查询报名人员
listTeamUser() { listTeamUser() {
this.$axios.post("/platform/activity/culture/applyUser/listTeamUser", { activityId: this.id }).then((res) => { this.$axios.post("/platform/activity/culture/applyUser/listTeamUser", {activityId: this.id}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.isSignUp = res.data.length > 0 this.isSignUp = res.data.length > 0
this.teamUsers = res.data this.teamUsers = res.data
@@ -270,10 +270,6 @@ const singleSignUp = {
//提交报名 //提交报名
async onConfirm() { async onConfirm() {
console.log(this.fapi)
console.log(this.fapi.formData())
if (this.isCustomForm && this.fapi) { if (this.isCustomForm && this.fapi) {
let formValid = false let formValid = false
try { try {
@@ -411,7 +407,7 @@ const singleSignUp = {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$axios.post("/platform/activity/culture/applyUser/cancelSignUp", { activityId: this.id }).then((res) => { this.$axios.post("/platform/activity/culture/applyUser/cancelSignUp", {activityId: this.id}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.dialogVisible = false this.dialogVisible = false
this.$message.success(res.msg) this.$message.success(res.msg)
@@ -424,8 +420,9 @@ const singleSignUp = {
//查询队友信息 //查询队友信息
queryTeammate(val) { queryTeammate(val) {
if (val) { if (val) {
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", { keyword: val }).then((res) => { this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {keyword: val}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
res.data.map(v => v.applyUserId = this.$store.state.user.id)
this.teammateOptions = res.data this.teammateOptions = res.data
} }
}) })
@@ -457,7 +454,7 @@ const singleSignUp = {
//活动信息 //活动信息
activityInfo() { activityInfo() {
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", { id: this.id }).then((res) => { this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.viewData = res.data this.viewData = res.data
if (this.viewData.formConfig) { if (this.viewData.formConfig) {
@@ -4,7 +4,7 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<guava ref="guava"> <guava ref="guava">
<activity-culture-apply-activity :activity_type="activityType"></activity-culture-apply-activity> <activity-culture-apply-activity :activity_type="activityType" ref="activityApply"></activity-culture-apply-activity>
</guava> </guava>
</div> </div>
@@ -23,7 +23,9 @@ layout("/layouts/platform.html"){
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY "activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY
}, },
methods: {}, methods: {},
async created() {} async created() {
setTimeout(()=>{this.$refs.activityApply.init()},500)
}
}) })
</script> </script>
@@ -4,7 +4,7 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<guava ref="guava"> <guava ref="guava">
<activity-culture-apply-activity :activity_type="activityType"></activity-culture-apply-activity> <activity-culture-apply-activity :activity_type="activityType" ref="activityApply"></activity-culture-apply-activity>
</guava> </guava>
</div> </div>
<script> <script>
@@ -22,7 +22,9 @@ layout("/layouts/platform.html"){
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY "activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY
}, },
methods: {}, methods: {},
async created() {} async created() {
setTimeout(()=>{this.$refs.activityApply.init()},500)
}
}) })
</script> </script>
@@ -26,12 +26,12 @@ layout("/layouts/platform.html"){
<search @search="activityInfoData"> <search @search="activityInfoData">
<search-item label=""> <search-item label="">
<el-date-picker <el-date-picker
@change="activityInfoData" @change="activityInfoData"
placeholder="选择年" placeholder="选择年"
style="width: 100%" style="width: 100%"
type="year" type="year"
v-model="pageForm.year" v-model="pageForm.year"
value-format="yyyy" value-format="yyyy"
></el-date-picker> ></el-date-picker>
</search-item> </search-item>
@@ -45,12 +45,12 @@ layout("/layouts/platform.html"){
<search-item label="" <search-item label=""
v-if="$auth.hasRole('SYSADMIN')||$auth.hasRole('SCHOOL_UNION_ADMIN')"> v-if="$auth.hasRole('SYSADMIN')||$auth.hasRole('SCHOOL_UNION_ADMIN')">
<el-select <el-select
@change="doSearch" @change="doSearch"
clearable clearable
filterable filterable
placeholder="报名所属分工会" placeholder="报名所属分工会"
style="width: 100%" style="width: 100%"
v-model="pageForm.unionId" v-model="pageForm.unionId"
> >
<el-option :key="item.id" :label="item.name" :value="item.id" <el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in unionOptions"></el-option> v-for="item in unionOptions"></el-option>
@@ -67,8 +67,8 @@ layout("/layouts/platform.html"){
<el-col :key="item.id" :span="6" <el-col :key="item.id" :span="6"
v-for="item in activityList.slice((index-1)*4,index*4)"> v-for="item in activityList.slice((index-1)*4,index*4)">
<el-card <el-card
:class="'box-card '+(item.id===pageForm.activityId?'activeCard':'')" :class="'box-card '+(item.id===pageForm.activityId?'activeCard':'')"
style="border-radius: 10px"> style="border-radius: 10px">
<div @click="openApply(item)" class="clearfix" slot="header" <div @click="openApply(item)" class="clearfix" slot="header"
style="font-size: 16px; padding: 5px 0"> style="font-size: 16px; padding: 5px 0">
<el-tooltip :content="item.NAME" class="item" effect="dark" <el-tooltip :content="item.NAME" class="item" effect="dark"
@@ -87,27 +87,27 @@ layout("/layouts/platform.html"){
<span v-if="item.gameStyle===1">{{item.activityLevelName}}</span> <span v-if="item.gameStyle===1">{{item.activityLevelName}}</span>
<el-tag <el-tag
effect="dark" effect="dark"
style="border-radius: 50%; float: right" style="border-radius: 50%; float: right"
type="danger" type="danger"
v-if="$moment(item.applyEndTime).valueOf() <$moment().valueOf()" v-if="$moment(item.applyEndTime).valueOf() <$moment().valueOf()"
> >
报名结束 报名结束
</el-tag> </el-tag>
<el-tag <el-tag
effect="dark" effect="dark"
style="border-radius: 50%; float: right" style="border-radius: 50%; float: right"
type="success" type="success"
v-else-if="$moment().valueOf()>$moment(item.applyStartTime).valueOf() v-else-if="$moment().valueOf()>$moment(item.applyStartTime).valueOf()
&&$moment().valueOf()<$moment(item.applyEndTime).valueOf()" &&$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
> >
报名中 报名中
</el-tag> </el-tag>
<el-tag <el-tag
effect="dark" effect="dark"
style="border-radius: 50%; float: right" style="border-radius: 50%; float: right"
type="danger" type="danger"
v-else-if="$moment().valueOf()<$moment(item.applyEndTime).valueOf()" v-else-if="$moment().valueOf()<$moment(item.applyEndTime).valueOf()"
> >
报名未开始 报名未开始
</el-tag> </el-tag>
@@ -138,13 +138,13 @@ layout("/layouts/platform.html"){
<table-tool label="活动项目信息"> <table-tool label="活动项目信息">
<div class="search-item-option"> <div class="search-item-option">
<el-select <el-select
@change="doSearch" @change="doSearch"
clearable clearable
filterable filterable
placeholder="请选择组别" placeholder="请选择组别"
style="width: 100%; margin-bottom: 5px; margin-left: 10px" style="width: 100%; margin-bottom: 5px; margin-left: 10px"
v-if="unionLeaderCoach" v-if="unionLeaderCoach"
v-model="pageForm.groupName" v-model="pageForm.groupName"
> >
<el-option :key="item.id" :label="item.name" :value="item.name" <el-option :key="item.id" :label="item.name" :value="item.name"
v-for="item in groupList"></el-option> v-for="item in groupList"></el-option>
@@ -153,13 +153,13 @@ layout("/layouts/platform.html"){
<div class="search-item-option"> <div class="search-item-option">
<el-select <el-select
@change="doSearch" @change="doSearch"
clearable clearable
filterable filterable
placeholder="请选择活动项目" placeholder="请选择活动项目"
style="width: 100%; margin-bottom: 5px; margin-left: 10px" style="width: 100%; margin-bottom: 5px; margin-left: 10px"
v-if="unionLeaderCoach" v-if="unionLeaderCoach"
v-model="pageForm.eventId" v-model="pageForm.eventId"
> >
<el-option :key="item.eventId" :label="item.allName" <el-option :key="item.eventId" :label="item.allName"
:value="item.eventId" v-for="item in eventList"></el-option> :value="item.eventId" v-for="item in eventList"></el-option>
@@ -170,7 +170,7 @@ layout("/layouts/platform.html"){
<span style="color: #419bf8">{{leaderData.username?leaderData.username:'暂无'}}</span> <span style="color: #419bf8">{{leaderData.username?leaderData.username:'暂无'}}</span>
&emsp13; 教练: &emsp13; 教练:
<span <span
style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span> style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
</div> </div>
<div> <div>
<el-button @click="openLeaderCoach" size="medium" type="primary" <el-button @click="openLeaderCoach" size="medium" type="primary"
@@ -179,32 +179,32 @@ layout("/layouts/platform.html"){
</div> </div>
</table-tool> </table-tool>
<el-table <el-table
:data="tableData" :data="tableData"
:size="tableSize" :size="tableSize"
@sort-change="pageOrder" @sort-change="pageOrder"
class="vi-table" class="vi-table"
row-key="id" row-key="id"
style="width: 100%; margin-bottom: 20px" style="width: 100%; margin-bottom: 20px"
v-loading="tableLoading" v-loading="tableLoading"
> >
<el-table-column <el-table-column
:index="indexMethod" :index="indexMethod"
align="center" align="center"
header-align="center" header-align="center"
label="序号" label="序号"
type="index" type="index"
width="80px" width="80px"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
:key="column.prop" :key="column.prop"
:label="column.label" :label="column.label"
:prop="column.prop" :prop="column.prop"
:sortable="column.sortable" :sortable="column.sortable"
align="center" align="center"
header-align="center" header-align="center"
show-overflow-tooltip show-overflow-tooltip
v-for="column in tableColumns" v-for="column in tableColumns"
> >
<template scope="{row}" v-if="column.prop=='projectType'"> <template scope="{row}" v-if="column.prop=='projectType'">
<span v-if="row.eveProjectType==1">单项</span> <span v-if="row.eveProjectType==1">单项</span>
@@ -214,7 +214,7 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-else-if="column.prop=='applyNum'"> <template scope="{row}" v-else-if="column.prop=='applyNum'">
<span v-if="row.successUserApply>0&&row.applyType!==3">{{ row.successUserApply }}人</span> <span v-if="row.successUserApply>0&&row.applyType!==3">{{ 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">{{ row.totalApplyNum }}人</span> <span v-else-if="row.totalApplyNum>0&&row.applyType===3">{{ row.totalApplyNum }}人</span>
<span v-else>0人</span> <span v-else>0人</span>
@@ -235,10 +235,10 @@ layout("/layouts/platform.html"){
项目报名 项目报名
</el-button> </el-button>
<el-button <el-button
:loading="row.loading" :loading="row.loading"
@click="doDelete(row)" @click="doDelete(row)"
size="mini" size="mini"
type="danger" type="danger"
> >
删除报名人员 删除报名人员
</el-button> </el-button>
@@ -274,13 +274,13 @@ layout("/layouts/platform.html"){
<table-tool label="填写领队信息"></table-tool> <table-tool label="填写领队信息"></table-tool>
<el-form-item label="姓&emsp;&emsp;名" prop="userId"> <el-form-item label="姓&emsp;&emsp;名" prop="userId">
<user-select <user-select
:option_label_func="(item)=>{return item.username + item.loginname}" :option_label_func="(item)=>{return item.username + item.loginname}"
@change="changeLeader" @change="changeLeader"
api="/platform/activity/apply/getUserUnion" api="/platform/activity/apply/getUserUnion"
api_input_key_name="query" api_input_key_name="query"
ref="userData" ref="userData"
style="width: 100%" style="width: 100%"
v-model="leaderData.userId" v-model="leaderData.userId"
></user-select> ></user-select>
</el-form-item> </el-form-item>
<el-form-item label="所在单位" prop="unitId"> <el-form-item label="所在单位" prop="unitId">
@@ -299,12 +299,13 @@ layout("/layouts/platform.html"){
<table-tool label="填写教练信息"></table-tool> <table-tool label="填写教练信息"></table-tool>
<el-form-item label="姓&emsp;&emsp;名" prop="userId"> <el-form-item label="姓&emsp;&emsp;名" prop="userId">
<user-select <user-select
:option_label_func="(item)=>{return item.username + item.loginname}" :option_label_func="(item)=>{return item.username + item.loginname}"
@change="changeCoach" @change="changeCoach"
api="/platform/activity/apply/getUserUnion" api="/platform/activity/apply/getUserUnion"
api_input_key_name="query" api_input_key_name="query"
style="width: 100%" style="width: 100%"
v-model="coachData.userId" ref="userData2"
v-model="coachData.userId"
></user-select> ></user-select>
</el-form-item> </el-form-item>
<el-form-item label="所在单位" prop="unitId"> <el-form-item label="所在单位" prop="unitId">
@@ -328,9 +329,9 @@ layout("/layouts/platform.html"){
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="活动通知" title="活动通知"
:visible.sync="activityNoticeDialog" :visible.sync="activityNoticeDialog"
width="50%" width="50%"
> >
<div style="margin: 10px; "> <div style="margin: 10px; ">
<div style="height: 500px; overflow: auto;" <div style="height: 500px; overflow: auto;"
@@ -343,9 +344,9 @@ layout("/layouts/platform.html"){
</div> </div>
<script> <script>
<!--#include("applyUser.js"){}#--> <!--#include("applyUser.js"){}#-->
<!--#include("deleteUser.js"){}#--> <!--#include("deleteUser.js"){}#-->
new Vue({ new Vue({
el: "#app", el: "#app",
store, store,
mixins: [initTableMixins], mixins: [initTableMixins],
@@ -366,10 +367,10 @@ layout("/layouts/platform.html"){
groupList: [], groupList: [],
eventList: [], eventList: [],
tableColumns: [ tableColumns: [
{ 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: "暂保存人数"}
], ],
unionOptions: [], unionOptions: [],
@@ -386,36 +387,40 @@ layout("/layouts/platform.html"){
}, },
methods: { methods: {
changeLeader(id) { changeLeader(id) {
const userList = this.$refs.userData.options if (id) {
const user = userList.find((v) => v.id === id) const userList = this.$refs.userData.options
this.$set(this.leaderData, "userId", id) const user = userList.find((v) => v.id === id)
this.$set(this.leaderData, "loginname", user.loginname) this.$set(this.leaderData, "userId", id)
this.$set(this.leaderData, "username", user.username) this.$set(this.leaderData, "loginname", user.loginname)
this.$set(this.leaderData, "unitId", user.unitId) this.$set(this.leaderData, "username", user.username)
this.$set(this.leaderData, "sex", user.sex) this.$set(this.leaderData, "unitId", user.unitId)
this.$set(this.leaderData, "mobile", user.mobile) this.$set(this.leaderData, "sex", user.sex)
this.$set(this.leaderData, "unionLeader", true) this.$set(this.leaderData, "mobile", user.mobile)
this.$set(this.leaderData, "unionId", user.unionId) this.$set(this.leaderData, "unionLeader", true)
this.$set(this.leaderData, "identity", ["3"]) this.$set(this.leaderData, "unionId", user.unionId)
this.$set(this.leaderData, "status", 2) this.$set(this.leaderData, "identity", ["3"])
this.$set(this.leaderData, "awardsMode", 2) this.$set(this.leaderData, "status", 0)
this.$set(this.leaderData, "activityId", this.activityData.id) this.$set(this.leaderData, "awardsMode", 2)
this.$set(this.leaderData, "activityId", this.activityData.id)
}
}, },
changeCoach(id) { changeCoach(id) {
const userList = this.$refs.userData.options if (id) {
const user = userList.find((v) => v.id === id) const userList = this.$refs.userData2.options
this.$set(this.coachData, "userId", id) const user = userList.find((v) => v.id === id)
this.$set(this.coachData, "loginname", user.loginname) this.$set(this.coachData, "userId", id)
this.$set(this.coachData, "username", user.username) this.$set(this.coachData, "loginname", user.loginname)
this.$set(this.coachData, "unitId", user.unitId) this.$set(this.coachData, "username", user.username)
this.$set(this.coachData, "sex", user.sex) this.$set(this.coachData, "unitId", user.unitId)
this.$set(this.coachData, "mobile", user.mobile) this.$set(this.coachData, "sex", user.sex)
this.$set(this.coachData, "unionCoach", true) this.$set(this.coachData, "mobile", user.mobile)
this.$set(this.coachData, "unionId", user.unionId) this.$set(this.coachData, "unionCoach", true)
this.$set(this.coachData, "identity", ["2"]) this.$set(this.coachData, "unionId", user.unionId)
this.$set(this.coachData, "status", 2) this.$set(this.coachData, "identity", ["2"])
this.$set(this.coachData, "awardsMode", 2) this.$set(this.coachData, "status", 0)
this.$set(this.coachData, "activityId", this.activityData.id) this.$set(this.coachData, "awardsMode", 2)
this.$set(this.coachData, "activityId", this.activityData.id)
}
}, },
async doLeaderCoach() { async doLeaderCoach() {
this.formLoading = true this.formLoading = true
@@ -445,8 +450,17 @@ layout("/layouts/platform.html"){
this.coachData = {} this.coachData = {}
if (this.leaderData || this.coachData) { if (this.leaderData || this.coachData) {
await this.getUnionCoachLeaderHead() await this.getUnionCoachLeaderHead()
} }
this.dialogLeaderCoach = true this.dialogLeaderCoach = true
setTimeout(async () => {
if (this.leaderData.loginname) {
await this.$refs.userData.selectUser(this.leaderData.loginname)
}
if (this.coachData.loginname) {
await this.$refs.userData2.selectUser(this.coachData.loginname)
}
}, 500)
}, },
async activityInfoData() { async activityInfoData() {
const resp = await this.$axios.post(loc() + "/activityData", this.pageForm) const resp = await this.$axios.post(loc() + "/activityData", this.pageForm)
@@ -486,8 +500,8 @@ layout("/layouts/platform.html"){
this.coachData = {} this.coachData = {}
this.headData = {} this.headData = {}
this.staffData = {} this.staffData = {}
const resp = await this.$axios.post(loc() + "/getUnionCoachLeaderHead", { activityId: this.pageForm.activityId }) const resp = await this.$axios.post(loc() + "/getUnionCoachLeaderHead", {activityId: this.pageForm.activityId})
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
} }
@@ -504,14 +518,14 @@ layout("/layouts/platform.html"){
this.userOptions = userOptions this.userOptions = userOptions
}, },
async changeActivity() { async changeActivity() {
const resp = await this.$axios.post("/platform/activity/apply/getEvents", { activityId: this.pageForm.activityId }) const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
this.eventList = resp.data this.eventList = resp.data
}, },
pageData() { pageData() {
this.tabLoading = true this.tabLoading = true
const pageForm = clone(this.pageForm) const pageForm = clone(this.pageForm)
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen) pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
this.$axios.post("/platform/activity/apply/pageData", { data: JSON.stringify(pageForm) }).then((res) => { this.$axios.post("/platform/activity/apply/pageData", {data: JSON.stringify(pageForm)}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.tableData = res.data.list this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount this.pageForm.totalCount = res.data.totalCount
@@ -148,12 +148,13 @@ layout("/layouts/platform_h5.html"){
margin-left: 0 !important; margin-left: 0 !important;
} }
.form-create-h5 .el-radio-group{ .form-create-h5 .el-radio-group {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
row-gap: 20px; row-gap: 20px;
} }
.form-create-h5 .el-radio-group label{
.form-create-h5 .el-radio-group label {
width: 100%; width: 100%;
margin-right: 0; margin-right: 0;
} }
@@ -161,7 +162,8 @@ layout("/layouts/platform_h5.html"){
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar @click-left="historyBack" placeholder fixed left-arrow left-text="返回" placeholder title="活动详情"></van-nav-bar> <van-nav-bar @click-left="historyBack" placeholder fixed left-arrow left-text="返回" placeholder
title="活动详情"></van-nav-bar>
<div style="background: #ededed; padding-bottom: 56px"> <div style="background: #ededed; padding-bottom: 56px">
<van-image :src="viewData.cover"></van-image> <van-image :src="viewData.cover"></van-image>
@@ -198,12 +200,12 @@ layout("/layouts/platform_h5.html"){
<span style="color: var(--color-primary)">{{viewData.teamNum}}</span> <span style="color: var(--color-primary)">{{viewData.teamNum}}</span>
</div> </div>
<!-- <div class="info-item" v-if="viewData.signUpMethod==1">--> <!-- <div class="info-item" v-if="viewData.signUpMethod==1">-->
<!-- <van-icon name="location-o"></van-icon>--> <!-- <van-icon name="location-o"></van-icon>-->
<!-- 报名人数:--> <!-- 报名人数:-->
<!-- <span style="color: var(&#45;&#45;color-primary)">2</span>--> <!-- <span style="color: var(&#45;&#45;color-primary)">2</span>-->
<!----> <!---->
<!-- </div>--> <!-- </div>-->
</div> </div>
<div class="notice"> <div class="notice">
@@ -225,23 +227,25 @@ layout("/layouts/platform_h5.html"){
<span v-if="!isApplyUser" class="text-primary">如需取消报名,请联系报名人。</span> <span v-if="!isApplyUser" class="text-primary">如需取消报名,请联系报名人。</span>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-select <el-select
v-if="isApplyUser && inApplyTime" v-if="isApplyUser && inApplyTime"
v-model="searchTeammateUserId" v-model="searchTeammateUserId"
filterable filterable
clearable clearable
remote remote
reserve-keyword reserve-keyword
placeholder="请输入关键词" placeholder="请输入关键词"
:remote-method="queryTeammate" :remote-method="queryTeammate"
> >
<el-option <el-option
v-for="item in teammateOptions" v-for="item in teammateOptions"
:key="item.userId" :key="item.userId"
:label="item.userName + '(' + item.loginName + ')'" :label="item.userName + '(' + item.loginName + ')'"
:value="item.userId" :value="item.userId"
></el-option> ></el-option>
</el-select> </el-select>
<el-button v-if="isApplyUser && inApplyTime" class="ml5" type="primary" icon="el-icon-plus" @click="addTeamUser">添加</el-button> <el-button v-if="isApplyUser && inApplyTime" class="ml5" type="primary" icon="el-icon-plus"
@click="addTeamUser">添加
</el-button>
<el-table :data="teamUsers" class="mt10" border> <el-table :data="teamUsers" class="mt10" border>
<el-table-column label="序号" type="index" width="60px"></el-table-column> <el-table-column label="序号" type="index" width="60px"></el-table-column>
@@ -256,13 +260,14 @@ layout("/layouts/platform_h5.html"){
<el-tag size="mini" v-if="row.applyUserId==row.userId">报名人</el-tag> <el-tag size="mini" v-if="row.applyUserId==row.userId">报名人</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100px" v-if="(isApplyUser || teamUsers.length===0) && inApplyTime"> <el-table-column label="操作" width="100px"
v-if="(isApplyUser || teamUsers.length===0) && inApplyTime">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="danger" type="danger"
size="mini" size="mini"
@click="removeTeamUser(scope.$index)" @click="removeTeamUser(scope.$index)"
v-if="scope.row.applyUserId!==scope.row.userId" v-if="scope.row.applyUserId!==scope.row.userId"
> >
删除 删除
</el-button> </el-button>
@@ -274,17 +279,20 @@ layout("/layouts/platform_h5.html"){
<div class="form-create-h5" v-if="isCustomForm"> <div class="form-create-h5" v-if="isCustomForm">
<div class="notice-title left-tag-title">填写报名信息</div> <div class="notice-title left-tag-title">填写报名信息</div>
<form-create :value.sync="dynamicFormData" v-model="fapi" :rule="formCreateRule" :option="formCreateOption"></form-create> <form-create :value.sync="dynamicFormData" v-model="fapi" :rule="formCreateRule"
:option="formCreateOption"></form-create>
</div> </div>
</div> </div>
<div class="footer"> <div class="footer">
<div class="bottom-button" style="background: var(--color-primary)" v-if="!isSignUp && inApplyTime" @click="onConfirm"> <div class="bottom-button" style="background: var(--color-primary)" v-if="!isSignUp && inApplyTime"
@click="onConfirm">
<span>立即报名</span> <span>立即报名</span>
<span style="font-size: 12px; margin-top: 5px">{{viewData.applyEndTime}}截止报名</span> <span style="font-size: 12px; margin-top: 5px">{{viewData.applyEndTime}}截止报名</span>
</div> </div>
<div class="bottom-button" style="background: var(--color-primary)" v-if="isSignUp && inApplyTime" @click="onConfirmAgain"> <div class="bottom-button" style="background: var(--color-primary)" v-if="isSignUp && inApplyTime"
@click="onConfirmAgain">
<span>重新提交</span> <span>重新提交</span>
<span style="font-size: 12px; margin-top: 5px">{{viewData.applyEndTime}}截止报名</span> <span style="font-size: 12px; margin-top: 5px">{{viewData.applyEndTime}}截止报名</span>
</div> </div>
@@ -351,7 +359,7 @@ layout("/layouts/platform_h5.html"){
methods: { methods: {
init() { init() {
if (this.id) { if (this.id) {
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", { id: this.id }).then((res) => { this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.viewData = res.data this.viewData = res.data
if (this.viewData.formConfig) { if (this.viewData.formConfig) {
@@ -365,7 +373,7 @@ layout("/layouts/platform_h5.html"){
}, },
//查询报名人员 //查询报名人员
listTeamUser() { listTeamUser() {
this.$axios.post("/platform/activity/culture/applyUser/listTeamUser", { activityId: this.id }).then((res) => { this.$axios.post("/platform/activity/culture/applyUser/listTeamUser", {activityId: this.id}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.isSignUp = res.data.length > 0 this.isSignUp = res.data.length > 0
this.teamUsers = res.data this.teamUsers = res.data
@@ -419,15 +427,29 @@ layout("/layouts/platform_h5.html"){
if (this.viewData.signUpMethod === 2) { if (this.viewData.signUpMethod === 2) {
//组队人数判断 //组队人数判断
if (this.teamUsers.length === 0) { if (this.teamUsers.length === 0) {
this.$message.warning("请添加队友后再提交!") this.$toast("请添加队友后再提交!")
return return
} }
if (this.teamUsers.length < this.viewData.teamNum) { if (this.teamUsers.length < this.viewData.teamNum) {
this.$message.warning("您选择的人数小于" + this.viewData.teamNum + "人,请重新选择!") this.$dialog
.alert({
title: "提示",
message: "您选择的人数小于" + this.viewData.teamNum + "人,请重新选择!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.length > this.viewData.teamNum) { if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!") this.$dialog
.alert({
title: "提示",
message: "您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!"
})
.then(() => {
})
return return
} }
} }
@@ -435,11 +457,25 @@ layout("/layouts/platform_h5.html"){
//分工会 //分工会
if (this.viewData.signUpMethod === 3) { if (this.viewData.signUpMethod === 3) {
if (this.teamUsers.length === 0) { if (this.teamUsers.length === 0) {
this.$message.warning("请添加报名人员后再提交!") this.$dialog
.alert({
title: "提示",
message: "请添加报名人员后再提交!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.length > this.viewData.teamNum) { if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!") this.$dialog
.alert({
title: "提示",
message: "您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!"
})
.then(() => {
})
return return
} }
} }
@@ -485,15 +521,36 @@ layout("/layouts/platform_h5.html"){
if (this.viewData.signUpMethod === 2) { if (this.viewData.signUpMethod === 2) {
//组队人数判断 //组队人数判断
if (this.teamUsers.length === 0) { if (this.teamUsers.length === 0) {
this.$message.warning("请添加队友后再提交!") this.$dialog
.alert({
title: "提示",
message: "请添加队友后再提交!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.length < this.viewData.teamNum) { if (this.teamUsers.length < this.viewData.teamNum) {
this.$message.warning("您选择的人数小于" + this.viewData.teamNum + "人,请重新选择!") this.$dialog
.alert({
title: "提示",
message: "您选择的人数小于" + this.viewData.teamNum + "人,请重新选择!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.length > this.viewData.teamNum) { if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!") this.$dialog
.alert({
title: "提示",
message: "您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!"
})
.then(() => {
})
return return
} }
} }
@@ -501,11 +558,25 @@ layout("/layouts/platform_h5.html"){
//分工会 //分工会
if (this.viewData.signUpMethod === 3) { if (this.viewData.signUpMethod === 3) {
if (this.teamUsers.length === 0) { if (this.teamUsers.length === 0) {
this.$message.warning("请添加报名人员后再提交!") this.$dialog
.alert({
title: "提示",
message: "请添加报名人员后再提交!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.length > this.viewData.teamNum) { if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!") this.$dialog
.alert({
title: "提示",
message: "您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!"
})
.then(() => {
})
return return
} }
} }
@@ -544,11 +615,11 @@ layout("/layouts/platform_h5.html"){
message: "确定取消报名吗?" message: "确定取消报名吗?"
}) })
.then(() => { .then(() => {
this.$axios.post("/platform/activity/culture/applyUser/cancelSignUp", { activityId: this.id }).then((res) => { this.$axios.post("/platform/activity/culture/applyUser/cancelSignUp", {activityId: this.id}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.fapi.resetFields()
this.$toast.success(res.msg) this.$toast.success(res.msg)
this.listTeamUser() this.listTeamUser()
this.fapi.resetFields()
} }
}) })
}) })
@@ -557,8 +628,11 @@ layout("/layouts/platform_h5.html"){
//查询队友信息 //查询队友信息
queryTeammate(val) { queryTeammate(val) {
if (val) { if (val) {
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", { keyword: val }).then((res) => { this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {keyword: val}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
res.data.map(v => {
v.applyUserId = this.$store.state.user.id
})
this.teammateOptions = res.data this.teammateOptions = res.data
} }
}) })
@@ -568,15 +642,36 @@ layout("/layouts/platform_h5.html"){
//添加队友 //添加队友
addTeamUser() { addTeamUser() {
if (!this.searchTeammateUserId) { if (!this.searchTeammateUserId) {
this.$message.error("请先选择后再添加") this.$dialog
.alert({
title: "提示",
message: "请先选择后再添加!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.some((v) => v.userId === this.searchTeammateUserId)) { if (this.teamUsers.some((v) => v.userId === this.searchTeammateUserId)) {
this.$message.error("请勿重复添加") this.$dialog
.alert({
title: "提示",
message: "请勿重复添加!"
})
.then(() => {
})
return return
} }
if (this.teamUsers.length >= this.viewData.teamNum) { if (this.teamUsers.length >= this.viewData.teamNum) {
this.$message.error("已满员") this.$dialog
.alert({
title: "提示",
message: "已满员!"
})
.then(() => {
})
return return
} }
this.teamUsers.push(this.teammateOptions.find((v) => v.userId === this.searchTeammateUserId)) this.teamUsers.push(this.teammateOptions.find((v) => v.userId === this.searchTeammateUserId))
@@ -1,40 +1,49 @@
<!--# <!--#
layout("/layouts/platform_h5.html"){ layout("/layouts/platform_h5.html"){
#--> #-->
<style>
.van-tag--default {
background-color: #f1f1f1 !important;
}
</style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="活动列表" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar> <van-nav-bar title="活动列表" @click-left="()=>this.$pjaxReplace('/platform/home')" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
<van-sticky offset-top="46px"> <van-sticky offset-top="46px">
<van-dropdown-menu> <van-dropdown-menu>
<year-van-dropdown-item :num="5" @change="pageData" v-model="pageForm.year"></year-van-dropdown-item> <year-van-dropdown-item :num="5" @change="pageData" v-model="pageForm.year"></year-van-dropdown-item>
<van-dropdown-item :options="stateList" @change="pageData" v-model="pageForm.isActivity"></van-dropdown-item> <van-dropdown-item :options="stateList" @change="pageData"
<van-dropdown-item :options="applyStatusOptions" @change="pageData" v-model="pageForm.applyStatus"></van-dropdown-item> v-model="pageForm.isActivity"></van-dropdown-item>
<van-dropdown-item :options="applyStatusOptions" @change="pageData"
v-model="pageForm.applyStatus"></van-dropdown-item>
</van-dropdown-menu> </van-dropdown-menu>
</van-sticky> </van-sticky>
<div> <div>
<van-list :finished="finished" @load="pageData" finished-text="没有更多了" v-if="tableData.length>0" v-model="loading"> <van-list :finished="finished" @load="pageData" finished-text="没有更多了" v-if="tableData.length>0"
v-model="loading">
<div class="table-list"> <div class="table-list">
<div :key="row.id" class="table-card" v-for="row in tableData"> <div :key="row.id" class="table-card" v-for="row in tableData">
<van-tag mark size="small" style="position: absolute; left: 5px; top: 5px; z-index: 1"> <van-tag mark size="large" style="position: absolute; right: 0%; top: 5px; z-index: 1">
<span style="color: forestgreen" v-if="$moment(row.applyStartTime).valueOf() > $moment().valueOf()">未开始报名</span> <span style="color: forestgreen"
v-if="$moment(row.applyStartTime).valueOf() > $moment().valueOf()">未开始报名</span>
<span <span
style="color: forestgreen" style="color: forestgreen"
v-else-if="$moment(row.applyEndTime).valueOf() > $moment().valueOf() && v-else-if="$moment(row.applyEndTime).valueOf() > $moment().valueOf() &&
$moment().valueOf() > $moment(row.applyStartTime).valueOf()" $moment().valueOf() > $moment(row.applyStartTime).valueOf()"
> >
报名中 报名中
</span> </span>
<span <span
style="color: #ee1919" style="color: #ee1919"
v-else-if="$moment(row.applyEndTime).valueOf() < $moment().valueOf() && v-else-if="$moment(row.applyEndTime).valueOf() < $moment().valueOf() &&
$moment().valueOf() < $moment(row.startTime).valueOf()" $moment().valueOf() < $moment(row.startTime).valueOf()"
> >
报名结束 报名结束
</span> </span>
<span <span
style="color: forestgreen" style="color: forestgreen"
v-else-if="$moment(row.startTime).valueOf() < $moment().valueOf() && v-else-if="$moment(row.startTime).valueOf() < $moment().valueOf() &&
$moment().valueOf() < $moment(row.endTime).valueOf()" $moment().valueOf() < $moment(row.endTime).valueOf()"
> >
活动进行中 活动进行中
@@ -53,19 +62,20 @@ layout("/layouts/platform_h5.html"){
<van-cell :value="row.applyEndTime" title="报名结束时间"></van-cell> <van-cell :value="row.applyEndTime" title="报名结束时间"></van-cell>
<van-cell class="table-card-footer"> <van-cell class="table-card-footer">
<template> <template>
<van-button :loading="subLoading" @click="openView(row)" round size="small" type="primary">查看</van-button> <van-button :loading="subLoading" @click="openView(row)" round size="small" type="primary">&nbsp;&nbsp;&nbsp;</van-button>
</template> </template>
</van-cell> </van-cell>
</div> </div>
</div> </div>
</van-list> </van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty> <van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"
v-else></van-empty>
</div> </div>
<activity_event_notification <activity_event_notification
:event_notification="viewData.eventNotification" :event_notification="viewData.eventNotification"
:id="viewData.id" :id="viewData.id"
ref="eventNotification" ref="eventNotification"
></activity_event_notification> ></activity_event_notification>
</div> </div>
@@ -88,13 +98,13 @@ layout("/layouts/platform_h5.html"){
}, },
yearList: [], yearList: [],
applyStatusOptions: [ applyStatusOptions: [
{ value: 1, text: "未报名" }, {value: 1, text: "未报名"},
{ value: 2, text: "已报名" } {value: 2, text: "已报名"}
], ],
stateList: [ stateList: [
{ value: 1, text: "全部" }, {value: 1, text: "全部"},
{ value: 2, text: "报名中" }, {value: 2, text: "报名中"},
{ value: 3, text: "报名已结束" } {value: 3, text: "报名已结束"}
], ],
subLoading: false, subLoading: false,
viewShow: false, viewShow: false,