audit.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <el-dialog title="审核" :visible.sync="open" width="800px" append-to-body>
  3. <el-form ref="form" :model="form" :rules="rules" label-width="140px">
  4. <el-form-item label="审核结果" prop="checkStatus">
  5. <el-radio-group v-model="form.checkStatus">
  6. <el-radio label="3">审核通过</el-radio>
  7. <el-radio label="4">审核拒绝</el-radio>
  8. </el-radio-group>
  9. </el-form-item>
  10. </el-form>
  11. <div slot="footer" class="dialog-footer">
  12. <el-button type="primary" :disabled="disabled" @click="submitForm">确 定</el-button>
  13. <el-button @click="cancel">取 消</el-button>
  14. </div>
  15. </el-dialog>
  16. </template>
  17. <script>
  18. import {auditEntApi} from "@/api/admin/ent/ent"
  19. import {projectAuditApi} from "@/api/admin/project/project"
  20. export default {
  21. data () {
  22. return {
  23. open: false,
  24. disabled: false,
  25. form: {
  26. checkStatus: ''
  27. },
  28. rules: {
  29. checkStatus: [
  30. {required: true, message: '请选择审核结果', trigger: 'change'}
  31. ]
  32. }
  33. }
  34. },
  35. methods: {
  36. init(id) {
  37. this.open = true;
  38. this.form.id = id;
  39. },
  40. submitForm() {
  41. this.$refs.form.validate(valid => {
  42. if (valid) {
  43. this.disabled = true
  44. projectAuditApi(this.form.id, this.form.checkStatus).then(res => {
  45. this.disabled = false;
  46. if(res.code == 200) {
  47. this.$message({
  48. message: '审核成功',
  49. type: 'success'
  50. });
  51. }
  52. this.open = false;
  53. this.$emit('refreshData');
  54. })
  55. }
  56. })
  57. },
  58. cancel() {
  59. this.open = false
  60. },
  61. }
  62. }
  63. </script>
  64. <style>
  65. </style>