From ba51245493d8c95eefe6f0650e0665bfcd88eb04 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Fri, 27 Sep 2024 10:31:31 +0800
Subject: [PATCH] fix
---
src/api/index.js | 1 +
src/pages/allocationReview/list/index.vue | 2 +-
.../allocationReview/records/allocation.vue | 4 ++-
src/pages/allocationReview/records/index.vue | 25 ++++++++++-----
src/pages/allocationReview/records/people.vue | 31 +++++++++++++++++--
src/pages/myReview/list/index.vue | 2 +-
src/pages/myReview/theoryReview/index.vue | 11 ++++---
7 files changed, 57 insertions(+), 19 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index 285e215..ea47dd7 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -27,4 +27,5 @@ export default {
setComments: `/nakadai/evaluation/setComments`,
getTheLabReportIdUpAndDown: `/nakadai/evaluation/getTheLabReportIdUpAndDown`,
deleteComments: `/nakadai/evaluation/deleteComments`,
+ assignedPersonnelList: `/nakadai/evaluationAssignments/assignedPersonnelList`,
}
\ No newline at end of file
diff --git a/src/pages/allocationReview/list/index.vue b/src/pages/allocationReview/list/index.vue
index b583fcc..c51584c 100644
--- a/src/pages/allocationReview/list/index.vue
+++ b/src/pages/allocationReview/list/index.vue
@@ -200,7 +200,7 @@ export default {
this.loading = true
const { pageList } = await this.$post(this.api.reviewSettingsList, {
...this.filter,
- isTimed: this.month === 0 ? 1 : 0,
+ isTimed: this.month === 0 ? 0 : '',
pageNum: this.page,
pageSize: this.pageSize,
platformSource: 0,
diff --git a/src/pages/allocationReview/records/allocation.vue b/src/pages/allocationReview/records/allocation.vue
index b2801ed..b7d76b9 100644
--- a/src/pages/allocationReview/records/allocation.vue
+++ b/src/pages/allocationReview/records/allocation.vue
@@ -20,7 +20,7 @@
@@ -111,6 +111,7 @@ export default {
submiting: false,
peopleVisible: false,
+ peopleKey: 1,
outlineVisible: false,
curOutlines: [],
};
@@ -135,6 +136,7 @@ export default {
// this.checkAllQues = true
const el = this.$refs.outline
// el && el.setCheckedKeys(this.allQuesIds)
+ this.peopleKey++
this.getOutline()
},
// 获取试题
diff --git a/src/pages/allocationReview/records/index.vue b/src/pages/allocationReview/records/index.vue
index beaebf7..56bb155 100644
--- a/src/pages/allocationReview/records/index.vue
+++ b/src/pages/allocationReview/records/index.vue
@@ -28,14 +28,14 @@
-
-
+
+
-
-
+
+
@@ -124,14 +124,22 @@ export default {
provinces: [],
cities: [],
schools: [],
- status: [
+ evaluationStatus: [
+ {
+ name: '待评阅'
+ },
+ {
+ name: '已评阅'
+ },
+ ],
+ distributions: [
{
id: 1,
- name: '启用'
+ name: '是'
},
{
id: 0,
- name: '禁用'
+ name: '否'
},
],
date: [],
@@ -139,7 +147,8 @@ export default {
cityId: '',
provinceId: '',
realSchoolId: '',
- status: '',
+ evaluationStatus: '',
+ isDistribution: '',
keyword: '',
},
list: [],
diff --git a/src/pages/allocationReview/records/people.vue b/src/pages/allocationReview/records/people.vue
index e46a78b..78464e8 100644
--- a/src/pages/allocationReview/records/people.vue
+++ b/src/pages/allocationReview/records/people.vue
@@ -86,7 +86,7 @@ import Util from '@/libs/util'
import _ from 'lodash'
import Decimal from 'decimal.js'
export default {
- props: ['dia'],
+ props: ['dia', 'row', 'curRecords'],
data () {
return {
nakadaiDeps: [],
@@ -116,9 +116,33 @@ export default {
},
mounted () {
this.getNakadaiDep()
- this.getNakadaiUser()
+ this.users.length ? this.getDetail(1) : this.getNakadaiUser(1)
},
methods: {
+ // 获取详情
+ async getDetail (init) {
+ if (init === 1) {
+ try {
+ const { row, curRecords } = this
+ if (curRecords.length === 1) {
+ this.checked = []
+ const res = await this.$post(`${this.api.assignedPersonnelList}?evaluationId=${row.evaluationId}&reportId=${curRecords[0].reportId}`)
+ const ids = res.accountIds
+ if (ids && ids.length) {
+ const { users, checked } = this
+ ids.forEach(e => {
+ const cur = users.find(n => n.accountId === e)
+ if (cur) {
+ cur.check = true
+ checked.push(cur)
+ }
+ })
+ }
+ }
+ this.loaded = true
+ } catch (e) { }
+ }
+ },
// 获取中台部门
async getNakadaiDep () {
const res = await this.$post(this.api.treeListArch)
@@ -154,7 +178,7 @@ export default {
this.getNakadaiUser()
},
// 查询中台用户
- async getNakadaiUser () {
+ async getNakadaiUser (init) {
const { page } = await this.$post(this.api.staffList, {
type: 1,
staffArchitectureId: this.curDep.id || '',
@@ -168,6 +192,7 @@ export default {
e.check = !!checked.find(n => n.accountId === e.accountId)
})
this.users = list
+ this.getDetail(init)
},
// 用户全选回调
diff --git a/src/pages/myReview/list/index.vue b/src/pages/myReview/list/index.vue
index e15a9e9..7d5c50e 100644
--- a/src/pages/myReview/list/index.vue
+++ b/src/pages/myReview/list/index.vue
@@ -168,7 +168,7 @@ export default {
this.loading = true
const { page } = await this.$post(this.api.myReviewTask, {
...this.filter,
- isTimed: this.month === 0 ? 1 : 0,
+ isTimed: this.month === 0 ? 0 : '',
pageNum: this.page,
pageSize: this.pageSize,
})
diff --git a/src/pages/myReview/theoryReview/index.vue b/src/pages/myReview/theoryReview/index.vue
index 208fc39..eeb26ea 100644
--- a/src/pages/myReview/theoryReview/index.vue
+++ b/src/pages/myReview/theoryReview/index.vue
@@ -355,7 +355,7 @@ export default {
} else if (type === 'essay') { // 简答题
if (!n.userScore) n.userScore = ''
if (isNaN(n.reviewScore)) n.reviewScore = ''
- this.handleEssayScore(n)
+ this.handleIsCorrect(n)
}
n.originUserScore = n.reviewScore
n.newComments = n.comments || ''
@@ -376,8 +376,8 @@ export default {
this.loading = false
}
},
- // 判断简答题的对错
- handleEssayScore (n) {
+ // 判断试题的对错
+ handleIsCorrect (n) {
n.isCorrect = n.reviewScore === '' ? 4 : (n.reviewScore === n.questionScore ? 1 : n.reviewScore ? 3 : 2) // 简答题没有reviewScore则显示待判分, 有则判断是否跟题目分数相同,完全相同是正确,小于则部分正确,0则错误
},
scrollToSmooth (position, duration) {
@@ -439,7 +439,7 @@ export default {
reviewScore: ques.reviewScore,
}])
ques.originUserScore = ques.reviewScore
- this.handleEssayScore(ques)
+ this.handleIsCorrect(ques)
Util.successMsg('保存成功')
},
// 填空题的小空对错点击回调
@@ -455,6 +455,7 @@ export default {
jsonText: ques.jsonText
}])
ques.originUserScore = ques.reviewScore
+ this.handleIsCorrect(ques)
Util.successMsg('保存成功')
},
// 保存评语
@@ -541,7 +542,7 @@ export default {
reviewScore: n.reviewScore,
})
n.originUserScore = n.reviewScore
- this.handleEssayScore(n)
+ this.handleIsCorrect(n)
})
})
if (params.length) await this.$post(this.api.reviewPaper, params)