12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view>
- <uni-forms :modelValue="infodata">
- <uni-forms-item label="连接状态:" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.comState==1?'通讯正常':'通讯异常' || '-'" placeholder="请输入" disabled/>
- </uni-forms-item>
- <uni-forms-item label="落座信号:" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.storeState ==0?'空仓':infodata.storeState ==1?'有电池':'连接异常'" placeholder="请输入" disabled/>
- </uni-forms-item>
- <uni-forms-item label="充电状态:" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.title || '-'" placeholder="请输入" disabled/>
- </uni-forms-item>
- <uni-forms-item label="充电电压(V):" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgVoltage || '-'" placeholder="请输入" disabled/>
- </uni-forms-item>
- <uni-forms-item label="充电电流(A):" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgCurrent || '-'" placeholder="请输入" disabled/>
- </uni-forms-item>
- <uni-forms-item label="累计充电电量(kWh):" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgCapacity || '-'" placeholder="请输入" disabled/>
- </uni-forms-item>
- <!-- <uni-forms-item label="已充时长:" name="name" label-align="right" label-width="120px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.name || '-'" placeholder="请输入" disabled/>
- </uni-forms-item> -->
- <uni-forms-item label="充满预计还需:" name="name" label-align="right" label-width="140px">
- <uni-easyinput type="text" v-model="infodata.chargerInfoVo.chgEstimatedTime || '-'" placeholder="请输入" disabled/>
- </uni-forms-item>
- </uni-forms>
- </view>
- <!-- 剩个已充时长和落座信号没有对字段 -->
- </template>
- <script>
- export default {
- name:'chargerDrawe',
- props:['infodata'],
- data() {
- return {
- }
- },
- created() {
- if(this.infodata.chargerInfoVo.chgState === 1){
- this.infodata.chargerInfoVo.title = ' 准备充电'
- }else if(this.infodata.chargerInfoVo.chgState === 2){
- this.infodata.chargerInfoVo.title = ' 充电中'
- }else if(this.infodata.chargerInfoVo.chgState === 3){
- this.infodata.chargerInfoVo.title = ' 充电完成'
- }else if(this.infodata.chargerInfoVo.chgState === 4){
- this.infodata.chargerInfoVo.title = ' 启动失败'
- }else if(this.infodata.chargerInfoVo.chgState === 5){
- this.infodata.chargerInfoVo.title = ' 预约'
- }else if(this.infodata.chargerInfoVo.chgState === 6){
- this.infodata.chargerInfoVo.title = ' 故障'
- }else if(this.infodata.chargerInfoVo.chgState === 0){
- this.infodata.chargerInfoVo.title = ' 空闲'
- }else{
- this.infodata.chargerInfoVo.title = ' 无法获取'
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .uni-forms-item__content{
- background: rgba(255,255,255,0);
- border-radius: 2px 2px 2px 2px;
- border: 1px solid #263042;
- .uni-easyinput__content{
- background: none !important;
- border: none !important;
- color: #fff;
- }
- }
- </style>
|