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

129 lines
3.9 KiB

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