Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2025-05-06 19:40:51 +08:00
14 changed files with 259 additions and 130 deletions
@@ -90,11 +90,14 @@ public class ClientGroupController {
SELECT SELECT
t1.*, t1.*,
t2.userName, t2.userName,
t2.position,
t2.unitName, t2.unitName,
t2.sex t2.sex,
t3.phone
FROM FROM
`act_group_user` t1 `act_group_user` t1
LEFT JOIN act_user t2 ON t1.userId = t2.userId LEFT JOIN act_user t2 ON t1.userId = t2.userId
LEFT JOIN client_user t3 ON t1.userId = t3.id
WHERE t1.groupId=@groupId WHERE t1.groupId=@groupId
ORDER BY ORDER BY
t1.isLeader DESC t1.isLeader DESC
@@ -142,6 +142,28 @@ public class ActGroupController {
} }
@At
@SaCheckPermission("activity.group")
public Result queryGroupUser(String activityId, String groupId){
Sql sql = Sqls.create("""
SELECT
u.*,
agu.isLeader
FROM
act_group_user agu
LEFT JOIN act_user u ON u.userId = agu.userId
WHERE
agu.groupId = @groupId AND agu.activityId = @activityId
ORDER BY
agu.isLeader DESC
""").setParam("groupId", groupId).setParam("activityId", activityId);
sql.setCallback(Sqls.callback.maps());
dao.execute(sql);
List<NutMap> list = (List<NutMap>) sql.getResult();
return Result.success(list);
}
@At @At
@SaCheckPermission("activity.group") @SaCheckPermission("activity.group")
@SLog(tag = "活动分组", msg = "随机分组") @SLog(tag = "活动分组", msg = "随机分组")
@@ -215,7 +215,7 @@ public class ActUserController {
Sql sql = actUserService.getSignUpSql(pageForm); Sql sql = actUserService.getSignUpSql(pageForm);
List<NutMap> nutMaps = actUserService.listMap(sql); List<NutMap> nutMaps = actUserService.listMap(sql);
List<ExcelExportEntity> entityList = new ArrayList<>() {{ List<ExcelExportEntity> entityList = new ArrayList<>() {{
add(new ExcelExportEntity("报名号", "actUserNo", 20)); // add(new ExcelExportEntity("报名号", "actUserNo", 20));
add(new ExcelExportEntity("姓名", "userName", 20)); add(new ExcelExportEntity("姓名", "userName", 20));
add(new ExcelExportEntity("性别", "sex", 20)); add(new ExcelExportEntity("性别", "sex", 20));
add(new ExcelExportEntity("身份证号码", "idCard", 20)); add(new ExcelExportEntity("身份证号码", "idCard", 20));
@@ -223,6 +223,7 @@ public class ActUserController {
add(new ExcelExportEntity("职务", "position", 20)); add(new ExcelExportEntity("职务", "position", 20));
add(new ExcelExportEntity("所属单位", "unitName", 20)); add(new ExcelExportEntity("所属单位", "unitName", 20));
add(new ExcelExportEntity("报名时间", "signUpTime2", 20)); add(new ExcelExportEntity("报名时间", "signUpTime2", 20));
add(new ExcelExportEntity("是否签到", "isSignInDesc", 20));
}}; }};
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + new String((activity.getTitle() + "报名数据表.xlsx").getBytes(StandardCharsets.UTF_8), "ISO8859-1")); response.setHeader("Content-Disposition", "attachment;filename=" + new String((activity.getTitle() + "报名数据表.xlsx").getBytes(StandardCharsets.UTF_8), "ISO8859-1"));
@@ -79,9 +79,10 @@ public class ActivityItemApplyQueryController {
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup(); SqlExpressionGroup group = new SqlExpressionGroup();
group.or("au.userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"); group.or("au.userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%");
group.or("au.unitName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"); group.or("au.phone", "LIKE", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(group); cnd.and(group);
} }
cnd.andEX("au.unitId","=",pageForm.getUnitId());
cnd.and("au.activityId", "=", pageForm.getActivityId()); cnd.and("au.activityId", "=", pageForm.getActivityId());
cnd.andEX("aiu.itemId", "=", pageForm.getItemId()); cnd.andEX("aiu.itemId", "=", pageForm.getItemId());
cnd.asc("ai.`name`"); cnd.asc("ai.`name`");
@@ -76,9 +76,12 @@ public class ActivitySignInQueryController {
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup(); SqlExpressionGroup group = new SqlExpressionGroup();
group.or("au.userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"); group.or("au.userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%");
group.or("au.unitName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"); group.or("au.phone", "LIKE", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(group); cnd.and(group);
} }
cnd.andEX("au.unitId","=",pageForm.getUnitId());
cnd.andEX("au.isStay","=",pageForm.getIsStay());
cnd.andEX("au.isGrant","=",pageForm.getIsGrant());
cnd.and("au.activityId", "=", pageForm.getActivityId()); cnd.and("au.activityId", "=", pageForm.getActivityId());
cnd.and("au.isSignIn", "=", 1); cnd.and("au.isSignIn", "=", 1);
cnd.desc("au.signInTime"); cnd.desc("au.signInTime");
@@ -109,7 +112,15 @@ public class ActivitySignInQueryController {
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
au.*, au.*,
DATE_FORMAT(signInTime, '%Y-%m-%d %H:%i:%s') signInTime DATE_FORMAT(signInTime, '%Y-%m-%d %H:%i:%s') signInTime,
CASE au.isStay
WHEN 1 THEN '住宿'
WHEN 0 THEN '不住宿'
END AS isStayDesc,
CASE au.isGrant
WHEN 1 THEN '已发放'
WHEN 0 THEN '未发放'
END AS isGrantDesc
FROM FROM
`act_user` au `act_user` au
$condition $condition
@@ -117,9 +128,12 @@ public class ActivitySignInQueryController {
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup(); SqlExpressionGroup group = new SqlExpressionGroup();
group.or("au.userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"); group.or("au.userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%");
group.or("au.unitName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"); group.or("au.phone", "LIKE", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(group); cnd.and(group);
} }
cnd.andEX("au.isStay","=",pageForm.getIsStay());
cnd.andEX("au.isGrant","=",pageForm.getIsGrant());
cnd.andEX("au.unitId","=",pageForm.getUnitId());
cnd.and("au.activityId", "=", pageForm.getActivityId()); cnd.and("au.activityId", "=", pageForm.getActivityId());
cnd.and("au.isSignIn", "=", 1); cnd.and("au.isSignIn", "=", 1);
cnd.desc("au.signInTime"); cnd.desc("au.signInTime");
@@ -132,7 +146,9 @@ public class ActivitySignInQueryController {
add(new ExcelExportEntity("身份证号码", "idCard", 20)); add(new ExcelExportEntity("身份证号码", "idCard", 20));
add(new ExcelExportEntity("联系方式", "mobile", 20)); add(new ExcelExportEntity("联系方式", "mobile", 20));
add(new ExcelExportEntity("参加单位名称", "unitName", 20)); add(new ExcelExportEntity("参加单位名称", "unitName", 20));
add(new ExcelExportEntity("签到时间", "signUpTime2", 20)); add(new ExcelExportEntity("签到时间", "signInTime", 20));
add(new ExcelExportEntity("是否住宿", "isStayDesc", 20));
add(new ExcelExportEntity("物资发放", "isGrantDesc", 20));
}}; }};
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
@@ -29,6 +29,7 @@ public class ActUserServiceImpl extends BaseServiceImpl<ActUser> implements ActU
/** /**
* 获取报名人员列表sql * 获取报名人员列表sql
*
* @param pageForm * @param pageForm
* @return * @return
*/ */
@@ -38,6 +39,10 @@ public class ActUserServiceImpl extends BaseServiceImpl<ActUser> implements ActU
SELECT SELECT
u.*, u.*,
DATE_FORMAT(signUpTime, '%Y-%m-%d %H:%i:%s') signUpTime2, DATE_FORMAT(signUpTime, '%Y-%m-%d %H:%i:%s') signUpTime2,
CASE u.isSignIn
WHEN 1 THEN '已签到'
WHEN 0 THEN '未签到'
END AS isSignInDesc,
act.`title` AS activityName act.`title` AS activityName
FROM FROM
act_user u act_user u
@@ -52,10 +57,8 @@ public class ActUserServiceImpl extends BaseServiceImpl<ActUser> implements ActU
seg.orLike("u.phone", pageForm.getSearchKeyword()); seg.orLike("u.phone", pageForm.getSearchKeyword());
cnd.and(seg); cnd.and(seg);
} }
// cnd.andEX("u.phone", "like", "%" + pageForm.getPhone() + "%"); cnd.andEX("u.isSignIn", "=", pageForm.getIsSignIn());
if (StrUtil.isNotBlank(pageForm.getUnitName())) { cnd.andEX("u.unitId", "=", pageForm.getUnitId());
cnd.and("u.unitName", "like", "%" + pageForm.getUnitName() + "%");
}
sql.setCondition(cnd); sql.setCondition(cnd);
return sql; return sql;
} }
@@ -23,5 +23,11 @@ public class ActSignInUserPageForm extends PageForm {
// 所属单位 // 所属单位
private String unitName; private String unitName;
// 发放状态
private Integer isGrant;
// 单位
private Integer unitId;
// 是否住宿
private Integer isStay;
} }
@@ -23,4 +23,8 @@ public class ActUserPageForm extends PageForm {
// 所属单位 // 所属单位
private String unitName; private String unitName;
// 所属单位
private String unitId;
// 是否签到
private Integer isSignIn;
} }
@@ -90,7 +90,7 @@ layout("/layouts/platform_1.html"){
<el-table-column label="操作" fixed="right" width="250"> <el-table-column label="操作" fixed="right" width="250">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="mini" @click="openView(scope.row)">查看</el-button> <el-button type="primary" size="mini" @click="openView(scope.row)">查看</el-button>
<el-button type="primary" size="mini" @click="openAdjustGroup(scope.row)">调整</el-button> <!-- <el-button type="primary" size="mini" @click="openAdjustGroup(scope.row)">调整</el-button>-->
<el-button type="danger" size="mini" @click="doRemove(scope.row)">删除</el-button> <el-button type="danger" size="mini" @click="doRemove(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -100,16 +100,20 @@ layout("/layouts/platform_1.html"){
<group-setting ref="groupSettingRef" @success="successGroup"></group-setting> <group-setting ref="groupSettingRef" @success="successGroup"></group-setting>
<un-group-user ref="unGroupUserRef" @success="successGroup"></un-group-user> <un-group-user ref="unGroupUserRef" @success="successGroup"></un-group-user>
<view-info ref="viewInfoRef"></view-info>
</div> </div>
<script> <script>
<!--#include('groupSetting.js'){}#--> <!--#include('groupSetting.js'){}#-->
<!--#include('unGroupUser.js'){}#--> <!--#include('unGroupUser.js'){}#-->
<!--#include('viewInfo.js'){}#-->
new Vue({ new Vue({
el: "#app", el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
components: { components: {
"group-setting": GROUP_SETTING, "group-setting": GROUP_SETTING,
"un-group-user": UN_GROUP_USER "un-group-user": UN_GROUP_USER,
"view-info": VIEW_INFO
}, },
data() { data() {
return { return {
@@ -122,11 +126,11 @@ layout("/layouts/platform_1.html"){
}, },
methods: { methods: {
openView(row){ openView(row){
this.$refs.viewInfoRef.onOpen(this.pageForm.activityId, row.id)
},
openAdjustGroup(row){
}, },
// openAdjustGroup(row){
//
// },
async doRemove(row) { async doRemove(row) {
this.$confirm('此操作将会删除与该小队相关的所有信息,确定要删除吗?', '提示', { this.$confirm('此操作将会删除与该小队相关的所有信息,确定要删除吗?', '提示', {
type: 'warning', type: 'warning',
@@ -0,0 +1,43 @@
const VIEW_INFO = {
template: /*language=HTML*/ `
<el-dialog title="查看小队人员" :visible.sync="viewUserDialog" width="60%">
<el-table show-overflow-tooltip :data="groupUserData" style="max-height: 600px;overflow-y: auto">
<el-table-column label="序号" type="index" header-align="center" align="center"
width="50"></el-table-column>
<el-table-column label="姓名" prop="userName"></el-table-column>
<el-table-column label="性别" prop="sex"></el-table-column>
<el-table-column label="身份" prop="isLeader">
<template #default="{row}">
<el-tag size="small" v-if="row.isLeader">{{ '队长' }}</el-tag>
<el-tag type="warning" size="small" v-else>{{ '运动员' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="联系方式" prop="phone"></el-table-column>
<el-table-column label="所属单位" prop="unitName"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="viewUserDialog = false">关 闭</el-button>
</div>
</el-dialog>
`,
data() {
return {
viewUserDialog: false,
groupUserData: [],
}
},
methods: {
async onOpen(activityId, groupId){
const resp = await $.post('/platform/activity/group/queryGroupUser', {
activityId,
groupId
})
if (resp.code === 0) {
this.groupUserData = resp.data
this.viewUserDialog = true
} else {
this.$message.error('查询失败')
}
}
}
}
@@ -46,14 +46,28 @@ layout("/layouts/platform_1.html"){
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">
<div class="search-item-label">姓名/单位</div> <div class="search-item-label">姓名/电话</div>
<div class="search-item-option"> <div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名/单位"></el-input> <el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名/电话"></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位</div>
<div class="search-item-option">
<el-select placeholder="请选择所属单位"
style="width: 100%;" clearable
filterable
@change="setModifyFormUnit"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</div> </div>
</div> </div>
<div class="search-query"> <div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button> <el-button type="primary" @click="doSearch">搜索</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
@@ -72,7 +86,7 @@ layout("/layouts/platform_1.html"){
<el-table-column label="性别" prop="sex"width="150"></el-table-column> <el-table-column label="性别" prop="sex"width="150"></el-table-column>
<el-table-column label="职务" prop="position"></el-table-column> <el-table-column label="职务" prop="position"></el-table-column>
<el-table-column label="身份证号码" prop="idCard"></el-table-column> <el-table-column label="身份证号码" prop="idCard"></el-table-column>
<el-table-column label="联系方式" prop="mobile"></el-table-column> <el-table-column label="联系方式" prop="phone"></el-table-column>
<el-table-column label="参加单位名称" prop="unitName"></el-table-column> <el-table-column label="参加单位名称" prop="unitName"></el-table-column>
<el-table-column label="参加项目" prop="itemName"></el-table-column> <el-table-column label="参加项目" prop="itemName"></el-table-column>
</el-table> </el-table>
@@ -92,7 +106,8 @@ layout("/layouts/platform_1.html"){
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
}, },
activityOptions: [], activityOptions: [],
activityItemOptions: [] activityItemOptions: [],
units: [],
} }
}, },
methods: { methods: {
@@ -126,9 +141,16 @@ layout("/layouts/platform_1.html"){
}) })
}, },
async getUnits(){
const resp = await $.post('/open/common/units')
if (resp.code === 0) {
this.units = resp.data
}
}
}, },
created() { created() {
this.getActivityOptions() this.getActivityOptions()
this.getUnits()
} }
}) })
</script> </script>
@@ -33,9 +33,39 @@ layout("/layouts/platform_1.html"){
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">
<div class="search-item-label">姓名/单位</div> <div class="search-item-label">发放状态</div>
<div class="search-item-option"> <div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名/单位"></el-input> <el-select v-model="pageForm.isGrant" placeholder="请选择发放状态" clearable>
<el-option label="已发放" :value="1"></el-option>
<el-option label="未发放" :value="0"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">住宿状态</div>
<div class="search-item-option">
<el-select v-model="pageForm.isStay" placeholder="请选择住宿状态" clearable>
<el-option label="住宿" :value="1"></el-option>
<el-option label="不住宿" :value="0"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">姓名/电话</div>
<div class="search-item-option">
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名/电话"></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位</div>
<div class="search-item-option">
<el-select placeholder="请选择所属单位"
style="width: 100%;" clearable
filterable
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</div> </div>
</div> </div>
@@ -47,7 +77,7 @@ layout("/layouts/platform_1.html"){
<el-card shadow="never" class="mt-3"> <el-card shadow="never" class="mt-3">
<el-row type="flex" class="mb-3" style="justify-content: flex-end"> <el-row type="flex" class="mb-3" style="justify-content: flex-end">
<el-button icon="el-icon-plus" type="primary" size="small" @click="doExport">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
</el-row> </el-row>
<el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData"> <el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
<el-table-column label="序号" prop="index" header-align="center" align="center" width="50"> <el-table-column label="序号" prop="index" header-align="center" align="center" width="50">
@@ -59,9 +89,14 @@ layout("/layouts/platform_1.html"){
<el-table-column label="性别" prop="sex"></el-table-column> <el-table-column label="性别" prop="sex"></el-table-column>
<el-table-column label="职务" prop="position"></el-table-column> <el-table-column label="职务" prop="position"></el-table-column>
<el-table-column label="身份证号码" prop="idCard"></el-table-column> <el-table-column label="身份证号码" prop="idCard"></el-table-column>
<el-table-column label="联系方式" prop="mobile"></el-table-column> <el-table-column label="联系方式" prop="phone"></el-table-column>
<el-table-column label="参加单位名称" prop="unitName"></el-table-column> <el-table-column label="参加单位名称" prop="unitName"></el-table-column>
<el-table-column label="签到时间" prop="signInTime"></el-table-column> <el-table-column label="签到时间" prop="signInTime"></el-table-column>
<el-table-column label="是否住宿" prop="isStay">
<template slot-scope="{row}">
{{row.isStay?'住宿':'不住宿'}}
</template>
</el-table-column>
<el-table-column label="物资发放" prop="isGrant"> <el-table-column label="物资发放" prop="isGrant">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.isGrant" type="success">已发放</el-tag> <el-tag v-if="scope.row.isGrant" type="success">已发放</el-tag>
@@ -70,7 +105,9 @@ layout("/layouts/platform_1.html"){
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="200"> <el-table-column label="操作" fixed="right" width="200">
<template #default="{row}"> <template #default="{row}">
<el-button v-if="!row.isGrant || row.isGrant === 0" type="primary" size="mini" @click="doGrant(row, true)">设为已发放物资</el-button> <el-button v-if="!row.isGrant || row.isGrant === 0" type="primary" size="mini"
@click="doGrant(row, true)">设为已发放物资
</el-button>
<el-button v-else type="danger" size="mini" @click="doGrant(row, false)">设为未发放物资</el-button> <el-button v-else type="danger" size="mini" @click="doGrant(row, false)">设为未发放物资</el-button>
</template> </template>
</el-table-column> </el-table-column>
@@ -90,7 +127,8 @@ layout("/layouts/platform_1.html"){
pageForm: { pageForm: {
year: new Date().getFullYear() + "" year: new Date().getFullYear() + ""
}, },
activityOptions: [] activityOptions: [],
units: [],
} }
}, },
methods: { methods: {
@@ -131,9 +169,16 @@ layout("/layouts/platform_1.html"){
}) })
}, },
async getUnits() {
const resp = await $.post('/open/common/units')
if (resp.code === 0) {
this.units = resp.data
}
}
}, },
created() { created() {
this.getActivityOptions() this.getActivityOptions()
this.getUnits()
} }
}) })
</script> </script>
@@ -39,20 +39,6 @@ layout("/layouts/platform_1.html"){
</div> </div>
</div> </div>
<div class="search-item">
<div class="search-item-label">所属单位</div>
<div class="search-item-option">
<el-select placeholder="请选择所属单位"
style="width: 100%;" clearable
@change="setModifyFormUnit"
v-model="modifyForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</div>
</div>
<div class="search-query"> <div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
</div> </div>
@@ -61,8 +47,13 @@ layout("/layouts/platform_1.html"){
<el-card shadow="never" class="mt-3"> <el-card shadow="never" class="mt-3">
<el-row type="flex" style="justify-content: flex-end" class="mb-3"> <el-row type="flex" style="justify-content: flex-end" class="mb-3">
<el-button icon="el-icon-plus" type="primary" size="small" @click="openAddUser">添加报名人员</el-button> <el-button type="primary" size="small" @click="openAddUser">添加报名人员</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" @click="doExport">导出</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<el-radio-group v-model="pageForm.isSignIn" type="primary" class="ml-3"@change="doSearch">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已签到</el-radio-button>
<el-radio-button :label="3">未签到</el-radio-button>
</el-radio-group>
</el-row> </el-row>
<el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData"> <el-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
<el-table-column label="序号" type="index" header-align="center" align="center" <el-table-column label="序号" type="index" header-align="center" align="center"
@@ -74,10 +65,15 @@ layout("/layouts/platform_1.html"){
<el-table-column label="职务" prop="position"></el-table-column> <el-table-column label="职务" prop="position"></el-table-column>
<el-table-column label="所属单位" prop="unitName"></el-table-column> <el-table-column label="所属单位" prop="unitName"></el-table-column>
<el-table-column label="报名时间" prop="signUpTime"></el-table-column> <el-table-column label="报名时间" prop="signUpTime"></el-table-column>
<el-table-column label="是否签到" prop="isSignIn">
<template slot-scope="{row}">
{{row.isSignIn?'已签到':'未签到'}}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="250"> <el-table-column label="操作" fixed="right" width="250">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="mini" @click="openModify(scope.row)">修改</el-button> <el-button type="text" @click="openModify">修改</el-button>
<el-button type="danger" size="mini" @click="doRemove(scope.row.id)">删除</el-button> <el-button type="text" class="text-danger" @click="onTableRowDelete(scope.row.id)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -90,14 +86,7 @@ layout("/layouts/platform_1.html"){
<el-input v-model="formData.activityName" readonly></el-input> <el-input v-model="formData.activityName" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label="参加单位" prop="unitName"> <el-form-item label="参加单位" prop="unitName">
<el-select placeholder="请选择所属单位" <el-input v-model="formData.unitName" placeholder="请输入参加单位"></el-input>
style="width: 100%;" clearable
@change="setFormDataUnit"
v-model="formData.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
<!-- <el-input v-model="formData.unitName" placeholder="请输入参加单位"></el-input>-->
</el-form-item> </el-form-item>
<el-form-item label="联系人" prop="contactName"> <el-form-item label="联系人" prop="contactName">
<el-input v-model="formData.contactName" placeholder="请输入联系人"></el-input> <el-input v-model="formData.contactName" placeholder="请输入联系人"></el-input>
@@ -196,14 +185,7 @@ layout("/layouts/platform_1.html"){
<el-input v-model="modifyForm.position"></el-input> <el-input v-model="modifyForm.position"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属单位" prop="unitName"> <el-form-item label="所属单位" prop="unitName">
<el-select placeholder="请选择所属单位" <el-input v-model="modifyForm.unitName"></el-input>
style="width: 100%;" clearable
@change="setModifyFormUnit"
v-model="modifyForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
<!-- <el-input v-model="modifyForm.unitName"></el-input>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@@ -221,6 +203,7 @@ layout("/layouts/platform_1.html"){
data() { data() {
return { return {
pageForm: { pageForm: {
isSignIn: 1,
year: new Date().getFullYear() + '', year: new Date().getFullYear() + '',
}, },
activityList: [], activityList: [],
@@ -293,40 +276,9 @@ layout("/layouts/platform_1.html"){
contactPhone: [{required: true, message: '请填写联系电话', trigger: ['blur', 'change']}], contactPhone: [{required: true, message: '请填写联系电话', trigger: ['blur', 'change']}],
userList: [{required: true, message: '请添加报名人员', trigger: ['blur', 'change']}] userList: [{required: true, message: '请添加报名人员', trigger: ['blur', 'change']}]
}, },
units: [],
} }
}, },
methods: { methods: {
setFormDataUnit(val) {
if (!val) {
this.formData.unitName = ''
return
}
this.formData.unitName = this.units.find(item => item.id === this.formData.unitId).name
},
setModifyFormUnit(val) {
if (!val) {
this.modifyForm.unitName = ''
return
}
this.modifyForm.unitName = this.units.find(item => item.id === this.modifyForm.unitId).name
},
doRemove(id) {
this.$confirm('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post('/platform/activity/user/doDeleteActUser', {id})
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
} else {
this.$message.warning('操作失败')
}
})
},
doExport() { doExport() {
window.open("/platform/activity/user/doExport?activityId=" + this.pageForm.activityId + "&searchKeyword=" + this.pageForm.searchKeyword) window.open("/platform/activity/user/doExport?activityId=" + this.pageForm.activityId + "&searchKeyword=" + this.pageForm.searchKeyword)
}, },
@@ -449,17 +401,10 @@ layout("/layouts/platform_1.html"){
this.$set(this.pageForm, 'activityId', '') this.$set(this.pageForm, 'activityId', '')
} }
this.pageData() this.pageData()
},
async getUnits(){
const resp = await $.post('/open/common/units')
if (resp.code === 0) {
this.units = resp.data
}
} }
}, },
created() { created() {
this.getActivityList() this.getActivityList()
this.getUnits()
} }
}) })
</script> </script>
+15 -1
View File
@@ -59,7 +59,8 @@
<div class="section-badge">{{ team.groupUsers.length }}</div> <div class="section-badge">{{ team.groupUsers.length }}</div>
</div> </div>
<div class="member-grid"> <div class="member-grid">
<div class="member-grid-item" v-for="member in team.groupUsers" :key="member.id" @click="openUserDetail(member)"> <div class="member-grid-item" v-for="member in team.groupUsers" :key="member.id"
@click="openUserDetail(member)">
<div class="member-name"> <div class="member-name">
{{ member.userName }} {{ member.userName }}
<t-tag theme="danger" size="small" v-if="member.isLeader">队长</t-tag> <t-tag theme="danger" size="small" v-if="member.isLeader">队长</t-tag>
@@ -151,6 +152,16 @@
<text class="picker-title">成员信息</text> <text class="picker-title">成员信息</text>
<t-icon name="close" @click="showUserDetailPicker = false"/> <t-icon name="close" @click="showUserDetailPicker = false"/>
</view> </view>
<view class="member-list">
<t-cell-group bordered>
<t-cell title="姓名" hover>{{ userInfo.userName }}</t-cell>
<t-cell title="性别" hover>{{userInfo.sex}}</t-cell>
<t-cell title="联系方式" hover>{{userInfo.phone}}</t-cell>
<t-cell title="职务" hover>{{userInfo.position}}</t-cell>
<t-cell title="所属单位" hover>{{userInfo.unitName}}</t-cell>
</t-cell-group>
</view>
</view> </view>
</t-popup> </t-popup>
</template> </template>
@@ -186,9 +197,11 @@ const leaderConfirmVisible = ref(false)
// 用户详情弹框 // 用户详情弹框
const showUserDetailPicker = ref(false) const showUserDetailPicker = ref(false)
const userInfo = ref({})
// 打开用户详情 // 打开用户详情
const openUserDetail = (val) => { const openUserDetail = (val) => {
showUserDetailPicker.value = true showUserDetailPicker.value = true
userInfo.value = val
console.log(val) console.log(val)
} }
@@ -272,6 +285,7 @@ onLoad(() => {
.content-area { .content-area {
padding: 0 16px 24px; padding: 0 16px 24px;
} }
/*用户弹框*/ /*用户弹框*/
.member-picker { .member-picker {
background-color: #fff; background-color: #fff;