|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="container">
|
|
<view class="container">
|
|
|
- <view style="height: 20px;line-height:15px;padding: 2px;text-align: center;position: fixed;right: -5px;top:30px;z-index: 9999;background: rgb(243,157,116);color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="goBack">
|
|
|
|
|
|
|
+ <!-- <view style="height: 20px;line-height:15px;padding: 2px;text-align: center;position: fixed;right: -5px;top:30px;z-index: 9999;background: rgb(243,157,116);color: white;border-radius: 5px;font-size: 10px;width: 120rpx;" @click="goBack">
|
|
|
{{$t('charge.break')}}
|
|
{{$t('charge.break')}}
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -27,11 +27,11 @@
|
|
|
<view class="dot"></view>
|
|
<view class="dot"></view>
|
|
|
<view class="dot"></view>
|
|
<view class="dot"></view>
|
|
|
<view class="dot"></view>
|
|
<view class="dot"></view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
|
|
|
<!-- <canvas id="c">-->
|
|
<!-- <canvas id="c">-->
|
|
|
<!-- </canvas>-->
|
|
<!-- </canvas>-->
|
|
|
- <view class="stip">
|
|
|
|
|
|
|
+ <!-- <view class="stip">
|
|
|
|
|
|
|
|
<view class="p0" st="">{{i18('设备号')}}:{{uuid}}</view>
|
|
<view class="p0" st="">{{i18('设备号')}}:{{uuid}}</view>
|
|
|
<view class="p1">
|
|
<view class="p1">
|
|
@@ -147,8 +147,193 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- </u-modal>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </u-modal> -->
|
|
|
|
|
+<view style="height: 0vh;place-items: center;display: grid;">
|
|
|
|
|
+ <image style="height: 3vh;width: 15vh;margin-top: 5vh;top: 3vh;"
|
|
|
|
|
+ src="../../../static/images/new/starts/login/backImg2.png"></image>
|
|
|
|
|
+ <text @click.stop="clickRight()"
|
|
|
|
|
+ style="color: #ffffff;font-size: 15px;margin: 0 0 0 31vh;font-weight: bold;">· · ·</text>
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <uni-drawer @change="changeDrawer" style="top:20vh;height: 23vh" ref="showRight" mode="right"
|
|
|
|
|
+ :mask-click="true">
|
|
|
|
|
+ <scroll-view style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;" scroll-y="true">
|
|
|
|
|
+ <view class="prop-item" @click="handleLogout()">
|
|
|
|
|
+ <!-- <view class="prop-item-image">
|
|
|
|
|
+ <image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="prop-item-right">{{i18('退出登录')}}</view>
|
|
|
|
|
+ <view class="prop-item-left">
|
|
|
|
|
+ <uni-icons type="forward" color="lightgray" size="16"></uni-icons>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-divider />
|
|
|
|
|
+ <view class="prop-item" @click="skip(3)">
|
|
|
|
|
+ <!-- <view class="prop-item-image">
|
|
|
|
|
+ <image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="prop-item-right">{{i18('关于我们')}}</view>
|
|
|
|
|
+ <view class="prop-item-left">
|
|
|
|
|
+ <uni-icons type="forward" color="lightgray" size="16"></uni-icons>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-divider />
|
|
|
|
|
+ <view class="prop-item" @click="skip(4)">
|
|
|
|
|
+ <!-- <view class="prop-item-image">
|
|
|
|
|
+ <image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="prop-item-right">{{i18('帮助')}}</view>
|
|
|
|
|
+ <view class="prop-item-left">
|
|
|
|
|
+ <uni-icons type="forward" color="lightgray" size="16"></uni-icons>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-divider />
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+ </uni-drawer>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style=";position: relative;top: 10vh;margin-top:2vh;">
|
|
|
|
|
+ <view class="progress_box">
|
|
|
|
|
+ <canvas class="progress_bg" canvas-id="cpbg"></canvas>
|
|
|
|
|
+ <canvas class="progress_bar" canvas-id="cpbar"></canvas>
|
|
|
|
|
+ <canvas class="progress_line" canvas-id="cpline"></canvas>
|
|
|
|
|
+ <view class="progress_txt">
|
|
|
|
|
+ <view class="progress_info">
|
|
|
|
|
+ <view class="p0" style="color: azure;" st="">{{ deviceInfo.deviceId}}</view>
|
|
|
|
|
+ <view class="p1">
|
|
|
|
|
+ <view v-if="portStatus == 2">
|
|
|
|
|
+ {{$t('charge.charging')}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-else-if="portStatus == 6">
|
|
|
|
|
+ {{$t('charge.planed')}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view v-else-if="portStatus == 5">
|
|
|
|
|
+ {{$t('charge.connected')}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view v-else>
|
|
|
|
|
+ {{$t('charge.nocharge')}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style="display: flex;align-items: center;flex-direction: column;color: aliceblue;margin-top: 5vh;">
|
|
|
|
|
+ <view class="port_item" :class="item.id==choosePort?'selected_item':''" v-for="item in curPort" @click="selectPort(item.id);">{{ i18(item.text )}}</view>
|
|
|
|
|
+ <view
|
|
|
|
|
+ style="background-color: black;justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 32vh;;border-radius: 27px;">
|
|
|
|
|
+ <view span="3" style="width: 8vh;">
|
|
|
|
|
+ <view class="item-value">{{ deviceV }}V</view>
|
|
|
|
|
+ <span class="item-text">{{$t('charge.voltage')}}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-line direction="col" color="#6F84AC" length="50"></u-line>
|
|
|
|
|
+ <view span="3" style="width: 8vh;">
|
|
|
|
|
+ <view class="item-value">{{ gonglv }}W</view>
|
|
|
|
|
+ <span class="item-text">{{$t('charge.power')}}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-line direction="col" color="#6F84AC" length="50"></u-line>
|
|
|
|
|
+ <view span="3" style="width: 8vh;">
|
|
|
|
|
+ <view class="item-value">{{deviceTemp}}℃</view>
|
|
|
|
|
+ <span class="item-text">{{$t('charge.devtemper')}}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-line direction="col" color="#6F84AC" length="50"></u-line>
|
|
|
|
|
+ <view span="3" style="width: 8vh;">
|
|
|
|
|
+ <view class="item-value" v-if="portDetail.voltage == 0">0 {{ i18('度') }}</view>
|
|
|
|
|
+ <view class="item-value" v-else>{{ dianliang }} {{ i18('度') }}</view>
|
|
|
|
|
+ <span class="item-text">{{$t('charge.elec')}}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view style="display: flex;align-items: center;flex-direction: column;color: aliceblue;margin-top: 3vh;">
|
|
|
|
|
+ <view
|
|
|
|
|
+ style="justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 40vh;}">
|
|
|
|
|
+ <view span="3" style="width: 12vh;">
|
|
|
|
|
+ <view style="margin-left: 1vh;">
|
|
|
|
|
+ <view><span v-if="portDetail.portStatus == 6">{{i18('剩余时间')}}</span>
|
|
|
|
|
+ <span v-else>{{$t('charge.chargetime')}}</span></view>
|
|
|
|
|
+ <view class="demo-layout bg-purple"
|
|
|
|
|
+ style="border-radius: 8px;background-color: aliceblue;color: #000;">
|
|
|
|
|
+ <view >{{ chargeTime }}{{ i18('分钟') }}</view>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view span="3" style="width: 16vh;">
|
|
|
|
|
+ <view v-if="portDetail.portStatus == 2"
|
|
|
|
|
+ style="text-align: center;position: absolute;margin:-1vh 5vw;border: 0ch;height: 20vh;">
|
|
|
|
|
+ <u-button @click="trigger()" shape="circle"
|
|
|
|
|
+ style="background: #ec3e41;color:white;width: 100vm;border: 0ch;height: 6vh;">{{ i18('停止充电') }}</u-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-if="portDetail.portStatus != 2"
|
|
|
|
|
+ style="text-align: center;position: absolute;margin:-1vh 5vw;border: 0ch;height: 20vh;">
|
|
|
|
|
+ <u-button @click="trigger()" shape="circle"
|
|
|
|
|
+ style="background: #57B03D;color:white;width: 100vm;border: 0ch;height: 6vh;">{{ i18('立即充电') }}</u-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus == 2">
|
|
|
|
|
+ <image class="btn-image" src="/static/images/new/start/stop.png" >
|
|
|
|
|
+ </image>
|
|
|
|
|
+ <view>{{ i18('停止充电') }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus != 2">
|
|
|
|
|
+ <image class="btn-image" src="/static/images/new/start/using.png" >
|
|
|
|
|
+ </image>
|
|
|
|
|
+ <view>{{ i18('立即充电') }}</view>
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view span="3" style="width: 12vh;">
|
|
|
|
|
+ <view style="margin-left: 1vh;">
|
|
|
|
|
+ <view> Ampere</view>
|
|
|
|
|
+ <view class="demo-layout bg-purple"
|
|
|
|
|
+ style="border-radius: 8px;background-color: aliceblue;color: #000;">
|
|
|
|
|
+ <view v-if="deviceV == 0">0A</view>
|
|
|
|
|
+ <view v-else>{{currentValue}}A</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view style="display: flex;align-items: center;justify-content: center;margin-top: 5vh;">
|
|
|
|
|
+ <view @click="toPage">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/status/Setting.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- <view class="" @click="wifi">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/status/WiFi.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view @click="modifyPwd">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/status/Lock/Unlocked.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="" @click="getInfo">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/status/Refresh.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;;"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="" @click="goBack">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/status/Link.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view style="display: flex;align-items: center;justify-content: center;">
|
|
|
|
|
+ <view @click="skip(0)">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/tabbar/one_off.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view @click="skip(1)">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/tabbar/two_off.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view @click="skip(2)">
|
|
|
|
|
+ <image src="../../../static/images/new/starts/tabbar/three_off.png"
|
|
|
|
|
+ style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
<u-modal :show="showInitPwd" :confirmText="i18('确认')" :cancelText="i18('取消')" @confirm="inputPwd" @cancel="cancelInitDlg" :showCancelButton="true" :title="i18('当前密码为初始密码,请修改')" >
|
|
<u-modal :show="showInitPwd" :confirmText="i18('确认')" :cancelText="i18('取消')" @confirm="inputPwd" @cancel="cancelInitDlg" :showCancelButton="true" :title="i18('当前密码为初始密码,请修改')" >
|
|
|
<view class="slot-content">
|
|
<view class="slot-content">
|
|
|
<view style="margin-bottom:10px;">
|
|
<view style="margin-bottom:10px;">
|
|
@@ -177,6 +362,28 @@
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</u-modal>
|
|
</u-modal>
|
|
|
|
|
+ <u-modal :show="showPwd" :confirmText="i18('确认')" :cancelText="i18('取消')" @confirm="inputPwd" @cancel="cancel" :showCancelButton="true" :title="$t('charge.modifypwd')" >
|
|
|
|
|
+ <view class="slot-content">
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <u--input
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ :placeholder="$t('charge.oldpwd')"
|
|
|
|
|
+ border="surround"
|
|
|
|
|
+ v-model="oldPwd"
|
|
|
|
|
+ ></u--input>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view style="margin-top:5px">
|
|
|
|
|
+ <u--input
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ :placeholder="$t('charge.newpwd')"
|
|
|
|
|
+ border="surround"
|
|
|
|
|
+ v-model="pwd"
|
|
|
|
|
+ ></u--input>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-modal>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -236,6 +443,7 @@ export default {
|
|
|
curPort:[],
|
|
curPort:[],
|
|
|
firstRender:false,
|
|
firstRender:false,
|
|
|
refreshTimer:null,
|
|
refreshTimer:null,
|
|
|
|
|
+ clickRightTag:0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -265,7 +473,165 @@ export default {
|
|
|
clearTimeout(this.refreshTimer)
|
|
clearTimeout(this.refreshTimer)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted: function() {
|
|
|
|
|
+ this.drawCircle(100);
|
|
|
|
|
+ this.drawProgressbg();
|
|
|
|
|
+ //参数为1-100
|
|
|
|
|
+ this.drawLine();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ drawProgressbg: function() {
|
|
|
|
|
+ // 自定义组件实例 this ,表示在这个自定义组件下查找拥有 canvas-id 的 <canvas/>
|
|
|
|
|
+ var ctx = uni.createCanvasContext('cpbg', this);
|
|
|
|
|
+ ctx.setLineWidth(19); // 设置圆环的宽度
|
|
|
|
|
+ ctx.setStrokeStyle('#E9E9E9'); // 设置圆环的颜色
|
|
|
|
|
+ // ctx.setLineCap('round'); // 设置圆环端点的形状
|
|
|
|
|
+ ctx.setLineCap('square'); // 设置圆环端点的形状
|
|
|
|
|
+ ctx.beginPath(); //开始一个新的路径
|
|
|
|
|
+ ctx.arc(90, 90, 80, 0 * Math.PI, 2 * Math.PI, false);
|
|
|
|
|
+ //设置一个原点(110,110),半径为100的圆的路径到当前路径
|
|
|
|
|
+ ctx.stroke(); //对当前路径进行描边
|
|
|
|
|
+ ctx.draw();
|
|
|
|
|
+ },
|
|
|
|
|
+ drawCircle: function(step) {
|
|
|
|
|
+
|
|
|
|
|
+ var ctx = uni.createCanvasContext('cpbar', this);
|
|
|
|
|
+ // 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
|
|
|
|
|
+ var gradient = ctx.createLinearGradient(0, 0, 130, 0);
|
|
|
|
|
+
|
|
|
|
|
+ let increase = 0.05;
|
|
|
|
|
+ let end = (step / 100) * 2 * Math.PI - Math.PI / 2; // 最后的角度
|
|
|
|
|
+ let current = -Math.PI / 2; // 起始角度
|
|
|
|
|
+ if(this.portDetail.portStatus != 2){
|
|
|
|
|
+ let timer = setInterval(() => {
|
|
|
|
|
+ gradient.addColorStop('0', '#57B03D');
|
|
|
|
|
+ gradient.addColorStop('1.0', '#57B03D');
|
|
|
|
|
+ ctx.setLineWidth(12);
|
|
|
|
|
+ ctx.setStrokeStyle(gradient);
|
|
|
|
|
+ ctx.setLineCap('square');
|
|
|
|
|
+ ctx.beginPath();
|
|
|
|
|
+ // 参数step 为绘制的百分比
|
|
|
|
|
+ if (current < end) {
|
|
|
|
|
+ current = current + increase;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ if (current >= end) {
|
|
|
|
|
+ current = end;
|
|
|
|
|
+ if(this.portDetail.portStatus != 2){
|
|
|
|
|
+ clearInterval(timer);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ current = -Math.PI / 2; // 起始角度
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ ctx.arc(90, 90, 80, -Math.PI / 2, current, false);
|
|
|
|
|
+ ctx.stroke();
|
|
|
|
|
+ ctx.draw();
|
|
|
|
|
+
|
|
|
|
|
+ }, 20);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 画刻度
|
|
|
|
|
+ drawLine() {
|
|
|
|
|
+ var context = uni.createCanvasContext("cpline", this);
|
|
|
|
|
+ var r = 80;
|
|
|
|
|
+ var x0 = 90;
|
|
|
|
|
+ var y0 = 90;
|
|
|
|
|
+ var x;
|
|
|
|
|
+ var y;
|
|
|
|
|
+ var lineWidth = 15;
|
|
|
|
|
+
|
|
|
|
|
+ for (let i = 0; i < 60; i++) {
|
|
|
|
|
+ context.beginPath();
|
|
|
|
|
+ context.setLineWidth(lineWidth);
|
|
|
|
|
+ context.setStrokeStyle("#FFFFFF");
|
|
|
|
|
+
|
|
|
|
|
+ x = x0 - r * Math.sin(((6 * (i + 1) - 3) * Math.PI) / 180);
|
|
|
|
|
+ y = y0 - r * Math.cos(((6 * (i + 1) - 3) * Math.PI) / 180);
|
|
|
|
|
+
|
|
|
|
|
+ // console.log('x0:' + x0 + ' y0:' + y0 + ' x:' + x + ' y:' + y);
|
|
|
|
|
+ context.moveTo(x, y);
|
|
|
|
|
+ context.arc(
|
|
|
|
|
+ x0,
|
|
|
|
|
+ y0,
|
|
|
|
|
+ r,
|
|
|
|
|
+ ((270 - 6 * (i + 1) + 3) * Math.PI) / 180,
|
|
|
|
|
+ ((270 - 6 * i) * Math.PI) / 180,
|
|
|
|
|
+ false
|
|
|
|
|
+ );
|
|
|
|
|
+ context.stroke();
|
|
|
|
|
+ context.closePath();
|
|
|
|
|
+ }
|
|
|
|
|
+ context.stroke();
|
|
|
|
|
+ context.draw();
|
|
|
|
|
+ },
|
|
|
|
|
+ getInfo() {
|
|
|
|
|
+ let self = this;
|
|
|
|
|
+ this.$modal.loading("正在获取状态,请稍等...");
|
|
|
|
|
+ sendPortDetailCmd(this.deviceInfo).then(res => {
|
|
|
|
|
+ this.$modal.loading("正在获取状态,请稍等...");
|
|
|
|
|
+ this.visitTime = res.msg;
|
|
|
|
|
+ if (!this.visitTime) {
|
|
|
|
|
+ this.$modal.msg("请重新进入页面");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.scriptTask) {
|
|
|
|
|
+ this.initSocket(this.deviceInfo.deviceId);
|
|
|
|
|
+ }
|
|
|
|
|
+ setTimeout(function() {
|
|
|
|
|
+ getPortDetail(self.deviceInfo, self.visitTime).then(res => {
|
|
|
|
|
+ let data = res.data;
|
|
|
|
|
+ if (data != null) {
|
|
|
|
|
+ self.parsePortCmd(data);
|
|
|
|
|
+ } else {}
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 500)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ skip(type){
|
|
|
|
|
+ if(type==0){
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url:'/pages/index'
|
|
|
|
|
+ })
|
|
|
|
|
+ }else if(type==1){
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url:'/pages/weitiandi/deviceList'
|
|
|
|
|
+ })
|
|
|
|
|
+ }else if(type==2){
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url:'/pages/mine/index'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ handleLogout() {
|
|
|
|
|
+ this.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
|
|
|
|
+ this.$store.dispatch('LogOut').then(() => {
|
|
|
|
|
+ this.$tab.reLaunch('/pages/index')
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ changeDrawer(event) {
|
|
|
|
|
+ if (event) {
|
|
|
|
|
+ // 抽屉打开时的逻辑
|
|
|
|
|
+
|
|
|
|
|
+ this.clickRightTag = 1
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 抽屉关闭时的逻辑
|
|
|
|
|
+ this.clickRightTag = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ //自定义头右操作函数
|
|
|
|
|
+ clickRight() {
|
|
|
|
|
+ //打开抽屉
|
|
|
|
|
+ if (this.clickRightTag == 0) {
|
|
|
|
|
+ this.$refs.showRight.open();
|
|
|
|
|
+ this.clickRightTag = 1
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$refs.showRight.close()
|
|
|
|
|
+ this.clickRightTag = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
cancelInitDlg(){
|
|
cancelInitDlg(){
|
|
|
this.showInitPwd = false;
|
|
this.showInitPwd = false;
|
|
|
},
|
|
},
|
|
@@ -561,6 +927,9 @@ export default {
|
|
|
self.deviceTemp = self.portDetail.dev_temper;
|
|
self.deviceTemp = self.portDetail.dev_temper;
|
|
|
self.deviceV = self.portDetail.voltage;
|
|
self.deviceV = self.portDetail.voltage;
|
|
|
self.$modal.closeLoading();
|
|
self.$modal.closeLoading();
|
|
|
|
|
+ if(self.portDetail.portStatus==2){
|
|
|
|
|
+ this.drawCircle(100);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if(type == 116){
|
|
if(type == 116){
|
|
|
self.$modal.closeLoading();
|
|
self.$modal.closeLoading();
|
|
@@ -615,35 +984,35 @@ export default {
|
|
|
this.getInfo(true);
|
|
this.getInfo(true);
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getPlanInfo(){
|
|
|
|
|
- getPlanInfo(this.deviceInfo.deviceId,this.choosePort).then(res=>{
|
|
|
|
|
- let data = res.data;
|
|
|
|
|
- if(data != null){
|
|
|
|
|
- let planType = data.planType;
|
|
|
|
|
- if(planType == 1){//单次预约
|
|
|
|
|
- let planInfo = {};
|
|
|
|
|
- planInfo.runTime = data.runTime;
|
|
|
|
|
- this.planInfo = planInfo;
|
|
|
|
|
- this.planInfo.id = data.id;
|
|
|
|
|
- }else{
|
|
|
|
|
- let planInfo = {};
|
|
|
|
|
- planInfo.runTime = data.runTime;
|
|
|
|
|
- let repeatDays = data.repeatDays;
|
|
|
|
|
- let days = repeatDays.split(",")
|
|
|
|
|
- let strs = "";
|
|
|
|
|
- for (let i = 0; i < days.length; i++) {
|
|
|
|
|
- if(strs.length>0){
|
|
|
|
|
- strs+=",";
|
|
|
|
|
- }
|
|
|
|
|
- strs +=this.days[days[i]];
|
|
|
|
|
- }
|
|
|
|
|
- this.planInfo = planInfo;
|
|
|
|
|
- this.planInfo.runTime = strs+" "+data.repeatTime;
|
|
|
|
|
- this.planInfo.id = data.id;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // getPlanInfo(){
|
|
|
|
|
+ // getPlanInfo(this.deviceInfo.deviceId,this.choosePort).then(res=>{
|
|
|
|
|
+ // let data = res.data;
|
|
|
|
|
+ // if(data != null){
|
|
|
|
|
+ // let planType = data.planType;
|
|
|
|
|
+ // if(planType == 1){//单次预约
|
|
|
|
|
+ // let planInfo = {};
|
|
|
|
|
+ // planInfo.runTime = data.runTime;
|
|
|
|
|
+ // this.planInfo = planInfo;
|
|
|
|
|
+ // this.planInfo.id = data.id;
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // let planInfo = {};
|
|
|
|
|
+ // planInfo.runTime = data.runTime;
|
|
|
|
|
+ // let repeatDays = data.repeatDays;
|
|
|
|
|
+ // let days = repeatDays.split(",")
|
|
|
|
|
+ // let strs = "";
|
|
|
|
|
+ // for (let i = 0; i < days.length; i++) {
|
|
|
|
|
+ // if(strs.length>0){
|
|
|
|
|
+ // strs+=",";
|
|
|
|
|
+ // }
|
|
|
|
|
+ // strs +=this.days[days[i]];
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.planInfo = planInfo;
|
|
|
|
|
+ // this.planInfo.runTime = strs+" "+data.repeatTime;
|
|
|
|
|
+ // this.planInfo.id = data.id;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // },
|
|
|
confirmPort(e){
|
|
confirmPort(e){
|
|
|
let value = e.value[0]
|
|
let value = e.value[0]
|
|
|
this.choosePort = value.port;
|
|
this.choosePort = value.port;
|
|
@@ -688,6 +1057,7 @@ export default {
|
|
|
if(portStatus == 2){//需要停止充电
|
|
if(portStatus == 2){//需要停止充电
|
|
|
this.$modal.confirm("需要停止充电么?").then(res=>{
|
|
this.$modal.confirm("需要停止充电么?").then(res=>{
|
|
|
this.stopCharge();
|
|
this.stopCharge();
|
|
|
|
|
+ this.drawCircle(0); //参数为1-100
|
|
|
})
|
|
})
|
|
|
}else{
|
|
}else{
|
|
|
if(portStatus == 1){
|
|
if(portStatus == 1){
|
|
@@ -696,6 +1066,7 @@ export default {
|
|
|
if(portStatus == 5){
|
|
if(portStatus == 5){
|
|
|
this.$modal.confirm("确认开始充电么?").then(res=>{
|
|
this.$modal.confirm("确认开始充电么?").then(res=>{
|
|
|
this.startCharge();
|
|
this.startCharge();
|
|
|
|
|
+ this.drawCircle(100); //参数为1-100
|
|
|
})
|
|
})
|
|
|
}else {
|
|
}else {
|
|
|
this.$modal.msg("端口无法开始充电");
|
|
this.$modal.msg("端口无法开始充电");
|
|
@@ -816,7 +1187,10 @@ export default {
|
|
|
|
|
|
|
|
<style>
|
|
<style>
|
|
|
.container {
|
|
.container {
|
|
|
- background: rgb(249, 252, 255);
|
|
|
|
|
|
|
+ /* background: rgb(249, 252, 255); */
|
|
|
|
|
+ background-image: url('../../../static/images/new/starts/bg1.jpg');
|
|
|
|
|
+ background-size: cover;
|
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
inset: 0;
|
|
inset: 0;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
}
|
|
}
|
|
@@ -825,6 +1199,89 @@ export default {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
margin-top:4vw;
|
|
margin-top:4vw;
|
|
|
}
|
|
}
|
|
|
|
|
+.prop-item {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ line-height: 40px;
|
|
|
|
|
+ margin: 0 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prop-item-left {
|
|
|
|
|
+ color: #BCBCBF;
|
|
|
|
|
+ ;
|
|
|
|
|
+ width: 30%;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ //margin-left: 36px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prop-item-image {
|
|
|
|
|
+ width: 15px;
|
|
|
|
|
+ height: 15px;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 2vw;
|
|
|
|
|
+ top: 0.5vh;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prop-item-right {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 10rpx;
|
|
|
|
|
+ top: 5rpx;
|
|
|
|
|
+ color: #BCBCBF;
|
|
|
|
|
+ }
|
|
|
|
|
+ .progress_box {
|
|
|
|
|
+ /* position: relative; */
|
|
|
|
|
+ width: 35vh;
|
|
|
|
|
+ height: 35vh;
|
|
|
|
|
+ margin-left: 13vh;
|
|
|
|
|
+ margin-top: 10vh;
|
|
|
|
|
+ /* background-color: red; */
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .pcds {
|
|
|
|
|
+ margin-top: 90rpx;
|
|
|
|
|
+ color: black;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+.progress_bg {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ width: 30vh;
|
|
|
|
|
+ height: 30vh;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+.progress_txt {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ margin-top: 54px;
|
|
|
|
|
+ margin-left: 74px;
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .progress_bar {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ width: 30vh;
|
|
|
|
|
+ height: 30vh;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ .progress_line {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ width: 30vh;
|
|
|
|
|
+ height: 30vh;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+.progress_info {
|
|
|
|
|
+ font-size: 25upx;
|
|
|
|
|
+ /* padding-left: 16upx; */
|
|
|
|
|
+ letter-spacing: 2upx;
|
|
|
|
|
+ margin: 1vh 0vh 0vh -3vh;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.header-status-desc {
|
|
.header-status-desc {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -1256,11 +1713,11 @@ export default {
|
|
|
|
|
|
|
|
.item-value{
|
|
.item-value{
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
- font-size: 19px;
|
|
|
|
|
|
|
+ font-size: 15px;
|
|
|
margin:4px 0;
|
|
margin:4px 0;
|
|
|
}
|
|
}
|
|
|
.item-text{
|
|
.item-text{
|
|
|
- font-size: 13px;
|
|
|
|
|
|
|
+ font-size: 11px;
|
|
|
margin:1px 0;
|
|
margin:1px 0;
|
|
|
color: #999999;
|
|
color: #999999;
|
|
|
}
|
|
}
|
|
@@ -1309,12 +1766,19 @@ export default {
|
|
|
color: #B8B9BA;
|
|
color: #B8B9BA;
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
|
}
|
|
}
|
|
|
-.p1{
|
|
|
|
|
|
|
+/* .p1{
|
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
|
color: white;
|
|
color: white;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
margin-top:10px;
|
|
margin-top:10px;
|
|
|
-}
|
|
|
|
|
|
|
+} */
|
|
|
|
|
+.p1 {
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ /* margin-left: -1vh;; */
|
|
|
|
|
+ }
|
|
|
.stip{
|
|
.stip{
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
z-index: 9999;
|
|
z-index: 9999;
|