ChargeDrawer.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view>
  3. <uni-forms :modelValue="setForm" ref="setvalueForm" :rules="rules">
  4. <uni-forms-item label="仓位号:" required name="chargerId" label-align="right" label-width="138px">
  5. <uni-easyinput type="text" :maxlength="2" @blur="getChargerId" v-model="setForm.chargerId" placeholder="请输入仓位号" :clear="false"/>
  6. </uni-forms-item>
  7. <uni-forms-item label="桩编号:" required name="chargerCode" label-align="right" label-width="138px">
  8. <uni-easyinput type="text" v-model.trim="setForm.chargerCode" :maxlength="50" placeholder="请输入桩编号" :clear="false"/>
  9. </uni-forms-item>
  10. <uni-forms-item label="是否可换电:" required name="isSwap" label-align="right" label-width="138px">
  11. <uni-data-select v-model.trim="setForm.isSwap" placeholder="请选择是否可换电" :localdata="rangePower"
  12. :clear="false"></uni-data-select>
  13. </uni-forms-item>
  14. <uni-forms-item label="充电连接控制方式:" required name="isCheck" label-align="right" label-width="138px">
  15. <uni-data-select v-model.trim="setForm.isCheck" placeholder="请选择充电连接控制方式" :localdata="rangeCharge"
  16. :clear="false"></uni-data-select>
  17. </uni-forms-item>
  18. <!-- <uni-forms-item label="状态:" name="state" label-align="right" label-width="120px">
  19. <uni-data-select v-model.trim="basicFrom.state" :localdata="range"
  20. :clear="false"></uni-data-select>
  21. </uni-forms-item> -->
  22. </uni-forms>
  23. </view>
  24. <!-- 剩个已充时长和落座信号没有对字段 -->
  25. </template>
  26. <script>
  27. export default {
  28. name: 'ChargeDrawer',
  29. props: ['setForm','rangePower','rangeCharge','rules','changeChargerId'],
  30. data() {
  31. return {
  32. // getbasicFrom:{}
  33. }
  34. },
  35. methods:{
  36. getChargerId() {
  37. if(this.setForm.chargerId==0){
  38. this.$emit('changeChargerId')
  39. }
  40. },
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. ::v-deep .uni-forms-item {
  46. width: 100% !important;
  47. }
  48. </style>