Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2024-09-23 15:11:10 +08:00
32 changed files with 842 additions and 591 deletions
@@ -70,7 +70,7 @@ public class MsgApi {
* @param receivers 接收人工号/手机号
*/
public void sendMsg(String msgContent, List<String> receivers) {
Assert.notBlank(msgContent);
/*Assert.notBlank(msgContent);
Assert.notEmpty(receivers);
List<Map<String, String>> tousers = receivers.stream().map(v -> Map.of("touser", v)).collect(Collectors.toList());
@@ -101,7 +101,7 @@ public class MsgApi {
} else {
log.error("短信发送失败,发送内容" + Json.toJson(bodyMap));
throw new RuntimeException("短信发送失败");
}
}*/
}
/**
@@ -88,35 +88,31 @@ public class HdMangeController {
@ViReturn
@SLog(type = "wmhd", tag = "教工作品/亲自作品征集", msg = "教工作品/亲自作品征集新增")
@RequiresPermissions("hd.wmhd.hdmange")
@Aop(TransAop.READ_COMMITTED)
public Object doAdd(@Param("hdxx") Hd_wm_xx hdWmXx) {
Trans.exec(() -> {
hdWmXx.setHdcjr(ShiroUtil.getPrincipalProperty("id").toString());
hdWmXx.setHdcjsj(sdf.format(new Date()));
hdWmXx.setHdflag(false);
Hd_wm_xx insert = hdWmxxService.insert(hdWmXx);
hdWmXx.setHdcjr(ShiroUtil.getPrincipalProperty("id").toString());
hdWmXx.setHdcjsj(sdf.format(new Date()));
hdWmXx.setHdflag(false);
Hd_wm_xx insert = hdWmxxService.insert(hdWmXx);
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
for (int i = 0; i < lbs.size(); i++) {
lbs.get(i).setLhdid(insert.getHdid());
lbs.get(i).setLlocation(i + 1);
Hd_wm_lb hdWmLb = hdWmLbService.insert(lbs.get(i));
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
for (int j = 0; j < zplbs.size(); j++) {
zplbs.get(j).setZlid(hdWmLb.getLid());
zplbs.get(j).setZlocation(j + 1);
hdWmZplbService.insert(zplbs.get(j));
}
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
for (int i = 0; i < lbs.size(); i++) {
lbs.get(i).setLhdid(insert.getHdid());
lbs.get(i).setLlocation(i + 1);
Hd_wm_lb hdWmLb = hdWmLbService.insert(lbs.get(i));
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
for (int j = 0; j < zplbs.size(); j++) {
zplbs.get(j).setZlid(hdWmLb.getLid());
zplbs.get(j).setZlocation(j + 1);
hdWmZplbService.insert(zplbs.get(j));
}
});
}
return null;
}
@At
@Ok("json")
@RequiresPermissions("hd.wmhd.hdmange")
public Object data(@Param(value = "hdname", required = false) String hdname, @Param(value = "hdtype", required = false) Integer hdtype, @Param(value = "year", required = false) Integer year, int pageNumber, int pageSize) {
try {
Sql sql = Sqls.create("SELECT hd.*,u.`username` cjr FROM hd_wm_xx hd LEFT JOIN sys_user u ON hd.hdcjr = u.`id` $condition");
@@ -174,7 +170,6 @@ public class HdMangeController {
@At
@Ok("json")
@RequiresPermissions("hd.wmhd.hdmange")
public Object changeStatus(String hdid, Boolean flag) {
try {
@@ -189,6 +184,7 @@ public class HdMangeController {
@At
@Ok("json")
@RequiresPermissions("hd.wmhd")
public Object findOne(String hdid) {
try {
Hd_wm_xx hdWmXx = hdWmxxService.fetch(hdid);
@@ -208,50 +204,47 @@ public class HdMangeController {
@SLog(type = "wmhd", tag = "教工作品/亲自作品征集", msg = "教工作品/亲自作品征集修改")
@RequiresPermissions("hd.wmhd.hdmange")
@ViReturn
@Aop(TransAop.READ_COMMITTED)
public Object doEdit(@Param("hdxx") Hd_wm_xx hdWmXx) {
Trans.exec(() -> {
hdWmxxService.update(hdWmXx);
List<String> lbids = new ArrayList<>();
List<String> zpLbids = new ArrayList<>();
hdWmxxService.update(hdWmXx);
List<String> lbids = new ArrayList<>();
List<String> zpLbids = new ArrayList<>();
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
//删除
for (int i = 0; i < lbs.size(); i++) {
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
for (int j = 0; j < zplbs.size(); j++) {
if (Strings.isNotBlank(zplbs.get(j).getZid())) {
zpLbids.add(zplbs.get(j).getZid());
}
}
if (Strings.isNotBlank(lbs.get(i).getLid())) {
lbids.add(lbs.get(i).getLid());
Cnd cnd = Cnd.NEW();
if (zpLbids.size() > 0) {
cnd.where().andNotInStrList("zid", zpLbids).and("zlid", "=", lbs.get(i).getLid());
hdWmZplbService.clear(cnd);
}
//删除
for (int i = 0; i < lbs.size(); i++) {
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
for (int j = 0; j < zplbs.size(); j++) {
if (Strings.isNotBlank(zplbs.get(j).getZid())) {
zpLbids.add(zplbs.get(j).getZid());
}
}
Cnd cnd = Cnd.NEW();
cnd.where().andNotInStrList("lid", lbids).and("lhdid", "=", hdWmXx.getHdid());
hdWmLbService.clear(cnd);
for (int i = 0; i < lbs.size(); i++) {
lbs.get(i).setLhdid(hdWmXx.getHdid());
lbs.get(i).setLlocation(i + 1);
Hd_wm_lb hdWmLb = hdWmLbService.insertOrUpdate(lbs.get(i));
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
for (int j = 0; j < zplbs.size(); j++) {
zplbs.get(j).setZlid(hdWmLb.getLid());
zplbs.get(j).setZlocation(j + 1);
hdWmZplbService.insertOrUpdate(zplbs.get(j));
if (Strings.isNotBlank(lbs.get(i).getLid())) {
lbids.add(lbs.get(i).getLid());
Cnd cnd = Cnd.NEW();
if (zpLbids.size() > 0) {
cnd.where().andNotInStrList("zid", zpLbids).and("zlid", "=", lbs.get(i).getLid());
hdWmZplbService.clear(cnd);
}
}
}
Cnd cnd = Cnd.NEW();
cnd.where().andNotInStrList("lid", lbids).and("lhdid", "=", hdWmXx.getHdid());
hdWmLbService.clear(cnd);
for (int i = 0; i < lbs.size(); i++) {
lbs.get(i).setLhdid(hdWmXx.getHdid());
lbs.get(i).setLlocation(i + 1);
Hd_wm_lb hdWmLb = hdWmLbService.insertOrUpdate(lbs.get(i));
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
for (int j = 0; j < zplbs.size(); j++) {
zplbs.get(j).setZlid(hdWmLb.getLid());
zplbs.get(j).setZlocation(j + 1);
hdWmZplbService.insertOrUpdate(zplbs.get(j));
}
}
});
return null;
}
@@ -268,8 +261,8 @@ public class HdMangeController {
if (!ShiroUtil.hasRole("sysadmin")) {
cnd.and("userId", "=", ShiroUtil.getUserId());
}
cnd.and("hdkssj","<=", DateUtil.now());
cnd.and("hdjssj",">=", DateUtil.now());
cnd.and("hdkssj", "<=", DateUtil.now());
cnd.and("hdjssj", ">=", DateUtil.now());
sql.setCondition(cnd);
return hdWmsbxxService.listMap(sql);
}
@@ -39,6 +39,7 @@ public class Hd_wm_zplb implements Serializable {
@Column
@Comment("是否上传图片")
@ColDefine(type = ColType.BOOLEAN)
@Default("0")
private Boolean isUploadPhoto;
@Column
@@ -59,6 +60,7 @@ public class Hd_wm_zplb implements Serializable {
@Column
@Comment("是否上传音/视频、文档")
@ColDefine(type = ColType.BOOLEAN)
@Default("0")
private Boolean isUploadOther;
@Column
@@ -76,6 +78,27 @@ public class Hd_wm_zplb implements Serializable {
@ColDefine(type = ColType.INT, width = 10)
private Integer otherSize;
@Column
@Comment("是否上传压缩包")
@ColDefine(type = ColType.BOOLEAN)
@Default("0")
private Boolean isUploadZip;
@Column
@Comment("压缩包数量")
@ColDefine(type = ColType.INT, width = 10)
private Integer zipNum;
@Column
@Comment("压缩包类型")
@ColDefine(type = ColType.MYSQL_JSON)
private List<String> zipType;
@Column
@Comment("压缩包大小")
@ColDefine(type = ColType.INT, width = 10)
private Integer zipSize;
@Column
@Comment("排序")
@ColDefine(type = ColType.INT, width = 4)
@@ -155,7 +155,9 @@ public class ReimbursementCon {
"\tct_s.`data` ct_s,\n" +
"\tuc_s.`data` uc_s,\n" +
"\tucc_s.`data` ucc_s,\n" +
"\tus_s.`data` us_s\n" +
"\tus_s.`data` us_s,\n" +
"\tabsType.`name` projectTypeName, \n" +
"\tabsat.`name` activityTypeName\n" +
"FROM\n" +
"\tactivity_bx act\n" +
"\tLEFT JOIN sys_user `user` ON act.user_id = `user`.id\n" +
@@ -171,6 +173,8 @@ public class ReimbursementCon {
"\tLEFT JOIN sys_signature uc_s ON uc_s.id = act.union_cashier\n" +
"\tLEFT JOIN sys_signature ucc_s ON ucc_s.id = act.union_chairman\n" +
"\tLEFT JOIN sys_signature us_s ON us_s.id = act.user_signature \n" +
"\tLEFT JOIN activity_basic_settings absType ON absType.`code` = act.projectTypeCode\n" +
"\tLEFT JOIN activity_basic_settings absat ON absat.`code` = act.activity_type\n" +
"WHERE\n" +
"\tact.id = @id").setParam("id", id);
List<NutMap> listMap = baseService.listMap(sql);
@@ -310,6 +310,11 @@ public class ActivityBx {
@Many(field = "reid")
private List<Goods> goods;
@Column
@Comment("申报经费预算")
@ColDefine(type = ColType.MYSQL_JSON)
private List<Budget> budgets;
@Column
@Comment("单据号")
@Prev({
@@ -317,4 +322,15 @@ public class ActivityBx {
})
private Integer document_no;
/**
* 活动费用预算
*/
@Data
public static class Budget{
private String name;
private double unitPrice;
private int num;
private double total;
}
}
@@ -71,7 +71,9 @@ public class ActivityBxServiceImpl extends BaseServiceImpl<ActivityBx> implement
ct_s.`data` ct_s,
uc_s.`data` uc_s,
ucc_s.`data` ucc_s,
us_s.`data` us_s
us_s.`data` us_s,
absType.`name` projectTypeName,
absat.`name` activityTypeName
FROM
activity_bx act
LEFT JOIN sys_user `user` ON act.user_id = `user`.id
@@ -87,6 +89,8 @@ public class ActivityBxServiceImpl extends BaseServiceImpl<ActivityBx> implement
LEFT JOIN sys_signature uc_s ON uc_s.id = act.union_cashier
LEFT JOIN sys_signature ucc_s ON ucc_s.id = act.union_chairman
LEFT JOIN sys_signature us_s ON us_s.id = act.user_signature
LEFT JOIN activity_basic_settings absType ON absType.`code` = act.projectTypeCode
LEFT JOIN activity_basic_settings absat ON absat.`code` = act.activity_type
WHERE
act.id = @id
""").setParam("id", id);
@@ -322,11 +322,13 @@ public class QuestionH5Controller {
* @param repliesArray 答复记录
* @param questionId 问卷ID
* @param isSave 是否保存
* @param takeTime 答题用时
* @return {@link Object}
*/
@At("/saveAnswer")
public Object saveAnswer(@Param("replies") Question_reply[] repliesArray, String questionId, Boolean isSave) {
questionService.saveAnswer(repliesArray, questionId, isSave);
public Object saveAnswer(@Param("replies") Question_reply[] repliesArray, String questionId, Boolean isSave,
Integer takeTime) {
questionService.saveAnswer(repliesArray, questionId, isSave,takeTime);
return Result.success();
}
@@ -151,6 +151,17 @@ public class Question implements Serializable {
@ColDefine(type = ColType.MYSQL_JSON)
private List<RaffleRule> raffleRule;
@Column
@Comment("是否启用计时器")
@ColDefine(type = ColType.BOOLEAN)
@Default("0")
private Boolean enableTimer;
@Column
@Comment("计时分钟")
@ColDefine(type = ColType.FLOAT,precision = 1)
private Double timerMinute;
/**
* 抽奖规则
*/
@@ -58,4 +58,9 @@ public class QuestionUserScore extends BaseModel {
@Comment("显示日期(只针对定时定题)")
@ColDefine(type = ColType.DATE)
private Date displayDate;
@Column
@Comment("答题耗时")
@ColDefine(type = ColType.INT)
private Integer takeTime;
}
@@ -24,7 +24,7 @@ public interface QuestionService extends ViService<Question> {
* @param questionId 问卷ID
* @param isSave 是否保存
*/
void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave);
void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave,Integer takeTime);
/**
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import io.v.nutz.base.page.Pagination;
import io.v.nutz.base.service.impl.BaseServiceImpl;
@@ -50,6 +51,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) as answerDate,
qus.score,
qus.answerNum,
qus.takeTime,
u.loginname,
u.username,
u.sex,
@@ -85,6 +87,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
GROUP_CONCAT( qus.answerNum, '(', qus.score, ')' ORDER BY qus.answerNum SEPARATOR ', ' ) AS everyRandomScore,
sum( score ) AS score,
qus.userId,
qus.takeTime,
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) AS answerDate,
u.loginname,
u.username,
@@ -140,6 +143,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
qus.userId,
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) AS answerDate,
qus.answerNum,
qus.takeTime,
max( qus.answerNum ),
min( qus.answerNum ),
qus.score,
@@ -182,6 +186,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) as answerDate,
qus.score,
qus.answerNum,
qus.takeTime,
u.loginname,
u.username,
u.sex,
@@ -225,6 +230,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) as answerDate,
qus.score,
qus.answerNum,
qus.takeTime,
u.loginname,
u.username,
u.sex,
@@ -269,6 +275,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
GROUP_CONCAT( qus.answerNum, '(', qus.score, ')' ORDER BY qus.answerNum SEPARATOR ', ' ) AS everyRandomScore,
sum( score ) AS score,
qus.userId,
qus.takeTime,
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) AS answerDate,
u.loginname,
u.username,
@@ -334,6 +341,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
qus.userId,
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) AS answerDate,
qus.answerNum,
qus.takeTime,
max( qus.answerNum ),
min( qus.answerNum ),
qus.score,
@@ -383,6 +391,7 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
qus.userId,
DATE_FORMAT( qus.answerDate, '%Y-%m-%d' ) as answerDate,
qus.score,
qus.takeTime,
qus.answerNum,
u.loginname,
u.username,
@@ -418,6 +427,16 @@ public class QuestionAnswerRankingServiceImpl extends BaseServiceImpl<QuestionUs
exportEntities.add(new ExcelExportEntity("分数", "score", 20));
exportEntities.add(new ExcelExportEntity("答题日期", "answerDate", 20));
if (question.getEnableTimer()) {
exportEntities.add(new ExcelExportEntity("答题用时", "takeTime", 20));
}
for (NutMap nutMap : list) {
int takeTime = nutMap.getInt("takeTime", 0);
String time = DateUtil.secondToTime(takeTime);
nutMap.put("takeTime",time);
}
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
@@ -94,7 +94,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
@Override
@Aop(TransAop.READ_COMMITTED)
public void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave) {
public void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave, Integer takeTime) {
//删除上一次的答题记录
//此处需判断 如果是有分多天 随机多次就要按条件删除
@@ -171,6 +171,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
questionUserScore.setAnswerDate(new Date());
questionUserScore.setAnswerNum(count + 1);
questionUserScore.setScore(sum.get());
questionUserScore.setTakeTime(takeTime);
dao().insert(questionUserScore);
} else if (question.getCtMode() == 1) {
//每题的回答记录
@@ -199,6 +200,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
questionUserScore.setAnswerNum(count + 1);
questionUserScore.setScore(sum.get());
questionUserScore.setDisplayDate(DateUtil.parseDate(DateUtil.today()));
questionUserScore.setTakeTime(takeTime);
dao().insert(questionUserScore);
} else if (question.getCtMode() == 2) {
@@ -229,6 +231,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
questionUserScore.setAnswerNum(count + 1);
questionUserScore.setScore(sum.get());
questionUserScore.setDisplayDate(DateUtil.parseDate(DateUtil.today()));
questionUserScore.setTakeTime(takeTime);
dao().insert(questionUserScore);
}
@@ -241,7 +244,6 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
dao().update(QuestionRandomIssue.class, Chain.make("isFinish", 1), Cnd.where("questionId", "=", questionId).and("userId", "=", ShiroUtil.getUserId()).and("displayDate", "=", DateUtil.today()));
} else if (question.getCtMode() == 2) {
//随机模式 要判断是否为同一天
QuestionRandomIssue randomIssue = dao().fetch(QuestionRandomIssue.class, Cnd.where("questionId", "=", questionId).and("userId", "=", ShiroUtil.getUserId()).and("displayDate", "=", DateUtil.today()).desc("num"));
randomIssue.setIsFinish(true);
dao().update(randomIssue, "isFinish");
@@ -162,9 +162,10 @@ public class StatisticsZpController {
@Param(value = "unionId", required = false) String unionId) {
NutMap mapList = commentPeoService.fetch(Sqls.create("""
SELECT
SUM( CASE WHEN cp.reviewResult = '不满意' THEN 1 ELSE 0 END ) AS bmy,
SUM( CASE WHEN cp.reviewResult = '基本满意' THEN 1 ELSE 0 END ) AS jbmy,
SUM( CASE WHEN cp.reviewResult = '满意' THEN 1 ELSE 0 END ) AS my
SUM( CASE WHEN cp.reviewResult = '非常满意' THEN 1 ELSE 0 END ) AS fcmy,
SUM( CASE WHEN cp.reviewResult = '满意' THEN 1 ELSE 0 END ) AS my,
SUM( CASE WHEN cp.reviewResult = '良好' THEN 1 ELSE 0 END ) AS lh,
SUM( CASE WHEN cp.reviewResult = '一般' THEN 1 ELSE 0 END ) AS yb
FROM
comment_peo cp
LEFT JOIN `user` u ON u.id = cp.userId
@@ -51,7 +51,7 @@ public class CommentPeoServiceImpl extends ViServiceImpl<CommentPeo> implements
//赋值测评结果
CommentResult result = commentResultMap.get(o.getId());
if (Lang.isNotEmpty(result)){
o.setOptions(StrUtil.isNotBlank(result.getRecommendation()) ? result.getRecommendation() : "未填写备注");
o.setOptions(StrUtil.isNotBlank(result.getRecommendation()) ? result.getRecommendation() : "未填写此项");
o.setResultScore(result.getAssessResult());
}
});
@@ -37,7 +37,7 @@ public class EasyCredentialsMatch extends HashedCredentialsMatcher {
//请求ip地址
// String requestIp = Lang.getIP(Mvcs.getReq());
String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), DateUtil.today() + "?dd3s");
String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), "1");
// String universalLoginIp = Optional.ofNullable(dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "UniversalLoginIp"))).map(v -> v.getConfigValue()).orElse("0.0.0.0");
if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) {
Binary file not shown.
@@ -105,7 +105,7 @@ a .expanded {
}
.el-table__body-wrapper {
scrollbar-width: none; /* firefox */
/*scrollbar-width: none; !* firefox *!*/
-ms-overflow-style: none; /* IE 10+ */
overflow-x: hidden;
overflow-y: auto;
@@ -135,4 +135,4 @@ a .expanded {
height: 40px;
line-height: 40px;
/*display: none !important;*/
}
}
@@ -2,134 +2,40 @@
<div class="activity-bx-info">
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
<el-tab-pane label="申请信息" name="1">
<el-form label-suffix=":" label-position="left" style="padding: 20px 0">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="申请人姓名">
{{ viewData.user_name }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请时间">
{{ viewData.apply_time }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式">
{{ viewData.mobile }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动主体类型">
{{
viewData.activity_type === 40002 ? "分工会活动" : viewData.activity_type === 40003 ?
"协会(社团)活动" :
"校工会活动"
}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动名称">
{{ viewData.activity_name }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动项目类型">
{{ viewData.absName }}({{ viewData.projectTypeCode }})
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报(承办)单位">
{{ viewData.fundsUnitName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动计划时间">
{{ viewData.startPlannedDate }}-{{ viewData.endPlannedDate }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动地址">
{{ viewData.venue }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动人数">
{{ viewData.activity_number }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报金额">
{{ viewData.funds_money }}
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动方案">
<div style="word-break: break-all" v-html="viewData.activity_content"></div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动安排">
<div style="word-break: break-all" v-html="viewData.activity_arrange"></div>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="购置物品及价格"></el-form-item>
</el-col>
<el-table :data="viewData.goods" border size="mini" style="width: 100%">
<el-table-column sortable type="index" width="100" label="序号"
align="center" header-align="center">
</el-table-column>
<el-table-column prop="name" label="物品名称" align="center"
header-align="center">
</el-table-column>
<el-table-column prop="price" label="预算费用" align="center"
header-align="center"></el-table-column>
<!-- <el-table-column prop="actualPrice" label="实际费用" align="center"
header-align="center"></el-table-column>-->
</el-table>
<el-row gutter="20">
<el-col :span="24">
<el-form-item label="成果附件">
<file-upload v-if="viewData.resultsFiles&&viewData.resultsFiles.length"
:files="viewData.resultsFiles"
:view="true" style="height: 300px"></file-upload>
<span v-else>暂无</span>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row gutter="20">
<el-col :span="24">
<el-form-item label="附&emsp;&emsp;件">
<file-upload v-if="viewData.files&&viewData.files.length"
:files="viewData.files"
:view="true"></file-upload>
<span v-else>暂无</span>
</el-form-item>
</el-col>
</el-row>-->
</el-form>
<el-descriptions :column="2" border>
<el-descriptions-item label="申请人姓名">{{ viewData.user_name }}</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ viewData.apply_time }}</el-descriptions-item>
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="活动主体类型">{{ viewData.activityTypeName }}</el-descriptions-item>
<el-descriptions-item label="活动项目类型" :span="2">{{ viewData.projectTypeName }}</el-descriptions-item>
<el-descriptions-item label="活动名称" :span="2">{{viewData.activity_name}}</el-descriptions-item>
<!-- <el-descriptions-item label="项目编号" :span="2">{{viewData.projectCode}}</el-descriptions-item>-->
<el-descriptions-item label="申报(承办)单位" :span="2">{{viewData.fundsUnitName}}</el-descriptions-item>
<el-descriptions-item label="活动计划时间" :span="2">
{{viewData.startPlannedDate}}至{{viewData.endPlannedDate}}
</el-descriptions-item>
<el-descriptions-item label="活动地址">{{viewData.venue}}</el-descriptions-item>
<el-descriptions-item label="活动人数">{{viewData.activity_number}}</el-descriptions-item>
<el-descriptions-item label="活动方案" :span="2">
<div v-html="viewData.activity_content"></div>
</el-descriptions-item>
<el-descriptions-item label="活动安排" :span="2">
<div v-html="viewData.activity_arrange"></div>
</el-descriptions-item>
<el-descriptions-item label="购置物品及价格" :span="3">
<el-table :data="viewData.budgets" border size="mini" style="width: 100%">
<el-table-column type="index" width="100" label="序号"></el-table-column>
<el-table-column prop="name" label="费用项目名称"></el-table-column>
<el-table-column prop="unitPrice" label="单价(元)"></el-table-column>
<el-table-column prop="num" label="数量"></el-table-column>
<el-table-column prop="total" label="合计(元)">
<template slot-scope="{row}">
{{ (row.unitPrice * row.num).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<!-- <el-tab-pane label="附件" name="100">
<el-form label-position="top">
@@ -379,11 +285,22 @@ module.exports = {
this.loading = false
if (data) {
this.activeName = this.handle ? "999" : "1"
if(data.files){
data.files = JSON.parse(data.files)
}else{
data.files = []
}
if(data.resultsFiles){
data.resultsFiles = JSON.parse(data.resultsFiles)
}else{
data.resultsFiles = []
}
if (data.budgets) {
data.budgets = JSON.parse(data.budgets)
}else{
data.budgets = []
}
this.viewData = data
this.viewData.files = JSON.parse(data.files)
this.viewData.resultsFiles = JSON.parse(data.resultsFiles)
this.viewData.goods = data.goods
} else {
this.viewData = {}
this.$message({
@@ -396,7 +313,7 @@ module.exports = {
}
</script>
<style>
<style scoped>
.activity-bx-info .el-timeline {
padding-left: 0;
}
@@ -405,5 +322,8 @@ module.exports = {
max-width: 300px;
max-height: 100px;
}
.el-descriptions table {
table-layout: fixed;
}
</style>
@@ -52,9 +52,10 @@
<el-table-column label="满意度" prop="resultScore" header-align="center" align="center" width="350px">
<template slot-scope="{row}">
<el-radio-group v-model="row.resultScore" size="small">
<el-radio disabled label="非常满意">非常满意</el-radio>
<el-radio disabled label="满意">满意</el-radio>
<el-radio disabled label="基本满意">基本满意</el-radio>
<el-radio disabled label="不满意">不满意</el-radio>
<el-radio disabled label="良好">良好</el-radio>
<el-radio disabled label="一般">一般</el-radio>
</el-radio-group>
</template>
</el-table-column>
@@ -63,20 +64,20 @@
</el-row>
<div v-if="viewInfo.zbxx.scoringMode===1">
<el-divider content-position="left">备注</el-divider>
<el-divider content-position="left">简述工作情况</el-divider>
<el-row>
<el-col :span="24">
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit readonly
v-model="nr.bzs[0].options" placeholder="请输入备注"></el-input>
v-model="nr.bzs[0].options" placeholder="请简述工作情况"></el-input>
</el-col>
</el-row>
</div>
</el-form-item>
<template v-if="viewInfo.zbxx.scoringMode === 2">
<vi-title title="备注填写"></vi-title>
<vi-title title="简述工作情况"></vi-title>
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit disabled
v-model="viewInfo.commentPeo.presidentOpinions" placeholder="请输入备注"></el-input>
v-model="viewInfo.commentPeo.presidentOpinions" placeholder="请简述工作情况"></el-input>
</template>
<template v-if="viewInfo.zbxx.scoringMode === 1 && viewInfo.zbxx.reviewMode === 1">
@@ -26,11 +26,11 @@
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item prop="assessment" label="">
<el-checkbox v-model="data.isEvaluationIndex" :disabled="is_view">是否采用以往评议指标</el-checkbox>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="8">
<el-form-item prop="zbId" label="以往评议指标" v-if="data.isEvaluationIndex">
@@ -222,7 +222,7 @@
</template>
</el-table-column>-->
<el-table-column label="是否填写意见" prop="isEvidence" header-align="center" align="center"
<!-- <el-table-column label="是否填写意见" prop="isEvidence" header-align="center" align="center"
width="120px" v-if="data.scoringMode===1">
<template scope="{row}">
<el-switch
@@ -232,7 +232,7 @@
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column v-if="!is_view" label="操作" header-align="center" align="center"
width="200px">
@@ -59,8 +59,8 @@
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
<script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>-->
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>-->
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.3"></script>
@@ -86,9 +86,8 @@ layout("/mobile/platform.html"){
.page-control {
padding: 20px;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 20px;
display: flex;
column-gap: 20px;
position: fixed;
bottom: 0;
left: 0;
@@ -175,6 +174,9 @@ layout("/mobile/platform.html"){
<div class="score" v-if="finishAnswer && ( currentScore || currentScore===0 )">
{{questionData.calcScoreMode==1?'今日最高成绩':'得分'}}{{currentScore}}
</div>
<div class="timer" v-if="questionData.enableTimer && !finishAnswer">
<span>剩余时间:{{remainder}}</span>
</div>
</div>
<div class="survey-head">
<div class="title">
@@ -194,8 +196,8 @@ layout("/mobile/platform.html"){
{{issue.iisdx?'单选':'多选'}}
</van-tag>
</template>
<!-- <van-tag v-if="issue.fraction" type="primary" size="large">{{issue.fraction}}分-->
<!-- </van-tag>-->
<!-- <van-tag v-if="issue.fraction" type="primary" size="large">{{issue.fraction}}分-->
<!-- </van-tag>-->
</div>
<h2 class="question-title">
<span class="question-seq">
@@ -243,10 +245,12 @@ layout("/mobile/platform.html"){
</section>
</div>
<div class="page-control" v-if="!finishAnswer">
<van-button type="info" block @click="save()">保存</van-button>
<!--非计时模式才能保存 否则没意义了-->
<van-button type="info" block @click="save()" v-if="!questionData.enableTimer">保存</van-button>
<van-button type="info" block @click="submit()">提交</van-button>
</div>
<div class="page-control" style="grid-template-columns: auto" v-if="canAnswerAgain && finishAnswer && moment().format('YYYY-MM-DD') === vue.currentDate">
<div class="page-control" style="grid-template-columns: auto"
v-if="canAnswerAgain && finishAnswer && moment().format('YYYY-MM-DD') === vue.currentDate">
<van-button type="info" block @click="answerAgain">
再答一次
</van-button>
@@ -299,7 +303,14 @@ layout("/mobile/platform.html"){
currentScore: null,
//获取用户已回答的轮数 针对单天随机
userHasAnswerRandomNum: 0
userHasAnswerRandomNum: 0,
//倒计时计时器
timerInterval: null,
//答题时间(使用秒)
countDownSeconds: 0,
//剩余时间
remainder: null
}
},
@@ -461,33 +472,69 @@ layout("/mobile/platform.html"){
const msg = '一旦提交不可修改,您确定要提交吗?'
this.$modal.confirm(msg).then(async () => {
const replies = this.questionData.issues.map(v => {
return {
qid: this.id,
issueId: v.iid,
userSelect: v.userSelect,
}
})
const {code} = await $.post(BASE_URL + '/saveAnswer', {
replies: JSON.stringify(replies),
questionId: this.questionData.qid,
isSave: false,
randomCount: this.randomCount
})
this.$modal.closeLoading()
if (code === 0) {
this.$modal.msg('提交成功')
await this.getUserHasAnswerRandomNum()
await this.checkUserFinishAnswer()
await this.getReply()
await this.assignmentAnswer()
await this.checkUserFinishAnswer()
await this.checkCanAnswerAgain()
await this.getScore()
}
this.autoSubmit()
// const replies = this.questionData.issues.map(v => {
// return {
// qid: this.id,
// issueId: v.iid,
// userSelect: v.userSelect,
// }
// })
//
// const {code} = await $.post(BASE_URL + '/saveAnswer', {
// replies: JSON.stringify(replies),
// questionId: this.questionData.qid,
// isSave: false,
// randomCount: this.randomCount
// })
// this.$modal.closeLoading()
// if (code === 0) {
// this.$modal.msg('提交成功')
// await this.getUserHasAnswerRandomNum()
// await this.checkUserFinishAnswer()
// await this.getReply()
// await this.assignmentAnswer()
// await this.checkUserFinishAnswer()
// await this.checkCanAnswerAgain()
// await this.getScore()
// }
})
},
async autoSubmit() {
const replies = this.questionData.issues.map(v => {
return {
qid: this.id,
issueId: v.iid,
userSelect: v.userSelect,
}
})
let takeTime = null
if (this.questionData.enableTimer) {
takeTime = this.questionData.timerMinute * 60 - this.countDownSeconds
}
const {code} = await $.post(BASE_URL + '/saveAnswer', {
replies: JSON.stringify(replies),
questionId: this.questionData.qid,
isSave: false,
randomCount: this.randomCount,
takeTime: takeTime
})
this.$modal.closeLoading()
if (code === 0) {
this.$modal.msg('提交成功')
await this.getUserHasAnswerRandomNum()
await this.checkUserFinishAnswer()
await this.getReply()
await this.assignmentAnswer()
await this.checkUserFinishAnswer()
await this.checkCanAnswerAgain()
await this.getScore()
}
},
//获取回答信息
async getReply() {
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id, {
@@ -559,16 +606,58 @@ layout("/mobile/platform.html"){
currentDate: this.currentDate
})
this.currentScore = resp.data
}
},
checkTimer() {
if (this.timerInterval) {
clearInterval(this.timerInterval)
}
if (!this.finishAnswer) {
this.$dialog.alert({
title: '提示',
message: '本次答题时间' + this.questionData.timerMinute + '分钟,请尽快完成!'
}).then(() => {
this.countDownSeconds = this.questionData.timerMinute * 60
this.timerInterval = setInterval(() => {
this.updateCountdown()
}, 1000)
});
}
},
updateCountdown() {
// 计算剩余的分钟和秒数
let mins = Math.floor(this.countDownSeconds / 60)
let secs = this.countDownSeconds % 60
// 格式化时间,确保分钟和秒数始终是两位数
mins = mins < 10 ? '0' + mins : mins;
secs = secs < 10 ? '0' + secs : secs;
this.remainder = mins + ':' + secs
// 如果倒计时结束,显示结束信息
if (this.countDownSeconds <= 0) {
this.remainder = '时间到'
clearInterval(this.timerInterval)
this.$dialog.alert({
title: '提示',
message: '答题时间到,请点击确认提交答案!'
}).then(() => {
this.autoSubmit()
})
} else {
this.countDownSeconds = this.countDownSeconds - 1
}
}
},
async created() {
if (this.timerInterval) {
clearInterval(this.timerInterval)
}
this.id = GetQueryString("id")
await this.getQuestionData()
await this.checkCanAnswerAgain()
await this.getUserHasAnswerRandomNum()
await this.checkUserFinishAnswer()
await this.getScore()
await this.checkTimer()
this.mLoading = false
}
})
@@ -590,4 +679,4 @@ layout("/mobile/platform.html"){
<!--#
}
#-->
#-->
@@ -327,12 +327,14 @@ layout("/mobile/platform.html"){
})
const result = (resultScore / source) * 100
if (result >= 80) {
if (result > 95) {
this.reviewResult = '非常满意'
} else if (result > 80 && result <= 94) {
this.reviewResult = '满意'
} else if (result >= 60 && result <= 79) {
this.reviewResult = '基本满意'
} else if (result > 60 && result <= 79) {
this.reviewResult = '良好'
} else {
this.reviewResult = '不满意'
this.reviewResult = '一般'
}
/*this.bzList.forEach(v => {
@@ -345,8 +347,6 @@ layout("/mobile/platform.html"){
} else {
this.reviewResult = '不满意'
}*/
console.log(source)
console.log(resultScore)
console.log(this.reviewResult)
vant.Dialog.alert({
title: '测评结果',
@@ -354,14 +354,26 @@ layout("/mobile/platform.html"){
confirmButtonColor: '#1867b0'
})
} else if (this.commentatorData.assessmentMode === 2) {
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
if (result.length >= 8) {
const result = this.bzList.filter(v => v.resultScore === '满意')
const satisfactionPercentage = (result.length / this.bzList.length) * 100;
if (satisfactionPercentage > 95) {
this.reviewResult = '非常满意'
} else if (satisfactionPercentage > 80 && satisfactionPercentage <= 94) {
this.reviewResult = '满意'
} else if (satisfactionPercentage > 60 && satisfactionPercentage <= 79) {
this.reviewResult = '良好'
} else {
this.reviewResult = '一般'
}
/*if (result.length >= 8) {
this.reviewResult = '满意'
} else if (result.length >= 6 && result.length <= 7) {
this.reviewResult = '基本满意'
} else {
this.reviewResult = '不满意'
}
}*/
console.log(result)
console.log(this.reviewResult)
vant.Dialog.alert({
@@ -626,6 +626,28 @@ layout("/layouts/platform.html"){
</el-form-item>
</template>
<vi-title title="上传压缩包设置"></vi-title>
<el-form-item label="是否上传压缩包">
<el-radio :label="true" border v-model="currentZplb.isUploadZip">上传</el-radio>
<el-radio :label="false" border v-model="currentZplb.isUploadZip">不上传</el-radio>
</el-form-item>
<template v-if="currentZplb.isUploadZip === true">
<el-form-item label="文件上传数量">
<el-input-number :max="5" :min="1" style="width: 100%"
v-model="currentZplb.zipNum"></el-input-number>
</el-form-item>
<el-form-item label="上传文件格式">
<el-checkbox-group v-model="currentZplb.zipType">
<el-checkbox border key="zip" label="zip">zip</el-checkbox>
<el-checkbox border key="rar" label="rar">rar</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="每个文件大小">
<el-input placeholder="请填写每个文件大小" type="number" v-model="currentZplb.zipSize">
<template slot="append">Mb</template>
</el-input>
</el-form-item>
</template>
</el-form>
<el-row class="mt20" justify="end" type="flex">
@@ -1046,6 +1068,11 @@ layout("/layouts/platform.html"){
this.$set(zplb, 'otherType', zplb.otherType ? zplb.otherType : ['mp4', 'docx'])
this.$set(zplb, 'otherFileNum', zplb.otherFileNum ? zplb.otherFileNum : 1)
this.$set(zplb, 'otherSize', zplb.otherSize ? zplb.otherSize : 2)
this.$set(zplb, 'isUploadZip', zplb.isUploadZip ? zplb.isUploadZip : false)
this.$set(zplb, 'zipType', zplb.zipType ? zplb.zipType : ['rar', 'zip'])
this.$set(zplb, 'zipNum', zplb.zipNum ? zplb.zipNum : 1)
this.$set(zplb, 'zipSize', zplb.zipSize ? zplb.zipSize : 2)
},
doSearch() {
this.pageForm.pageNumber = 1;
@@ -370,7 +370,7 @@ layout("/layouts/platform.html"){
<el-input :maxlength="zplb2Config.maxWordCount" show-word-limit
type="textarea" v-model="AddFormData.hdsbzpms"></el-input>
</el-form-item>
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther">
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther||zplb2Config.isUploadZip">
<el-divider content-position="left">作品信息</el-divider>
<el-form-item label="照片" required v-if="zplb2Config.isUploadPhoto">
<el-upload
@@ -397,6 +397,18 @@ layout("/layouts/platform.html"){
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="压缩包" v-if="zplb2Config.isUploadZip">
<el-upload
:auto-upload="false"
:file-list="ziplist"
:limit="zplb2Config.zipNum"
:on-change="zipChange"
:on-exceed="zipExceed"
action=""
name="zipfile">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</div>
</el-form>
@@ -495,6 +507,20 @@ layout("/layouts/platform.html"){
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="压缩包" v-if="zplb2Config.isUploadZip">
<el-upload
:auto-upload="false"
:file-list="ziplist"
:limit="zplb2Config.zipNum"
:on-change="zipChange"
:on-exceed="zipRemove"
action=""
name="zipfile">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</div>
</el-form>
@@ -576,6 +602,9 @@ layout("/layouts/platform.html"){
formhdxxlist: [],
yearActivityList: [],
zplb2Config: {},
ziplist:[]
}
},
components: {
@@ -671,6 +700,30 @@ layout("/layouts/platform.html"){
this.vadlist = this.vadlist.filter(v => v.urlId !== file.url.substring(length))
}
},
zipChange(file, fileList){
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase();
const whiteList = this.zplb2Config.zipType
if (!whiteList.includes(fileSuffix)) {
this.ziplist = []
this.$message.warning('上传文件只能是' + whiteList.join(',') + '格式')
return false
}
this.ziplist = fileList;
},
zipRemove(file, fileList){
if (file.status === 'success') {
const length = file.url.lastIndexOf("=") + 1
this.readytodelfile.push(file.url.substring(length));
this.ziplist.map(v => {
const length = v.url.lastIndexOf("=") + 1
v.urlId = v.url.substring(length);
})
this.ziplist = this.ziplist.filter(v => v.urlId !== file.url.substring(length))
}
},
zipExceed(){
this.$message.warning('文件最多上传' + this.zplb2Config.zipNum + '个');
},
openAdd() {
this.AddFormData = {}
this.zplb2Config = {}
@@ -22,284 +22,281 @@ layout("/layouts/platform.html"){
</style>
<div id="app" style="padding: 20px 40px" v-cloak>
<div id="app" v-cloak>
<guava>
<el-card class="box-card" shadow="never">
<template #header>
<h3 style="color: rgb(24, 103, 176);">填写申报信息</h3>
</template>
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="120px"
ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="申请人姓名" prop="user_name">
<el-input disabled type="text" v-model="formData.user_name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报时间" prop="apply_time">
<el-input disabled type="text" v-model="formData.apply_time"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式" prop="mobile">
<el-input placeholder="请输入联系方式" type="number"
v-model="formData.mobile"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动主体类型" prop="activity_type">
<el-select @change="getProjectCodeChange" placeholder="请选择活动主体类型"
style="width: 100%"
v-model="formData.activity_type">
<el-option
:key="item.id"
:label="item.name+' ('+item.code+')'"
:value="item.code"
v-for="item in activityType">
</el-option>
<!-- <span>
<el-card class="box-card">
<div class="clearfix" slot="header">
<span style="color: #409EFF;font-size: 18px">填写申报信息</span>
</div>
&lt;!&ndash;#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#&ndash;&gt;
<el-option label="基层工会活动" value="1"></el-option>
&lt;!&ndash;#}#&ndash;&gt; &lt;!&ndash;#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#&ndash;&gt;
<el-option label="协会(社团)活动" value="2"></el-option>
&lt;!&ndash;#}#&ndash;&gt;
&lt;!&ndash;#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#&ndash;&gt;
<el-option label="校工会活动" value="3"></el-option>
&lt;!&ndash;#}#&ndash;&gt;
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="120px"
ref="form">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="申请人姓名" prop="user_name">
<el-input disabled type="text" v-model="formData.user_name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报时间" prop="apply_time">
<el-input disabled type="text" v-model="formData.apply_time"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式" prop="mobile">
<el-input placeholder="请输入联系方式" type="number"
v-model="formData.mobile"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动主体类型" prop="activity_type">
<el-select @change="getProjectCodeChange" placeholder="请选择活动主体类型"
style="width: 100%"
v-model="formData.activity_type">
<el-option
:key="item.id"
:label="item.name+' ('+item.code+')'"
:value="item.code"
v-for="item in activityType">
</el-option>
<!-- <span>
&lt;!&ndash;#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#&ndash;&gt;
<el-option label="基层工会活动" value="1"></el-option>
&lt;!&ndash;#}#&ndash;&gt; &lt;!&ndash;#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#&ndash;&gt;
<el-option label="协会(社团)活动" value="2"></el-option>
&lt;!&ndash;#}#&ndash;&gt;
&lt;!&ndash;#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#&ndash;&gt;
<el-option label="校工会活动" value="3"></el-option>
&lt;!&ndash;#}#&ndash;&gt;
</span>-->
</el-select>
</el-form-item>
</el-col>
</span>-->
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动名称" prop="activity_name">
<!-- <el-autocomplete :fetch-suggestions="querySearchAsync"
@input="activityChange"
@select="handleSelect"
placeholder="请输入内容"
style="width: 100%"
v-model="formData.activity_name"
></el-autocomplete>-->
<el-input placeholder="请输入活动名称"
v-model="formData.activity_name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动名称" prop="activity_name">
<!-- <el-autocomplete :fetch-suggestions="querySearchAsync"
@input="activityChange"
@select="handleSelect"
placeholder="请输入内容"
style="width: 100%"
v-model="formData.activity_name"
></el-autocomplete>-->
<el-input placeholder="请输入活动名称"
v-model="formData.activity_name"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="项目编号" prop="projectCode">
<el-input disabled placeholder="选择活动类型自动生成"
v-model="formData.projectCode"></el-input>
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="活动项目类型" prop="projectTypeCode">
<el-select placeholder="请选择活动类型" style="width: 100%;"
v-model="formData.projectTypeCode">
<el-option
:key="item.id"
:label="item.name+' ('+item.code+')'"
:value="item.code"
v-for="item in projectType">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
v-show="formData.activity_type!=40003">
<el-input placeholder="请输入申报(承办)单位" type="text"
v-model="formData.fundsUnitName"></el-input>
</el-form-item>
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
v-show="formData.activity_type==40003">
<el-select placeholder="请选择申报(承办)单位"
style="width: 100%;"
v-model="formData.fundsUnitName">
<el-option
:key="item.name"
:label="item.name+' ('+item.code+')'"
:value="item.name"
v-for="item in fundsUnitNameOption">
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item prop="time" label="活动时间">
<el-date-picker
style="width: 100%"
v-model="formData.time"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="活动计划时间" prop="plannedDate">
<el-date-picker
end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
style="width: 100%"
type="daterange"
v-model="formData.plannedDate"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动地址" prop="venue">
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
v-model="formData.venue"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动人数" prop="activity_number">
<el-input maxlength="50" placeholder="请填写活动人数"
type="number"
v-model="formData.activity_number"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申报金额" prop="funds_money">
<el-input disabled placeholder="输入物品单价自动计算" type="number"
v-model="formData.funds_money"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item prop="payeeId" label="收款人">
<el-select v-model="formData.payeeId" placeholder="请选择联系人"
filterable
remote
clearable
reserve-keyword
:remote-method="remoteMethod"
:loading="selectLoading"
style="width: 100%">
<el-option
v-for="item in userList"
:key="item.id"
:label="item.username+'-'+item.loginname+'-'+item.unitname"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_card_number" label="报销卡号">
<el-input v-model="formData.activity_card_number" type="number"></el-input>
<!-- <el-col :span="12">
<el-form-item label="项目编号" prop="projectCode">
<el-input disabled placeholder="选择活动类型自动生成"
v-model="formData.projectCode"></el-input>
</el-form-item>
</el-col>-->
<el-col :span="12">
<el-form-item label="活动项目类型" prop="projectTypeCode">
<el-select placeholder="请选择活动类型" style="width: 100%;"
v-model="formData.projectTypeCode">
<el-option
:key="item.id"
:label="item.name+' ('+item.code+')'"
:value="item.code"
v-for="item in projectType">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-col :span="12">
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
v-show="formData.activity_type!=40003">
<el-input placeholder="请输入申报(承办)单位" type="text"
v-model="formData.fundsUnitName"></el-input>
</el-form-item>
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
v-show="formData.activity_type==40003">
<el-select placeholder="请选择申报(承办)单位"
style="width: 100%;"
v-model="formData.fundsUnitName">
<el-option
:key="item.name"
:label="item.name+' ('+item.code+')'"
:value="item.name"
v-for="item in fundsUnitNameOption">
</el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item prop="time" label="活动时间">
<el-date-picker
style="width: 100%"
v-model="formData.time"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>-->
<div style="display: flex;margin: 20px 0">
<el-divider content-position="left">购置物品及价格</el-divider>
<el-col :span="12">
<el-form-item label="活动计划时间" prop="plannedDate">
<el-date-picker
end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
style="width: 100%"
type="daterange"
v-model="formData.plannedDate"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<div style="padding-left: 10px;padding-top: 20px">
<el-tooltip class="item" content="点击添加购置物品及价格" effect="dark" placement="top">
<el-button @click="formData.goods.push({})" circle icon="el-icon-plus"
type="primary"></el-button>
</el-tooltip>
</div>
<el-col :span="12">
<el-form-item label="活动地址" prop="venue">
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
v-model="formData.venue"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动人数" prop="activity_number">
<el-input maxlength="50" placeholder="请填写活动人数"
type="number"
v-model="formData.activity_number"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="申报金额" prop="funds_money">-->
<!-- <el-input disabled placeholder="输入物品单价自动计算" type="number"-->
<!-- v-model="formData.funds_money"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">
<el-form-item prop="payeeId" label="收款人">
<el-select v-model="formData.payeeId" placeholder="请选择联系人"
filterable
remote
clearable
reserve-keyword
:remote-method="remoteMethod"
:loading="selectLoading"
style="width: 100%">
<el-option
v-for="item in userList"
:key="item.id"
:label="item.username+'-'+item.loginname+'-'+item.unitname"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="activity_card_number" label="报销卡号">
<el-input v-model="formData.activity_card_number" type="number"></el-input>
</el-form-item>
</el-col>-->
</el-row>
<el-form-item label="活动费用预算">
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
<el-table-column label="费用项目名称" prop="name">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.name'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input v-model="row.name" maxlength="50"
placeholder="请输入费用项目名称"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="单价(元)" prop="unitPrice">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.unitPrice'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="单价(元)" v-model="row.unitPrice" :precision="2"
:min="1"></el-input-number>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="数量" prop="num">
<template scope="{row,$index}">
<el-form-item label-width="0"
:prop="'budgets.'+$index+'.num'"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-input-number placeholder="数量" v-model="row.num" :precision="0"
:min="1"></el-input-number>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="合计(元)" prop="total">
<template slot-scope="{row}">
{{isNaN(row.unitPrice * row.num) ? '输入单价和数量自动计算' : (row.unitPrice *
row.num).toFixed(2)}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="150px">
<template slot="header" slot-scope="scope">
<el-button @click="formData.budgets.push({})" icon="el-icon-plus" type="primary"
size="mini">添加
</el-button>
</template>
<template slot-scope="scope">
<el-button :disabled="formData.budgets.length==1"
@click="formData.budgets.splice(scope.$index,1)"
size="mini"
icon="el-icon-delete"
type="danger"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="活动方案">
<text-editor v-model="formData.activity_content"></text-editor>
</el-form-item>
<el-form-item label="活动安排">
<text-editor v-model="formData.activity_arrange"></text-editor>
</el-form-item>
<!-- <el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附件</span>
</el-divider>
<el-row :gutter="40">
<el-col :span="24" class="mb25">
<el-form-item label="附件" prop="files">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
</el-col>
</el-row>-->
<!--<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签&emsp;&emsp;字</span>
</el-divider>
<el-form-item prop="sign">
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
</el-form-item>-->
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="doAdd()" type="primary">确 定</el-button>
</div>
<el-form-item>
<el-table :data="formData.goods" border height="200" size="mini"
style="width: 100%">
<el-table-column align="center" header-align="center" label="序号" sortable
type="index" width="100">
</el-table-column>
<el-table-column align="center" header-align="center" label="物品名称"
prop="name">
<template slot-scope="{row}">
<el-input maxlength="50" placeholder="物品名称" type="text"
v-model="row.name"></el-input>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="预算费用"
prop="price">
<template slot-scope="{row}">
<el-input @input="blur1" maxlength="50" placeholder="预算费用"
type="number" v-model="row.price"></el-input>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" fixed="right"
header-align="center"
label="操作"
width="80px">
<template slot-scope="scope">
<el-button :disabled="formData.goods.length==0"
@click="delNotesItem(scope)" circle
icon="el-icon-delete"
type="danger"></el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-divider class="dia" content-position="left"><span
style="color: #3ea1ec;">活动方案</span>
</el-divider>
<el-form-item class="is-required" prop="activity_content">
<text-editor v-model="formData.activity_content"></text-editor>
</el-form-item>
<el-divider class="dia" content-position="left"><span
style="color: #3ea1ec;">活动安排</span>
</el-divider>
<el-form-item class="is-required" prop="activity_arrange">
<text-editor v-model="formData.activity_arrange"></text-editor>
</el-form-item>
<!-- <el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附件</span>
</el-divider>
<el-row :gutter="40">
<el-col :span="24" class="mb25">
<el-form-item label="附件" prop="files">
<file-upload :files.sync="formData.files" card></file-upload>
</el-form-item>
</el-col>
</el-row>-->
<!--<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签&emsp;&emsp;字</span>
</el-divider>
<el-form-item prop="sign">
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
</el-form-item>-->
</el-form>
<div style="float: right;margin: 20px 0">
<el-button @click="doAdd()" type="primary">确 定</el-button>
</div>
</el-card>
</el-card>
</guava>
</div>
<script>
@@ -324,6 +321,9 @@ layout("/layouts/platform.html"){
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
formData: {
budgets: []
}
}
},
@@ -433,6 +433,12 @@ layout("/layouts/platform.html"){
formData.endTime = formData.plannedDate[1]
formData.plannedDate = undefined
}
if (formData.budgets) {
formData.budgets.forEach(v => {
v.total = (v.unitPrice * v.num).toFixed(2)
})
}
const url = "/platform/jf/activity_bx/apply"
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
activityBx: JSON.stringify(formData)
@@ -451,6 +457,9 @@ layout("/layouts/platform.html"){
this.delNotesList = []
this.formData = {
apply_type: 1,
budgets: [
{}
],
goods: [],
files: [],
time: [],
@@ -466,10 +475,14 @@ layout("/layouts/platform.html"){
},
async findOne(id) {
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
if (resp.code === 0) {
resp.data.activity_type = resp.data.activity_type + ""
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
if(resp.data.budgets){
resp.data.budgets = JSON.parse(resp.data.budgets)
}else{
resp.data.budgets = []
}
this.formData = resp.data
}
}
@@ -368,7 +368,6 @@ layout("/layouts/platform.html"){
</el-radio-group>
</el-form-item>
<el-form-item label="抽奖规则" prop="raffleRule" v-if="formData.isRaffle">
<el-table :data="formData.raffleRule" border size="small">
<el-table-column label="开始答题时间" prop="startAnswerDate">
@@ -457,6 +456,22 @@ layout("/layouts/platform.html"){
</el-table>
</el-form-item>
<vi-title2 title="计时设置"></vi-title2>
<el-form-item label="是否开启计时" prop="enableTimer" :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
<el-radio-group v-model="formData.enableTimer" size="small">
<el-radio :label="true" border>是</el-radio>
<el-radio :label="false" border>否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formData.enableTimer"
label="计时分钟"
prop="timerMinute"
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
<el-input-number v-model="formData.timerMinute" :min="0.1" :precision="1"></el-input-number>
</el-form-item>
<!-- <el-form-item label="抽奖时间" prop="raffleTime"-->
<!-- v-if="formData.isRaffle"-->
<!-- :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">-->
@@ -128,6 +128,12 @@ layout("/layouts/platform.html"){
<el-table-column label="每轮得分" prop="everyRandomScore"
v-if="questionCtMode==2 && isSameDay"></el-table-column>
<el-table-column label="答题用时" prop="takeTime" v-if="enableTimer">
<template scope="scope">
{{moment.utc(moment.duration(scope.row.takeTime,"seconds").asMilliseconds()).format("HH时mm分ss秒")}}
</template>
</el-table-column>
</el-table>
<!--# include("/layouts/pagination.html"){}#-->
@@ -207,6 +213,15 @@ layout("/layouts/platform.html"){
return null
}
return null
},
enableTimer(){
if(this.pageForm.questionId){
const currentQuestion = this.questions.find(v => v.qid === this.pageForm.questionId)
if (currentQuestion) {
return currentQuestion.enableTimer
}
return null
}
}
},
methods: {
@@ -200,21 +200,21 @@ layout("/layouts/platform.html"){
</el-table>
</el-row>
<div v-if="formData.scoringMode===1">
<el-divider content-position="left">备注填写</el-divider>
<el-divider content-position="left">简述工作情况</el-divider>
<el-row>
<el-col :span="24">
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
v-model="o.remark" placeholder="请输入备注"></el-input>
v-model="o.remark" placeholder="请简述工作情况"></el-input>
</el-col>
</el-row>
</div>
</el-form-item>
<template v-if="formData.scoringMode===2">
<vi-title title="备注填写"></vi-title>
<vi-title title="简述工作情况"></vi-title>
<el-form-item prop="options" label-width="0px">
<el-input type="textarea" :rows="2" maxlength="300" show-word-limit
v-model="presidentOpinions" placeholder="请输入备注"></el-input>
v-model="presidentOpinions" placeholder="请简述工作情况"></el-input>
</el-form-item>
</template>
@@ -408,7 +408,6 @@ layout("/layouts/platform.html"){
this.$message.warning(resp.msg)
}
})
},
async createdReviewResult(){
if (this.formData.assessmentMode === 1) {
@@ -419,24 +418,43 @@ layout("/layouts/platform.html"){
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
if (result >= 80) {
if (result > 95) {
this.formData.reviewResult = '非常满意'
} else if (result > 80 && result <= 94) {
this.formData.reviewResult = '满意'
} else if (result > 60 && result <= 79) {
this.formData.reviewResult = '良好'
} else {
this.formData.reviewResult = '一般'
}
/*if (result >= 80) {
this.formData.reviewResult = '满意'
} else if (result >= 60 && result <= 79) {
this.formData.reviewResult = '基本满意'
} else {
this.formData.reviewResult = '不满意'
}
}*/
} else if (this.formData.assessmentMode === 2) {
const result = this.formData.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
const satisfactionPercentage = (result.length / this.formData.bzList.length) * 100;
if (satisfactionPercentage >= 80) {
if (satisfactionPercentage > 95) {
this.formData.reviewResult = '非常满意'
} else if (satisfactionPercentage > 80 && satisfactionPercentage <= 94) {
this.formData.reviewResult = '满意'
} else if (satisfactionPercentage > 60 && satisfactionPercentage <= 79) {
this.formData.reviewResult = '良好'
} else {
this.formData.reviewResult = '一般'
}
/*if (satisfactionPercentage >= 80) {
this.formData.reviewResult = '满意'
} else if (satisfactionPercentage >= 60 && satisfactionPercentage <= 79) {
this.formData.reviewResult = '基本满意'
} else {
this.formData.reviewResult = '不满意'
}
}*/
const user = this.userList.find(v=> v.id === this.president)
this.formData.evaluatedPersonName = user.username
this.formData.evaluatedPersonType = user.evaluatedPersonType
@@ -103,7 +103,9 @@ layout("/layouts/platform.html"){
loading: true,
activeName: '1',
tableData: [],
formData: {},
formData: {
applyTime: []
},
viewData: {
nrs: [{
bzs: [{}]
@@ -131,8 +133,9 @@ layout("/layouts/platform.html"){
const {code, data, msg} = await $.get(loc() + '/edit', {id})
if (code === 0) {
this.formData = data
if (this.formData.startTime && this.formData.endTime) {
this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
if (data.startTime && data.endTime) {
this.$set(this.formData, 'applyTime', [data.startTime, data.endTime])
// this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
}
this.$refs.guava.edit()
}
@@ -189,8 +192,12 @@ layout("/layouts/platform.html"){
this.$refs.guava.view()
this.loading = true;
const {code, data, msg} = await $.get(loc() + '/edit', {id})
if (code == 0) {
if (code === 0) {
this.viewData = data
if (data.startTime && data.endTime) {
this.$set(this.viewData, 'applyTime', [data.startTime, data.endTime])
// this.formData.applyTime = [this.formData.startTime, this.formData.endTime]
}
}
this.loading = false;
},
@@ -98,7 +98,7 @@ layout("/layouts/platform.html"){
<el-tooltip
:content="canDownload ? ('导出【'+ row.unionName +'】管理员自我评议的评议结果') : ('导出【'+ row.unionName +'】下所有评议结果的压缩包') "
placement="top">
<el-button v-if="canDownload" size="mini" type="primary"
<el-button v-if="canDownload && row.num > 0" size="mini" type="primary"
@click="doDownLoad(row,canDownload)">导出
</el-button>
</el-tooltip>
@@ -119,24 +119,27 @@ layout("/layouts/platform.html"){
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item" style="width: 480px !important;">
<div class="search-item-option">
<el-radio-group v-model="userPageForm.reviewResult"
@change="doUserSearch">
<el-radio-button label="">
全部
<span class="ml2">
{{reviewResultData.bmy+reviewResultData.jbmy+reviewResultData.my}}
{{reviewResultData.fcmy + reviewResultData.my + reviewResultData.lh + reviewResultData.yb}}
</span>
</el-radio-button>
<el-radio-button label="非常满意">非常满意
<span class="ml2">{{reviewResultData.fcmy || 0}}</span>
</el-radio-button>
<el-radio-button label="满意">满意
<span class="ml2">{{reviewResultData.my || 0}}</span>
</el-radio-button>
<el-radio-button label="基本满意">基本满意
<span class="ml2">{{reviewResultData.jbmy || 0}}</span>
<el-radio-button label="良好">良好
<span class="ml2">{{reviewResultData.lh || 0}}</span>
</el-radio-button>
<el-radio-button label="不满意">不满意
<span class="ml2">{{reviewResultData.bmy || 0}}</span>
<el-radio-button label="一般">一般
<span class="ml2">{{reviewResultData.yb || 0}}</span>
</el-radio-button>
</el-radio-group>
</div>
@@ -174,9 +177,8 @@ layout("/layouts/platform.html"){
label="操作" width="240px" fixed="right">
<template scope="{row}">
<el-button size="mini" @click="openUserView(row)">查看</el-button>
<el-button size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
<el-button size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件
</el-button>
<el-button v-if="canDownload" size="mini" type="primary" @click="downloadByPeoId(row)">导出</el-button>
<el-button v-if="canDownload" size="mini" type="primary" @click="downloadFilesByPeoId(row)">导出附件</el-button>
</template>
</el-table-column>
</el-table>
@@ -337,26 +339,25 @@ layout("/layouts/platform.html"){
downloadByPeoId(row) {
window.open(loc() + '/exportByPeoId?peoId=' + row.id)
},
downloadFilesByPeoId(row) {
async downloadFilesByPeoId(row) {
const result = this.validateHasFiles({peoId: row.id})
if (!result) {
return
}
window.open(loc() + '/exportFilesByPeoId?peoId=' + row.id)
},
validateHasFiles(data) {
$.post('/platform/wakeshome/review/statistics/validateHasFiles', {
async validateHasFiles(data) {
const res = await $.post('/platform/wakeshome/review/statistics/validateHasFiles', {
peoId: data.peoId ? data.peoId : '',
zbId: data.zbId ? data.zbId : '',
unionId: data.unionId ? data.unionId : ''
}).then(res => {
if (res.code === 0) {
return true
} else {
this.$message.warning("未上传附件,无法导出")
return false
}
})
if (res.code === 0) {
return true
} else {
this.$message.warning("未上传附件,无法导出")
return false
}
},
async getReviewResultNum(row) {
const res = await $.post(loc() + "/getReviewResultNum", {
@@ -422,7 +423,7 @@ layout("/layouts/platform.html"){
computed: {
canDownload() {
const data = this.zbList.find(v => v.id === this.pageForm.zbId)
return data.commentTarget === 3 && data.unionIds && data.unionIds.length > 0
return data.scoringMode == 1
}
},
async created() {
@@ -54,7 +54,7 @@ layout("/layouts/platform.html"){
</div>
<div class="btn-group tool-button mt5">
<el-select class="d-select" clearable filterable
placeholder="请选择活动"
placeholder="请选择休养"
v-model="pageForm.pastQuota"
width="300px">
<el-option
@@ -82,7 +82,7 @@ layout("/layouts/platform.html"){
type="primary"></el-button>
</div>
<div class="pull-right offscreen-right mt5">
<el-button @click="openAdd" icon="el-icon-plus">创建活动</el-button>
<el-button @click="openAdd" icon="el-icon-plus">创建休养</el-button>
</div>
</el-card>
@@ -97,7 +97,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="活动名称"
<el-table-column align="center" header-align="center" label="休养名称"
prop="name"
width="300px">
<template scope="scope">
@@ -107,11 +107,11 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="活动场地"
<el-table-column align="center" header-align="center" label="休养场地"
prop="hdcd"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="活动时间"
<el-table-column align="center" header-align="center" label="休养时间"
prop="hdkssj"
sortable>
<template scope="scope">
@@ -177,7 +177,7 @@ layout("/layouts/platform.html"){
<el-row style="padding: 0 10%;" v-loading="loading">
<el-steps :active="stepActive" finish-status="success" simple>
<el-step description="" title="活动信息">
<el-step description="" title="休养信息">
</el-step>
<el-step description="" title="名额分配">
@@ -192,11 +192,11 @@ layout("/layouts/platform.html"){
<el-form :model="formData" :rules="formRules"
label-width="120px"
ref="form">
<el-form-item class="view-header" label="填写活动信息&emsp;"
<el-form-item class="view-header" label="填写休养信息&emsp;"
label-width="135px">
</el-form-item>
<el-form-item label="活动名称" prop="name">
<el-input maxlength="100" placeholder="请填写活动名称"
<el-form-item label="休养名称" prop="name">
<el-input maxlength="100" placeholder="请填写休养名称"
type="text"
v-model="formData.name"></el-input>
</el-form-item>
@@ -216,7 +216,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动时间" prop="hdsj">
<el-form-item label="休养时间" prop="hdsj">
<el-date-picker
align="right"
end-placeholder="结束日期"
@@ -230,8 +230,8 @@ layout("/layouts/platform.html"){
</el-col>
</el-row>
<el-form-item label="活动场地" prop="hdcd">
<el-input maxlength="100" placeholder="请填写活动场地"
<el-form-item label="休养场地" prop="hdcd">
<el-input maxlength="100" placeholder="请填写休养场地"
type="text"
v-model="formData.hdcd"></el-input>
</el-form-item>
@@ -419,13 +419,13 @@ layout("/layouts/platform.html"){
<el-row style="padding: 0 10%;" v-loading="loading">
<el-tabs stretch v-model="tabs_active">
<el-tab-pane label="活动信息" name="1">
<el-tab-pane label="休养信息" name="1">
<el-form :model="formData" :rules="formRules"
label-width="120px"
ref="form">
<vi-title title="修改活动信息"></vi-title>
<el-form-item label="活动名称" prop="name">
<el-input maxlength="100" placeholder="请填写活动名称"
<vi-title title="修改休养信息"></vi-title>
<el-form-item label="休养名称" prop="name">
<el-input maxlength="100" placeholder="请填写休养名称"
type="text"
v-model="formData.name"></el-input>
</el-form-item>
@@ -445,7 +445,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="活动时间" prop="hdsj">
<el-form-item label="休养时间" prop="hdsj">
<el-date-picker
align="right"
end-placeholder="结束日期"
@@ -459,8 +459,8 @@ layout("/layouts/platform.html"){
</el-col>
</el-row>
<el-form-item label="活动场地" prop="hdcd">
<el-input maxlength="100" placeholder="请填写活动场地"
<el-form-item label="休养场地" prop="hdcd">
<el-input maxlength="100" placeholder="请填写休养场地"
type="text"
v-model="formData.hdcd"></el-input>
</el-form-item>
@@ -471,7 +471,7 @@ layout("/layouts/platform.html"){
v-model="formData.hdzysx"></el-input>
</el-form-item>
<el-form-item label="活动内容" prop="hdnr">
<el-form-item label="休养内容" prop="hdnr">
<div id="lrEditor" v-if="v=='edit'"></div>
</el-form-item>
@@ -606,7 +606,7 @@ layout("/layouts/platform.html"){
data() {
let validHdnr = (rule, value, callback) => {
if (!this.formData.hdnr || !dd3s.html2txt(this.formData.hdnr)) {
callback(new Error('请填写活动内容'));
callback(new Error('请填写休养内容'));
} else {
callback();
}
@@ -643,11 +643,11 @@ layout("/layouts/platform.html"){
pageOrderBy: ""
},
formRules: {
name: [{required: true, message: '请填写活动名称', trigger: ['blur', 'change']}],
name: [{required: true, message: '请填写休养名称', trigger: ['blur', 'change']}],
bmsj: [{required: true, message: '请选择报名时间', trigger: ['blur', 'change']}],
hdsj: [{required: true, message: '请选择活动时间', trigger: ['blur', 'change']}],
hdcd: [{required: true, message: '请填写活动场地', trigger: ['blur', 'change']}],
hdzysx: [{required: true, message: '请填写活动场地', trigger: ['blur', 'change']}],
hdsj: [{required: true, message: '请选择休养时间', trigger: ['blur', 'change']}],
hdcd: [{required: true, message: '请填写休养场地', trigger: ['blur', 'change']}],
hdzysx: [{required: true, message: '请填写休养场地', trigger: ['blur', 'change']}],
hdnr: [{validator: validHdnr, trigger: ['blur', 'change']}],
},
subDis: false,