From 05b45ec72097aca1d2abd61513e7cec3e76f975d Mon Sep 17 00:00:00 2001 From: T-95707 Date: Mon, 7 Sep 2020 16:18:43 +0800 Subject: [PATCH] =?UTF-8?q?20200907=20zjt=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParPersonScoreManage.vue | 66 ++++++++++++------- src/views/par/scoreManage/ParScoreManage.vue | 66 ++++++++++++------- 2 files changed, 82 insertions(+), 50 deletions(-) diff --git a/src/views/par/personScoreManage/ParPersonScoreManage.vue b/src/views/par/personScoreManage/ParPersonScoreManage.vue index 312131e..5d13598 100644 --- a/src/views/par/personScoreManage/ParPersonScoreManage.vue +++ b/src/views/par/personScoreManage/ParPersonScoreManage.vue @@ -303,34 +303,50 @@ export default { }) }, sbScore (record) { - const param = {} - param.id = record.id - param.kpzt = '2' - updateScore( - param - ).then( - res => { - if (res.status === 200) { - this.$notification['success']({ - message: '上报成功', - duration: 2 - }) - this.visable = false - } else { - this.$notification['error']({ - message: res.message, + const _this = this + this.$confirm({ + title: '提示', + content: `确认要上报该条记录吗?`, + okText: '确认', + okType: 'danger', + cancelText: '取消', + onOk () { + const param = {} + param.id = record.id + param.kpzt = '2' + updateScore( + param + ).then( + res => { + if (res.status === 200) { + _this.$notification['success']({ + message: '上报成功', + duration: 2 + }) + _this.visable = false + } else { + _this.$notification['error']({ + message: res.message, + duration: 4 + }) + } + } + ).catch(() => + _this.$notification['error']({ + message: '出现异常,请联系系统管理员', duration: 4 }) - } + ).finally(() => { + _this.confirmLoading = false + _this.search() + }) + }, + onCancel: () => { + _this.$notification['info']({ + message: '取消上报操作', + duration: 4 + }) } - ).catch(() => - this.$notification['error']({ - message: '出现异常,请联系系统管理员', - duration: 4 - }) - ).finally(() => { - this.confirmLoading = false - this.search() }) } diff --git a/src/views/par/scoreManage/ParScoreManage.vue b/src/views/par/scoreManage/ParScoreManage.vue index c04091c..1d3215c 100644 --- a/src/views/par/scoreManage/ParScoreManage.vue +++ b/src/views/par/scoreManage/ParScoreManage.vue @@ -298,34 +298,50 @@ export default { }) }, sbScore (record) { - const param = {} - param.id = record.id - param.kpzt = '2' - updateScore( - param - ).then( - res => { - if (res.status === 200) { - this.$notification['success']({ - message: '上报成功', - duration: 2 - }) - this.visable = false - } else { - this.$notification['error']({ - message: res.message, + const _this = this + this.$confirm({ + title: '提示', + content: `确认要上报该条记录吗?`, + okText: '确认', + okType: 'danger', + cancelText: '取消', + onOk () { + const param = {} + param.id = record.id + param.kpzt = '2' + updateScore( + param + ).then( + res => { + if (res.status === 200) { + _this.$notification['success']({ + message: '上报成功', + duration: 2 + }) + _this.visable = false + } else { + _this.$notification['error']({ + message: res.message, + duration: 4 + }) + } + } + ).catch(() => + _this.$notification['error']({ + message: '出现异常,请联系系统管理员', duration: 4 }) - } + ).finally(() => { + _this.confirmLoading = false + _this.search() + }) + }, + onCancel: () => { + _this.$notification['info']({ + message: '取消上报操作', + duration: 4 + }) } - ).catch(() => - this.$notification['error']({ - message: '出现异常,请联系系统管理员', - duration: 4 - }) - ).finally(() => { - this.confirmLoading = false - this.search() }) } -- Gitee