Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/hmc_gbhd
# Conflicts: # backend/src/main/resources/views/platform/activity/user/index.html
This commit is contained in:
+22
@@ -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
|
||||
@SaCheckPermission("activity.group")
|
||||
@SLog(tag = "活动分组", msg = "随机分组")
|
||||
|
||||
+1
-1
@@ -215,7 +215,7 @@ public class ActUserController {
|
||||
Sql sql = actUserService.getSignUpSql(pageForm);
|
||||
List<NutMap> nutMaps = actUserService.listMap(sql);
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>() {{
|
||||
add(new ExcelExportEntity("报名号", "actUserNo", 20));
|
||||
// add(new ExcelExportEntity("报名号", "actUserNo", 20));
|
||||
add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
add(new ExcelExportEntity("性别", "sex", 20));
|
||||
add(new ExcelExportEntity("身份证号码", "idCard", 20));
|
||||
|
||||
@@ -90,7 +90,7 @@ layout("/layouts/platform_1.html"){
|
||||
<el-table-column label="操作" fixed="right" width="250">
|
||||
<template #default="scope">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -100,16 +100,20 @@ layout("/layouts/platform_1.html"){
|
||||
<group-setting ref="groupSettingRef" @success="successGroup"></group-setting>
|
||||
|
||||
<un-group-user ref="unGroupUserRef" @success="successGroup"></un-group-user>
|
||||
|
||||
<view-info ref="viewInfoRef"></view-info>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('groupSetting.js'){}#-->
|
||||
<!--#include('unGroupUser.js'){}#-->
|
||||
<!--#include('viewInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"group-setting": GROUP_SETTING,
|
||||
"un-group-user": UN_GROUP_USER
|
||||
"un-group-user": UN_GROUP_USER,
|
||||
"view-info": VIEW_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -122,11 +126,11 @@ layout("/layouts/platform_1.html"){
|
||||
},
|
||||
methods: {
|
||||
openView(row){
|
||||
|
||||
},
|
||||
openAdjustGroup(row){
|
||||
|
||||
this.$refs.viewInfoRef.onOpen(this.pageForm.activityId, row.id)
|
||||
},
|
||||
// openAdjustGroup(row){
|
||||
//
|
||||
// },
|
||||
async doRemove(row) {
|
||||
this.$confirm('此操作将会删除与该小队相关的所有信息,确定要删除吗?', '提示', {
|
||||
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('查询失败')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,30 +38,6 @@ layout("/layouts/platform_1.html"){
|
||||
clearable @keyup.enter.native="doSearch"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">签到状态</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.isSignIn" 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 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 class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
@@ -71,8 +47,13 @@ layout("/layouts/platform_1.html"){
|
||||
|
||||
<el-card shadow="never" class="mt-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 icon="el-icon-plus" type="primary" size="small" @click="doExport">导出</el-button>
|
||||
<el-button type="primary" size="small" @click="openAddUser">添加报名人员</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-table v-loading="tableLoading" show-overflow-tooltip :data="tableData">
|
||||
<el-table-column label="序号" type="index" header-align="center" align="center"
|
||||
@@ -91,8 +72,8 @@ layout("/layouts/platform_1.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="mini" @click="openModify(scope.row)">修改</el-button>
|
||||
<el-button type="danger" size="mini" @click="doRemove(scope.row.id)">删除</el-button>
|
||||
<el-button type="text" @click="openModify">修改</el-button>
|
||||
<el-button type="text" class="text-danger" @click="onTableRowDelete(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -105,14 +86,7 @@ layout("/layouts/platform_1.html"){
|
||||
<el-input v-model="formData.activityName" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参加单位" prop="unitName">
|
||||
<el-select placeholder="请选择所属单位"
|
||||
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-input v-model="formData.unitName" placeholder="请输入参加单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input v-model="formData.contactName" placeholder="请输入联系人"></el-input>
|
||||
@@ -130,8 +104,8 @@ layout("/layouts/platform_1.html"){
|
||||
placeholder="请输入内容"
|
||||
@select="handleSelect($event, row)"
|
||||
></el-autocomplete>
|
||||
<!-- <el-input v-model="row.userName" maxlength="50"-->
|
||||
<!-- placeholder="请输入姓名"></el-input>-->
|
||||
<!-- <el-input v-model="row.userName" maxlength="50"-->
|
||||
<!-- placeholder="请输入姓名"></el-input>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" prop="sex" width="200">
|
||||
@@ -211,14 +185,7 @@ layout("/layouts/platform_1.html"){
|
||||
<el-input v-model="modifyForm.position"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属单位" prop="unitName">
|
||||
<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>
|
||||
<!-- <el-input v-model="modifyForm.unitName"></el-input>-->
|
||||
<el-input v-model="modifyForm.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -236,6 +203,7 @@ layout("/layouts/platform_1.html"){
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
isSignIn: 1,
|
||||
year: new Date().getFullYear() + '',
|
||||
},
|
||||
activityList: [],
|
||||
@@ -308,40 +276,9 @@ layout("/layouts/platform_1.html"){
|
||||
contactPhone: [{required: true, message: '请填写联系电话', trigger: ['blur', 'change']}],
|
||||
userList: [{required: true, message: '请添加报名人员', trigger: ['blur', 'change']}]
|
||||
},
|
||||
|
||||
units: [],
|
||||
}
|
||||
},
|
||||
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() {
|
||||
window.open("/platform/activity/user/doExport?activityId=" + this.pageForm.activityId + "&searchKeyword=" + this.pageForm.searchKeyword)
|
||||
},
|
||||
@@ -464,17 +401,10 @@ layout("/layouts/platform_1.html"){
|
||||
this.$set(this.pageForm, 'activityId', '')
|
||||
}
|
||||
this.pageData()
|
||||
},
|
||||
async getUnits(){
|
||||
const resp = await $.post('/open/common/units')
|
||||
if (resp.code === 0) {
|
||||
this.units = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getActivityList()
|
||||
this.getUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user