commit
This commit is contained in:
+8
-4
@@ -144,7 +144,8 @@ public class ActivityUnionApplyUserController {
|
|||||||
@At
|
@At
|
||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
||||||
public Object selfUnionUsers(String groupId) {
|
public Object selfUnionUsers(String groupId,String tissueId) {
|
||||||
|
ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId));
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
u.id,
|
u.id,
|
||||||
@@ -160,7 +161,9 @@ public class ActivityUnionApplyUserController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
cnd.and("aus.groupId", "=", groupId);
|
cnd.and("aus.groupId", "=", groupId);
|
||||||
cnd.groupBy("u.id");
|
cnd.groupBy("u.id");
|
||||||
cnd.asc("u.unitname").asc("u.unionname");
|
cnd.asc("u.unitname").asc("u.unionname");
|
||||||
@@ -173,7 +176,6 @@ public class ActivityUnionApplyUserController {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
||||||
public Object getReportedUser(String tissueId) {
|
public Object getReportedUser(String tissueId) {
|
||||||
ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId));
|
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
atp.userId
|
atp.userId
|
||||||
@@ -184,9 +186,11 @@ public class ActivityUnionApplyUserController {
|
|||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
cnd.and("atp.tissueId", "=", tissueId);
|
cnd.and("atp.tissueId", "=", tissueId);
|
||||||
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
cnd.and("atp.applyUserId", "=", ShiroUtil.getUserId());
|
||||||
|
/* if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||||
}
|
}*/
|
||||||
|
sql.setCondition(cnd);
|
||||||
List<NutMap> list = baseService.listMap(sql);
|
List<NutMap> list = baseService.listMap(sql);
|
||||||
List<String> userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList());
|
List<String> userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList());
|
||||||
return userIds;
|
return userIds;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ layout("/layouts/platform.html"){
|
|||||||
<template
|
<template
|
||||||
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime,isSave}}"
|
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime,isSave}}"
|
||||||
v-else-if="column.prop=='state'">
|
v-else-if="column.prop=='state'">
|
||||||
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime,isSave)"></div>
|
<div v-html="getStatus(close,applyStartTime,applyEndTime,startTime,endTime,isSave)"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -215,7 +215,6 @@ layout("/layouts/platform.html"){
|
|||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let E = window.wangEditor
|
let E = window.wangEditor
|
||||||
const editors = {}
|
const editors = {}
|
||||||
@@ -280,6 +279,25 @@ layout("/layouts/platform.html"){
|
|||||||
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getStatus(close, applyStartTime, applyEndTime, startTime, endTime) {
|
||||||
|
if (close) {
|
||||||
|
return `<span class="text-danger">活动已关闭</span>`
|
||||||
|
}
|
||||||
|
const now = moment().valueOf()
|
||||||
|
const dateNow = moment(moment(moment().format('YYYY-MM-DD')).valueOf()).valueOf()
|
||||||
|
|
||||||
|
if (now < moment(applyStartTime).valueOf()) {
|
||||||
|
return `<span class="text-info">未开始报名</span>`
|
||||||
|
} else if (moment(applyStartTime).valueOf() <= now && now <= moment(applyEndTime).valueOf()) {
|
||||||
|
return `<span class="text-success">活动报名中</span>`
|
||||||
|
} else if (moment(applyEndTime).valueOf() < now && now < moment(startTime).valueOf()) {
|
||||||
|
return `<span class="text-info">报名已结束</span>`
|
||||||
|
} else if (moment(startTime).valueOf() < now && now < moment(endTime).valueOf()) {
|
||||||
|
return `<span class="text-primary">活动进行中</span>`
|
||||||
|
} else if (moment(endTime).valueOf() < now) {
|
||||||
|
return `<span class="text-danger">活动已结束</span>`
|
||||||
|
}
|
||||||
|
},
|
||||||
async activityStatusChange(row, val) {
|
async activityStatusChange(row, val) {
|
||||||
const resp = await $.get('/platform/activity/school/info/mange/activityStatusChange', {
|
const resp = await $.get('/platform/activity/school/info/mange/activityStatusChange', {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
|
|||||||
@@ -273,7 +273,8 @@
|
|||||||
this.tableLoading = true
|
this.tableLoading = true
|
||||||
this.$refs.guava.edit()
|
this.$refs.guava.edit()
|
||||||
const { data } = await $.get("/platform/activity/applyUser/selfUnionUsers", {
|
const { data } = await $.get("/platform/activity/applyUser/selfUnionUsers", {
|
||||||
groupId: row.groupId
|
groupId: row.groupId,
|
||||||
|
tissueId: row.id
|
||||||
})
|
})
|
||||||
this.leftData = data
|
this.leftData = data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user