otheruserForm.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <div id="otheruserForm">
  3. <el-row>
  4. <el-col :span="24" class="form">
  5. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  6. <el-col :span="24">
  7. <el-form-item label="用户名称" prop="name">
  8. <el-input v-model="ruleForm.name" placeholder="请输入用户名称"></el-input>
  9. </el-form-item>
  10. </el-col>
  11. <el-col :span="24">
  12. <el-form-item label="手机号" prop="phone">
  13. <el-input v-model="ruleForm.phone" placeholder="请输入手机号"></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="24">
  17. <el-form-item label="用户类型" prop="type">
  18. <el-select v-model="ruleForm.type" placeholder="请选择用户类型">
  19. <el-option label="金控集团后台管理员" value="0"></el-option>
  20. <el-option label="金融机构用户" value="1"></el-option>
  21. <el-option label="政府用户" value="2"></el-option>
  22. </el-select>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="24">
  26. <el-form-item label="用户角色" prop="characterid">
  27. <el-select v-model="ruleForm.characterid" placeholder="请选择用户角色">
  28. <el-option v-for="(item, index) in charList" :key="index" :label="item.name" :value="item.id"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="24" class="clickBtn">
  33. <el-form-item>
  34. <el-button type="primary" size="small" @click="submitForm('ruleForm')">提交</el-button>
  35. <el-button size="small" @click="resetForm('ruleForm')">取消</el-button>
  36. </el-form-item>
  37. </el-col>
  38. </el-form>
  39. </el-col>
  40. </el-row>
  41. </div>
  42. </template>
  43. <script>
  44. export default {
  45. name: 'otheruserForm',
  46. props: {
  47. ruleForm: null,
  48. charList: null,
  49. },
  50. components: {},
  51. data: () => ({
  52. rules: {
  53. phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
  54. type: [{ required: true, message: '请选择用户类型', trigger: 'change' }],
  55. },
  56. }),
  57. created() {},
  58. computed: {},
  59. methods: {
  60. submitForm() {
  61. this.$emit('submitForm', { data: this.ruleForm });
  62. },
  63. resetForm() {
  64. this.$emit('resetForm');
  65. },
  66. },
  67. };
  68. </script>
  69. <style lang="less" scoped>
  70. p {
  71. padding: 0;
  72. margin: 0;
  73. }
  74. .top .shu {
  75. float: left;
  76. width: 4px;
  77. height: 20px;
  78. background: rgba(233, 2, 29, 1);
  79. }
  80. .top .title {
  81. float: left;
  82. padding: 0 10px;
  83. font-size: 16px;
  84. font-family: Source Han Sans SC;
  85. font-weight: bold;
  86. color: rgba(40, 40, 40, 1);
  87. }
  88. /deep/.el-textarea__inner {
  89. min-height: 100px !important;
  90. }
  91. /deep/.select {
  92. width: 632px;
  93. }
  94. .selects {
  95. width: 473px;
  96. margin: 0 15px 0 0;
  97. }
  98. /deep/.el-radio__input.is-checked + .el-radio__label {
  99. color: #e9021d;
  100. }
  101. /deep/.el-radio__input.is-checked .el-radio__inner {
  102. border-color: #e9021d;
  103. background: #e9021d;
  104. }
  105. /deep/.el-checkbox__input.is-checked + .el-checkbox__label {
  106. color: #e9021d;
  107. }
  108. /deep/.el-checkbox__input.is-checked .el-checkbox__inner,
  109. .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  110. background-color: #e9021d;
  111. border-color: #e9021d;
  112. }
  113. /deep/.el-checkbox-button,
  114. .el-checkbox-button__inner {
  115. margin: 0 15px 0 0;
  116. }
  117. /deep/.el-checkbox-button__inner {
  118. padding: 7px 5px;
  119. border: 1px solid #ccc;
  120. border-radius: 5px;
  121. }
  122. /deep/.el-checkbox-button__inner:hover {
  123. color: #e9021d;
  124. }
  125. /deep/.el-checkbox-button:first-child .el-checkbox-button__inner {
  126. border-left: 1px solid #ccc;
  127. border-radius: 5px;
  128. }
  129. /deep/.el-checkbox-button:last-child .el-checkbox-button__inner {
  130. border-radius: 5px;
  131. }
  132. /deep/.el-checkbox-button.is-checked .el-checkbox-button__inner {
  133. color: #e9021d;
  134. background-color: #ffffff;
  135. border-color: #e9021d;
  136. }
  137. /deep/.el-checkbox-button.is-checked .el-checkbox-button__inner {
  138. box-shadow: none;
  139. }
  140. /deep/.el-switch.is-checked .el-switch__core {
  141. border-color: #e9021d;
  142. background-color: #e9021d;
  143. }
  144. .clickBtn .el-button {
  145. width: 100px;
  146. height: 40px;
  147. padding: 0;
  148. color: #ffffff;
  149. background: #b9b9b9;
  150. border-radius: 4px;
  151. margin: 40px;
  152. }
  153. .clickBtn {
  154. text-align: center;
  155. margin: 40px 0;
  156. border-top: 1px solid #ccc;
  157. }
  158. .clickBtn .el-button:first-child {
  159. background-color: #e9021d;
  160. }
  161. </style>