Rap 原分销系统代码Web
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

fee842176545e19edffe61caa5b1a3b4a31c0b23.svn-base 2.1KB

5 месяцев назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <el-dialog
  3. append-to-body
  4. :close-on-click-modal="false"
  5. :before-close="crud.cancelCU"
  6. :visible="crud.status.cu > 0"
  7. :title="crud.status.title"
  8. width="500px"
  9. >
  10. <el-form
  11. ref="form"
  12. :model="form"
  13. :rules="rules"
  14. size="small"
  15. label-width="80px"
  16. >
  17. <el-form-item
  18. label="名称"
  19. prop="name"
  20. >
  21. <el-input
  22. v-model="form.name"
  23. style="width: 370px;"
  24. />
  25. </el-form-item>
  26. <el-form-item
  27. label="排序"
  28. prop="jobSort"
  29. >
  30. <el-input-number
  31. v-model.number="form.jobSort"
  32. :min="0"
  33. :max="999"
  34. controls-position="right"
  35. style="width: 370px;"
  36. />
  37. </el-form-item>
  38. <el-form-item
  39. v-if="form.pid !== 0"
  40. label="状态"
  41. prop="enabled"
  42. >
  43. <el-radio
  44. v-for="item in jobStatus"
  45. :key="item.id"
  46. v-model="form.enabled"
  47. :label="item.value === 'true'"
  48. >
  49. {{ item.label }}
  50. </el-radio>
  51. </el-form-item>
  52. </el-form>
  53. <div
  54. slot="footer"
  55. class="dialog-footer"
  56. >
  57. <el-button
  58. type="text"
  59. @click="crud.cancelCU"
  60. >
  61. 取消
  62. </el-button>
  63. <el-button
  64. :loading="crud.status.cu === 2"
  65. type="primary"
  66. @click="crud.submitCU"
  67. >
  68. 确认
  69. </el-button>
  70. </div>
  71. </el-dialog>
  72. </template>
  73. <script>
  74. import { form } from '@crud/crud'
  75. const defaultForm = {
  76. id: null,
  77. name: '',
  78. jobSort: 999,
  79. enabled: true
  80. }
  81. export default {
  82. mixins: [form(defaultForm)],
  83. props: {
  84. jobStatus: {
  85. type: Array,
  86. required: true
  87. }
  88. },
  89. data() {
  90. return {
  91. rules: {
  92. name: [
  93. { required: true, message: '请输入名称', trigger: 'blur' }
  94. ],
  95. jobSort: [
  96. { required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
  97. ]
  98. }
  99. }
  100. }
  101. }
  102. </script>
  103. <style rel="stylesheet/scss" lang="scss" scoped>
  104. ::v-deep .el-input-number .el-input__inner {
  105. text-align: left;
  106. }
  107. </style>