|
|
|
@ -104,8 +104,9 @@ |
|
|
|
|
|
|
|
<!-- 解散原因弹框 --> |
|
|
|
<el-dialog :visible.sync="processingOpinionsVisible" |
|
|
|
v-if="processingOpinionsVisible" |
|
|
|
title="解散社群"> |
|
|
|
<el-form :label-width="$i18n.locale === 'en-US' ? '100px' : '80px'"> |
|
|
|
<el-form :model="postForm" :rules="dataRule" ref="postForm" :label-width="$i18n.locale === 'en-US' ? '150px' : '100px'"> |
|
|
|
<el-form-item label="社群ID:" v-if="false"> |
|
|
|
<el-input v-model="postForm.id" type="textarea" placeholder="不超过500字"> |
|
|
|
</el-input> |
|
|
|
@ -114,13 +115,13 @@ |
|
|
|
<el-input v-model="postForm.state" type="textarea" placeholder="不超过500字"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="解散原因:"> |
|
|
|
<el-form-item label="解散原因:" prop="processingOpinions"> |
|
|
|
<el-input v-model="postForm.processingOpinions" type="textarea" placeholder="不超过500字"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button @click="processingOpinionsVisible = false">{{ $t('cancel') }}</el-button> |
|
|
|
<el-button @click="cancelDisBand">{{ $t('cancel') }}</el-button> |
|
|
|
<el-button type="primary" @click="confirmDisBand">确定</el-button> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
@ -175,6 +176,15 @@ export default { |
|
|
|
}] |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
dataRule () { |
|
|
|
return { |
|
|
|
processingOpinions: [ |
|
|
|
{ required: true, message: '解散原因不能为空', trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
GroupDetail, |
|
|
|
GroupApprove |
|
|
|
@ -311,6 +321,12 @@ export default { |
|
|
|
this.processingOpinionsVisible = true |
|
|
|
}, |
|
|
|
confirmDisBand () { |
|
|
|
if (this.postForm.processingOpinions == null || this.postForm.processingOpinions === '') { |
|
|
|
return this.$message.error('请填写解散原因') |
|
|
|
} |
|
|
|
if (this.postForm.processingOpinions.length > 500) { |
|
|
|
return this.$message.error('解散原因不能超过500字') |
|
|
|
} |
|
|
|
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
@ -323,6 +339,11 @@ export default { |
|
|
|
duration: 500 |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
cancelDisBand () { |
|
|
|
console.log(this.$refs['postForm']) |
|
|
|
this.$refs['postForm'].resetFields() |
|
|
|
this.processingOpinionsVisible = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|