123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <template>
- <view>
- <view class="picture"><image :src="item.vehDataVo.url"></image></view>
- <view class="car_info">
- <view class="category">车辆信息</view>
- <view class="show">
- <view>车牌号</view>
- <view class="plate-number">
- <view>{{item.vehDataVo.plate || '-'}}</view>
- </view>
- <view class="batter_vin">
- <view>
- <view>{{item.vehDataVo.vehModel || '-'}}</view>
- <view class="title">车型</view>
- </view>
- <view>
- <view>{{item.vehDataVo.vin || '-'}}</view>
- <view class="title">车辆VIN码</view>
- </view>
- </view>
- <view class="battery-info">
- <view>
- <view>{{item.vehDataVo.battDistance || '-'}}</view>
- <view>前端电池距离cm</view>
- </view>
- <view>
- <view>{{item.vehDataVo.totalMileage || '-'}}</view>
- <view>里程km</view>
- </view>
- <view>
- <view>{{item.vehDataVo.totalExchangeCnt || '-'}}</view>
- <view>换电次数</view>
- </view>
- <view>
- <view>{{item.vehDataVo.totalExchangePower || '-'}}</view>
- <view>换电量kW/h</view>
- </view>
- </view>
- </view>
- <view class="category">车辆状态</view>
- <view class="show">
- <view>电池编号</view>
- <view class="plate-number">
- <view>{{item.vehStatusVo.sn || '-'}}</view>
- </view>
- <view class="battery-soc">
- <view>电池SOC</view>
- <view>
- <view class="strip">
- <!-- 第二层进度条的颜色 -->
- <view class="blue" :style="'width:'+item.vehStatusVo.soc+'%'">
- <!-- (进度条显示的图片 样式:根据父元素进行相对定位 ,本身绝对定位 ) -->
- <text class="protext" :style="'left:'+item.vehStatusVo.soc+'%'"></text>
- <view class="pronumber" :style="'left:'+(item.vehStatusVo.soc-3)+'%'">{{item.vehStatusVo.soc}}%</view>
- </view>
- </view>
- </view>
- </view>
- <view class="battery-info">
- <view>
- <view>{{item.vehStatusVo.drivingMileage || '-'}}</view>
- <view>已行驶里程km</view>
- </view>
- <view>
- <view>{{item.vehStatusVo.remainderMileage || '-'}}</view>
- <view>预计剩余里程km</view>
- </view>
- <view>
- <view>{{item.vehStatusVo.voltage || '-'}}</view>
- <view>电压V</view>
- </view>
- <view>
- <view>{{item.vehStatusVo.current || '-'}}</view>
- <view>电流A</view>
- </view>
- </view>
- </view>
- <view class="records">
- <view class="top">
- <view>车辆换电记录</view>
- <view><navigator :url="'record?plate='+item.vehDataVo.plate">更多</navigator></view>
- </view>
- <view class="title">
- <view><text class="left">{{item.exchangeList.month || '-'}}</text><text class="right">月/{{item.exchangeList.year || '-'}}</text></view>
- <view class="money">
- <view class="Exchangelist"><view class="unit">换电量</view> <view class="value">{{item.exchangeList.exchangePower || '-'}}(kW/h)</view></view>
- <view class="Exchangelist"><view class="unit">换电费用</view> <view class="value">{{item.exchangeList.powerFee || '-'}}元</view></view>
- </view>
- </view>
- <view class="list">
- <view class="info" v-for="(data ,index) in item.exchangeList.list"
- :key="data.id">
- <view class="first">
- <view>{{data.plate || '-'}}</view><view>¥{{data.powerFee || '-'}}</view>
- </view>
- <view class="second">
- <view>{{data.createTime || '-'}}</view><view>{{data.exchangePower || '-'}}(kW.h)</view>
- </view>
- </view>
- <view class="info norecord" v-if="!item.exchangeList.list">暂无记录</view>
- </view>
- </view>
- </view>
- <tab-bar></tab-bar>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- plate:null,
- item:{},
- }
- },
- onLoad(option) {
- if(option.plate){
- this.plate=option.plate
- }else{
- this.$utils.msg('丢失车牌号参数')
- }
- },
- mounted() {
- this.getexchangeCarDetail()
- },
- methods: {
- getexchangeCarDetail(){
- if(this.plate){
- this.$http.exchangeCarDetail(this.plate).then(rs=>{
- if(rs.code === 0){
- this.item=rs.data
- }else{
- this.$utils.msg(rs.msg);
- }
- })
- .catch(error=>{
- this.$utils.msg(error);
- });
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .picture{
- width: 750rpx;
- height: 570rpx;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .car_info{
- width: 750rpx;
- min-height: 1000rpx;
- border-top-left-radius: 35rpx;
- border-top-right-radius: 35rpx;
- position: relative;
- top: -40rpx;
- background-color: #FBFDFF;
- padding: 0 30rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .category{
- font-weight: bold;
- font-size: 32rpx;
- margin: 20rpx 0rpx;
- text-indent: 1em;
- }
- .show{
- width: 690rpx;
- height: 375rpx;
- background: #F2F4F7;
- box-shadow: 0rpx 0rpx 10rpx 0rpx #DAE1EC;
- border-radius: 24rpx;
- opacity: 1;
- padding: 32rpx 26rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction:column;
- .plate-number{
- display: flex;
- margin-top: 12rpx;
- image{
- width: 26rpx;
- height: 26rpx;
- vertical-align: middle;
- }
- view:first-child{
- font-weight: 600;
- font-size: 36rpx;
- padding-right: 15rpx;
- }
-
- }
- .batter_vin{
- display: flex;
- justify-content: space-between;
- font-weight: bold;
- font-size: 26rpx;
- margin: 20rpx 0;
- .title{
- text-align: center;
- color: #86909c;
- font-weight: normal;
- }
- }
- .battery-soc{
- display: flex;
- margin-top: 30rpx;
- margin-bottom: 60rpx;
- view:first-child{
- width: 105rpx;
- font-size: 22rpx;
- }
- view:last-child{
- flex: 1;
- .strip {
- /* 父元素相对定位 */
- position: relative;
- width: 525rpx;
- height: 18rpx;
- background-color: #fff;
- top: 10rpx;
- }
- .blue {
- height: 18rpx;
- background-color: #ff7d00;
- font-size: 28rpx;
- }
- .protext{
- width:2rpx;
- height:32rpx;
- background: #86909c;
- /* 子元素绝对定位 */
- position: absolute;
- /* 定位方向:属性值 */
- top:-9rpx
- }
- .pronumber{
- font-size: 26rpx;
- font-weight: bold;
- position: absolute;
- /* 定位方向:属性值 */
- top:30rpx;
- }
- }
- }
- .battery-info{
- display: flex;
- justify-content: space-between;
- margin-top: 20rpx;
- text-align: center;
- line-height: 36rpx;
- view > view:first-child{
- font-weight: bold;
- }
- view > view:last-child{
- color: #939da7;
- font-size: 24rpx;
- margin-top: 3rpx;
- }
- }
- }
- .records{
- width: 690rpx;
- display: flex;
- flex-direction: column;
- .top{
- display: flex;
- flex-direction: row;
- padding: 0 5rpx;
- margin: 20rpx 0rpx;
- justify-content: space-between;
- font-size: 32rpx;
- font-weight: bold;
- text-indent: 12rpx;
- navigator{
- color: #58be6b;
- }
- }
- .title{
- width: 690rpx;
- height: 184rpx;
- background-image:url('https://xcx.xnymzx.com/zkstation/bgr.png');
- background-size: 100% 100%;
- display: flex;
- padding: 0rpx 30rpx;
- box-sizing: border-box;
- font-size: 30rpx;
- font-weight: bold;
- flex-direction: column;
- .money{
- display: flex;
- justify-content: space-between;
- line-height: 60rpx;
- .Exchangelist{
- display: flex;
- .unit{
- font-size: 24rpx;
- font-weight: 600;
- }
- .value{
- font-size: 30rpx;
- font-weight: 600;
- padding-left: 8rpx;
- }
- }
- }
- .left{
- font-size: 80rpx;
- }
- .right{
- color: #505968;
- }
- }
- .list{
- display: flex;
- background-color: #fff;
- width: 690rpx;
- border-bottom-left-radius: 35rpx;
- border-bottom-right-radius: 35rpx;
- margin-bottom: 100rpx;
- padding:0 35rpx;
- box-sizing: border-box;
- flex-direction: column;
- .info{
- width: 100%;
- margin: 30rpx 0rpx;
- }
- .norecord{
- text-align: center;
- color: #86909c;
- }
- .first{
- display: flex;
- justify-content: space-between;
- font-size: 30rpx;
- view:last-child{
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- .second{
- color: #86909c;
- font-size: 28rpx;
- display: flex;
- justify-content: space-between;
- margin-top: 2rpx;
- }
- }
- }
- }
- </style>
|