diff --git a/src/main/java/io/v/nutz/wakershome/controller/review/WakesHomeReviewController.java b/src/main/java/io/v/nutz/wakershome/controller/review/WakesHomeReviewController.java index ddd3d43..53d2849 100644 --- a/src/main/java/io/v/nutz/wakershome/controller/review/WakesHomeReviewController.java +++ b/src/main/java/io/v/nutz/wakershome/controller/review/WakesHomeReviewController.java @@ -2,8 +2,12 @@ package io.v.nutz.wakershome.controller.review; import io.v.nutz.annontation.ViReturn; import io.v.nutz.modules.models.PageForm; +import io.v.nutz.wakershome.model.review.CommentPeo; import io.v.nutz.wakershome.service.review.CommentZbService; +import io.v.nutz.web.commons.utils.ShiroUtil; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; import org.nutz.dao.Sqls; import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; @@ -30,28 +34,43 @@ public class WakesHomeReviewController { @At("") @Ok("beetl:/platform/wakeshome/review/doReview.html") +// @RequiresPermissions("wakeshome.review.doReview") public void index() { } @At @ViReturn +// @RequiresPermissions("wakeshome.review.doReview") public Object pageData(PageForm pageForm, @Param(value = "annual", required = false) String annual, @Param(value = "assessment", required = false) String assessment){ - Sql sql = Sqls.create("SELECT * FROM `comment_zb` $condition"); + Sql sql = Sqls.create(""" + SELECT + zb.* , + if((select count(1) from comment_peo peo where peo.zbId = zb.id and peo.userId = @userId) > 0,true,false) as isReview + FROM + `comment_zb` zb + $condition + """).setParam("userId",ShiroUtil.getUserId()); Cnd cnd = Cnd.NEW(); if (Strings.isNotBlank(annual) && Strings.isNotBlank(annual)) { - cnd.and("annual", "=", annual); + cnd.and("zb.annual", "=", annual); } if (Strings.isNotBlank(assessment) && Strings.isNotBlank(assessment)) { - cnd.where().andLike("assessment", assessment); + cnd.where().andLike("zb.assessment", assessment); } else { - cnd.desc("annual"); + cnd.desc("zb.annual"); } sql.setCondition(cnd); return commentZbService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); } - + @At + @ViReturn +// @RequiresPermissions("wakeshome.review.doReview") + public Object getPeoId(String id){ + CommentPeo peo = commentZbService.dao().fetch(CommentPeo.class, Cnd.where("zbId", "=", id).and("userId", "=", ShiroUtil.getUserId())); + return peo.getId(); + } } diff --git a/src/main/resources/static/components/wakeshome/review/ReviewResult.vue b/src/main/resources/static/components/wakeshome/review/ReviewResult.vue new file mode 100644 index 0000000..c9b02d4 --- /dev/null +++ b/src/main/resources/static/components/wakeshome/review/ReviewResult.vue @@ -0,0 +1,120 @@ + + + + + + + + {{viewInfo.commentPeo.evaluatedPersonName}} + + + + + {{viewInfo.commentPeo.evaluatedPersonName}} + + + + + {{viewInfo.commentPeo.reviewResult}} + + + + + {{viewInfo.commentPeo.presidentOpinions}} + + + + + + + + + + {{ idx + 1 }} + + + + + + + + {{ row.contentNumber = $index + 1 }} + + + + + + + + + + + + 满意 + 基本满意 + 不满意 + + + + + + + + + 备注 + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/static/components/wakeshome/review/UnionCommentZb.vue b/src/main/resources/static/components/wakeshome/review/UnionCommentZb.vue index 5e0f686..f6b25ac 100644 --- a/src/main/resources/static/components/wakeshome/review/UnionCommentZb.vue +++ b/src/main/resources/static/components/wakeshome/review/UnionCommentZb.vue @@ -162,7 +162,7 @@ - + {{ nr.contentNumber = idx + 1 }} { v.bzs.forEach(o => { - if (v.remark){ + if (self.commentatorData.assessmentMode === 1 && v.remark){ o.options = v.remark } self.bzList.push(o) @@ -280,11 +280,10 @@ layout("/mobile/platform.html"){ formData.evaluatedPersonType = evaluatedPersonType formData.files = JSON.stringify(this.commentatorData.files) - console.log(formData) const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData) if (resp.code === 0) { - // await this.getCommentById(); - // window.location.href = '/mobile/wakeshome/review/appraisal/mine' + await this.getCommentById(); + window.location.href = '/mobile/wakeshome/review/appraisal/mine' } }) }, diff --git a/src/main/resources/views/platform/wakeshome/review/doReview.html b/src/main/resources/views/platform/wakeshome/review/doReview.html index ce08e2d..cff5dfd 100644 --- a/src/main/resources/views/platform/wakeshome/review/doReview.html +++ b/src/main/resources/views/platform/wakeshome/review/doReview.html @@ -10,6 +10,14 @@ layout("/layouts/platform.html"){ .el-form { height: calc(100vh - 100px) !important; } + + .el-divider { + background-color: #1867b0; + } + + .el-divider__text { + color: #1867b0; + } @@ -84,9 +92,16 @@ layout("/layouts/platform.html"){ 查看 - - 去评测 - + + + + 去评议 + + + + + 评议结果 + @@ -97,17 +112,40 @@ layout("/layouts/platform.html"){ - 提交 - + 提交 + + + + + + + + + + + + + + + + 如已完成该对象的评议,请您手动更换评议对象 + + + + + + - + @@ -116,13 +154,12 @@ layout("/layouts/platform.html"){ - + - - + + align="center" width="350px"> 满意 @@ -160,25 +197,28 @@ layout("/layouts/platform.html"){ - - - + + 备注填写 + + - - - + + + - + + - - + + + @@ -197,6 +237,11 @@ layout("/layouts/platform.html"){ + + + + +