From f2ab4ad6292bece8aefb2c873df9af31f2afe3d0 Mon Sep 17 00:00:00 2001 From: yujt Date: Sat, 12 Sep 2020 14:48:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E7=BE=A4=E6=93=8D=E4=BD=9C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=A7=AF=E5=88=86=E7=89=88=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + src/main.js | 2 + src/views/modules/group/group-approve.vue | 78 +++++++++++++++++++---- 3 files changed, 68 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 2041b31..95bc102 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "dependencies": { "axios": "^0.18.1", "babel-plugin-component": "^1.1.1", + "echart": "^0.1.3", + "echarts": "^4.9.0", "element-theme": "^2.0.1", "element-theme-chalk": "^2.4.7", "gulp-autoprefixer": "^6.0.0", diff --git a/src/main.js b/src/main.js index 876b2e4..51518be 100644 --- a/src/main.js +++ b/src/main.js @@ -12,6 +12,8 @@ import { hasPermission } from '@/utils' import cloneDeep from 'lodash/cloneDeep' import '@/element-ui/theme/cascader-new.css' import '@/style/index.scss' +import echarts from 'echarts' +Vue.prototype.$echarts = echarts Vue.config.productionTip = false diff --git a/src/views/modules/group/group-approve.vue b/src/views/modules/group/group-approve.vue index b503c9c..5cfaad0 100644 --- a/src/views/modules/group/group-approve.vue +++ b/src/views/modules/group/group-approve.vue @@ -99,21 +99,71 @@ export default { return this.$message.error('处理意见不能超过500字') } } - this.$http['post']( - '/group/group/operate', this.dataForm).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.$message({ - message: this.$t('prompt.success'), - type: 'success', - duration: 500, - onClose: () => { - this.visible = false - this.$emit('refreshDataList') + if (this.dataForm.state === '10') { + this.$http['post']( + '/group/group/pass', this.dataForm).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) } - }) - }).catch(() => {}) + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + }).catch(() => {}) + } else if (this.dataForm.state === '5') { + this.$http['post']( + '/group/group/noPass', this.dataForm).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + }).catch(() => {}) + } else if (this.dataForm.state === '20') { + this.$http['post']( + '/group/group/noPass', this.dataForm).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + }).catch(() => {}) + } else { + this.$http['post']( + '/group/group/operate', this.dataForm).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.$message({ + message: this.$t('prompt.success'), + type: 'success', + duration: 500, + onClose: () => { + this.visible = false + this.$emit('refreshDataList') + } + }) + }).catch(() => {}) + } }, 1000, { 'leading': true, 'trailing': false }) } }