From b26a97bf8cef6ca30b071e3a9482c07a817b7b84 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 6 Nov 2025 16:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E5=88=86=E6=9C=80=E5=A4=A7=E5=80=BC?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/votepage.vue | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/views/votepage.vue b/ruoyi-ui/src/views/votepage.vue index c808f38..5838468 100644 --- a/ruoyi-ui/src/views/votepage.vue +++ b/ruoyi-ui/src/views/votepage.vue @@ -4,6 +4,7 @@
{{ vote.voteTitle }}
时间:{{ vote.sTime }} - {{ vote.eTime }}
评优最大值为 {{ vote.umax }}
+
评分最大值为 {{ vote.maxNum }}
{{ vote.vDescription }}
@@ -15,7 +16,7 @@
参与评分 {{ item.voteNum!==null?item.voteNum: ''}} 人
均值:{{ item.avgScore!==null?item.avgScore: '' }}
- +
@@ -153,19 +154,29 @@ export default { let bkhdxName = ''; let pyA = 0 if(this.vote.khitemTypeid===2 || this.vote.khitemTypeid===3){ - this.voteList.forEach(item => { - if(!(item.score===null||item.score===undefined)){ - voteEmpList.push({ - id: item.id, - bkhdxName: item.bkhdxName, - score: item.score, + + let VoteList = this.voteList; + for (let i = 0; i < VoteList.length; i++) { + if(VoteList[i].score===null||VoteList[i].score===undefined){ + flag = false; + this.$alert(`【${ VoteList[i].bkhdxName }】未评分,请去评分!`, `提示`, { + type: 'Danger' }) - }else { + break; + }else if(VoteList[i].score > this.vote.maxNum){ flag = false; - bkhdxName += item.bkhdxName+',' + this.$alert(`【${ VoteList[i].bkhdxName }】评分值不能超过评分最大值${this.vote.maxNum},请重新去评分!`, `提示`, { + type: 'Danger' + }) + break; + }else { + voteEmpList.push({ + id: VoteList[i].id, + bkhdxName: VoteList[i].bkhdxName, + score: VoteList[i].score, + }) } - }) - bkhdxName=bkhdxName.slice(0, -1); + } } if(this.vote.khitemTypeid===1){ this.voteList.forEach(item => {