From 9d64e0d2a5fc145dc3d1a2a3dfbe13fbdcbf1ded Mon Sep 17 00:00:00 2001 From: zhaoxinyu Date: Fri, 20 Sep 2024 16:56:20 +0800 Subject: [PATCH] jug --- .../hd/controller/wmhd/HdMangeController.java | 111 ++-- .../java/io/v/nutz/hd/models/Hd_wm_zplb.java | 23 + .../java/io/v/nutz/jf/model/ActivityBx.java | 16 + .../controller/QuestionH5Controller.java | 6 +- .../io/v/nutz/question/model/Question.java | 11 + .../question/model/QuestionUserScore.java | 5 + .../question/service/QuestionService.java | 2 +- .../service/impl/QuestionServiceImpl.java | 6 +- .../shiro/config/EasyCredentialsMatch.java | 2 +- .../components/activityBx/ActivityBxInfo.vue | 186 ++---- .../resources/views/layouts/platform.html | 4 +- .../views/mobile/question/answer.html | 159 +++-- .../views/platform/hd/wmhd/hdMange.html | 27 + .../views/platform/hd/wmhd/zpMange.html | 55 +- .../views/platform/jf/Funds/apply.html | 545 +++++++++--------- .../views/platform/question/question.html | 17 +- 16 files changed, 672 insertions(+), 503 deletions(-) diff --git a/src/main/java/io/v/nutz/hd/controller/wmhd/HdMangeController.java b/src/main/java/io/v/nutz/hd/controller/wmhd/HdMangeController.java index 47c2ee9..8f7d87f 100644 --- a/src/main/java/io/v/nutz/hd/controller/wmhd/HdMangeController.java +++ b/src/main/java/io/v/nutz/hd/controller/wmhd/HdMangeController.java @@ -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 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 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 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 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 lbids = new ArrayList<>(); + List zpLbids = new ArrayList<>(); - hdWmxxService.update(hdWmXx); - List lbids = new ArrayList<>(); - List zpLbids = new ArrayList<>(); + List lbs = hdWmXx.getLbs(); - List lbs = hdWmXx.getLbs(); - - //删除 - for (int i = 0; i < lbs.size(); i++) { - List 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 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 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 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); } diff --git a/src/main/java/io/v/nutz/hd/models/Hd_wm_zplb.java b/src/main/java/io/v/nutz/hd/models/Hd_wm_zplb.java index e052324..245413c 100644 --- a/src/main/java/io/v/nutz/hd/models/Hd_wm_zplb.java +++ b/src/main/java/io/v/nutz/hd/models/Hd_wm_zplb.java @@ -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 zipType; + + @Column + @Comment("压缩包大小") + @ColDefine(type = ColType.INT, width = 10) + private Integer zipSize; + @Column @Comment("排序") @ColDefine(type = ColType.INT, width = 4) diff --git a/src/main/java/io/v/nutz/jf/model/ActivityBx.java b/src/main/java/io/v/nutz/jf/model/ActivityBx.java index 2525659..03737a7 100644 --- a/src/main/java/io/v/nutz/jf/model/ActivityBx.java +++ b/src/main/java/io/v/nutz/jf/model/ActivityBx.java @@ -310,6 +310,11 @@ public class ActivityBx { @Many(field = "reid") private List goods; + @Column + @Comment("申报经费预算") + @ColDefine(type = ColType.MYSQL_JSON) + private List 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; + } + } diff --git a/src/main/java/io/v/nutz/question/controller/QuestionH5Controller.java b/src/main/java/io/v/nutz/question/controller/QuestionH5Controller.java index af10f3d..69c23d5 100644 --- a/src/main/java/io/v/nutz/question/controller/QuestionH5Controller.java +++ b/src/main/java/io/v/nutz/question/controller/QuestionH5Controller.java @@ -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(); } diff --git a/src/main/java/io/v/nutz/question/model/Question.java b/src/main/java/io/v/nutz/question/model/Question.java index cabd140..9490843 100644 --- a/src/main/java/io/v/nutz/question/model/Question.java +++ b/src/main/java/io/v/nutz/question/model/Question.java @@ -151,6 +151,17 @@ public class Question implements Serializable { @ColDefine(type = ColType.MYSQL_JSON) private List raffleRule; + @Column + @Comment("是否启用计时器") + @ColDefine(type = ColType.BOOLEAN) + @Default("0") + private Boolean enableTimer; + + @Column + @Comment("计时分钟") + @ColDefine(type = ColType.FLOAT,precision = 1) + private Double timerMinute; + /** * 抽奖规则 */ diff --git a/src/main/java/io/v/nutz/question/model/QuestionUserScore.java b/src/main/java/io/v/nutz/question/model/QuestionUserScore.java index b417aa0..1634b69 100644 --- a/src/main/java/io/v/nutz/question/model/QuestionUserScore.java +++ b/src/main/java/io/v/nutz/question/model/QuestionUserScore.java @@ -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; } diff --git a/src/main/java/io/v/nutz/question/service/QuestionService.java b/src/main/java/io/v/nutz/question/service/QuestionService.java index 6e6afe7..c70ad29 100644 --- a/src/main/java/io/v/nutz/question/service/QuestionService.java +++ b/src/main/java/io/v/nutz/question/service/QuestionService.java @@ -24,7 +24,7 @@ public interface QuestionService extends ViService { * @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); /** diff --git a/src/main/java/io/v/nutz/question/service/impl/QuestionServiceImpl.java b/src/main/java/io/v/nutz/question/service/impl/QuestionServiceImpl.java index 9d1abbc..a981ed7 100644 --- a/src/main/java/io/v/nutz/question/service/impl/QuestionServiceImpl.java +++ b/src/main/java/io/v/nutz/question/service/impl/QuestionServiceImpl.java @@ -94,7 +94,7 @@ public class QuestionServiceImpl extends ViServiceImpl 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 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 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 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 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"); diff --git a/src/main/java/io/v/nutz/web/commons/shiro/config/EasyCredentialsMatch.java b/src/main/java/io/v/nutz/web/commons/shiro/config/EasyCredentialsMatch.java index 5936184..5025e34 100644 --- a/src/main/java/io/v/nutz/web/commons/shiro/config/EasyCredentialsMatch.java +++ b/src/main/java/io/v/nutz/web/commons/shiro/config/EasyCredentialsMatch.java @@ -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())) { diff --git a/src/main/resources/static/components/activityBx/ActivityBxInfo.vue b/src/main/resources/static/components/activityBx/ActivityBxInfo.vue index 144e7b1..378f69a 100644 --- a/src/main/resources/static/components/activityBx/ActivityBxInfo.vue +++ b/src/main/resources/static/components/activityBx/ActivityBxInfo.vue @@ -2,134 +2,40 @@
- - - - - - - {{ viewData.user_name }} - - - - - - {{ viewData.apply_time }} - - - - - - {{ viewData.mobile }} - - - - - - {{ - viewData.activity_type === 40002 ? "分工会活动" : viewData.activity_type === 40003 ? - "协会(社团)活动" : - "校工会活动" - }} - - - - - - {{ viewData.activity_name }} - - - - - - {{ viewData.absName }}({{ viewData.projectTypeCode }}) - - - - - - {{ viewData.fundsUnitName }} - - - - - - {{ viewData.startPlannedDate }}-{{ viewData.endPlannedDate }} - - - - - - {{ viewData.venue }} - - - - - - {{ viewData.activity_number }} - - - - - - {{ viewData.funds_money }} - - - - - -
-
-
- - - -
-
-
-
- - - - - - - - - - - - - - - - - - - 暂无 - - - - - - - -
+ + {{ viewData.user_name }} + {{ viewData.apply_time }} + {{ viewData.mobile }} + {{ viewData.activityTypeName }} + {{ viewData.projectTypeName }} + {{viewData.activity_name}} + {{viewData.projectCode}} + {{viewData.fundsUnitName}} + + {{viewData.startPlannedDate}}至{{viewData.endPlannedDate}} + + {{viewData.venue}} + {{viewData.activity_number}} + +
+
+ +
+
+ + + + + + + + + + + +
- - + + diff --git a/src/main/resources/views/mobile/question/answer.html b/src/main/resources/views/mobile/question/answer.html index 8a3d877..223f521 100644 --- a/src/main/resources/views/mobile/question/answer.html +++ b/src/main/resources/views/mobile/question/answer.html @@ -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"){
{{questionData.calcScoreMode==1?'今日最高成绩':'得分'}}{{currentScore}}
+
+ 剩余时间:{{remainder}} +
@@ -194,8 +196,8 @@ layout("/mobile/platform.html"){ {{issue.iisdx?'单选':'多选'}} - - + +

@@ -243,10 +245,12 @@ layout("/mobile/platform.html"){

- 保存 + + 保存 提交
-
+
再答一次 @@ -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"){ \ No newline at end of file +#--> diff --git a/src/main/resources/views/platform/hd/wmhd/hdMange.html b/src/main/resources/views/platform/hd/wmhd/hdMange.html index 0622deb..c672b63 100644 --- a/src/main/resources/views/platform/hd/wmhd/hdMange.html +++ b/src/main/resources/views/platform/hd/wmhd/hdMange.html @@ -626,6 +626,28 @@ layout("/layouts/platform.html"){ + + + 上传 + 不上传 + + @@ -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; diff --git a/src/main/resources/views/platform/hd/wmhd/zpMange.html b/src/main/resources/views/platform/hd/wmhd/zpMange.html index 664e57a..ec73133 100644 --- a/src/main/resources/views/platform/hd/wmhd/zpMange.html +++ b/src/main/resources/views/platform/hd/wmhd/zpMange.html @@ -370,7 +370,7 @@ layout("/layouts/platform.html"){ -
+
作品信息 点击上传 + + + 点击上传 + +
@@ -495,6 +507,20 @@ layout("/layouts/platform.html"){ 点击上传 + + + 点击上传 + + + +
@@ -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 = {} diff --git a/src/main/resources/views/platform/jf/Funds/apply.html b/src/main/resources/views/platform/jf/Funds/apply.html index e3c815e..7ffe761 100644 --- a/src/main/resources/views/platform/jf/Funds/apply.html +++ b/src/main/resources/views/platform/jf/Funds/apply.html @@ -22,284 +22,281 @@ layout("/layouts/platform.html"){ -
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + - - - + --> + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - + + + + + + + + + + + + + + + -
- 购置物品及价格 + + + + + + -
- - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 确 定
- - - - - - - - - - - - - - - - - - - 活动方案 - - - - - 活动安排 - - - - - - - - - - - - -
- 确 定 -
- - + +