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 }) } }