活动
This commit is contained in:
+20
-6
@@ -824,9 +824,9 @@ public class ActivityApplyController {
|
|||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions("activity.apply")
|
@RequiresPermissions("activity.apply")
|
||||||
public Object dshApplyUserList(
|
public Object dshApplyUserList(@Param(value = "activityId", required = false) String activityId,
|
||||||
@Param(value = "activityId", required = false) String activityId,
|
@Param(value = "eventId", required = false) String eventId,
|
||||||
@Param(value = "eventId", required = false) String eventId) {
|
@Param(value = "activityIsAudit", required = false) String activityIsAudit) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
asa.id,
|
asa.id,
|
||||||
@@ -840,9 +840,23 @@ public class ActivityApplyController {
|
|||||||
FROM
|
FROM
|
||||||
`activity_school_apply` asa
|
`activity_school_apply` asa
|
||||||
LEFT JOIN sys_user us ON asa.applyUser = us.id
|
LEFT JOIN sys_user us ON asa.applyUser = us.id
|
||||||
WHERE asa.activityId=@activityId and asa.eventId=@eventId and asa.activityUnionId=@activityUnionId
|
$condition
|
||||||
ORDER BY asa.applyUser
|
""");
|
||||||
""").setParam("activityId", activityId).setParam("eventId", eventId).setParam("activityUnionId", getUnionId());
|
// WHERE
|
||||||
|
// asa.activityId=@activityId and asa.eventId=@eventId and asa.activityUnionId=@activityUnionId
|
||||||
|
// ORDER BY asa.applyUser
|
||||||
|
// .setParam("activityId", activityId).setParam("eventId", eventId).setParam("activityUnionId", getUnionId());
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and("asa.activityId", "=", activityId);
|
||||||
|
cnd.and("asa.eventId", "=", eventId);
|
||||||
|
cnd.and("asa.activityUnionId", "=", getUnionId());
|
||||||
|
if ("false".equals(activityIsAudit)) {
|
||||||
|
cnd.and("asa.status", "=", 1);
|
||||||
|
} else {
|
||||||
|
cnd.and("asa.status", "!=", 1);
|
||||||
|
}
|
||||||
|
cnd.asc("asa.applyUser");
|
||||||
|
sql.setCondition(cnd);
|
||||||
return activitySchoolApplyService.listMap(sql);
|
return activitySchoolApplyService.listMap(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,73 +18,64 @@ layout("/mobile/platform.html"){
|
|||||||
</style>
|
</style>
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
<van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
|
||||||
|
|
||||||
<div class="search-fixed">
|
<div class="search-fixed">
|
||||||
<van-dropdown-menu active-color="#1989fa">
|
<van-dropdown-menu active-color="#1989fa">
|
||||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
<van-dropdown-item v-model="pageForm.year" :options="yearList" @change="getActivityData"></van-dropdown-item>
|
||||||
@change="getActivityData"></van-dropdown-item>
|
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList" @change="getActivityData"></van-dropdown-item>
|
||||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList"
|
|
||||||
@change="getActivityData"></van-dropdown-item>
|
|
||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin: 60px auto 0 auto">
|
<div style="margin: 60px auto 0 auto">
|
||||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
||||||
<div v-for="o in tableData" class="list-card"
|
<div v-for="o in tableData" class="list-card" @click="openInfo(o)">
|
||||||
@click="openInfo(o)">
|
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<van-cell :border="false" title="活动名称">
|
<van-cell :border="false" title="活动名称">
|
||||||
<span class="van-ellipsis" style="font-size: 16px"
|
<span class="van-ellipsis" style="font-size: 16px" :style="{color:themeColor}">{{o.NAME}}</span>
|
||||||
:style="{color:themeColor}">{{o.NAME}}</span>
|
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
||||||
<van-cell :border="false" title="报名开始时间">
|
<van-cell :border="false" title="报名时间">
|
||||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}}
|
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}}至{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||||
</van-cell>
|
|
||||||
<van-cell :border="false" title="报名结束时间">
|
|
||||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
<!-- <van-cell :border="false" title="报名结束时间">{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}</van-cell>-->
|
||||||
<!-- <van-cell :border="false" title="活动时间">
|
<!-- <van-cell :border="false" title="活动时间">
|
||||||
<span style="font-size: 12px">
|
<span style="font-size: 12px">
|
||||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至 {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至 {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||||
</span>
|
</span>
|
||||||
</van-cell>-->
|
</van-cell>-->
|
||||||
<van-cell :border="false" title="活动状态">
|
<van-cell :border="false" title="活动状态">
|
||||||
<van-tag type="warning"
|
<div style="display: flex; justify-content: space-between">
|
||||||
v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">未开始
|
<div>
|
||||||
</van-tag>
|
<van-tag type="warning" v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">未开始</van-tag>
|
||||||
<van-tag
|
<van-tag
|
||||||
type="primary"
|
type="primary"
|
||||||
v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"
|
||||||
>
|
>
|
||||||
报名中
|
报名中
|
||||||
</van-tag>
|
</van-tag>
|
||||||
<van-tag
|
<van-tag
|
||||||
type="success"
|
type="success"
|
||||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"
|
||||||
>
|
>
|
||||||
进行中
|
进行中
|
||||||
</van-tag>
|
</van-tag>
|
||||||
<van-tag type="danger"
|
<van-tag type="danger" v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">活动结束</van-tag>
|
||||||
v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">活动结束
|
</div>
|
||||||
</van-tag>
|
<van-button type="info" style="width: 90px" plain size="small" round @click="openInfo">查看详情</van-button>
|
||||||
|
</div>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</van-list>
|
</van-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||||
description="暂无数据"></van-empty>
|
|
||||||
|
|
||||||
<van-action-sheet v-model="show" title="活动通知">
|
<van-action-sheet v-model="show" title="活动通知">
|
||||||
<div v-html="activityInfo.eventNotification" style="padding-bottom: 30px"></div>
|
<div v-html="activityInfo.eventNotification" style="padding: 1px 15px 30px 15px"></div>
|
||||||
|
|
||||||
<van-button type="primary" block @click="openApply"
|
<van-button type="primary" block @click="openApply" style="position: fixed; bottom: 0">进入报名</van-button>
|
||||||
style="position: fixed; bottom: 0; ">进入报名
|
|
||||||
</van-button>
|
|
||||||
</van-action-sheet>
|
</van-action-sheet>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -133,7 +124,6 @@ layout("/mobile/platform.html"){
|
|||||||
openInfo(data) {
|
openInfo(data) {
|
||||||
this.activityInfo = data
|
this.activityInfo = data
|
||||||
this.show = true
|
this.show = true
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|||||||
@@ -142,6 +142,26 @@ layout("/layouts/platform.html"){
|
|||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-table .yellow-row {
|
||||||
|
background: rgba(255, 255, 0, 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table .blue-row {
|
||||||
|
background: rgba(0, 0, 255, 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table .green-row {
|
||||||
|
background: rgba(0, 128, 0, 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table .red-row {
|
||||||
|
background: rgba(255, 0, 0, 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-table .purple-row {
|
||||||
|
background: rgba(128, 0, 128, 0.19);
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="platform" id="app" v-cloak>
|
<div class="platform" id="app" v-cloak>
|
||||||
@@ -748,6 +768,10 @@ 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-button label="true">已审核</el-radio-button>
|
||||||
|
<el-radio-button label="false">未审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-check"
|
icon="el-icon-check"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -781,6 +805,7 @@ layout("/layouts/platform.html"){
|
|||||||
row-key="id"
|
row-key="id"
|
||||||
:size="tableSize"
|
:size="tableSize"
|
||||||
class="vi-table"
|
class="vi-table"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
@selection-change="dshHandleSelectionChange"
|
@selection-change="dshHandleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -814,6 +839,13 @@ layout("/layouts/platform.html"){
|
|||||||
label="性别"
|
label="性别"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
|
prop="applyUserName"
|
||||||
|
label="报名人"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" prop="identity" label="身份">
|
<el-table-column align="center" header-align="center" prop="identity" label="身份">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-tag v-if="row.identity.includes('1')" effect="dark">运动员</el-tag>
|
<el-tag v-if="row.identity.includes('1')" effect="dark">运动员</el-tag>
|
||||||
@@ -832,13 +864,6 @@ layout("/layouts/platform.html"){
|
|||||||
<el-tag v-if="row.identity.includes('7')">工作人员</el-tag>
|
<el-tag v-if="row.identity.includes('7')">工作人员</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
header-align="center"
|
|
||||||
prop="applyUserName"
|
|
||||||
label="报名人"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
@@ -1165,6 +1190,8 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// 颜色数组
|
||||||
|
const colors = ["yellow-row", "blue-row", "green-row", "red-row", "purple-row"];
|
||||||
//分组
|
//分组
|
||||||
const groupBy = (list, fn) => {
|
const groupBy = (list, fn) => {
|
||||||
const groups = {}
|
const groups = {}
|
||||||
@@ -1288,7 +1315,10 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
promiseBookFileList: [],
|
promiseBookFileList: [],
|
||||||
isPromiseBookFileView: true,
|
isPromiseBookFileView: true,
|
||||||
promiseBookDialogVisible: false
|
promiseBookDialogVisible: false,
|
||||||
|
|
||||||
|
// 活动审核相关
|
||||||
|
activityIsAudit: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -1304,6 +1334,10 @@ layout("/layouts/platform.html"){
|
|||||||
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
|
"delete_info": httpVueLoader("/components/activity/school/DeleteInfo.vue")
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tableRowClassName({ row }) {
|
||||||
|
debugger
|
||||||
|
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)
|
||||||
},
|
},
|
||||||
@@ -1370,12 +1404,30 @@ layout("/layouts/platform.html"){
|
|||||||
this.dshSelectionIds = val.map(v => v.id)
|
this.dshSelectionIds = val.map(v => v.id)
|
||||||
},
|
},
|
||||||
async openAuditApplyUser(data) {
|
async openAuditApplyUser(data) {
|
||||||
this.eventData = data
|
if (data) {
|
||||||
|
this.eventData = data
|
||||||
|
}
|
||||||
const resp = await $.get("/platform/activity/apply/dshApplyUserList", {
|
const resp = await $.get("/platform/activity/apply/dshApplyUserList", {
|
||||||
activityId: data.activityId,
|
activityId: this.eventData.activityId,
|
||||||
eventId: data.eventId
|
eventId: this.eventData.eventId,
|
||||||
|
activityIsAudit: this.activityIsAudit
|
||||||
})
|
})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
|
let colorIndex = 0; // 当前颜色索引
|
||||||
|
|
||||||
|
// 为每个item设置type和color
|
||||||
|
resp.data.forEach((item, index) => {
|
||||||
|
// 如果是第一个元素,或者当前applyUserName与前一个不同
|
||||||
|
if (index === 0 || item.applyUserName !== resp.data[index - 1].applyUserName) {
|
||||||
|
// 分配颜色
|
||||||
|
item.color = colors[colorIndex % colors.length];
|
||||||
|
colorIndex++;
|
||||||
|
} else {
|
||||||
|
// 如果当前applyUserName与前一个相同,使用相同的颜色
|
||||||
|
item.color = resp.data[index - 1].color;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.dshApplyUserList = resp.data
|
this.dshApplyUserList = resp.data
|
||||||
this.$refs.guava.public()
|
this.$refs.guava.public()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user