wy 1 år sedan
förälder
incheckning
ecc01ce468

+ 8 - 0
common/http.js

@@ -138,3 +138,11 @@ export function getToDayAlarm() {
 export function getRefresh() {
 	return request.post("/vehicle/refresh")
 }
+//换电编号
+export function getStationCode() {
+	return request.post("/swap/getStationCode")
+}
+//云端
+export function getcloudConnState() {
+	return request.post("/swap/cloudConnState")
+}

+ 72 - 20
components/Navbar/Navbar.vue

@@ -3,6 +3,11 @@
 		<view class="logo">
 			<image src="/static/left/logo.png"></image>
 		</view>
+		<view class="station_box">
+			{{codeState || '-'}}
+			<image class="station_box_img" :src="cloud?`/static/left/link.png`:`/static/left/close.png`">
+			</image>
+		</view>
 		<view class="routList">
 			<view class="category" v-for="(item,index) in categoryList"
 				:class="item.name==$store.state.currentpage?'active':''" @click="getPage(item.name)">
@@ -12,10 +17,11 @@
 				<view>{{item.name}}</view>
 			</view>
 		</view>
+
 		<view class="fiexd_footer">
 			<view class="left_footer">
 				<view class="box_click" @click="goTo">
-					
+
 				</view>
 				<view class="left_footer_woring">
 					{{alarmNum}}
@@ -44,9 +50,9 @@
 		data() {
 			return {
 				currentPage: 0,
-				popupType:'',
-				popupMessage:'',
-				userName:'',
+				popupType: '',
+				popupMessage: '',
+				userName: '',
 				categoryList: [{
 					name: '首页',
 					url: '/pages/index/index',
@@ -69,10 +75,28 @@
 					name: '基础数据',
 					url: '/pages/basic-data/index'
 				}],
-				alarmNum:0,//消防告警数量
+				alarmNum: 0, //消防告警数量
+				cloud: 0, //云端
+				codeState: 0, //编号
 			};
 		},
 		methods: {
+			//编号
+			getState() {
+				this.$http.getStationCode().then(res => {
+					if (res.code === 0) {
+						this.codeState = res.data
+					}
+				});
+			},
+			//云端
+			cloudConnState() {
+				this.$http.getcloudConnState().then(res => {
+					if (res.code === 0) {
+						this.cloud = res.data
+					}
+				});
+			},
 			getPage(name) {
 				this.$store.commit("UPDATEPAGE", name);
 				this.$storage.setJson("pageName", name)
@@ -84,7 +108,7 @@
 					content: "",
 					success: function(res) {
 						if (res.confirm) {
-							that.$storage.clear();//清除所有本地存储
+							that.$storage.clear(); //清除所有本地存储
 							uni.navigateTo({
 								url: "../../pages/login/index"
 							})
@@ -97,36 +121,36 @@
 				})
 			},
 			//根据用户id得到用户信息
-			getuserinfo(){
+			getuserinfo() {
 				let userId = this.$storage.getJson("userId")
 				let token = this.$storage.getJson("token")
 				let data = {
-					id:userId
+					id: userId
 				}
-				this.$http.getInfo(data).then(res=>{
-					if(res.code == 0){
+				this.$http.getInfo(data).then(res => {
+					if (res.code == 0) {
 						this.userName = res.data.userAccount
-					}else{
+					} else {
 						this.ExchangeMessage('error', res.msg)
 					}
-					
+
 				})
 			},
 			//顶部公共消息提示
 			ExchangeMessage(type, message) {
 				this.popupType = type
-				this.popupMessage = message?message:'后端接口404错误!'
+				this.popupMessage = message ? message : '后端接口404错误!'
 				this.$refs.Exchangepopup.open()
 			},
 			//跳转到消防告警列表
-			goTo(){
+			goTo() {
 				this.getPage('故障告警')
-				this.$storage.setJson('gotoname',1)//存本地用于判断显示的告警页面
+				this.$storage.setJson('gotoname', 1) //存本地用于判断显示的告警页面
 			},
 			//当天消防告警数量
-			getnum(){
-				this.$http.getToDayAlarm().then(res=>{
-					if(res.code == 0){
+			getnum() {
+				this.$http.getToDayAlarm().then(res => {
+					if (res.code == 0) {
 						this.alarmNum = res.data.length
 					}
 				});
@@ -136,6 +160,8 @@
 			// this.getRoute()
 			this.getuserinfo()
 			this.getnum()
+			this.getState()
+			this.cloudConnState()
 		},
 		onShow() {
 
@@ -170,7 +196,7 @@
 			justify-content: space-between;
 			display: flex;
 			flex-direction: column;
-			margin-top: 42px;
+			margin-top: 20px;
 
 			.category {
 				width: 100%;
@@ -212,7 +238,8 @@
 			background-size: 100%;
 			padding-top: 53px;
 			position: relative;
-			.box_click{
+
+			.box_click {
 				position: absolute;
 				// border: 1px solid red;
 				width: 60px;
@@ -220,6 +247,7 @@
 				top: 0px;
 				left: 50px;
 			}
+
 			.left_footer_woring {
 				position: absolute;
 				min-width: 20px;
@@ -267,4 +295,28 @@
 			}
 		}
 	}
+
+	.station_box {
+		width: 150px;
+		background: #1C263A;
+		border: 1px solid #26334C;
+		font-size: 16px;
+		font-weight: 500;
+		color: rgba(153, 174, 197, 0.65);
+		text-shadow: 0px 0px 4px rgba(39, 69, 201, 0.5);
+		border-radius: 4px;
+		height: 36px;
+		line-height: 36px;
+		margin-top: 10px;
+		position: relative;
+		padding-left: 10px;
+
+		.station_box_img {
+			position: absolute;
+			width: 20px;
+			height: 20px;
+			right: 10px;
+			top: 8px;
+		}
+	}
 </style>

+ 1 - 0
components/lyy-table/lyy-table.vue

@@ -399,6 +399,7 @@
 			},
 			//上拉加载事件
 			scrolltolower(e) {
+				console.log(e)
 				if (e.detail.direction == 'bottom') {
 					this.$emit('onPullup')
 				}

+ 2 - 2
pages/fault-alarm/components/Fault.vue

@@ -214,8 +214,8 @@
 			//查询
 			handleQuery() {
 				if (this.dateArr.length > 0) {
-					this.queryParams.beginTime = this.dateArr[0]
-					this.queryParams.endTime = this.dateArr[1]
+					this.queryParams.beginTime = this.dateArr[0]+' ' +'00:00:00'
+					this.queryParams.endTime = this.dateArr[1]+' ' +'23:59:59'
 				}
 				this.queryParams.page = 1
 				this.datalist = []

+ 2 - 2
pages/fault-alarm/components/FireAlarm.vue

@@ -222,8 +222,8 @@
 			//查询
 			handleQuery() {
 				if (this.dateArr.length > 0) {
-					this.queryParams.beginTime = this.dateArr[0]
-					this.queryParams.endTime = this.dateArr[1]
+					this.queryParams.beginTime = this.dateArr[0] +' ' +'00:00:00'
+					this.queryParams.endTime = this.dateArr[1]+' ' +'23:59:59'
 				}
 				this.queryParams.page = 1
 				this.datalist = []

+ 4 - 5
pages/service-recode/components/change.vue

@@ -204,7 +204,7 @@
 									item.swapState = '换电错误'
 								}
 							})
-							this.total = res.total;
+							this.total = res.data.total;
 						}
 					}).catch(err => {
 						console.error(err)
@@ -224,18 +224,17 @@
 			//查询
 			search(){
 				if(this.time){
-					this.changeData.swapBeginTime = this.time[0];
-					this.changeData.swapEndTime = this.time[1];
+					this.changeData.swapBeginTime = this.time[0] +' ' +'00:00:00';
+					this.changeData.swapEndTime = this.time[1]+' ' +"23:59:59";
 				}
 				this.changeData.page = 1
 				this.changelist = []
-				console.log(this.changeData,'changedata')
 				this.getswapList()
 			},
 			//下拉加载
 			pullup(){
 				this.showLoadMore = true
-				if (this.total == this.changeData.length) {
+				if (this.total == this.changelist.length) {
 					this.loadMore = 'no-more'
 					return
 				} else {

+ 2 - 2
pages/service-recode/components/recharge.vue

@@ -173,8 +173,8 @@
 			//查询
 			search() {
 				if (this.time) {
-					this.rechargeData.chgBeginTime = this.time[0];
-					this.rechargeData.chgEndTime = this.time[1];
+					this.rechargeData.chgBeginTime = this.time[0]+' ' +'00:00:00';
+					this.rechargeData.chgEndTime = this.time[1]+' ' +'23:59:59';
 					// this.rechargeData.time = undefined;
 				}
 				this.rechargeData.page = 1

BIN
static/left/close.png


BIN
static/left/link.png