examine.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div>
  3. <el-form disabled>
  4. <Base :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
  5. <Model :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
  6. </el-form>
  7. <Examine :form-data="formData" page-type="frock" :module="module" :common-data="commonData" />
  8. <div style="margin: 20px 0">
  9. <el-button type="primary" size="small" @click="onSbumit">提交</el-button>
  10. <el-button size="small" @click="handleBack">返回</el-button>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import Base from '../components/base.vue'
  16. import Model from '../components/model.vue'
  17. import Examine from '../components/examine.vue'
  18. import Mixin from '../mixin'
  19. import { examineLoginFrock } from '@/api/frock'
  20. export default {
  21. components: {
  22. Base,
  23. Model,
  24. Examine
  25. },
  26. mixins: [Mixin],
  27. methods: {
  28. onSbumit() {
  29. const params = {
  30. ...this.formData
  31. }
  32. if (this.formData.files.length) {
  33. this.formData.files = this.formData.files.map(k => {
  34. return {
  35. ...k,
  36. fileName: k.name,
  37. fileUrl: k.url
  38. }
  39. })
  40. }
  41. if (params.loginStatus === 'FAIL' && !params.projectNo) {
  42. this.$errorMsg('请填写项目编号')
  43. return
  44. }
  45. if (params.loginStatus === 'REJECT' && !params.examineNote) {
  46. this.$errorMsg('请填写审核备注')
  47. return
  48. }
  49. examineLoginFrock(params).then(res => {
  50. this.commonFn('审核成功')
  51. })
  52. },
  53. commonFn(name) {
  54. this.$successMsg(name)
  55. this.handleBack()
  56. },
  57. handleBack() {
  58. this.$emit('updateList')
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped></style>