华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.0 KiB

  1. G<template>
  2. <div>
  3. <div class="edit-container">
  4. <div class="edit-top">
  5. <div class="left-top">
  6. <img src="@/assets/images/back.png" @click="cancel()" />
  7. <div class="left-title"></div>
  8. </div>
  9. <div class="center-top">
  10. {{ form.bdmc }}
  11. </div>
  12. <div class="right-top">
  13. <el-button @click="cancel()">{{ $t('form.cancel') }}</el-button>
  14. <el-button type="primary" @click="save">填报</el-button>
  15. </div>
  16. </div>
  17. <div class="edit-content ">
  18. 表单详情todo
  19. </div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import { studyFormPre_tb, studyFormPre_info } from "@/api/business/study/studyFormPre"
  25. import { mapGetters } from 'vuex'
  26. export default {
  27. name: "Xq",
  28. components: {},
  29. data() {
  30. return {
  31. open: false,
  32. showIndex: 1,
  33. form: {},
  34. rules: {
  35. bdmc: [{
  36. required: true,
  37. message: ' ',
  38. trigger: 'blur'
  39. }],
  40. templateId: [{
  41. required: true,
  42. message: ' ',
  43. trigger: 'blur'
  44. }]
  45. }
  46. }
  47. },
  48. computed: {
  49. ...mapGetters([
  50. 'nickName'
  51. ]),
  52. },
  53. created() {
  54. },
  55. methods: {
  56. cancel() {
  57. this.$emit('close')
  58. },
  59. reset() {
  60. this.form = {
  61. id: null,
  62. studyId: null,
  63. bdbh: null,
  64. bdmc: null,
  65. bdsm: null,
  66. templateId: null,
  67. templateMc: null,
  68. bdnr: null
  69. }
  70. this.resetForm("form")
  71. },
  72. edit(row) {
  73. this.reset()
  74. this.$modal.loading()
  75. studyFormPre_info({ id: row.id }).then(response => {
  76. this.form = response.data
  77. this.open = true
  78. this.$modal.closeLoading()
  79. })
  80. },
  81. save() {
  82. this.$refs["form"].validate(valid => {
  83. if (valid) {
  84. this.$modal.loading()
  85. studyFormPre_tb(this.form).then(response => {
  86. this.$emit('close')
  87. this.$modal.closeLoading()
  88. })
  89. }
  90. })
  91. }
  92. }
  93. }
  94. </script>