diff --git a/src/views/kpi/assessment/performance/components/table.vue b/src/views/kpi/assessment/performance/components/table.vue index 870d192..75e167f 100644 --- a/src/views/kpi/assessment/performance/components/table.vue +++ b/src/views/kpi/assessment/performance/components/table.vue @@ -373,6 +373,7 @@ export default { }) }) if (!isScore) { + this.loadingTi = false return this.$message({ message: '有未评分指标', type: 'info' diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/ApprovalList.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/ApprovalList.vue index 46eeef5..12c768c 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/ApprovalList.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/ApprovalList.vue @@ -15,7 +15,7 @@ -
@@ -250,13 +250,14 @@ export default { } else { this.list = this.list.filter(i => i !== item) } - if (this.handleGetList().length === 1) { + const list = this.handleGetList() + if (list.length === 1) { this.itemInfo = {} } - if (!this.list.some(i => i.isCick && !i.isDelete)) { - if (this.list[0]) { - this.list[0].isCick = true - this.itemInfo = this.list[0] + if (list.every(i => !i.isCick)) { + if (list[0]) { + list[0].isCick = true + this.itemInfo = list[0] } } }).catch(() => { diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/ConfirmList.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/ConfirmList.vue index e885fb3..856cbfd 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/ConfirmList.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/ConfirmList.vue @@ -9,7 +9,7 @@ {{i.label}}
-
+
@@ -230,13 +230,15 @@ export default { } else { this.list = this.list.filter(i => i !== item) } - if (this.handleGetList().length === 1) { + const list = this.handleGetList() + + if (list.length === 1) { this.itemInfo = {} } - if (!this.list.some(i => i.isCick && !i.isDelete)) { - if (this.list[0]) { - this.list[0].isCick = true - this.itemInfo = this.list[0] + if (list.every(i => !i.isCick)) { + if (list[0]) { + list[0].isCick = true + this.itemInfo = list[0].id === 9999 ? {} : list[0] } } }).catch(() => { diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue index b3bbb6c..e001dc6 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue @@ -9,7 +9,7 @@ {{i.label || "---"}} -
+
@@ -228,22 +228,6 @@ export default { this.$forceUpdate() }, handleDelete (item) { - // if (item.id) { - // item.isDelete = 1 - // } else { - // this.list = this.list.filter(i => i !== item) - // } - // if (this.handleGetList().length === 1) { - // this.itemInfo = {} - // } - // if (!this.list.some(i => i.isCick && !i.isDelete)) { - // if (this.list[0]) { - // this.list[0].isCick = true - // this.itemInfo = this.list[0] - // } - // } - // console.log('this.list: ', this.list) - // return this.$confirm('此操作将永久删除, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -254,13 +238,14 @@ export default { } else { this.list = this.list.filter(i => i !== item) } - if (this.handleGetList().length === 1) { + const list = this.handleGetList() + if (list.length === 1) { this.itemInfo = {} } - if (!this.list.some(i => i.isCick && !i.isDelete)) { - if (this.list[0]) { - this.list[0].isCick = true - this.itemInfo = this.list[0] + if (list.every(i => !i.isCick)) { + if (list[0]) { + list[0].isCick = true + this.itemInfo = list[0].id === 9999 ? {} : list[0] } } }).catch(() => { diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue index 23d4626..8130d15 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/basis.vue @@ -258,6 +258,9 @@ export default { async handleGetByIdForBasis (id) { try { let res = await getByIdForBasis({id}) + if (res.code !== 200) { + return this.$message.error(res.msg) + } res = res.data this.GroundList1 = res.managers ? res.managers.map(i => { i.staffId = i.id @@ -299,6 +302,9 @@ export default { async handleGetGround () { try { let res = await getGround({groupId: 1}) + if (res.code !== 200) { + return this.$message.error(res.msg) + } res = res.data res = res.map(i => { i.isDisable = i.isSelect @@ -308,6 +314,7 @@ export default { this.GroundList1 = JSON.parse(JSON.stringify(res)) } catch (error) { this.$message.error(error.msg) + this.$loadingEnd() } }, handleCancel () {