|
@@ -11,7 +11,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="progress-bar2">
|
|
|
- <u-circle-progress width="300" active-color="green" duration='20' :percent="100" border-width="20">
|
|
|
+ <u-circle-progress width="300" :active-color="percentColor" duration='20' :percent="percent" border-width="20">
|
|
|
<view class="u-progress-content">
|
|
|
|
|
|
<text class='u-progress-info' v-if="chargingGun.gunType==1">
|
|
@@ -21,9 +21,10 @@
|
|
|
|
|
|
<text class='u-progress-info' v-if="chargingGun.gunType==2">
|
|
|
<p style="text-align: center;">
|
|
|
- {{chargingRecord.electricQuantity?(chargingRecord.electricQuantity/10000).toFixed(2):0}}
|
|
|
+ <!-- {{chargingRecord.electricQuantity?(chargingRecord.electricQuantity/10000).toFixed(2):0}} -->
|
|
|
+ {{chargingRecord.actualFee?chargingRecord.actualFee.toFixed(2):0}}
|
|
|
</p>
|
|
|
- <p class="progress-text">已充电量(度)</p>
|
|
|
+ <p class="progress-text">充电金额(元)</p>
|
|
|
</text>
|
|
|
|
|
|
</view>
|
|
@@ -216,7 +217,7 @@
|
|
|
<!-- 充电状态 -->
|
|
|
<view class="charge-state">
|
|
|
<view class="progress-bar">
|
|
|
- <u-circle-progress width="400" active-color="#53b56b" :percent="percent?percent:percentValue"
|
|
|
+ <u-circle-progress width="400" :active-color="percentColor" duration='20' :percent="percent?percent:percentValue"
|
|
|
border-width="35">
|
|
|
|
|
|
|
|
@@ -228,17 +229,19 @@
|
|
|
<view class="u-progress-content" v-else>
|
|
|
|
|
|
<text class='u-progress-info'>
|
|
|
- <view v-if="chargingGun.gunType==1" style="
|
|
|
- font-size: 80rpx;
|
|
|
- font-weight: bold;
|
|
|
- color: #009B52 ;
|
|
|
- ">{{percent}}<span style="font-size: 16px;">%</span></view>
|
|
|
- <view v-if="chargingGun.gunType==2" style="
|
|
|
+
|
|
|
+ <view style="
|
|
|
font-size: 60rpx;
|
|
|
font-weight: bold;
|
|
|
color: #009B52 ;
|
|
|
- ">{{chargingRecord.statusText}}</view>
|
|
|
- <view style="
|
|
|
+ ">{{chargingRecord.statusText}}</view>
|
|
|
+
|
|
|
+ <view v-if="chargingGun.gunType==1" style="
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ ">充电SOC{{percent}}%</view>
|
|
|
+
|
|
|
+ <view v-else style="
|
|
|
font-size: 32rpx;
|
|
|
font-weight: bold;
|
|
|
">预计费用{{chargingRecord.dueFee?chargingRecord.dueFee.toFixed(2):'0.00'}}元</view>
|
|
@@ -265,10 +268,10 @@
|
|
|
</view>
|
|
|
<view class="info-item">
|
|
|
<view class="content">
|
|
|
- {{chargingRecord.electricQuantity?(chargingRecord.electricQuantity/10000).toFixed(2):0}}
|
|
|
+ {{chargingRecord.dueFee?chargingRecord.dueFee.toFixed(2):'0.00'}}
|
|
|
</view>
|
|
|
<view class="name">
|
|
|
- 已充电量(度)
|
|
|
+ 预计费用(元)
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="info-item" v-if="chargingRecord.payType==1">
|
|
@@ -766,7 +769,22 @@
|
|
|
this.addpercent()
|
|
|
this.getNewsList();
|
|
|
},
|
|
|
- computed: {
|
|
|
+ computed: {
|
|
|
+ percentColor(){
|
|
|
+ if(this.percent==0||this.percent>80){
|
|
|
+ return '#53b56b'
|
|
|
+ }else if(this.percent>50){
|
|
|
+ return '#85e43e'
|
|
|
+ }else if(this.percent>40){
|
|
|
+ return '#a8ac0d'
|
|
|
+ }else if(this.percent>20){
|
|
|
+ return '#c5c90c'
|
|
|
+ }else if(this.percent>0){
|
|
|
+ return '#f26747'
|
|
|
+ }else{
|
|
|
+ return'#53b56b'
|
|
|
+ }
|
|
|
+ },
|
|
|
userCardBool() {
|
|
|
if (this.chargingRecord && this.chargingRecord.userCardId && !this.showVinBl && this.userCard) {
|
|
|
|
|
@@ -998,11 +1016,15 @@
|
|
|
addpercent() {
|
|
|
this.timer = this.getPercent()
|
|
|
if (this.isReady) {
|
|
|
- setTimeout(() => {
|
|
|
- this.percentValue++;
|
|
|
- if (this.percentValue >= 100) {
|
|
|
- this.percentValue = 0;
|
|
|
+ setTimeout(() => {
|
|
|
+ if(this.chargingGun.gunType==2||this.percent==0){
|
|
|
+ this.percentValue++;
|
|
|
+ if (this.percentValue >= 100) {
|
|
|
+ this.percentValue = 0;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
this.addpercent()
|
|
|
}, 100)
|
|
|
}
|
|
@@ -1120,21 +1142,29 @@
|
|
|
if (this.chargingGun.gunType == 1) {
|
|
|
|
|
|
if (this.chargingRecord.status == 1) {
|
|
|
- this.percent = this.chargingGun.soc
|
|
|
+ this.percent = this.chargingGun.soc
|
|
|
+ //zkx
|
|
|
+ //this.percent =12
|
|
|
if (this.userCardBool && !this.showVinBl && !this.vinCk()) {
|
|
|
this.showVin = true;
|
|
|
this.showVinBl = true; //只提示1次
|
|
|
}
|
|
|
|
|
|
+ }else{
|
|
|
+ this.percent=this.chargingRecord.endSoc;
|
|
|
}
|
|
|
} else if (this.chargingGun.gunType == 2) {
|
|
|
- //交流
|
|
|
- }
|
|
|
+ //交流
|
|
|
+ if (this.chargingRecord.status == 2) {
|
|
|
+ this.percent=100;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ //zkx
|
|
|
+ //this.percent=42;
|
|
|
if (this.chargingRecord.status == 1) {
|
|
|
if (this.carhelp.getGzDate() && !this.show2) {
|
|
|
-
|
|
|
//this.checkSubscribe()
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|