提交
This commit is contained in:
@@ -104,14 +104,16 @@ public class MsgNotifyTitleController {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@RequiresAuthentication
|
@RequiresAuthentication
|
||||||
public Object doSend(String id, String[] sendTypes, String content) {
|
public Object doSend(String id, String[] sendTypes, String content) {
|
||||||
|
MsgNotify msgNotify = baseService.dao().fetch(MsgNotify.class, id);
|
||||||
List<NutMap> msgNotifyUser = msgNotifyService.getMsgNotifyUser(id);
|
List<NutMap> msgNotifyUser = msgNotifyService.getMsgNotifyUser(id);
|
||||||
List<String> userData = msgNotifyService.userData(msgNotifyUser);
|
List<String> userData = msgNotifyService.userData(msgNotifyUser);
|
||||||
msgNotifyService.sendMsg(Arrays.asList(sendTypes), userData, content);
|
msgNotifyService.sendMsg(Arrays.asList(sendTypes), userData, content);
|
||||||
msgNotifyUser.forEach(v -> {
|
if (!msgNotify.isHold()){
|
||||||
baseService.dao().update(MsgNotify.class, Chain.make("hold", true).add("sendTime", DateUtil.getDateTime()), Cnd.where("id", "=", v.getString("titleId")));
|
baseService.dao().update(MsgNotify.class,
|
||||||
|
Chain.make("hold", true)
|
||||||
});
|
.add("sendTime", DateUtil.getDateTime()),
|
||||||
|
Cnd.where("id", "=", id));
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+26
-16
@@ -1,6 +1,5 @@
|
|||||||
package io.v.nutz.trainSignUp.controller.statistics;
|
package io.v.nutz.trainSignUp.controller.statistics;
|
||||||
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|
||||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||||
@@ -8,13 +7,15 @@ import cn.afterturn.easypoi.excel.export.ExcelExportService;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.v.nutz.annontation.ViReturn;
|
import io.v.nutz.annontation.ViReturn;
|
||||||
import io.v.nutz.modules.models.PageForm;
|
import io.v.nutz.modules.models.PageForm;
|
||||||
import io.v.nutz.trainSignUp.models.*;
|
import io.v.nutz.msgNotify.service.MsgNotifyService;
|
||||||
|
import io.v.nutz.trainSignUp.models.TrainMobileSignColumn;
|
||||||
|
import io.v.nutz.trainSignUp.models.TrainSignUpActivity;
|
||||||
|
import io.v.nutz.trainSignUp.models.TrainSignUpCourse;
|
||||||
|
import io.v.nutz.trainSignUp.models.TrainSignUpType;
|
||||||
import io.v.nutz.trainSignUp.service.TrainSignUpActivityService;
|
import io.v.nutz.trainSignUp.service.TrainSignUpActivityService;
|
||||||
import io.v.nutz.trainSignUp.service.TrainSignUpActivityStatisticsService;
|
import io.v.nutz.trainSignUp.service.TrainSignUpActivityStatisticsService;
|
||||||
import io.v.nutz.web.commons.utils.FileUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.util.IOUtils;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -24,20 +25,15 @@ import org.nutz.dao.sql.Sql;
|
|||||||
import org.nutz.ioc.loader.annotation.Inject;
|
import org.nutz.ioc.loader.annotation.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.json.Json;
|
import org.nutz.json.Json;
|
||||||
import org.nutz.lang.random.R;
|
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
import org.nutz.mvc.annotation.Param;
|
import org.nutz.mvc.annotation.Param;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.util.ArrayList;
|
||||||
import java.io.FileInputStream;
|
import java.util.List;
|
||||||
import java.io.FileOutputStream;
|
import java.util.Map;
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@@ -60,6 +56,9 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
@Inject
|
@Inject
|
||||||
private Dao dao;
|
private Dao dao;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private MsgNotifyService msgNotifyService;
|
||||||
|
|
||||||
@At("")
|
@At("")
|
||||||
@RequiresPermissions("trainSingUp.statistics.activity")
|
@RequiresPermissions("trainSingUp.statistics.activity")
|
||||||
@Ok("beetl:/platform/trainSingUp/statistics/activity.html")
|
@Ok("beetl:/platform/trainSingUp/statistics/activity.html")
|
||||||
@@ -170,7 +169,7 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
currentEntities.addAll(excelCommonExportEntity);
|
currentEntities.addAll(excelCommonExportEntity);
|
||||||
//将课程类型配置的移动端动态字段添加到excel列中
|
//将课程类型配置的移动端动态字段添加到excel列中
|
||||||
List<TrainMobileSignColumn> trainMobileSignColumnList = trainSignUpType.getTrainMobileSignColumnList();
|
List<TrainMobileSignColumn> trainMobileSignColumnList = trainSignUpType.getTrainMobileSignColumnList();
|
||||||
if(trainMobileSignColumnList != null && trainMobileSignColumnList.size() > 0) {
|
if (trainMobileSignColumnList != null && trainMobileSignColumnList.size() > 0) {
|
||||||
trainMobileSignColumnList.forEach(item -> {
|
trainMobileSignColumnList.forEach(item -> {
|
||||||
currentEntities.add(new ExcelExportEntity(item.getColumnName(), item.getColumnCode(), 20));
|
currentEntities.add(new ExcelExportEntity(item.getColumnName(), item.getColumnCode(), 20));
|
||||||
});
|
});
|
||||||
@@ -178,10 +177,10 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
|
|
||||||
for (NutMap userSignData : v) {
|
for (NutMap userSignData : v) {
|
||||||
String mobileColumnsValueStr = userSignData.getString("mobileColumnsValue");
|
String mobileColumnsValueStr = userSignData.getString("mobileColumnsValue");
|
||||||
if(StrUtil.isNotBlank(mobileColumnsValueStr)){
|
if (StrUtil.isNotBlank(mobileColumnsValueStr)) {
|
||||||
List<NutMap> mobileColumnsValue = Json.fromJsonAsList(NutMap.class,mobileColumnsValueStr);
|
List<NutMap> mobileColumnsValue = Json.fromJsonAsList(NutMap.class, mobileColumnsValueStr);
|
||||||
for (NutMap cv : mobileColumnsValue) {
|
for (NutMap cv : mobileColumnsValue) {
|
||||||
if(cv.getString("columnFormType") != null && !cv.getString("columnFormType").equals("FILE")){
|
if (cv.getString("columnFormType") != null && !cv.getString("columnFormType").equals("FILE")) {
|
||||||
userSignData.addv(cv.getString("columnCode"), cv.getString("columnValue"));
|
userSignData.addv(cv.getString("columnCode"), cv.getString("columnValue"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,4 +197,15 @@ public class TrainSignUpActivityStatisticsController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@At
|
||||||
|
@ViReturn
|
||||||
|
@Ok("json:full")
|
||||||
|
public Object sendMessage(String courseId, String messageText) {
|
||||||
|
List<NutMap> userList = trainSignUpActivityStatisticsService.registerUserList(courseId);
|
||||||
|
List<String> loginnames = userList.stream().map(u -> u.getString("loginname")).collect(Collectors.toList());
|
||||||
|
msgNotifyService.sendMsg(List.of("msg"), loginnames, messageText);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
|
|
||||||
<div id="app" class="platform" v-cloak>
|
<div class="platform" id="app" v-cloak>
|
||||||
<guava ref="guava" padding="0 5%">
|
<guava padding="0 5%" ref="guava">
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<div class="btn-group tool-button mr10">
|
<div class="btn-group tool-button mr10">
|
||||||
@@ -17,65 +17,71 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button mr10">
|
<div class="btn-group tool-button mr10">
|
||||||
<el-input placeholder="请输入活动名称" clearable v-model="pageForm.title"
|
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入活动名称"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@keyup.enter.native="doSearch">
|
v-model="pageForm.title">
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="btn-group tool-button mt5 mr10">
|
<div class="btn-group tool-button mt5 mr10">
|
||||||
<el-checkbox-group v-model="pageForm.sendTypes" @change="doSearch">
|
<el-checkbox-group @change="doSearch" v-model="pageForm.sendTypes">
|
||||||
<el-checkbox-button label="msg" border>短信发送</el-checkbox-button>
|
<el-checkbox-button border label="msg">短信发送</el-checkbox-button>
|
||||||
<el-checkbox-button label="WeChat" border>微信发送</el-checkbox-button>
|
<el-checkbox-button border label="WeChat">微信发送</el-checkbox-button>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group tool-button ">
|
<div class="btn-group tool-button ">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool label="消息列表" :app="this">
|
<table-tool :app="this" label="消息列表">
|
||||||
<template #func>
|
<template #func>
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
|
|
||||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
class="vi-table"
|
||||||
|
row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||||
|
label="序号" type="index"
|
||||||
width="80px"></el-table-column>
|
width="80px"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
show-overflow-tooltip
|
|
||||||
align="center"
|
|
||||||
header-align="center"
|
|
||||||
v-for="column in tableColumns"
|
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:prop="column.prop"
|
:prop="column.prop"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
|
align="center"
|
||||||
|
header-align="center"
|
||||||
min-width="50"
|
min-width="50"
|
||||||
|
show-overflow-tooltip
|
||||||
|
v-for="column in tableColumns"
|
||||||
>
|
>
|
||||||
<template v-if="column.prop==='module'" scope="{row}">
|
<template scope="{row}" v-if="column.prop==='module'">
|
||||||
{{row.module=='hy'?'会员模块':'教代会模块'}}
|
{{row.module=='hy'?'会员模块':'教代会模块'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.prop==='teacherMeetingName'" scope="{row}">
|
<template scope="{row}" v-else-if="column.prop==='teacherMeetingName'">
|
||||||
{{!row.teacherMeetingId?'暂无':row.jdhallname}}
|
{{!row.teacherMeetingId?'暂无':row.jdhallname}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.prop==='type'" scope="{row}">
|
<template scope="{row}" v-else-if="column.prop==='type'">
|
||||||
{{row.type=='system'?'预设团体':row.type=='user'?'自定义人员':'活动设置人员'}}
|
{{row.type=='system'?'预设团体':row.type=='user'?'自定义人员':'活动设置人员'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.prop==='hold'" scope="{row}">
|
<template scope="{row}" v-else-if="column.prop==='hold'">
|
||||||
{{row.hold?'已发送':'未发送'}}
|
{{row.hold?'已发送':'未发送'}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" header-align="center" label="操作" fixed="right">
|
<el-table-column align="center" fixed="right" header-align="center" label="操作">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button @click="doSend(row)" size="mini" type="success" v-if="!row.hold">发送</el-button>
|
<el-button @click="doSend(row)" size="mini" type="success">发送
|
||||||
<el-button @click="openView(row)" size="mini" v-if="row.hold">查看</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="primary" @click="openEdit(row)" v-if="!row.hold">编辑</el-button>
|
<el-button @click="openView(row)" size="mini" v-if="row.hold">查看
|
||||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
</el-button>
|
||||||
|
<el-button @click="openEdit(row)" size="mini" type="primary">编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除
|
||||||
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ layout("/layouts/platform.html"){
|
|||||||
:clearable="false"
|
:clearable="false"
|
||||||
@change="yearChange"
|
@change="yearChange"
|
||||||
placeholder="选择年度"
|
placeholder="选择年度"
|
||||||
type="year" style="width: 100%"
|
style="width: 100%" type="year"
|
||||||
v-model="pageForm.year"
|
v-model="pageForm.year"
|
||||||
value-format="yyyy">
|
value-format="yyyy">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@@ -31,7 +31,8 @@ layout("/layouts/platform.html"){
|
|||||||
<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-select @change="activityChange" style="width: 100%" v-model="pageForm.activityId">
|
<el-select @change="activityChange" style="width: 100%"
|
||||||
|
v-model="pageForm.activityId">
|
||||||
<el-option :label="item.activityName"
|
<el-option :label="item.activityName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
v-for="item in activityList"
|
v-for="item in activityList"
|
||||||
@@ -47,26 +48,37 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool :app="this" :label="trainType">
|
<table-tool :app="this" :label="trainType">
|
||||||
<template #func>
|
<template #func>
|
||||||
<el-button type="primary" size="small" @click="exportSignUser" :disabled="!pageForm.activityId">
|
<el-button :disabled="!pageForm.activityId" @click="exportSignUser" size="small"
|
||||||
|
type="primary">
|
||||||
导出报名人员
|
导出报名人员
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</table-tool>
|
</table-tool>
|
||||||
<el-table :data="tableData" :size="tableSize">
|
<el-table :data="tableData" :size="tableSize">
|
||||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||||
|
label="序号" type="index"
|
||||||
width="80px"></el-table-column>
|
width="80px"></el-table-column>
|
||||||
<el-table-column :label="trainType" prop="courseName" align="center" header-align="center"
|
<el-table-column :label="trainType" align="center" header-align="center"
|
||||||
|
prop="courseName"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="类型" prop="courseType" sortable align="center" header-align="center"
|
<el-table-column align="center" header-align="center" label="类型" prop="courseType"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip
|
||||||
<el-table-column :label="trainType + '地点'" prop="courseLocation" sortable align="center"
|
sortable></el-table-column>
|
||||||
header-align="center" show-overflow-tooltip></el-table-column>
|
<el-table-column :label="trainType + '地点'" align="center" header-align="center"
|
||||||
<el-table-column label="负责人" prop="courseInstructor" sortable align="center" header-align="center"
|
prop="courseLocation"
|
||||||
show-overflow-tooltip></el-table-column>
|
show-overflow-tooltip sortable></el-table-column>
|
||||||
<el-table-column label="最多报名人数" prop="coursePeopleNumber" sortable align="center" header-align="center"
|
<el-table-column align="center" header-align="center" label="负责人"
|
||||||
show-overflow-tooltip></el-table-column>
|
prop="courseInstructor"
|
||||||
<el-table-column label="已报名人数" prop="registerNum" sortable align="center" header-align="center"
|
show-overflow-tooltip
|
||||||
show-overflow-tooltip>
|
sortable></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" label="最多报名人数"
|
||||||
|
prop="coursePeopleNumber"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable></el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" label="已报名人数"
|
||||||
|
prop="registerNum"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable>
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-link @click="openView(row.id)" type="primary">
|
<el-link @click="openView(row.id)" type="primary">
|
||||||
{{row.registerNum + row.courseReservedNumber}}
|
{{row.registerNum + row.courseReservedNumber}}
|
||||||
@@ -75,7 +87,8 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150px">
|
<el-table-column label="操作" width="150px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
<el-button @click="openView(row.id)" size="mini" type="primary">查看
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -86,6 +99,23 @@ layout("/layouts/platform.html"){
|
|||||||
<!--#include("/platform/trainSingUp/statistics/include_view.html"){}#-->
|
<!--#include("/platform/trainSingUp/statistics/include_view.html"){}#-->
|
||||||
</template>
|
</template>
|
||||||
</guava>
|
</guava>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="messageDialogVisible"
|
||||||
|
title="发送消息"
|
||||||
|
width="30%">
|
||||||
|
<el-input
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
type="textarea"
|
||||||
|
v-model="messageForm.messageText">
|
||||||
|
</el-input>
|
||||||
|
|
||||||
|
<span class="dialog-footer" slot="footer">
|
||||||
|
<el-button @click="messageDialogVisible = false">关 闭</el-button>
|
||||||
|
<el-button @click="doMessage" type="primary">发 送</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -119,9 +149,37 @@ layout("/layouts/platform.html"){
|
|||||||
userSignInfo: {},
|
userSignInfo: {},
|
||||||
trainType: '培训班',
|
trainType: '培训班',
|
||||||
trainTypeList: [],
|
trainTypeList: [],
|
||||||
|
messageForm: {messageText: ""},
|
||||||
|
messageDialogVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async doMessage() {
|
||||||
|
if (!this.messageForm.messageText) {
|
||||||
|
this.$message.error("请输入内容")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const confirm = await this.$confirm('确定要发送消息吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
if (confirm === "confirm") {
|
||||||
|
const resp = await $.post(loc() + '/sendMessage', {
|
||||||
|
courseId: this.messageForm.courseId,
|
||||||
|
messageText: this.messageForm.messageText
|
||||||
|
})
|
||||||
|
if (resp.code === 0) {
|
||||||
|
this.$message.success(resp.msg)
|
||||||
|
this.messageDialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
openMessage() {
|
||||||
|
this.messageForm.messageText = ""
|
||||||
|
this.messageDialogVisible = true
|
||||||
|
},
|
||||||
activityChange(val) {
|
activityChange(val) {
|
||||||
const activity = this.activityList.find(o => o.id === val)
|
const activity = this.activityList.find(o => o.id === val)
|
||||||
const type = this.trainTypeList.find(o => o.code === activity.trainType)
|
const type = this.trainTypeList.find(o => o.code === activity.trainType)
|
||||||
@@ -148,6 +206,7 @@ layout("/layouts/platform.html"){
|
|||||||
await this.getActivityList()
|
await this.getActivityList()
|
||||||
},
|
},
|
||||||
async openView(courseId) {
|
async openView(courseId) {
|
||||||
|
this.messageForm.courseId = courseId
|
||||||
this.$refs.guava.view()
|
this.$refs.guava.view()
|
||||||
const resp_register = await $.get(loc() + '/registerUserList', {courseId})
|
const resp_register = await $.get(loc() + '/registerUserList', {courseId})
|
||||||
this.registerUserTableData = resp_register.data
|
this.registerUserTableData = resp_register.data
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<el-tabs>
|
<el-tabs>
|
||||||
<el-tab-pane label="报名人员">
|
<el-tab-pane label="报名人员">
|
||||||
|
<div style="display: flex;justify-content: flex-end">
|
||||||
|
<el-button type="primary" @click="openMessage" size="small">给报名人发送消息</el-button>
|
||||||
|
</div>
|
||||||
<el-table :data="registerUserTableData" :size="tableSize">
|
<el-table :data="registerUserTableData" :size="tableSize">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
|
|||||||
Reference in New Issue
Block a user