华西海圻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.

127 lines
3.5 KiB

  1. <template>
  2. <div>
  3. <el-dialog :title="$t('page.business.study.studyFormPlan.rybg')" :visible.sync="open" width="500px"
  4. append-to-body :close-on-click-modal="false">
  5. <el-form ref="form" :model="form" :rules="rules" label-width="120px" v-if="open">
  6. <div class="sbzdtcma"> <input type="text"> <input type="password" show-password > </div>
  7. <el-row>
  8. <el-col :span="24">
  9. <el-form-item :label="$t('form.qmyy')" prop="qmyy">
  10. <el-input type="text" :value="form.qmyy" maxlength="50" disabled
  11. :placeholder="$t('form.placeholderInput')" />
  12. </el-form-item>
  13. </el-col>
  14. </el-row>
  15. <el-row>
  16. <el-col :span="24">
  17. <el-form-item :label="$t('page.business.study.studyFormPlan.reason')" prop="remark">
  18. <el-input type="textarea" v-model="form.remark" :rows="5" maxlength="500"
  19. :placeholder="$t('form.placeholderInput')">
  20. </el-input>
  21. </el-form-item>
  22. </el-col>
  23. </el-row>
  24. <el-row>
  25. <el-col :span="24">
  26. <el-form-item :label="$t('form.signer')">
  27. <el-input type="text" v-model="nickName" maxlength="50" disabled
  28. :placeholder="$t('form.placeholderInput')" />
  29. </el-form-item>
  30. </el-col>
  31. </el-row>
  32. <el-row>
  33. <el-col :span="24">
  34. <el-form-item :label="$t('form.password')" prop="qmrmm">
  35. <el-input type="password" show-password v-model="form.qmrmm" maxlength="20"
  36. :placeholder="$t('form.placeholderInput')" />
  37. </el-form-item>
  38. </el-col>
  39. </el-row>
  40. </el-form>
  41. <div slot="footer" class="dialog-footer">
  42. <el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
  43. <el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
  44. </div>
  45. </el-dialog>
  46. </div>
  47. </template>
  48. <script>
  49. import { studyFormPlan_ghgsr } from "@/api/business/study/studyFormPlan"
  50. import { mapGetters } from 'vuex'
  51. export default {
  52. name: "Ghgsr",
  53. components: {},
  54. data() {
  55. return {
  56. isBatch: false,
  57. ids: [],
  58. selectList: [],
  59. open: false,
  60. form: {},
  61. rules: {
  62. qmrmm: [{
  63. required: true,
  64. message: ' ',
  65. trigger: 'blur'
  66. }],
  67. remark: [{
  68. required: true,
  69. message: ' ',
  70. trigger: 'blur'
  71. }],
  72. qmyy: [{
  73. required: true,
  74. message: ' ',
  75. trigger: 'blur'
  76. }],
  77. }
  78. }
  79. },
  80. computed: {
  81. ...mapGetters([
  82. 'nickName','name'
  83. ]),
  84. },
  85. created() {
  86. },
  87. methods: {
  88. cancel() {
  89. this.open = false
  90. },
  91. reset() {
  92. this.form = {
  93. id: null,
  94. qmyy: this.$t('page.business.study.studyFormPlan.ghgsr'),
  95. userId: null,
  96. UserMc: null,
  97. remark: null,
  98. qmrmm: null
  99. }
  100. this.resetForm("form")
  101. },
  102. show(row) {
  103. this.reset()
  104. this.form.id = row.id
  105. this.form.userId = row.userId
  106. this.form.userMc = row.userMc
  107. this.open = true
  108. },
  109. save() {
  110. this.$refs["form"].validate(valid => {
  111. if (valid) {
  112. this.$modal.loading()
  113. studyFormPlan_ghgsr(this.form).then(response => {
  114. this.open = false
  115. this.$emit('callback')
  116. this.$modal.closeLoading()
  117. }).finally(() => {
  118. this.$modal.closeLoading()
  119. })
  120. }
  121. })
  122. }
  123. }
  124. }
  125. </script>