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

107 lines
2.8 KiB

  1. <template>
  2. <div >
  3. <!-- 解锁弹窗 -->
  4. <el-dialog :title="$t('page.business.resource.sj.unlock')" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
  5. <el-form ref="form" :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" :value="form.qmyy" maxlength="50" disabled
  10. :placeholder="$t('form.placeholderInput')" />
  11. </el-form-item>
  12. </el-col>
  13. </el-row>
  14. <el-row>
  15. <el-col :span="24">
  16. <el-form-item :label="$t('form.remark')" prop="remark">
  17. <el-input type="textarea" v-model="form.remark" :rows="2" maxlength="500"
  18. :placeholder="$t('form.placeholderInput')">
  19. </el-input>
  20. </el-form-item>
  21. </el-col>
  22. </el-row>
  23. <el-row>
  24. <el-col :span="24">
  25. <el-form-item :label="$t('form.signer')">
  26. <el-input type="text" v-model="nickName" maxlength="50" disabled
  27. :placeholder="$t('form.placeholderInput')" />
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. <el-row>
  32. <el-col :span="24">
  33. <el-form-item :label="$t('form.password')" prop="qmrmm">
  34. <el-input type="text" v-model="form.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
  35. </el-form-item>
  36. </el-col>
  37. </el-row>
  38. </el-form>
  39. <div slot="footer" class="dialog-footer">
  40. <el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
  41. <el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
  42. </div>
  43. </el-dialog>
  44. </div>
  45. </template>
  46. <script>
  47. import { sj_js } from "@/api/business/sj/sj"
  48. import { mapGetters } from 'vuex'
  49. export default {
  50. name: "SjJs",
  51. data() {
  52. return {
  53. open: false,
  54. form: {},
  55. rules: {
  56. qmrmm: [{
  57. required: true,
  58. message: ' ',
  59. trigger: 'blur'
  60. }]
  61. }
  62. }
  63. },
  64. computed: {
  65. ...mapGetters([
  66. 'nickName','name'
  67. ]),
  68. },
  69. created() {
  70. },
  71. methods: {
  72. cancel() {
  73. this.open = false
  74. },
  75. reset() {
  76. this.form = {
  77. id: null,
  78. ids: null,
  79. mc: null,
  80. bh: null,
  81. qmyy: this.$t('page.business.resource.sj.jssj'),
  82. sdrmm: null
  83. }
  84. this.resetForm("form")
  85. },
  86. show(row) {
  87. this.reset()
  88. this.form.id = row.id
  89. this.form.mc = row.mc
  90. this.form.bh = row.bh
  91. this.open = true
  92. },
  93. save() {
  94. this.$refs["form"].validate(valid => {
  95. if (valid) {
  96. sj_js(this.form).then(response => {
  97. this.open = false
  98. this.$emit('callback')
  99. })
  100. }
  101. })
  102. }
  103. }
  104. }
  105. </script>