第一次提交

This commit is contained in:
dt_2916866708
2024-02-28 17:26:46 +08:00
commit f756390529
991 changed files with 126914 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
.charging_body {
width: 100vw;
height: 100vh;
background-color: #f1f8fd;
box-sizing: border-box;
padding-top: 50rpx;
.charging_container {
position: relative;
padding: 0 56rpx;
padding-top: 50rpx;
box-sizing: border-box;
background-color: #ffffff;
height: 100%;
width: 100%;
border-radius: 70rpx 70rpx 0 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.reload{
position: absolute;
right: 26rpx;
top:16rpx;
}
.charging_footer {
margin-top: 68rpx;
.charging_footer_button {
width: 100%;
padding: 30rpx 0;
border-radius: 15rpx 15rpx 15rpx 15rpx;
background: #121836;
color: #ffffff;
font-size: 34rpx;
font-weight: 600;
}
}
.charging_cars {
flex-wrap: wrap;
margin-top: 68rpx;
.charging_cars_item {
width: 290rpx;
height: 175rpx;
background: rgba(181, 195, 240, 0.08);
border-radius: 20rpx 20rpx 20rpx 20rpx;
padding: 30rpx 20rpx;
box-sizing: border-box;
.charging_cars_item_footer {
color: #121836;
font-size: 26rpx;
margin-top: 20rpx;
}
.charging_cars_item_top {
font-size: 26rpx;
color: #666666;
position: relative;
image {
width: 92rpx;
height: 92rpx;
position: absolute;
right: -57rpx;
top: -57rpx;
}
}
}
}
.charging_information {
margin-top: 68rpx;
.charging_information_item {
.charging_information_item_value {
font-size: 30rpx;
color: #121836;
}
.charging_information_item_label {
color: #666666;
font-size: 26rpx;
}
}
.segmentation {
width: 3rpx;
height: 88rpx;
background: linear-gradient(360deg, #c9d5f7 8%, #7494f7 49%, #c2d0fa 100%);
}
}
.charging_title:first-child{
margin-top: 0;
}
.charging_title {
color: #000000;
font-size: 26rpx;
margin-top: 15rpx;
}
.charging_dashboard {
margin-top: 68rpx;
}
}
}

View File

@@ -0,0 +1,177 @@
<template>
<view style="width: 100vw;height: 100vh;overflow: hidden;">
<view v-if="pageData" class="charging_body">
<view class="charging_container">
<view @click="reload" class="reload">
<uni-icons type="reload" size="25" color="#bbbbbb"></uni-icons>
</view>
<view style="margin-top: 0;" class="charging_title flex">
<text style="color: #bbbbbb;">订单编号</text>
<text class="oneflex flex jw">
<text> {{pageData.id}} </text>
</text>
</view>
<view class="charging_title flex">
<text style="color: #bbbbbb;">电桩编号</text>
<text class="oneflex flex jw">
<text> {{pageData.connectorId}} </text>
</text>
</view>
<view class="charging_dashboard">
<qiun-data-charts type="arcbar" :opts="opts" :chartData="chartData" />
</view>
<view class="charging_information flex">
<view class="oneflex flex jc ac column charging_information_item">
<view class="charging_information_item_label">预支付总金额</view>
<view class="charging_information_item_value">{{ tool.getnum(pageData.payMoneyPre,3) }}</view>
</view>
<view class="segmentation"></view>
<view class="oneflex flex jc ac column charging_information_item">
<view class="charging_information_item_label">预支付可用金额</view>
<view class="charging_information_item_value">{{tool.getnum(pageData.payMoneyPreAvailable,3)}}</view>
</view>
<view class="segmentation"></view>
<view class="oneflex flex jc ac column charging_information_item">
<view class="charging_information_item_label">预支付阀值</view>
<view class="charging_information_item_value">{{ tool.getnum(pageData.payMoneyPreFreeze,3) }}</view>
</view>
</view>
<view class="charging_cars flex jw">
<view class="charging_cars_item">
<view class="charging_cars_item_top">
累计充电时长
<image src="../../../static/sj.png"></image>
</view>
<view class="charging_cars_item_footer">{{ calcTime(pageData.endTime,pageData.startTime)}}</view>
</view>
<view class="charging_cars_item">
<view class="charging_cars_item_top">
累计充电量
<image src="../../../static/je1.png"></image>
</view>
<view class="charging_cars_item_footer">{{ tool.getnum(pageData.totalPower) }}</view>
</view>
</view>
<view class="charging_footer">
<view style="width: 100%;text-align: center; color: #00000073;font-size: 24rpx;margin-bottom: 20rpx;">
采样更新时间{{pageData.endTime}}
</view>
<view @click="stop" class="charging_footer_button flex ac jc">
{{pageData.orderStatus==2? '结束充电' : '结束中'}}
</view>
</view>
</view>
</view>
<skeleton v-else></skeleton>
</view>
</template>
<script>
import skeleton from './skeleton.vue'
import order from '@/api/order.js'
import qiunDataCharts from "../../components/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"
import chargingAnimation from "../../components/chargingAnimation/chargingAnimation.vue"
export default {
components: {
qiunDataCharts,
chargingAnimation,
skeleton
},
data() {
return {
timer:null,
time:'',
pageData:null,
chartData: {
series: [{
name: "充电状态",
color: "rgba(92, 130, 250, 1)",
data: 0
}]
},
//您可以通过修改 config-ucharts.js 文件中下标为 ['arcbar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
padding: undefined,
title: {
name: "0%",
fontSize: 35,
color: "#476FFA"
},
subtitle: {
name: "充电中",
fontSize: 15,
color: "#476FFA"
},
extra: {
arcbar: {
type: "circle",
width: 20,
backgroundColor: "#E9E9E9",
customColor: ['#1890FF'],
startAngle: 1.5,
endAngle: 0.25,
gap: 2
}
}
}
};
},
onUnload() {
uni.$emit('orderUpdate');
//
let routes = getCurrentPages();
if(routes[routes.length-2]['route']=='ChargingStation/pages/placeOrder/result/index'){
uni.reLaunch({
url: '/pages/index/index'
})
}
//
clearInterval(this.timer)
},
onReady() {},
onLoad(e) {
if(e.id){
this.getDetails(e.id);
this.timer = setInterval(()=>{
this.reload()
},30000)
}
},
methods: {
reload(){
this.getDetails(this.pageData.id)
},
calcTime(formerly,now){
var startTime = new Date(now); // 开始时间
var endTime = new Date(formerly); // 结束时间
var diff = endTime.getTime() - startTime.getTime(); // 获取差值时间(以毫秒为单位)
var seconds = Math.floor(diff / 1000); // 换算出相差的秒数
var minutes = Math.floor(seconds / 60); // 换算出相差的分钟数
var hours = Math.floor(minutes / 60); // 换算出相差的小时数
var days = Math.floor(hours / 24); // 换算出相差的天数
return hours % 24 + " 小时 " + minutes % 60 + " 分钟 "
},
getDetails(id){
order.xchargeOrderInfo(id).then(res=>{
this.pageData = res.data;
this.chartData.series[0]['data'] = res.data.soc? Number(res.data.soc) / 100 : 0;
this.opts.title.name = res.data.soc? `${Number(res.data.soc)}%` : '0%';
this.opts.subtitle.name = res.data.orderStatus==2? `充电中` : '正在停止';
})
},
stop(){
if(this.pageData.orderStatus!==2) return ;
order.stopOrder({id:this.pageData.id}).then(res=>{
if(res.code==20000){
uni.navigateBack()
}
})
}
}
};
</script>
<style scoped lang="scss">
@import 'index.scss';
</style>

View File

@@ -0,0 +1,190 @@
<!--
此文件为开发者工具生成生成时间: 2023/6/5下午1:33:46
使用方法
C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\charging\index.wxml 引入模板
```
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="{{loading}}" />
```
C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\charging\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
-->
<template name="skeleton">
<view class="sk-container">
<view class="charging_body data-v-515489ae">
<view class="charging_container data-v-515489ae">
<view class="reload data-v-515489ae" >
<view class="data-v-515489ae">
<text class="uni-icons icons--uni-icons uniui-reload icons--uniui-reload sk-pseudo sk-pseudo-circle" style="color:#bbbbbb;font-size:25px;"></text>
</view>
</view>
<view class="charging_title flex data-v-515489ae">
<text class="data-v-515489ae sk-transparent sk-text-14-2857-179 sk-text" style="color:#bbbbbb;">电桩编号</text>
<text class="oneflex flex jw data-v-515489ae"><text class="data-v-515489ae sk-transparent sk-text-14-2857-660 sk-text">1665521131920920662</text></text>
</view>
<view class="charging_dashboard data-v-515489ae">
<view class="data-v-515489ae">
<view class="chartsview charts--chartsview data-v-62b3267f charts--data-v-62b3267f" id="006cf5da--ChartBoxIddFBtIEYNpOFOFGfDScrnJJusVIuhBquc">
<view class="data-v-62b3267f charts--data-v-62b3267f">
<view canvas-id="dFBtIEYNpOFOFGfDScrnJJusVIuhBquc" class="data-v-62b3267f charts--data-v-62b3267f sk-transparent sk-text-14-2857-552 sk-text sk-image" id="006cf5da--dFBtIEYNpOFOFGfDScrnJJusVIuhBquc"
style="width:319px;height:250px;background:rgba(0,0,0,0);">绘图区域</view>
</view>
</view>
</view>
</view>
<view class="charging_information flex data-v-515489ae">
<view class="oneflex flex jc ac column charging_information_item data-v-515489ae">
<view class="charging_information_item_label data-v-515489ae sk-transparent sk-text-14-2857-501 sk-text">预支付总金额</view>
<view class="charging_information_item_value data-v-515489ae sk-transparent sk-text-14-2857-440 sk-text">35.00</view>
</view>
<view class="segmentation data-v-515489ae sk-image"></view>
<view class="oneflex flex jc ac column charging_information_item data-v-515489ae">
<view class="charging_information_item_label data-v-515489ae sk-transparent sk-text-14-2857-92 sk-text">预支付可用金额</view>
<view class="charging_information_item_value data-v-515489ae sk-transparent sk-text-14-2857-54 sk-text">30.00</view>
</view>
<view class="segmentation data-v-515489ae sk-image"></view>
<view class="oneflex flex jc ac column charging_information_item data-v-515489ae">
<view class="charging_information_item_label data-v-515489ae sk-transparent sk-text-14-2857-707 sk-text">预支付阀值</view>
<view class="charging_information_item_value data-v-515489ae sk-transparent sk-text-14-2857-845 sk-text">5.00</view>
</view>
</view>
<view class="charging_cars flex jw data-v-515489ae">
<view class="charging_cars_item data-v-515489ae">
<view class="charging_cars_item_top data-v-515489ae sk-transparent">累计充电时长
<image class="data-v-515489ae sk-image"></image>
</view>
<view class="charging_cars_item_footer data-v-515489ae sk-transparent sk-text-14-2857-733 sk-text">-10 小时 -20 分钟 </view>
</view>
<view class="charging_cars_item data-v-515489ae">
<view class="charging_cars_item_top data-v-515489ae sk-transparent">累计充电量
<image class="data-v-515489ae sk-image"></image>
</view>
<view class="charging_cars_item_footer data-v-515489ae sk-transparent sk-text-14-2857-444 sk-text">0.00</view>
</view>
</view>
<view class="charging_footer data-v-515489ae">
<view class="data-v-515489ae sk-transparent sk-text-14-2857-938 sk-text" style="width: 100%; text-align: center; color: rgba(0, 0, 0, 0.45); font-size: 12px; margin-bottom: 10px; background-position-x: 50%;">采样更新时间null</view>
<view class="charging_footer_button flex ac jc data-v-515489ae sk-transparent sk-text-14-2857-689 sk-text" >结束充电</view>
</view>
</view>
</view>
</view>
</template>
<style>
/*
此文件为开发者工具生成,生成时间: 2023/6/5下午1:33:46
在 C:\Users\lenovo\Documents\HBuilderProjects\Nebula-Flash-Charge_MP-WEIXIN\unpackage\dist\dev\mp-weixin\Order\pages\charging\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
*/
.sk-transparent {
color: transparent !important;
}
.sk-text-14-2857-179 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text {
background-origin: content-box !important;
background-clip: content-box !important;
background-color: transparent !important;
color: transparent !important;
background-repeat: repeat-y !important;
}
.sk-text-14-2857-660 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-14-2857-552 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 44.8000rpx;
position: relative !important;
}
.sk-text-14-2857-501 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-14-2857-440 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 42.0000rpx;
position: relative !important;
}
.sk-text-14-2857-92 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-14-2857-54 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 42.0000rpx;
position: relative !important;
}
.sk-text-14-2857-707 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-14-2857-845 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 42.0000rpx;
position: relative !important;
}
.sk-text-14-2857-733 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-14-2857-444 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-14-2857-938 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: relative !important;
}
.sk-text-14-2857-689 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 47.6000rpx;
position: relative !important;
}
.sk-image {
background: #EFEFEF !important;
}
.sk-pseudo::before, .sk-pseudo::after {
background: #EFEFEF !important;
background-image: none !important;
color: transparent !important;
border-color: transparent !important;
}
.sk-pseudo-rect::before, .sk-pseudo-rect::after {
border-radius: 0 !important;
}
.sk-pseudo-circle::before, .sk-pseudo-circle::after {
border-radius: 50% !important;
}
.sk-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: transparent;
}
</style>