server_commit

This commit is contained in:
zhaoxinyu
2024-09-18 15:05:17 +08:00
parent 541ee6193a
commit ca104cd831
12 changed files with 251 additions and 89 deletions
+19 -20
View File
@@ -87,8 +87,8 @@ public class MsgApi {
log.info(Json.toJson(bodyMap)); log.info(Json.toJson(bodyMap));
String url = DOMAIN + SEND_URL + "?appid=%s&tokenid=%s&schoolcode=%s".formatted(APP_ID, getMsgToken(), SCHOOL_CODE); String url = DOMAIN + SEND_URL + "?appid=%s&tokenid=%s&schoolcode=%s".formatted(APP_ID, getMsgToken(), SCHOOL_CODE);
String content = ""; //String content = "";
// String content = Http.post(url, Map.of("message", Json.toJson(bodyMap)), Sender.Default_Read_Timeout); String content = Http.post(url, Map.of("message", Json.toJson(bodyMap)), Sender.Default_Read_Timeout);
NutMap contentMap = Json.fromJson(NutMap.class, content); NutMap contentMap = Json.fromJson(NutMap.class, content);
Sys_wechat_msg wechatMsg = new Sys_wechat_msg(); Sys_wechat_msg wechatMsg = new Sys_wechat_msg();
@@ -110,24 +110,23 @@ public class MsgApi {
* @return * @return
*/ */
public String getMsgToken() { public String getMsgToken() {
// String token = redisService.get(TOKEN_NAME); String token = redisService.get(TOKEN_NAME);
// if (StrUtil.isBlank(token)) { if (StrUtil.isBlank(token)) {
// Map<String, Object> params = new HashMap<String, Object>() {{ Map<String, Object> params = new HashMap<String, Object>() {{
// put("appid", APP_ID); put("appid", APP_ID);
// put("appsecret", APP_SECRET); put("appsecret", APP_SECRET);
// put("schoolcode", SCHOOL_CODE); put("schoolcode", SCHOOL_CODE);
// }}; }};
// String content = Http.get(DOMAIN + GET_TOKEN_URL, params, Sender.Default_Conn_Timeout).getContent(); String content = Http.get(DOMAIN + GET_TOKEN_URL, params, Sender.Default_Conn_Timeout).getContent();
// NutMap contentMap = Json.fromJson(NutMap.class, content); NutMap contentMap = Json.fromJson(NutMap.class, content);
// if (contentMap.getString("retcode").equals("0")) { if (contentMap.getString("retcode").equals("0")) {
// String access_token = contentMap.getString("access_token"); String access_token = contentMap.getString("access_token");
// redisService.setex(TOKEN_NAME, 3600, access_token); redisService.setex(TOKEN_NAME, 3600, access_token);
// } else { } else {
// throw new RuntimeException("获取短信接口token异常!!!"); throw new RuntimeException("获取短信接口token异常!!!");
// } }
// } }
// return redisService.get(TOKEN_NAME); return redisService.get(TOKEN_NAME);
return null;
} }
@@ -112,7 +112,7 @@ public class MeetingMineServiceImpl extends ViServiceImpl implements MeetingMine
dao().updateIgnoreNull(meetingTimePeriodUsers); dao().updateIgnoreNull(meetingTimePeriodUsers);
List<NutMap> userIdMap = meetingCommonService.getNextAuditUser(stateCode, moduleName); List<NutMap> userIdMap = meetingCommonService.getNextAuditUser(stateCode, moduleName);
String userInfoStr = msgNotifyService.userData(userIdMap); List<String> userInfoStr = msgNotifyService.userData(userIdMap);
String meetingId = meetingTimePeriodUsers.get(0).getMeetingId(); String meetingId = meetingTimePeriodUsers.get(0).getMeetingId();
MeetingInfo meetingInfo = dao().fetch(MeetingInfo.class, meetingId); MeetingInfo meetingInfo = dao().fetch(MeetingInfo.class, meetingId);
@@ -146,7 +146,7 @@ public class MsgNotifyController {
if (msgNotify.getType() != null && msgNotify.getType().equals("system")) { if (msgNotify.getType() != null && msgNotify.getType().equals("system")) {
List<NutMap> list = msgNotifyService.getUserByRoleIds(msgNotify.getModule(), msgNotify.getTeacherMeetingId(), msgNotify.getRoleIds()); List<NutMap> list = msgNotifyService.getUserByRoleIds(msgNotify.getModule(), msgNotify.getTeacherMeetingId(), msgNotify.getRoleIds());
String userData = msgNotifyService.userData(list); List<String> userData = msgNotifyService.userData(list);
if (flag) { if (flag) {
msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent()); msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent());
@@ -165,7 +165,7 @@ public class MsgNotifyController {
} else if (msgNotify.getType() != null && msgNotify.getType().equals("user")) { } else if (msgNotify.getType() != null && msgNotify.getType().equals("user")) {
if (flag) { if (flag) {
List<User> user = dao.query(User.class, Cnd.where("id", "in", users)); List<User> user = dao.query(User.class, Cnd.where("id", "in", users));
String objectUserData = msgNotifyService.ObjectUserData(user); List<String> objectUserData = msgNotifyService.ObjectUserData(user);
msgNotifyService.sendMsg(msgNotify.getSendTypes(), objectUserData, msgNotify.getContent()); msgNotifyService.sendMsg(msgNotify.getSendTypes(), objectUserData, msgNotify.getContent());
} }
for (String u : users) { for (String u : users) {
@@ -180,7 +180,7 @@ public class MsgNotifyController {
} }
} else { } else {
List<NutMap> userScopes = msgNotifyService.getUserScopes(msgNotify.getActivityGroupId()); List<NutMap> userScopes = msgNotifyService.getUserScopes(msgNotify.getActivityGroupId());
String userData = msgNotifyService.userData(userScopes); List<String> userData = msgNotifyService.userData(userScopes);
if (flag) { if (flag) {
msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent()); msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent());
@@ -220,7 +220,7 @@ public class MsgNotifyController {
msgNotify.setHold(flag ? true : false); msgNotify.setHold(flag ? true : false);
if (flag) { if (flag) {
String userData = msgNotifyService.userData(list); List<String> userData = msgNotifyService.userData(list);
msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent()); msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent());
} }
@@ -236,7 +236,7 @@ public class MsgNotifyController {
} else if (msgNotify.getType() != null && msgNotify.getType().equals("user")) { } else if (msgNotify.getType() != null && msgNotify.getType().equals("user")) {
if (flag) { if (flag) {
List<User> user = dao.query(User.class, Cnd.where("id", "in", users)); List<User> user = dao.query(User.class, Cnd.where("id", "in", users));
String objectUserData = msgNotifyService.ObjectUserData(user); List<String> objectUserData = msgNotifyService.ObjectUserData(user);
msgNotifyService.sendMsg(msgNotify.getSendTypes(), objectUserData, msgNotify.getContent()); msgNotifyService.sendMsg(msgNotify.getSendTypes(), objectUserData, msgNotify.getContent());
} }
@@ -268,7 +268,7 @@ public class MsgNotifyController {
""").setParam("groupId", msgNotify.getActivityGroupId()); """).setParam("groupId", msgNotify.getActivityGroupId());
List<NutMap> userScopes = activityBasicScopeService.listMap(sql); List<NutMap> userScopes = activityBasicScopeService.listMap(sql);
msgNotify.setHold(flag ? true : false); msgNotify.setHold(flag ? true : false);
String userData = msgNotifyService.userData(userScopes); List<String> userData = msgNotifyService.userData(userScopes);
if (flag) { if (flag) {
msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent()); msgNotifyService.sendMsg(msgNotify.getSendTypes(), userData, msgNotify.getContent());
@@ -105,7 +105,7 @@ public class MsgNotifyTitleController {
@RequiresAuthentication @RequiresAuthentication
public Object doSend(String id, String[] sendTypes, String content) { public Object doSend(String id, String[] sendTypes, String content) {
List<NutMap> msgNotifyUser = msgNotifyService.getMsgNotifyUser(id); List<NutMap> msgNotifyUser = msgNotifyService.getMsgNotifyUser(id);
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 -> { msgNotifyUser.forEach(v -> {
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", "=", v.getString("titleId")));
@@ -36,9 +36,9 @@ public interface MsgNotifyService {
String userData(User user); String userData(User user);
String ObjectUserData(List<User> userList); List<String> ObjectUserData(List<User> userList);
String userData(List<NutMap> userListMap); List<String> userData(List<NutMap> userListMap);
/** /**
* 根据条件发送短信 * 根据条件发送短信
@@ -49,6 +49,7 @@ public interface MsgNotifyService {
*/ */
void sendMsg(List<String> sendTypes, String userData, String content); void sendMsg(List<String> sendTypes, String userData, String content);
void sendMsg(List<String> sendTypes, List<String> userData, String content);
/** /**
* 查询活动设置人员 * 查询活动设置人员
@@ -1,6 +1,7 @@
package io.v.nutz.msgNotify.service.impl; package io.v.nutz.msgNotify.service.impl;
import io.v.nutz.base.utils.DateUtil; import io.v.nutz.base.utils.DateUtil;
import io.v.nutz.base.utils.MsgApi;
import io.v.nutz.msgNotify.models.MsgNotify; import io.v.nutz.msgNotify.models.MsgNotify;
import io.v.nutz.msgNotify.models.MsgNotifyUser; import io.v.nutz.msgNotify.models.MsgNotifyUser;
import io.v.nutz.msgNotify.service.MsgNotifyService; import io.v.nutz.msgNotify.service.MsgNotifyService;
@@ -12,6 +13,7 @@ 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;
import org.nutz.dao.util.Daos; import org.nutz.dao.util.Daos;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap; import org.nutz.lang.util.NutMap;
@@ -64,7 +66,7 @@ public class MsgNotifyServiceImpl extends ViServiceImpl<MsgNotify> implements Ms
*/ */
@Override @Override
public String userData(NutMap v) { public String userData(NutMap v) {
List<String> list = new ArrayList<>(); /*List<String> list = new ArrayList<>();
list.add(v.getString("userName")); list.add(v.getString("userName"));
list.add(v.getString("loginName")); list.add(v.getString("loginName"));
list.add(v.getString("unitId")); list.add(v.getString("unitId"));
@@ -72,13 +74,13 @@ public class MsgNotifyServiceImpl extends ViServiceImpl<MsgNotify> implements Ms
list.add(v.getString("mobile") != null ? v.getString("mobile") : ""); list.add(v.getString("mobile") != null ? v.getString("mobile") : "");
list.add(""); list.add("");
list.add(""); list.add("");
String collect = list.stream().collect(Collectors.joining("|")); String collect = list.stream().collect(Collectors.joining("|"));*/
return collect; return v.getString("loginName");
} }
@Override @Override
public String userData(User user) { public String userData(User user) {
List<String> list = new ArrayList<>(); /*List<String> list = new ArrayList<>();
list.add(user.getUsername()); list.add(user.getUsername());
list.add(user.getLoginname()); list.add(user.getLoginname());
list.add(user.getUnitid()); list.add(user.getUnitid());
@@ -87,25 +89,27 @@ public class MsgNotifyServiceImpl extends ViServiceImpl<MsgNotify> implements Ms
list.add(""); list.add("");
list.add(""); list.add("");
String collect = list.stream().collect(Collectors.joining("|")); String collect = list.stream().collect(Collectors.joining("|"));
return collect; return collect;*/
return user.getLoginname();
} }
@Override @Override
public String ObjectUserData(List<User> userList) { public List<String> ObjectUserData(List<User> userList) {
List<String> recievePersonInfo = new ArrayList<>(); List<String> recievePersonInfo = new ArrayList<>();
for (User user : userList) { for (User user : userList) {
recievePersonInfo.add(userData(user)); recievePersonInfo.add(userData(user));
} }
return String.join("^@^", recievePersonInfo); return recievePersonInfo;
} }
@Override @Override
public String userData(List<NutMap> userList) { public List<String> userData(List<NutMap> userList) {
List<String> recievePersonInfo = new ArrayList<>(); List<String> recievePersonInfo = new ArrayList<>();
for (NutMap map : userList) { for (NutMap map : userList) {
recievePersonInfo.add(userData(map)); recievePersonInfo.add(userData(map));
} }
return String.join("^@^", recievePersonInfo); //return String.join("^@^", recievePersonInfo);
return recievePersonInfo;
} }
/** /**
@@ -120,14 +124,33 @@ public class MsgNotifyServiceImpl extends ViServiceImpl<MsgNotify> implements Ms
@Override @Override
public void run() { public void run() {
if (sendTypes.contains("msg")) { if (sendTypes.contains("msg")) {
//msgApi.sendMsg(content, List.of(item.getString("loginname")));
} }
if (sendTypes.contains("WeChat")) { if (sendTypes.contains("WeChat")) {
//msgApi.sendMsg(content, List.of(item.getString("loginname")));
} }
} }
}.start(); }.start();
} }
public void sendMsg(List<String> sendTypes, List<String> receivers, String content) {
new Thread() {
@Override
public void run() {
if (sendTypes.contains("msg")) {
msgApi.sendMsg(content, receivers);
}
if (sendTypes.contains("WeChat")) {
msgApi.sendMsg(content, receivers);
}
}
}.start();
}
@Inject
private MsgApi msgApi;
/** /**
* 查询活动设置人员 * 查询活动设置人员
@@ -1,11 +1,16 @@
package io.v.nutz.trainEducation.controller.statistics; package io.v.nutz.trainEducation.controller.statistics;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import io.v.nutz.annontation.ViReturn; import io.v.nutz.annontation.ViReturn;
import io.v.nutz.base.page.Pagination; import io.v.nutz.base.page.Pagination;
import io.v.nutz.base.service.BaseService; import io.v.nutz.base.service.BaseService;
import io.v.nutz.base.utils.Vi; import io.v.nutz.base.utils.Vi;
import io.v.nutz.modules.models.PageForm; import io.v.nutz.modules.models.PageForm;
import io.v.nutz.util.ViTool;
import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.web.commons.utils.ShiroUtil;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.nutz.dao.Cnd; import org.nutz.dao.Cnd;
@@ -15,11 +20,14 @@ import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.Static; import org.nutz.dao.util.cri.Static;
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.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 org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -137,4 +145,63 @@ public class TrainEduStatisticsVideoController {
sql.setParam("albumId", albumId); sql.setParam("albumId", albumId);
return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
} }
@At
@Ok("void")
@RequiresPermissions("trainEdu.statistics.video")
public void exportXlsx(String albumId,HttpServletResponse response){
Sql sql = Sqls.create("""
SELECT
u.username,
u.loginname,
u.unitname,
u.unionname,
tev.qualifiedNum,
(
SELECT
SUM(IF( cnt > tev.everyDayMaxWatchNum, tev.everyDayMaxWatchNum, cnt )) AS count
FROM
( SELECT watchTime, COUNT( 1 ) AS cnt FROM train_edu_video_watch_record where userId = tevwr.userId and albumId = tevwr.albumId GROUP BY watchTime ) AS subquery
) as watchCount
FROM
`train_edu_video_watch_record` tevwr
LEFT JOIN train_edu_video tev ON tev.id = tevwr.videoId
LEFT JOIN train_edu_album tea on tea.id = tevwr.albumId
LEFT JOIN `user` u ON u.id = tevwr.userId
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("tevwr.albumId", "=", albumId);
cnd.and(new Static("IF(tea.createType = 1, u.unionId = tea.unionId , 1=1)"));
cnd.groupBy("tevwr.userId");
sql.setCondition(cnd);
List<NutMap> list = baseService.listMap(sql);
List<ExcelExportEntity> excelExportEntities = new ArrayList<>();
excelExportEntities.add(new ExcelExportEntity("序号","no",10));
excelExportEntities.add(new ExcelExportEntity("姓名","username",20));
excelExportEntities.add(new ExcelExportEntity("工号","loginname",20));
excelExportEntities.add(new ExcelExportEntity("单位","unitname",20));
excelExportEntities.add(new ExcelExportEntity("分工会","unionname",20));
excelExportEntities.add(new ExcelExportEntity("学习总次数","watchCount",20));
excelExportEntities.add(new ExcelExportEntity("是否达标","qualifiedNum",20));
for (int i = 0; i < list.size(); i++) {
list.get(i).put("no",i+1);
list.get(i).put("qualifiedNum",list.get(i).getInt("qualifiedNum",0)==1?"是":"否");
}
try{
ViTool.excelResponse(response, "获奖人员名单.xls");
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), excelExportEntities, list);
workbook.write(response.getOutputStream());
}catch (Exception e){
e.printStackTrace();
}
}
} }
@@ -146,7 +146,15 @@ layout("/mobile/platform.html"){
const now = new Date(); const now = new Date();
// 检查当前时间是否在 startTime 和 endTime 之间 // 检查当前时间是否在 startTime 和 endTime 之间
return now >= start && now <= end;
if (now < start && now > end){
vant.Dialog.alert({
title: '温馨提示',
message: '不在测评时间内,暂无法测评',
confirmButtonColor: '#1867b0'
})
return
}
//自评模式 //自评模式
if (o.reviewMode == 1 && !o.canJoin) { if (o.reviewMode == 1 && !o.canJoin) {
@@ -249,7 +249,7 @@ layout("/mobile/platform.html"){
let resultScore = 0; // 评议分 let resultScore = 0; // 评议分
this.bzList.forEach(v => { this.bzList.forEach(v => {
source += Number(v.source) source += Number(v.score)
resultScore += Number(v.resultScore) resultScore += Number(v.resultScore)
}) })
const result = (resultScore / source) * 100 const result = (resultScore / source) * 100
@@ -290,16 +290,36 @@ layout("/mobile/platform.html"){
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData) const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData)
if (resp.code === 0) { if (resp.code === 0) {
await this.getCommentById(); await this.getCommentById();
window.location.href = '/mobile/wakeshome/review/appraisal/mine' vant.Toast.success('操作成功')
setTimeout(()=>{
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
},500)
} }
}) })
}, },
async showAssess() { async showAssess() {
this.$refs['addForm'].validate().then(async () => { this.$refs['addForm'].validate().then(async () => {
let score = 0; // let score = 0;
await this.assignment();
if (this.commentatorData.assessmentMode === 1) { if (this.commentatorData.assessmentMode === 1) {
await this.assignment();
let source = 0; // 标准分
let resultScore = 0; // 评议分
this.bzList.forEach(v => { this.bzList.forEach(v => {
source += Number(v.score)
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
if (result >= 80) {
this.reviewResult = '满意'
} else if (result >= 60 && result <= 79) {
this.reviewResult = '基本满意'
} else {
this.reviewResult = '不满意'
}
/*this.bzList.forEach(v => {
score += Number(v.resultScore) score += Number(v.resultScore)
}) })
if (score >= Number(80)) { if (score >= Number(80)) {
@@ -308,12 +328,13 @@ layout("/mobile/platform.html"){
this.reviewResult = '基本满意' this.reviewResult = '基本满意'
} else { } else {
this.reviewResult = '不满意' this.reviewResult = '不满意'
} }*/
console.log(score) console.log(source)
console.log(resultScore)
console.log(this.reviewResult) console.log(this.reviewResult)
vant.Dialog.alert({ vant.Dialog.alert({
title: '测评结果', title: '测评结果',
message: '您的测评分数为【' + score + "】分,测评结果为【" + this.reviewResult + "】", message: '您的测评分数为【' + resultScore + "】分,测评结果为【" + this.reviewResult + "】",
confirmButtonColor: '#1867b0' confirmButtonColor: '#1867b0'
}) })
} else if (this.commentatorData.assessmentMode === 2) { } else if (this.commentatorData.assessmentMode === 2) {
@@ -34,7 +34,11 @@ layout("/layouts/platform.html"){
<el-card shadow="never" class="mt10"> <el-card shadow="never" class="mt10">
<table-tool label="统计" :app="this"></table-tool> <table-tool label="统计" :app="this">
<template #func>
<el-button type="primary" size="small" @click="exportXlsx">导出</el-button>
</template>
</table-tool>
<el-table :data="tableData" :size="tableSize" style="width: 100%"> <el-table :data="tableData" :size="tableSize" style="width: 100%">
<el-table-column type="index" label="序号" width="80px"></el-table-column> <el-table-column type="index" label="序号" width="80px"></el-table-column>
<el-table-column <el-table-column
@@ -46,9 +50,9 @@ layout("/layouts/platform.html"){
:prop="column.prop" :prop="column.prop"
:sortable="column.sortable" :sortable="column.sortable"
> >
<!-- <template v-if="column.prop==='sumDuration'" scope="{row}">--> <!-- <template v-if="column.prop==='sumDuration'" scope="{row}">-->
<!-- {{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}--> <!-- {{(row.sumDuration / 60 / 60).toFixed(2) + 'h'}}-->
<!-- </template>--> <!-- </template>-->
<template v-if="column.prop==='isQualified'" scope="{row}"> <template v-if="column.prop==='isQualified'" scope="{row}">
<span v-if="row.watchCount>=row.qualifiedNum" class="text-success"> <span v-if="row.watchCount>=row.qualifiedNum" class="text-success">
是 是
@@ -58,48 +62,48 @@ layout("/layouts/platform.html"){
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" header-align="center" label="操作" width="200">--> <!-- <el-table-column align="center" header-align="center" label="操作" width="200">-->
<!-- <template scope="{row}">--> <!-- <template scope="{row}">-->
<!-- <el-button size="mini" type="primary" @click="openView(row)">查看具体学习情况</el-button>--> <!-- <el-button size="mini" type="primary" @click="openView(row)">查看具体学习情况</el-button>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
</el-card> </el-card>
<!-- <template #view>--> <!-- <template #view>-->
<!-- <el-table :data="viewTableData" stripe border style="width: 100%">--> <!-- <el-table :data="viewTableData" stripe border style="width: 100%">-->
<!-- <el-table-column type="index" label="序号" width="80px">--> <!-- <el-table-column type="index" label="序号" width="80px">-->
<!-- <template scope="scope">--> <!-- <template scope="scope">-->
<!-- <span>{{ scope.$index + (viewPageForm.pageNumber - 1) * viewPageForm.pageSize + 1 }} </span>--> <!-- <span>{{ scope.$index + (viewPageForm.pageNumber - 1) * viewPageForm.pageSize + 1 }} </span>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<!-- <el-table-column--> <!-- <el-table-column-->
<!-- align="center"--> <!-- align="center"-->
<!-- header-align="center"--> <!-- header-align="center"-->
<!-- v-for="column in viewTableColumns"--> <!-- v-for="column in viewTableColumns"-->
<!-- show-overflow-tooltip--> <!-- show-overflow-tooltip-->
<!-- :label="column.label"--> <!-- :label="column.label"-->
<!-- :prop="column.prop"--> <!-- :prop="column.prop"-->
<!-- :sortable="column.sortable"--> <!-- :sortable="column.sortable"-->
<!-- >--> <!-- >-->
<!-- <template v-if="column.prop==='studyDuration'" scope="{row}">--> <!-- <template v-if="column.prop==='studyDuration'" scope="{row}">-->
<!-- {{(row.studyDuration / 60 / 60).toFixed(2) + 'h'}}--> <!-- {{(row.studyDuration / 60 / 60).toFixed(2) + 'h'}}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<!-- </el-table>--> <!-- </el-table>-->
<!-- <el-row class="el-pagination-container" style="margin-bottom: 0px">--> <!-- <el-row class="el-pagination-container" style="margin-bottom: 0px">-->
<!-- <el-pagination--> <!-- <el-pagination-->
<!-- @current-change="(val)=>{viewPageForm.pageNumber=val;viewPageData()}"--> <!-- @current-change="(val)=>{viewPageForm.pageNumber=val;viewPageData()}"-->
<!-- :current-page="viewPageForm.pageNumber"--> <!-- :current-page="viewPageForm.pageNumber"-->
<!-- :page-size="viewPageForm.pageSize"--> <!-- :page-size="viewPageForm.pageSize"-->
<!-- layout="total, sizes, prev, pager, next"--> <!-- layout="total, sizes, prev, pager, next"-->
<!-- :total="viewPageForm.totalCount">--> <!-- :total="viewPageForm.totalCount">-->
<!-- </el-pagination>--> <!-- </el-pagination>-->
<!-- </el-row>--> <!-- </el-row>-->
<!-- </template>--> <!-- </template>-->
</guava> </guava>
</div> </div>
@@ -155,6 +159,9 @@ layout("/layouts/platform.html"){
} }
}, },
viewPageNumberChange(val) { viewPageNumberChange(val) {
},
exportXlsx() {
window.open(loc() + '/exportXlsx?albumId=' + this.pageForm.albumId)
} }
}, },
async created() { async created() {
@@ -105,13 +105,40 @@ layout("/layouts/platform.html"){
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="350px"> <!-- <el-table-column label="操作" width="350px">
<template scope="{row}"> <template scope="{row}">
<el-button @click="makeCode(row)" size="mini" type="primary">生成二维码</el-button> <el-button @click="makeCode(row)" size="mini" type="primary">生成二维码</el-button>
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button> <el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="deleteDo(row)" size="mini" type="primary">删除</el-button> <el-button @click="deleteDo(row)" size="mini" type="primary">删除</el-button>
</template> </template>
</el-table-column>-->
<el-table-column label="操作" width="150px">
<template scope="{row}">
<el-dropdown>
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="openCode(row.id)">
活动二维码
</el-dropdown-item>
<el-dropdown-item @click.native="makeCode(row)">
签到二维码
</el-dropdown-item>
<el-dropdown-item @click.native="openView(row)">
查看
</el-dropdown-item>
<el-dropdown-item @click.native="openEdit(row)">
编辑
</el-dropdown-item>
<el-dropdown-item @click.native="deleteDo(row)">
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
@@ -164,6 +191,8 @@ layout("/layouts/platform.html"){
</el-table> </el-table>
</el-dialog> </el-dialog>
<open-qr-code ref="openQRCode" :url="url"></open-qr-code>
</div> </div>
<script> <script>
@@ -197,9 +226,16 @@ layout("/layouts/platform.html"){
courseTimeList: [], courseTimeList: [],
viewMapDialog: false, viewMapDialog: false,
clickRow: {}, clickRow: {},
url: '',
} }
}, },
components: {
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
},
methods: { methods: {
openCode(id) {
this.$refs.openQRCode.openCode("/platform/mobile/trainSignUpActivity/trainList")
},
makeCode(row) { makeCode(row) {
this.clickRow = row this.clickRow = row
const type = this.trainTypeList.find(o => o.code === row.trainType) const type = this.trainTypeList.find(o => o.code === row.trainType)
@@ -414,7 +414,7 @@ layout("/layouts/platform.html"){
let source = 0; // 标准分 let source = 0; // 标准分
let resultScore = 0; // 评议分 let resultScore = 0; // 评议分
this.formData.bzList.forEach(v => { this.formData.bzList.forEach(v => {
source += Number(v.source) source += Number(v.score)
resultScore += Number(v.resultScore) resultScore += Number(v.resultScore)
}) })
const result = (resultScore / source) * 100 const result = (resultScore / source) * 100