first commit
This commit is contained in:
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
unpackage/
|
||||||
|
node_modules/
|
||||||
|
node_modules
|
||||||
|
/.vscode
|
||||||
|
.hbuilderx
|
||||||
|
.vscode
|
||||||
|
jsconfig.json
|
||||||
|
.svn
|
||||||
66
App.vue
Normal file
66
App.vue
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
onLaunch: function() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const _self = this;
|
||||||
|
const _handleClickPush = function(message) {
|
||||||
|
if(typeof(message.payload)=='string'){
|
||||||
|
// var payload=eval('('+message.payload+')');
|
||||||
|
var payload= JSON.parse(message.payload)
|
||||||
|
if(payload.transmissionContent){
|
||||||
|
uni.$emit("tabNum",payload.transmissionContent);
|
||||||
|
uni.removeStorageSync("tabNum");
|
||||||
|
uni.setStorageSync("tabNum",payload.transmissionContent);
|
||||||
|
}else{
|
||||||
|
uni.$emit("tabNum",message.payload);
|
||||||
|
uni.removeStorageSync("tabNum");
|
||||||
|
uni.setStorageSync("tabNum",message.payload)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(message.payload.tabNum){
|
||||||
|
uni.$emit("tabNum",message.payload.tabNum);
|
||||||
|
uni.removeStorageSync("tabNum");
|
||||||
|
uni.setStorageSync("tabNum",message.payload.tabNum)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.switchTab({
|
||||||
|
url:'../information/information',
|
||||||
|
})
|
||||||
|
};
|
||||||
|
const _handleReceivePush=function(message){
|
||||||
|
if(message.payload&&message.payload.transmissionContent){
|
||||||
|
var payload= message.payload;
|
||||||
|
payload.local = 1;
|
||||||
|
// uni.$emit("tabNum",message.payload.transmissionContent);
|
||||||
|
// uni.setStorageSync("tabNum",message.payload.transmissionContent)
|
||||||
|
_self.createMessage(message.payload.title,JSON.stringify(payload),message.payload.content)
|
||||||
|
}else{
|
||||||
|
// var payload=eval('('+message.payload+')');
|
||||||
|
var payload= JSON.parse(message.payload)
|
||||||
|
if(payload.local&&payload.local==1){
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
// uni.setStorageSync("tabNum",payload.transmissionContent)
|
||||||
|
// uni.$emit("tabNum",payload.transmissionContent);
|
||||||
|
payload.local = 1;
|
||||||
|
// _self.setNum(1,message.title,message.content)
|
||||||
|
_self.createMessage(message.title,JSON.stringify(payload),message.content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
plus.push.addEventListener('click', _handleClickPush);
|
||||||
|
plus.push.addEventListener('receive', _handleReceivePush);
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
console.log('App Show')
|
||||||
|
},
|
||||||
|
onHide: function() {
|
||||||
|
this.setBadge(uni.getStorageSync("allNum"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
3
androidPrivacy.json
Normal file
3
androidPrivacy.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"prompt": "template"
|
||||||
|
}
|
||||||
152
components/back.vue
Normal file
152
components/back.vue
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<template name="back">
|
||||||
|
<!-- 总高94rpx -->
|
||||||
|
<view class="back-body">
|
||||||
|
<view class="title-padding">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="back-block" v-if="backShowFlag">
|
||||||
|
<view @click="backTo" class="backTo-block">
|
||||||
|
<view class="back-view">
|
||||||
|
<image class="back" src="/static/pic/back.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="back-text">返回</view>
|
||||||
|
</view>
|
||||||
|
<view class="pageName-block" v-if="pageNameFlag==1">{{pageName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="back-solid"></view>
|
||||||
|
<view class="errorMsg-block" v-if="showFlag==1">
|
||||||
|
<view class="errorMsg" >
|
||||||
|
<view class="text">{{errorMsg}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name:"back",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
backTo(){
|
||||||
|
uni.navigateBack({
|
||||||
|
delta:1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
errorMsg:'',//报错提示信息
|
||||||
|
showFlag:0,//0-不显示 1-显示报错内容
|
||||||
|
pageName:'',//页面名称
|
||||||
|
pageNameFlag:0,//0-不显示 1-显示页面名称
|
||||||
|
backShowFlag: {
|
||||||
|
type: Number,
|
||||||
|
default: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.title-padding{
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
}
|
||||||
|
.back-body{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
position: relative;
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
/* 返回 */
|
||||||
|
.back-block{
|
||||||
|
height: 62rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-left: 18rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.backTo-block{
|
||||||
|
height: 62rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.back-view{
|
||||||
|
width: 18rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.back{
|
||||||
|
width: 18rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.back-text{
|
||||||
|
height: 32rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-left: 18rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
/* 退出-结束 */
|
||||||
|
.back-solid{
|
||||||
|
height: 2rpx;
|
||||||
|
background: rgba(240,240,240,1);
|
||||||
|
}
|
||||||
|
/* 错误提示开始 */
|
||||||
|
.errorMsg-block{
|
||||||
|
height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 150rpx;
|
||||||
|
left: 225rpx;
|
||||||
|
}
|
||||||
|
.errorMsg{
|
||||||
|
width: 300rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #FF6A0B;
|
||||||
|
border-radius: 14.5px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
/* 错误提示结束 */
|
||||||
|
/* 页面名开始 */
|
||||||
|
.pageName-block{
|
||||||
|
width: 250rpx;
|
||||||
|
font-size:32rpx;
|
||||||
|
color:rgba(23,31,36,1);
|
||||||
|
/* margin-left: 198rpx; */
|
||||||
|
font-weight: 400;
|
||||||
|
position: absolute;
|
||||||
|
left: 250rpx;
|
||||||
|
right: 250rpx;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
/* 页面名结束 */
|
||||||
|
</style>
|
||||||
22
components/echarts/echarts.simple.min.js
vendored
Normal file
22
components/echarts/echarts.simple.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
104
components/keyboard.vue
Normal file
104
components/keyboard.vue
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
<template name = "keyboard">
|
||||||
|
<view class="keyboard">
|
||||||
|
<view class="keyboard-line">
|
||||||
|
<button data-val="1" @click="bindKeyEvent(1)" class="button-item">1</button>
|
||||||
|
<button data-val="2" @click="bindKeyEvent(2)" class="button-item">2</button>
|
||||||
|
<button data-val="3" @click="bindKeyEvent(3)" class="button-item">3</button>
|
||||||
|
</view>
|
||||||
|
<view class="keyboard-line">
|
||||||
|
<button data-val="4" @click="bindKeyEvent(4)" class="button-item">4</button>
|
||||||
|
<button data-val="5" @click="bindKeyEvent(5)" class="button-item">5</button>
|
||||||
|
<button data-val="6" @click="bindKeyEvent(6)" class="button-item">6</button>
|
||||||
|
</view>
|
||||||
|
<view class="keyboard-line">
|
||||||
|
<button data-val="7" @click="bindKeyEvent(7)" class="button-item">7</button>
|
||||||
|
<button data-val="8" @click="bindKeyEvent(8)" class="button-item">8</button>
|
||||||
|
<button data-val="9" @click="bindKeyEvent(9)" class="button-item">9</button>
|
||||||
|
</view>
|
||||||
|
<view class="keyboard-line">
|
||||||
|
<view data-val="" class="button-item-delete"></view>
|
||||||
|
<button data-val="0" @click="bindKeyEvent(0)" class="button-item">0</button>
|
||||||
|
<view data-val="delete" @click="bindKeyEvent('delete')" class="button-item-delete">
|
||||||
|
<image src="/static/pic/delete.png" class="delete"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name :"keyboard",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
valueList:[]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
bindKeyEvent(val){
|
||||||
|
var that = this;
|
||||||
|
if(val!='delete'){
|
||||||
|
if(that.valueList.length==6){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
that.valueList.push(val);
|
||||||
|
that.$emit('valueList',that.valueList)
|
||||||
|
}else{
|
||||||
|
if(that.valueList.length==0){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
that.valueList.pop();
|
||||||
|
that.$emit('valueList',that.valueList)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* 键盘开始 */
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
/* 键盘结束 */
|
||||||
|
</style>
|
||||||
24
components/loading/loading.vue
Normal file
24
components/loading/loading.vue
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="">
|
||||||
|
正在加载...
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
123
components/mpvue-echarts/src/echarts.vue
Normal file
123
components/mpvue-echarts/src/echarts.vue
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<template>
|
||||||
|
<canvas v-if="canvasId" class="ec-canvas" :id="canvasId" :canvasId="canvasId" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error"></canvas>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import WxCanvas from './wx-canvas';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
canvasId: {
|
||||||
|
type: String,
|
||||||
|
default: 'ec-canvas'
|
||||||
|
},
|
||||||
|
lazyLoad: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
disableTouch: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
throttleTouch: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #ifdef H5
|
||||||
|
mounted() {
|
||||||
|
if (!this.lazyLoad) this.init();
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
onReady() {
|
||||||
|
if (!this.lazyLoad) this.init();
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
methods: {
|
||||||
|
setChart(chart){
|
||||||
|
this.chart = chart
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
const { canvasId } = this;
|
||||||
|
this.ctx = wx.createCanvasContext(canvasId, this);
|
||||||
|
|
||||||
|
this.canvas = new WxCanvas(this.ctx, canvasId);
|
||||||
|
|
||||||
|
const query = wx.createSelectorQuery().in(this);
|
||||||
|
query
|
||||||
|
.select(`#${canvasId}`)
|
||||||
|
.boundingClientRect(res => {
|
||||||
|
if (!res) {
|
||||||
|
setTimeout(() => this.init(), 50);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$emit('onInit', {
|
||||||
|
width: res.width,
|
||||||
|
height: res.height
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.exec();
|
||||||
|
},
|
||||||
|
canvasToTempFilePath(opt) {
|
||||||
|
const { canvasId } = this;
|
||||||
|
this.ctx.draw(true, () => {
|
||||||
|
wx.canvasToTempFilePath({
|
||||||
|
canvasId,
|
||||||
|
...opt
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
touchStart(e) {
|
||||||
|
const { disableTouch, chart } = this;
|
||||||
|
if (disableTouch || !chart || !e.mp.touches.length) return;
|
||||||
|
const touch = e.mp.touches[0];
|
||||||
|
chart._zr.handler.dispatch('mousedown', {
|
||||||
|
zrX: touch.x,
|
||||||
|
zrY: touch.y
|
||||||
|
});
|
||||||
|
chart._zr.handler.dispatch('mousemove', {
|
||||||
|
zrX: touch.x,
|
||||||
|
zrY: touch.y
|
||||||
|
});
|
||||||
|
},
|
||||||
|
touchMove(e) {
|
||||||
|
const { disableTouch, throttleTouch, chart, lastMoveTime } = this;
|
||||||
|
if (disableTouch || !chart || !e.mp.touches.length) return;
|
||||||
|
|
||||||
|
if (throttleTouch) {
|
||||||
|
const currMoveTime = Date.now();
|
||||||
|
if (currMoveTime - lastMoveTime < 240) return;
|
||||||
|
this.lastMoveTime = currMoveTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
const touch = e.mp.touches[0];
|
||||||
|
chart._zr.handler.dispatch('mousemove', {
|
||||||
|
zrX: touch.x,
|
||||||
|
zrY: touch.y
|
||||||
|
});
|
||||||
|
},
|
||||||
|
touchEnd(e) {
|
||||||
|
const { disableTouch, chart } = this;
|
||||||
|
if (disableTouch || !chart) return;
|
||||||
|
const touch = e.mp.changedTouches ? e.mp.changedTouches[0] : {};
|
||||||
|
chart._zr.handler.dispatch('mouseup', {
|
||||||
|
zrX: touch.x,
|
||||||
|
zrY: touch.y
|
||||||
|
});
|
||||||
|
chart._zr.handler.dispatch('click', {
|
||||||
|
zrX: touch.x,
|
||||||
|
zrY: touch.y
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.ec-canvas {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
73
components/mpvue-echarts/src/wx-canvas.js
Normal file
73
components/mpvue-echarts/src/wx-canvas.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
export default class WxCanvas {
|
||||||
|
constructor(ctx, canvasId) {
|
||||||
|
this.ctx = ctx;
|
||||||
|
this.canvasId = canvasId;
|
||||||
|
this.chart = null;
|
||||||
|
|
||||||
|
WxCanvas.initStyle(ctx);
|
||||||
|
this.initEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
getContext(contextType) {
|
||||||
|
return contextType === '2d' ? this.ctx : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
setChart(chart) {
|
||||||
|
this.chart = chart;
|
||||||
|
}
|
||||||
|
|
||||||
|
attachEvent() {
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
|
detachEvent() {
|
||||||
|
// noop
|
||||||
|
}
|
||||||
|
|
||||||
|
static initStyle(ctx) {
|
||||||
|
const styles = ['fillStyle', 'strokeStyle', 'globalAlpha',
|
||||||
|
'textAlign', 'textBaseAlign', 'shadow', 'lineWidth',
|
||||||
|
'lineCap', 'lineJoin', 'lineDash', 'miterLimit', 'fontSize'];
|
||||||
|
|
||||||
|
styles.forEach((style) => {
|
||||||
|
Object.defineProperty(ctx, style, {
|
||||||
|
set: (value) => {
|
||||||
|
if ((style !== 'fillStyle' && style !== 'strokeStyle')
|
||||||
|
|| (value !== 'none' && value !== null)
|
||||||
|
) {
|
||||||
|
ctx[`set${style.charAt(0).toUpperCase()}${style.slice(1)}`](value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
ctx.createRadialGradient = () => ctx.createCircularGradient(arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
initEvent() {
|
||||||
|
this.event = {};
|
||||||
|
const eventNames = [{
|
||||||
|
wxName: 'touchStart',
|
||||||
|
ecName: 'mousedown',
|
||||||
|
}, {
|
||||||
|
wxName: 'touchMove',
|
||||||
|
ecName: 'mousemove',
|
||||||
|
}, {
|
||||||
|
wxName: 'touchEnd',
|
||||||
|
ecName: 'mouseup',
|
||||||
|
}, {
|
||||||
|
wxName: 'touchEnd',
|
||||||
|
ecName: 'click',
|
||||||
|
}];
|
||||||
|
|
||||||
|
eventNames.forEach((name) => {
|
||||||
|
this.event[name.wxName] = (e) => {
|
||||||
|
const touch = e.mp.touches[0];
|
||||||
|
this.chart._zr.handler.dispatch(name.ecName, {
|
||||||
|
zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
|
||||||
|
zrY: name.wxName === 'tap' ? touch.clientY : touch.y,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
52
components/personalModule.vue
Normal file
52
components/personalModule.vue
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<template name = 'personalModule'>
|
||||||
|
<view class="personalModule-body">
|
||||||
|
<image :src="imgsrc" class="pic"></image>
|
||||||
|
<view class="name-block">
|
||||||
|
{{name}}
|
||||||
|
</view>
|
||||||
|
<image src="/static/pic/jump.png" class="jumpTo"></image>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name:'personalModule',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
imgsrc:'',
|
||||||
|
name:''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.personalModule-body{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
height:100rpx;
|
||||||
|
background: rgba(255,255,255,1);
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
.pic{
|
||||||
|
width: 44rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
margin-left: 40rpx;
|
||||||
|
}
|
||||||
|
.name-block{
|
||||||
|
margin-left: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(48,50,51,1);
|
||||||
|
width: 552rpx;
|
||||||
|
}
|
||||||
|
.jumpTo{
|
||||||
|
margin-left: 20rpx;
|
||||||
|
width: 44rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
74
components/quit.vue
Normal file
74
components/quit.vue
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<template name="quit">
|
||||||
|
<view class="quit-body">
|
||||||
|
<view class="quit-block">
|
||||||
|
<image class="quit" src="/static/pic/normal.png" @click="quitTo"></image>
|
||||||
|
</view>
|
||||||
|
<view class="errorMsg" v-if="showFlag==1">
|
||||||
|
<view class="text">{{errorMsg}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name:"quit",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
quitTo(){
|
||||||
|
uni.navigateBack({
|
||||||
|
delta:1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
errorMsg:'',
|
||||||
|
showFlag:0
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.quit-body{
|
||||||
|
width: 300rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-top: 100rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
/* 退出 */
|
||||||
|
.quit-block{
|
||||||
|
width: 34rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.quit{
|
||||||
|
width: 34rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
}
|
||||||
|
/* 退出-结束 */
|
||||||
|
/* 错误提示开始 */
|
||||||
|
.errorMsg{
|
||||||
|
width: 3600rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #FF6A0B;
|
||||||
|
border-radius: 14.5px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 200rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 26rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
/* 错误提示结束 */
|
||||||
|
</style>
|
||||||
165
components/u-charts/component.vue
Normal file
165
components/u-charts/component.vue
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<canvas v-if="canvasId" :id="canvasId" :canvasId="canvasId" :style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"
|
||||||
|
@touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error">
|
||||||
|
</canvas>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uCharts from './u-charts.js';
|
||||||
|
var canvases = {};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
chartType: {
|
||||||
|
required: true,
|
||||||
|
type: String,
|
||||||
|
default: 'column'
|
||||||
|
},
|
||||||
|
opts: {
|
||||||
|
required: true,
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
canvasId: {
|
||||||
|
type: String,
|
||||||
|
default: 'u-canvas',
|
||||||
|
},
|
||||||
|
cWidth: {
|
||||||
|
default: 375,
|
||||||
|
},
|
||||||
|
cHeight: {
|
||||||
|
default: 250,
|
||||||
|
},
|
||||||
|
pixelRatio: {
|
||||||
|
type: Number,
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
switch (this.chartType) {
|
||||||
|
case 'column':
|
||||||
|
this.initColumnChart();
|
||||||
|
break;
|
||||||
|
case 'line':
|
||||||
|
this.initLineChart();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initColumnChart() {
|
||||||
|
canvases[this.canvasId] = new uCharts({
|
||||||
|
$this: this,
|
||||||
|
canvasId: this.canvasId,
|
||||||
|
type: 'column',
|
||||||
|
legend: true,
|
||||||
|
fontSize: 11,
|
||||||
|
background: '#FFFFFF',
|
||||||
|
pixelRatio: this.pixelRatio,
|
||||||
|
animation: true,
|
||||||
|
categories: this.opts.categories,
|
||||||
|
series: this.opts.series,
|
||||||
|
enableScroll: true,
|
||||||
|
xAxis: {
|
||||||
|
disableGrid: true,
|
||||||
|
itemCount: 4,
|
||||||
|
scrollShow: true
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
//disabled:true
|
||||||
|
},
|
||||||
|
dataLabel: true,
|
||||||
|
width: this.cWidth * this.pixelRatio,
|
||||||
|
height: this.cHeight * this.pixelRatio,
|
||||||
|
extra: {
|
||||||
|
column: {
|
||||||
|
type: 'group',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
initLineChart() {
|
||||||
|
canvases[this.canvasId] = new uCharts({
|
||||||
|
$this: this,
|
||||||
|
canvasId: this.canvasId,
|
||||||
|
type: 'line',
|
||||||
|
fontSize: 11,
|
||||||
|
legend: true,
|
||||||
|
dataLabel: false,
|
||||||
|
dataPointShape: true,
|
||||||
|
background: '#FFFFFF',
|
||||||
|
pixelRatio: this.pixelRatio,
|
||||||
|
categories: this.opts.categories,
|
||||||
|
series: this.opts.series,
|
||||||
|
animation: true,
|
||||||
|
enableScroll: true,
|
||||||
|
xAxis: {
|
||||||
|
type: 'grid',
|
||||||
|
gridColor: '#CCCCCC',
|
||||||
|
gridType: 'dash',
|
||||||
|
dashLength: 8,
|
||||||
|
itemCount: 4,
|
||||||
|
scrollShow: true
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
gridType: 'dash',
|
||||||
|
gridColor: '#CCCCCC',
|
||||||
|
dashLength: 8,
|
||||||
|
splitNumber: 5,
|
||||||
|
min: 10,
|
||||||
|
max: 180,
|
||||||
|
format: (val) => {
|
||||||
|
return val.toFixed(0) + '元'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
width: this.cWidth * this.pixelRatio,
|
||||||
|
height: this.cHeight * this.pixelRatio,
|
||||||
|
extra: {
|
||||||
|
line: {
|
||||||
|
type: 'straight'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 这里仅作为示例传入两个参数,cid为canvas-id,newdata为更新的数据,需要更多参数请自行修改
|
||||||
|
changeData(cid,newdata) {
|
||||||
|
canvases[cid].updateData({
|
||||||
|
series: newdata.series,
|
||||||
|
categories: newdata.categories
|
||||||
|
});
|
||||||
|
},
|
||||||
|
touchStart(e) {
|
||||||
|
canvases[this.canvasId].showToolTip(e, {
|
||||||
|
format: function(item, category) {
|
||||||
|
return category + ' ' + item.name + ':' + item.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
canvases[this.canvasId].scrollStart(e);
|
||||||
|
},
|
||||||
|
touchMove(e) {
|
||||||
|
canvases[this.canvasId].scroll(e);
|
||||||
|
},
|
||||||
|
touchEnd(e) {
|
||||||
|
canvases[this.canvasId].scrollEnd(e);
|
||||||
|
},
|
||||||
|
error(e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.charts {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
flex: 1;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
5633
components/u-charts/u-charts.js
Normal file
5633
components/u-charts/u-charts.js
Normal file
File diff suppressed because it is too large
Load Diff
1
components/u-charts/u-charts.min.js
vendored
Normal file
1
components/u-charts/u-charts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
546
components/uni-calendar/calendar.js
Normal file
546
components/uni-calendar/calendar.js
Normal file
@@ -0,0 +1,546 @@
|
|||||||
|
/**
|
||||||
|
* @1900-2100区间内的公历、农历互转
|
||||||
|
* @charset UTF-8
|
||||||
|
* @github https://github.com/jjonline/calendar.js
|
||||||
|
* @Author Jea杨(JJonline@JJonline.Cn)
|
||||||
|
* @Time 2014-7-21
|
||||||
|
* @Time 2016-8-13 Fixed 2033hex、Attribution Annals
|
||||||
|
* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
|
||||||
|
* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
|
||||||
|
* @Version 1.0.3
|
||||||
|
* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
|
||||||
|
* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
|
||||||
|
*/
|
||||||
|
/* eslint-disable */
|
||||||
|
var calendar = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 农历1900-2100的润大小信息表
|
||||||
|
* @Array Of Property
|
||||||
|
* @return Hex
|
||||||
|
*/
|
||||||
|
lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
|
||||||
|
0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
|
||||||
|
0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
|
||||||
|
0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
|
||||||
|
0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
|
||||||
|
0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
|
||||||
|
0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
|
||||||
|
0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
|
||||||
|
0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
|
||||||
|
0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
|
||||||
|
0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
|
||||||
|
0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
|
||||||
|
0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
|
||||||
|
0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
|
||||||
|
0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
|
||||||
|
/** Add By JJonline@JJonline.Cn**/
|
||||||
|
0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
|
||||||
|
0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
|
||||||
|
0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
|
||||||
|
0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
|
||||||
|
0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
|
||||||
|
0x0d520], // 2100
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公历每个月份的天数普通表
|
||||||
|
* @Array Of Property
|
||||||
|
* @return Number
|
||||||
|
*/
|
||||||
|
solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天干地支之天干速查表
|
||||||
|
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天干地支之地支速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天干地支之地支速查表<=>生肖
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24节气速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1900-2100各年的24节气日期速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @return 0x string For splice
|
||||||
|
*/
|
||||||
|
sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
|
||||||
|
'97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
|
||||||
|
'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
|
||||||
|
'97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
|
||||||
|
'97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
|
||||||
|
'9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
|
||||||
|
'97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
|
||||||
|
'97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
|
||||||
|
'97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
|
||||||
|
'97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
|
||||||
|
'9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
|
||||||
|
'7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
|
||||||
|
'97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
|
||||||
|
'97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
|
||||||
|
'9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
|
||||||
|
'97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
|
||||||
|
'9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
|
||||||
|
'977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
|
||||||
|
'977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
|
||||||
|
'977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
|
||||||
|
'7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
|
||||||
|
'7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
|
||||||
|
'7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
|
||||||
|
'7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
|
||||||
|
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
|
||||||
|
'7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
|
||||||
|
'7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
|
||||||
|
'7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
|
||||||
|
'7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
|
||||||
|
'665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
|
||||||
|
'7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
|
||||||
|
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
|
||||||
|
'7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数字转中文速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期转农历称呼速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans ['初','十','廿','卅']
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月份转农历称呼速查表
|
||||||
|
* @Array Of Property
|
||||||
|
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年一整年的总天数
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number
|
||||||
|
* @eg:var count = calendar.lYearDays(1987) ;//count=387
|
||||||
|
*/
|
||||||
|
lYearDays: function (y) {
|
||||||
|
var i; var sum = 348
|
||||||
|
for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
|
||||||
|
return (sum + this.leapDays(y))
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number (0-12)
|
||||||
|
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
|
||||||
|
*/
|
||||||
|
leapMonth: function (y) { // 闰字编码 \u95f0
|
||||||
|
return (this.lunarInfo[y - 1900] & 0xf)
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年闰月的天数 若该年没有闰月则返回0
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number (0、29、30)
|
||||||
|
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
|
||||||
|
*/
|
||||||
|
leapDays: function (y) {
|
||||||
|
if (this.leapMonth(y)) {
|
||||||
|
return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
|
||||||
|
}
|
||||||
|
return (0)
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
|
||||||
|
* @param lunar Year
|
||||||
|
* @return Number (-1、29、30)
|
||||||
|
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
|
||||||
|
*/
|
||||||
|
monthDays: function (y, m) {
|
||||||
|
if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1
|
||||||
|
return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回公历(!)y年m月的天数
|
||||||
|
* @param solar Year
|
||||||
|
* @return Number (-1、28、29、30、31)
|
||||||
|
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
||||||
|
*/
|
||||||
|
solarDays: function (y, m) {
|
||||||
|
if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
|
||||||
|
var ms = m - 1
|
||||||
|
if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
|
||||||
|
return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
|
||||||
|
} else {
|
||||||
|
return (this.solarMonth[ms])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 农历年份转换为干支纪年
|
||||||
|
* @param lYear 农历年的年份数
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
toGanZhiYear: function (lYear) {
|
||||||
|
var ganKey = (lYear - 3) % 10
|
||||||
|
var zhiKey = (lYear - 3) % 12
|
||||||
|
if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
|
||||||
|
if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
|
||||||
|
return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公历月、日判断所属星座
|
||||||
|
* @param cMonth [description]
|
||||||
|
* @param cDay [description]
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
toAstro: function (cMonth, cDay) {
|
||||||
|
var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
|
||||||
|
var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
|
||||||
|
return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入offset偏移量返回干支
|
||||||
|
* @param offset 相对甲子的偏移量
|
||||||
|
* @return Cn string
|
||||||
|
*/
|
||||||
|
toGanZhi: function (offset) {
|
||||||
|
return this.Gan[offset % 10] + this.Zhi[offset % 12]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入公历(!)y年获得该年第n个节气的公历日期
|
||||||
|
* @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
|
||||||
|
* @return day Number
|
||||||
|
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
|
||||||
|
*/
|
||||||
|
getTerm: function (y, n) {
|
||||||
|
if (y < 1900 || y > 2100) { return -1 }
|
||||||
|
if (n < 1 || n > 24) { return -1 }
|
||||||
|
var _table = this.sTermInfo[y - 1900]
|
||||||
|
var _info = [
|
||||||
|
parseInt('0x' + _table.substr(0, 5)).toString(),
|
||||||
|
parseInt('0x' + _table.substr(5, 5)).toString(),
|
||||||
|
parseInt('0x' + _table.substr(10, 5)).toString(),
|
||||||
|
parseInt('0x' + _table.substr(15, 5)).toString(),
|
||||||
|
parseInt('0x' + _table.substr(20, 5)).toString(),
|
||||||
|
parseInt('0x' + _table.substr(25, 5)).toString()
|
||||||
|
]
|
||||||
|
var _calday = [
|
||||||
|
_info[0].substr(0, 1),
|
||||||
|
_info[0].substr(1, 2),
|
||||||
|
_info[0].substr(3, 1),
|
||||||
|
_info[0].substr(4, 2),
|
||||||
|
|
||||||
|
_info[1].substr(0, 1),
|
||||||
|
_info[1].substr(1, 2),
|
||||||
|
_info[1].substr(3, 1),
|
||||||
|
_info[1].substr(4, 2),
|
||||||
|
|
||||||
|
_info[2].substr(0, 1),
|
||||||
|
_info[2].substr(1, 2),
|
||||||
|
_info[2].substr(3, 1),
|
||||||
|
_info[2].substr(4, 2),
|
||||||
|
|
||||||
|
_info[3].substr(0, 1),
|
||||||
|
_info[3].substr(1, 2),
|
||||||
|
_info[3].substr(3, 1),
|
||||||
|
_info[3].substr(4, 2),
|
||||||
|
|
||||||
|
_info[4].substr(0, 1),
|
||||||
|
_info[4].substr(1, 2),
|
||||||
|
_info[4].substr(3, 1),
|
||||||
|
_info[4].substr(4, 2),
|
||||||
|
|
||||||
|
_info[5].substr(0, 1),
|
||||||
|
_info[5].substr(1, 2),
|
||||||
|
_info[5].substr(3, 1),
|
||||||
|
_info[5].substr(4, 2)
|
||||||
|
]
|
||||||
|
return parseInt(_calday[n - 1])
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入农历数字月份返回汉语通俗表示法
|
||||||
|
* @param lunar month
|
||||||
|
* @return Cn string
|
||||||
|
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
||||||
|
*/
|
||||||
|
toChinaMonth: function (m) { // 月 => \u6708
|
||||||
|
if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
|
||||||
|
var s = this.nStr3[m - 1]
|
||||||
|
s += '\u6708'// 加上月字
|
||||||
|
return s
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入农历日期数字返回汉字表示法
|
||||||
|
* @param lunar day
|
||||||
|
* @return Cn string
|
||||||
|
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
|
||||||
|
*/
|
||||||
|
toChinaDay: function (d) { // 日 => \u65e5
|
||||||
|
var s
|
||||||
|
switch (d) {
|
||||||
|
case 10:
|
||||||
|
s = '\u521d\u5341'; break
|
||||||
|
case 20:
|
||||||
|
s = '\u4e8c\u5341'; break
|
||||||
|
break
|
||||||
|
case 30:
|
||||||
|
s = '\u4e09\u5341'; break
|
||||||
|
break
|
||||||
|
default :
|
||||||
|
s = this.nStr2[Math.floor(d / 10)]
|
||||||
|
s += this.nStr1[d % 10]
|
||||||
|
}
|
||||||
|
return (s)
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
|
||||||
|
* @param y year
|
||||||
|
* @return Cn string
|
||||||
|
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
|
||||||
|
*/
|
||||||
|
getAnimal: function (y) {
|
||||||
|
return this.Animals[(y - 4) % 12]
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
|
||||||
|
* @param y solar year
|
||||||
|
* @param m solar month
|
||||||
|
* @param d solar day
|
||||||
|
* @return JSON object
|
||||||
|
* @eg:console.log(calendar.solar2lunar(1987,11,01));
|
||||||
|
*/
|
||||||
|
solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
|
||||||
|
// 年份限定、上限
|
||||||
|
if (y < 1900 || y > 2100) {
|
||||||
|
return -1// undefined转换为数字变为NaN
|
||||||
|
}
|
||||||
|
// 公历传参最下限
|
||||||
|
if (y == 1900 && m == 1 && d < 31) {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
// 未传参 获得当天
|
||||||
|
if (!y) {
|
||||||
|
var objDate = new Date()
|
||||||
|
} else {
|
||||||
|
var objDate = new Date(y, parseInt(m) - 1, d)
|
||||||
|
}
|
||||||
|
var i; var leap = 0; var temp = 0
|
||||||
|
// 修正ymd参数
|
||||||
|
var y = objDate.getFullYear()
|
||||||
|
var m = objDate.getMonth() + 1
|
||||||
|
var d = objDate.getDate()
|
||||||
|
var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
|
||||||
|
for (i = 1900; i < 2101 && offset > 0; i++) {
|
||||||
|
temp = this.lYearDays(i)
|
||||||
|
offset -= temp
|
||||||
|
}
|
||||||
|
if (offset < 0) {
|
||||||
|
offset += temp; i--
|
||||||
|
}
|
||||||
|
|
||||||
|
// 是否今天
|
||||||
|
var isTodayObj = new Date()
|
||||||
|
var isToday = false
|
||||||
|
if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
|
||||||
|
isToday = true
|
||||||
|
}
|
||||||
|
// 星期几
|
||||||
|
var nWeek = objDate.getDay()
|
||||||
|
var cWeek = this.nStr1[nWeek]
|
||||||
|
// 数字表示周几顺应天朝周一开始的惯例
|
||||||
|
if (nWeek == 0) {
|
||||||
|
nWeek = 7
|
||||||
|
}
|
||||||
|
// 农历年
|
||||||
|
var year = i
|
||||||
|
var leap = this.leapMonth(i) // 闰哪个月
|
||||||
|
var isLeap = false
|
||||||
|
|
||||||
|
// 效验闰月
|
||||||
|
for (i = 1; i < 13 && offset > 0; i++) {
|
||||||
|
// 闰月
|
||||||
|
if (leap > 0 && i == (leap + 1) && isLeap == false) {
|
||||||
|
--i
|
||||||
|
isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
|
||||||
|
} else {
|
||||||
|
temp = this.monthDays(year, i)// 计算农历普通月天数
|
||||||
|
}
|
||||||
|
// 解除闰月
|
||||||
|
if (isLeap == true && i == (leap + 1)) { isLeap = false }
|
||||||
|
offset -= temp
|
||||||
|
}
|
||||||
|
// 闰月导致数组下标重叠取反
|
||||||
|
if (offset == 0 && leap > 0 && i == leap + 1) {
|
||||||
|
if (isLeap) {
|
||||||
|
isLeap = false
|
||||||
|
} else {
|
||||||
|
isLeap = true; --i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (offset < 0) {
|
||||||
|
offset += temp; --i
|
||||||
|
}
|
||||||
|
// 农历月
|
||||||
|
var month = i
|
||||||
|
// 农历日
|
||||||
|
var day = offset + 1
|
||||||
|
// 天干地支处理
|
||||||
|
var sm = m - 1
|
||||||
|
var gzY = this.toGanZhiYear(year)
|
||||||
|
|
||||||
|
// 当月的两个节气
|
||||||
|
// bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
|
||||||
|
var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
|
||||||
|
var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
|
||||||
|
|
||||||
|
// 依据12节气修正干支月
|
||||||
|
var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
|
||||||
|
if (d >= firstNode) {
|
||||||
|
gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 传入的日期的节气与否
|
||||||
|
var isTerm = false
|
||||||
|
var Term = null
|
||||||
|
if (firstNode == d) {
|
||||||
|
isTerm = true
|
||||||
|
Term = this.solarTerm[m * 2 - 2]
|
||||||
|
}
|
||||||
|
if (secondNode == d) {
|
||||||
|
isTerm = true
|
||||||
|
Term = this.solarTerm[m * 2 - 1]
|
||||||
|
}
|
||||||
|
// 日柱 当月一日与 1900/1/1 相差天数
|
||||||
|
var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
|
||||||
|
var gzD = this.toGanZhi(dayCyclical + d - 1)
|
||||||
|
// 该日期所属的星座
|
||||||
|
var astro = this.toAstro(m, d)
|
||||||
|
|
||||||
|
return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro }
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
|
||||||
|
* @param y lunar year
|
||||||
|
* @param m lunar month
|
||||||
|
* @param d lunar day
|
||||||
|
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
|
||||||
|
* @return JSON object
|
||||||
|
* @eg:console.log(calendar.lunar2solar(1987,9,10));
|
||||||
|
*/
|
||||||
|
lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
|
||||||
|
var isLeapMonth = !!isLeapMonth
|
||||||
|
var leapOffset = 0
|
||||||
|
var leapMonth = this.leapMonth(y)
|
||||||
|
var leapDay = this.leapDays(y)
|
||||||
|
if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
|
||||||
|
if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
|
||||||
|
var day = this.monthDays(y, m)
|
||||||
|
var _day = day
|
||||||
|
// bugFix 2016-9-25
|
||||||
|
// if month is leap, _day use leapDays method
|
||||||
|
if (isLeapMonth) {
|
||||||
|
_day = this.leapDays(y, m)
|
||||||
|
}
|
||||||
|
if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
|
||||||
|
|
||||||
|
// 计算农历的时间差
|
||||||
|
var offset = 0
|
||||||
|
for (var i = 1900; i < y; i++) {
|
||||||
|
offset += this.lYearDays(i)
|
||||||
|
}
|
||||||
|
var leap = 0; var isAdd = false
|
||||||
|
for (var i = 1; i < m; i++) {
|
||||||
|
leap = this.leapMonth(y)
|
||||||
|
if (!isAdd) { // 处理闰月
|
||||||
|
if (leap <= i && leap > 0) {
|
||||||
|
offset += this.leapDays(y); isAdd = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
offset += this.monthDays(y, i)
|
||||||
|
}
|
||||||
|
// 转换闰月农历 需补充该年闰月的前一个月的时差
|
||||||
|
if (isLeapMonth) { offset += day }
|
||||||
|
// 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
|
||||||
|
var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
|
||||||
|
var calObj = new Date((offset + d - 31) * 86400000 + stmap)
|
||||||
|
var cY = calObj.getUTCFullYear()
|
||||||
|
var cM = calObj.getUTCMonth() + 1
|
||||||
|
var cD = calObj.getUTCDate()
|
||||||
|
|
||||||
|
return this.solar2lunar(cY, cM, cD)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default calendar
|
||||||
152
components/uni-calendar/uni-calendar-item.vue
Normal file
152
components/uni-calendar/uni-calendar-item.vue
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-calendar-item__weeks-box" :class="{
|
||||||
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
|
||||||
|
'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate && !weeks.isDay) ,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple
|
||||||
|
}"
|
||||||
|
@click="choiceDate(weeks)">
|
||||||
|
<view class="uni-calendar-item__weeks-box-item">
|
||||||
|
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
|
||||||
|
<text class="uni-calendar-item__weeks-box-text" :class="{
|
||||||
|
'uni-calendar-item--isDay-text': weeks.isDay,
|
||||||
|
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
|
||||||
|
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
}">{{weeks.date}}</text>
|
||||||
|
<text v-if="!lunar&&!weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{
|
||||||
|
'uni-calendar-item--isDay-text':weeks.isDay,
|
||||||
|
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
|
||||||
|
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
|
}">今天</text>
|
||||||
|
<text v-if="lunar&&!weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{
|
||||||
|
'uni-calendar-item--isDay-text':weeks.isDay,
|
||||||
|
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
|
||||||
|
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
}">{{weeks.isDay?'今天': weeks.lunar.IDayCn}}</text>
|
||||||
|
<text v-if="weeks.extraInfo&&weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{
|
||||||
|
'uni-calendar-item--extra':weeks.extraInfo.info,
|
||||||
|
'uni-calendar-item--isDay-text':weeks.isDay,
|
||||||
|
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
|
||||||
|
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
|
||||||
|
'uni-calendar-item--multiple': weeks.multiple,
|
||||||
|
'uni-calendar-item--disable':weeks.disable,
|
||||||
|
}">{{weeks.extraInfo.info}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
weeks: {
|
||||||
|
type: Object,
|
||||||
|
default () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selected: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lunar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
choiceDate(weeks) {
|
||||||
|
this.$emit('change', weeks)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uni-calendar-item__weeks-box {
|
||||||
|
flex: 1;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box-text {
|
||||||
|
font-size: $uni-font-size-base;
|
||||||
|
color: $uni-text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-lunar-text {
|
||||||
|
font-size: $uni-font-size-sm;
|
||||||
|
color: $uni-text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box-item {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item__weeks-box-circle {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: $uni-color-error;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--disable {
|
||||||
|
background-color: rgba(249, 249, 249, $uni-opacity-disabled);
|
||||||
|
color: $uni-text-color-disable;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--isDay-text {
|
||||||
|
color: $uni-color-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--isDay {
|
||||||
|
background-color: $uni-color-primary;
|
||||||
|
opacity: 0.8;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--extra {
|
||||||
|
color: $uni-color-error;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--checked {
|
||||||
|
background-color: $uni-color-primary;
|
||||||
|
color: #fff;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar-item--multiple {
|
||||||
|
background-color: $uni-color-primary;
|
||||||
|
color: #fff;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
383
components/uni-calendar/uni-calendar.vue
Normal file
383
components/uni-calendar/uni-calendar.vue
Normal file
@@ -0,0 +1,383 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-calendar" @touchmove.stop.prevent="clean">
|
||||||
|
<view v-if="!insert&&show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}" @click="clean"></view>
|
||||||
|
<view v-if="insert || show" class="uni-calendar__content" :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}">
|
||||||
|
<view v-if="!insert" class="uni-calendar__header uni-calendar--fixed-top">
|
||||||
|
<view class="uni-calendar__header-btn-box" @click="close">
|
||||||
|
<text class="uni-calendar__header-text uni-calendar--fixed-width">取消</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-calendar__header-btn-box" @click="confirm">
|
||||||
|
<text class="uni-calendar__header-text uni-calendar--fixed-width">确定</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="uni-calendar__header">
|
||||||
|
<view class="uni-calendar__header-btn-box" @click="pre">
|
||||||
|
<view class="uni-calendar__header-btn uni-calendar--left"></view>
|
||||||
|
</view>
|
||||||
|
<text class="uni-calendar__header-text">{{ (nowDate.year||'') +'年'+( nowDate.month||'') +'月'}}</text>
|
||||||
|
<view class="uni-calendar__header-btn-box" @click="next">
|
||||||
|
<view class="uni-calendar__header-btn uni-calendar--right"></view>
|
||||||
|
</view>
|
||||||
|
<text class="uni-calendar__backtoday" @click="backtoday">回到今天</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-calendar__box">
|
||||||
|
<view class="uni-calendar__box-bg">
|
||||||
|
<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
|
||||||
|
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
|
||||||
|
<uni-calendar-item :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></uni-calendar-item>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Calendar from './util.js';
|
||||||
|
import uniCalendarItem from './uni-calendar-item.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
uniCalendarItem
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
/**
|
||||||
|
* 当前日期
|
||||||
|
*/
|
||||||
|
date: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 打点日期
|
||||||
|
*/
|
||||||
|
selected: {
|
||||||
|
type: Array,
|
||||||
|
default () {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 是否开启阴历日期
|
||||||
|
*/
|
||||||
|
lunar: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
startDate: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
endDate: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 范围
|
||||||
|
*/
|
||||||
|
range: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 插入
|
||||||
|
*/
|
||||||
|
insert: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
weeks: [],
|
||||||
|
calendar: {},
|
||||||
|
nowDate: '',
|
||||||
|
aniMaskShow: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected(newVal) {
|
||||||
|
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
|
||||||
|
this.weeks = this.cale.weeks
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 获取日历方法实例
|
||||||
|
this.cale = new Calendar({
|
||||||
|
date: this.date,
|
||||||
|
selected: this.selected,
|
||||||
|
startDate: this.startDate,
|
||||||
|
endDate: this.endDate,
|
||||||
|
range: this.range,
|
||||||
|
})
|
||||||
|
this.init(this.cale.date.fullDate)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 取消穿透
|
||||||
|
clean() {},
|
||||||
|
init(date) {
|
||||||
|
this.weeks = this.cale.weeks
|
||||||
|
this.nowDate = this.calendar = this.cale.getInfo(date)
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
this.show = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.aniMaskShow = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.aniMaskShow = false
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.show = false
|
||||||
|
}, 300)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
this.setEmit('confirm')
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
change() {
|
||||||
|
if (!this.insert) return
|
||||||
|
this.setEmit('change')
|
||||||
|
},
|
||||||
|
monthSwitch() {
|
||||||
|
let {
|
||||||
|
year,
|
||||||
|
month
|
||||||
|
} = this.nowDate
|
||||||
|
this.$emit('monthSwitch', {
|
||||||
|
year,
|
||||||
|
month:Number(month)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setEmit(name) {
|
||||||
|
let {
|
||||||
|
year,
|
||||||
|
month,
|
||||||
|
date,
|
||||||
|
fullDate,
|
||||||
|
lunar,
|
||||||
|
extraInfo
|
||||||
|
} = this.calendar
|
||||||
|
this.$emit(name, {
|
||||||
|
range: this.cale.multipleStatus,
|
||||||
|
year,
|
||||||
|
month,
|
||||||
|
date,
|
||||||
|
fulldate: fullDate,
|
||||||
|
lunar,
|
||||||
|
extraInfo: extraInfo || {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
choiceDate(weeks) {
|
||||||
|
if (weeks.disable) return
|
||||||
|
this.calendar = weeks
|
||||||
|
// 设置多选
|
||||||
|
this.cale.setMultiple(this.calendar.fullDate)
|
||||||
|
this.weeks = this.cale.weeks
|
||||||
|
this.change()
|
||||||
|
},
|
||||||
|
backtoday() {
|
||||||
|
this.cale.setDate(this.date)
|
||||||
|
this.weeks = this.cale.weeks
|
||||||
|
this.nowDate = this.calendar = this.cale.getInfo(this.date)
|
||||||
|
this.change()
|
||||||
|
},
|
||||||
|
pre() {
|
||||||
|
const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
|
||||||
|
this.setDate(preDate)
|
||||||
|
this.monthSwitch()
|
||||||
|
|
||||||
|
},
|
||||||
|
next() {
|
||||||
|
const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
|
||||||
|
this.setDate(nextDate)
|
||||||
|
this.monthSwitch()
|
||||||
|
},
|
||||||
|
setDate(date) {
|
||||||
|
this.cale.setDate(date)
|
||||||
|
this.weeks = this.cale.weeks
|
||||||
|
this.nowDate = this.cale.getInfo(date)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.uni-calendar {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__mask {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: $uni-bg-color-mask;
|
||||||
|
transition-property: opacity;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
opacity: 0;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
z-index: 99;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--mask-show {
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--fixed {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
transition-property: transform;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
transform: translateY(460px);
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
z-index: 99;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--ani-show {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__content {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__header {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 50px;
|
||||||
|
border-bottom-color: $uni-border-color;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--fixed-top {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-top-color: $uni-border-color;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-top-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--fixed-width {
|
||||||
|
width: 50px;
|
||||||
|
// padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__backtoday {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 25rpx;
|
||||||
|
padding: 0 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 12px;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-bottom-left-radius: 25px;
|
||||||
|
color: $uni-text-color;
|
||||||
|
background-color: $uni-bg-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__header-text {
|
||||||
|
text-align: center;
|
||||||
|
width: 100px;
|
||||||
|
font-size: $uni-font-size-base;
|
||||||
|
color: $uni-text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__header-btn-box {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__header-btn {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-left-color: $uni-text-color-placeholder;
|
||||||
|
border-left-style: solid;
|
||||||
|
border-left-width: 2px;
|
||||||
|
border-top-color: $uni-color-subtitle;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-top-width: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--left {
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar--right {
|
||||||
|
transform: rotate(135deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-calendar__weeks {
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__weeks-item {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__box {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__box-bg {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-calendar__box-bg-text {
|
||||||
|
font-size: 200px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $uni-text-color-grey;
|
||||||
|
opacity: 0.1;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
327
components/uni-calendar/util.js
Normal file
327
components/uni-calendar/util.js
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
import CALENDAR from './calendar.js'
|
||||||
|
|
||||||
|
class Calendar {
|
||||||
|
constructor({
|
||||||
|
date,
|
||||||
|
selected,
|
||||||
|
startDate,
|
||||||
|
endDate,
|
||||||
|
range
|
||||||
|
} = {}) {
|
||||||
|
// 当前日期
|
||||||
|
this.date = this.getDate(date) // 当前初入日期
|
||||||
|
// 打点信息
|
||||||
|
this.selected = selected || [];
|
||||||
|
// 范围开始
|
||||||
|
this.startDate = startDate
|
||||||
|
// 范围结束
|
||||||
|
this.endDate = endDate
|
||||||
|
this.range = range
|
||||||
|
// 多选状态
|
||||||
|
this.multipleStatus = {
|
||||||
|
before: '',
|
||||||
|
after: '',
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
// 每周日期
|
||||||
|
this.weeks = {}
|
||||||
|
|
||||||
|
this._getWeek(this.date.fullDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任意时间
|
||||||
|
*/
|
||||||
|
getDate(date, AddDayCount = 0, str = 'day') {
|
||||||
|
if (!date) {
|
||||||
|
date = new Date()
|
||||||
|
}
|
||||||
|
if (typeof date !== 'object') {
|
||||||
|
date = date.replace(/-/g, '/')
|
||||||
|
}
|
||||||
|
const dd = new Date(date)
|
||||||
|
switch (str) {
|
||||||
|
case 'day':
|
||||||
|
dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
|
||||||
|
break
|
||||||
|
case 'month':
|
||||||
|
if (dd.getDate() === 31) {
|
||||||
|
dd.setDate(dd.getDate() + AddDayCount)
|
||||||
|
} else {
|
||||||
|
dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'year':
|
||||||
|
dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
|
||||||
|
break
|
||||||
|
}
|
||||||
|
const y = dd.getFullYear()
|
||||||
|
const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
|
||||||
|
const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
|
||||||
|
return {
|
||||||
|
fullDate: y + '-' + m + '-' + d,
|
||||||
|
year: y,
|
||||||
|
month: m,
|
||||||
|
date: d,
|
||||||
|
day: dd.getDay()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上月剩余天数
|
||||||
|
*/
|
||||||
|
_getLastMonthDays(firstDay, full) {
|
||||||
|
let dateArr = []
|
||||||
|
for (let i = firstDay; i > 0; i--) {
|
||||||
|
const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
|
||||||
|
dateArr.push({
|
||||||
|
date: beforeDate,
|
||||||
|
month: full.month - 1,
|
||||||
|
lunar: this.getlunar(full.year, full.month - 1, beforeDate),
|
||||||
|
disable: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return dateArr
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取本月天数
|
||||||
|
*/
|
||||||
|
_currentMonthDys(dateData, full) {
|
||||||
|
let dateArr = []
|
||||||
|
let fullDate = this.date.fullDate
|
||||||
|
for (let i = 1; i <= dateData; i++) {
|
||||||
|
let isinfo = false
|
||||||
|
let nowDate = full.year + '-' + (full.month < 10 ?
|
||||||
|
full.month : full.month) + '-' + (i < 10 ?
|
||||||
|
'0' + i : i)
|
||||||
|
// 是否今天
|
||||||
|
let isDay = fullDate === nowDate
|
||||||
|
// 获取打点信息
|
||||||
|
let info = this.selected && this.selected.find((item) => {
|
||||||
|
if (this.dateEqual(nowDate, item.date)) {
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 日期禁用
|
||||||
|
let disableBefore = true
|
||||||
|
let disableAfter = true
|
||||||
|
if (this.startDate) {
|
||||||
|
let dateCompBefore = this.dateCompare(this.startDate, fullDate)
|
||||||
|
disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.endDate) {
|
||||||
|
let dateCompAfter = this.dateCompare(fullDate, this.endDate)
|
||||||
|
disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
let multiples = this.multipleStatus.data
|
||||||
|
let checked = false
|
||||||
|
let multiplesStatus = -1
|
||||||
|
if (this.range) {
|
||||||
|
if (multiples) {
|
||||||
|
multiplesStatus = multiples.findIndex((item) => {
|
||||||
|
return this.dateEqual(item, nowDate)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (multiplesStatus !== -1) {
|
||||||
|
checked = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
fullDate: nowDate,
|
||||||
|
year: full.year,
|
||||||
|
date: i,
|
||||||
|
multiple: this.range ? checked : false,
|
||||||
|
month: full.month,
|
||||||
|
lunar: this.getlunar(full.year, full.month, i),
|
||||||
|
disable: !disableBefore || !disableAfter,
|
||||||
|
isDay
|
||||||
|
}
|
||||||
|
if (info) {
|
||||||
|
data.extraInfo = info
|
||||||
|
}
|
||||||
|
|
||||||
|
dateArr.push(data)
|
||||||
|
}
|
||||||
|
return dateArr
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取下月天数
|
||||||
|
*/
|
||||||
|
_getNextMonthDays(surplus, full) {
|
||||||
|
let dateArr = []
|
||||||
|
for (let i = 1; i < surplus + 1; i++) {
|
||||||
|
dateArr.push({
|
||||||
|
date: i,
|
||||||
|
month: Number(full.month) + 1,
|
||||||
|
lunar: this.getlunar(full.year, Number(full.month) + 1, i),
|
||||||
|
disable: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return dateArr
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置日期
|
||||||
|
* @param {Object} date
|
||||||
|
*/
|
||||||
|
setDate(date) {
|
||||||
|
this._getWeek(date)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取当前日期详情
|
||||||
|
* @param {Object} date
|
||||||
|
*/
|
||||||
|
getInfo(date) {
|
||||||
|
if (!date) {
|
||||||
|
date = new Date()
|
||||||
|
}
|
||||||
|
const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
|
||||||
|
return dateInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比较时间大小
|
||||||
|
*/
|
||||||
|
dateCompare(startDate, endDate) {
|
||||||
|
// 计算截止时间
|
||||||
|
startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
|
||||||
|
// 计算详细项的截止时间
|
||||||
|
endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
|
||||||
|
if (startDate <= endDate) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比较时间是否相等
|
||||||
|
*/
|
||||||
|
dateEqual(before, after) {
|
||||||
|
// 计算截止时间
|
||||||
|
before = new Date(before.replace('-', '/').replace('-', '/'))
|
||||||
|
// 计算详细项的截止时间
|
||||||
|
after = new Date(after.replace('-', '/').replace('-', '/'))
|
||||||
|
if (before.getTime() - after.getTime() === 0) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取日期范围内所有日期
|
||||||
|
* @param {Object} begin
|
||||||
|
* @param {Object} end
|
||||||
|
*/
|
||||||
|
geDateAll(begin, end) {
|
||||||
|
var arr = []
|
||||||
|
var ab = begin.split('-')
|
||||||
|
var ae = end.split('-')
|
||||||
|
var db = new Date()
|
||||||
|
db.setFullYear(ab[0], ab[1] - 1, ab[2])
|
||||||
|
var de = new Date()
|
||||||
|
de.setFullYear(ae[0], ae[1] - 1, ae[2])
|
||||||
|
var unixDb = db.getTime() - 24 * 60 * 60 * 1000
|
||||||
|
var unixDe = de.getTime() - 24 * 60 * 60 * 1000
|
||||||
|
for (var k = unixDb; k <= unixDe;) {
|
||||||
|
k = k + 24 * 60 * 60 * 1000
|
||||||
|
arr.push(this.getDate(new Date(parseInt(k))).fullDate)
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 计算阴历日期显示
|
||||||
|
*/
|
||||||
|
getlunar(year, month, date) {
|
||||||
|
return CALENDAR.solar2lunar(year, month, date)
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置打点
|
||||||
|
*/
|
||||||
|
setSelectInfo(data, value) {
|
||||||
|
this.selected = value
|
||||||
|
this._getWeek(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取多选状态
|
||||||
|
*/
|
||||||
|
setMultiple(fullDate) {
|
||||||
|
let {
|
||||||
|
before,
|
||||||
|
after
|
||||||
|
} = this.multipleStatus
|
||||||
|
if (!this.range) return
|
||||||
|
if (before && after) {
|
||||||
|
this.multipleStatus.before = ''
|
||||||
|
this.multipleStatus.after = ''
|
||||||
|
this.multipleStatus.data = []
|
||||||
|
this._getWeek(fullDate)
|
||||||
|
} else {
|
||||||
|
if (!before) {
|
||||||
|
this.multipleStatus.before = fullDate
|
||||||
|
} else {
|
||||||
|
this.multipleStatus.after = fullDate
|
||||||
|
if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
|
||||||
|
this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
|
||||||
|
} else {
|
||||||
|
this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
|
||||||
|
}
|
||||||
|
this._getWeek(fullDate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取每周数据
|
||||||
|
* @param {Object} dateData
|
||||||
|
*/
|
||||||
|
_getWeek(dateData) {
|
||||||
|
const {
|
||||||
|
fullDate,
|
||||||
|
year,
|
||||||
|
month,
|
||||||
|
date,
|
||||||
|
day
|
||||||
|
} = this.getDate(dateData)
|
||||||
|
let firstDay = new Date(year, month - 1, 1).getDay()
|
||||||
|
let currentDay = new Date(year, month, 0).getDate()
|
||||||
|
let dates = {
|
||||||
|
lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
|
||||||
|
currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
|
||||||
|
nextMonthDays: [], // 下个月开始几天
|
||||||
|
weeks: []
|
||||||
|
}
|
||||||
|
let canlender = []
|
||||||
|
const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
|
||||||
|
dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
|
||||||
|
canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
|
||||||
|
let weeks = {}
|
||||||
|
// 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
|
||||||
|
for (let i = 0; i < canlender.length; i++) {
|
||||||
|
if (i % 7 === 0) {
|
||||||
|
weeks[parseInt(i / 7)] = new Array(7)
|
||||||
|
}
|
||||||
|
weeks[parseInt(i / 7)][i % 7] = canlender[i]
|
||||||
|
}
|
||||||
|
this.canlender = canlender
|
||||||
|
this.weeks = weeks
|
||||||
|
}
|
||||||
|
|
||||||
|
//静态方法
|
||||||
|
// static init(date) {
|
||||||
|
// if (!this.instance) {
|
||||||
|
// this.instance = new Calendar(date);
|
||||||
|
// }
|
||||||
|
// return this.instance;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default Calendar
|
||||||
221
components/xuan-loading/xuan-loading.vue
Normal file
221
components/xuan-loading/xuan-loading.vue
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<view v-show="isPopup" class="loading-popup">
|
||||||
|
<view v-show="shadeShow" class="shade-popup" :class="[ani]" @click="close(shadeClick)"></view>
|
||||||
|
<view class="loading-content" :class="[ani]" :style="[{height:height,width:width,backgroundColor:backgroundColor}]">
|
||||||
|
<slot></slot>
|
||||||
|
<view class="circle-loading" v-show="!custom&&type==1">
|
||||||
|
<view class="dot">
|
||||||
|
<view class="first-dot"></view>
|
||||||
|
</view>
|
||||||
|
<view class="dot"></view>
|
||||||
|
<view class="dot"></view>
|
||||||
|
<view class="dot"></view>
|
||||||
|
</view>
|
||||||
|
<view class="rectangle-loading" v-show="!custom&&type==2">
|
||||||
|
<view class="dot"></view>
|
||||||
|
<view class="dot"></view>
|
||||||
|
<view class="dot"></view>
|
||||||
|
<view class="dot"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default{
|
||||||
|
props:{
|
||||||
|
shadeShow:{
|
||||||
|
value:Boolean,
|
||||||
|
default:true
|
||||||
|
},
|
||||||
|
shadeClick:{
|
||||||
|
value:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
|
custom:{
|
||||||
|
value:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
value:Number,
|
||||||
|
default:1
|
||||||
|
},
|
||||||
|
width:{
|
||||||
|
value:String,
|
||||||
|
default:"450rpx"
|
||||||
|
},
|
||||||
|
height:{
|
||||||
|
value:String,
|
||||||
|
default:"300rpx"
|
||||||
|
},
|
||||||
|
backgroundColor:{
|
||||||
|
value:String,
|
||||||
|
default:"#fff"
|
||||||
|
},
|
||||||
|
callback:{
|
||||||
|
type:Function,
|
||||||
|
default:function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
isPopup:false,
|
||||||
|
ani:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
open:function(){
|
||||||
|
this.isPopup=true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.ani = 'open-animation'
|
||||||
|
}, 30);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close:function(v){
|
||||||
|
let isClose = v == false ? false:true;
|
||||||
|
if(isClose){
|
||||||
|
this.ani = ''
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isPopup=false;
|
||||||
|
this.$emit('callback');
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/*弹窗*/
|
||||||
|
.loading-popup{
|
||||||
|
.shade-popup{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: #000;
|
||||||
|
opacity: 0;
|
||||||
|
transition: all .6s;
|
||||||
|
z-index: 998;
|
||||||
|
}
|
||||||
|
.shade-popup.open-animation{
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
.loading-content{
|
||||||
|
z-index: 999;
|
||||||
|
position: fixed;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin: auto;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
transform: scale(1.2);
|
||||||
|
transition: all .6s;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.loading-content.open-animation{
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*圆形加载*/
|
||||||
|
.circle-loading{
|
||||||
|
width: 150rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
position: relative;
|
||||||
|
margin: auto;
|
||||||
|
.dot{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
animation: 1.5s loadrotate cubic-bezier(0.800,0.005,0.500,1.000) infinite;
|
||||||
|
&:after,
|
||||||
|
.first-dot{
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 18rpx;
|
||||||
|
height: 18rpx;
|
||||||
|
background: #3aa4f0;
|
||||||
|
border-radius: 50%;
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
.first-dot{
|
||||||
|
background: #3aa4f0;
|
||||||
|
animation: 1.5s dotscale cubic-bezier(0.800,0.005,0.500,1.000) infinite;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@for $i from 1 through 4 {
|
||||||
|
.circle-loading {
|
||||||
|
&>.dot:nth-child(#{$i}) {
|
||||||
|
animation-delay: 0.15s*$i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes loadrotate
|
||||||
|
{
|
||||||
|
from{
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to{
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes dotscale {
|
||||||
|
0%, 10% { width: 28rpx; height: 28rpx; margin-left: -2rpx; margin-top: -5rpx;}
|
||||||
|
50% { width: 16rpx; height: 16rpx; margin-left: 0rpx; margin-top: 0rpx;}
|
||||||
|
90%, 100% { width: 28rpx; height: 28rpx; margin-left: -2rpx; margin-top: -5rpx;}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*矩形加载*/
|
||||||
|
.rectangle-loading{
|
||||||
|
height: 60px;
|
||||||
|
margin: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
.dot{
|
||||||
|
height: 50px;
|
||||||
|
width: 10px;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$color:#FF3404,skyblue, #F48f00,#39d754;
|
||||||
|
|
||||||
|
@for $i from 1 through 4 {
|
||||||
|
.rectangle-loading {
|
||||||
|
&>.dot:nth-child(#{$i}) {
|
||||||
|
animation: load-frame 1s infinite linear 0s+$i*0.12;
|
||||||
|
background: #{nth($color, $i)};
|
||||||
|
}
|
||||||
|
@if $i==4 {
|
||||||
|
&>.dot:nth-child(#{$i}) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load-frame {
|
||||||
|
0% {height: 45px;background: palegoldenrod}
|
||||||
|
50% {height: 12px;}
|
||||||
|
100% {height: 45px;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
135
main.js
Normal file
135
main.js
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import App from './App'
|
||||||
|
import encrypt from 'static/js/aes.js';
|
||||||
|
import errorMsg from 'static/js/errorMsg.js'
|
||||||
|
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
// 挂载 全局变量
|
||||||
|
Vue.prototype.devCode = "2aaecd0b124df819eda75e639a1f91fd";
|
||||||
|
// Vue.prototype.serverUrl = "https://pqmcc.com:8040/shiningCloud";
|
||||||
|
Vue.prototype.serverUrl = "http://112.4.156.196:8040/shiningCloud";
|
||||||
|
// Vue.prototype.serverUrl = "http://www.pqmcc.com:8040/shiningCloud";
|
||||||
|
Vue.prototype.key = "f81804778c89c779";
|
||||||
|
Vue.prototype.getCid=function(){
|
||||||
|
var that = this
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
var cid = plus.push.getClientInfo().clientid;
|
||||||
|
if(cid!=null&&cid!='null'&&cid!=''&&cid!=undefined){
|
||||||
|
uni.setStorageSync('cid',cid);
|
||||||
|
console.log('setCid:'+cid);
|
||||||
|
var cidAES = encrypt.Encrypt(cid,'f81804778c89c779');
|
||||||
|
uni.setStorageSync('cidAES',cidAES);
|
||||||
|
console.log('cidAES:'+cidAES);
|
||||||
|
}else{
|
||||||
|
setTimeout(function() {
|
||||||
|
that.getCid();
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
Vue.prototype.setBadge = function(num){
|
||||||
|
plus.runtime.setBadgeNumber(num);
|
||||||
|
// if(plus.device.vendor=='Apple'){
|
||||||
|
// var GeTuiSdk = plus.ios.importClass('GeTuiSdk');
|
||||||
|
// GeTuiSdk.setBadge(num);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
Vue.prototype.setNum=function(num,title,content){
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
// console.log(num)
|
||||||
|
plus.runtime.setBadgeNumber(num,{
|
||||||
|
title:title,
|
||||||
|
content:content
|
||||||
|
});
|
||||||
|
// setTimeout(function(){
|
||||||
|
// plus.runtime.setBadgeNumber(0,{
|
||||||
|
// title:title,
|
||||||
|
// content:content
|
||||||
|
// });
|
||||||
|
// },2000)
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
Vue.prototype.createMessage=function(title,payload,content){
|
||||||
|
// console.log(payload)
|
||||||
|
plus.push.createMessage(content,payload,{
|
||||||
|
cover:false,
|
||||||
|
title:title
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Vue.prototype.cid = function(){
|
||||||
|
var that= this;
|
||||||
|
var cidAES = uni.getStorageSync('cidAES');
|
||||||
|
// var cid = uni.getStorageSync('cid');
|
||||||
|
if(!(cidAES!=null&&cidAES!='null'&&cidAES!=''&&cidAES!=undefined)){
|
||||||
|
setTimeout(function() {
|
||||||
|
return that.cid();
|
||||||
|
}, 500);
|
||||||
|
}else{
|
||||||
|
return cidAES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Vue.prototype.judgeLogin = function(){
|
||||||
|
var that= this;
|
||||||
|
if((!uni.getStorageSync('userInfo').userId)||(!uni.getStorageSync('userInfo').phone)){
|
||||||
|
uni.showModal({
|
||||||
|
title:"登录出现异常",
|
||||||
|
content:"请重新登录",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.clearStorageSync();
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Vue.prototype.showError= function(msgCode,msg){
|
||||||
|
return errorMsg.judgeError(msgCode,msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
Vue.prototype.formatTime_mills=function(day) {
|
||||||
|
var d = new Date(day);
|
||||||
|
var year = d.getFullYear();
|
||||||
|
var month = (d.getMonth() + 1)<10?"0"+(d.getMonth() + 1):(d.getMonth() + 1);
|
||||||
|
var date = d.getDate()<10?"0"+d.getDate():d.getDate();
|
||||||
|
var hour = d.getHours()<10?"0"+d.getHours():d.getHours();
|
||||||
|
var minute = d.getMinutes()<10?"0"+d.getMinutes():d.getMinutes();
|
||||||
|
var second = d.getSeconds()<10?"0"+d.getSeconds():d.getSeconds();
|
||||||
|
var mills = d.getMilliseconds()<10?"00"+d.getMilliseconds():(d.getMilliseconds()<100?"0"+d.getMilliseconds():d.getMilliseconds());
|
||||||
|
return year + "-" + month + "-" + date + " " + hour+ ":" + minute + ":" + second+"."+mills;
|
||||||
|
}
|
||||||
|
Vue.prototype.formatTime_second=function(day) {
|
||||||
|
var d = new Date(day);
|
||||||
|
var year = d.getFullYear();
|
||||||
|
var month = (d.getMonth() + 1)<10?"0"+(d.getMonth() + 1):(d.getMonth() + 1);
|
||||||
|
var date = d.getDate()<10?"0"+d.getDate():d.getDate();
|
||||||
|
var hour = d.getHours()<10?"0"+d.getHours():d.getHours();
|
||||||
|
var minute = d.getMinutes()<10?"0"+d.getMinutes():d.getMinutes();
|
||||||
|
var second = d.getSeconds()<10?"0"+d.getSeconds():d.getSeconds();
|
||||||
|
return year + "-" + month + "-" + date + " " + hour+ ":" + minute + ":" + second;
|
||||||
|
}
|
||||||
|
Vue.prototype.formatTime=function(day) {
|
||||||
|
var d = new Date(day);
|
||||||
|
var year = d.getFullYear();
|
||||||
|
var month = (d.getMonth() + 1)<10?"0"+(d.getMonth() + 1):(d.getMonth() + 1);
|
||||||
|
var date = d.getDate()<10?"0"+d.getDate():d.getDate();
|
||||||
|
// var hour = d.getHours()<10?"0"+d.getHours():d.getHours();
|
||||||
|
// var minute = d.getMinutes()<10?"0"+d.getMinutes():d.getMinutes();
|
||||||
|
// var second = d.getSeconds()<10?"0"+d.getSeconds():d.getSeconds();
|
||||||
|
// var mills = d.getMilliseconds();
|
||||||
|
return year + "-" + month + "-" + date;
|
||||||
|
}
|
||||||
|
|
||||||
|
App.mpType = 'app'
|
||||||
|
|
||||||
|
const app = new Vue({
|
||||||
|
...App
|
||||||
|
})
|
||||||
|
app.$mount()
|
||||||
137
manifest.json
Normal file
137
manifest.json
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
{
|
||||||
|
"name" : "灿能云",
|
||||||
|
"appid" : "__UNI__903A5B1",
|
||||||
|
"description" : "",
|
||||||
|
"versionName" : "1.2.1",
|
||||||
|
"versionCode" : 121,
|
||||||
|
"transformPx" : false,
|
||||||
|
/* 5+App特有相关 */
|
||||||
|
"app-plus" : {
|
||||||
|
"usingComponents" : true,
|
||||||
|
"compatible" : {
|
||||||
|
"ignoreVersion" : true
|
||||||
|
},
|
||||||
|
"splashscreen" : {
|
||||||
|
"alwaysShowBeforeRender" : true,
|
||||||
|
"waiting" : true,
|
||||||
|
"autoclose" : true,
|
||||||
|
"delay" : 0
|
||||||
|
},
|
||||||
|
/* 模块配置 */
|
||||||
|
"modules" : {
|
||||||
|
"SQLite" : {},
|
||||||
|
"Messaging" : {},
|
||||||
|
"Speech" : {},
|
||||||
|
"Push" : {}
|
||||||
|
},
|
||||||
|
/* 应用发布信息 */
|
||||||
|
"distribute" : {
|
||||||
|
/* android打包配置 */
|
||||||
|
"android" : {
|
||||||
|
"permissions" : [
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
/* ios打包配置 */
|
||||||
|
"ios" : {
|
||||||
|
"UIUserInterfaceStyle" : "Automatic",
|
||||||
|
"dSYMs" : false
|
||||||
|
},
|
||||||
|
/* SDK配置 */
|
||||||
|
"sdkConfigs" : {
|
||||||
|
"push" : {
|
||||||
|
"unipush" : {}
|
||||||
|
},
|
||||||
|
"speech" : {
|
||||||
|
"ifly" : {}
|
||||||
|
},
|
||||||
|
"ad" : {}
|
||||||
|
},
|
||||||
|
"icons" : {
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
|
},
|
||||||
|
"ios" : {
|
||||||
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
|
"ipad" : {
|
||||||
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
|
},
|
||||||
|
"iphone" : {
|
||||||
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"splashscreen" : {
|
||||||
|
"useOriginalMsgbox" : true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 快应用特有相关 */
|
||||||
|
"quickapp" : {},
|
||||||
|
/* 小程序特有相关 */
|
||||||
|
"mp-weixin" : {
|
||||||
|
"appid" : "",
|
||||||
|
"setting" : {
|
||||||
|
"urlCheck" : false
|
||||||
|
},
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-alipay" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-baidu" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"mp-toutiao" : {
|
||||||
|
"usingComponents" : true
|
||||||
|
},
|
||||||
|
"h5" : {
|
||||||
|
"devServer" : {
|
||||||
|
"port" : 9000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
227
pages.json
Normal file
227
pages.json
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
{
|
||||||
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
|
{
|
||||||
|
"path": "pages/login/login"
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/spectrum/spectrum",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/condition/condition",
|
||||||
|
"style" : {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/dataIntegrityDetails/dataIntegrityDetails",
|
||||||
|
"style" : {}
|
||||||
|
},{
|
||||||
|
"path" : "pages/terminalStatus/terminalStatus",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path": "pages/chooseLine/chooseLine",
|
||||||
|
"style": {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path": "pages/index/index",
|
||||||
|
"style": {
|
||||||
|
// "navigationBarTitleText": "uni-app"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/report/report",
|
||||||
|
"style": {
|
||||||
|
// "backgroundColor":"#F0F0F0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/information/information",
|
||||||
|
"style": {
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/me/me",
|
||||||
|
"style": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/levelUp/levelUp",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/transientDetails/transientDetails",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/preview/preview",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/vercode/vercode",
|
||||||
|
"style": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/forgetPassword/forgetPassword",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/forgetPasswordVercode/forgetPasswordVercode",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/setNewPassword/setNewPassword",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/fastLogin/fastLogin",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/fastLoginVercode/fastLoginVercode",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/fastLoginSetPassword/fastLoginSetPassword",
|
||||||
|
"style": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/data/data",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/history/history",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/userAgreement/userAgreement",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "default",
|
||||||
|
"navigationBarTitleText": "用户协议",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"type":"default",
|
||||||
|
"titleText":"用户协议"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/privacyAgreement/privacyAgreement",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "default",
|
||||||
|
"navigationBarTitleText": "隐私协议",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"type":"default",
|
||||||
|
"titleText":"隐私协议"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/modifyPassword/modifyPassword",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/modifyPasswordSetpassword/modifyPasswordSetpassword",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/modifyUserPhoneNum/modifyUserPhoneNum",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/modifyUserPhoneNumSetPhoneNum/modifyUserPhoneNumSetPhoneNum",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/systemIntroduce/systemIntroduce",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "default",
|
||||||
|
"navigationBarTitleText": "系统介绍",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"type":"default",
|
||||||
|
"titleText":"系统介绍"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/companyIntroduce/companyIntroduce",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "default",
|
||||||
|
"navigationBarTitleText": "公司简介",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"type":"default",
|
||||||
|
"titleText":"公司简介"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/setting/setting",
|
||||||
|
"style": {}
|
||||||
|
}
|
||||||
|
|
||||||
|
, {
|
||||||
|
"path": "pages/steady/steady",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/steadyDetails/steadyDetails",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/steadyIndex/steadyIndex",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/terminal/terminal",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/terminalDetails/terminalDetails",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/myApply/myApply",
|
||||||
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path" : "pages/setNewMessage/setNewMessage",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/terminalHistory/terminalHistory",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/transientWave/transientWave",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/us/us",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/terminalStatusAll/terminalStatusAll",
|
||||||
|
"style" : {}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tabBar": {
|
||||||
|
"color": "#333333",
|
||||||
|
"selectedColor": "#3982FC",
|
||||||
|
"borderStyle": "black",
|
||||||
|
"backgroundColor": "#ffffff",
|
||||||
|
"list": [{
|
||||||
|
"pagePath": "pages/information/information",
|
||||||
|
"iconPath": "static/pic/information.png",
|
||||||
|
"selectedIconPath": "static/pic/information_click.png",
|
||||||
|
"text": "信息"
|
||||||
|
}, {
|
||||||
|
"pagePath": "pages/data/data",
|
||||||
|
"iconPath": "static/pic/data.png",
|
||||||
|
"selectedIconPath": "static/pic/data_click.png",
|
||||||
|
"text": "实时数据"
|
||||||
|
}, {
|
||||||
|
"pagePath": "pages/history/history",
|
||||||
|
"iconPath": "static/pic/history.png",
|
||||||
|
"selectedIconPath": "static/pic/history_click.png",
|
||||||
|
"text": "历史数据"
|
||||||
|
}, {
|
||||||
|
"pagePath": "pages/report/report",
|
||||||
|
"iconPath": "static/pic/report.png",
|
||||||
|
"selectedIconPath": "static/pic/report_click.png",
|
||||||
|
"text": "报表任务"
|
||||||
|
}, {
|
||||||
|
"pagePath": "pages/me/me",
|
||||||
|
"iconPath": "static/pic/me.png",
|
||||||
|
"selectedIconPath": "static/pic/me_click.png",
|
||||||
|
"text": "个人中心"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"globalStyle": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTextStyle": "black",
|
||||||
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
|
"backgroundColor": "#F8F8F8"
|
||||||
|
}
|
||||||
|
}
|
||||||
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>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user