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

178 lines
5.5 KiB

  1. <template>
  2. <div class="app-container">
  3. <!-- 钥匙发放弹窗 -->
  4. <el-dialog :title="$t('page.business.resource.zcg.ysff')" :visible.sync="open" width="1000px" append-to-body
  5. :close-on-click-modal="false">
  6. <el-form ref="form" :model="form" :rules="rules" label-width="170px" v-if="open">
  7. <div class="sbzdtcma"> <input type="text"> <input type="password"> </div>
  8. <el-row>
  9. <el-col :span="12">
  10. <el-form-item :label="$t('page.business.resource.zcg.zcg')" prop="mc">
  11. <el-input type="text" v-model="form.mc" maxlength="50" disabled
  12. :placeholder="$t('form.placeholderInput')" />
  13. </el-form-item>
  14. </el-col>
  15. <el-col :span="12">
  16. <el-form-item :label="$t('page.business.resource.zcg.glyj')" prop="glyj">
  17. <el-input type="text" v-model="form.glyj" maxlength="500" :placeholder="$t('form.placeholderInput')" />
  18. </el-form-item>
  19. </el-col>
  20. </el-row>
  21. <el-row>
  22. <el-col :span="12">
  23. <el-form-item :label="$t('form.qmyy')" prop="qmyy">
  24. <el-input type="text" :value="form.qmyy" maxlength="50" disabled
  25. :placeholder="$t('form.placeholderInput')" />
  26. </el-form-item>
  27. </el-col>
  28. </el-row>
  29. <el-row>
  30. <el-col :span="24">
  31. <el-form-item :label="$t('form.remark')" prop="remark">
  32. <el-input type="textarea" v-model="form.remark" :rows="5" maxlength="500"
  33. :placeholder="$t('form.placeholderInput')">
  34. </el-input>
  35. </el-form-item>
  36. </el-col>
  37. </el-row>
  38. <el-row>
  39. <el-col :span="12">
  40. <el-form-item :label="$t('page.business.resource.zcg.lqr1Id')" prop="lqr1Id">
  41. <SelectDeptUser v-model="form.lqr1Id" key="lqr1Id" />
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="12">
  45. <el-form-item :label="$t('page.business.resource.zcg.lqr1mm')" prop="lqr1mm">
  46. <el-input type="password" v-model="form.lqr1mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
  47. </el-form-item>
  48. </el-col>
  49. </el-row>
  50. <el-row>
  51. <el-col :span="12">
  52. <el-form-item :label="$t('page.business.resource.zcg.lqr2Id')" prop="lqr2Id">
  53. <SelectDeptUser v-model="form.lqr2Id" key="lqr2Id" />
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item :label="$t('page.business.resource.zcg.lqr2mm')" prop="lqr2mm">
  58. <el-input type="password" v-model="form.lqr2mm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
  59. </el-form-item>
  60. </el-col>
  61. </el-row>
  62. <el-row>
  63. <el-col :span="12">
  64. <el-form-item :label="$t('page.business.resource.zcg.ffr')">
  65. <el-input type="text" v-model="nickName" maxlength="50" disabled
  66. :placeholder="$t('form.placeholderInput')" />
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="12">
  70. <el-form-item :label="$t('page.business.resource.zcg.ffrmm')" prop="ffrmm">
  71. <el-input type="password" v-model="form.ffrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
  72. </el-form-item>
  73. </el-col>
  74. </el-row>
  75. </el-form>
  76. <div slot="footer" class="dialog-footer">
  77. <el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
  78. <el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
  79. </div>
  80. </el-dialog>
  81. </div>
  82. </template>
  83. <script>
  84. import { zcg_ysff } from "@/api/business/zcg/zcg"
  85. import { mapGetters } from 'vuex'
  86. import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
  87. export default {
  88. name: "ZcgYsff",
  89. components: { SelectDeptUser },
  90. data() {
  91. return {
  92. open: false,
  93. form: {},
  94. rules: {
  95. glyj: [{
  96. required: true,
  97. message: ' ',
  98. trigger: 'blur'
  99. }],
  100. lqr1Id: [{
  101. required: true,
  102. message: ' ',
  103. trigger: 'blur'
  104. }],
  105. lqr2Id: [{
  106. required: true,
  107. message: ' ',
  108. trigger: 'blur'
  109. }],
  110. lqr1mm: [{
  111. required: true,
  112. message: ' ',
  113. trigger: 'blur'
  114. }],
  115. lqr2mm: [{
  116. required: true,
  117. message: ' ',
  118. trigger: 'blur'
  119. }],
  120. ffrmm: [{
  121. required: true,
  122. message: ' ',
  123. trigger: 'blur'
  124. }],
  125. }
  126. }
  127. },
  128. computed: {
  129. ...mapGetters([
  130. 'nickName','name'
  131. ]),
  132. },
  133. created() {
  134. },
  135. methods: {
  136. cancel() {
  137. this.open = false
  138. },
  139. reset() {
  140. this.form = {
  141. id: null,
  142. mc: null,
  143. glyj: null,
  144. qmyy: this.$t('page.business.resource.zcg.qysff'),
  145. remark: null,
  146. lqr1Id: null,
  147. lqr2Id: null,
  148. lqr1mm: null,
  149. lqr2mm: null,
  150. ffrmm: null
  151. }
  152. this.resetForm("form")
  153. },
  154. show(row) {
  155. this.reset()
  156. this.form.id = row.id
  157. this.form.mc = row.mc
  158. this.open = true
  159. },
  160. save() {
  161. this.$refs["form"].validate(valid => {
  162. if (valid) {
  163. this.$modal.loading()
  164. zcg_ysff(this.form).then(response => {
  165. this.open = false
  166. this.$emit('callback')
  167. this.$modal.closeLoading()
  168. }).finally(() => {
  169. this.$modal.closeLoading()
  170. })
  171. }
  172. })
  173. }
  174. }
  175. }
  176. </script>