first commit
This commit is contained in:
393
pages/chooseLine/chooseLine.css
Normal file
393
pages/chooseLine/chooseLine.css
Normal file
@@ -0,0 +1,393 @@
|
||||
page{
|
||||
background: rgba(249,249,249,1);;
|
||||
}
|
||||
/* 主体开始 */
|
||||
/* 分割线 */
|
||||
.line{
|
||||
background: #F0F0F0;
|
||||
height: 20rpx;
|
||||
}
|
||||
.line-fine{
|
||||
background: #F0F0F0;
|
||||
height: 2rpx;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.time-block-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 44rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.calendar-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.time-text{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.time-block-right{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.confirm-button{
|
||||
height: 92rpx;
|
||||
width: 100%;
|
||||
}
|
||||
/* 时间结束 */
|
||||
.chooseLine-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
/* 搜索开始 */
|
||||
.search-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 126rpx;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.search-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 60rpx;
|
||||
width: 580rpx;
|
||||
background:rgba(249,249,249,1);
|
||||
border-radius:2px;
|
||||
}
|
||||
.search-pic{
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.search-input{
|
||||
margin-left: 14rpx;
|
||||
color: #4A4A4A;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.search-input-placeholder{
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.search-text{
|
||||
color: #3982FC;
|
||||
font-size: 28rpx;
|
||||
margin-left: 34rpx;
|
||||
}
|
||||
/* 搜索结束 */
|
||||
/* 排序开始 */
|
||||
.order-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 102rpx;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.order-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.order-left-text{
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.order-left-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
.order-center{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.order-center-text{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.order-center-text-choose{
|
||||
font-size: 30rpx;
|
||||
color: #3982FC;
|
||||
}
|
||||
.order-center-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
.order-right{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.order-right-text{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.order-right-text-choose{
|
||||
font-size: 30rpx;
|
||||
color: #3982FC;
|
||||
}
|
||||
.order-right-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
/* 排序结束 */
|
||||
/* 选择开始 */
|
||||
.picker-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.select-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 60rpx;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
.select-province{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
width: 90rpx;
|
||||
}
|
||||
.select-province-text{
|
||||
width: 90rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: right;
|
||||
}
|
||||
.select-company{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
width: 230rpx;
|
||||
}
|
||||
.select-company-text{
|
||||
width: 230rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: right;
|
||||
}
|
||||
.select-substation{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
width: 230rpx;
|
||||
}
|
||||
.select-substation-text{
|
||||
width: 230rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: right;
|
||||
}
|
||||
.show-line-block{
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.left-block{
|
||||
width:110rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.province{
|
||||
height: 96rpx;
|
||||
width:110rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.province-text{
|
||||
width:110rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
}
|
||||
.province-selected{
|
||||
height: 96rpx;
|
||||
width:110rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: rgba(57,130,252,1);
|
||||
font-size: 28rpx;
|
||||
background:rgba(249,249,249,1);
|
||||
border-left: 4px solid rgba(57,130,252,1);
|
||||
}
|
||||
.company-block{
|
||||
width: 234rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
.company{
|
||||
height: 96rpx;
|
||||
width:234rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.company-text{
|
||||
width:234rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.company-selected{
|
||||
height: 96rpx;
|
||||
width:234rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: rgba(57,130,252,1);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.substation-block{
|
||||
width: 234rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
.substation{
|
||||
height: 96rpx;
|
||||
width:234rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.substation-text{
|
||||
width:234rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.substation-selected{
|
||||
height: 96rpx;
|
||||
width:234rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: rgba(57,130,252,1);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.line-block{
|
||||
width: 154rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
.line{
|
||||
height: 96rpx;
|
||||
width:154rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.line-text{
|
||||
width:154rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.line-selected{
|
||||
height: 96rpx;
|
||||
/* width:154rpx; */
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: rgba(57,130,252,1);
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* 选择结束 */
|
||||
/* 模糊查询结果开始 */
|
||||
.search-result-block{
|
||||
background: #FFFFFF;
|
||||
padding: 20rpx 40rpx 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.each-block{
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
/* 模糊查询结果结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
452
pages/chooseLine/chooseLine.vue
Normal file
452
pages/chooseLine/chooseLine.vue
Normal file
@@ -0,0 +1,452 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :errorMsg="errorMsg" :showFlag="showFlag" :pageName="pageName" :pageNameFlag='pageNameFlag'></back>
|
||||
<view class="chooseLine-block" v-if="errorFlag==0">
|
||||
<!-- <view>
|
||||
<uni-calendar ref="calendar" :insert="false" @confirm="confirm" :range='true'></uni-calendar>
|
||||
</view>
|
||||
<view class="time-block" @click="chooseDate">
|
||||
<view class="time-block-left">
|
||||
<image class="calendar-pic" src="/static/pic/calendar.png"></image>
|
||||
<view class="time-text">
|
||||
{{startDate}}至{{endDate}}
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/pic/jump.png" class="time-block-right"></image>
|
||||
</view>
|
||||
<view class=".line-fine">
|
||||
|
||||
</view>
|
||||
<view class="time-block">
|
||||
<view class="time-block-left">
|
||||
<image class="calendar-pic" src="/static/pic/calendar.png"></image>
|
||||
<view class="time-text">
|
||||
监测点
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class=".line-fine">
|
||||
|
||||
</view>
|
||||
<button class="confirm-button" type="primary">确认查询</button>
|
||||
<view class=".line-fine">
|
||||
|
||||
</view> -->
|
||||
<view class="search-block">
|
||||
<view class="search-left">
|
||||
<image src="/static/pic/search.png" class="search-pic"></image>
|
||||
<input class="search-input" placeholder="请输入" confirm-type="done" type="text" placeholder-class="search-input-placeholder" @input="inputLine" :value="lineName"/>
|
||||
</view>
|
||||
<view class="search-text" @click="queryByName">
|
||||
搜索
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-block">
|
||||
<view class="order-left" @click="showProvince">
|
||||
<view class="order-left-text">
|
||||
监测点选择
|
||||
</view>
|
||||
<image src="/static/pic/pull.png" class="order-left-pic"></image>
|
||||
</view>
|
||||
<block v-if="showProvinceFlag==1">
|
||||
<view class="order-center" @click="changeLineFlag(0)" v-if="lineFlag==1">
|
||||
<view class="order-center-text-choose">
|
||||
通讯
|
||||
</view>
|
||||
<image src="/static/pic/desc.png" class="order-center-pic"></image>
|
||||
</view>
|
||||
<view class="order-center" @click="changeLineFlag(1)" v-else>
|
||||
<view class="order-center-text">
|
||||
通讯
|
||||
</view>
|
||||
<image src="/static/pic/desc.png" class="order-center-pic"></image>
|
||||
</view>
|
||||
<view class="order-right" @click="changeLineFlag(0)" v-if="lineFlag==2">
|
||||
<view class="order-right-text-choose">
|
||||
流量
|
||||
</view>
|
||||
<image src="/static/pic/desc.png" class="order-right-pic"></image>
|
||||
</view>
|
||||
<view class="order-right" @click="changeLineFlag(2)" v-else>
|
||||
<view class="order-right-text">
|
||||
流量
|
||||
</view>
|
||||
<image src="/static/pic/desc.png" class="order-right-pic"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view :style="{height:pickerHeight}" class="picker-block" v-if="showProvinceFlag==1">
|
||||
<view class="select-block">
|
||||
<picker mode="selector" class="select-province" :range="provinceList" range-key="provinceName" @change="changeProvinceSelectedIndex($event,provinceList[provinceListIndex].provinceIndex)" v-if="provinceList.length>0">
|
||||
<view class="select-province-text">{{provinceList[provinceListIndex].provinceName}}</view>
|
||||
</picker>
|
||||
<image src="/static/pic/pull.png" class="order-left-pic" v-if="provinceList.length>0"></image>
|
||||
<picker mode="selector" class="select-company" :range="companyList" range-key="gdName" @change="changeCompanySelectedIndex($event,companyList[companyListIndex].gdIndex)" v-if="companyList.length>0">
|
||||
<view class="select-company-text">{{companyList[companyListIndex].gdName}}</view>
|
||||
</picker>
|
||||
<image src="/static/pic/pull.png" class="order-left-pic" v-if="companyList.length>0"></image>
|
||||
<picker mode="selector" class="select-substation" :range="substationList" range-key="subName" @change="changeSubstationSelectedIndex($event,substationList[substationListIndex].subIndex)" v-if="substationList.length>0">
|
||||
<view class="select-substation-text">{{substationList[substationListIndex].subName}}</view>
|
||||
</picker>
|
||||
<image src="/static/pic/pull.png" class="order-left-pic" v-if="substationList.length>0"></image>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="search-result-block" :style="{height:pickerHeight}" show-scrollbar="false" v-if="lineList.length>0">
|
||||
<view v-for="line in lineList" @click="selectLine(line.lineIndex,line)">
|
||||
<view class="each-block">
|
||||
{{line.lineName}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 左边导航 -->
|
||||
<!-- <scroll-view scroll-y="true" class="left-block" :style="{height:pickerHeight}" show-scrollbar="false">
|
||||
<view :class="provinceSelectedIndex==province.provinceIndex?'province-selected':'province'" v-for="province in provinceList" @click="selectProvince(province.provinceIndex)">
|
||||
<view class="province-text">
|
||||
{{province.provinceName}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
<!-- 二级联动供电公司 -->
|
||||
<!-- <scroll-view scroll-y="true" class="company-block" :style="{height:pickerHeight}" show-scrollbar="false" v-if="companyList">
|
||||
<view :class="companySelectedIndex==company.gdIndex?'company-selected':'company'" v-for="company in companyList" @click="selectCompany(company.gdIndex)">
|
||||
<view class="company-text">
|
||||
{{company.gdName}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
<!-- 三级联动变电站 -->
|
||||
<!-- <scroll-view scroll-y="true" class="substation-block" :style="{height:pickerHeight}" show-scrollbar="false" v-if="substationList">
|
||||
<view :class="substationSelectedIndex==substation.subIndex?'substation-selected':'substation'" v-for="substation in substationList" @click="selectSubstation(substation.subIndex)">
|
||||
<view class="substation-text">
|
||||
{{substation.subName}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
<!-- 四级联动监测点-->
|
||||
<!-- <scroll-view scroll-y="true" class="line-block" :style="{height:pickerHeight}" show-scrollbar="false" v-if="lineList">
|
||||
<view :class="lineSelectedIndex==line.lineIndex?'line-selected':'line'" v-for="line in lineList" @click="selectLine(line.lineIndex,line)">
|
||||
<view class="line-text">
|
||||
{{line.lineName}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
</view>
|
||||
<!-- 模糊搜索结果 -->
|
||||
<scroll-view class="search-result-block" :style="{height:pickerHeight}" scroll-y="true" v-else>
|
||||
<view class="" v-if="queryByNameList.length!=0">
|
||||
<view class="each-block" v-for="result in queryByNameList" @click="selectLine(1,result)">
|
||||
{{result.lineName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="each-block" v-else>
|
||||
{{searchResult}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniCalendar from "../../components/uni-calendar/uni-calendar";
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
errorFlag:0,
|
||||
showFlag:0,
|
||||
errorMsg:'',
|
||||
provinceList:[{"provinceName":"省份","provinceIndex":0}],
|
||||
provinceListIndex:0,
|
||||
provinceSelectedIndex:0,
|
||||
companyList:[{"gdName":"供电公司","gdIndex":0}],
|
||||
companyListIndex:0,
|
||||
companySelectedIndex:0,
|
||||
substationList:[{"subName":"变电站","subIndex":0}],
|
||||
substationListIndex:0,
|
||||
substationSelectedIndex:0,
|
||||
lineList:[],
|
||||
lineSelectedIndex:0,
|
||||
lineName:'',
|
||||
showProvinceFlag:1,
|
||||
lineFlag:0,
|
||||
pickerHeight:'',
|
||||
queryByNameList:[],
|
||||
searchResult:'',
|
||||
startDate:'',
|
||||
startDateMills:'',
|
||||
endDate:'',
|
||||
endDateMills:'',
|
||||
pageName:'监测点选择',
|
||||
pageNameFlag:1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrollH(){
|
||||
var that =this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750/winWidth;
|
||||
var winHeight= sys.windowHeight;
|
||||
that.pickerHeight = parseInt((winHeight-50)*winrate-466)+'rpx';
|
||||
},
|
||||
queryByName(){
|
||||
var that = this;
|
||||
that.showProvinceFlag=0;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/device/queryByName',
|
||||
method: 'POST',
|
||||
data: {
|
||||
lineName:that.lineName,
|
||||
userId:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.queryByNameList = eval(res.data.data);
|
||||
if(that.queryByNameList.length!=0){
|
||||
that.searchResult=''
|
||||
}else{
|
||||
that.searchResult='暂未搜索到监测点'
|
||||
}
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
inputLine(e){
|
||||
this.lineName=e.detail.value;
|
||||
this.showProvinceFlag=0;
|
||||
this.searchResult='';
|
||||
},
|
||||
showProvince(){
|
||||
this.showProvinceFlag=1;
|
||||
},
|
||||
getProvince(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/device/getProvince',
|
||||
method: 'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.provinceList = that.provinceList.concat(eval(res.data.data));
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
getCompany(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/device/getGDInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
provinceIndex:that.provinceSelectedIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.companyList =that.companyList.concat(eval(res.data.data));
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
getSubstation(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/device/getSubInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
gdIndex:that.companySelectedIndex,
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.substationList =that.substationList.concat(eval(res.data.data));
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
getLine(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/device/getLineInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
subIndex:that.substationSelectedIndex,
|
||||
type:that.lineFlag
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.lineList = eval(res.data.data);
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
selectProvince(index){
|
||||
this.provinceSelectedIndex=index;
|
||||
this.getCompany();
|
||||
},
|
||||
selectCompany(index){
|
||||
this.companySelectedIndex=index;
|
||||
this.getSubstation();
|
||||
},
|
||||
selectSubstation(index){
|
||||
this.substationSelectedIndex=index;
|
||||
this.getLine();
|
||||
},
|
||||
selectLine(index,line){
|
||||
var that=this;
|
||||
that.lineSelectedIndex=index;
|
||||
uni.$emit('lineInfoSelect',line);
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
})
|
||||
},
|
||||
changeLineFlag(flag){
|
||||
var that=this;
|
||||
that.lineFlag=flag;
|
||||
if(that.lineList){
|
||||
that.getLine();
|
||||
}
|
||||
},
|
||||
changeProvinceSelectedIndex(e,provinceIndex){
|
||||
var that =this;
|
||||
that.companyList=[{"gdName":"供电公司","gdIndex":0}]
|
||||
that.substationList=[{"subName":"变电站","subIndex":0}]
|
||||
that.provinceListIndex = e.target.value;
|
||||
that.companyListIndex=0
|
||||
that.substationListIndex=0
|
||||
that.lineList=[]
|
||||
if(e.target.value==0){
|
||||
return
|
||||
}else{
|
||||
that.provinceSelectedIndex=that.provinceList[that.provinceListIndex].provinceIndex;
|
||||
that.getCompany();
|
||||
}
|
||||
},
|
||||
changeCompanySelectedIndex(e,gdIndex){
|
||||
var that =this;
|
||||
that.substationList=[{"subName":"变电站","subIndex":0}]
|
||||
that.companyListIndex = e.target.value;
|
||||
that.substationListIndex=0
|
||||
that.lineList=[]
|
||||
if(e.target.value==0){
|
||||
return
|
||||
}else{
|
||||
that.companySelectedIndex=that.companyList[that.companyListIndex].gdIndex;
|
||||
that.getSubstation();
|
||||
}
|
||||
},
|
||||
changeSubstationSelectedIndex(e,subIndex){
|
||||
var that =this;
|
||||
if(e.target.value==0){
|
||||
that.lineList=[]
|
||||
return
|
||||
}else{
|
||||
that.substationListIndex = e.target.value;
|
||||
that.substationSelectedIndex=that.substationList[that.substationListIndex].subIndex;
|
||||
that.getLine();
|
||||
}
|
||||
},
|
||||
chooseDate(){
|
||||
this.$refs.calendar.open();
|
||||
},
|
||||
confirm(e){
|
||||
var that = this;
|
||||
var before = e.range.before;
|
||||
var after = e.range.after;
|
||||
var b = parseInt(before.replace('-','').replace('-',''));
|
||||
var a = parseInt(after.replace('-','').replace('-',''));
|
||||
if(a>b){
|
||||
that.startDate = before;
|
||||
that.endDate = after;
|
||||
that.startDateMills = before+' 00:00:00.000';
|
||||
that.endDateMills = after +' 23:59:59.999';
|
||||
}else{
|
||||
that.startDate = after;
|
||||
that.endDate = before;
|
||||
that.startDateMills = after+' 00:00:00.000';
|
||||
that.endDateMills = before +' 23:59:59.999';
|
||||
}
|
||||
},
|
||||
retry(){
|
||||
this.scrollH();
|
||||
this.getProvince();
|
||||
}
|
||||
|
||||
},
|
||||
components:{
|
||||
back,
|
||||
uniCalendar
|
||||
},
|
||||
onLoad() {
|
||||
this.scrollH();
|
||||
this.getProvince();
|
||||
this.queryByName();
|
||||
this.endDate=this.formatTime(new Date());
|
||||
this.startDate=this.endDate.substring(0,8)+'01';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("chooseLine.css");
|
||||
</style>
|
||||
30
pages/companyIntroduce/companyIntroduce.vue
Normal file
30
pages/companyIntroduce/companyIntroduce.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<web-view src="http://112.4.156.196:8040/shiningCloud/business/companyInfo"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showFlag:0,
|
||||
pageNameFlag:1,
|
||||
pageName:'公司介绍',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
54
pages/condition/condition.css
Normal file
54
pages/condition/condition.css
Normal file
@@ -0,0 +1,54 @@
|
||||
/* 主体开始 */
|
||||
.condition-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
/* 选项开始 */
|
||||
.each-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
height: 92rpx;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px #F0F0F0;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.each-left{
|
||||
width: 596rpx;
|
||||
height: 42rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.name-block{
|
||||
height: 42rpx;
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.content-block{
|
||||
height: 36rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
width: 400rpx;
|
||||
text-align: right;
|
||||
}
|
||||
.each-right{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
/* 选项结束 */
|
||||
.button-block{
|
||||
width:658rpx;
|
||||
height:80rpx;
|
||||
background:rgba(57,130,252,1);
|
||||
border-radius:40rpx;
|
||||
margin-top: 80rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* 主体结束 */
|
||||
149
pages/condition/condition.vue
Normal file
149
pages/condition/condition.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<view>
|
||||
<back></back>
|
||||
<view class="condition-block">
|
||||
<view class="each-block" v-if="chooseDateTypeFlag==1">
|
||||
<view class="each-left">
|
||||
<view class="name-block">
|
||||
报告类型
|
||||
</view>
|
||||
<picker class="content-block" :range="dateTypes" @change="changeDateType" mode = "selector">
|
||||
{{dateTypes[dateTypesIndex]}}
|
||||
</picker>
|
||||
</view>
|
||||
<image class="each-right" src="/static/pic/jump.png"></image>
|
||||
</view>
|
||||
<view>
|
||||
<uni-calendar ref="calendar" :insert="false" @confirm="confirm" :range='true'></uni-calendar>
|
||||
</view>
|
||||
<view class="each-block" v-if="chooseDateFlag==1" @click="chooseDate">
|
||||
<view class="each-left">
|
||||
<view class="name-block">
|
||||
时间间隔
|
||||
</view>
|
||||
<view class="content-block">
|
||||
{{startDate}}至{{endDate}}
|
||||
</view>
|
||||
</view>
|
||||
<image class="each-right" src="/static/pic/jump.png"></image>
|
||||
</view>
|
||||
<view class="each-block" v-if="chooseLineFlag==1" @click="jumpToChooseLine">
|
||||
<view class="each-left">
|
||||
<view class="name-block">
|
||||
监测点选择
|
||||
</view>
|
||||
<view class="content-block">
|
||||
{{lineInfo.lineName}}
|
||||
</view>
|
||||
</view>
|
||||
<image class="each-right" src="/static/pic/jump.png"></image>
|
||||
</view>
|
||||
<button type="primary" class="button-block" @click="doQuery">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniCalendar from "../../components/uni-calendar/uni-calendar";
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
chooseDateTypeFlag:0,
|
||||
chooseDateFlag:0,
|
||||
chooseLineFlag:0,
|
||||
dateTypes:[],
|
||||
dateTypesIndex:0,
|
||||
startDate:'',
|
||||
endDate:'',
|
||||
lineInfo:{},
|
||||
startDateMills:'',
|
||||
endDateMills:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeDateType(e){
|
||||
var that = this;
|
||||
that.dateTypesIndex = e.detail.value;
|
||||
if(that.dateTypes[that.dateTypesIndex]=='申请'){
|
||||
that.doQuery();
|
||||
}
|
||||
},
|
||||
doQuery(){
|
||||
var that = this;
|
||||
var doQueryInfo = {};
|
||||
doQueryInfo.startDate = that.startDate;
|
||||
doQueryInfo.endDate = that.endDate;
|
||||
doQueryInfo.startDateMills = that.startDateMills;
|
||||
doQueryInfo.endDateMills = that.endDateMills;
|
||||
doQueryInfo.lineInfo=that.lineInfo;
|
||||
doQueryInfo.steadyDate = that.dateTypes[that.dateTypesIndex];
|
||||
doQueryInfo.transientDate = that.dateTypes[that.dateTypesIndex];
|
||||
uni.$emit('doQueryInfo',doQueryInfo)
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
});
|
||||
},
|
||||
chooseDate(){
|
||||
this.$refs.calendar.open();
|
||||
},
|
||||
confirm(e){
|
||||
var that = this;
|
||||
var before = e.range.before;
|
||||
var after = e.range.after;
|
||||
if(!before||!after){
|
||||
return
|
||||
}
|
||||
var b = parseInt(before.replace('-','').replace('-',''));
|
||||
var a = parseInt(after.replace('-','').replace('-',''));
|
||||
if(a>b){
|
||||
that.startDate = before;
|
||||
that.endDate = after;
|
||||
that.startDateMills = Date.parse(before.replace(/-/g, '/'));
|
||||
that.endDateMills = Date.parse(after.replace(/-/g, '/'))+86399999;
|
||||
}else{
|
||||
that.startDate = after;
|
||||
that.endDate = before;
|
||||
that.startDateMills = Date.parse(after.replace(/-/g, '/'));
|
||||
that.endDateMills = Date.parse(before.replace(/-/g, '/'))+86399999;
|
||||
}
|
||||
},
|
||||
jumpToChooseLine(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../chooseLine/chooseLine'
|
||||
})
|
||||
uni.$on('lineInfoSelect',function(data){
|
||||
that.lineInfo = data;
|
||||
});
|
||||
uni.$on('lineInfoQuery',function(data){
|
||||
that.lineInfo = data;
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
var that=this;
|
||||
that.endDate=e.endDate;
|
||||
that.startDate=e.startDate;
|
||||
that.startDateMills =e.startDateMills;
|
||||
that.endDateMills = e.endDateMills;
|
||||
if(e.dateTypes){
|
||||
that.dateTypes = JSON.parse(e.dateTypes);
|
||||
}
|
||||
if(e.lineInfo){
|
||||
that.lineInfo = JSON.parse(e.lineInfo);
|
||||
}
|
||||
that.chooseDateTypeFlag = e.chooseDateTypeFlag;
|
||||
that.chooseDateFlag = e.chooseDateFlag;
|
||||
that.chooseLineFlag = e.chooseLineFlag;
|
||||
},
|
||||
components:{
|
||||
back,
|
||||
uniCalendar
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("condition.css");
|
||||
</style>
|
||||
621
pages/data/data.css
Normal file
621
pages/data/data.css
Normal file
@@ -0,0 +1,621 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.title-padding{
|
||||
height: var(--status-bar-height);
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
/* 标题开始 */
|
||||
.data-title{
|
||||
background: #FFFFFF 100%;
|
||||
height: 88rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
}
|
||||
.data-title-text{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
color: #171F24;
|
||||
height: 88rpx;
|
||||
}
|
||||
/* 标题结束 */
|
||||
/* 主体开始 */
|
||||
.data-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.status-block{
|
||||
background: #FFFFFF 100%;
|
||||
height: 80rpx;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.status-block-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.status-block-sucess-text{
|
||||
color: #78D50E;
|
||||
}
|
||||
.status-block-false-text{
|
||||
color: #FF5059;
|
||||
}
|
||||
.status-block-click-text{
|
||||
margin-left: 10rpx;
|
||||
color: #3982FC;
|
||||
}
|
||||
/* 基本信息开始 */
|
||||
.data-first-block{
|
||||
background: #FFFFFF 100%;
|
||||
height: 400rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
box-sizing:border-box
|
||||
}
|
||||
.data-first-top{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 44rpx;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
width: 690rpx;
|
||||
}
|
||||
.data-first-top-text{
|
||||
margin-right: 14rpx;
|
||||
height: 44rpx;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
text-align: right;
|
||||
}
|
||||
.data-first-top-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.data-first-bottom{
|
||||
width: 690rpx;
|
||||
height: 276rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
background-image: url('../../static/pic/data_background.png');
|
||||
background-size: 100% 100%;
|
||||
margin-top: 20rpx;
|
||||
padding: 0 40rpx;
|
||||
box-sizing:border-box
|
||||
}
|
||||
.data-first-bottom-line-one{
|
||||
height: 44rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.data-first-bottom-title{
|
||||
height: 36rpx;
|
||||
width: 182rpx;
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-first-bottom-line-one-right{
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-first-bottom-line-two{
|
||||
height: 44rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
.data-first-bottom-line-two-right{
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-first-bottom-line-three{
|
||||
height: 44rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
.data-first-bottom-line-three-right{
|
||||
font-size: 32rpx;
|
||||
color: #78D50E;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-first-bottom-line-three-false{
|
||||
font-size: 32rpx;
|
||||
color: #FF5059;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-first-bottom-line-four{
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
margin-top: 14rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.data-first-bottom-line-four-left{
|
||||
height: 352rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.data-first-bottom-line-four-left-text{
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
width: 190rpx;
|
||||
}
|
||||
.data-first-bottom-line-four-right{
|
||||
margin-left: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.data-first-bottom-line-four-right-title{
|
||||
height: 36rpx;
|
||||
width: 78rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.data-first-bottom-line-four-right-text{
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
/* 基本信息结束 */
|
||||
/* 图形开始 */
|
||||
.data-second-block{
|
||||
height: 668rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.data-second-block-img{
|
||||
height: 44rpx;
|
||||
width:44rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.data-second-block-time{
|
||||
height: 42rpx;
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-right: 40rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-second-block-button{
|
||||
height: 78rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.button-spectrum{
|
||||
height: 48rpx;
|
||||
width: 140rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFFFFF;
|
||||
background: #3982FC;
|
||||
border-radius:24rpx;
|
||||
font-size: 24rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.button-refresh{
|
||||
height: 48rpx;
|
||||
width: 140rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFFFFF;
|
||||
background: #3982FC;
|
||||
border-radius:24rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.button-refresh-done{
|
||||
height: 48rpx;
|
||||
width: 140rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFFFFF;
|
||||
background: #D9D9D9;
|
||||
border-radius:24rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.data-second-block-pic{
|
||||
height: 504rpx;
|
||||
margin-top: 56rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.data-second-block-pic-left{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
height: 504rpx;
|
||||
width: 140rpx;
|
||||
margin-right: 20rpx;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.data-second-block-pic-left-first{
|
||||
background-image: url('../../static/pic/KV_A.png');
|
||||
background-size: 100% 100%;
|
||||
height: 122rpx;
|
||||
width: 122rpx;
|
||||
margin-bottom: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.maxKVA{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 16rpx;
|
||||
left: 90%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.minKVA{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 84%;
|
||||
left: 26rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-left-second{
|
||||
background-image: url('../../static/pic/KV_B.png');
|
||||
background-size: 100% 100%;
|
||||
height: 122rpx;
|
||||
width: 122rpx;
|
||||
margin-bottom: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.maxKVB{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 16rpx;
|
||||
left: 90%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.minKVB{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 84%;
|
||||
left: 26rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-left-third{
|
||||
background-image: url('../../static/pic/KV_C.png');
|
||||
background-size: 100% 100%;
|
||||
height: 122rpx;
|
||||
width: 122rpx;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.maxKVC{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 16rpx;
|
||||
left: 90%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.minKVC{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 84%;
|
||||
left: 26rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-left-text{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-second-block-pic-center{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
height: 504rpx;
|
||||
width: 298rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-center-pic{
|
||||
background-image: url('../../static/pic/dashboard.png');
|
||||
background-size: 100% 100%;
|
||||
height: 298rpx;
|
||||
width: 298rpx;
|
||||
margin-bottom: 98rpx;
|
||||
position: relative;
|
||||
}
|
||||
.data-second-block-pic-center-text{
|
||||
height: 80rpx;
|
||||
width: 182rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
.data-second-block-pic-right{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
height: 504rpx;
|
||||
width: 140rpx;
|
||||
margin-left: 20rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.data-second-block-pic-right-first{
|
||||
background-image: url('../../static/pic/A_A.png');
|
||||
background-size: 100% 100%;
|
||||
height: 122rpx;
|
||||
width: 122rpx;
|
||||
margin-bottom: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.minAA{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 16rpx;
|
||||
left: -4rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.maxAA{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 84%;
|
||||
left: 60%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-right-second{
|
||||
background-image: url('../../static/pic/A_B.png');
|
||||
background-size: 100% 100%;
|
||||
height: 122rpx;
|
||||
width: 122rpx;
|
||||
margin-bottom: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.minAB{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 16rpx;
|
||||
left: -4rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.maxAB{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 84%;
|
||||
left: 60%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-right-third{
|
||||
background-image: url('../../static/pic/A_C.png');
|
||||
background-size: 100% 100%;
|
||||
height: 122rpx;
|
||||
width: 122rpx;
|
||||
margin-bottom: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-end;
|
||||
position: relative;
|
||||
}
|
||||
.minAC{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 16rpx;
|
||||
left: -6rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.maxAC{
|
||||
position: absolute;
|
||||
height: 20rpx;
|
||||
width: 20rpx;
|
||||
font-size: 15rpx;
|
||||
top: 84%;
|
||||
left: 60%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.data-second-block-pic-right-text{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pointer-left{
|
||||
height: 12rpx;
|
||||
width: 82rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
.pointer-right{
|
||||
height: 82rpx;
|
||||
width: 12rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.current{
|
||||
height: 8rpx;
|
||||
position: absolute;
|
||||
z-index: 66;
|
||||
top: 144rpx;
|
||||
left: 132rpx;
|
||||
}
|
||||
.voltage{
|
||||
width: 128rpx;
|
||||
height: 8rpx;
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 144rpx;
|
||||
left: 132rpx;
|
||||
}
|
||||
/* 图形结束 */
|
||||
/* 具体数据开始 */
|
||||
.data-third-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
height: 888rpx;
|
||||
background: #FFFFFF;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
.data-third-block-line{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.data-third-block-line-left{
|
||||
height: 42rpx;
|
||||
width: 240rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
text-align: left;
|
||||
align-items: center;
|
||||
}
|
||||
.data-third-block-line-right{
|
||||
height: 36rpx;
|
||||
width: 390rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-third-block-line-right-A{
|
||||
height: 32rpx;
|
||||
width: 133rpx;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data-third-block-line-right-B{
|
||||
height: 32rpx;
|
||||
width: 133rpx;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
color: #303233;
|
||||
}
|
||||
.no-data{
|
||||
color: #FF5059;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* 具体数据结束 */
|
||||
/* 主体结束 */
|
||||
1062
pages/data/data.vue
Normal file
1062
pages/data/data.vue
Normal file
File diff suppressed because it is too large
Load Diff
168
pages/dataIntegrityDetails/dataIntegrityDetails.css
Normal file
168
pages/dataIntegrityDetails/dataIntegrityDetails.css
Normal file
@@ -0,0 +1,168 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 分割线 */
|
||||
.line{
|
||||
background: #F0F0F0;
|
||||
height: 20rpx;
|
||||
}
|
||||
.line-fine{
|
||||
background: #F0F0F0;
|
||||
height: 2rpx;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.time-block-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 44rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.calendar-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.time-text{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.time-block-right{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 总览开始 */
|
||||
.overview-block{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.overview-block-text{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.overview-block-text-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.overview-block-text-right{
|
||||
color: #FF5059;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
/* 总览结束 */
|
||||
/* 图片开始 */
|
||||
.pic-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 40rpx;
|
||||
background: #FFFFFF;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.pic-block-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.pic-block-title-left{
|
||||
height: 34rpx;
|
||||
width: 6rpx;
|
||||
}
|
||||
.pic-block-title-right{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.pic-block-pic{
|
||||
height: 378rpx;
|
||||
width: 670rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
/* 图片结束 */
|
||||
/* 画图开始 */
|
||||
.canvasView{
|
||||
}
|
||||
.ec-canvas{
|
||||
|
||||
}
|
||||
.legend-block{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #DAA520;
|
||||
}
|
||||
.legend-block-left-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.legend-block-right{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.legend-block-right-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #2E8B57;
|
||||
}
|
||||
.legend-block-right-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 画图结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
241
pages/dataIntegrityDetails/dataIntegrityDetails.vue
Normal file
241
pages/dataIntegrityDetails/dataIntegrityDetails.vue
Normal file
@@ -0,0 +1,241 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<block v-if="errorFlag==0"><!-- 时间 -->
|
||||
<view>
|
||||
<uni-calendar ref="calendar" :insert="false" @confirm="confirm" :range='true'></uni-calendar>
|
||||
</view>
|
||||
<view class="time-block">
|
||||
<view class="time-block-left">
|
||||
<image class="calendar-pic" src="/static/pic/calendar.png"></image>
|
||||
<view class="time-text">
|
||||
{{timeStart}}至{{timeEnd}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <image src="/static/pic/jump.png" class="time-block-right"></image> -->
|
||||
</view>
|
||||
<view class=".line-fine">
|
||||
|
||||
</view>
|
||||
<view class="overview-block">
|
||||
<view class="overview-block-text">
|
||||
<view class="overview-block-text-left">
|
||||
数据完整性为
|
||||
</view>
|
||||
<view class="overview-block-text-right">
|
||||
{{integrityz}}%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="pic-block" scroll-y="true" :style="{height:srollHeight}">
|
||||
<view class="pic-block-title">
|
||||
<image class="pic-block-title-left" src="/static/pic/rectangle.png"></image>
|
||||
<view class="pic-block-title-right">
|
||||
数据完整性(%)
|
||||
</view>
|
||||
</view>
|
||||
<view class="canvasView" :style="{height:picHeight}">
|
||||
<mpvue-echarts class="ec-canvas" canvasId="line" ref="lineChart" :style="{height:picHeight}"/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
<view class="error-block" v-else-if="errorFlag==1">
|
||||
<view class="error-text">
|
||||
网络或服务器出错请稍后再试
|
||||
</view>
|
||||
<!-- <button class="retry_button" @click="retry">重试</button> -->
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
加载中...
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
import uniCalendar from "../../components/uni-calendar/uni-calendar";
|
||||
import * as echarts from '@/components/echarts/echarts.simple.min.js';
|
||||
import mpvueEcharts from '@/components/mpvue-echarts/src/echarts.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'数据完整性详情',
|
||||
startDate:'',
|
||||
endDate:'',
|
||||
picHeight:'',
|
||||
option:{},
|
||||
dataIntegrity:{},
|
||||
timeEnd:'',
|
||||
timeStart:'',
|
||||
errorFlag:0,
|
||||
integrityz:'',
|
||||
srollHeight:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseDate(){
|
||||
this.$refs.calendar.open();
|
||||
},
|
||||
confirm(e){
|
||||
var that = this;
|
||||
var before = e.range.before;
|
||||
var after = e.range.after;
|
||||
var b = parseInt(before.replace('-','').replace('-',''));
|
||||
var a = parseInt(after.replace('-','').replace('-',''));
|
||||
if(a>b){
|
||||
that.startDate = before;
|
||||
that.endDate = after;
|
||||
}else{
|
||||
that.startDate = after;
|
||||
that.endDate = before;
|
||||
}
|
||||
},
|
||||
getDataIntegrity(){
|
||||
var that=this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/dataIntegrity/getDataIntegrity',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading()
|
||||
if(res.data.resultCode=='10000'){
|
||||
var data = res.data;
|
||||
var dataIntegrity =res.data.data;
|
||||
that.timeStart = that.formatTime(data.timeStart);
|
||||
that.timeEnd = that.formatTime(data.timeEnd);
|
||||
that.integrityz=data.integrityz+'';
|
||||
that.dataIntegrity=dataIntegrity;
|
||||
var list1=[];
|
||||
var list2=[];
|
||||
for(var i=0;i<dataIntegrity.length;i++){
|
||||
list1.push(dataIntegrity[i].lineName);
|
||||
list2.push(dataIntegrity[i].integrity)
|
||||
}
|
||||
that.drawPic(list1,list2)
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
that.errorFlag=1
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.hideLoading()
|
||||
that.errorFlag=1
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
drawPic(list1,list2) {
|
||||
var that = this ;
|
||||
var w = '55%';
|
||||
var l = '30%';
|
||||
that.option={
|
||||
grid:{
|
||||
// width:'55%',
|
||||
// left:'30%'
|
||||
width:w,
|
||||
left:l
|
||||
},
|
||||
xAxis: {
|
||||
name: '数据完整性(%)',
|
||||
type: 'value',
|
||||
nameGap:30,
|
||||
nameLocation:'center',
|
||||
max:100,
|
||||
axisLabel: {
|
||||
margin:10
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
// data: ['伟哥伟哥伟哥伟哥伟哥'],
|
||||
data: list1,
|
||||
axisLabel:{
|
||||
interval:0,
|
||||
fontsize:6,
|
||||
formatter:function(value){
|
||||
if(value.length>9){
|
||||
return value.substring(0,8)+'...'
|
||||
}else{
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
// textStyle:{
|
||||
// fontsize:10
|
||||
// }
|
||||
},
|
||||
series: {
|
||||
type: 'bar',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position:'right'
|
||||
}
|
||||
},
|
||||
data:list2,
|
||||
itemStyle:{
|
||||
color:'#58C1FF',
|
||||
position:'top'
|
||||
},
|
||||
barWidth:'90%',
|
||||
}
|
||||
}
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winHeight = sys.windowHeight;
|
||||
var winrate = 750 / winWidth;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
// var picHeight = parseInt((winHeight - statusBarHeight) * winrate - 400)/winrate;
|
||||
that.srollHeight = parseInt((winHeight - statusBarHeight) * winrate - 300)+ 'rpx';
|
||||
var picHeight=list1.length*50+50
|
||||
that.picHeight =picHeight*winrate+'rpx'
|
||||
// that.picHeight = parseInt((winHeight - statusBarHeight) * winrate - 400)+ 'rpx';
|
||||
let canvas = that.$refs.lineChart.canvas
|
||||
echarts.setCanvasCreator(() => canvas);
|
||||
let lineChart = echarts.init(canvas, null, {
|
||||
width: winWidth,
|
||||
height: picHeight
|
||||
})
|
||||
canvas.setChart(lineChart)
|
||||
lineChart.setOption(that.option)
|
||||
that.$refs.lineChart.setChart(lineChart)
|
||||
},
|
||||
retry(){
|
||||
this.getDataIntegrity();
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that=this;
|
||||
// that.endDate=that.formatTime(new Date());
|
||||
// that.startDate=that.endDate.substring(0,8)+'01';
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
},
|
||||
onReady(){
|
||||
var that=this;
|
||||
that.getDataIntegrity();
|
||||
},
|
||||
components:{
|
||||
back,
|
||||
uniCalendar,
|
||||
mpvueEcharts
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("dataIntegrityDetails.css");
|
||||
</style>
|
||||
107
pages/fastLogin/fastLogin.css
Normal file
107
pages/fastLogin/fastLogin.css
Normal file
@@ -0,0 +1,107 @@
|
||||
/* 主体开始 */
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 40rpx;
|
||||
margin-top: 46rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.login-detail{
|
||||
width: 644rpx;
|
||||
height: 40rpx;
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.choose-block{
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.choose-pic{
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.login-agreement{
|
||||
margin-left: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.login-user{
|
||||
font-size: 28rpx;
|
||||
color: #517FB0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* 手机号开始 */
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
|
||||
}
|
||||
|
||||
.num{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.pull{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.phone{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.phone-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.phone-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.phone-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
/* 手机号结束 */
|
||||
/* 下一步按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 下一步按钮结束 */
|
||||
/* 主体结束 */
|
||||
134
pages/fastLogin/fastLogin.vue
Normal file
134
pages/fastLogin/fastLogin.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :errorMsg="errorMsg" :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<view class="content-block">
|
||||
<view class="phone-block">
|
||||
<view class="num">+86</view>
|
||||
<image class="pull" src="/static/pic/pull.png"></image>
|
||||
<view class="phone">
|
||||
<input class="phone-input" placeholder="输入手机号" :value="phoneNum" placeholder-class="phone-placeholder" type="number" @input="changePhoneNum" maxlength="11" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="phone-pic" src="/static/pic/close.png" ></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="login-detail" >
|
||||
<view class="choose-block">
|
||||
<image src="/static/pic/nochoose.png" v-if="chooseFlag==0" class="choose-pic" @click="changeChooseFlag(1)"></image>
|
||||
<image src="/static/pic/choose.png" v-if="chooseFlag==1" class="choose-pic" @click="changeChooseFlag(0)"></image>
|
||||
</view>
|
||||
<view class="login-agreement" @click="changeChooseFlag(2)">已阅读并同意</view>
|
||||
<view class="login-user" @click="jumpToUserAgreement">《用户协议》</view>
|
||||
<view class="login-user" @click="jumpToPrivacyAgreement">《隐私协议》</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="nextFlag==0">
|
||||
<view class="text">下一步</view>
|
||||
</button>
|
||||
<button class="login-vercode" v-if="nextFlag==1" @click="nextPage" :disabled="disabledFlag">
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'手机快速注册',
|
||||
phoneNum:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
chooseFlag:1,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset(){
|
||||
this.phoneNum='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
changePhoneNum(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.phoneNum=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.phoneNum='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length>=10&&that.chooseFlag==1){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
nextPage(){
|
||||
var that=this;
|
||||
that.disabledFlag=true;
|
||||
if(that.phoneNum.length!=11){
|
||||
that.showFlag=1;
|
||||
that.errorMsg='请检查号码';
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
return;
|
||||
}else{
|
||||
that.disabledFlag=false;
|
||||
uni.navigateTo({
|
||||
url:'../fastLoginVercode/fastLoginVercode?phoneNum='+that.phoneNum
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
changeChooseFlag(flag){
|
||||
var that = this;
|
||||
if(flag==2){
|
||||
if(that.chooseFlag==1){
|
||||
that.chooseFlag=0
|
||||
}else{
|
||||
that.chooseFlag=1
|
||||
}
|
||||
}else{
|
||||
that.chooseFlag=flag;
|
||||
}
|
||||
if(that.chooseFlag==0){
|
||||
that.nextFlag=0;
|
||||
return;
|
||||
}
|
||||
if(that.chooseFlag==1&&that.phoneNum.length>=10){
|
||||
that.nextFlag=1;
|
||||
return;
|
||||
}
|
||||
|
||||
},
|
||||
jumpToUserAgreement(){
|
||||
uni.navigateTo({
|
||||
url: '../userAgreement/userAgreement',
|
||||
});
|
||||
},
|
||||
jumpToPrivacyAgreement(){
|
||||
uni.navigateTo({
|
||||
url: '../privacyAgreement/privacyAgreement',
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("fastLogin.css");
|
||||
</style>
|
||||
67
pages/fastLoginSetPassword/fastLoginSetPassword.css
Normal file
67
pages/fastLoginSetPassword/fastLoginSetPassword.css
Normal file
@@ -0,0 +1,67 @@
|
||||
/* 主体开始 */
|
||||
.setNew-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0rpx 40rpx 0rpx 40rpx;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.text-top{
|
||||
font-size: 30rpx;
|
||||
color:rgba(51,51,51,1);
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.password-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px rgba(217,217,217,1);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.password-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.password-placeholder-input{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.see-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.see{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
.text-bottom{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
/* 获取验证码按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 获取验证码按钮结束 */
|
||||
/* 主体结束 */
|
||||
195
pages/fastLoginSetPassword/fastLoginSetPassword.vue
Normal file
195
pages/fastLoginSetPassword/fastLoginSetPassword.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :errorMsg="errorMsg" :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<view class="setNew-block">
|
||||
<view class="text-top">请设置登录密码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="请输入" placeholder-class="password-placeholder-input" :password="passwordFlag" :value='password' @input="setPassword" maxlength="18"/>
|
||||
<block v-if="seeFlag==1">
|
||||
<view class="see-block" @click="see(false)" v-if="passwordFlag">
|
||||
<image src="/static/pic/see.png" class="see" ></image>
|
||||
</view>
|
||||
<view class="see-block" @click="see(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="text-top">再次确认密码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="请确认输入" placeholder-class="password-placeholder-input" :password="againFlag" :value='again' @input="setAgain"/>
|
||||
<block v-if="seeAgainFlag==1">
|
||||
<view class="see-block" @click="seeAgain(false)" v-if="againFlag">
|
||||
<image src="/static/pic/see.png" class="see" ></image>
|
||||
</view>
|
||||
<view class="see-block" @click="seeAgain(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="text-bottom">
|
||||
说明:密码长度为6-18位。
|
||||
</view>
|
||||
<button class="login-vercode" v-if="doneFlag==0">
|
||||
<view class="text">完成</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' v-if="doneFlag==1" @click="complete" :disabled="disabledFlag">
|
||||
<view class="textHigh" >完成</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'手机快速注册',
|
||||
phoneNum:'',
|
||||
passwordFlag:true,
|
||||
againFlag:true,
|
||||
password:'',
|
||||
again:'',
|
||||
seeFlag:0,
|
||||
seeAgainFlag:0,
|
||||
loadingFlag:false,
|
||||
doneFlag:0,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPassword(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeFlag=1;
|
||||
that.password=e.detail.value.trim();
|
||||
if(e.detail.value.trim().length>=6&&that.again.trim().length>=6){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeFlag=0;
|
||||
that.password='';
|
||||
}
|
||||
},
|
||||
setAgain(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeAgainFlag=1;
|
||||
that.again=e.detail.value.trim();
|
||||
if(e.detail.value.trim().length>=6&&that.password.trim().length>=6){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeAgainFlag=0;
|
||||
that.again='';
|
||||
}
|
||||
},
|
||||
see(flag){
|
||||
this.passwordFlag=flag;
|
||||
},
|
||||
seeAgain(flag){
|
||||
this.againFlag=flag;
|
||||
},
|
||||
complete(){
|
||||
var that = this;
|
||||
var password = that.password;
|
||||
var again = that.again;
|
||||
that.disabledFlag=true;
|
||||
if(password.trim().length>=6&&again.trim().length>=6&&password.trim()==again.trim()){
|
||||
uni.showLoading({
|
||||
title:'加载中',
|
||||
mask:true,
|
||||
success() {
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/setPsd',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
devCode:that.cid(),
|
||||
password:password.trim()
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
uni.showToast({
|
||||
title: '设置成功',
|
||||
icon:'success',
|
||||
duration: 2000,
|
||||
mask:true
|
||||
});
|
||||
setTimeout(function () {
|
||||
that.disabledFlag=false;
|
||||
uni.switchTab({
|
||||
url:'../information/information'
|
||||
})
|
||||
},2000);
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1;
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '设置密码失败',
|
||||
content: '两次输入的密码不相同,请重新输入',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.phoneNum=e.phoneNum;
|
||||
// this.phoneNum='15251711315'
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("fastLoginSetPassword.css");
|
||||
</style>
|
||||
93
pages/fastLoginVercode/fastLoginVercode.css
Normal file
93
pages/fastLoginVercode/fastLoginVercode.css
Normal file
@@ -0,0 +1,93 @@
|
||||
.text_block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 18rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
/* 下一步按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 下一步按钮结束 */
|
||||
210
pages/fastLoginVercode/fastLoginVercode.vue
Normal file
210
pages/fastLoginVercode/fastLoginVercode.vue
Normal file
@@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :errorMsg="errorMsg" :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<view class="text_block">
|
||||
<view class="phoneNum">{{text}}</view>
|
||||
<view class="phoneNum">
|
||||
{{phoneNum}}
|
||||
</view>
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="nextFlag==0">
|
||||
<view class="text">下一步</view>
|
||||
</button>
|
||||
<button class="login-vercode" v-if="nextFlag==1" :disabled="disabledFlag" :loading="loadingFlag" @click="nextPage">
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
phoneNumTrue:'',
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'手机快速注册',
|
||||
text:'验证码将发送到绑定手机号',
|
||||
vercode:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
loadingFlag:false,
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.sendAgainFlag=1
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNumTrue,
|
||||
devCode:that.cid(),
|
||||
type:1
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.sendAgainFlag=0
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
that.sendAgainFlag=0
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
nextPage(){
|
||||
var that= this;
|
||||
that.disabledFlag=true;
|
||||
that.loadingFlag=true;
|
||||
that.nextFlag=0;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/register',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNumTrue,
|
||||
devCode:that.cid(),
|
||||
code:that.vercode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
if(res.data.resultCode=='10000'){
|
||||
var userInfo = eval(res.data.data);
|
||||
userInfo.phoneNum=that.phoneNumTrue;
|
||||
uni.setStorageSync('userInfo',userInfo);
|
||||
that.disabledFlag=false;
|
||||
that.nextFlag=1;
|
||||
uni.navigateTo({
|
||||
url:'../fastLoginSetPassword/fastLoginSetPassword?phoneNum='+that.phoneNumTrue
|
||||
})
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
that.nextFlag=1;
|
||||
}, 5000);
|
||||
// uni.showModal({
|
||||
// title:'提示',
|
||||
// showCancel:false,
|
||||
// content:that.showError(res.data.msgCode,res.data.msg),
|
||||
// })
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
that.nextFlag=1;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.phoneNumTrue = e.phoneNum;
|
||||
this.phoneNum = e.phoneNum.substr(0,3)+'****'+e.phoneNum.substr(7,11);
|
||||
this.sendVercodeAgain();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("fastLoginVercode.css");
|
||||
</style>
|
||||
78
pages/forgetPassword/forgetPassword.css
Normal file
78
pages/forgetPassword/forgetPassword.css
Normal file
@@ -0,0 +1,78 @@
|
||||
/* 主体开始 */
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 40rpx;
|
||||
margin-top: 46rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
/* 手机号开始 */
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
|
||||
}
|
||||
|
||||
.num{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.pull{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.phone{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.phone-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.phone-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.phone-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
/* 手机号结束 */
|
||||
/* 下一步按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 下一步按钮结束 */
|
||||
/* 主体结束 */
|
||||
90
pages/forgetPassword/forgetPassword.vue
Normal file
90
pages/forgetPassword/forgetPassword.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg="errorMsg"></back>
|
||||
<view class="content-block">
|
||||
<view class="phone-block">
|
||||
<view class="num">+86</view>
|
||||
<image class="pull" src="/static/pic/pull.png"></image>
|
||||
<view class="phone">
|
||||
<input class="phone-input" placeholder="输入手机号" :value="phoneNum" placeholder-class="phone-placeholder" type="number" @input="changePhoneNum" maxlength="11" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="phone-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="nextFlag==0">
|
||||
<view class="text">下一步</view>
|
||||
</button>
|
||||
<button class="login-vercode" v-if="nextFlag==1" @click="nextPage" :disabled="disabledFlag">
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'忘记密码',
|
||||
phoneNum:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset(){
|
||||
this.phoneNum='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
changePhoneNum(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.phoneNum=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.phoneNum='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length>=10){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
nextPage(){
|
||||
var that=this;
|
||||
that.disabledFlag=true;
|
||||
if(that.phoneNum.length!=11){
|
||||
that.showFlag=1;
|
||||
that.errorMsg='请检查号码';
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
return;
|
||||
}else{
|
||||
that.disabledFlag=false;
|
||||
uni.navigateTo({
|
||||
url:'../setNewPassword/setNewPassword?phoneNum='+this.phoneNum,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("forgetPassword.css");
|
||||
</style>
|
||||
96
pages/forgetPasswordVercode/forgetPasswordVercode.css
Normal file
96
pages/forgetPasswordVercode/forgetPasswordVercode.css
Normal file
@@ -0,0 +1,96 @@
|
||||
.text_block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 10rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
font-weight:400;
|
||||
}
|
||||
/* 下一步按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 下一步按钮结束 */
|
||||
197
pages/forgetPasswordVercode/forgetPasswordVercode.vue
Normal file
197
pages/forgetPasswordVercode/forgetPasswordVercode.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg="errorMsg"></back>
|
||||
<view class="text_block">
|
||||
<view class="phoneNum">{{text}}</view>
|
||||
<view class="phoneNum">
|
||||
{{phoneNum}}
|
||||
</view>
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="nextFlag==0">
|
||||
<view class="text">下一步</view>
|
||||
</button>
|
||||
<button class="login-vercode" v-if="nextFlag==1" @click="nextPage" :disabled="disabledFlag" :loading="loadingFlag">
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'忘记密码',
|
||||
text:'验证码将发送到绑定手机号',
|
||||
vercode:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
loadingFlag:false,
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
that.sendAgainFlag=1
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNumTrue,
|
||||
devCode:that.cid(),
|
||||
type:3
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
nextPage(){
|
||||
var that= this;
|
||||
that.disabledFlag=true;
|
||||
that.loadingFlag=true;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/register',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNumTrue,
|
||||
devCode:that.cid(),
|
||||
code:that.vercode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
if(res.data.resultCode=='10000'){
|
||||
var userInfo = eval(res.data.data);
|
||||
userInfo.phoneNum=that.phoneNumTrue;
|
||||
uni.setStorageSync('userInfo',userInfo);
|
||||
uni.navigateTo({
|
||||
url:'../setNewPassword/setNewPassword?phoneNum='+that.phoneNumTrue
|
||||
})
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.phoneNumTrue = e.phoneNum;
|
||||
this.phoneNum = e.phoneNum.substr(0,3)+'****'+e.phoneNum.substr(7,11);
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("forgetPasswordVercode.css");
|
||||
</style>
|
||||
160
pages/history/history.css
Normal file
160
pages/history/history.css
Normal file
@@ -0,0 +1,160 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.title-padding{
|
||||
height: var(--status-bar-height);
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
/* 标题开始 */
|
||||
.history-title{
|
||||
background: #FFFFFF 100%;
|
||||
height: 88rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
}
|
||||
.history-title-text{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
color: #171F24;
|
||||
height: 88rpx;
|
||||
}
|
||||
/* 标题结束 */
|
||||
/* 主体开始 */
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.content-block-line{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
align-items: center;
|
||||
height: 92rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
}
|
||||
.content-block-line-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.content-block-line-right{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.content-block-line-right-text{
|
||||
color: #3982FC;
|
||||
font-size: 30rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
.content-block-line-right-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.sroll-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.sroll-block-line-one{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 122rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 20rpx;
|
||||
border-bottom: solid #F0F0F0 1px;
|
||||
}
|
||||
.sroll-block-line-one-text{
|
||||
margin-right: 14rpx;
|
||||
height: 44rpx;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.sroll-block-line-one-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.sroll-block-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 20rpx;
|
||||
height: 236rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.sroll-block-content-line-one{
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sroll-block-content-line-one-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.sroll-block-content-line-one-left-pic{
|
||||
height: 34rpx;
|
||||
width: 6rpx;
|
||||
}
|
||||
.sroll-block-content-line-one-left-text{
|
||||
margin-left: 14rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.sroll-block-content-line-one-right{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.sroll-block-content-line{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 92rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sroll-block-content-line-text{
|
||||
height: 124rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 2rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sroll-block-content-line-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.sroll-block-content-line-right{
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.no-data{
|
||||
color: #FF5059;
|
||||
/* background: #FFFFFF; */
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* 主体结束 */
|
||||
352
pages/history/history.vue
Normal file
352
pages/history/history.vue
Normal file
@@ -0,0 +1,352 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="title-padding">
|
||||
|
||||
</view>
|
||||
<view class="history-title">
|
||||
<view class="history-title-text">
|
||||
历史数据
|
||||
</view>
|
||||
</view>
|
||||
<view class="history-block">
|
||||
<!-- 内容 -->
|
||||
<view class="content-block">
|
||||
<view class="content-block-line" @click="jumpToDataIntegrityDetails">
|
||||
<view class="content-block-line-left">
|
||||
数据完整性
|
||||
</view>
|
||||
<view class="content-block-line-right">
|
||||
<!-- <view class="content-block-line-right-text">
|
||||
85%
|
||||
</view> -->
|
||||
<image src="/static/pic/jump.png" class="content-block-line-right-pic"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-block-line" @click="jumpToTerminalStatus">
|
||||
<view class="content-block-line-left">
|
||||
终端在线率
|
||||
</view>
|
||||
<view class="content-block-line-right">
|
||||
<!-- <view class="content-block-line-right-text">
|
||||
85%
|
||||
</view> -->
|
||||
<image src="/static/pic/jump.png" class="content-block-line-right-pic"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 监测点信息 -->
|
||||
<view class="sroll-block-line-one" @click="jumpToCondition">
|
||||
<view class="sroll-block-line-one-text">
|
||||
<view class="">
|
||||
{{lineInfo.lineName}}
|
||||
</view>
|
||||
<view class="">
|
||||
{{startDate}}至{{endDate}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <image class="sroll-block-line-one-pic" src="/static/pic/pull.png"></image> -->
|
||||
<image class="sroll-block-line-one-pic" src="/static/pic/jump.png"></image>
|
||||
</view>
|
||||
<scroll-view class="sroll-block" :scroll-y="scrollFlag" :style="{height:scrollHeight}" @scrolltolower="queryStatistics()" @touchend="touchEnd()" v-if="statisticsList.length>0">
|
||||
<view class="sroll-block-content" @click="jumpToTerminalHistory(statistics.time)" v-for="statistics in statisticsList">
|
||||
<view class="sroll-block-content-line-one">
|
||||
<view class="sroll-block-content-line-one-left">
|
||||
<image src="/static/pic/rectangle.png" class="sroll-block-content-line-one-left-pic"></image>
|
||||
<view class="sroll-block-content-line-one-left-text">
|
||||
{{statistics.showTime}}
|
||||
</view>
|
||||
</view>
|
||||
<image class="sroll-block-content-line-one-right" src="/static/pic/jump.png"></image>
|
||||
</view>
|
||||
<scroll-view class="sroll-block-content-line-text" scroll-y="true">
|
||||
<view class="" v-if="statistics.eventDescribe!=null">
|
||||
{{statistics.eventDescribe}}
|
||||
</view>
|
||||
<view class="" v-if="statistics.steadyDescribe!=null">
|
||||
{{statistics.steadyDescribe}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- <view class="sroll-block-content-line">
|
||||
<view class="sroll-block-content-line-left">
|
||||
暂降次数
|
||||
</view>
|
||||
<view class="sroll-block-content-line-right">
|
||||
3次
|
||||
</view>
|
||||
</view>
|
||||
<view class="sroll-block-content-line">
|
||||
<view class="sroll-block-content-line-left">
|
||||
频率偏差合格率
|
||||
</view>
|
||||
<view class="sroll-block-content-line-right">
|
||||
90%
|
||||
</view>
|
||||
</view>
|
||||
<view class="sroll-block-content-line">
|
||||
<view class="sroll-block-content-line-left">
|
||||
电压畸变率合格率
|
||||
</view>
|
||||
<view class="sroll-block-content-line-right">
|
||||
90%
|
||||
</view>
|
||||
</view>
|
||||
<view class="sroll-block-content-line">
|
||||
<view class="sroll-block-content-line-left">
|
||||
奇次电压合格率
|
||||
</view>
|
||||
<view class="sroll-block-content-line-right">
|
||||
80%
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="no-data" :style="{height:scrollHeight}" v-else>
|
||||
暂无历史数据
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageName:'历史数据',
|
||||
pageNameFlag:1,
|
||||
backShowFlag:0,
|
||||
tabNum:1,
|
||||
page:1,
|
||||
num:20,
|
||||
scrollHeight:'',
|
||||
terminalStatus:55,
|
||||
lineInfo:{
|
||||
lineName:'暂无默认监测点,请选择',
|
||||
lineIndex:''
|
||||
},
|
||||
statisticsList:[],
|
||||
scrollFlag:true,
|
||||
roleCode:1,
|
||||
startDate:'',
|
||||
endDate:'',
|
||||
startDateMills:'',
|
||||
endDateMills:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrollH(){
|
||||
var that =this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750/winWidth;
|
||||
var winHeight= sys.windowHeight;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
that.scrollHeight = parseInt((winHeight-statusBarHeight)*winrate-410)+'rpx';
|
||||
},
|
||||
touchEnd(){
|
||||
var that = this;
|
||||
that.scrollFlag=false;
|
||||
setTimeout(function(){
|
||||
that.scrollFlag=true;
|
||||
},30)
|
||||
},
|
||||
changeTab(tabNum){
|
||||
this.tabNum=tabNum;
|
||||
},
|
||||
queryDefaultLine(){
|
||||
var that=this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/realtimeinfo/getLineId',
|
||||
method:'POST',
|
||||
data: {
|
||||
userIndex:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
var lineInfo = res.data.data
|
||||
if(lineInfo){
|
||||
that.lineInfo= lineInfo
|
||||
that.queryStatistics();
|
||||
}
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.queryDefaultLine();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
queryStatistics(){
|
||||
var that=this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/statistics/statistics',
|
||||
method:'POST',
|
||||
data: {
|
||||
lineIndex:that.lineInfo.lineIndex,
|
||||
startTime:that.startDateMills,
|
||||
endTime:that.endDateMills,
|
||||
page:that.page++,
|
||||
num:that.num
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
var list= res.data.data
|
||||
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
|
||||
for(var i=0;i<list.length;i++){
|
||||
list[i].showTime = that.formatTime(list[i].time);
|
||||
}
|
||||
that.statisticsList= that.statisticsList.concat(list)
|
||||
}
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.queryStatistics();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseLine(){
|
||||
var that=this;
|
||||
uni.navigateTo({
|
||||
url:'../chooseLine/chooseLine'
|
||||
});
|
||||
uni.$on('lineInfoSelect',function(data){
|
||||
that.lineInfo = data;
|
||||
that.page=1;
|
||||
that.statisticsList=[];
|
||||
that.queryStatistics();
|
||||
});
|
||||
uni.$on('lineInfoQuery',function(data){
|
||||
that.lineInfo = data;
|
||||
that.page=1;
|
||||
that.statisticsList=[];
|
||||
that.queryStatistics();
|
||||
})
|
||||
},
|
||||
jumpToDataIntegrityDetails(){
|
||||
var userInfo=uni.getStorageSync('userInfo');
|
||||
var roleCode= userInfo.roleCode;
|
||||
if(roleCode!=0){
|
||||
uni.showModal({
|
||||
title:'提示',
|
||||
content:'您暂无权限查看',
|
||||
showCancel:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'../dataIntegrityDetails/dataIntegrityDetails'
|
||||
})
|
||||
},
|
||||
jumpToTerminalStatus(){
|
||||
var userInfo=uni.getStorageSync('userInfo');
|
||||
var roleCode= userInfo.roleCode;
|
||||
if(roleCode!=0){
|
||||
uni.showModal({
|
||||
title:'提示',
|
||||
content:'您暂无权限查看',
|
||||
showCancel:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'../terminalStatus/terminalStatus'
|
||||
})
|
||||
},
|
||||
jumpToTerminalHistory(timeID){
|
||||
var that=this;
|
||||
uni.navigateTo({
|
||||
url:'../terminalHistory/terminalHistory?lineInfo='+JSON.stringify(that.lineInfo)+'&timeID='+timeID
|
||||
})
|
||||
},
|
||||
jumpToCondition(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../condition/condition?lineInfo='+JSON.stringify(that.lineInfo)+'&startDate='+that.startDate+'&endDate='+that.endDate+'&startDateMills='+that.startDateMills+'&endDateMills='+that.endDateMills+'&chooseDateTypeFlag=0&&chooseDateFlag=1&chooseLineFlag=1'
|
||||
})
|
||||
uni.$once('doQueryInfo',function(e){
|
||||
that.startDate = e.startDate;
|
||||
that.endDate = e.endDate;
|
||||
that.startDateMills = e.startDateMills;
|
||||
that.endDateMills = e.endDateMills;
|
||||
that.lineInfo = e.lineInfo;
|
||||
that.page=1;
|
||||
that.statisticsList=[];
|
||||
that.queryStatistics();
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
back
|
||||
},
|
||||
onLoad() {
|
||||
var that = this;
|
||||
that.scrollH();
|
||||
that.endDate=that.formatTime(new Date());
|
||||
that.startDate=that.endDate.substring(0,8)+'01';
|
||||
that.startDateMills = Date.parse(that.startDate.replace(/-/g, '/'));
|
||||
that.endDateMills = Date.parse(that.endDate.replace(/-/g, '/'))+86399999;
|
||||
that.queryDefaultLine();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("history.css");
|
||||
</style>
|
||||
102
pages/index/index.css
Normal file
102
pages/index/index.css
Normal file
@@ -0,0 +1,102 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.spectrum-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.line-block{
|
||||
height: 94rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
/* tab选项开始 */
|
||||
.tab-block{
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
background: #FFFFFF 100%;
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
.tab{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.tab-click{
|
||||
font-size: 28rpx;
|
||||
color: #3982FC;
|
||||
white-space: nowrap;
|
||||
border-bottom: solid 2rpx #3982FC;
|
||||
}
|
||||
/* tab选项结束 */
|
||||
/* 画图开始 */
|
||||
.echarts-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.ec-canvas{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.canvasView{
|
||||
}
|
||||
.legend-block{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #DAA520;
|
||||
}
|
||||
.legend-block-left-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.legend-block-right{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.legend-block-right-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #2E8B57;
|
||||
}
|
||||
.legend-block-right-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 画图结束 */
|
||||
/* 主体结束 */
|
||||
56
pages/index/index.vue
Normal file
56
pages/index/index.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<button @click="open()">开始</button>
|
||||
<loading
|
||||
ref="loading"
|
||||
:custom="false"
|
||||
:shadeClick="true"
|
||||
:type="1"
|
||||
@callback="callback()">
|
||||
<!-- <view class="test">自定义</view> -->
|
||||
</loading>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import loading from '../../components/xuan-loading/xuan-loading.vue'
|
||||
export default {
|
||||
components:{
|
||||
loading
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.open();
|
||||
setTimeout(()=>{
|
||||
this.close();
|
||||
},2000)
|
||||
},
|
||||
methods: {
|
||||
close:function(){
|
||||
this.$refs.loading.close();
|
||||
},
|
||||
open:function(){
|
||||
this.$refs.loading.open();
|
||||
},
|
||||
callback(){
|
||||
console.log("关闭后回掉");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.test{
|
||||
animation: 1s aaa infinite;
|
||||
}
|
||||
@keyframes aaa{
|
||||
from{transform: rotate(0deg);}
|
||||
to{transform: rotate(360deg);}
|
||||
}
|
||||
.content{
|
||||
|
||||
}
|
||||
</style>
|
||||
253
pages/information/information.css
Normal file
253
pages/information/information.css
Normal file
@@ -0,0 +1,253 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.title-padding{
|
||||
height: var(--status-bar-height);
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.data-body{
|
||||
background: #F0F0F0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
/* 标题开始 */
|
||||
.data-title{
|
||||
background: #FFFFFF 100%;
|
||||
height: 88rpx;
|
||||
}
|
||||
.data-title-text{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
color: #171F24;
|
||||
height: 88rpx;
|
||||
}
|
||||
/* 标题结束 */
|
||||
/* tab选项开始 */
|
||||
.data-tab{
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
background: #FFFFFF 100%;
|
||||
margin-top: 2rpx;
|
||||
position: relative;
|
||||
}
|
||||
.tab-noread-num-transient{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background-image: url('../../static/pic/number.png');
|
||||
background-size: 100% 100%;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 204rpx;
|
||||
top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-noread-num-steady{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background-image: url('../../static/pic/number.png');
|
||||
background-size: 100% 100%;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 454rpx;
|
||||
top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-noread-num-terminal{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background-image: url('../../static/pic/number.png');
|
||||
background-size: 100% 100%;
|
||||
font-size:20rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 704rpx;
|
||||
top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab{
|
||||
height: 64rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-click{
|
||||
font-size: 28rpx;
|
||||
color: #3982FC;
|
||||
white-space: nowrap;
|
||||
border-bottom: solid 2rpx #3982FC;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* tab选项结束 */
|
||||
|
||||
/* 暂态开始 */
|
||||
/* 下拉刷新开始 */
|
||||
.pull-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
/* 下拉刷新结束 */
|
||||
.transient-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.transient-event-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF 100%;
|
||||
position: relative;
|
||||
}
|
||||
.steady-event-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF 100%;
|
||||
position: relative;
|
||||
}
|
||||
.transient-event{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 260rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.steady-event{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 180rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.transient-event-time{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-left: 444rpx;
|
||||
height: 34rpx;
|
||||
margin-bottom: 12rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.transient-event-pic{
|
||||
width: 124rpx;
|
||||
height: 200rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.steady-event-pic{
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.transient-event-noread{
|
||||
position: absolute;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
left: 154rpx;
|
||||
top: 22rpx;
|
||||
}
|
||||
.transient-event-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 20rpx;
|
||||
width: 566rpx;
|
||||
}
|
||||
.line-one{
|
||||
width: 566rpx;
|
||||
height: 120rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.line-two{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: baseline ;
|
||||
}
|
||||
.line-two-left{
|
||||
width: 200rpx;
|
||||
height: 38rpx;
|
||||
background: #F4F4F4;
|
||||
border-radius: 18rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
/* display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center; */
|
||||
}
|
||||
.line-two-right{
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
.line-three{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: baseline ;
|
||||
margin-top: 21rpx;
|
||||
}
|
||||
.line-three-left{
|
||||
width: 200rpx;
|
||||
height: 38rpx;
|
||||
background: #F4F4F4;
|
||||
border-radius: 18rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
.line-three-right{
|
||||
font-size:24rpx;
|
||||
color: #333333;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
/* 暂态结束 */
|
||||
.no-data{
|
||||
color: #FF5059;
|
||||
/* background: #FFFFFF; */
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* 主体结束 */
|
||||
797
pages/information/information.vue
Normal file
797
pages/information/information.vue
Normal file
@@ -0,0 +1,797 @@
|
||||
<template>
|
||||
<view class="data-body" >
|
||||
<view class="title-padding">
|
||||
|
||||
</view>
|
||||
<view class="data-title">
|
||||
<view class="data-title-text">
|
||||
实时信息
|
||||
</view>
|
||||
</view>
|
||||
<!-- tab选项 -->
|
||||
<view class="data-tab">
|
||||
<view class="tab-click" v-if="tabNum==1">
|
||||
暂态事件消息
|
||||
<view class="tab-noread-num-transient" v-if="transientShowNum!=0">
|
||||
{{transientShowNum}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab" v-else @click='changeTab(1)'>
|
||||
暂态事件消息
|
||||
<view class="tab-noread-num-transient" v-if="transientShowNum!=0">
|
||||
{{transientShowNum}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab-click" v-if="tabNum==2">
|
||||
稳态越限消息
|
||||
<view class="tab-noread-num-steady" v-if="steadyShowNum!=0">
|
||||
{{steadyShowNum}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab" v-else @click='changeTab(2)'>
|
||||
稳态越限消息
|
||||
<view class="tab-noread-num-steady" v-if="steadyShowNum!=0">
|
||||
{{steadyShowNum}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab-click" v-if="tabNum==3">
|
||||
终端状态消息
|
||||
<view class="tab-noread-num-terminal" v-if="terminalShowNum!=0">
|
||||
{{terminalShowNum}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab" v-else @click='changeTab(3)'>
|
||||
终端状态消息
|
||||
<view class="tab-noread-num-terminal" v-if="terminalShowNum!=0">
|
||||
{{terminalShowNum}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pull-block" :style="{height:pullHeight}" v-if="pullFlag==1">
|
||||
{{pullText}}
|
||||
</view>
|
||||
<swiper :style="{height:scrollHeight}" :current="current" @change="changeTabBySwiper" duration="300" skip-hidden-item-layout="true">
|
||||
<swiper-item>
|
||||
<view class="transient-block" :style="{height:scrollHeight}" @touchmove="transientTouchmove" @touchstart="transientTouchstart" @touchend="transientTouchend">
|
||||
<scroll-view :scroll-y="scrollFlag" @scrolltolower="queryTransientList()" @lower-threshold='0' :style="{height:scrollHeight}" @scroll='transientScrollMove' v-if="transientList.length>0">
|
||||
<view class="transient-event-block" @click="jumpToTransientDetails(transient.eventDetailIndex,transient.eventMsgIndex,transientListIndex,transient.state)" v-for="(transient,transientListIndex) in transientList">
|
||||
<view class="transient-event">
|
||||
<image src="/static/pic/transient.png" class="transient-event-pic"></image>
|
||||
<image src="/static/pic/dot.png" class="transient-event-noread" v-if="transient.state==0"></image>
|
||||
<view class="transient-event-content">
|
||||
<view class="line-one">
|
||||
<view class="">
|
||||
{{transient.lineName}}
|
||||
</view>
|
||||
<view class="">
|
||||
于{{transient.showTime}}发生暂降事件
|
||||
</view>
|
||||
<view class="">
|
||||
特征幅值:{{transient.eventValue}}%,持续时间:{{transient.persistTime}}s
|
||||
</view>
|
||||
</view>
|
||||
<view class="line-two">
|
||||
<view class="line-two-left">
|
||||
台账信息:
|
||||
</view>
|
||||
<view class="line-two-right">
|
||||
{{transient.lineInfo}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="no-data" :style="{height:scrollHeight}" v-else>
|
||||
{{noTransient}}
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="transient-block" :style="{height:scrollHeight}" @touchmove="steadyTouchmove" @touchstart="steadyTouchstart" @touchend="steadyTouchend">
|
||||
<scroll-view :scroll-y="scrollFlag" style="" @scrolltolower="querySteadyList" :style="{height:scrollHeight}" @scroll='steadyScrollMove' v-if="steadyList.length>0">
|
||||
<view class="steady-event-block" @click="jumpToSteady(steady.showTime,steady.steadyIndex,steadyListIndex,steady.state)" v-for="(steady,steadyListIndex) in steadyList">
|
||||
<view class="steady-event">
|
||||
<image src="/static/pic/steady.png" class="steady-event-pic"></image>
|
||||
<image src="/static/pic/dot.png" class="transient-event-noread" v-if="steady.state==0"></image>
|
||||
<view class="transient-event-content">
|
||||
<view class="">
|
||||
{{steady.showTime}}
|
||||
</view>
|
||||
<view class="">
|
||||
发生稳态越限监测点{{steady.lineNum}}个
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="no-data" :style="{height:scrollHeight}" v-else>
|
||||
{{noSteady}}
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="transient-block" :style="{height:scrollHeight}" @touchmove="terminalTouchmove" @touchstart="terminalTouchstart" @touchend="terminalTouchend">
|
||||
<scroll-view :scroll-y="scrollFlag" @scrolltolower="queryTerminalList()" :style="{height:scrollHeight}" @scroll='terminalScrollMove' v-if="terminalList.length>0">
|
||||
<view class="steady-event-block" @click="jumpToTerminal(terminal.showTime,terminal.devMsgIndex,terminalListIndex,terminal.state)" v-for="(terminal,terminalListIndex) in terminalList">
|
||||
<view class="steady-event">
|
||||
<image src="/static/pic/terminal.png" class="steady-event-pic"></image>
|
||||
<image src="/static/pic/dot.png" class="transient-event-noread" v-if="terminal.state==0"></image>
|
||||
<view class="transient-event-content">
|
||||
<view class="">
|
||||
{{terminal.showTime}}
|
||||
</view>
|
||||
<view class="">
|
||||
终端异常共{{terminal.limitNum}}台
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="no-data" :style="{height:scrollHeight}" v-else>
|
||||
{{noTerminal}}
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabNum:1,//1-暂态 2-稳态 3-终端状态
|
||||
terminalNum:0,
|
||||
terminalShowNum:0,
|
||||
steadyNum:0,
|
||||
steadyShowNum:0,
|
||||
transientNum:0,
|
||||
transientShowNum:0,
|
||||
transientPage:1,
|
||||
steadyPage:1,
|
||||
terminalPage:1,
|
||||
transientList:[],
|
||||
steadyList:[],
|
||||
terminalList:[],
|
||||
scrollHeight:'',
|
||||
eventMsgIndexList:[],
|
||||
steadyIndexList:[],
|
||||
devMsgIndexList:[],
|
||||
allNum:0,
|
||||
transientScrollTop:0,
|
||||
steadyScrollTop:0,
|
||||
terminalScrollTop:0,
|
||||
pullHeight:'',
|
||||
pullFlag:0,
|
||||
startY:0,
|
||||
pullText:'下拉刷新',
|
||||
transientRefreshFlag:0,
|
||||
steadyRefreshFlag:0,
|
||||
terminalRefreshFlag:0,
|
||||
current:0,
|
||||
scrollFlag:true,
|
||||
noTransient:'',
|
||||
noSteady:'',
|
||||
noTerminal:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
transientScrollMove(e){
|
||||
this.transientScrollTop = e.detail.scrollTop;
|
||||
},
|
||||
transientTouchstart(e){
|
||||
this.startY = e.touches[0].clientY;
|
||||
},
|
||||
transientTouchmove(e){
|
||||
var that= this;
|
||||
if(that.transientScrollTop<2){
|
||||
var h = e.changedTouches[0].clientY - that.startY;
|
||||
if(h>66||h<0){
|
||||
return;
|
||||
}else if(h<33){
|
||||
that.pullText='下拉刷新';
|
||||
that.pullHeight =h+'px';
|
||||
that.pullFlag=1;
|
||||
}else{
|
||||
that.pullText = '加载中...';
|
||||
that.pullHeight =h+'px';
|
||||
that.pullFlag=1;
|
||||
that.transientRefreshFlag=1;
|
||||
that.communicateState();
|
||||
}
|
||||
}
|
||||
},
|
||||
transientTouchend(e){
|
||||
var that = this;
|
||||
that.scrollFlag=false;
|
||||
setTimeout(function(){
|
||||
that.scrollFlag=true;
|
||||
},30)
|
||||
that.transientScrollTop=0;
|
||||
that.pullHeight='';
|
||||
that.startY=0;
|
||||
that.pullText='下拉刷新';
|
||||
that.pullFlag=0;
|
||||
if(that.transientRefreshFlag==1){
|
||||
that.transientRefreshFlag=0;
|
||||
that.transientList=[];
|
||||
that.noTransient = '';
|
||||
that.transientNum=0;
|
||||
that.transientPage=1;
|
||||
that.queryTransientList();
|
||||
}
|
||||
|
||||
},
|
||||
steadyScrollMove(e){
|
||||
this.steadyScrollTop = e.detail.scrollTop;
|
||||
},
|
||||
steadyTouchstart(e){
|
||||
this.startY = e.touches[0].clientY;
|
||||
},
|
||||
steadyTouchmove(e){
|
||||
var that= this;
|
||||
if(that.steadyScrollTop<2){
|
||||
var h = e.changedTouches[0].clientY - that.startY;
|
||||
if(h>66||h<0){
|
||||
return;
|
||||
}else if(h<33){
|
||||
that.pullText='下拉刷新';
|
||||
that.pullHeight =h+'px';
|
||||
that.pullFlag=1;
|
||||
}else{
|
||||
that.pullText = '加载中...';
|
||||
that.pullHeight =h+'px';
|
||||
that.pullFlag=1;
|
||||
that.steadyRefreshFlag=1;
|
||||
that.communicateState();
|
||||
}
|
||||
}
|
||||
},
|
||||
steadyTouchend(e){
|
||||
var that = this;
|
||||
that.scrollFlag=false;
|
||||
setTimeout(function(){
|
||||
that.scrollFlag=true;
|
||||
},30)
|
||||
that.steadyScrollTop=0;
|
||||
that.pullHeight='';
|
||||
that.startY=0;
|
||||
that.pullText='下拉刷新';
|
||||
that.pullFlag=0;
|
||||
if(that.steadyRefreshFlag==1){
|
||||
that.steadyRefreshFlag=0;
|
||||
that.steadyList=[];
|
||||
that.noSteady = '';
|
||||
that.steadyNum=0;
|
||||
that.steadyPage=1;
|
||||
that.querySteadyList();
|
||||
}
|
||||
},
|
||||
terminalScrollMove(e){
|
||||
this.terminalScrollTop = e.detail.scrollTop;
|
||||
},
|
||||
terminalTouchstart(e){
|
||||
this.startY = e.touches[0].clientY;
|
||||
},
|
||||
terminalTouchmove(e){
|
||||
var that= this;
|
||||
if(that.terminalScrollTop<2){
|
||||
var h = e.changedTouches[0].clientY - that.startY;
|
||||
if(h>66||h<0){
|
||||
return;
|
||||
}else if(h<33){
|
||||
that.pullText='下拉刷新';
|
||||
that.pullHeight =h+'px';
|
||||
that.pullFlag=1;
|
||||
}else{
|
||||
that.pullText = '加载中...';
|
||||
that.pullHeight =h+'px';
|
||||
that.pullFlag=1;
|
||||
that.terminalRefreshFlag=1;
|
||||
that.communicateState();
|
||||
}
|
||||
}
|
||||
},
|
||||
terminalTouchend(e){
|
||||
var that= this;
|
||||
that.scrollFlag=false;
|
||||
setTimeout(function(){
|
||||
that.scrollFlag=true;
|
||||
},30)
|
||||
that.terminalScrollTop=0;
|
||||
that.pullHeight='';
|
||||
that.startY=0;
|
||||
that.pullText='下拉刷新';
|
||||
that.pullFlag=0;
|
||||
if(that.terminalRefreshFlag==1){
|
||||
that.terminalRefreshFlag=0;
|
||||
that.terminalList=[];
|
||||
that.noTerminal = '';
|
||||
that.terminalNum=0;
|
||||
that.terminalPage=1;
|
||||
that.queryTerminalList();
|
||||
}
|
||||
},
|
||||
scrollH(){
|
||||
var that =this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750/winWidth;
|
||||
var winHeight= sys.windowHeight;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
that.scrollHeight = parseInt((winHeight-statusBarHeight)*winrate-152)+'rpx';
|
||||
},
|
||||
changeTab(tabNum){
|
||||
var that=this;
|
||||
that.current=tabNum-1;
|
||||
that.tabNum=tabNum;
|
||||
},
|
||||
changeTabBySwiper(e){
|
||||
this.tabNum=e.detail.current+1;
|
||||
this.current=e.detail.current;
|
||||
},
|
||||
jumpToTransientDetails(eventDetailIndex,eventMsgIndex,transientListIndex,state){
|
||||
var that =this;
|
||||
if(that.transientNum>0&&state==0){
|
||||
that.transientNum--;
|
||||
that.eventMsgIndexList.push(eventMsgIndex);
|
||||
that.transientList[transientListIndex].state=1;
|
||||
}
|
||||
that.judgeTransientNum();
|
||||
that.setAllNum();
|
||||
that.communicateState();
|
||||
uni.navigateTo({
|
||||
url:'../transientDetails/transientDetails?eventDetailIndex='+eventDetailIndex+"&eventMsgIndex="+eventMsgIndex
|
||||
})
|
||||
},
|
||||
jumpToSteady(showTime,steadyIndex,steadyListIndex,state){
|
||||
var that = this;
|
||||
if(that.steadyNum>0&&state==0){
|
||||
that.steadyNum--;
|
||||
that.steadyIndexList.push(steadyIndex);
|
||||
that.steadyList[steadyListIndex].state=1;
|
||||
}
|
||||
that.judgeSteadyNum();
|
||||
that.setAllNum();
|
||||
that.communicateState();
|
||||
uni.navigateTo({
|
||||
url:'../steady/steady?steadyIndex='+steadyIndex+"&showTime="+showTime
|
||||
})
|
||||
},
|
||||
jumpToTerminal(showTime,devMsgIndex,terminalListIndex,state){
|
||||
var that = this;
|
||||
if(that.terminalNum>0&&state==0){
|
||||
that.terminalNum--;
|
||||
that.devMsgIndexList.push(devMsgIndex);
|
||||
that.terminalList[terminalListIndex].state=1;
|
||||
}
|
||||
that.judgeTerminalNum();
|
||||
that.setAllNum();
|
||||
that.communicateState();
|
||||
uni.navigateTo({
|
||||
url:'../terminal/terminal?devMsgIndex='+devMsgIndex+"&showTime="+showTime
|
||||
})
|
||||
},
|
||||
// 同步读取状态
|
||||
communicateState(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/cleanmsg/clearMsg',
|
||||
method:'POST',
|
||||
data: {
|
||||
eventMsgList:that.eventMsgIndexList,
|
||||
steadyMsgList:that.steadyIndexList,
|
||||
deviceMsgList:that.devMsgIndexList
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
console.log('同步成功')
|
||||
}else{
|
||||
console.log('同步失败')
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
console.log('同步网络异常')
|
||||
}
|
||||
});
|
||||
},
|
||||
// 暂态
|
||||
queryTransientList(){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailList',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
page:that.transientPage++,
|
||||
num:20
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.transientNum=res.data.unstate;
|
||||
that.judgeTransientNum();
|
||||
var list =[];
|
||||
list = that.countTransientNum(eval(res.data.data),1);
|
||||
if(that.transientPage==2){
|
||||
that.transientList = []
|
||||
}
|
||||
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
|
||||
that.transientList = that.transientList.concat(list);
|
||||
}
|
||||
if(that.transientList.length==0){
|
||||
that.noTransient = '暂无暂态消息'
|
||||
}
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.transientPage--;
|
||||
that.queryTransientList();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
countTransientNum(list,type){
|
||||
var that = this;
|
||||
if(type==1){
|
||||
for(var i=0;i<list.length;i++){
|
||||
// if(list[i].state==0&&that.transientNum!='99+'){
|
||||
// that.transientNum++;
|
||||
// }
|
||||
list[i].showTime = that.formatTime_mills(list[i].timeID);
|
||||
}
|
||||
}else{
|
||||
var num=0
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(list[i].state==0){
|
||||
num++;
|
||||
}
|
||||
that.transientNum=num;
|
||||
}
|
||||
}
|
||||
that.setAllNum();
|
||||
// if(that.transientNum>99){
|
||||
// that.transientNum='99+'
|
||||
// }
|
||||
return list;
|
||||
},
|
||||
judgeTransientNum(){
|
||||
var that= this;
|
||||
if(that.transientNum>99){
|
||||
that.transientShowNum='99+'
|
||||
}else{
|
||||
that.transientShowNum=that.transientNum
|
||||
}
|
||||
},
|
||||
//稳态
|
||||
querySteadyList(){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/steadymsg/steadyState',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
page:that.steadyPage++,
|
||||
num:20
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.steadyNum=res.data.unstate;
|
||||
that.judgeSteadyNum();
|
||||
var list =[];
|
||||
list = that.countSteadyNum(eval(res.data.data),1);
|
||||
if(that.steadyPage==2){
|
||||
that.steadyList =[]
|
||||
}
|
||||
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
|
||||
that.steadyList = that.steadyList.concat(list);
|
||||
}
|
||||
if(that.steadyList.length == 0){
|
||||
that.noSteady = '暂无稳态越限消息'
|
||||
}
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.steadyPage--;
|
||||
that.querySteadyList();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
countSteadyNum(list,type){
|
||||
var that = this;
|
||||
if(type==1){
|
||||
for(var i=0;i<list.length;i++){
|
||||
// if(list[i].state==0&&that.steadyNum!='99+'){
|
||||
// that.steadyNum++;
|
||||
// }
|
||||
list[i].showTime = that.formatTime(list[i].timeID);
|
||||
}
|
||||
}else{
|
||||
var num=0
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(list[i].state==0){
|
||||
num++;
|
||||
}
|
||||
that.steadyNum=num;
|
||||
}
|
||||
}
|
||||
that.setAllNum();
|
||||
// if(that.steadyNum>99){
|
||||
// that.steadyNum='99+'
|
||||
// }
|
||||
return list;
|
||||
},
|
||||
judgeSteadyNum(){
|
||||
var that= this;
|
||||
if(that.steadyNum>99){
|
||||
that.steadyShowNum='99+'
|
||||
}else{
|
||||
that.steadyShowNum=that.steadyNum
|
||||
}
|
||||
},
|
||||
//终端
|
||||
queryTerminalList(){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/deviceMsg/deviceMsgList',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
page:that.terminalPage++,
|
||||
num:20
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.terminalNum=res.data.unstate;
|
||||
that.judgeTerminalNum();
|
||||
var list =[];
|
||||
list= that.countTerminalNum(eval(res.data.data),1);
|
||||
if(that.terminalPage==2){
|
||||
that.terminalList=[]
|
||||
}
|
||||
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
|
||||
that.terminalList = that.terminalList.concat(list);
|
||||
}
|
||||
if(that.terminalList.length==0){
|
||||
that.noTerminal='暂无终端越限消息'
|
||||
}
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.terminalPage--;
|
||||
that.queryTerminalList();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
countTerminalNum(list,type){
|
||||
var that = this;
|
||||
if(type==1){
|
||||
for(var i=0;i<list.length;i++){
|
||||
// if(list[i].state==0&&that.terminalNum!='99+'){
|
||||
// that.terminalNum++;
|
||||
// }
|
||||
list[i].showTime = that.formatTime(list[i].timeID);
|
||||
}
|
||||
}else{
|
||||
var num=0
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(list[i].state==0){
|
||||
num++;
|
||||
}
|
||||
that.terminalNum=num;
|
||||
}
|
||||
}
|
||||
// if(that.terminalNum>99){
|
||||
// that.terminalNum='99+'
|
||||
// }
|
||||
that.setAllNum();
|
||||
return list;
|
||||
},
|
||||
judgeTerminalNum(){
|
||||
var that= this;
|
||||
if(that.terminalNum>99){
|
||||
that.terminalShowNum='99+'
|
||||
}else{
|
||||
that.terminalShowNum=that.terminalNum
|
||||
}
|
||||
},
|
||||
setAllNum(){
|
||||
var that = this;
|
||||
var allNum=parseInt(that.steadyNum)+parseInt(that.terminalNum)+parseInt(that.transientNum);
|
||||
// console.log("setAllNum")
|
||||
uni.setStorageSync("allNum",allNum);
|
||||
if(allNum>99){
|
||||
allNum='99+'
|
||||
}else{
|
||||
allNum=''+allNum
|
||||
}
|
||||
|
||||
if(allNum!=0){
|
||||
uni.setTabBarBadge({
|
||||
index: 0,
|
||||
text: allNum
|
||||
})
|
||||
}else{
|
||||
uni.removeTabBarBadge({
|
||||
index: 0
|
||||
})
|
||||
}
|
||||
},
|
||||
refresh(){
|
||||
this.communicateState();
|
||||
this.transientList=[];
|
||||
this.steadyList=[];
|
||||
this.terminalList=[];
|
||||
this.noTransient = '';
|
||||
this.noSteady = '';
|
||||
this.noTerminal = '';
|
||||
this.steadyNum=0;
|
||||
this.terminalNum=0;
|
||||
this.transientNum=0;
|
||||
this.terminalPage=1;
|
||||
this.steadyPage=1;
|
||||
this.transientPage=1;
|
||||
this.$nextTick(function(){
|
||||
this.queryTransientList();
|
||||
this.querySteadyList();
|
||||
this.queryTerminalList();
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
var that =this;
|
||||
var tabNum = uni.getStorageSync("tabNum");
|
||||
if(tabNum){
|
||||
that.refresh();
|
||||
that.tabNum = tabNum;
|
||||
that.current=tabNum-1;
|
||||
uni.removeStorageSync("tabNum");
|
||||
// if(tabNum==1){
|
||||
// that.transientList=[];
|
||||
// that.transientNum=0;
|
||||
// that.transientPage=1;
|
||||
// that.communicateState();
|
||||
// that.queryTransientList();
|
||||
// }else if(tabNum==2){
|
||||
// that.steadyList=[];
|
||||
// that.steadyNum=0;
|
||||
// that.steadyPage=1;
|
||||
// that.communicateState();
|
||||
// that.querySteadyList();
|
||||
// }else{
|
||||
// that.terminalList=[];
|
||||
// that.terminalNum=0;
|
||||
// that.terminalPage=1;
|
||||
// that.communicateState();
|
||||
// that.queryTerminalList();
|
||||
// }
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
var that = this;
|
||||
// var userInfo = {};
|
||||
// userInfo.userId = '00c37ea1-b5ff-4f35-ba15-51e1c7363e20';
|
||||
// userInfo.roleCode=2;
|
||||
// uni.setStorageSync('userInfo',userInfo);
|
||||
that.queryTransientList();
|
||||
that.querySteadyList();
|
||||
that.queryTerminalList();
|
||||
that.scrollH();
|
||||
uni.$on("tabNum",function(data){
|
||||
that.refresh();
|
||||
that.tabNum=data;
|
||||
that.current=data-1;
|
||||
})
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
this.refresh();
|
||||
setTimeout(function () {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("information.css");
|
||||
</style>
|
||||
47
pages/levelUp/levelUp.css
Normal file
47
pages/levelUp/levelUp.css
Normal file
@@ -0,0 +1,47 @@
|
||||
.levelUp-block{
|
||||
margin: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.levelUp-text{
|
||||
margin-top: 60rpx;
|
||||
color: #333333;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
.levelUp-input{
|
||||
border-bottom: solid 1px rgba(217,217,217,1);
|
||||
margin-top: 60rpx;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
.levelUp-input-ph{
|
||||
color: #9B9B9B;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.levelUp-click{
|
||||
margin-top: 160rpx;
|
||||
width:658rpx;
|
||||
height:80rpx;
|
||||
background:rgba(57,130,252,1);
|
||||
border-radius:20px;
|
||||
color: rgba(108,163,255,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.levelUp-click-high{
|
||||
margin-top: 160rpx;
|
||||
width:658rpx;
|
||||
height:80rpx;
|
||||
background:rgba(57,130,252,1);
|
||||
border-radius:20px;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
115
pages/levelUp/levelUp.vue
Normal file
115
pages/levelUp/levelUp.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg="errorMsg"></back>
|
||||
<view class="levelUp-block">
|
||||
<input type="text" value="" placeholder="请输入6位邀请码" placeholder-class="levelUp-input-ph" class="levelUp-input" confirm-type="done" maxlength="6" @input="inputText"/>
|
||||
<view class="levelUp-click" v-if="levelUpFlag==0">
|
||||
升级
|
||||
</view>
|
||||
<button class="levelUp-click-high" v-else @click="levelUp" :disabled="disabledFlag" :loading="loadingFlag">
|
||||
升级
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'角色升级',
|
||||
errorMsg:'',
|
||||
levelUpFlag:0,
|
||||
content:'',
|
||||
loadingFlag:false,
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
levelUp(){
|
||||
var that= this;
|
||||
if(that.judgeLogin()){
|
||||
that.disabledFlag=true;
|
||||
that.loadingFlag=true;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/roleUpdate',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
devCode:that.cid(),
|
||||
referralCode:that.content
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
if(res.data.resultCode=='10000'){
|
||||
var userInfo= uni.getStorageSync('userInfo');
|
||||
var info = eval(res.data.data);
|
||||
userInfo.roleName = info.roleName;
|
||||
userInfo.roleCode = info.roleCode;
|
||||
uni.setStorageSync('userInfo',userInfo);
|
||||
uni.showToast({
|
||||
icon:'success',
|
||||
title:'升级成功',
|
||||
duration: 2000,
|
||||
mask:true,
|
||||
})
|
||||
setTimeout(function(){
|
||||
uni.switchTab({
|
||||
url:'../me/me'
|
||||
})
|
||||
},2000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
inputText(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length==6){
|
||||
that.levelUpFlag=1;
|
||||
}else{
|
||||
that.levelUpFlag=0;
|
||||
}
|
||||
that.content = e.detail.value;
|
||||
}
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("levelUp.css");
|
||||
</style>
|
||||
199
pages/login/login.css
Normal file
199
pages/login/login.css
Normal file
@@ -0,0 +1,199 @@
|
||||
/* 主体开始 */
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 40rpx;
|
||||
margin-top: 54rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
.login-explain{
|
||||
/* 字体PingFangSC-Regular */
|
||||
font-size: 56rpx;
|
||||
color: #000000;
|
||||
/* color: #3928FC; */
|
||||
}
|
||||
.login-detail{
|
||||
width: 494rpx;
|
||||
height: 40rpx;
|
||||
margin-top: 14rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.login-agreement{
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.login-user{
|
||||
font-size: 28rpx;
|
||||
color: #517FB0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* 手机号开始 */
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
margin-top: 142rpx;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
|
||||
}
|
||||
.phone-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.num{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.pull{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.phone{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.phone-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.password-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.phone-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
/* 手机号结束 */
|
||||
/* 密码开始 */
|
||||
.password-block{
|
||||
margin-top: 54rpx;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.see-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.close{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.see{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
.line{
|
||||
width:1px;
|
||||
height:24rpx;
|
||||
background:rgba(217,217,217,1);
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
/* 密码结束 */
|
||||
/* 记住我开始 */
|
||||
.rememberMe-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 40rpx;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.rememberMe-pic{
|
||||
height: 28rpx;
|
||||
width: 28rpx;
|
||||
}
|
||||
.rememberMe-text{
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
/* 记住我结束 */
|
||||
/* 获取验证码按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 获取验证码按钮结束 */
|
||||
/* 其他方式登录开始 */
|
||||
.login-other{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 34rpx;
|
||||
}
|
||||
.login-account{
|
||||
width: 198rpx;
|
||||
height: 34rpx;
|
||||
color: #507EB0;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.login-fast{
|
||||
width: 102rpx;
|
||||
height: 34rpx;
|
||||
color: #507EB0;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.login-right{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.login-line{
|
||||
width:1px;
|
||||
height:24rpx;
|
||||
background:rgba(217,217,217,1);
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
/* 其他方式登录结束 */
|
||||
/* 介绍 */
|
||||
.introduce-block{
|
||||
margin-top: 462rpx;
|
||||
width: 680rpx;
|
||||
height: 34rpx;
|
||||
color: #D9D9D9;
|
||||
font-size: 24rpx;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
/* 主体结束 */
|
||||
407
pages/login/login.vue
Normal file
407
pages/login/login.vue
Normal file
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<back :errorMsg="errorMsg" :showFlag="showFlag" :backShowFlag="backShowFlag"></back>
|
||||
<view class="content-block">
|
||||
<view class="login-explain">欢迎登录灿能云</view>
|
||||
<view class="login-detail">
|
||||
<view class="login-agreement">登录注册即表示同意</view>
|
||||
<view class="login-user" @click="jumpToUserAgreement">用户协议、</view>
|
||||
<view class="login-user" @click="jumpToPrivacyAgreement">隐私协议</view>
|
||||
</view>
|
||||
|
||||
<view class="phone-block">
|
||||
<view class="num">+86</view>
|
||||
<image class="pull" src="/static/pic/pull.png"></image>
|
||||
<view class="phone">
|
||||
<input class="phone-input" placeholder="输入手机号" placeholder-class="phone-placeholder" type="number" @input="changeClass" maxlength="11" confirm-type="done" :value='phoneNum'/>
|
||||
</view>
|
||||
<view class="reset-block" @click="resetPhoneNum" v-if="resetFlag==1">
|
||||
<image class="phone-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="password-block" v-if="loginType==1">
|
||||
<input type="text" :password="passwordFlag" placeholder="请输入密码" confirm-type="done" placeholder-class="password-placeholder" class="phone-input" @input="changePasswordClass" :value="password" maxlength="18"/>
|
||||
<view class="see-block" v-if="seeFlag==1">
|
||||
<view class="reset-block" @click="reset">
|
||||
<image src="/static/pic/close.png" class="close" ></image>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="reset-block" @click="see(false)" v-if="passwordFlag">
|
||||
<image src="/static/pic/see.png" class="see"></image>
|
||||
</view>
|
||||
<view class="reset-block" @click="see(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rememberMe-block" @click="changeRememberFlag" v-if="loginType==1">
|
||||
<image src="/static/pic/choose.png" class="rememberMe-pic" v-if="rememberFlag==1"></image>
|
||||
<image src="/static/pic/nochoose.png" class="rememberMe-pic" v-else></image>
|
||||
<view class="rememberMe-text">
|
||||
记住密码
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" :loading='loadingFlag' v-if="vercodeFlag==0&&loginType==0">
|
||||
<view class="text">获取验证码</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' v-if="vercodeFlag==1&&loginType==0" @click="getVercode" :disabled="disabledFlag">
|
||||
<view class="textHigh" >获取验证码</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' v-if="vercodeFlag==0&&loginType==1">
|
||||
<view class="text">登录</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' v-if="vercodeFlag==1&&loginType==1" @click="loginIn(phoneNum,password)" :disabled="disabledFlag">
|
||||
<view class="textHigh">登录</view>
|
||||
</button>
|
||||
<view class="login-other" v-if="loginType==0">
|
||||
<view class="login-account" @click="changeLoginType(1)">用账号密码登录</view>
|
||||
<view class="login-fast" @click="jumpToFastlogin">快速注册</view>
|
||||
</view>
|
||||
<view class="login-other" v-if="loginType==1">
|
||||
<view class="login-account" @click="changeLoginType(0)">短信验证码登录</view>
|
||||
<view class="login-right">
|
||||
<view class="login-fast" @click="jumpToForgetPassword">忘记密码</view>
|
||||
<view class="login-line"></view>
|
||||
<view class="login-fast" @click="jumpToFastlogin">快速注册</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="introduce-block">
|
||||
—— 寻电能质量之因,解电能质量之惑,治电能质量之本 ——
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
vercodeFlag:0,
|
||||
loadingFlag:false,
|
||||
phoneNum:'',
|
||||
errorMsg:'',
|
||||
showFlag:0,
|
||||
loginType:1 ,//0-验证码登录 1-账号密码
|
||||
password:'',
|
||||
passwordFlag:true,
|
||||
seeFlag:0,
|
||||
resetFlag:0,
|
||||
backShowFlag:0,
|
||||
rememberFlag:1,
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeRememberFlag(){
|
||||
var that = this;
|
||||
if(that.rememberFlag==0){
|
||||
that.rememberFlag=1;
|
||||
}else{
|
||||
that.rememberFlag=0
|
||||
}
|
||||
},
|
||||
changeClass(e){
|
||||
var that = this;
|
||||
var length = e.detail.value.length;
|
||||
var loginType =that.loginType;
|
||||
if(length>0){
|
||||
that.resetFlag=1
|
||||
that.phoneNum=e.detail.value;
|
||||
}else{
|
||||
that.resetFlag=0;
|
||||
that.phoneNum='';
|
||||
}
|
||||
if(length>=10){
|
||||
if(loginType==0){
|
||||
that.vercodeFlag=1;
|
||||
}else{
|
||||
if(that.password!=null&&that.password!=''){
|
||||
that.vercodeFlag=1;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
that.vercodeFlag=0;
|
||||
}
|
||||
},
|
||||
resetPhoneNum(){
|
||||
this.phoneNum="";
|
||||
this.resetFlag=0;
|
||||
this.vercodeFlag=0;
|
||||
},
|
||||
changePasswordClass(e){
|
||||
var that = this;
|
||||
var length = e.detail.value.length;
|
||||
var phoneNum =that.phoneNum;
|
||||
if(length>0){
|
||||
that.password=e.detail.value;
|
||||
that.seeFlag=1;
|
||||
if(phoneNum!=null&&phoneNum!=''){
|
||||
that.vercodeFlag=1;
|
||||
}
|
||||
}else{
|
||||
that.vercodeFlag=0;
|
||||
that.password='';
|
||||
that.seeFlag=0;
|
||||
}
|
||||
},
|
||||
reset(){
|
||||
this.password='';
|
||||
this.passwordFlag=true;
|
||||
this.seeFlag=0;
|
||||
this.vercodeFlag=0;
|
||||
},
|
||||
see(flag){
|
||||
this.passwordFlag=flag;
|
||||
},
|
||||
getVercode(){
|
||||
var that = this;
|
||||
that.disabledFlag=true;
|
||||
that.loadingFlag=true;
|
||||
if(that.phoneNum.length!=11){
|
||||
that.showFlag=1;
|
||||
that.errorMsg='请检查号码';
|
||||
that.loadingFlag=false;
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
type:0
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.disabledFlag=false;
|
||||
uni.navigateTo({
|
||||
url:'../vercode/vercode?phoneNum='+that.phoneNum,
|
||||
})
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
loginIn(account,password){
|
||||
var that = this;
|
||||
that.loadingFlag=true;
|
||||
that.disabledFlag=true;
|
||||
if(account.length!=11){
|
||||
that.loadingFlag=false;
|
||||
that.showFlag=1;
|
||||
that.errorMsg='请检查号码';
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
return;
|
||||
}
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/login',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:account,
|
||||
devCode:that.cid(),
|
||||
key:password.trim(),
|
||||
type:1
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
if(res.data.resultCode=='10000'){
|
||||
if(that.rememberFlag==1&&that.phoneNum!=null&&that.phoneNum!=undefined&&that.phoneNum!=''&&that.password!=null&&that.password!=undefined&&that.password!=''){
|
||||
uni.setStorageSync("account",that.phoneNum);
|
||||
uni.setStorageSync("password",that.password);
|
||||
}
|
||||
uni.setStorageSync('loginType',1);
|
||||
uni.setStorageSync("loginTime",new Date())
|
||||
var userInfo = eval(res.data.data);
|
||||
userInfo.phoneNum=that.phoneNum;
|
||||
uni.setStorageSync('userInfo',userInfo);
|
||||
that.disabledFlag=false;
|
||||
// console.log(userInfo.userId)
|
||||
uni.switchTab({
|
||||
url:'../information/information',
|
||||
})
|
||||
}else{
|
||||
var msg = '';
|
||||
if(res.data.msg==undefined||res.data.msg==null||res.data.msg==''){
|
||||
msg = '服务器或网络异常'
|
||||
}else{
|
||||
msg = res.data.msg
|
||||
}
|
||||
that.errorMsg=that.showError(res.data.msgCode,msg);
|
||||
that.showFlag = 1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.disabledFlag=false;
|
||||
that.loadingFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '服务器或网络异常',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
changeLoginType(type){
|
||||
var that = this;
|
||||
that.loginType=type;
|
||||
that.loadingFlag=false;
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.password='';
|
||||
that.passwordFlag=false;
|
||||
that.seeFlag=0;
|
||||
that.vercodeFlag=0
|
||||
if(type==0&&that.phoneNum.length>=10){
|
||||
that.vercodeFlag=1
|
||||
}
|
||||
},
|
||||
jumpToForgetPassword(){
|
||||
uni.navigateTo({
|
||||
url:'../forgetPassword/forgetPassword',
|
||||
})
|
||||
},
|
||||
jumpToFastlogin(){
|
||||
uni.navigateTo({
|
||||
url: '../fastLogin/fastLogin',
|
||||
});
|
||||
},
|
||||
jumpToUserAgreement(){
|
||||
uni.navigateTo({
|
||||
url: '../userAgreement/userAgreement',
|
||||
});
|
||||
},
|
||||
jumpToPrivacyAgreement(){
|
||||
uni.navigateTo({
|
||||
url: '../privacyAgreement/privacyAgreement',
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that=this;
|
||||
// var style = plus.navigator.getUiStyle();
|
||||
// console.log(style)
|
||||
// if('dark'==style){
|
||||
// console.log('当前为暗黑模式');
|
||||
// }else{
|
||||
// console.log('当前为普通模式');
|
||||
// }
|
||||
that.getCid();
|
||||
var cid = that.cid();
|
||||
if(cid){
|
||||
var loginTime = uni.getStorageSync("loginTime");
|
||||
if(loginTime){
|
||||
if((new Date()-loginTime)/(1000*24*60*60)>30||(new Date()-loginTime)<0){
|
||||
uni.removeStorageSync("account");
|
||||
uni.removeStorageSync("password");
|
||||
}else{
|
||||
if(uni.getStorageSync("loginType")==1){
|
||||
var account = uni.getStorageSync("account");
|
||||
var password = uni.getStorageSync("password");
|
||||
if(account!=null&&account!=undefined&&account!=''&&password!=null&&password!=undefined&&password!=''){
|
||||
that.phoneNum=account;
|
||||
that.password=password;
|
||||
that.vercodeFlag=1;
|
||||
that.resetFlag=1;
|
||||
that.seeFlag=1;
|
||||
that.passwordFlag=1;
|
||||
that.loginIn(account,password)
|
||||
}
|
||||
}else{
|
||||
if(uni.getStorageSync("userInfo")){
|
||||
uni.switchTab({
|
||||
url:'../information/information'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
setTimeout(function(){
|
||||
var loginTime = uni.getStorageSync("loginTime");
|
||||
if(loginTime){
|
||||
if((new Date()-loginTime)/(1000*24*60*60)>30||(new Date()-loginTime)<0){
|
||||
uni.removeStorageSync("account");
|
||||
uni.removeStorageSync("password");
|
||||
}else{
|
||||
var account = uni.getStorageSync("account");
|
||||
var password = uni.getStorageSync("password");
|
||||
if(account!=null&&account!=undefined&&account!=''&&password!=null&&password!=undefined&&password!=''){
|
||||
that.phoneNum=account;
|
||||
that.password=password;
|
||||
that.vercodeFlag=1;
|
||||
that.resetFlag=1;
|
||||
that.seeFlag=1;
|
||||
that.passwordFlag=1;
|
||||
that.loginIn(account,password)
|
||||
}
|
||||
}
|
||||
}
|
||||
},2000)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("login.css");
|
||||
</style>
|
||||
194
pages/me/me.css
Normal file
194
pages/me/me.css
Normal file
@@ -0,0 +1,194 @@
|
||||
page{
|
||||
background: #F9F9F9;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
/* 上部分开始 */
|
||||
.upper-block{
|
||||
margin-top: 0rpx;
|
||||
height: 472rpx;
|
||||
background: #F9F9F9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.upper-block-done{
|
||||
margin-top: 0rpx;
|
||||
height: 314rpx;
|
||||
background: #F9F9F9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.upper-block-inside{
|
||||
margin-top: 0rpx;
|
||||
height: 472rpx;
|
||||
background-image: url('../../static/pic/background.png');
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.upper-block-inside-done{
|
||||
margin-top: 0rpx;
|
||||
height: 314rpx;
|
||||
background-image: url('../../static/pic/background_done.png');
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.system-block{
|
||||
height: 42rpx;
|
||||
margin-top: 96rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.system-pic{
|
||||
width: 44rpx;
|
||||
height: 42rpx;
|
||||
margin-right: 60rpx;
|
||||
}
|
||||
/* 上部分结束 */
|
||||
/* 个人信息开始 */
|
||||
.role-block{
|
||||
height: 114rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.left-block{
|
||||
width: 114rpx;
|
||||
height: 114rpx;
|
||||
margin-left: 66rpx;
|
||||
}
|
||||
.head-pic{
|
||||
width: 114rpx;
|
||||
height: 114rpx;
|
||||
}
|
||||
.level-pic{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
z-index: 1000;
|
||||
position:absolute;
|
||||
top:230rpx;
|
||||
left:130rpx;
|
||||
}
|
||||
.level-pic-done{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
z-index: 1000;
|
||||
position:absolute;
|
||||
top:218rpx;
|
||||
left:130rpx;
|
||||
}
|
||||
.right-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 48rpx;
|
||||
}
|
||||
.name{
|
||||
font-size: 38rpx;
|
||||
color: #FFFFFFFF;
|
||||
}
|
||||
.info-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.level-block{
|
||||
width:132rpx;
|
||||
height:34rpx;
|
||||
background:rgba(54,106,215,1);
|
||||
border-radius:16rpx;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
color: #CEDEFF;
|
||||
}
|
||||
.phoneNum-block{
|
||||
font-size: 22rpx;
|
||||
color: #CEDEFF;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
.level-up{
|
||||
width: 690rpx;
|
||||
height: 156rpx;
|
||||
border-radius:12rpx;
|
||||
margin: 60rpx 30rpx -10rpx 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
background-image: url('../../static/pic/level_up_background.png');
|
||||
background-size: 100% 100%;
|
||||
background-color: #F9F9F9;
|
||||
}
|
||||
.level-up-done{
|
||||
width: 690rpx;
|
||||
height: 156rpx;
|
||||
margin: 60rpx 30rpx -10rpx 30rpx;
|
||||
}
|
||||
.level-up-pic-block{
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
margin: 22rpx 0rpx 64rpx 40rpx;
|
||||
}
|
||||
.level-up-pic{
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.level-up-text{
|
||||
margin-left: 24rpx;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
background:rgba(255,255,255,1);
|
||||
}
|
||||
.level-up-text-top{
|
||||
width: 128rpx;
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
margin-top: 22rpx;
|
||||
}
|
||||
.level-up-text-bottom{
|
||||
width: 384rpx;
|
||||
height: 34rpx;
|
||||
margin-top: 6rpx;
|
||||
font-size: 24rpx;
|
||||
color:#999999;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.level-up-now{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
font-size: 24rpx;
|
||||
color: #4A4A4A;
|
||||
margin-left: 6rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
/* 个人信息结束 */
|
||||
/* 下半部分开始 */
|
||||
.lower-block{
|
||||
height: 762rpx;
|
||||
background: #F9F9F9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding-top: 36rpx;
|
||||
}
|
||||
/* 下半部分结束 */
|
||||
/* 主体结束 */
|
||||
190
pages/me/me.vue
Normal file
190
pages/me/me.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<!-- 上半部分 -->
|
||||
<view class="upper-block" v-if="roleCode==1">
|
||||
<view class="upper-block-inside">
|
||||
<view class="system-block">
|
||||
<image src="/static/pic/setting.png" class="system-pic" @click="jumpToSetting"></image>
|
||||
</view>
|
||||
<view class="role-block">
|
||||
<view class="left-block">
|
||||
<image class="head-pic" src="/static/pic/head.png"></image>
|
||||
<image class="level-pic" src="/static/pic/level.png"></image>
|
||||
</view>
|
||||
<view class="right-block">
|
||||
<view class="name">{{showName}}</view>
|
||||
<view class="info-block">
|
||||
<view class="level-block">{{roleName}}</view>
|
||||
<view class="phoneNum-block">{{phoneNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="level-up" @click="jumpToLevelUp">
|
||||
<view class="level-up-pic-block">
|
||||
<image src="/static/pic/level_up.png" class="level-up-pic"></image>
|
||||
</view>
|
||||
<view class="level-up-text">
|
||||
<view class="level-up-text-top">
|
||||
角色升级
|
||||
</view>
|
||||
<view class="level-up-text-bottom">
|
||||
填写正确推荐码,即可升级为VIP用户
|
||||
</view>
|
||||
</view>
|
||||
<view class="level-up-now">立即升级</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="upper-block-done" v-else>
|
||||
<view class="upper-block-inside-done">
|
||||
<view class="system-block">
|
||||
<image src="/static/pic/setting.png" class="system-pic" @click="jumpToSetting"></image>
|
||||
</view>
|
||||
<view class="role-block">
|
||||
<view class="left-block">
|
||||
<image class="head-pic" src="/static/pic/head.png"></image>
|
||||
<image class="level-pic-done" src="/static/pic/level.png"></image>
|
||||
</view>
|
||||
<view class="right-block">
|
||||
<view class="name">{{showName}}</view>
|
||||
<view class="info-block">
|
||||
<view class="level-block">{{roleName}}</view>
|
||||
<view class="phoneNum-block">{{phoneNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 下半部分 -->
|
||||
<view class="lower-block">
|
||||
<view class="" @click='jumpToModifyPassword'>
|
||||
<personalModule name='修改密码' imgsrc='/static/pic/modify_password.png' ></personalModule>
|
||||
</view>
|
||||
<view class="" @click='jumpToModifyUserPhoneNum'>
|
||||
<personalModule name='账号绑定手机号码更换' imgsrc='/static/pic/change_phoneNum.png'></personalModule>
|
||||
</view>
|
||||
<view class="" @click='jumpToUserAgreement'>
|
||||
<personalModule name='用户协议' imgsrc='/static/pic/user_agreement.png'></personalModule>
|
||||
</view>
|
||||
<view class="" @click='jumpToSystemIntroduce'>
|
||||
<personalModule name='系统介绍' imgsrc='/static/pic/sys_introduce.png'></personalModule>
|
||||
</view>
|
||||
<view class="" @click='jumpToCompanyIntroduce'>
|
||||
<personalModule name='公司简介' imgsrc='/static/pic/company_introduce.png'></personalModule>
|
||||
</view>
|
||||
<view class="" @click='jumpToSetNewMessage'>
|
||||
<personalModule name='新消息提醒' imgsrc='/static/pic/set_new_message.png'></personalModule>
|
||||
</view>
|
||||
<view class="" @click='jumpToUs'>
|
||||
<personalModule name='关于我们' imgsrc='/static/pic/inner_buy.png'></personalModule>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import personalModule from '../../components/personalModule.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
roleName:'',
|
||||
userId:'',
|
||||
roleCode:1,//0-主用户 1-普通用户 2-vip用户
|
||||
userName:'',
|
||||
showName:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jumpToSetting(){
|
||||
uni.navigateTo({
|
||||
url:'../setting/setting'
|
||||
})
|
||||
},
|
||||
jumpToLevelUp(){
|
||||
uni.navigateTo({
|
||||
url:'../levelUp/levelUp'
|
||||
})
|
||||
},
|
||||
jumpToModifyPassword(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../modifyPasswordSetpassword/modifyPasswordSetpassword'
|
||||
})
|
||||
},
|
||||
jumpToModifyUserPhoneNum(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../modifyUserPhoneNum/modifyUserPhoneNum?phoneNum='+that.phoneNum
|
||||
})
|
||||
},
|
||||
jumpToUserAgreement(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../userAgreement/userAgreement'
|
||||
})
|
||||
},
|
||||
jumpToSystemIntroduce(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../systemIntroduce/systemIntroduce'
|
||||
})
|
||||
},
|
||||
jumpToCompanyIntroduce(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../companyIntroduce/companyIntroduce'
|
||||
})
|
||||
},
|
||||
jumpToSetNewMessage(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../setNewMessage/setNewMessage'
|
||||
})
|
||||
},
|
||||
jumpToUs(){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../us/us'
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
var userInfo=uni.getStorageSync('userInfo');
|
||||
// var userInfo = {};
|
||||
// userInfo.phone='15251711315';
|
||||
// userInfo.userId='00c37ea1-b5ff-4f35-ba15-51e1c7363e20';
|
||||
// userInfo.roleCode=2;
|
||||
that.roleName=userInfo.roleName;
|
||||
that.userId = userInfo.userId;
|
||||
that.phoneNum = userInfo.phone;
|
||||
that.roleCode= userInfo.roleCode;
|
||||
that.userName = userInfo.userName;
|
||||
if(that.userName!=null&&that.userName!=undefined&&that.userName!=''){
|
||||
that.showName=that.userName;
|
||||
}else{
|
||||
that.showName=that.userId.substring(0,15)+'...'
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
var userInfo=uni.getStorageSync('userInfo');
|
||||
if(that.roleCode!=userInfo.roleCode){
|
||||
that.roleName=userInfo.roleName;
|
||||
that.roleCode= userInfo.roleCode;
|
||||
}
|
||||
}
|
||||
},
|
||||
components:{
|
||||
personalModule
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("me.css");
|
||||
</style>
|
||||
93
pages/modifyPassword/modifyPassword.css
Normal file
93
pages/modifyPassword/modifyPassword.css
Normal file
@@ -0,0 +1,93 @@
|
||||
.text_block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 18rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
/* 下一步按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 下一步按钮结束 */
|
||||
149
pages/modifyPassword/modifyPassword.vue
Normal file
149
pages/modifyPassword/modifyPassword.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg='errorMsg'></back>
|
||||
<view class="text_block">
|
||||
<view class="phoneNum">{{text}}</view>
|
||||
<view class="phoneNum">
|
||||
{{phoneNum}}
|
||||
</view>
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="nextFlag==0">
|
||||
<view class="text">下一步</view>
|
||||
</button>
|
||||
<button class="login-vercode" v-if="nextFlag==1" @click="nextPage" :disabled="disabledFlag">
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
phoneNumTrue:'',
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'修改密码',
|
||||
text:'验证码将发送到绑定手机号',
|
||||
vercode:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
that.sendAgainFlag=1
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNumTrue,
|
||||
devCode:that.cid(),
|
||||
type:2
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
nextPage(){
|
||||
uni.navigateTo({
|
||||
url:'../modifyPasswordSetpassword/modifyPasswordSetpassword?phoneNum='+this.phoneNumTrue
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.phoneNumTrue = e.phoneNum;
|
||||
this.phoneNum = e.phoneNum.substr(0,3)+'****'+e.phoneNum.substr(7,11);
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("modifyPassword.css");
|
||||
</style>
|
||||
136
pages/modifyPasswordSetpassword/modifyPasswordSetpassword.css
Normal file
136
pages/modifyPasswordSetpassword/modifyPasswordSetpassword.css
Normal file
@@ -0,0 +1,136 @@
|
||||
/* 主体开始 */
|
||||
.setNew-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0rpx 40rpx 0rpx 40rpx;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.text-top{
|
||||
font-size: 30rpx;
|
||||
color:rgba(51,51,51,1);
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.password-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px rgba(217,217,217,1);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.password-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.password-placeholder-input{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.see-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.see{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
.text-bottom{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
/* 验证码开始 */
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 18rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
font-weight:400;
|
||||
}
|
||||
/* 验证码结束 */
|
||||
/* 登录按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 登录按钮结束 */
|
||||
/* 主体结束 */
|
||||
299
pages/modifyPasswordSetpassword/modifyPasswordSetpassword.vue
Normal file
299
pages/modifyPasswordSetpassword/modifyPasswordSetpassword.vue
Normal file
@@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg="errorMsg"></back>
|
||||
<view class="setNew-block">
|
||||
<view class="text-top">请设置新的登录密码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="6-18位, 不能与旧密码相同" placeholder-class="password-placeholder-input" :password="passwordFlag" :value='password' @input="setPassword" maxlength="18"/>
|
||||
<block v-if="seeFlag==1">
|
||||
<view class="see-block" @click="see(false)" v-if="passwordFlag">
|
||||
<image src="/static/pic/see.png" class="see" ></image>
|
||||
</view>
|
||||
<view class="see-block" @click="see(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see" ></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="text-top">再次确认密码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="6-18位, 不能与旧密码相同" placeholder-class="password-placeholder-input" :password="againFlag" :value='again' @input="setAgain" maxlength="18"/>
|
||||
<block v-if="seeAgainFlag==1">
|
||||
<view class="see-block" @click="seeAgain(false)" v-if="againFlag">
|
||||
<image src="/static/pic/see.png" class="see" ></image>
|
||||
</view>
|
||||
<view class="see-block" @click="seeAgain(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="doneFlag==0">
|
||||
<view class="text">完成</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' :disabled="disabledFlag" v-if="doneFlag==1" @click="complete">
|
||||
<view class="textHigh">完成</view>
|
||||
</button>
|
||||
<view class="text-bottom">
|
||||
说明:密码长度为6-18位
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'修改密码',
|
||||
phoneNum:'',
|
||||
passwordFlag:true,
|
||||
againFlag:true,
|
||||
password:'',
|
||||
again:'',
|
||||
seeFlag:0,
|
||||
seeAgainFlag:0,
|
||||
loadingFlag:false,
|
||||
disabledFlag:false,
|
||||
doneFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
resetFlag:0,
|
||||
vercode:'',
|
||||
second:60,
|
||||
errorMsg:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
setPassword(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeFlag=1;
|
||||
that.password=e.detail.value.trim();
|
||||
if(e.detail.value.trim().length>=6&&that.again.trim().length>=6){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeFlag=0;
|
||||
that.password='';
|
||||
}
|
||||
},
|
||||
setAgain(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeAgainFlag=1;
|
||||
that.again=e.detail.value.trim();
|
||||
if(e.detail.value.trim().length>=6&&that.password.trim().length>=6){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeAgainFlag=0;
|
||||
that.again='';
|
||||
}
|
||||
},
|
||||
see(flag){
|
||||
this.passwordFlag=flag;
|
||||
},
|
||||
seeAgain(flag){
|
||||
this.againFlag=flag;
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.sendAgainFlag=1
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
type:2
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.sendAgainFlag=0
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
that.sendAgainFlag=0
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
complete(){
|
||||
var that = this;
|
||||
that.disabledFlag=true;
|
||||
if(that.judgeLogin()){
|
||||
var password = that.password;
|
||||
var again = that.again;
|
||||
if(password.trim().length>=6&&again.trim().length>=6&&password.trim()==again.trim()&&that.vercode!=''){
|
||||
uni.showLoading({
|
||||
title:'加载中',
|
||||
mask:true,
|
||||
success() {
|
||||
uni.request({
|
||||
url:that.serverUrl+'/user/modifyPsd',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
password:password.trim(),
|
||||
code:that.vercode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
uni.showToast({
|
||||
title: '修改完成',
|
||||
icon:'success',
|
||||
duration: 2000,
|
||||
mask:true
|
||||
});
|
||||
setTimeout(function () {
|
||||
uni.clearStorageSync();
|
||||
that.disabledFlag=false;
|
||||
uni.redirectTo({
|
||||
url:'../login/login'
|
||||
})
|
||||
},2000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '设置密码失败',
|
||||
content: '两次输入的密码不相同或者还未输入验证码',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
var that =this;
|
||||
if(that.judgeLogin()){
|
||||
that.phoneNum=uni.getStorageSync('userInfo').phone;
|
||||
}
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("modifyPasswordSetpassword.css");
|
||||
</style>
|
||||
93
pages/modifyUserPhoneNum/modifyUserPhoneNum.css
Normal file
93
pages/modifyUserPhoneNum/modifyUserPhoneNum.css
Normal file
@@ -0,0 +1,93 @@
|
||||
.text_block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 18rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
/* 下一步按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 下一步按钮结束 */
|
||||
200
pages/modifyUserPhoneNum/modifyUserPhoneNum.vue
Normal file
200
pages/modifyUserPhoneNum/modifyUserPhoneNum.vue
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg='errorMsg'></back>
|
||||
<view class="text_block">
|
||||
<view class="phoneNum">{{text}}</view>
|
||||
<view class="phoneNum">
|
||||
{{phoneNum}}
|
||||
</view>
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="nextFlag==0">
|
||||
<view class="text">下一步</view>
|
||||
</button>
|
||||
<button class="login-vercode" v-if="nextFlag==1" @click="nextPage" :disabled="disabledFlag" :loading="loadingFlag">
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
phoneNumTrue:'',
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'账号绑定手机号更换',
|
||||
text:'验证码将发送到绑定手机号',
|
||||
vercode:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
loadingFlag:false,
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.sendAgainFlag=1
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:uni.getStorageSync('userInfo').phone,
|
||||
devCode:that.cid(),
|
||||
type:5
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.sendAgainFlag=0
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
that.sendAgainFlag=0
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
nextPage(){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
that.disabledFlag=true;
|
||||
that.loadingFlag=true;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/comfirmCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:uni.getStorageSync('userInfo').phone,
|
||||
devCode:that.cid(),
|
||||
code:that.vercode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.disabledFlag=false;
|
||||
uni.navigateTo({
|
||||
url:'../modifyUserPhoneNumSetPhoneNum/modifyUserPhoneNumSetPhoneNum'
|
||||
})
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
that.disabledFlag=false;
|
||||
that.loadingFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.phoneNum = e.phoneNum.substr(0,3)+'****'+e.phoneNum.substr(7,11);
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("modifyUserPhoneNum.css");
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
/* 主体开始 */
|
||||
.setNew-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0rpx 40rpx 0rpx 40rpx;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.text-top{
|
||||
font-size: 30rpx;
|
||||
color:rgba(51,51,51,1);
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.password-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px rgba(217,217,217,1);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.password-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.password-placeholder-input{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.see-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.see{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
.text-bottom{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
/* 获取验证码按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 18rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
/* 获取验证码按钮结束 */
|
||||
/* 主体结束 */
|
||||
@@ -0,0 +1,275 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg='errorMsg'></back>
|
||||
<view class="setNew-block">
|
||||
<view class="text-top">请设置新的手机号码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="请输入手机号" placeholder-class="password-placeholder-input" :value='password' @input="setPassword" type="number" maxlength="11"/>
|
||||
</view>
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="doneFlag==0">
|
||||
<view class="text">更换</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' :disabled="disabledFlag" v-if="doneFlag==1" @click="complete">
|
||||
<view class="textHigh" >更换</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'账号绑定手机号更换',
|
||||
phoneNum:'',
|
||||
passwordFlag:true,
|
||||
againFlag:true,
|
||||
password:'',
|
||||
again:'',
|
||||
seeFlag:0,
|
||||
seeAgainFlag:0,
|
||||
loadingFlag:false,
|
||||
doneFlag:0,
|
||||
vercode:'',
|
||||
resetFlag:0,
|
||||
nextFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPassword(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeFlag=1;
|
||||
that.password=e.detail.value;
|
||||
if(e.detail.value.length>10){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeFlag=0;
|
||||
that.password='';
|
||||
}
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.sendAgainFlag=1
|
||||
if(that.password.length==11){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.password,
|
||||
devCode:that.cid(),
|
||||
type:4
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.sendAgainFlag=0
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
that.sendAgainFlag=0
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
that.errorMsg='请检查手机号';
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.sendAgainFlag=0
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
setAgain(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeAgainFlag=1;
|
||||
that.again=e.detail.value;
|
||||
if(e.detail.value.length>10&&that.password.length>10){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeAgainFlag=0;
|
||||
that.again='';
|
||||
}
|
||||
},
|
||||
see(flag){
|
||||
this.passwordFlag=flag;
|
||||
},
|
||||
seeAgain(flag){
|
||||
this.againFlag=flag;
|
||||
},
|
||||
complete(){
|
||||
var that = this;
|
||||
that.disabledFlag=true;
|
||||
if(that.judgeLogin()){
|
||||
var password = that.password;
|
||||
var again = that.again;
|
||||
if(password.length>=10&&that.vercode!=''){
|
||||
uni.showLoading({
|
||||
title:'加载中',
|
||||
mask:true,
|
||||
success() {
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/rebindPhone',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
phoneNew:that.password,
|
||||
devCode:that.cid(),
|
||||
code:that.vercode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
uni.showToast({
|
||||
title: '更换完成',
|
||||
icon:'success',
|
||||
duration: 2000,
|
||||
mask:true
|
||||
});
|
||||
setTimeout(function () {
|
||||
uni.clearStorageSync();
|
||||
that.disabledFlag=false;
|
||||
uni.redirectTo({
|
||||
url:'../login/login'
|
||||
})
|
||||
},2000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.errorMsg='请检查输入';
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("modifyUserPhoneNumSetPhoneNum.css");
|
||||
</style>
|
||||
72
pages/myApply/myApply.css
Normal file
72
pages/myApply/myApply.css
Normal file
@@ -0,0 +1,72 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.data-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 20rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.content-line{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 72rpx;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.content-line-one-left{
|
||||
color: #303233;
|
||||
font-size: 15px;
|
||||
white-space: nowrap;
|
||||
font-weight: 600;
|
||||
}
|
||||
.content-line-one-right{
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.content-line-left{
|
||||
font-size: 15px;
|
||||
color: #303233;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.content-line-right{
|
||||
font-size: 13px;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* 分割线 */
|
||||
.line{
|
||||
background: #F0F0F0;
|
||||
height: 20rpx;
|
||||
}
|
||||
.line-fine{
|
||||
background: #F0F0F0;
|
||||
height: 2rpx;
|
||||
}
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
173
pages/myApply/myApply.vue
Normal file
173
pages/myApply/myApply.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="data-block" v-if="errorFlag==0">
|
||||
<view class="content-block" v-for="report in reportList">
|
||||
<view class="content-line">
|
||||
<view class="content-line-one-left">
|
||||
{{report.name}}
|
||||
</view>
|
||||
<view class="content-line-one-right">
|
||||
{{report.dateString}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line-fine">
|
||||
|
||||
</view>
|
||||
<view class="content-line">
|
||||
<view class="content-line-left">
|
||||
报告类型
|
||||
</view>
|
||||
<view class="content-line-right">
|
||||
{{report.type}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="line-fine">
|
||||
|
||||
</view>
|
||||
<view class="content-line">
|
||||
<view class="content-line-left">
|
||||
营销人员
|
||||
</view>
|
||||
<view class="content-line-right">
|
||||
{{marketingUserInfo.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line-fine">
|
||||
|
||||
</view>
|
||||
<view class="content-line">
|
||||
<view class="content-line-left">
|
||||
联系方式
|
||||
</view>
|
||||
<view class="content-line-right">
|
||||
{{marketingUserInfo.phone}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line-fine">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'我的申请',
|
||||
systemType:0,
|
||||
pageNum:1,
|
||||
errorFlag:0,
|
||||
marketingUserInfo:{},
|
||||
reportList:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryList(){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/report/reportList',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
systemType:that.systemType,
|
||||
reportType:5,
|
||||
page:that.pageNum++,
|
||||
num:20
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
var list = that.addDateString(eval(res.data.data));
|
||||
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
|
||||
that.reportList = that.reportList.concat(list);
|
||||
}
|
||||
}else{
|
||||
that.errorFlag=1
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.errorFlag=1
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
queryMarketingUserInfo(){
|
||||
var that =this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/report/marketingUserInfo',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.marketingUserInfo = eval(res.data.data)
|
||||
}else{
|
||||
that.errorFlag=1
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
that.errorFlag=1
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
addDateString(list){
|
||||
var that=this;
|
||||
for(var i=0;i<list.length;i++){
|
||||
list[i].dateString = that.formatTime(list[i].startTime)+'至'+that.formatTime(list[i].endTime);
|
||||
if(((list[i].endTime-list[i].startTime)/(1000*24*60*60))>100){
|
||||
list[i].type='年报'
|
||||
}else{
|
||||
list[i].type='季报'
|
||||
}
|
||||
}
|
||||
return list;
|
||||
},
|
||||
retry(){
|
||||
this.pageNum=1;
|
||||
this.marketingUserInfo={};
|
||||
this.reportList=[];
|
||||
this.queryMarketingUserInfo();
|
||||
this.queryList();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.systemType=e.systemType
|
||||
this.queryMarketingUserInfo();
|
||||
this.queryList();
|
||||
},
|
||||
onReachBottom(){
|
||||
this.queryList();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("myApply.css");
|
||||
</style>
|
||||
11
pages/preview/preview.css
Normal file
11
pages/preview/preview.css
Normal file
@@ -0,0 +1,11 @@
|
||||
.preview-block{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.preview-pic{
|
||||
width: 1334rpx;
|
||||
height: 750rpx;
|
||||
}
|
||||
33
pages/preview/preview.vue
Normal file
33
pages/preview/preview.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<view class="preview-block">
|
||||
<image src="/static/pic/background.png" class="preview-pic" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url:'',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
this.url=e.url;
|
||||
// #ifdef APP-PLUS
|
||||
plus.screen.lockOrientation('landscape-primary');
|
||||
// #endif
|
||||
},
|
||||
onUnload() {
|
||||
// #ifdef APP-PLUS
|
||||
plus.screen.lockOrientation('portrait-primary');
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("preview.css");
|
||||
</style>
|
||||
30
pages/privacyAgreement/privacyAgreement.vue
Normal file
30
pages/privacyAgreement/privacyAgreement.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<web-view src="http://112.4.156.196:8040/shiningCloud/business/privacyAgreement"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showFlag:0,
|
||||
pageNameFlag:1,
|
||||
pageName:'隐私协议',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
360
pages/report/report.css
Normal file
360
pages/report/report.css
Normal file
@@ -0,0 +1,360 @@
|
||||
/* page{
|
||||
background: #F0F0F0;
|
||||
} */
|
||||
.title-padding{
|
||||
height: var(--status-bar-height);
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.report-body{
|
||||
background: #F0F0F0;
|
||||
height: 100%;
|
||||
}
|
||||
/* 分割线 */
|
||||
.line{
|
||||
background: #F0F0F0;
|
||||
height: 20rpx;
|
||||
}
|
||||
.line-fine{
|
||||
background: #F0F0F0;
|
||||
height: 2rpx;
|
||||
}
|
||||
/* 标题开始 */
|
||||
.report-title{
|
||||
background: #FFFFFF 100%;
|
||||
height: 88rpx;
|
||||
}
|
||||
.report-title-text{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
color: #171F24;
|
||||
height: 88rpx;
|
||||
}
|
||||
/* 标题结束 */
|
||||
/* tab选项开始 */
|
||||
.report-tab{
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
background: #FFFFFF 100%;
|
||||
margin-top: 2rpx;
|
||||
position: relative;
|
||||
}
|
||||
.tab-noread-num-transient{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background-image: url('../../static/pic/number.png');
|
||||
background-size: 100% 100%;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 204rpx;
|
||||
top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-noread-num-steady{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background-image: url('../../static/pic/number.png');
|
||||
background-size: 100% 100%;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 454rpx;
|
||||
top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-noread-num-terminal{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
background-image: url('../../static/pic/number.png');
|
||||
background-size: 100% 100%;
|
||||
font-size:20rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 704rpx;
|
||||
top: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-click{
|
||||
font-size: 28rpx;
|
||||
color: #3982FC;
|
||||
white-space: nowrap;
|
||||
border-bottom: solid 2rpx #3982FC;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 64rpx;
|
||||
}
|
||||
/* tab选项结束 */
|
||||
/* 日期选择开始 */
|
||||
.date-block{
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 102rpx;
|
||||
}
|
||||
.chooseDate-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.date-pic{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.date-text{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
margin-left: 14rpx;
|
||||
white-space: nowrap;
|
||||
font-weight:500;
|
||||
}
|
||||
.date-choose{
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
.date-choose-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: absolute;
|
||||
border-top: solid 1px #D9D9D9;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
z-index: 1000;
|
||||
background: #FFFFFF;
|
||||
width: 100%;
|
||||
}
|
||||
.date-choose-line-one{
|
||||
font-size: 15px;
|
||||
color: #303233;
|
||||
height: 42rpx;
|
||||
margin-top: 28rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.date-choose-line-one-choose{
|
||||
font-size: 15px;
|
||||
color: #3982FC;
|
||||
height: 42rpx;
|
||||
margin-top: 28rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.date-choose-line-two{
|
||||
font-size: 15px;
|
||||
color: #303233;
|
||||
height: 42rpx;
|
||||
margin-top: 28rpx;
|
||||
margin-left: 40rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
.date-choose-line-two-choose{
|
||||
font-size: 15px;
|
||||
color: #3982FC;
|
||||
height: 42rpx;
|
||||
margin-top: 28rpx;
|
||||
margin-left: 40rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
.date-choose-line-three{
|
||||
font-size: 15px;
|
||||
color: #303233;
|
||||
height: 42rpx;
|
||||
margin-left: 40rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
.date-choose-line-three-choose{
|
||||
font-size: 15px;
|
||||
color: #3982FC;
|
||||
height: 42rpx;
|
||||
margin-left: 40rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
.time-block{
|
||||
font-size: 30rpx;
|
||||
margin-left: 70rpx;
|
||||
}
|
||||
.sroll-block-line-one{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 122rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
border-bottom: solid #F0F0F0 6px;
|
||||
}
|
||||
.sroll-block-line-one-text{
|
||||
margin-right: 14rpx;
|
||||
height: 88rpx;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.sroll-block-line-one-text-second{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.sroll-block-line-one-text-second-right{
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.sroll-block-line-one-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
/* 日期选择结束 */
|
||||
/* 内容开始 */
|
||||
.scroll-view-block{
|
||||
}
|
||||
.content-block{
|
||||
height: 240rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.content-line-one{
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
background: #FFFFFF;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.content-line-one-text1{
|
||||
font-size: 30rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.content-line-one-text2{
|
||||
font-size: 30rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.content-line-one-pic{
|
||||
width: 44rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.content-line-two{
|
||||
height:4rpx;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.content-line-three{
|
||||
background: #FFFFFF;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding:2rpx 40rpx ;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 内容结束 */
|
||||
/* 申请开始 */
|
||||
.apply-block{
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.apply-line{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.apply-line-left{
|
||||
width: 150rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.apply-line-center{
|
||||
width: 446rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
text-align: right;
|
||||
}
|
||||
.apply-line-right{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.apply-button1{
|
||||
margin: 236rpx 46rpx 0 46rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
height: 80rpx;
|
||||
width: 658rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.apply-button2{
|
||||
margin:34rpx 46rpx 0 46rpx;
|
||||
border: 1px solid #3982FC;
|
||||
border-radius: 20px;
|
||||
height: 80rpx;
|
||||
width: 658rpx;
|
||||
color: #3982FC;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 申请结束 */
|
||||
.no-data{
|
||||
color: #FF5059;
|
||||
/* background: #FFFFFF; */
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* 主体结束 */
|
||||
1098
pages/report/report.vue
Normal file
1098
pages/report/report.vue
Normal file
File diff suppressed because it is too large
Load Diff
21
pages/setNewMessage/setNewMessage.css
Normal file
21
pages/setNewMessage/setNewMessage.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/* 主体开始 */
|
||||
.body-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.each-block{
|
||||
height: 100rpx;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.each-text{
|
||||
color: #303233;
|
||||
white-space: nowrap;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
/* 主体结束 */
|
||||
200
pages/setNewMessage/setNewMessage.vue
Normal file
200
pages/setNewMessage/setNewMessage.vue
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="body-block">
|
||||
<view class="each-block">
|
||||
<view class="each-text">
|
||||
暂态消息
|
||||
</view>
|
||||
<switch class="each-switch" :checked="transientFlag" @change="changeTransientFlag"></switch>
|
||||
</view>
|
||||
<view class="each-block">
|
||||
<view class="each-text">
|
||||
稳态越限消息
|
||||
</view>
|
||||
<switch class="each-switch" :checked="steadyFlag" @change="changeSteadyFlag"></switch>
|
||||
</view>
|
||||
<view class="each-block">
|
||||
<view class="each-text">
|
||||
终端消息
|
||||
</view>
|
||||
<switch class="each-switch" :checked="terminalFlag" @change="changeTerminalFlag"></switch>
|
||||
</view>
|
||||
<view class="each-block">
|
||||
<view class="each-text">
|
||||
系统消息
|
||||
</view>
|
||||
<switch class="each-switch" :checked="systemFlag" @change="changeSystemFlag"></switch>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'新消息提醒',
|
||||
transientFlag:true,
|
||||
steadyFlag:true,
|
||||
terminalFlag:true,
|
||||
systemFlag:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeTransientFlag(e){
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
});
|
||||
this.transientFlag = e.detail.value;
|
||||
this.setFlag(1,this.transientFlag);
|
||||
},
|
||||
changeSteadyFlag(e){
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
});
|
||||
this.steadyFlag = e.detail.value;
|
||||
this.setFlag(2,this.steadyFlag);
|
||||
},
|
||||
changeTerminalFlag(e){
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
});
|
||||
this.terminalFlag = e.detail.value;
|
||||
this.setFlag(3,this.terminalFlag);
|
||||
},
|
||||
changeSystemFlag(e){
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
});
|
||||
this.systemFlag = e.detail.value;
|
||||
this.setFlag(4,this.systemFlag);
|
||||
},
|
||||
setFlag(flagName,flag){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/msgSet',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
eventInfo:that.transientFlag?1:0,
|
||||
targetInfo:that.steadyFlag?1:0,
|
||||
deviceInfo:that.terminalFlag?1:0,
|
||||
systemInfo:that.systemFlag?1:0
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
return;
|
||||
}else{
|
||||
var f=true;
|
||||
if(flag){
|
||||
f=false;
|
||||
}else{
|
||||
f=true;
|
||||
}
|
||||
if(flagName==1){
|
||||
this.transientFlag=f;
|
||||
}else if(flagName==2){
|
||||
this.steadyFlag=f;
|
||||
}else if(flagName==3){
|
||||
this.terminalFlag=f;
|
||||
}else{
|
||||
this.systemFlag=f;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
queryFlag(){
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/getMsg',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId,
|
||||
devCode:that.cid()
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
var msg= eval(res.data.data);
|
||||
that.transientFlag=msg.eventInfo==1?true:false;
|
||||
that.steadyFlag=msg.targetInfo==1?true:false;
|
||||
that.terminalFlag=msg.deviceInfo==1?true:false;
|
||||
that.systemFlag=msg.systemInfo==1?true:false;
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.transientPage--;
|
||||
that.queryTransientList();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.queryFlag();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("setNewMessage.css");
|
||||
</style>
|
||||
136
pages/setNewPassword/setNewPassword.css
Normal file
136
pages/setNewPassword/setNewPassword.css
Normal file
@@ -0,0 +1,136 @@
|
||||
/* 主体开始 */
|
||||
.setNew-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0rpx 40rpx 0rpx 40rpx;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.text-top{
|
||||
font-size: 30rpx;
|
||||
color:rgba(51,51,51,1);
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.password-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px rgba(217,217,217,1);
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.password-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.password-placeholder-input{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.see-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.see{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
.text-bottom{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
/* 验证码开始 */
|
||||
.phone-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
width: 670rpx;
|
||||
align-items: flex-end;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.phoneNum{
|
||||
font-size: 32rpx;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
}
|
||||
.vercode{
|
||||
margin-left: 10rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.vercode-placeholder{
|
||||
color:#CCCCCC;
|
||||
font-size:30rpx;
|
||||
}
|
||||
.vercode-input{
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.reset-block{
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.vercode-pic{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.vercode-button{
|
||||
width: 150rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(57,130,252,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
.vercode-button-send{
|
||||
width: 160rpx;
|
||||
height: 48rpx;
|
||||
font-size: 18rpx;
|
||||
border-radius:12px;
|
||||
color:rgba(255,255,255,1);
|
||||
background: rgba(217,217,217,1);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 22rpx;
|
||||
font-weight:400;
|
||||
}
|
||||
/* 验证码结束 */
|
||||
/* 登录按钮开始 */
|
||||
.login-vercode{
|
||||
width: 658rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 80rpx;
|
||||
background: #3982FC;
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
color: #6CA3FF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.textHigh{
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
/* 登录按钮结束 */
|
||||
/* 主体结束 */
|
||||
291
pages/setNewPassword/setNewPassword.vue
Normal file
291
pages/setNewPassword/setNewPassword.vue
Normal file
@@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName' :errorMsg="errorMsg"></back>
|
||||
<view class="setNew-block">
|
||||
<view class="text-top">请设置新的登录密码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="6-18位, 不能与旧密码相同" placeholder-class="password-placeholder-input" :password="passwordFlag" :value='password' @input="setPassword" maxlength="18"/>
|
||||
<block v-if="seeFlag==1">
|
||||
<view class="see-block" @click="see(false)" v-if="passwordFlag">
|
||||
<image src="/static/pic/see.png" class="see" ></image>
|
||||
</view>
|
||||
<view class="see-block" @click="see(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see" ></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="text-top">再次确认密码</view>
|
||||
<view class="password-block">
|
||||
<input class="password-input" placeholder="6-18位, 不能与旧密码相同" placeholder-class="password-placeholder-input" :password="againFlag" :value='again' @input="setAgain" maxlength="18"/>
|
||||
<block v-if="seeAgainFlag==1">
|
||||
<view class="see-block" @click="seeAgain(false)" v-if="againFlag">
|
||||
<image src="/static/pic/see.png" class="see" ></image>
|
||||
</view>
|
||||
<view class="see-block" @click="seeAgain(true)" v-else>
|
||||
<image src="/static/pic/see_close.png" class="see"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="text-bottom">
|
||||
说明:密码长度为6-18位
|
||||
</view>
|
||||
<view class="phone-block">
|
||||
<view class="vercode">
|
||||
<input class="vercode-input" placeholder="请输入验证码" :value="vercode" placeholder-class="vercode-placeholder" type="number" @input="changeVercode" maxlength="6" confirm-type="done"/>
|
||||
</view>
|
||||
<view class="reset-block" @click="reset" v-if="resetFlag==1">
|
||||
<image class="vercode-pic" src="/static/pic/close.png"></image>
|
||||
</view>
|
||||
<button class="vercode-button" v-if="sendAgainFlag==0" @click="sendVercodeAgain">
|
||||
{{sendAgain}}
|
||||
</button>
|
||||
<view class="vercode-button-send" v-if="sendAgainFlag==1">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
</view>
|
||||
<button class="login-vercode" v-if="doneFlag==0">
|
||||
<view class="text">完成</view>
|
||||
</button>
|
||||
<button class="login-vercode" :loading='loadingFlag' v-if="doneFlag==1" @click="complete" :disabled="disabledFlag">
|
||||
<view class="textHigh">完成</view>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'忘记密码',
|
||||
phoneNum:'',
|
||||
passwordFlag:true,
|
||||
againFlag:true,
|
||||
password:'',
|
||||
again:'',
|
||||
seeFlag:0,
|
||||
seeAgainFlag:0,
|
||||
loadingFlag:false,
|
||||
doneFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
resetFlag:0,
|
||||
vercode:'',
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeVercode(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.vercode=e.detail.value;
|
||||
that.resetFlag=1;
|
||||
}else{
|
||||
that.vercode='';
|
||||
that.resetFlag=0;
|
||||
}
|
||||
if(e.detail.value.length==6){
|
||||
that.nextFlag=1
|
||||
}else{
|
||||
that.nextFlag=0
|
||||
}
|
||||
},
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
this.nextFlag=0
|
||||
},
|
||||
setPassword(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeFlag=1;
|
||||
that.password=e.detail.value.trim();
|
||||
if(e.detail.value.trim().length>=6&&that.again.trim().length>=6){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeFlag=0;
|
||||
that.password='';
|
||||
}
|
||||
},
|
||||
setAgain(e){
|
||||
var that = this;
|
||||
if(e.detail.value.length>0){
|
||||
that.seeAgainFlag=1;
|
||||
that.again=e.detail.value.trim();
|
||||
if(e.detail.value.trim().length>=6&&that.password.trim().length>=6){
|
||||
that.doneFlag=1;
|
||||
}else{
|
||||
that.doneFlag=0;
|
||||
}
|
||||
}else{
|
||||
that.seeAgainFlag=0;
|
||||
that.again='';
|
||||
}
|
||||
},
|
||||
see(flag){
|
||||
this.passwordFlag=flag;
|
||||
},
|
||||
seeAgain(flag){
|
||||
this.againFlag=flag;
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.sendAgainFlag=1
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
type:3
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.sendAgain ='重新发送('+that.second-- +"S)";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain ="发送验证码";
|
||||
that.second=60;
|
||||
that.sendAgainFlag=0
|
||||
},61000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.sendAgainFlag=0
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
that.sendAgainFlag=0
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
complete(){
|
||||
var that = this;
|
||||
var password = that.password.trim();
|
||||
var again = that.again.trim();
|
||||
that.disabledFlag=true;
|
||||
if(password.trim().length>=6&&again.trim().length>=6&&password.trim()==again.trim()&&that.vercode!=''){
|
||||
uni.showLoading({
|
||||
title:'加载中',
|
||||
mask:true,
|
||||
success() {
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/resetPsd',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
password:password.trim(),
|
||||
code:that.vercode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if(res.data.resultCode=='10000'){
|
||||
uni.showToast({
|
||||
title: '修改完成',
|
||||
icon:'success',
|
||||
duration: 2000,
|
||||
mask:true
|
||||
});
|
||||
setTimeout(function () {
|
||||
that.disabledFlag=false;
|
||||
uni.switchTab({
|
||||
url:'../information/information'
|
||||
})
|
||||
},2000)
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
that.disabledFlag=false;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.hideLoading();
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '设置密码失败',
|
||||
content: '两次密码不相同或者验证码还未输入',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.phoneNum=e.phoneNum;
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("setNewPassword.css");
|
||||
</style>
|
||||
16
pages/setting/setting.css
Normal file
16
pages/setting/setting.css
Normal file
@@ -0,0 +1,16 @@
|
||||
.option-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
|
||||
}
|
||||
.exit-block{
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color:#303233;
|
||||
border-bottom: solid 1px rgba(240,240,240,1);
|
||||
}
|
||||
50
pages/setting/setting.vue
Normal file
50
pages/setting/setting.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<view class="option-block">
|
||||
<view class="exit-block" @click="exit">退出登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'设置',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exit(){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认退出登录',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.removeStorageSync("account")
|
||||
uni.removeStorageSync("password")
|
||||
uni.removeStorageSync("userInfo")
|
||||
uni.removeStorageSync("loginTime")
|
||||
uni.reLaunch({
|
||||
url:'../login/login'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("setting.css");
|
||||
</style>
|
||||
107
pages/spectrum/spectrum.css
Normal file
107
pages/spectrum/spectrum.css
Normal file
@@ -0,0 +1,107 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.spectrum-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.line-block{
|
||||
height: 94rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
/* tab选项开始 */
|
||||
.tab-block{
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
background: #FFFFFF 100%;
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
.tab{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tab-click{
|
||||
font-size: 28rpx;
|
||||
color: #3982FC;
|
||||
white-space: nowrap;
|
||||
border-bottom: solid 2rpx #3982FC;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* tab选项结束 */
|
||||
/* 画图开始 */
|
||||
.echarts-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.ec-canvas{
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.canvasView{
|
||||
}
|
||||
.legend-block{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #DAA520;
|
||||
}
|
||||
.legend-block-left-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.legend-block-right{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.legend-block-right-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #2E8B57;
|
||||
}
|
||||
.legend-block-right-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 画图结束 */
|
||||
/* 主体结束 */
|
||||
560
pages/spectrum/spectrum.vue
Normal file
560
pages/spectrum/spectrum.vue
Normal file
@@ -0,0 +1,560 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="spectrum-block">
|
||||
<view class="line-block">
|
||||
{{lineInfo.lineName}}
|
||||
</view>
|
||||
<view class="tab-block">
|
||||
<view class="tab-click" v-if="tabNum==1">
|
||||
谐波电压频谱
|
||||
</view>
|
||||
<view class="tab" v-else @click='changeTab(1)'>
|
||||
谐波电压频谱
|
||||
</view>
|
||||
<view class="tab-click" v-if="tabNum==2">
|
||||
谐波电流频谱
|
||||
</view>
|
||||
<view class="tab" v-else @click='changeTab(2)'>
|
||||
谐波电流频谱
|
||||
</view>
|
||||
</view>
|
||||
<swiper :style="{height:scrollHeight}" :current="current" @change="changeTabBySwiper" duration="300" skip-hidden-item-layout="true">
|
||||
<swiper-item>
|
||||
<view class="echarts-block" :style="{height:scrollHeight}">
|
||||
<view class="canvasView" :style="{height:picHeight}">
|
||||
<mpvue-echarts class="ec-canvas" canvasId="line" ref="lineChart" :style="{height:picHeight}"/>
|
||||
</view>
|
||||
<view class="legend-block">
|
||||
<view class="legend-block-left">
|
||||
<view class="legend-block-left-color">
|
||||
|
||||
</view>
|
||||
<view class="legend-block-left-text">
|
||||
国际限值(%)
|
||||
</view>
|
||||
</view>
|
||||
<view class="legend-block-right">
|
||||
<view class="legend-block-right-color">
|
||||
|
||||
</view>
|
||||
<view class="legend-block-right-text">
|
||||
谐波电压含有率(%)
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="echarts-block" :style="{height:scrollHeight}">
|
||||
<view class="canvasView" :style="{height:picHeight}">
|
||||
<mpvue-echarts class="ec-canvas" canvasId="line2" ref="lineChart2" :style="{height:picHeight}"/>
|
||||
</view>
|
||||
<view class="legend-block">
|
||||
<view class="legend-block-left">
|
||||
<view class="legend-block-left-color">
|
||||
|
||||
</view>
|
||||
<view class="legend-block-left-text">
|
||||
国际限值(%)
|
||||
</view>
|
||||
</view>
|
||||
<view class="legend-block-right">
|
||||
<view class="legend-block-right-color">
|
||||
|
||||
</view>
|
||||
<view class="legend-block-right-text">
|
||||
谐波电流幅值(A)
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
import * as echarts from '@/components/echarts/echarts.simple.min.js';
|
||||
import mpvueEcharts from '@/components/mpvue-echarts/src/echarts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lineInfo: {
|
||||
// lineName: '测试监测点',
|
||||
// lineIndex:2161
|
||||
},
|
||||
pageNameFlag: 1,
|
||||
pageName: '谐波频谱',
|
||||
scrollHeight: '',
|
||||
tabNum: 1,
|
||||
option:{},
|
||||
winWidth:0,
|
||||
current:0,
|
||||
picHeight:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrollH() {
|
||||
var that = this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750 / winWidth;
|
||||
var winHeight = sys.windowHeight;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
that.scrollHeight = parseInt((winHeight - statusBarHeight) * winrate - 254) + 'rpx';
|
||||
},
|
||||
changeTab(tabNum) {
|
||||
this.tabNum = tabNum;
|
||||
this.current=tabNum-1;
|
||||
},
|
||||
changeTabBySwiper(e){
|
||||
this.tabNum=e.detail.current+1;
|
||||
this.current=e.detail.current;
|
||||
},
|
||||
getHarmRateV() {
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/realtimeinfo/getHarmRateV',
|
||||
method:'POST',
|
||||
data: {
|
||||
lineIndex:that.lineInfo.lineIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
var list1=[];
|
||||
var list2=[];
|
||||
var result = res.data.data;
|
||||
list1.push(result.harmRateV.v2);
|
||||
list1.push(result.harmRateV.v3);
|
||||
list1.push(result.harmRateV.v4);
|
||||
list1.push(result.harmRateV.v5);
|
||||
list1.push(result.harmRateV.v6);
|
||||
list1.push(result.harmRateV.v7);
|
||||
list1.push(result.harmRateV.v8);
|
||||
list1.push(result.harmRateV.v9);
|
||||
list1.push(result.harmRateV.v10);
|
||||
list1.push(result.harmRateV.v11);
|
||||
list1.push(result.harmRateV.v12);
|
||||
list1.push(result.harmRateV.v13);
|
||||
list1.push(result.harmRateV.v14);
|
||||
list1.push(result.harmRateV.v15);
|
||||
list1.push(result.harmRateV.v16);
|
||||
list1.push(result.harmRateV.v17);
|
||||
list1.push(result.harmRateV.v18);
|
||||
list1.push(result.harmRateV.v19);
|
||||
list1.push(result.harmRateV.v20);
|
||||
list1.push(result.harmRateV.v21);
|
||||
list1.push(result.harmRateV.v22);
|
||||
list1.push(result.harmRateV.v23);
|
||||
list1.push(result.harmRateV.v24);
|
||||
list1.push(result.harmRateV.v25);
|
||||
list2.push(result.vharm.uharm2);
|
||||
list2.push(result.vharm.uharm3);
|
||||
list2.push(result.vharm.uharm4);
|
||||
list2.push(result.vharm.uharm5);
|
||||
list2.push(result.vharm.uharm6);
|
||||
list2.push(result.vharm.uharm7);
|
||||
list2.push(result.vharm.uharm8);
|
||||
list2.push(result.vharm.uharm9);
|
||||
list2.push(result.vharm.uharm10);
|
||||
list2.push(result.vharm.uharm11);
|
||||
list2.push(result.vharm.uharm12);
|
||||
list2.push(result.vharm.uharm13);
|
||||
list2.push(result.vharm.uharm14);
|
||||
list2.push(result.vharm.uharm15);
|
||||
list2.push(result.vharm.uharm16);
|
||||
list2.push(result.vharm.uharm17);
|
||||
list2.push(result.vharm.uharm18);
|
||||
list2.push(result.vharm.uharm19);
|
||||
list2.push(result.vharm.uharm20);
|
||||
list2.push(result.vharm.uharm21);
|
||||
list2.push(result.vharm.uharm22);
|
||||
list2.push(result.vharm.uharm23);
|
||||
list2.push(result.vharm.uharm24);
|
||||
list2.push(result.vharm.uharm25);
|
||||
that.drawVoltage(list1,list2);
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.getHarmRateV();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
drawVoltage(list1, list2) {
|
||||
var that = this ;
|
||||
that.option={
|
||||
// title: {
|
||||
// text: 'Wheater Statistics'
|
||||
// },
|
||||
// tooltip: {
|
||||
// trigger: 'axis',
|
||||
// axisPointer: {
|
||||
// type: 'shadow'
|
||||
// }
|
||||
// },
|
||||
// legend: {
|
||||
// // data:['国际限值(%)','谐波电压含有率(%)']
|
||||
// data: [{
|
||||
// name: '国际限值(%)',
|
||||
// icon: 'triangle',
|
||||
// // 设置文本为红色
|
||||
// textStyle: {
|
||||
// color: 'red'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: '谐波电压含有率(%)',
|
||||
// icon: 'triangle',
|
||||
// // 设置文本为红色
|
||||
// textStyle: {
|
||||
// color: 'red'
|
||||
// }
|
||||
// }]
|
||||
// },
|
||||
// grid: {
|
||||
// top:200
|
||||
// },
|
||||
// toolbox: {
|
||||
|
||||
// },
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '谐波电压含有率(%)',
|
||||
nameGap:30,
|
||||
nameLocation:'center',
|
||||
axisLabel: {
|
||||
formatter: function (value, index) {
|
||||
return value.toFixed(2)
|
||||
},
|
||||
margin:10
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
name:'(次)',
|
||||
nameLocation:'start',
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
data: ['2', '3','4', '5','6', '7','8', '9','10', '11','12', '13','14', '15','16', '17','18', '19','20', '21','21', '23','24', '25'],
|
||||
},{
|
||||
show:false,
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
data: ['2', '3','4', '5','6', '7','8', '9','10', '11','12', '13','14', '15','16', '17','18', '19','20', '21','21', '23','24', '25'],
|
||||
}],
|
||||
series: [{
|
||||
name: '国际限值(%)',
|
||||
type: 'bar',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position:'right'
|
||||
}
|
||||
},
|
||||
data: list2,
|
||||
yAxisIndex:0,
|
||||
itemStyle:{
|
||||
color:'#DAA520',
|
||||
position:'top'
|
||||
},
|
||||
barWidth:'90%',
|
||||
},
|
||||
{
|
||||
name: '谐波电压含有率(%)',
|
||||
type: 'bar',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
textBorderColor: '#333',
|
||||
textBorderWidth: 2,
|
||||
position:'right'
|
||||
}
|
||||
},
|
||||
data: list1,
|
||||
yAxisIndex:1,
|
||||
itemStyle:{
|
||||
color:'#2E8B57'
|
||||
},
|
||||
barWidth:'65%'
|
||||
}
|
||||
]
|
||||
}
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winHeight = sys.windowHeight;
|
||||
var winrate = 750 / winWidth;
|
||||
var picHeight = winHeight-400/winrate;
|
||||
that.picHeight =(picHeight*winrate)+'rpx'
|
||||
let canvas = that.$refs.lineChart.canvas
|
||||
echarts.setCanvasCreator(() => canvas);
|
||||
let lineChart = echarts.init(canvas, null, {
|
||||
width: winWidth,
|
||||
height: picHeight
|
||||
})
|
||||
canvas.setChart(lineChart)
|
||||
lineChart.setOption(that.option)
|
||||
that.$refs.lineChart.setChart(lineChart)
|
||||
},
|
||||
getHarmRateI() {
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/realtimeinfo/getHarmRateI',
|
||||
method:'POST',
|
||||
data: {
|
||||
lineIndex:that.lineInfo.lineIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
var list1=[];
|
||||
var list2=[];
|
||||
var result = res.data.data;
|
||||
list1.push(result.harmRateI.i2);
|
||||
list1.push(result.harmRateI.i3);
|
||||
list1.push(result.harmRateI.i4);
|
||||
list1.push(result.harmRateI.i5);
|
||||
list1.push(result.harmRateI.i6);
|
||||
list1.push(result.harmRateI.i7);
|
||||
list1.push(result.harmRateI.i8);
|
||||
list1.push(result.harmRateI.i9);
|
||||
list1.push(result.harmRateI.i10);
|
||||
list1.push(result.harmRateI.i11);
|
||||
list1.push(result.harmRateI.i12);
|
||||
list1.push(result.harmRateI.i13);
|
||||
list1.push(result.harmRateI.i14);
|
||||
list1.push(result.harmRateI.i15);
|
||||
list1.push(result.harmRateI.i16);
|
||||
list1.push(result.harmRateI.i17);
|
||||
list1.push(result.harmRateI.i18);
|
||||
list1.push(result.harmRateI.i19);
|
||||
list1.push(result.harmRateI.i20);
|
||||
list1.push(result.harmRateI.i21);
|
||||
list1.push(result.harmRateI.i22);
|
||||
list1.push(result.harmRateI.i23);
|
||||
list1.push(result.harmRateI.i24);
|
||||
list1.push(result.harmRateI.i25);
|
||||
list2.push(result.iharm.iharm2);
|
||||
list2.push(result.iharm.iharm3);
|
||||
list2.push(result.iharm.iharm4);
|
||||
list2.push(result.iharm.iharm5);
|
||||
list2.push(result.iharm.iharm6);
|
||||
list2.push(result.iharm.iharm7);
|
||||
list2.push(result.iharm.iharm8);
|
||||
list2.push(result.iharm.iharm9);
|
||||
list2.push(result.iharm.iharm10);
|
||||
list2.push(result.iharm.iharm11);
|
||||
list2.push(result.iharm.iharm12);
|
||||
list2.push(result.iharm.iharm13);
|
||||
list2.push(result.iharm.iharm14);
|
||||
list2.push(result.iharm.iharm15);
|
||||
list2.push(result.iharm.iharm16);
|
||||
list2.push(result.iharm.iharm17);
|
||||
list2.push(result.iharm.iharm18);
|
||||
list2.push(result.iharm.iharm19);
|
||||
list2.push(result.iharm.iharm20);
|
||||
list2.push(result.iharm.iharm21);
|
||||
list2.push(result.iharm.iharm22);
|
||||
list2.push(result.iharm.iharm23);
|
||||
list2.push(result.iharm.iharm24);
|
||||
list2.push(result.iharm.iharm25);
|
||||
that.drawCurrent(list1,list2);
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.getHarmRateI();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
drawCurrent(list1, list2) {
|
||||
var that = this ;
|
||||
that.option={
|
||||
// title: {
|
||||
// text: 'Wheater Statistics'
|
||||
// },
|
||||
// tooltip: {
|
||||
// trigger: 'axis',
|
||||
// axisPointer: {
|
||||
// type: 'shadow'
|
||||
// }
|
||||
// },
|
||||
// legend: {
|
||||
// // data:['国际限值(%)','谐波电压含有率(%)']
|
||||
// data: [{
|
||||
// name: '国际限值(%)',
|
||||
// icon: 'triangle',
|
||||
// // 设置文本为红色
|
||||
// textStyle: {
|
||||
// color: 'red'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: '谐波电压含有率(%)',
|
||||
// icon: 'triangle',
|
||||
// // 设置文本为红色
|
||||
// textStyle: {
|
||||
// color: 'red'
|
||||
// }
|
||||
// }]
|
||||
// },
|
||||
// grid: {
|
||||
// top:200
|
||||
// },
|
||||
// toolbox: {
|
||||
|
||||
// },
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '谐波电流幅值(A)',
|
||||
nameGap:30,
|
||||
nameLocation:'center',
|
||||
axisLabel: {
|
||||
formatter: function (value, index) {
|
||||
return value.toFixed(2)
|
||||
},
|
||||
margin:10
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
name:'(次)',
|
||||
nameLocation:'start',
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
data: ['2', '3','4', '5','6', '7','8', '9','10', '11','12', '13','14', '15','16', '17','18', '19','20', '21','21', '23','24', '25'],
|
||||
},{
|
||||
show:false,
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
data: ['2', '3','4', '5','6', '7','8', '9','10', '11','12', '13','14', '15','16', '17','18', '19','20', '21','21', '23','24', '25'],
|
||||
}],
|
||||
series: [{
|
||||
name: '国际限值(%)',
|
||||
type: 'bar',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position:'right'
|
||||
}
|
||||
},
|
||||
data: list2,
|
||||
yAxisIndex:0,
|
||||
itemStyle:{
|
||||
color:'#DAA520',
|
||||
position:'top'
|
||||
},
|
||||
barWidth:'90%',
|
||||
},
|
||||
{
|
||||
name: '谐波电流含有率(%)',
|
||||
type: 'bar',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
textBorderColor: '#333',
|
||||
textBorderWidth: 2,
|
||||
position:'right'
|
||||
}
|
||||
},
|
||||
data: list1,
|
||||
yAxisIndex:1,
|
||||
itemStyle:{
|
||||
color:'#2E8B57'
|
||||
},
|
||||
barWidth:'65%'
|
||||
}
|
||||
]
|
||||
}
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winHeight = sys.windowHeight;
|
||||
var winrate = 750 / winWidth;
|
||||
var picHeight = winHeight-400/winrate;
|
||||
that.picHeight =(picHeight*winrate)+'rpx'
|
||||
let canvas = that.$refs.lineChart2.canvas
|
||||
echarts.setCanvasCreator(() => canvas);
|
||||
let lineChart2 = echarts.init(canvas, null, {
|
||||
width: winWidth,
|
||||
height: picHeight
|
||||
})
|
||||
canvas.setChart(lineChart2)
|
||||
lineChart2.setOption(that.option)
|
||||
that.$refs.lineChart2.setChart(lineChart2)
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
var that = this;
|
||||
that.lineInfo = JSON.parse(e.lineInfo)
|
||||
that.scrollH();
|
||||
},
|
||||
onReady() {
|
||||
var that = this;
|
||||
that.getHarmRateV();
|
||||
that.getHarmRateI();
|
||||
},
|
||||
components: {
|
||||
back,
|
||||
mpvueEcharts
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("spectrum.css");
|
||||
</style>
|
||||
113
pages/steady/steady.css
Normal file
113
pages/steady/steady.css
Normal file
@@ -0,0 +1,113 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.steady-block{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
background:rgba(255,255,255,1);
|
||||
height: 94rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.time-pic{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 26rpx 0rpx 24rpx 40rpx;
|
||||
}
|
||||
.time-text{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 基础信息开始 */
|
||||
.basic-block{
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.basic-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
margin: 30rpx 40rpx 0 40rpx;
|
||||
}
|
||||
.basic-title-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.basic-title-right{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-left: 14rpx;
|
||||
font-weight:500;
|
||||
}
|
||||
.basic-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
.basic-content-line-one{
|
||||
height: 92rpx;
|
||||
margin: 12rpx 40rpx 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.basic-content-line-one-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.basic-content-line-one-right{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
.basic-content-line-two{
|
||||
height:2rpx;
|
||||
background:#F0F0F0;
|
||||
}
|
||||
.basic-content-line-three{
|
||||
width: 670rpx;
|
||||
height: 144rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
margin: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.basic-content-line-four{
|
||||
height:20rpx;
|
||||
background:#F0F0F0;
|
||||
}
|
||||
/* 基础信息结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
108
pages/steady/steady.vue
Normal file
108
pages/steady/steady.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="steady-block" v-if="errorFlag==0">
|
||||
<!-- 时间模块 -->
|
||||
<view class="time-block">
|
||||
<image src="/static/pic/time.png" class="time-pic"></image>
|
||||
<view class="time-text">
|
||||
{{showTime}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 基础信息 -->
|
||||
<view class="basic-block">
|
||||
<view class="basic-title">
|
||||
<image src="/static/pic/rectangle.png" class="basic-title-left"></image>
|
||||
<view class="basic-title-right">
|
||||
越限监测点列表
|
||||
</view>
|
||||
</view>
|
||||
<view class="basic-content" v-for="steadyState in steadyStateList" @click="jumpToSteadyDetails(showTime,steadyState.lineName,steadyState.lineIndex,steadyState.timeID)">
|
||||
<view class="basic-content-line-one">
|
||||
<view class="basic-content-line-one-left">
|
||||
{{steadyState.subName}},{{steadyState.lineName}}发生稳态越限
|
||||
<!-- {{steadyState.limitNum}}次 -->
|
||||
</view>
|
||||
<image class="basic-content-line-one-right" src="/static/pic/jump.png"></image>
|
||||
</view>
|
||||
<view class="basic-content-line-two"></view>
|
||||
<scroll-view class="basic-content-line-three" scroll-y="true">
|
||||
越限详情:{{steadyState.describe}}
|
||||
</scroll-view>
|
||||
<view class="basic-content-line-four"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'越限监测点',
|
||||
radioFlag:0,
|
||||
errorFlag:0,
|
||||
steadyIndex:'',
|
||||
steadyStateList:[],
|
||||
showTime:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
steadyStateInfo(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/steadymsg/steadyStateInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
steadyIndex: that.steadyIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.steadyStateList = eval(res.data.data);
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
jumpToSteadyDetails(showTime,lineName,lineIndex,timeID){
|
||||
uni.navigateTo({
|
||||
url:'../steadyDetails/steadyDetails?lineName='+lineName+"&showTime="+showTime+"&lineIndex="+lineIndex+"&timeID="+timeID
|
||||
})
|
||||
},
|
||||
retry(){
|
||||
this.errorFlag=0;
|
||||
this.steadyStateInfo();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.steadyIndex = e.steadyIndex;
|
||||
this.showTime = e.showTime;
|
||||
this.steadyStateInfo();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("steady.css");
|
||||
</style>
|
||||
92
pages/steadyDetails/steadyDetails.css
Normal file
92
pages/steadyDetails/steadyDetails.css
Normal file
@@ -0,0 +1,92 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.steadyDetails-block{
|
||||
background:#F9F9F9;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background:rgba(255,255,255,1);
|
||||
height: 94rpx;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.time-location{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.time-text{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 基础信息开始 */
|
||||
.index-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.index-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
height: 102rpx;
|
||||
}
|
||||
.index-title-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.index-title-right{
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.index-content{
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 92rpx;
|
||||
}
|
||||
.index-content-text{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 80rpx;
|
||||
height: 42rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.index-content-pic{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
/* 基础信息结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
111
pages/steadyDetails/steadyDetails.vue
Normal file
111
pages/steadyDetails/steadyDetails.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="steadyDetails-block" v-if="errorFlag==0">
|
||||
<!-- 时间模块 -->
|
||||
<view class="time-block">
|
||||
<view class="time-location">
|
||||
{{lineName}}
|
||||
</view>
|
||||
<view class="time-text">
|
||||
{{showTime}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 指标类型 -->
|
||||
<view class="index-block">
|
||||
<view class="index-title">
|
||||
<image src="/static/pic/rectangle.png" class="index-title-left"></image>
|
||||
<view class="index-title-right">
|
||||
指标类型
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-content" @click="jumpToSteadyIndex(steadyTarget.typeCode,steadyTarget.typeName)" v-for="steadyTarget in steadyTargetList">
|
||||
<view class="index-content-text">
|
||||
{{steadyTarget.typeName}}
|
||||
</view>
|
||||
<image src="/static/pic/jump.png" class="index-content-pic"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'越限监测点详情',
|
||||
radioFlag:0,
|
||||
lineName:'',
|
||||
showTime:'',
|
||||
lineIndex:'',
|
||||
steadyTargetList:[],
|
||||
timeID:'',
|
||||
errorFlag:0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
steadyTarget(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/steadymsg/steadyTarget',
|
||||
method: 'POST',
|
||||
data: {
|
||||
lineIndex: that.lineIndex,
|
||||
timeID:that.timeID
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.steadyTargetList = eval(res.data.data);
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
jumpToSteadyIndex(typeCode,typeName){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../steadyIndex/steadyIndex?typeCode='+typeCode+"&lineIndex="+that.lineIndex+"&timeID="+that.timeID+"&typeName="+typeName
|
||||
})
|
||||
},
|
||||
retry(){
|
||||
this.errorFlag=0;
|
||||
this.steadyTarget();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.showLoading({
|
||||
mask:true,
|
||||
});
|
||||
this.showTime=e.showTime;
|
||||
this.lineName = e.lineName;
|
||||
this.lineIndex=e.lineIndex;
|
||||
this.timeID=e.timeID;
|
||||
this.steadyTarget();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("steadyDetails.css");
|
||||
</style>
|
||||
59
pages/steadyIndex/steadyIndex.css
Normal file
59
pages/steadyIndex/steadyIndex.css
Normal file
@@ -0,0 +1,59 @@
|
||||
/* 主体开始 */
|
||||
.steadyIndex-block{
|
||||
background:#F9F9F9;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
/* 基础信息开始 */
|
||||
.index-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.index-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
height: 102rpx;
|
||||
}
|
||||
.index-title-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.index-title-right{
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.index-content{
|
||||
height: 424rpx;
|
||||
width: 670rpx;
|
||||
margin: 20rpx 40rpx 56rpx 40rpx;
|
||||
}
|
||||
.index-content-pic{
|
||||
height: 424rpx;
|
||||
width: 670rpx;
|
||||
}
|
||||
/* 基础信息结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
143
pages/steadyIndex/steadyIndex.vue
Normal file
143
pages/steadyIndex/steadyIndex.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="steadyIndex-block" v-if="errorFlag==0">
|
||||
<!-- 指标类型 -->
|
||||
<view class="index-block">
|
||||
<view class="index-title">
|
||||
<image src="/static/pic/rectangle.png" class="index-title-left"></image>
|
||||
<view class="index-title-right">
|
||||
{{typeName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-content">
|
||||
<image :src="steadyTargetPicUrl" class="index-content-pic" @click="previewPic(steadyTargetPicUrl)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'越限监测点详情',
|
||||
radioFlag:0,
|
||||
timeID:'',
|
||||
typeCode:'',
|
||||
lineIndex:'',
|
||||
steadyTargetPicUrl:'',
|
||||
errorFlag:0,
|
||||
typeName:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
steadyTargetUrl(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/steadymsg/steadyTargetUrl',
|
||||
method: 'POST',
|
||||
data: {
|
||||
lineIndex: that.lineIndex,
|
||||
timeID:that.timeID,
|
||||
typeCode:that.typeCode
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.steadyTargetPicUrl = eval(res.data.data).steadyPath;
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
previewPic(url) {
|
||||
if(url==null||url==undefined||url==''||url.length==0){
|
||||
return
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current:0,
|
||||
longPressActions: {
|
||||
itemList: ['保存图片'],
|
||||
success: function(data) {
|
||||
if (data.tapIndex == 0) {
|
||||
uni.showLoading({
|
||||
title: "图片保存中"
|
||||
});
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success(result) {
|
||||
var tempFilePath = result.tempFilePath;
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
success() {
|
||||
uni.showToast({
|
||||
icon: "success",
|
||||
title: "保存成功",
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.showModal({
|
||||
title: '保存失败',
|
||||
content: err.errMsg,
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
retry(){
|
||||
this.errorFlag=0;
|
||||
this.steadyTargetUrl();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.lineIndex=e.lineIndex;
|
||||
this.typeCode=e.typeCode;
|
||||
this.timeID=e.timeID;
|
||||
this.typeName=e.typeName;
|
||||
this.steadyTargetUrl();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("steadyIndex.css");
|
||||
</style>
|
||||
30
pages/systemIntroduce/systemIntroduce.vue
Normal file
30
pages/systemIntroduce/systemIntroduce.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<web-view src="http://112.4.156.196:8040/shiningCloud/business/appInfo"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showFlag:0,
|
||||
pageNameFlag:1,
|
||||
pageName:'系统介绍',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
119
pages/terminal/terminal.css
Normal file
119
pages/terminal/terminal.css
Normal file
@@ -0,0 +1,119 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.terminal-body{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 内容开始 */
|
||||
.terminal-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
height: 522rpx;
|
||||
background: #FFFFFF;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.terminal-content-line-one{
|
||||
height: 166rpx;
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.terminal-content-line{
|
||||
height: 2rpx;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
.terminal-content-line-two{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 78rpx;
|
||||
}
|
||||
.terminal-content-line-two-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.terminal-content-line-two-right{
|
||||
margin-left: 14rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight:500;
|
||||
}
|
||||
.terminal-content-line-three{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 40rpx;
|
||||
height: 92rpx;
|
||||
}
|
||||
.terminal-content-line-three-left{
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
}
|
||||
.terminal-content-line-three-right{
|
||||
height: 36rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.terminal-content-line-four{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 40rpx;
|
||||
height: 92rpx;
|
||||
}
|
||||
.terminal-content-line-four-left{
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
}
|
||||
.terminal-content-line-four-right{
|
||||
height: 36rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.terminal-content-line-five{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 40rpx;
|
||||
height: 92rpx;
|
||||
}
|
||||
.terminal-content-line-five-left{
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
}
|
||||
.terminal-content-line-five-right{
|
||||
height: 36rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
/* 内容结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
129
pages/terminal/terminal.vue
Normal file
129
pages/terminal/terminal.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<view class="terminal-body" v-if="errorFlag==0">
|
||||
<view class="terminal-content" @click="jumpToTerminalDetails(device.timeID,device.devIndex)" v-for="device in deviceList">
|
||||
<view class="terminal-content-line-one">
|
||||
{{showTime}},{{device.bdzName}},{{device.devName}}发生终端状态异常{{device.allNum}}次
|
||||
</view>
|
||||
<view class="terminal-content-line"></view>
|
||||
<view class="terminal-content-line-two">
|
||||
<image src="/static/pic/rectangle.png" class="terminal-content-line-two-left"></image>
|
||||
<view class="terminal-content-line-two-right">
|
||||
异常详情
|
||||
</view>
|
||||
</view>
|
||||
<view class="terminal-content-line-three">
|
||||
<view class="terminal-content-line-three-left">
|
||||
终端告警
|
||||
</view>
|
||||
<view class="terminal-content-line-three-right">
|
||||
{{device.alarmNum}}次
|
||||
</view>
|
||||
</view>
|
||||
<view class="terminal-content-line"></view>
|
||||
<view class="terminal-content-line-four">
|
||||
<view class="terminal-content-line-four-left">
|
||||
通讯中断
|
||||
</view>
|
||||
<view class="terminal-content-line-four-right">
|
||||
{{device.comOutNum}}次
|
||||
</view>
|
||||
</view>
|
||||
<view class="terminal-content-line"></view>
|
||||
<view class="terminal-content-line-five">
|
||||
<view class="terminal-content-line-five-left">
|
||||
终端流量
|
||||
</view>
|
||||
<view class="terminal-content-line-five-right">
|
||||
{{device.flowNum}}%
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'异常终端列表',
|
||||
radioFlag:0,
|
||||
devMsgIndex:'',
|
||||
deviceList:[],
|
||||
page:1,
|
||||
showTime:'',
|
||||
errorFlag:0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryDeviceList(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/deviceMsg/deviceList',
|
||||
method: 'POST',
|
||||
data: {
|
||||
devMsgIndex: that.devMsgIndex,
|
||||
page:that.page++,
|
||||
num:20
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
var list = eval(res.data.data)
|
||||
if(list!=null&&list!=undefined&&list!=''&&list!=[]){
|
||||
that.deviceList = that.deviceList.concat(list);
|
||||
}
|
||||
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
jumpToTerminalDetails(timeID,devIndex){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../terminalDetails/terminalDetails?devIndex='+devIndex+"&timeID="+timeID+"&showTime="+that.showTime
|
||||
})
|
||||
},
|
||||
retry(){
|
||||
this.errorFlag=0;
|
||||
this.page=1;
|
||||
this.queryDeviceList();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.devMsgIndex = e.devMsgIndex;
|
||||
this.showTime=e.showTime;
|
||||
this.queryDeviceList();
|
||||
},
|
||||
onReachBottom(){
|
||||
this.queryDeviceList();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("terminal.css");
|
||||
</style>
|
||||
199
pages/terminalDetails/terminalDetails.css
Normal file
199
pages/terminalDetails/terminalDetails.css
Normal file
@@ -0,0 +1,199 @@
|
||||
/* 主体开始 */
|
||||
.terminalDetails-block{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
background:rgba(255,255,255,1);
|
||||
height: 94rpx;
|
||||
}
|
||||
.time-pic{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 26rpx 0rpx 24rpx 40rpx;
|
||||
}
|
||||
.time-text{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin:26rpx 0 26rpx 20rpx;
|
||||
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 基础信息开始 */
|
||||
.basic-block{
|
||||
height: 176rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
|
||||
}
|
||||
.basic-body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
}
|
||||
.basic-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.basic-title-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.basic-title-right{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-left: 14rpx;
|
||||
font-weight:500;
|
||||
}
|
||||
.basic-content{
|
||||
height: 106rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
margin-top:20rpx ;
|
||||
}
|
||||
/* 基础信息结束 */
|
||||
/* 终端通讯信息开始 */
|
||||
.eigenvalues-block{
|
||||
height: 350rpx;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.eigenvalues-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
.eigenvalues-title-left{
|
||||
margin-left: 40rpx;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.eigenvalues-title-right{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.eigenvalues-content{
|
||||
width: 670rpx;
|
||||
height: 188rpx;
|
||||
margin: 20rpx 40rpx 50rpx 40rpx;
|
||||
}
|
||||
.eigenvalues-content-title{
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.eigenvalues-content-scroll{
|
||||
height: 160rpx;
|
||||
}
|
||||
.eigenvalues-content-text{
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
/* 终端通讯信息结束 */
|
||||
/* 终端告警信息开始 */
|
||||
.waveform-block{
|
||||
height: 300rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
}
|
||||
.waveform-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
.waveform-title-left{
|
||||
margin-left: 40rpx;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.waveform-title-right{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.waveform-content-scroll{
|
||||
height: 160rpx;
|
||||
width: 670rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
margin: 20rpx 40rpx 0 40rpx;
|
||||
}
|
||||
/* 终端告警信息结束 */
|
||||
/* 终端流量信息开始 */
|
||||
.flow-block{
|
||||
height: 262rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
}
|
||||
.flow-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
.flow-title-left{
|
||||
margin-left: 40rpx;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.flow-title-right{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.flow-content{
|
||||
height: 160rpx;
|
||||
width: 670rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
margin: 20rpx 40rpx 0 40rpx;
|
||||
}
|
||||
/* 终端流量信息结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
148
pages/terminalDetails/terminalDetails.vue
Normal file
148
pages/terminalDetails/terminalDetails.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<view class="terminalDetails-block" v-if="errorFlag==0">
|
||||
<!-- 时间模块 -->
|
||||
<view class="time-block">
|
||||
<image src="/static/pic/time.png" class="time-pic"></image>
|
||||
<view class="time-text">
|
||||
{{showTime}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 终端基础信息 -->
|
||||
<view class="basic-block">
|
||||
<view class="basic-body">
|
||||
<view class="basic-title">
|
||||
<image src="/static/pic/rectangle.png" class="basic-title-left"></image>
|
||||
<view class="basic-title-right">
|
||||
终端基础信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="basic-content">
|
||||
{{devMsg.bdzName}},{{devMsg.devName}},网络参数:{{devMsg.ip}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 终端通讯信息 -->
|
||||
<view class="eigenvalues-block">
|
||||
<view class="eigenvalues-title">
|
||||
<image src="/static/pic/rectangle.png" class="eigenvalues-title-left"></image>
|
||||
<view class="eigenvalues-title-right">
|
||||
终端通讯信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content">
|
||||
<view class="eigenvalues-content-title">
|
||||
{{devMsg.devName}}通讯中断{{devMsg.comOutNum}}次,具体如下所示:
|
||||
</view>
|
||||
<scroll-view scroll-y="true" show-scrollbar="true" class="eigenvalues-content-scroll">
|
||||
<view class="" v-for="describe in devMsg.devMsgDescribe">
|
||||
<view class="eigenvalues-content-text" >
|
||||
{{describe}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 终端告警信息 -->
|
||||
<view class="waveform-block">
|
||||
<view class="waveform-title">
|
||||
<image src="/static/pic/rectangle.png" class="waveform-title-left"></image>
|
||||
<view class="waveform-title-right">
|
||||
终端告警信息
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" show-scrollbar="true" class="waveform-content-scroll">
|
||||
{{devMsg.alarmInfo}}
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 终端流量信息 -->
|
||||
<view class="flow-block">
|
||||
<view class="flow-title">
|
||||
<image src="/static/pic/rectangle.png" class="flow-title-left"></image>
|
||||
<view class="flow-title-right">
|
||||
终端流量信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="flow-content">
|
||||
{{devMsg.flowInfo}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
showFlag:0,
|
||||
pageName:'终端状态消息详情',
|
||||
radioFlag:0,
|
||||
devIndex:'',
|
||||
timeID:'',
|
||||
showTime:'',
|
||||
errorFlag:0,
|
||||
devMsg:{},
|
||||
queryFlag:0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
devMsgInfo(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/deviceMsg/devMsgInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
devIndex: that.devIndex,
|
||||
timeID:that.timeID
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.devMsg = eval(res.data.data);
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
retry(){
|
||||
this.errorFlag=0;
|
||||
this.devMsgInfo();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.showLoading({
|
||||
mask:true,
|
||||
});
|
||||
this.devIndex=e.devIndex;
|
||||
this.timeID=e.timeID;
|
||||
this.showTime=e.showTime;
|
||||
this.devMsgInfo();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("terminalDetails.css");
|
||||
</style>
|
||||
129
pages/terminalHistory/terminalHistory.css
Normal file
129
pages/terminalHistory/terminalHistory.css
Normal file
@@ -0,0 +1,129 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.steadyDetails-block{
|
||||
background:#F9F9F9;
|
||||
}
|
||||
/* 分割线 */
|
||||
.line{
|
||||
background: #F0F0F0;
|
||||
height: 20rpx;
|
||||
}
|
||||
.line-fine{
|
||||
background: #F0F0F0;
|
||||
height: 2rpx;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background:rgba(255,255,255,1);
|
||||
height: 94rpx;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.time-location{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.time-text{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 基础信息开始 */
|
||||
.index-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.index-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
height: 102rpx;
|
||||
}
|
||||
.index-title-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.index-title-right{
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.index-content{
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
/* height: 92rpx; */
|
||||
}
|
||||
.index-content1{
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 92rpx;
|
||||
}
|
||||
.index-content2{
|
||||
margin-top: 20rpx;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.index-content-text{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 80rpx;
|
||||
/* height: 82rpx; */
|
||||
}
|
||||
.index-content-text1{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 80rpx;
|
||||
height: 42rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.index-content-text2{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin:0 80rpx;
|
||||
}
|
||||
.index-content-pic{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
/* 基础信息结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
202
pages/terminalHistory/terminalHistory.vue
Normal file
202
pages/terminalHistory/terminalHistory.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<view class="steadyDetails-block" v-if="errorFlag==0">
|
||||
<!-- 时间模块 -->
|
||||
<view class="time-block">
|
||||
<view class="time-text">
|
||||
{{showTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line-fine">
|
||||
|
||||
</view>
|
||||
<view class="time-block">
|
||||
<view class="time-location">
|
||||
{{statisticsDetail.name}}
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" :style="{height:scrollHeight}">
|
||||
<!-- 指标类型 -->
|
||||
<view class="index-block" v-if="statisticsDetail.eventInfo.length>0">
|
||||
<view class="index-title">
|
||||
<image src="/static/pic/rectangle.png" class="index-title-left"></image>
|
||||
<view class="index-title-right">
|
||||
暂态信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-content" @click="jumpToTransientWave(steadyTarget.eventdetail_index)" v-for="steadyTarget in statisticsDetail.eventInfo">
|
||||
<view class="index-content-text">
|
||||
{{steadyTarget.describe}}
|
||||
</view>
|
||||
<image src="/static/pic/jump.png" class="index-content-pic"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-block" v-if="steadyTargetList.length>0">
|
||||
<view class="index-title">
|
||||
<image src="/static/pic/rectangle.png" class="index-title-left"></image>
|
||||
<view class="index-title-right">
|
||||
稳态越限信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-content1" @click="jumpToSteadyIndex(steadyTarget.typeCode,steadyTarget.typeName)" v-for="steadyTarget in steadyTargetList">
|
||||
<view class="index-content-text1">
|
||||
{{steadyTarget.typeName}}
|
||||
</view>
|
||||
<image src="/static/pic/jump.png" class="index-content-pic"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'详细列表',
|
||||
lineIndex:'',
|
||||
steadyTargetList:[],
|
||||
timeID:'',
|
||||
errorFlag:0,
|
||||
lineInfo:{},
|
||||
showTime:'',
|
||||
statisticsDetail:{},
|
||||
scrollHeight:'',
|
||||
steadyTargetList:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrollH(){
|
||||
var that =this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750/winWidth;
|
||||
var winHeight= sys.windowHeight;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
that.scrollHeight = parseInt((winHeight-statusBarHeight)*winrate-284)+'rpx';
|
||||
},
|
||||
queryStatisticsDetail(){
|
||||
var that=this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/statistics/statisticsDetail',
|
||||
method:'POST',
|
||||
data: {
|
||||
lineIndex:that.lineInfo.lineIndex,
|
||||
timeID:that.timeID
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
var statisticsDetail = res.data.data
|
||||
if(statisticsDetail){
|
||||
that.statisticsDetail= statisticsDetail
|
||||
that.steadyTarget();
|
||||
}
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.queryStatisticsDetail();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
steadyTarget(){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/steadymsg/steadyTarget',
|
||||
method: 'POST',
|
||||
data: {
|
||||
lineIndex: that.lineInfo.lineIndex,
|
||||
timeID:that.timeID
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.steadyTargetList = eval(res.data.data);
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
jumpToSteadyIndex(typeCode,typeName){
|
||||
var that = this;
|
||||
uni.navigateTo({
|
||||
url:'../steadyIndex/steadyIndex?typeCode='+typeCode+"&lineIndex="+that.lineInfo.lineIndex+"&timeID="+that.timeID+"&typeName="+typeName
|
||||
})
|
||||
},
|
||||
jumpToSteadyDetails(){
|
||||
var that =this;
|
||||
uni.navigateTo({
|
||||
url:'../steadyDetails/steadyDetails?lineName='+that.lineInfo.lineName+"&showTime="+that.showTime+"&lineIndex="+that.lineInfo.lineIndex+"&timeID="+that.timeID
|
||||
})
|
||||
},
|
||||
jumpToTransientWave(eventDetailIndex){
|
||||
var that =this;
|
||||
uni.navigateTo({
|
||||
url:'../transientWave/transientWave?eventDetailIndex='+eventDetailIndex
|
||||
})
|
||||
}
|
||||
},
|
||||
components:{
|
||||
back
|
||||
},
|
||||
onLoad(e) {
|
||||
var that = this;
|
||||
that.lineInfo = JSON.parse(e.lineInfo);
|
||||
that.timeID = e.timeID;
|
||||
that.showTime=that.formatTime(parseInt(e.timeID));
|
||||
that.scrollH();
|
||||
that.queryStatisticsDetail();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("terminalHistory.css");
|
||||
</style>
|
||||
184
pages/terminalStatus/terminalStatus.css
Normal file
184
pages/terminalStatus/terminalStatus.css
Normal file
@@ -0,0 +1,184 @@
|
||||
page{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 分割线 */
|
||||
.line{
|
||||
background: #F0F0F0;
|
||||
height: 20rpx;
|
||||
}
|
||||
.line-fine{
|
||||
background: #F0F0F0;
|
||||
height: 2rpx;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.time-block-left{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 44rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.calendar-pic{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
.time-text{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.time-block-right{
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 总览开始 */
|
||||
.overview-block{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 40rpx;
|
||||
background: #FFFFFF 100%;
|
||||
}
|
||||
.overview-block-text{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.overview-block-text-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.overview-block-text-right{
|
||||
color: #FF5059;
|
||||
font-size: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
/* 总览结束 */
|
||||
/* 图片开始 */
|
||||
.pic-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
background: #FFFFFF;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.pic-block-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding:0 40rpx;
|
||||
}
|
||||
.pic-block-title-left{
|
||||
height: 34rpx;
|
||||
width: 6rpx;
|
||||
}
|
||||
.pic-block-title-right{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.pic-block-pic{
|
||||
height: 378rpx;
|
||||
width: 670rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
/* 图片结束 */
|
||||
/* 画图开始 */
|
||||
.canvasView{
|
||||
|
||||
}
|
||||
.ec-canvas{
|
||||
}
|
||||
.legend-block{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.legend-block-left-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #DAA520;
|
||||
}
|
||||
.legend-block-left-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.legend-block-right{
|
||||
height: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.legend-block-right-color{
|
||||
height: 30rpx;
|
||||
width: 30rpx;
|
||||
background: #2E8B57;
|
||||
}
|
||||
.legend-block-right-text{
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 画图结束 */
|
||||
/* 中断信息开始 */
|
||||
.info-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding: 0 40rpx;
|
||||
border-bottom: 10rpx #F0F0F0 solid;
|
||||
font-size: 30rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
.info-block-line-one{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
/* 中断信息结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
278
pages/terminalStatus/terminalStatus.vue
Normal file
278
pages/terminalStatus/terminalStatus.vue
Normal file
@@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<block v-if="errorFlag==0">
|
||||
<!-- 时间 -->
|
||||
<view>
|
||||
<uni-calendar ref="calendar" :insert="false" @confirm="confirm" :range='true'></uni-calendar>
|
||||
</view>
|
||||
<view class="time-block">
|
||||
<view class="time-block-left">
|
||||
<image class="calendar-pic" src="/static/pic/calendar.png"></image>
|
||||
<view class="time-text">
|
||||
{{timeStart}}至{{timeEnd}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <image src="/static/pic/jump.png" class="time-block-right"></image> -->
|
||||
</view>
|
||||
<view class=".line-fine">
|
||||
|
||||
</view>
|
||||
<view class="overview-block">
|
||||
<view class="overview-block-text">
|
||||
<view class="overview-block-text-left">
|
||||
终端在线率为
|
||||
</view>
|
||||
<view class="overview-block-text-right">
|
||||
{{onlineRatez}}%
|
||||
</view>
|
||||
<view class="overview-block-text-left">
|
||||
当前通讯异常终端为
|
||||
</view>
|
||||
<view class="overview-block-text-right">
|
||||
{{comError}}台
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="pic-block" scroll-y="true" :style="{height:srollHeight}">
|
||||
<view class="pic-block-title">
|
||||
<image class="pic-block-title-left" src="/static/pic/rectangle.png"></image>
|
||||
<view class="pic-block-title-right">
|
||||
终端在线率(%)
|
||||
</view>
|
||||
</view>
|
||||
<view class="canvasView" :style="{height:picHeight}">
|
||||
<mpvue-echarts class="ec-canvas" canvasId="line" ref="lineChart" :style="{height:picHeight}"/>
|
||||
</view>
|
||||
<view class="pic-block-title">
|
||||
<image class="pic-block-title-left" src="/static/pic/rectangle.png"></image>
|
||||
<view class="pic-block-title-right">
|
||||
终端详细信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-block" v-for="o in devStatus">
|
||||
<view class="info-block-line-one">
|
||||
{{o.devName}}
|
||||
</view>
|
||||
<view class="info-block-two">
|
||||
最新数据时间 {{o.showTime}}
|
||||
</view>
|
||||
<view class="info-block-three">
|
||||
{{o.gdName}},{{o.subName}},网络参数:{{o.ip}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
<view class="error-block" v-else-if="errorFlag==1">
|
||||
<view class="error-text">
|
||||
网络或服务器出错请稍后再试
|
||||
</view>
|
||||
<!-- <button class="retry_button" @click="retry">重试</button> -->
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
加载中...
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
import uniCalendar from "../../components/uni-calendar/uni-calendar";
|
||||
import * as echarts from '@/components/echarts/echarts.simple.min.js';
|
||||
import mpvueEcharts from '@/components/mpvue-echarts/src/echarts.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:'终端状态详情',
|
||||
startDate:'',
|
||||
endDate:'',
|
||||
picHeight:'',
|
||||
option:{},
|
||||
devStatus:{},
|
||||
timeEnd:'',
|
||||
timeStart:'',
|
||||
comError:'',
|
||||
onlineRatez:'',
|
||||
errorFlag:0,
|
||||
srollHeight:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseDate(){
|
||||
this.$refs.calendar.open();
|
||||
},
|
||||
confirm(e){
|
||||
var that = this;
|
||||
var before = e.range.before;
|
||||
var after = e.range.after;
|
||||
var b = parseInt(before.replace('-','').replace('-',''));
|
||||
var a = parseInt(after.replace('-','').replace('-',''));
|
||||
if(a>b){
|
||||
that.startDate = before;
|
||||
that.endDate = after;
|
||||
}else{
|
||||
that.startDate = after;
|
||||
that.endDate = before;
|
||||
}
|
||||
},
|
||||
getDevStatus(){
|
||||
var that=this;
|
||||
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/dataIntegrity/getDevStatus',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
uni.hideLoading()
|
||||
if(res.data.resultCode=='10000'){
|
||||
var data = res.data;
|
||||
var devStatus =res.data.data;
|
||||
that.timeStart = that.formatTime(data.timeStart);
|
||||
that.timeEnd = that.formatTime(data.timeEnd);
|
||||
that.comError=data.comError+'';
|
||||
that.onlineRatez=data.onlineRatez+'';
|
||||
that.devStatus=devStatus;
|
||||
var list1=[];
|
||||
var list2=[];
|
||||
for(var i=0;i<devStatus.length;i++){
|
||||
devStatus[i].showTime = that.formatTime_second(devStatus[i].timeId)
|
||||
list1.push(devStatus[i].devName);
|
||||
list2.push(devStatus[i].onlineRate)
|
||||
}
|
||||
that.drawPic(list1,list2)
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
that.errorFlag=1
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.hideLoading()
|
||||
that.errorFlag=1
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '网络或服务器异常,请稍后再试',
|
||||
// showCancel:false,
|
||||
// success: function (res) {
|
||||
// if (res.confirm) {
|
||||
// console.log('用户点击确定');
|
||||
// } else if (res.cancel) {
|
||||
// console.log('用户点击取消');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
drawPic(list1,list2) {
|
||||
var that = this ;
|
||||
that.option={
|
||||
grid:{
|
||||
width:'55%',
|
||||
left:'35%'
|
||||
},
|
||||
xAxis: {
|
||||
name: '在线率(%)',
|
||||
type: 'value',
|
||||
nameGap:30,
|
||||
nameLocation:'center',
|
||||
// data:[0,20,40,50,60,80,100],
|
||||
max:100,
|
||||
axisLabel: {
|
||||
margin:10
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
inverse: true,
|
||||
name:'监测点名称',
|
||||
nameLocation:'start',
|
||||
data:list1,
|
||||
// data:['伟哥伟哥伟哥伟哥伟哥5伟哥6伟哥7伟哥8','伟哥1伟哥2伟哥3伟哥4伟哥5伟哥6伟哥7','伟哥1伟哥2伟哥3伟哥4伟哥5伟哥6','伟哥1伟哥2伟哥3伟哥4伟哥5','伟哥1伟哥2伟哥3伟哥4','伟哥1伟哥2伟哥3伟哥4伟哥5伟哥6伟哥7','伟哥1伟哥2伟哥3伟哥4伟哥5伟哥6','伟哥1伟哥2伟哥3伟哥4伟哥5','伟哥1伟哥2伟哥3伟哥4'],
|
||||
axisLabel:{
|
||||
interval:0,
|
||||
fontsize:3,
|
||||
formatter:function(value){
|
||||
if(value.length>9){
|
||||
return value.substring(0,8)+'...'
|
||||
}else{
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
series: {
|
||||
type: 'bar',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position:'right'
|
||||
}
|
||||
},
|
||||
// data: [100,100,100,100,100,100,100,100,100],
|
||||
data: list2,
|
||||
itemStyle:{
|
||||
color:'#58C1FF',
|
||||
position:'top'
|
||||
},
|
||||
barWidth:'90%',
|
||||
}
|
||||
}
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winHeight = sys.windowHeight;
|
||||
var winrate = 750 / winWidth;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
// var picHeight = parseInt((winHeight - statusBarHeight) * winrate - 300)/winrate;
|
||||
var picHeight=list1.length*50+50
|
||||
// var picHeight=9*50+50
|
||||
that.srollHeight = parseInt((winHeight - statusBarHeight) * winrate - 300)+ 'rpx';
|
||||
that.picHeight =picHeight*winrate+'rpx'
|
||||
let canvas = that.$refs.lineChart.canvas
|
||||
echarts.setCanvasCreator(() => canvas);
|
||||
let lineChart = echarts.init(canvas, null, {
|
||||
width: winWidth,
|
||||
height: picHeight,
|
||||
})
|
||||
canvas.setChart(lineChart)
|
||||
lineChart.setOption(that.option)
|
||||
that.$refs.lineChart.setChart(lineChart)
|
||||
uni.hideLoading()
|
||||
},
|
||||
retry(){
|
||||
this.getDevStatus();
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that=this;
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
// that.endDate=that.formatTime(new Date());
|
||||
// that.startDate=that.endDate.substring(0,8)+'01';
|
||||
},
|
||||
onReady() {
|
||||
var that=this;
|
||||
that.getDevStatus();
|
||||
},
|
||||
components:{
|
||||
back,
|
||||
uniCalendar,
|
||||
mpvueEcharts
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("terminalStatus.css");
|
||||
</style>
|
||||
21
pages/terminalStatusAll/terminalStatusAll.css
Normal file
21
pages/terminalStatusAll/terminalStatusAll.css
Normal file
@@ -0,0 +1,21 @@
|
||||
.terminal-status-all-block{
|
||||
background: #f0f0f0;
|
||||
}
|
||||
.terminal-status-all-each-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
background: white;
|
||||
margin-bottom: 4rpx;
|
||||
font-size: 30rpx;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.terminal-status-all-each-block-sucess{
|
||||
color: #78D50E;
|
||||
}
|
||||
.terminal-status-all-each-block-fail{
|
||||
color: #FF5059;
|
||||
}
|
||||
101
pages/terminalStatusAll/terminalStatusAll.vue
Normal file
101
pages/terminalStatusAll/terminalStatusAll.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :pageName='pageName'></back>
|
||||
<scroll-view class="terminal-status-all-block" :style="{height:scrollHeight}" scroll-y="true">
|
||||
<view class="terminal-status-all-each-block" v-for="dev in devStatusList">
|
||||
<view class="">
|
||||
{{dev.devName}}
|
||||
</view>
|
||||
<view class="terminal-status-all-each-block-fail" v-if="dev.comInfo==0">
|
||||
异常
|
||||
</view>
|
||||
<view class="terminal-status-all-each-block-sucess" v-if="dev.comInfo==1">
|
||||
正常
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag:1,
|
||||
pageName:"终端状态",
|
||||
scrollHeight:'',
|
||||
devStatusList:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrollH(){
|
||||
var that =this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750/winWidth;
|
||||
var winHeight= sys.windowHeight;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
that.scrollHeight = parseInt((winHeight-statusBarHeight)*winrate-94)+'rpx';
|
||||
},
|
||||
queryDevComInfo(){
|
||||
var that=this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/deviceMsg/devComInfo',
|
||||
method:'POST',
|
||||
data: {
|
||||
userId:uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
that.devStatusList = res.data.data
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '查询失败,请重试',
|
||||
confirmText:'重试',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
that.queryDevComInfo();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that = this;
|
||||
that.scrollH();
|
||||
that.queryDevComInfo();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("terminalStatusAll.css");
|
||||
</style>
|
||||
463
pages/transientDetails/transientDetails.css
Normal file
463
pages/transientDetails/transientDetails.css
Normal file
@@ -0,0 +1,463 @@
|
||||
/* 主体开始 */
|
||||
.transientDetails-block{
|
||||
background: #F0F0F0;
|
||||
}
|
||||
/* 时间开始 */
|
||||
.time-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
background:rgba(255,255,255,1);
|
||||
height: 94rpx;
|
||||
}
|
||||
.time-pic{
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin: 26rpx 0rpx 24rpx 40rpx;
|
||||
}
|
||||
.time-text{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin:26rpx 0 26rpx 20rpx;
|
||||
|
||||
}
|
||||
/* 时间结束 */
|
||||
/* 基础信息开始 */
|
||||
.basic-block{
|
||||
height: 494rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
|
||||
}
|
||||
.basic-body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
}
|
||||
.basic-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.basic-title-left{
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.basic-title-right{
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
margin-left: 14rpx;
|
||||
font-weight:500;
|
||||
}
|
||||
.basic-content{
|
||||
height: 106rpx;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
margin-top:20rpx ;
|
||||
}
|
||||
.basic-line-one{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: baseline ;
|
||||
margin-top: 20rpx;
|
||||
|
||||
}
|
||||
.basic-line-one-left{
|
||||
width: 140rpx;
|
||||
height: 38rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
border-radius:18rpx;
|
||||
background: rgba(244,244,244,1);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.basic-line-one-right{
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
.basic-line-two{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: baseline ;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.basic-line-two-left{
|
||||
width: 200rpx;
|
||||
height: 38rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
border-radius:18rpx;
|
||||
background: rgba(244,244,244,1);
|
||||
text-align: center;
|
||||
}
|
||||
.basic-line-two-right{
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
.judge-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center ;
|
||||
margin-top: 20rpx;
|
||||
height:48rpx;
|
||||
}
|
||||
.judge-text{
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.judge-yes{
|
||||
margin-left: 126rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.judge-yes-pic{
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.judge-yes-text{
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.judge-no{
|
||||
margin-left: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.judge-no-pic{
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.judge-no-text{
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.judge-pic{
|
||||
height: 48rpx;
|
||||
width: 80rpx;
|
||||
}
|
||||
.basic-foot{
|
||||
margin-top: 2rpx;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
border-top: solid 2rpx #F0F0F0;
|
||||
margin-top: 20rpx;
|
||||
padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.basic-foot-left{
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
background:rgba(57,130,252,1);
|
||||
margin-left: 410rpx;
|
||||
border-radius:24rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.basic-foot-left-grey{
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
color: #6CA3FF;
|
||||
font-size: 24rpx;
|
||||
background:rgba(57,130,252,1);
|
||||
margin-left: 410rpx;
|
||||
border-radius:24rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.basic-foot-right{
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
/* margin-left: 20rpx; */
|
||||
background:rgba(57,130,252,1);
|
||||
border-radius:24rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
margin-right: 0rpx;
|
||||
}
|
||||
.basic-foot-right-grey{
|
||||
width: 140rpx;
|
||||
height: 48rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
/* margin-left: 20rpx; */
|
||||
background:rgba(217,217,217,1);
|
||||
border-radius:24rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
/* 基础信息结束 */
|
||||
/* 多特征值开始 */
|
||||
.eigenvalues-block{
|
||||
margin-top: 32rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.eigenvalues-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
.eigenvalues-title-left{
|
||||
margin-left: 40rpx;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.eigenvalues-title-right{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.eigenvalues-content-line{
|
||||
height: 92rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding:0 40rpx;
|
||||
}
|
||||
.eigenvalues-content-line2{
|
||||
height: 92rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content:space-between;
|
||||
align-items: center;
|
||||
padding:0 40rpx;
|
||||
}
|
||||
.eigenvalues-content-line3{
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
justify-content:space-between;
|
||||
padding-left: 40rpx;
|
||||
padding-right: 40rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
}
|
||||
.eigenvalues-content-line-left{
|
||||
width: 336rpx;
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
color: #303233;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-right{
|
||||
height: 42rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.eigenvalues-content-line-right-A{
|
||||
width: 222rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-right-B{
|
||||
width: 226rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-right-C{
|
||||
width: 222rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-left2{
|
||||
width: 374rpx;
|
||||
height: 42rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.eigenvalues-content-line-left2-left{
|
||||
width: 182rpx;
|
||||
height: 42rpx;
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-left2-right{
|
||||
width: 58rpx;
|
||||
height: 38rpx;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
text-align: right;
|
||||
margin-left: 24rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-right2{
|
||||
width: 374rpx;
|
||||
height: 42rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
.eigenvalues-content-line-right2-left{
|
||||
margin-left: 40rpx;
|
||||
width: 182rpx;
|
||||
height: 42rpx;
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line-right2-right{
|
||||
width: 58rpx;
|
||||
height: 38rpx;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
text-align: right;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
.eigenvalues-content-line3-left2{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
white-space: nowrap;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
width: 374rpx;
|
||||
}
|
||||
.eigenvalues-content-line3-right2{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
white-space: nowrap;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
width: 374rpx;
|
||||
}
|
||||
.eigenvalues-content-line3-right2-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.eigenvalues-content-line3-right2-right{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.eigenvalues-content-line3-left2-right{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eigenvalues-content-line3-left2-left{
|
||||
color: #303233;
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
/* 多特征值结束 */
|
||||
/* 波形图开始 */
|
||||
.waveform-block{
|
||||
height: 562rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
}
|
||||
.waveform-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
.waveform-title-left{
|
||||
margin-left: 40rpx;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.waveform-title-right{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.waveform-pic{
|
||||
width: 670rpx;
|
||||
height: 424rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.no-pic-text{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
/* 波形图结束 */
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
/* 主体结束 */
|
||||
861
pages/transientDetails/transientDetails.vue
Normal file
861
pages/transientDetails/transientDetails.vue
Normal file
@@ -0,0 +1,861 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<scroll-view class="transientDetails-block" v-if="errorFlag==0" :style="{height:scrollHeight}" scroll-y="true">
|
||||
<!-- 时间模块 -->
|
||||
<view class="time-block">
|
||||
<image src="/static/pic/time.png" class="time-pic"></image>
|
||||
<view class="time-text">
|
||||
{{baseInfo.showTime}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 基础信息 -->
|
||||
<view class="basic-block">
|
||||
<view class="basic-body">
|
||||
<view class="basic-title">
|
||||
<image src="/static/pic/rectangle.png" class="basic-title-left"></image>
|
||||
<view class="basic-title-right">
|
||||
基础信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="basic-content">
|
||||
<view class="">
|
||||
{{baseInfo.lineName}}
|
||||
</view>
|
||||
<view class="">
|
||||
发生{{transientName}}事件,特征幅值:{{baseInfo.eventValue}}%,持续时间:{{baseInfo.persistTime}}s
|
||||
</view>
|
||||
</view>
|
||||
<view class="basic-line-one">
|
||||
<view class="basic-line-one-left">
|
||||
台账信息:
|
||||
</view>
|
||||
<view class="basic-line-one-right">
|
||||
{{baseInfo.gdName}},{{baseInfo.bdzName}},电压等级:{{baseInfo.scale}},网络参数:{{baseInfo.ip}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="judge-block">
|
||||
<view class="judge-text">
|
||||
请您评价本次事件是否对设备造成影响
|
||||
</view>
|
||||
<!-- <view class="judge-yes" @click="changeRadioFlag(1)">
|
||||
<image src="/static/pic/nochoose.png" class="judge-yes-pic" v-if="radioFlag==0"></image>
|
||||
<image src="/static/pic/choose2.png" class="judge-yes-pic" v-else></image>
|
||||
</view>
|
||||
<view class="judge-yes-text" @click="changeRadioFlag(1)">
|
||||
是
|
||||
</view>
|
||||
<view class="judge-no" @click="changeRadioFlag(0)">
|
||||
<image src="/static/pic/nochoose.png" class="judge-no-pic" v-if="radioFlag==1"></image>
|
||||
<image src="/static/pic/choose2.png" class="judge-no-pic" v-else></image>
|
||||
</view>
|
||||
<view class="judge-no-text" @click="changeRadioFlag(0)">
|
||||
否
|
||||
</view> -->
|
||||
<image src="/static/pic/yes.png" class="judge-pic" v-if="judgeFlag==1" @click="confirmJudge(0)"></image>
|
||||
<image src="/static/pic/no.png" class="judge-pic" v-else @click="confirmJudge(1)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="basic-foot">
|
||||
<!-- <view class="basic-foot-left" @click="updateEvaluate" v-if="sendAgainFlag==0">
|
||||
{{sendAgain}}
|
||||
</view>
|
||||
<view class="basic-foot-left-grey" v-else>
|
||||
{{sendAgain}}
|
||||
</view> -->
|
||||
<view class="basic-foot-right-grey" v-if="baseInfo.report==3">
|
||||
已申请
|
||||
</view>
|
||||
<view class="basic-foot-right" @click="downloadReport" v-else-if="baseInfo.report==1">
|
||||
下载报告
|
||||
</view>
|
||||
<button class="basic-foot-right " @click="applyReport" :disabled="disabledFlag" :loading="loadingFlag" v-else>
|
||||
报告申请
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 多特征值 -->
|
||||
<view class="eigenvalues-block" v-if="backNumber>0">
|
||||
<view class="eigenvalues-title">
|
||||
<image src="/static/pic/rectangle.png" class="eigenvalues-title-left"></image>
|
||||
<view class="eigenvalues-title-right">
|
||||
多特征值
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="eigenvalues-content-line2">
|
||||
<view class="eigenvalues-content-line-left">
|
||||
事件段数
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right">
|
||||
{{backNumber}}
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="eigenvalues-content-line3">
|
||||
<view class="eigenvalues-content-line3-left2">
|
||||
<view class="eigenvalues-content-line3-left2-left">
|
||||
事件段数:
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-left2-right">
|
||||
{{backNumber}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2" v-if="sagReason!=null&&sagReason!=''&&sagReason!=undefind">
|
||||
<view class="eigenvalues-content-line3-right2-left">
|
||||
暂降原因:
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2-right">
|
||||
{{sagReason}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-for="(eigenvalue,eigenIndex) in eigenvalueList">
|
||||
<view class="eigenvalues-content-line2">
|
||||
<view class="eigenvalues-content-line-left">
|
||||
事件段{{eigenIndex+1}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line">
|
||||
<view class="eigenvalues-content-line-left">
|
||||
波形起始点相位(°)
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right">
|
||||
<view class="eigenvalues-content-line-right-A">
|
||||
A相 {{eigenvalue.pow_a}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-B">
|
||||
B相 {{eigenvalue.pow_b}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-C">
|
||||
C相 {{eigenvalue.pow_c}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line">
|
||||
<view class="eigenvalues-content-line-left">
|
||||
跳变段电压变化率(V/ms)
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right">
|
||||
<view class="eigenvalues-content-line-right-A">
|
||||
A相 {{eigenvalue.voltagechange_Va}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-B">
|
||||
B相 {{eigenvalue.voltagechange_Vb}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-C">
|
||||
C相 {{eigenvalue.voltagechange_Vc}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line">
|
||||
<view class="eigenvalues-content-line-left">
|
||||
相位跳变(°)
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right">
|
||||
<view class="eigenvalues-content-line-right-A">
|
||||
A相 {{eigenvalue.angle_diff_ap}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-B">
|
||||
B相 {{eigenvalue.angle_diff_bp}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-C">
|
||||
C相 {{eigenvalue.angle_diff_cp}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="eigenvalues-content-line">
|
||||
<view class="eigenvalues-content-line-left">
|
||||
特征幅值(V)
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right">
|
||||
<view class="eigenvalues-content-line-right-A">
|
||||
A相 {{eigenvalue.ua_min}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-B">
|
||||
B相 {{eigenvalue.ub_min}}
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right-C">
|
||||
C相 {{eigenvalue.uc_min}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="eigenvalues-content-line2">
|
||||
<view class="eigenvalues-content-line-left2">
|
||||
<view class="eigenvalues-content-line-left2-left">
|
||||
持续时间(ms)
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-left2-right">
|
||||
{{eigenvalue.hold_time_dq}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right2">
|
||||
<view class="eigenvalues-content-line-right2-left">
|
||||
不平衡度(%)
|
||||
</view>
|
||||
<view class="eigenvalues-content-line-right2-right">
|
||||
{{eigenvalue.bph_max_value}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="eigenvalues-content-line3">
|
||||
<view class="eigenvalues-content-line3-left2">
|
||||
<view class="eigenvalues-content-line3-left2-left">
|
||||
不平衡度(%):
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-left2-right">
|
||||
{{eigenvalue.bph_max_value}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2">
|
||||
<!-- <view class="eigenvalues-content-line3-right2-left">
|
||||
暂降原因:
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2-right">
|
||||
{{eigenvalue.sagReason}}
|
||||
</view> -->
|
||||
<view class="eigenvalues-content-line3-right2-left">
|
||||
暂降类型:
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2-right">
|
||||
{{eigenvalue.sagType}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="eigenvalues-content-line3">
|
||||
<view class="eigenvalues-content-line3-left2">
|
||||
<view class="eigenvalues-content-line3-left2-left">
|
||||
暂降类型:
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-left2-right">
|
||||
{{eigenvalue.sagType}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2">
|
||||
<view class="eigenvalues-content-line3-right2-left">
|
||||
</view>
|
||||
<view class="eigenvalues-content-line3-right2-right">
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 波形图 -->
|
||||
<view class="waveform-block">
|
||||
<view class="waveform-title">
|
||||
<image src="/static/pic/rectangle.png" class="waveform-title-left"></image>
|
||||
<view class="waveform-title-right">
|
||||
瞬时波形图
|
||||
</view>
|
||||
</view>
|
||||
<image :src="wave.instantWaveUrl" class="waveform-pic" @click="previewPic(wave.instantWaveUrl)" v-if="wave.instantWaveUrl"></image>
|
||||
<view class="waveform-pic no-pic-text" v-else>
|
||||
暂无瞬时波形图
|
||||
</view>
|
||||
</view>
|
||||
<view class="waveform-block">
|
||||
<view class="waveform-title">
|
||||
<image src="/static/pic/rectangle.png" class="waveform-title-left"></image>
|
||||
<view class="waveform-title-right">
|
||||
RMS波形图
|
||||
</view>
|
||||
</view>
|
||||
<image :src="wave.rmsWaveUrl" class="waveform-pic" @click="previewPic(wave.rmsWaveUrl)" v-if="wave.rmsWaveUrl"></image>
|
||||
<view class="waveform-pic no-pic-text" v-else>
|
||||
暂无RMS波形图
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="error-block" v-else-if="errorFlag==1">
|
||||
<view class="error-text">
|
||||
网络出错请重试
|
||||
</view>
|
||||
<button class="retry_button" @click="retry">重试</button>
|
||||
</view>
|
||||
<view class="error-block" v-else>
|
||||
<view class="error-text">
|
||||
加载中...
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag: 1,
|
||||
showFlag: 0,
|
||||
pageName: '暂态消息详情',
|
||||
radioFlag: 0,
|
||||
eventDetailIndex: '',
|
||||
errorFlag: 2,
|
||||
baseInfo: {},
|
||||
eigenvalueList: [],
|
||||
wave: {},
|
||||
sendAgain: '更新',
|
||||
second: 60,
|
||||
sendAgainFlag: 0,
|
||||
backNumber:0,
|
||||
eventMsgIndex:'',
|
||||
scrollHeight:'',
|
||||
loadingFlag:false,
|
||||
disabledFlag:false,
|
||||
judgeFlag:0,
|
||||
sagReason:'',
|
||||
transientName:'',
|
||||
sucessNum:0,
|
||||
baseFlag:0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
scrollH(){
|
||||
var that =this;
|
||||
var sys = uni.getSystemInfoSync();
|
||||
var winWidth = sys.windowWidth;
|
||||
var winrate = 750/winWidth;
|
||||
var winHeight= sys.windowHeight;
|
||||
var statusBarHeight = sys.statusBarHeight;
|
||||
that.scrollHeight = parseInt((winHeight-statusBarHeight)*winrate-94)+'rpx';
|
||||
},
|
||||
changeRadioFlag(flag) {
|
||||
this.radioFlag = flag;
|
||||
},
|
||||
confirmJudge(judgeFlag){
|
||||
var that = this;
|
||||
var content = '';
|
||||
if(uni.getStorageSync('userInfo').roleCode!=0){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您暂无评价权限',
|
||||
showCancel: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(judgeFlag==0){
|
||||
content='确认对设备无影响?'
|
||||
}else{
|
||||
content='确认对设备有影响?'
|
||||
}
|
||||
uni.showModal({
|
||||
title:'提示',
|
||||
content: content,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailEvaluate',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex,
|
||||
evaluate: judgeFlag,
|
||||
userId: uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '评价更新成功',
|
||||
showCancel: false
|
||||
})
|
||||
that.judgeFlag= judgeFlag;
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '评价更新失败,请重试',
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.updateEvaluate();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (res.cancel) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
eventDetailBaseInfo() {
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailBaseInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventMsgIndex: that.eventMsgIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.baseInfo = eval(res.data.data);
|
||||
that.baseInfo.showTime = that.formatTime_mills(that.baseInfo.timeID);
|
||||
// that.radioFlag = that.baseInfo.evaluate;
|
||||
if(that.baseInfo.eventValue<100){
|
||||
that.transientName='暂降'
|
||||
}else{
|
||||
that.transientName='暂升'
|
||||
}
|
||||
that.judgeFlag = that.baseInfo.evaluate;
|
||||
that.sucessNum++;
|
||||
that.baseFlag=0;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
} else {
|
||||
that.sucessNum++;
|
||||
that.baseFlag=1
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.sucessNum++;
|
||||
that.baseFlag=1
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
eventDetailEigenvalue() {
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailEigenvalue',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.backNumber=res.data.backNumber;
|
||||
if(that.backNumber>0){
|
||||
that.sagReason=res.data.sagReason;
|
||||
that.eigenvalueList = eval(res.data.data);
|
||||
}
|
||||
that.sucessNum++;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
} else {
|
||||
that.backNumber = 0;
|
||||
that.sucessNum++;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.backNumber = 0;
|
||||
that.sucessNum++;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
eventDetailWave() {
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailWave',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.wave = eval(res.data.data);
|
||||
that.sucessNum++;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
} else {
|
||||
that.sucessNum++;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.sucessNum++;
|
||||
if(that.sucessNum==3){
|
||||
uni.hideLoading();
|
||||
that.errorFlag=that.baseFlag;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
updateEvaluate() {
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
that.sendAgainFlag = 1
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailEvaluate',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex,
|
||||
evaluate: that.radioFlag,
|
||||
userId: uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '评价更新成功',
|
||||
showCancel: false
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '评价更新失败,请重试',
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.updateEvaluate();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (that.second != 60) {
|
||||
return;
|
||||
}
|
||||
that.second--;
|
||||
var intervalID = setInterval(function() {
|
||||
that.sendAgain = '更新(' + that.second-- + "S)";
|
||||
}, 1000);
|
||||
setTimeout(function() {
|
||||
clearInterval(intervalID);
|
||||
that.sendAgain = "更新";
|
||||
that.second = 60;
|
||||
that.sendAgainFlag = 0
|
||||
}, 61000)
|
||||
}
|
||||
},
|
||||
applyReport() {
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
that.disabledFlag=true;
|
||||
that.loadingFlag=true;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/report/eventDetailReportApply',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex,
|
||||
userId: uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
if (res.data.resultCode == '10000') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '申请报告成功',
|
||||
showCancel: false
|
||||
})
|
||||
that.eventDetailBaseInfo();
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: that.showError(res.data.msgCode,res.data.msg),
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.applyReport();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
that.loadingFlag=false;
|
||||
that.disabledFlag=false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
downloadReport() {
|
||||
var that = this;
|
||||
if(that.judgeLogin()){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/report/eventDetailReportDownLoad',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex,
|
||||
userId: uni.getStorageSync('userInfo').userId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.resultCode == '10000') {
|
||||
uni.showLoading({
|
||||
title:'正在下载',
|
||||
mask:true
|
||||
})
|
||||
uni.downloadFile({
|
||||
url: res.data.data.reportUrl,
|
||||
success: (r) => {
|
||||
uni.hideLoading();
|
||||
if (r.statusCode === 200) {
|
||||
uni.saveFile({
|
||||
tempFilePath: r.tempFilePath,
|
||||
success: function(res) {
|
||||
var savedFilePath = res.savedFilePath;
|
||||
uni.showModal({
|
||||
title: '下载报告成功',
|
||||
// content: '文档保存在:jxkj/CanNengApp/apps/'+savedFilePath,
|
||||
content: '下载成功,是否直接打开',
|
||||
success: function(re) {
|
||||
if (re.confirm) {
|
||||
uni.openDocument({
|
||||
filePath: r.tempFilePath
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '下载报告失败,请重试',
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.downloadReport();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '下载报告失败,请重试',
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.downloadReport();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '下载报告失败,请重试',
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.downloadReport();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '下载报告失败,请重试',
|
||||
confirmText: '重试',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.downloadReport();
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
previewPic(url) {
|
||||
if(url==null||url==undefined||url==''||url.length==0){
|
||||
return
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current:0,
|
||||
longPressActions: {
|
||||
itemList: ['保存图片'],
|
||||
success: function(data) {
|
||||
if (data.tapIndex == 0) {
|
||||
uni.showLoading({
|
||||
title: "图片保存中"
|
||||
});
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success(result) {
|
||||
var tempFilePath = result.tempFilePath;
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
success() {
|
||||
uni.showToast({
|
||||
icon: "success",
|
||||
title: "保存成功",
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.showModal({
|
||||
title: '保存失败',
|
||||
content: err.errMsg,
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
retry(){
|
||||
this.eventDetailBaseInfo();
|
||||
this.eventDetailEigenvalue();
|
||||
this.eventDetailWave();
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.scrollH();
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
this.eventDetailIndex = e.eventDetailIndex;
|
||||
this.eventMsgIndex = e.eventMsgIndex;
|
||||
this.eventDetailBaseInfo();
|
||||
this.eventDetailEigenvalue();
|
||||
this.eventDetailWave();
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("transientDetails.css");
|
||||
</style>
|
||||
34
pages/transientWave/transientWave.css
Normal file
34
pages/transientWave/transientWave.css
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 波形图开始 */
|
||||
.waveform-block{
|
||||
height: 562rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20rpx;
|
||||
background:rgba(255,255,255,1);
|
||||
}
|
||||
.waveform-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
.waveform-title-left{
|
||||
margin-left: 40rpx;
|
||||
width: 6rpx;
|
||||
height: 34rpx;
|
||||
}
|
||||
.waveform-title-right{
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
.waveform-pic{
|
||||
width: 670rpx;
|
||||
height: 424rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
/* 波形图结束 */
|
||||
135
pages/transientWave/transientWave.vue
Normal file
135
pages/transientWave/transientWave.vue
Normal file
@@ -0,0 +1,135 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageNameFlag="pageNameFlag" :showFlag="showFlag" :pageName='pageName'></back>
|
||||
<!-- 波形图 -->
|
||||
<view class="waveform-block" v-if="wave.instantWaveUrl">
|
||||
<view class="waveform-title">
|
||||
<image src="/static/pic/rectangle.png" class="waveform-title-left"></image>
|
||||
<view class="waveform-title-right">
|
||||
瞬时波形图
|
||||
</view>
|
||||
</view>
|
||||
<image :src="wave.instantWaveUrl" class="waveform-pic" @click="previewPic(wave.instantWaveUrl)"></image>
|
||||
</view>
|
||||
<view class="waveform-block" v-if="wave.rmsWaveUrl">
|
||||
<view class="waveform-title">
|
||||
<image src="/static/pic/rectangle.png" class="waveform-title-left"></image>
|
||||
<view class="waveform-title-right">
|
||||
RMS波形图
|
||||
</view>
|
||||
</view>
|
||||
<image :src="wave.rmsWaveUrl" class="waveform-pic" @click="previewPic(wave.rmsWaveUrl)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNameFlag: 1,
|
||||
showFlag: 0,
|
||||
pageName: '暂态波形图',
|
||||
eventDetailIndex: '',
|
||||
wave: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
eventDetailWave() {
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/eventmsg/eventDetailWave',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eventDetailIndex: that.eventDetailIndex
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify: false,
|
||||
success: (res) => {
|
||||
if (res.data.resultCode == '10000') {
|
||||
that.wave = eval(res.data.data);
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
that.errorFlag = 1
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
fail: (re) => {
|
||||
uni.hideLoading();
|
||||
that.errorFlag = 1
|
||||
}
|
||||
});
|
||||
},
|
||||
previewPic(url) {
|
||||
if(url==null||url==undefined||url==''||url.length==0){
|
||||
return
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current:0,
|
||||
longPressActions: {
|
||||
itemList: ['保存图片'],
|
||||
success: function(data) {
|
||||
if (data.tapIndex == 0) {
|
||||
uni.showLoading({
|
||||
title: "图片保存中"
|
||||
});
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success(result) {
|
||||
var tempFilePath = result.tempFilePath;
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: tempFilePath,
|
||||
success() {
|
||||
uni.showToast({
|
||||
icon: "success",
|
||||
title: "保存成功",
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.showModal({
|
||||
title: '保存失败',
|
||||
content: err.errMsg,
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
var that = this;
|
||||
that.eventDetailIndex = e.eventDetailIndex;
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
that.eventDetailWave();
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("transientWave.css");
|
||||
</style>
|
||||
24
pages/us/us.css
Normal file
24
pages/us/us.css
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 重试页面开始 */
|
||||
.error-block{
|
||||
height: 60%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
margin-top: 300rpx;
|
||||
}
|
||||
.retry_button{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 10%;
|
||||
}
|
||||
.us-pic{
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
}
|
||||
.us-text{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
/* 重试页面结束 */
|
||||
33
pages/us/us.vue
Normal file
33
pages/us/us.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<view>
|
||||
<back :pageName='pageName' :pageNameFlag="pageNameFlag"></back>
|
||||
<view class="error-block">
|
||||
<image src="/static/pic/aboutUs.png" class="us-pic"></image>
|
||||
<view class="us-text">
|
||||
灿能云 1.2.1
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageName:'关于我们',
|
||||
pageNameFlag:1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("us.css");
|
||||
</style>
|
||||
30
pages/userAgreement/userAgreement.vue
Normal file
30
pages/userAgreement/userAgreement.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<web-view src="http://112.4.156.196:8040/shiningCloud/business/userAgreement"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showFlag:0,
|
||||
pageNameFlag:1,
|
||||
pageName:'用户协议',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
components: {
|
||||
back
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
123
pages/vercode/vercode.css
Normal file
123
pages/vercode/vercode.css
Normal file
@@ -0,0 +1,123 @@
|
||||
.body{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
/* 主体开始 */
|
||||
.content-block{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
margin-left: 40rpx;
|
||||
margin-top: 28rpx;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
/* 文字开始 */
|
||||
.login-explain{
|
||||
/* 字体PingFangSC-Regular */
|
||||
font-size: 56rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.login-detail{
|
||||
width: 494rpx;
|
||||
height: 40rpx;
|
||||
margin-top: 14rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.login-agreement{
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.login-user{
|
||||
font-size: 28rpx;
|
||||
color: #517FB0;
|
||||
white-space: nowrap;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
/* 文字结束 */
|
||||
|
||||
/* 验证码开始 */
|
||||
.num-block{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 116rpx;
|
||||
}
|
||||
.num-view{
|
||||
width: 80rpx;
|
||||
height: 92rpx;
|
||||
border-bottom: solid 1px #5FA5F0;
|
||||
font-size: 54rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.num-view-none{
|
||||
width: 80rpx;
|
||||
height: 92rpx;
|
||||
border-bottom: solid 1px #D9D9D9;
|
||||
}
|
||||
.num{
|
||||
text-align: center;
|
||||
font-size: 54rpx;
|
||||
}
|
||||
/* 验证码结束 */
|
||||
.receive-again-y{
|
||||
font-size: 24rpx;
|
||||
margin-top: 34rpx;
|
||||
color: #507EB0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.receive-again-n{
|
||||
font-size: 24rpx;
|
||||
margin-top: 34rpx;
|
||||
color: #999999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* 主体结束 */
|
||||
/* 键盘开始 */
|
||||
.keyboard{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
height: 514rpx;
|
||||
background: rgba(210,213,219,0.90);
|
||||
margin-top: 222rpx;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.keyboard-line{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
.button-item{
|
||||
width: 234rpx;
|
||||
height: 92rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 1px 0 0 #848688;
|
||||
border-radius: 5px;
|
||||
margin: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.button-item-delete{
|
||||
width: 234rpx;
|
||||
height: 92rpx;
|
||||
border-radius: 5px;
|
||||
margin: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.delete{
|
||||
width: 46rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
/* 键盘结束 */
|
||||
193
pages/vercode/vercode.vue
Normal file
193
pages/vercode/vercode.vue
Normal file
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<back :errorMsg="errorMsg" :showFlag="showFlag"></back>
|
||||
<view class="content-block">
|
||||
<view class="login-explain">输入短信验证码</view>
|
||||
<view class="login-detail">
|
||||
<view class="login-agreement">验证码已发送至</view>
|
||||
<view class="login-user">(+86)</view>
|
||||
<view class="login-user">{{phoneNum}}</view>
|
||||
</view>
|
||||
<view class="num-block">
|
||||
<view class="num-view" v-if="valueList[0]!=null&&valueList[0]!=undefined">
|
||||
{{valueList[0]}}
|
||||
</view>
|
||||
<view class="num-view-none" v-else>
|
||||
</view>
|
||||
<view class="num-view" v-if="valueList[1]!=null&&valueList[1]!=undefined">
|
||||
{{valueList[1]}}
|
||||
</view>
|
||||
<view class="num-view-none" v-else>
|
||||
</view>
|
||||
<view class="num-view" v-if="valueList[2]!=null&&valueList[2]!=undefined">
|
||||
{{valueList[2]}}
|
||||
</view>
|
||||
<view class="num-view-none" v-else>
|
||||
</view>
|
||||
<view class="num-view" v-if="valueList[3]!=null&&valueList[3]!=undefined">
|
||||
{{valueList[3]}}
|
||||
</view>
|
||||
<view class="num-view-none" v-else>
|
||||
</view>
|
||||
<view class="num-view" v-if="valueList[4]!=null&&valueList[4]!=undefined">
|
||||
{{valueList[4]}}
|
||||
</view>
|
||||
<view class="num-view-none" v-else>
|
||||
</view>
|
||||
<view class="num-view" v-if="valueList[5]!=null&&valueList[5]!=undefined">
|
||||
{{valueList[5]}}
|
||||
</view>
|
||||
<view class="num-view-none" v-else>
|
||||
</view>
|
||||
</view>
|
||||
<view class="receive-again-y" @click="getVerCode" v-if="vercode=='重新获取'">重新获取</view>
|
||||
<view class="receive-again-n" v-else>{{vercode}}</view>
|
||||
</view>
|
||||
<keyboard @valueList="bindKeyEvent"></keyboard>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from "../../components/back.vue";
|
||||
import keyboard from "../../components/keyboard.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
errorMsg:'',
|
||||
showFlag:0,
|
||||
valueList:[],
|
||||
vercode:'重新获取',
|
||||
second:60
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindKeyEvent(val){
|
||||
var that = this;
|
||||
that.valueList = val
|
||||
if(that.valueList.length==6){
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/login',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
key:that.valueList.join(''),
|
||||
type:0
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
if(res.data.resultCode=='10000'){
|
||||
var userInfo = eval(res.data.data);
|
||||
userInfo.phoneNum=that.phoneNum;
|
||||
uni.setStorageSync("loginTime",new Date())
|
||||
uni.setStorageSync('userInfo',userInfo);
|
||||
uni.setStorageSync('loginType',0);
|
||||
uni.switchTab({
|
||||
url:'../information/information'
|
||||
})
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getVerCode(e){
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNum,
|
||||
devCode:that.cid(),
|
||||
type:0
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
sslVerify:false,
|
||||
success: (res) => {
|
||||
that.loadingFlag=true;
|
||||
if(res.data.resultCode=='10000'){
|
||||
|
||||
}else{
|
||||
that.errorMsg=that.showError(res.data.msgCode,res.data.msg);
|
||||
that.showFlag=1
|
||||
setTimeout(function() {
|
||||
that.errorMsg='';
|
||||
that.showFlag=0;
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
fail:(re)=>{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '网络或服务器异常,请稍后再试',
|
||||
showCancel:false,
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
this.readSecond();
|
||||
},
|
||||
readSecond(){
|
||||
var that=this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.second--;
|
||||
var intervalID =setInterval(function(){
|
||||
that.vercode ="重新获取("+that.second--+")";
|
||||
},1000);
|
||||
setTimeout(function(){
|
||||
clearInterval(intervalID);
|
||||
that.vercode ="重新获取";
|
||||
that.second=60;
|
||||
},61000);
|
||||
},
|
||||
},
|
||||
|
||||
onLoad(data) {
|
||||
this.phoneNum=data.phoneNum;
|
||||
uni.hideKeyboard();
|
||||
this.readSecond();
|
||||
},
|
||||
components: {
|
||||
back,
|
||||
keyboard
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("vercode.css");
|
||||
</style>
|
||||
Reference in New Issue
Block a user