batteryDrawe.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <template>
  2. <view class="">
  3. <view class="drawerBox">
  4. <view class="top">
  5. <view class="title">充电设置</view>
  6. <view class="handler">
  7. <view class="cancel" @click="close">取消</view>
  8. <view class="save" @click="SubmitPublic">保存</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="main_drawe">
  13. <uni-forms :modelValue="fromData">
  14. <uni-forms-item label="当前充电:" name="name" label-align="right" label-width="120px">
  15. <uni-easyinput type="text" v-model="fromData.comState== 0 ?'插枪充电':'线束充电'" placeholder="请输入"
  16. disabled />
  17. </uni-forms-item>
  18. <uni-forms-item label="枪号:" name="arr" label-width="120px" label-align="right">
  19. <uni-data-select v-model="fromData.Guncall" :localdata="fromData.arr" @change="changegun">
  20. </uni-data-select>
  21. </uni-forms-item>
  22. <uni-forms-item label="按类型设置:" name="arrType" label-width="120px" label-align="right">
  23. <uni-data-select v-model="fromData.setType" :localdata="fromData.arrType" @change="changeId">
  24. </uni-data-select>
  25. </uni-forms-item>
  26. <uni-forms-item label="充电功率:" name="name" label-align="right" label-width="120px">
  27. <uni-easyinput type="number" v-model="fromData.powerNum" placeholder="请输入" maxlength="4"/>
  28. <view class="kwh">
  29. KWH
  30. </view>
  31. </uni-forms-item>
  32. </uni-forms>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. props: ['infodata'],
  39. data() {
  40. return {
  41. fromData: {
  42. arr: [{
  43. text: 'A枪',
  44. value: '0'
  45. }, {
  46. text: 'B枪',
  47. value: '1'
  48. }],
  49. arrType: [{
  50. text: '桩自主控制功率',
  51. value: '0'
  52. },
  53. {
  54. text: '功率值',
  55. value: '1'
  56. },
  57. {
  58. text: '功率百分比',
  59. value: '2'
  60. }, {
  61. text: '输出电流',
  62. value: '3'
  63. }
  64. ],
  65. gunNo: '',
  66. comState: 1, //充电类型
  67. Guncall: '',
  68. setType: '',
  69. cangnum:0,//仓号
  70. powerNum:'',
  71. },
  72. }
  73. },
  74. methods: {
  75. //下拉事件
  76. changeId() {
  77. console.log(123)
  78. },
  79. //下拉事件
  80. changegun() {
  81. },
  82. //取消
  83. close() {
  84. this.$emit('closeDrawer')
  85. },
  86. // 保存
  87. SubmitPublic() {
  88. this.$emit('save',this.fromData)
  89. }
  90. },
  91. mounted() {
  92. this.fromData.comState = this.infodata.chgType,
  93. this.fromData.cangnum = this.infodata.chargerInfoVo.chargerCode
  94. }
  95. }
  96. </script>
  97. <style lang="scss" scoped>
  98. ::v-deep .uni-forms-item__content {
  99. background: rgba(255, 255, 255, 0);
  100. border-radius: 2px 2px 2px 2px;
  101. border: 1px solid #263042;
  102. .uni-easyinput__content {
  103. background: none !important;
  104. border: none !important;
  105. color: #fff;
  106. }
  107. }
  108. .kwh {
  109. width: 50px;
  110. height: 35px;
  111. background: #263042;
  112. font-size: 14px;
  113. font-weight: 400;
  114. color: #4C5D71;
  115. line-height: 35px;
  116. position: absolute;
  117. right: 0;
  118. top: 0px;
  119. text-align: center;
  120. }
  121. ::v-deep .uni-select__selector {
  122. background: #111827;
  123. border: 1px solid #263042;
  124. color: #606266;
  125. z-index: 9999999;
  126. }
  127. ::v-deep .uni-select {
  128. border: none;
  129. }
  130. ::v-deep .uni-popper__arrow::after {
  131. display: none;
  132. }
  133. ::v-deep .uni-popper__arrow {
  134. display: none;
  135. }
  136. ::v-deep .uni-select__input-text {
  137. color: #fff;
  138. }
  139. .main_drawe {
  140. padding: 20px;
  141. margin-top: 80px;
  142. }
  143. .drawerBox {
  144. display: flex;
  145. flex-direction: column;
  146. height: 100%;
  147. .top {
  148. width: 100%;
  149. height: 74px;
  150. line-height: 54px;
  151. border-bottom: 1px solid rgba(65, 74, 99, 0.5);
  152. box-sizing: border-box;
  153. z-index: 999;
  154. padding: 0px 20px;
  155. display: flex;
  156. padding-top: 20px;
  157. background-color: #141A25;
  158. position: fixed;
  159. top: 0;
  160. .title {
  161. min-width: 74px;
  162. white-space: nowrap;
  163. font-size: 16px;
  164. font-weight: 500;
  165. color: #FFFFFF;
  166. position: relative;
  167. }
  168. .title::before {
  169. content: '';
  170. width: 100%;
  171. position: absolute;
  172. height: 2px;
  173. background: #FFFFFF;
  174. box-shadow: 0px 0px 6px 0px rgba(255, 255, 255, 0.8);
  175. bottom: -1px;
  176. }
  177. .close {
  178. width: 24px;
  179. height: 24px;
  180. color: #FFFFFF;
  181. margin-left: auto;
  182. font-size: 14px;
  183. text-align: center;
  184. vertical-align: middle;
  185. }
  186. .handler {
  187. display: flex;
  188. margin-left: auto;
  189. height: 54px;
  190. align-items: center;
  191. .cancel {
  192. width: 60px;
  193. height: 54px;
  194. border-radius: 2px;
  195. border: 1px solid #263042;
  196. font-size: 14px;
  197. font-weight: 400;
  198. color: #FFFFFF;
  199. text-align: center;
  200. line-height: 54px;
  201. }
  202. .save {
  203. width: 60px;
  204. height: 54px;
  205. background: #91FDB9;
  206. border-radius: 2px;
  207. text-align: center;
  208. line-height: 54px;
  209. font-size: 14px;
  210. font-weight: 400;
  211. color: black;
  212. }
  213. }
  214. }
  215. }
  216. </style>