edit.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <div class="club-device page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img class="logo" :src="supplierInfo.logo" />
  5. <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
  6. </div>
  7. <div class="page-content">
  8. <div class="page-title">设备认证</div>
  9. <el-form :model="formData" :rules="rules">
  10. <el-form-item label="设备名称:">
  11. <el-select
  12. v-model="formData.deviceName"
  13. filterable
  14. allow-create
  15. placeholder="请输入新设备名称或选择已有设备"
  16. >
  17. <el-option label="中国" :value="1"> </el-option>
  18. </el-select>
  19. </el-form-item>
  20. <el-form-item prop="mobile" label="设备图片:">
  21. <br />
  22. <el-input v-show="false"></el-input>
  23. <SimpleUploadImage :limit="1" />
  24. </el-form-item>
  25. <el-form-item label="所属品牌:">
  26. <el-select v-model="formData.deviceName" placeholder="请选择品牌">
  27. <el-option label="中国" :value="1"> </el-option>
  28. </el-select>
  29. </el-form-item>
  30. <el-form-item prop="mobile" label="购买渠道:">
  31. <el-input placeholder="请输入购买渠道"></el-input>
  32. </el-form-item>
  33. <el-form-item prop="mobile" label="发票:">
  34. <br />
  35. <el-input v-show="false"></el-input>
  36. <SimpleUploadImage :limit="1" />
  37. </el-form-item>
  38. <el-form-item prop="mobile" label="设备SN码:">
  39. <el-input placeholder="请输入设备SN码"></el-input>
  40. </el-form-item>
  41. <el-form-item prop="mobile" label="设备参数:">
  42. <br />
  43. <div class="device-param-list">
  44. <span class="add-param">添加参数</span>
  45. <template v-for="i in 3">
  46. <div :key="i">
  47. <div class="param flex justify-between mb-4">
  48. <el-input placeholder="例如:品牌" class="mr-2"></el-input>
  49. <el-input placeholder="请输入参数信息"></el-input>
  50. <span class="remove el-icon-close"></span>
  51. </div>
  52. </div>
  53. </template>
  54. </div>
  55. </el-form-item>
  56. </el-form>
  57. <div class="control flex flex-col items-center">
  58. <div class="button submit flex justify-center items-center">提交</div>
  59. </div>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. import SimpleUploadImage from '@/components/SimpleUploadImage'
  65. import { mapGetters } from 'vuex'
  66. export default {
  67. layout: 'app',
  68. components: {
  69. SimpleUploadImage,
  70. },
  71. data() {
  72. return {
  73. formData: {
  74. deviceName: '',
  75. },
  76. rules: {},
  77. }
  78. },
  79. computed: {
  80. ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix']),
  81. },
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. @media screen and (min-width: 768px) {
  86. .page {
  87. background: #fff;
  88. }
  89. .page-top {
  90. height: 360px;
  91. @include themify($themes) {
  92. background: themed('banner-club-register');
  93. background-size: auto 360px;
  94. }
  95. .logo {
  96. display: block;
  97. width: 120px;
  98. height: 120px;
  99. border-radius: 50%;
  100. background: #fff;
  101. }
  102. .name {
  103. font-size: 30px;
  104. color: #fff;
  105. }
  106. }
  107. .page-content {
  108. width: 700px;
  109. margin: 0 auto;
  110. overflow: hidden;
  111. min-height: calc(100vh - 80px - 80px - 360px);
  112. box-sizing: border-box;
  113. padding-bottom: 40px;
  114. .page-title {
  115. font-size: 24px;
  116. font-weight: bold;
  117. text-align: center;
  118. padding: 40px 0;
  119. }
  120. .el-select {
  121. width: 100%;
  122. }
  123. .control {
  124. margin-top: 62px;
  125. .button {
  126. width: 295px;
  127. height: 50px;
  128. cursor: pointer;
  129. &.submit {
  130. @include themify($themes) {
  131. background-color: themed('color');
  132. color: #fff;
  133. }
  134. }
  135. }
  136. }
  137. .device-param-list {
  138. position: relative;
  139. .add-param {
  140. position: absolute;
  141. cursor: pointer;
  142. top: -40px;
  143. right: 0;
  144. text-decoration: underline;
  145. font-size: 14px;
  146. @include themify($themes) {
  147. color: themed('color');
  148. }
  149. }
  150. .param {
  151. position: relative;
  152. .remove {
  153. position: absolute;
  154. right: 0;
  155. top: 0;
  156. width: 20px;
  157. height: 20px;
  158. background: #f94b4b;
  159. border-radius: 2px;
  160. cursor: pointer;
  161. color: #fff;
  162. font-size: 14px;
  163. text-align: center;
  164. line-height: 20px;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. </style>