From 6aa907d14be0fa39c6469665cf3b74cd69eb3092 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 13 Sep 2024 15:10:56 +0800 Subject: [PATCH] fix --- src/pages/allocationReview/list/index.vue | 2 +- src/pages/allocationReview/list/setup.vue | 36 ++++++---- .../allocationReview/records/allocation.vue | 10 +-- src/pages/allocationReview/records/index.vue | 6 +- src/pages/allocationReview/records/people.vue | 66 ++++++------------- 5 files changed, 51 insertions(+), 69 deletions(-) diff --git a/src/pages/allocationReview/list/index.vue b/src/pages/allocationReview/list/index.vue index 1b1fd70..4daee85 100644 --- a/src/pages/allocationReview/list/index.vue +++ b/src/pages/allocationReview/list/index.vue @@ -305,7 +305,7 @@ export default { i: 1, url: `${this.$route.path}?${Qs.stringify(this.filter)}&page=${this.page}&pageSize=${this.pageSize}` }) - localStorage.setItem('review_row', JSON.stringify(row)) + localStorage.setItem('reviewRow', JSON.stringify(row)) this.$router.push(`records?competitionId=${row.id}&stageId=${row.stageId}`) }, } diff --git a/src/pages/allocationReview/list/setup.vue b/src/pages/allocationReview/list/setup.vue index 6051558..775291b 100644 --- a/src/pages/allocationReview/list/setup.vue +++ b/src/pages/allocationReview/list/setup.vue @@ -36,7 +36,7 @@ 人 + v-model.number="form.reviewersPerQuestion" /> 人(人工判分题和整体评分表的评阅人数) @@ -65,13 +65,14 @@
答卷信息
- + {{ item.name }} - + 自动判分题 人工判分题 + 整体评分表评分 @@ -198,22 +199,29 @@ export default { await this.$post(this.api.evaluationSave, form) this.submiting = false - try { - await this.$confirm('保存成功!', '提示', { - confirmButtonText: '前往任务分配', - cancelButtonText: '关闭', - type: 'warning', - closeOnClickModal: false, - }) - this.$router.push(`records`) - } catch (e) { - this.$parent.initData() - this.setupVisible = false + if (this.$route.path === '/allocationReview/list') { + try { + await this.$confirm('保存成功!', '提示', { + confirmButtonText: '前往任务分配', + cancelButtonText: '关闭', + type: 'warning', + closeOnClickModal: false, + }) + this.$router.push(`records?competitionId=${row.id}&stageId=${row.stageId}`) + } catch (e) { + this.close() + } + } else { + this.close() } } catch (e) { this.submiting = false } }, + close () { + this.$parent.initData() + this.setupVisible = false + }, // 弹框关闭回调 closeDia () { this.$emit('update:visible', false) diff --git a/src/pages/allocationReview/records/allocation.vue b/src/pages/allocationReview/records/allocation.vue index b2a46de..6f37814 100644 --- a/src/pages/allocationReview/records/allocation.vue +++ b/src/pages/allocationReview/records/allocation.vue @@ -17,9 +17,9 @@ - + -
+
diff --git a/src/pages/allocationReview/records/index.vue b/src/pages/allocationReview/records/index.vue index 114b7ca..15c8a3b 100644 --- a/src/pages/allocationReview/records/index.vue +++ b/src/pages/allocationReview/records/index.vue @@ -153,7 +153,7 @@ export default { }, }, mounted () { - const row = localStorage.getItem('review_row') + const row = localStorage.getItem('reviewRow') if (row) this.curRow = JSON.parse(row) const { referrer1 } = this.$store.state.user this.crumbs = [ @@ -232,8 +232,8 @@ export default { }, // 清除省份 clearprovince () { - this.filter.cityId = '', - this.filter.realSchoolId = '' + this.filter.cityId = '' + this.filter.realSchoolId = '' }, // 省份选择回调 provinceChange () { diff --git a/src/pages/allocationReview/records/people.vue b/src/pages/allocationReview/records/people.vue index 447105d..cb7f76e 100644 --- a/src/pages/allocationReview/records/people.vue +++ b/src/pages/allocationReview/records/people.vue @@ -9,7 +9,7 @@
@@ -82,6 +82,7 @@ export default { data () { return { nakadais: [], + curDep: {}, searchTimer: null, userType: 0, @@ -106,11 +107,12 @@ export default { }, }, mounted () { - this.getNakadais() + this.getNakadaiDep() + this.getNakadaiUser() }, methods: { // 获取中台部门 - async getNakadais () { + async getNakadaiDep () { const res = await this.$post(this.api.treeListArch) const list = res.treeList this.handleList(list) @@ -126,53 +128,29 @@ export default { } }) }, - async getNakadaiUser (data) { - console.log(11, data) + // 部门点击 + depClick (data) { + this.curDep = data + this.userCheck = false + this.getNakadaiUser() + }, + // 查询中台用户 + async getNakadaiUser () { const { page } = await this.$post(this.api.staffList, { type: 1, - staffArchitectureId: data.id || '', + staffArchitectureId: this.curDep.id || '', keyWord: this.userKeyword, pageNum: 1, pageSize: 1000 }) - this.users = page.records - }, - nakadaiClick () { - - }, - // 获取题库 - async getQuesBank () { - try { - const type = this.quesBankTypeVal - const res = await this.$post(this.api.questionBankList, { - status: 1, - pageNum: 1, - pageSize: 1000, - questionCategoryId: type.length ? type[type.length - 1] : '', - name: this.quesBankKeyword - }) - this.quesBanks = res.message.records - this.totalQuesBank = res.message.total - } catch (e) { } - }, - // 题目多选回调 - questionBankClick (item) { - this.curQuesBank = item - this.userCheck = false - this.getKnowledgeType() - this.getKnowledge() - }, - - // 处理树形 - handleList (list) { - list.map(e => { - if (e.children && e.children.length) { - this.handleList(e.children) - } else { - delete e.children - } + const list = page.records + const { checked } = this + list.forEach(e => { + e.check = !!checked.find(n => n.userId === e.userId) }) + this.users = list }, + // 用户全选回调 userAllCheckChange (val) { this.users.map(e => { @@ -195,10 +173,6 @@ export default { cur >= 0 && this.checked.splice(cur, 1) } }, - // 处理大纲列表 - handleQuesList () { - this.list = _.cloneDeep(this.$parent.form.paperOutline) - }, // 已选全选回调 checkedAllCheckChange (val) { this.checked.map(e => e.check = val)