This commit is contained in:
@jyuhsin
2025-03-14 19:40:08 +08:00
parent a3d02c0f99
commit 48df9221b8
5 changed files with 172 additions and 15 deletions
@@ -137,8 +137,9 @@ public class TrainSignUpUserAdjustController {
@Param(value = "unionId", required = false) String unionId, @Param(value = "unionId", required = false) String unionId,
@Param(value = "unitId", required = false) String unitId, @Param(value = "unitId", required = false) String unitId,
@Param(value = "searchName", required = false) String searchName, @Param(value = "searchName", required = false) String searchName,
@Param(value = "sex", required = false) String sex,
@Param(value = "searchKeyword", required = false) String searchKeyword) { @Param(value = "searchKeyword", required = false) String searchKeyword) {
return trainSignUpActivityStatisticsService.registerUserList(courseId, unionId, unitId, searchName, searchKeyword); return trainSignUpActivityStatisticsService.registerUserList(courseId, unionId, unitId, searchName, searchKeyword, sex);
} }
@At @At
@@ -39,7 +39,7 @@ public interface TrainSignUpActivityStatisticsService extends ViService<TrainSig
* @param courseId * @param courseId
* @return * @return
*/ */
List<NutMap> registerUserList(String courseId, String unionId, String unitId, String searchName, String searchKeyword); List<NutMap> registerUserList(String courseId, String unionId, String unitId, String searchName, String searchKeyword, String sex);
/** /**
* 获取每个课程的签到情况 * 获取每个课程的签到情况
@@ -8,6 +8,7 @@ import io.v.nutz.base.utils.Vi;
import io.v.nutz.zhgh.trainSignUp.models.TrainSignUpUser; import io.v.nutz.zhgh.trainSignUp.models.TrainSignUpUser;
import io.v.nutz.zhgh.trainSignUp.service.TrainSignUpActivityStatisticsService; import io.v.nutz.zhgh.trainSignUp.service.TrainSignUpActivityStatisticsService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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;
import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.Sql;
@@ -84,7 +85,7 @@ public class TrainSignUpActivityStatisticsServiceImpl extends ViServiceImpl<Trai
} }
@Override @Override
public List<NutMap> registerUserList(String courseId, String unionId, String unitId, String searchName, String searchKeyword) { public List<NutMap> registerUserList(String courseId, String unionId, String unitId, String searchName, String searchKeyword, String sex) {
Sql sql = Sqls.create(""" Sql sql = Sqls.create("""
SELECT SELECT
tsuu.id, tsuu.id,
@@ -103,10 +104,11 @@ public class TrainSignUpActivityStatisticsServiceImpl extends ViServiceImpl<Trai
$condition $condition
ORDER BY FIELD( tsuu.state, 1, 3, 2, 4 ),u.unionid desc, u.unitid desc ORDER BY FIELD( tsuu.state, 1, 3, 2, 4 ),u.unionid desc, u.unitid desc
"""); """);
CndPlus cnd = new CndPlus(); Cnd cnd = Cnd.NEW();
cnd.andEx("tsuu.courseId", "=", courseId); cnd.andEX("tsuu.courseId", "=", courseId);
cnd.andEx("u.unionid", "=", unionId); cnd.andEX("u.unionid", "=", unionId);
cnd.andEx("u.unitid", "=", unitId); cnd.andEX("u.unitid", "=", unitId);
cnd.andEX("u.sex", "=", sex);
if (Vi.isNotBlank(searchName, searchKeyword)) { if (Vi.isNotBlank(searchName, searchKeyword)) {
cnd.where().andLike(searchName, searchKeyword); cnd.where().andLike(searchName, searchKeyword);
} }
@@ -156,12 +156,36 @@ layout("/mobile/platform.html"){
.remark-content{ .remark-content{
width: 100%; width: 100%;
max-width: 100%; max-width: 100%;
height: calc(100vh - 46px - 44px);
overflow-y: auto;
} }
.remark-content *{ .remark-content *{
max-width: 100%!important; max-width: 100%!important;
} }
.table-class{
width: 100%;
margin-top: 10px;
border-radius: 5px;
overflow: hidden;
line-height: 1.5rem;
font-size: 13px;
table-layout: fixed;
border-collapse: collapse;
th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
}
tr {
text-align: center;
border-bottom: 1px solid #dddddd;
}
td {
border: 1px solid #dddddd;
}
}
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-sticky> <van-sticky>
@@ -368,11 +392,47 @@ layout("/mobile/platform.html"){
</div> </div>
</van-popup> </van-popup>
<!--<van-action-sheet v-model="remarkShow" title="详情" >
<van-action-sheet v-model="remarkShow" title="详情" >
<div class="remark-content" v-html="courseRemark" @click="remarkClick"></div> <div class="remark-content" v-html="courseRemark" @click="remarkClick"></div>
</van-action-sheet> </van-action-sheet>-->
<van-popup class="joinPopup" position="right" v-model:show="remarkShow">
<van-nav-bar @click-left="remarkShow = false" fixed left-arrow placeholder :title="clickCourseRemark.courseName"></van-nav-bar>
<van-tabs v-model="remarkActive" @change="remarkActiveClick">
<van-tab title="详细信息">
<div class="remark-content" v-html="courseRemark" @click="remarkClick"></div>
</van-tab>
<van-tab title="报名人员">
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="registerForm.unionId" @change="getSignUsers" :options="unionList"></van-dropdown-item>
<van-dropdown-item v-model="registerForm.sex" @change="getSignUsers" :options="sexList"></van-dropdown-item>
</van-dropdown-menu>
<van-search v-model="registerForm.searchKeyword" placeholder="请输入姓名查询" @search="getSignUsers"></van-search>
<table class="table-class" v-if="signUsers && signUsers.length > 0">
<thead>
<tr>
<th>姓名</th>
<th>性别</th>
<th>所属工会</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in signUsers" :key="index">
<td>{{ item.username }}</td>
<td>{{ item.sex }}</td>
<td>{{ item.unionname }}</td>
</tr>
</tbody>
</table>
<van-empty
v-else
class="custom-image"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
description="暂无报名人员"
></van-empty>
</van-tab>
</van-tabs>
</van-popup>
<div> <div>
<van-tabbar v-model="tarBarActive"> <van-tabbar v-model="tarBarActive">
@@ -392,6 +452,19 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins], mixins: [mobileMixins],
data() { data() {
return { return {
registerForm: {
searchKeyword: '',
searchName: 'u.username',
unionId: '',
sex: null
},
unionList: [],
sexList: [
{text: '全部性别', value: null},
{text: '男', value: '男'},
{text: '女', value: '女'}
],
remarkActive: 0,
tarBarActive: 0, tarBarActive: 0,
assort: '', assort: '',
assortList: [], assortList: [],
@@ -422,12 +495,26 @@ layout("/mobile/platform.html"){
remarkShow: false, remarkShow: false,
courseRemark: '', courseRemark: '',
clickCourseRemark: {},
signUsers: [],
} }
}, },
components: { components: {
'train-dynamic-form': httpVueLoader('/components/mobile/common/TrainDynamicForm.vue') 'train-dynamic-form': httpVueLoader('/components/mobile/common/TrainDynamicForm.vue')
}, },
methods: { methods: {
async remarkActiveClick(name, title) {
if (name === 1) {
//获取报名人员
await this.getSignUsers()
}
},
async getSignUsers() {
this.registerForm.courseId = this.clickCourseRemark.id
const {data} = await $.get('/platform/trainSingUp/manage/userAdjust/registerUserList', this.registerForm)
this.signUsers = data
},
tabClick(name, title) { tabClick(name, title) {
if(this.courseType === '0' && this.activityStatus !== '1') { if(this.courseType === '0' && this.activityStatus !== '1') {
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title) this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title)
@@ -757,6 +844,7 @@ layout("/mobile/platform.html"){
}, },
showRemark(o){ showRemark(o){
this.remarkShow = true this.remarkShow = true
this.clickCourseRemark = o
this.courseRemark = o.remarks this.courseRemark = o.remarks
}, },
remarkClick(event){ remarkClick(event){
@@ -905,9 +993,19 @@ layout("/mobile/platform.html"){
if (resp.code === 0) { if (resp.code === 0) {
this.activity = resp.data this.activity = resp.data
} }
} },
async getUnionList(){
const {data} = await $.get("/platform/vi/common/unions")
data.forEach(v => {
v.text = v.unionname
v.value = v.id
})
data.unshift({text: "全部工会", value: ''})
this.unionList = data
},
}, },
async created() { async created() {
this.getUnionList()
this.trainTypeList = await getDictOptions("trainSignUpType") this.trainTypeList = await getDictOptions("trainSignUpType")
this.activityId = GetQueryString('activityId') this.activityId = GetQueryString('activityId')
this.type = GetQueryString('type') this.type = GetQueryString('type')
@@ -454,8 +454,41 @@ layout("/layouts/platform.html"){
</el-row> </el-row>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="remarkShow" title="详细信息" width="50%" append-to-body> <el-dialog :visible.sync="remarkShow" :title="courseRemark.courseName" width="50%" append-to-body top="2%">
<div class="text-center" v-html="courseRemark"></div> <el-tabs v-model="remarkActive" type="border-card" @tab-click="remarkActiveClick">
<el-tab-pane label="详细信息" name="first">
<div class="text-center" v-html="courseRemark.remarks" style="height: 600px; overflow-y: auto"></div>
</el-tab-pane>
<el-tab-pane label="报名人员" name="second">
<div class="btn-group tool-button mt5">
<el-input v-model="registerForm.searchKeyword" placeholder="请输入姓名查询" size="small"></el-input>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="registerForm.unionId" clearable filterable placeholder="请选择院级工会" size="small">
<el-option
v-for="item in unionList"
:key="item.id"
:label="item.unionname"
:value="item.id">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="registerForm.sex" clearable filterable placeholder="请选择性别" size="small">
<el-option label="男" value="男"></el-option>
<el-option label="女" value="女"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="getSignUsers" size="small"></el-button>
</div>
<el-table :data="signUsers" max-height="500" size="small">
<el-table-column prop="username" label="姓名" header-align="center" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" header-align="center" align="center"></el-table-column>
<el-table-column prop="unionname" label="所属工会" header-align="center" align="center"></el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-row type="flex" justify="end" style="margin-top: 20px"> <el-row type="flex" justify="end" style="margin-top: 20px">
<el-button type="primary" @click="remarkShow = false">关 闭</el-button> <el-button type="primary" @click="remarkShow = false">关 闭</el-button>
</el-row> </el-row>
@@ -470,6 +503,8 @@ layout("/layouts/platform.html"){
data() { data() {
const self = this const self = this
return { return {
remarkActive: 'first',
signUsers: [],
trainSignUpActivity: {}, trainSignUpActivity: {},
pageForm: { pageForm: {
year: moment().format('YYYY'), year: moment().format('YYYY'),
@@ -500,16 +535,36 @@ layout("/layouts/platform.html"){
applyDialog: false, applyDialog: false,
remarkShow: false, remarkShow: false,
courseRemark: '', courseRemark: {},
registerForm: {
searchKeyword: '',
searchName: 'u.username',
unionId: '',
},
unionList: [],
} }
}, },
methods: { methods: {
async remarkActiveClick(tab) {
if (tab.name === 'second') {
//获取报名人员
await this.getSignUsers()
}
},
async getSignUsers() {
this.registerForm.courseId = this.courseRemark.id
const {data} = await $.get('/platform/trainSingUp/manage/userAdjust/registerUserList', this.registerForm)
this.signUsers = data
},
openViewRemark(row){ openViewRemark(row){
this.remarkActive = 'first'
this.signUsers = []
if (!row.remarks) { if (!row.remarks) {
this.$message.warning('暂无详细信息') this.$message.warning('暂无详细信息')
return return
} }
this.courseRemark = row.remarks this.courseRemark = row
this.remarkShow = true this.remarkShow = true
}, },
async doCancel(row){ async doCancel(row){
@@ -716,6 +771,7 @@ layout("/layouts/platform.html"){
}, },
}, },
async created() { async created() {
this.unionList = await getUnion()
await this.activityData(); await this.activityData();
await this.getCourseTypeList(); await this.getCourseTypeList();
} }