chargerDrawe.vue 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view>
  3. <uni-forms :modelValue="infodata">
  4. <uni-forms-item label="连接状态:" name="name" label-align="right" label-width="140px">
  5. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.comState==1?'通讯正常':'通讯异常' || '-'" placeholder="请输入" disabled/>
  6. </uni-forms-item>
  7. <uni-forms-item label="落座信号:" name="name" label-align="right" label-width="140px">
  8. <uni-easyinput type="text" v-model="infodata.storeState ==0?'空仓':infodata.storeState ==1?'有电池':'连接异常'" placeholder="请输入" disabled/>
  9. </uni-forms-item>
  10. <uni-forms-item label="充电状态:" name="name" label-align="right" label-width="140px">
  11. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.title || '-'" placeholder="请输入" disabled/>
  12. </uni-forms-item>
  13. <uni-forms-item label="充电电压(V):" name="name" label-align="right" label-width="140px">
  14. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgVoltage || '-'" placeholder="请输入" disabled/>
  15. </uni-forms-item>
  16. <uni-forms-item label="充电电流(A):" name="name" label-align="right" label-width="140px">
  17. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgCurrent || '-'" placeholder="请输入" disabled/>
  18. </uni-forms-item>
  19. <uni-forms-item label="累计充电电量(kWh):" name="name" label-align="right" label-width="140px">
  20. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgCapacity || '-'" placeholder="请输入" disabled/>
  21. </uni-forms-item>
  22. <!-- <uni-forms-item label="已充时长:" name="name" label-align="right" label-width="120px">
  23. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.name || '-'" placeholder="请输入" disabled/>
  24. </uni-forms-item> -->
  25. <uni-forms-item label="充满预计还需:" name="name" label-align="right" label-width="140px">
  26. <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgEstimatedTime || '-'" placeholder="请输入" disabled/>
  27. </uni-forms-item>
  28. </uni-forms>
  29. </view>
  30. <!-- 剩个已充时长和落座信号没有对字段 -->
  31. </template>
  32. <script>
  33. export default {
  34. name:'chargerDrawe',
  35. props:['infodata'],
  36. data() {
  37. return {
  38. }
  39. },
  40. created() {
  41. if(this.infodata.chargerInfoVo.chgState === 1){
  42. this.infodata.chargerInfoVo.title = ' 准备充电'
  43. }else if(this.infodata.chargerInfoVo.chgState === 2){
  44. this.infodata.chargerInfoVo.title = ' 充电中'
  45. }else if(this.infodata.chargerInfoVo.chgState === 3){
  46. this.infodata.chargerInfoVo.title = ' 充电完成'
  47. }else if(this.infodata.chargerInfoVo.chgState === 4){
  48. this.infodata.chargerInfoVo.title = ' 启动失败'
  49. }else if(this.infodata.chargerInfoVo.chgState === 5){
  50. this.infodata.chargerInfoVo.title = ' 预约'
  51. }else if(this.infodata.chargerInfoVo.chgState === 6){
  52. this.infodata.chargerInfoVo.title = ' 故障'
  53. }else if(this.infodata.chargerInfoVo.chgState === 0){
  54. this.infodata.chargerInfoVo.title = ' 空闲'
  55. }else{
  56. this.infodata.chargerInfoVo.title = ' 无法获取'
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. ::v-deep .uni-forms-item__content{
  63. background: rgba(255,255,255,0);
  64. border-radius: 2px 2px 2px 2px;
  65. border: 1px solid #263042;
  66. .uni-easyinput__content{
  67. background: none !important;
  68. border: none !important;
  69. color: #fff;
  70. }
  71. }
  72. </style>