From 99c44a973854d8c1ec97e9ebd52f28d5500fed1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Mon, 16 Nov 2020 15:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/UseButton/index.vue | 12 +-- .../kpi/assessment/performance/index.vue | 95 +++++++++++++++++-- src/views/kpi/workbench/home/index.vue | 54 ++++++----- 3 files changed, 120 insertions(+), 41 deletions(-) diff --git a/src/views/kpi/assessment/performance/components/UseButton/index.vue b/src/views/kpi/assessment/performance/components/UseButton/index.vue index e1c9112..6fc9707 100644 --- a/src/views/kpi/assessment/performance/components/UseButton/index.vue +++ b/src/views/kpi/assessment/performance/components/UseButton/index.vue @@ -72,7 +72,7 @@ import getPersonnel from '@/components/getPersonnel' import PopupRight from '@/components/PopupRight' import { apiSaveapproval } from '@/api/assessment' export default { - props: ['tableInfo', 'formList', 'info'], + props: ['tableInfo', 'formList', 'info', 'resultRecordId'], data () { return { authList: [ @@ -205,7 +205,7 @@ export default { }).then(async () => { const obj = {status: 3, menuName: '催办了'} if (this.info) obj.flowRecordId = this.info.flowRecordId - const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj) + const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) this.$loadingStart() let res = await apiSaveapproval(params) this.$loadingEnd() @@ -238,7 +238,7 @@ export default { const obj = {status: 4, menuName: '跳过了'} if (this.info) obj.flowRecordId = this.info.flowRecordId if (this.$attrs.flowRecordId) obj.flowRecordId = this.$attrs.flowRecordId - const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj) + const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) this.$loadingStart() let res = await apiSaveapproval(params) this.$loadingEnd() @@ -268,7 +268,7 @@ export default { this.$router.push({ name: 'assessment-goals', query: { - id: this.$route.query.id || '' + id: this.resultRecordId || '' } }) }, @@ -287,7 +287,7 @@ export default { if (this.info) { obj.flowRecordId = this.info.flowRecordId } else if (this.formList.flowRecordId !== 0) obj.flowRecordId = this.formList.flowRecordId - const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj) + const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) let res = await apiSaveapproval(params) if (res.code !== 200) { this.$message.error(res.msg) @@ -304,7 +304,7 @@ export default { return new Promise((resolve, reject) => { this.$refs.form.validate(async v => { if (v) { - const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj) + const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) let res = await apiSaveapproval(params) if (res.code !== 200) { this.$message.error(res.msg) diff --git a/src/views/kpi/assessment/performance/index.vue b/src/views/kpi/assessment/performance/index.vue index 7d52fcf..03f1dd1 100644 --- a/src/views/kpi/assessment/performance/index.vue +++ b/src/views/kpi/assessment/performance/index.vue @@ -1,8 +1,18 @@