review.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <div class="page-form-container">
  3. <club-detail :auth-id="auditForm.authId" />
  4. <template v-if="type === 'audit'">
  5. <el-form ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
  6. <el-form-item label="审核:">
  7. <el-radio-group v-model="auditForm.auditStatus">
  8. <el-radio :label="1">通过</el-radio>
  9. <el-radio :label="0">不通过</el-radio>
  10. </el-radio-group>
  11. </el-form-item>
  12. <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
  13. <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
  14. </el-form-item>
  15. </el-form>
  16. <div class="control-box">
  17. <el-button type="info" @click="navigateBack">返回</el-button>
  18. <el-button type="primary" @click="submit">提交</el-button>
  19. </div>
  20. </template>
  21. </div>
  22. </template>
  23. <script>
  24. import { auditAuth } from '@/api/auth'
  25. import { ClubDetail } from '@/views/components'
  26. export default {
  27. name: 'SupplierAuditClubDetail',
  28. components: {
  29. ClubDetail
  30. },
  31. data() {
  32. return {
  33. type: 'audit',
  34. auditForm: {
  35. source: 2,
  36. authId: '', // 机构id
  37. auditStatus: 1, // 审核状态
  38. invalidReason: '' // 审核信息
  39. },
  40. rules: {
  41. invalidReason: { required: true, message: '不通过原因不能为空', tigger: 'blur' }
  42. }
  43. }
  44. },
  45. created() {
  46. this.auditForm.authId = this.$route.query.authId
  47. this.type = this.$route.query.type
  48. },
  49. methods: {
  50. // 地图定位
  51. initMap() {
  52. this.dialogMapVisible = true
  53. if (this.lnglat) {
  54. this.$nextTick(() => {
  55. this.$refs.aMap.init()
  56. })
  57. }
  58. },
  59. // 提交审核信息
  60. async submit() {
  61. try {
  62. await this.$refs.auditForm.validate()
  63. this.onAudit()
  64. } catch (error) {
  65. console.log(error)
  66. }
  67. },
  68. // 审核
  69. async onAudit() {
  70. try {
  71. const res = await auditAuth(this.auditForm)
  72. this.$message.success(res.data)
  73. this.$store.dispatch('tagsView/delView', this.$route)
  74. this.$router.back()
  75. } catch (error) {
  76. console.log(error)
  77. }
  78. }
  79. }
  80. }
  81. </script>