diff --git a/src/utils/elementConfig.js b/src/utils/elementConfig.js index c6baad8..3746f2c 100644 --- a/src/utils/elementConfig.js +++ b/src/utils/elementConfig.js @@ -40,9 +40,9 @@ import { Progress, Drawer, Slider, - ButtonGroup + ButtonGroup, Notification } from 'element-ui' - +Vue.prototype.$notify = Notification Vue.prototype.$loading = Loading Vue.prototype.$message = Message Vue.prototype.$confirm = MessageBox.confirm diff --git a/src/views/kpi/assessment/performance/components/UseButton/index.vue b/src/views/kpi/assessment/performance/components/UseButton/index.vue index b92fed7..08c23d2 100644 --- a/src/views/kpi/assessment/performance/components/UseButton/index.vue +++ b/src/views/kpi/assessment/performance/components/UseButton/index.vue @@ -380,11 +380,33 @@ export default { } this.$message({ message: res.msg, - type: 'success' + type: 'success', + duration: 1000, + onClose: () => { + this.nextProcess(res) + } }) + if (!res.resultRecordId) return this.dialogFormVisible = false history.go(0) }, + // 根据后端返回是否需要进入下一个待办 + nextProcess (res) { + if (!res.resultRecordId) return + this.$confirm('是否进去下一个待办?', '温馨提示', { + confirmButtonText: '确定', + cancelButtonText: '取消' + }).then(() => { + this.$router.replace({ + name: 'assessment-performance', + query: {id: res.resultRecordId + } + }) + history.go(0) + }).catch(() => { + + }) + }, // 驳回 handleBohui () { this.ruleForm = {} @@ -505,10 +527,18 @@ export default { this.form = {} this.$message({ message: res.msg, - type: 'success' + type: 'success', + duration: 1000, + onClose: () => { + this.nextProcess(res) + } }) - history.go(0) - resolve(0) + if (!res.resultRecordId) { + resolve(0) + } else { + history.go(0) + resolve(0) + } } }) })