Browse Source

增加了客服电话、使用说明书

soft5566 3 years ago
parent
commit
7bb67bee54

+ 7 - 7
components/Popup.vue

@@ -36,24 +36,24 @@
 
 
 	.popup-content {
 	.popup-content {
 		/* Styling for the popup content */
 		/* Styling for the popup content */
-		background-color: rgba(255, 255, 255, 0.8);
+		background-color: rgba(255, 255, 255, 0.9);
 		width: 100%;
 		width: 100%;
-		height: 60%;
+		height: 68%;
 		padding: 30rpx;
 		padding: 30rpx;
 	}
 	}
 
 
 	.close-button {
 	.close-button {
 		position: absolute;
 		position: absolute;
-		top: 10px;
-		right: 10px;
-		font-size: 20px;
+		top: 60rpx;
+		right: 30rpx;
+		font-size: 38rpx;
 		color: #fff;
 		color: #fff;
 		cursor: pointer;
 		cursor: pointer;
 		width: 46rpx;
 		width: 46rpx;
 		height: 46rpx;
 		height: 46rpx;
 		line-height: 46rpx;
 		line-height: 46rpx;
 		text-align: center;
 		text-align: center;
-		border-radius: 23rpx;
-		background-color: rgba(255, 255, 255, 0.3);
+		border-radius: 50%;
+		background-color: rgba(255, 255, 255, 0.5);
 	}
 	}
 </style>
 </style>

+ 2 - 1
pages/recharge/recharge.vue

@@ -364,8 +364,9 @@
 			 * 拨打电话
 			 * 拨打电话
 			 */
 			 */
 			callPhone() {
 			callPhone() {
+				var _this = this;
 				uni.makePhoneCall({
 				uni.makePhoneCall({
-					phoneNumber: this.phone_number
+					phoneNumber: _this.phone_number
 				});
 				});
 			}
 			}
 		}
 		}

BIN
pages/reshui/images/kefu.png


BIN
pages/reshui/images/yhsc.png


+ 185 - 7
pages/reshui/reshui.vue

@@ -77,18 +77,36 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<instructions v-if="flag" @parent_cancel="cancel" @parent_noshow='noshow'></instructions>
 		<instructions v-if="flag" @parent_cancel="cancel" @parent_noshow='noshow'></instructions>
+		<view class="call">
+			<button class="default-btn floating-button-call" @tap="makeCall"></button>
+		</view>
+		<view class="operation-manual">
+			<button class="default-btn floating-button-manual" @tap="showPopup = true"></button>
+		</view>
+		<Popup :showPopup="showPopup" @close="showPopup = false">
+			<scroll-view class="article" scroll-y>
+				<view class="desc-title">{{ article.title }}</view>
+				<view v-for="(section, index) in article.sections" :key="index" class="section">
+					<view v-if="section.red == true" class="section-title-red">{{ section.title }}</view>
+					<view v-else class="section-title">{{ section.title }}</view>
+					<view class="section-content">{{ section.content }}</view>
+				</view>
+				<view class="desc-footer"></view>
+			</scroll-view>
+		</Popup>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
 	import instructions from '../../components/instructions.vue'
 	import instructions from '../../components/instructions.vue'
-
+	import Popup from '@/components/Popup.vue';
 	export default {
 	export default {
 		/**
 		/**
 		 * 声明组件
 		 * 声明组件
 		 */
 		 */
 		components: {
 		components: {
-			instructions
+			instructions,
+			Popup
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
@@ -138,7 +156,79 @@
 				changeDate: false, // 是否是手动选择日期
 				changeDate: false, // 是否是手动选择日期
 				get_Bluetooth_Bevice: false, // 自动获取蓝牙设备,并列表
 				get_Bluetooth_Bevice: false, // 自动获取蓝牙设备,并列表
 				timer: -1,
 				timer: -1,
-				test: this.$store.state.test
+				test: this.$store.state.test,
+				showPopup: false,
+				article: {
+					title: "蓝牙卡控操作说明",
+					sections: [{
+							title: "蓝牙卡控使用方式为:",
+							content: "  用微信【扫一扫】功能,扫描热水表上的二维码。",
+							red: false
+						},
+						{
+							title: "如遇连接热水表问题,请先检查:",
+							content: "  1.蓝牙本身无故障,且手机蓝牙和GPS定位要开启,并要授权。\n" +
+								"  2.手机系统要求出厂自带的,系统版本低于安卓4.3或刷过机的,可能搜索不到热水表。\n" +
+								"  3.之前已经连接过热水表需正常退出,否则再次连接可能搜索不到热水表,需关闭蓝牙5秒钟后再尝试。\n" +
+								"  4.热水表有人在使用,热水表肯定连接不了。\n" +
+								"  5.用微信分身,连接热水表会存在意想不到的问题。\n" +
+								"  6.在连接热水表前,请断开如蓝牙耳机、蓝牙音像等其他蓝牙设备。",
+							red: false
+						},
+						{
+							title: "如以上检查没问题,部分手机请检查以下权限是否打开(以下路径不能保证绝对正确,不同手机品牌和版本号会有区别,可自行百度或联系客服):",
+							content: "",
+							red: true
+						},
+						{
+							title: "华为手机:",
+							content: "  设置→安全和隐私→定位服务→打开“访问我的位置信息”。\n" +
+								"  设置→应用和通知→权限管理→微信→打开“您的位置”。",
+							red: false
+						},
+						{
+							title: "小米手机:",
+							content: "  设置→更多设置→系统安全→位置信息→开启“位置服务”。\n" +
+								"  设置→授权管理→应用授权管理→微信→开启“定位”。",
+							red: false
+						},
+						{
+							title: "苹果手机:",
+							content: "  设置→隐私→打开“定位服务”。\n" +
+								"  设置→微信→位置→使用应用期间。",
+							red: false
+						},
+						{
+							title: "OPPO手机:",
+							content: "  设置→GPS定位→开启“允许访问我的位置信息。\n" +
+								"  设置→权限隐私→按应用管理权限→微信→授权。",
+							red: false
+						},
+						{
+							title: "VIVO手机:",
+							content: "  设置→定位服务→开启。\n" +
+								"  设置→更多设置→权限管理→微信→定位手机选择“允许”。",
+							red: false
+						},
+						{
+							title: "三星手机:",
+							content: "  设置→连接→打开定位服务。\n" +
+								"  设置→应用程序→微信→权限→开启位置信息。",
+							red: false
+						},
+						{
+							title: "魅族手机:",
+							content: "  设置→定位服务→开启:\n" +
+								"  设置→应用管理→选择已安装→微信→权限管理→获取定位(允许)。",
+							red: false
+						},
+						{
+							title: "多卡号(一个人有2个以上微信身份卡号)扣款问题:",
+							content: "  遇到多卡,扣款会从第1次绑定的卡中扣款,如想从指定的卡中扣款,请先删除微信小程序(微信界面下拉,长按本小程序并拖动删除),再用指定的卡进入即可。",
+							red: true
+						}
+					]
+				}
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
@@ -254,6 +344,14 @@
 		},
 		},
 		methods: {
 		methods: {
 			/**
 			/**
+			 * 拨号
+			 */
+			makeCall() {
+				uni.makePhoneCall({
+					phoneNumber: '18312075670' // 替换为您想要拨打的电话号码
+				});
+			},
+			/**
 			 * 单击连接热水表
 			 * 单击连接热水表
 			 */
 			 */
 			clickRoom(e) {
 			clickRoom(e) {
@@ -365,7 +463,7 @@
 						})
 						})
 					}
 					}
 				}
 				}
-				
+
 				// 获取code
 				// 获取code
 				this.getCode(options, param);
 				this.getCode(options, param);
 			},
 			},
@@ -410,7 +508,7 @@
 				if (res.data.mess == '返回成功') {
 				if (res.data.mess == '返回成功') {
 					// stu_number是否存在
 					// stu_number是否存在
 					let cardNumber = res.data.info[0].card_number
 					let cardNumber = res.data.info[0].card_number
-					if (typeof(cardNumber) != 'undefined' && cardNumber != '' && JSON.stringify(cardNumber) != '{}') {
+					if (typeof cardNumber != 'undefined' && cardNumber != '' && JSON.stringify(cardNumber) != '{}') {
 						// 学号 和 姓名
 						// 学号 和 姓名
 						_this.stu_number = res.data.info[0].stu_number
 						_this.stu_number = res.data.info[0].stu_number
 						_this.user_name = res.data.info[0].user_name
 						_this.user_name = res.data.info[0].user_name
@@ -423,7 +521,7 @@
 						// 校区
 						// 校区
 						// _this.compus = res.data.info[0].campus
 						// _this.compus = res.data.info[0].campus
 
 
-						if (param == 'onLoad' && typeof(options.from) != 'undefined' && options.from != 0) {
+						if (param == 'onLoad' && typeof options.from != 'undefined' && options.from != 0) {
 							// 初始化蓝牙
 							// 初始化蓝牙
 							_this.openBluetoothAdapter()
 							_this.openBluetoothAdapter()
 						}
 						}
@@ -447,7 +545,7 @@
 						title: '获取用户信息失败!'
 						title: '获取用户信息失败!'
 					})
 					})
 
 
-					if (options && typeof(options.from) != 'undefined' && typeof(options.from) != '') {
+					if (options && typeof options.from != 'undefined' && typeof options.from != '') {
 						uni.navigateTo({
 						uni.navigateTo({
 							url: '../../pages/index/index?from=' + options.from
 							url: '../../pages/index/index?from=' + options.from
 						})
 						})
@@ -1786,5 +1884,85 @@
 				}
 				}
 			}
 			}
 		}
 		}
+
+		.call {
+			position: fixed;
+			right: 40rpx;
+			bottom: 80rpx;
+		}
+
+		.default-btn {
+			background-color: transparent;
+			border: none;
+			outline: none;
+		}
+
+		.floating-button-call {
+			position: relative;
+			font-size: 28rpx;
+			width: 80rpx;
+			height: 80rpx;
+			border: 1px solid #ccc;
+			border-radius: 50%;
+			opacity: 0.5;
+			background: url('images/kefu.png') center center no-repeat;
+		}
+
+		.operation-manual {
+			position: fixed;
+			right: 40rpx;
+			bottom: 180rpx;
+		}
+
+		.floating-button-manual {
+			position: relative;
+			font-size: 28rpx;
+			width: 80rpx;
+			height: 80rpx;
+			border: 1px solid #ccc;
+			border-radius: 50%;
+			opacity: 0.5;
+			background: url('images/yhsc.png') center center no-repeat;
+		}
+
+		.article {
+			padding: 20rpx;
+			height: 100%;
+		}
+
+		.desc-title {
+			height: 50rpx;
+			line-height: 50rpx;
+			font-size: 36rpx;
+			font-weight: bold;
+			margin-bottom: 50rpx;
+			text-align: center;
+		}
+
+		.section {
+			margin-bottom: 40rpx;
+		}
+
+		.section-title-red,
+		.section-title {
+			font-size: 30rpx;
+			font-weight: bold;
+			margin-bottom: 10rpx;
+		}
+
+		.section-title-red {
+			color: #ca0000;
+		}
+
+		.section-content {
+			font-size: 28rpx;
+			line-height: 1.5;
+			white-space: pre-wrap;
+		}
+
+		.desc-footer {
+			height: 50rpx;
+			line-height: 50rpx;
+		}
 	}
 	}
 </style>
 </style>

+ 1 - 0
pagesElectric/dfxq/dfxq.vue

@@ -264,6 +264,7 @@
 							totalMoney
 							totalMoney
 						});
 						});
 					}
 					}
+					// 过滤掉重复数据
 					this.tableData = tableData.filter(function(item, index, self) {
 					this.tableData = tableData.filter(function(item, index, self) {
 						return index === self.findIndex(function(t) {
 						return index === self.findIndex(function(t) {
 							return t.dataTime === item.dataTime && t.totalPower === item.totalPower && t.totalMoney === item.totalMoney;
 							return t.dataTime === item.dataTime && t.totalPower === item.totalPower && t.totalMoney === item.totalMoney;

+ 9 - 0
pagesElectric/jiaofei/jiaofei.css

@@ -180,6 +180,15 @@ page {
 	white-space: nowrap;
 	white-space: nowrap;
 }
 }
 
 
+.makecall {
+	font-size: 30upx;
+	color: #ffffff;
+	border: solid #ccc 1upx;
+	border-radius: 47.5upx;
+	background-color: #ccc;
+	white-space: nowrap;
+}
+
 .change-show {
 .change-show {
 	width: 120upx;
 	width: 120upx;
 	font-size: 30upx;
 	font-size: 30upx;

+ 28 - 25
pagesElectric/jiaofei/jiaofei.vue

@@ -56,15 +56,17 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="show-item jine">
 		<view class="show-item jine">
-			<input type="number" class="input-money" maxlength="4" placeholder="请输入金额(10-200)" placeholder-class="input-ph-color" v-model:value="amount"
-				@input="onInput" @blur="onBlur" />
+			<input type="number" class="input-money" maxlength="4" placeholder="请输入金额(10-200)" placeholder-class="input-ph-color" v-model:value="amount" @input="onInput" @blur="onBlur" />
 		</view>
 		</view>
 		<view class="submit-item" v-if="true">
 		<view class="submit-item" v-if="true">
-			<button class="submit" :data-rooms='room' @tap="input_money">充值</button>
+			<button class="submit" @tap="input_money">充值</button>
 		</view>
 		</view>
 		<view class="change-show" @tap="navigateToShow">
 		<view class="change-show" @tap="navigateToShow">
 			台账管理
 			台账管理
 		</view>
 		</view>
+		<view class="submit-item" v-if="true">
+			<button class="makecall" @tap="makeCall">客服电话:{{tel}}</button>
+		</view>
 		<view v-if="img_url !== ''" class="ad">
 		<view v-if="img_url !== ''" class="ad">
 			<image :src="img_url" mode="aspectFill" class="ad_img" @tap="ad_redirect" @error="loadImgError"></image>
 			<image :src="img_url" mode="aspectFill" class="ad_img" @tap="ad_redirect" @error="loadImgError"></image>
 		</view>
 		</view>
@@ -86,7 +88,8 @@
 				compus: '', //校区
 				compus: '', //校区
 				ceshi: 'code',
 				ceshi: 'code',
 				test: this.$store.state.test,
 				test: this.$store.state.test,
-				img_url: ''
+				img_url: '',
+				tel: '0795-7132136'
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
@@ -121,7 +124,7 @@
 				this.roomSelect = this.$store.state.building.roomSelect;
 				this.roomSelect = this.$store.state.building.roomSelect;
 				this.add_class = this.$store.state.building.add_class;
 				this.add_class = this.$store.state.building.add_class;
 				this.dorm_number = this.$store.state.building.dorm_number;
 				this.dorm_number = this.$store.state.building.dorm_number;
-				
+
 				this.add_class = 1;
 				this.add_class = 1;
 				if (this.roomSelect && typeof(this.roomSelect) != 'undefined') {
 				if (this.roomSelect && typeof(this.roomSelect) != 'undefined') {
 					this.getDianLiang();
 					this.getDianLiang();
@@ -136,6 +139,15 @@
 		},
 		},
 		methods: {
 		methods: {
 			/**
 			/**
+			 * 拨号
+			 */
+			makeCall() {
+				var _this = this;
+				uni.makePhoneCall({
+					phoneNumber: _this.tel // 替换为您想要拨打的电话号码
+				});
+			},
+			/**
 			 * 获取广告缩略图出错
 			 * 获取广告缩略图出错
 			 */
 			 */
 			loadImgError(e) {
 			loadImgError(e) {
@@ -206,8 +218,7 @@
 				} else {
 				} else {
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '../dfxq/dfxq?roomSelect=' + this.roomSelect + '&stu_number=' + this.stu_number,
 						url: '../dfxq/dfxq?roomSelect=' + this.roomSelect + '&stu_number=' + this.stu_number,
-						success: function(res) {
-						}
+						success: function(res) {}
 					});
 					});
 				}
 				}
 
 
@@ -228,8 +239,7 @@
 				} else {
 				} else {
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '../sfxq/sfxq?roomSelect=' + this.roomSelect + '&stu_number=' + this.stu_number,
 						url: '../sfxq/sfxq?roomSelect=' + this.roomSelect + '&stu_number=' + this.stu_number,
-						success: function(res) {
-						}
+						success: function(res) {}
 					});
 					});
 				}
 				}
 			},
 			},
@@ -272,7 +282,7 @@
 				} catch (e) {
 				} catch (e) {
 					console.log(e);
 					console.log(e);
 				}
 				}
-				
+
 				// 初始化参数
 				// 初始化参数
 				this.$store.state.building.add_class = 0;
 				this.$store.state.building.add_class = 0;
 
 
@@ -347,12 +357,12 @@
 							// 样式
 							// 样式
 							_this.add_class = 1
 							_this.add_class = 1
 						}
 						}
-						
+
 						// 请求选定的月份消费记录
 						// 请求选定的月份消费记录
 						_this.getDianLiang()
 						_this.getDianLiang()
 					} else if (res.data.mess == '未查询到用户信息') {
 					} else if (res.data.mess == '未查询到用户信息') {
 						// 数据库中 未查询到用户信息,就清除本地存储
 						// 数据库中 未查询到用户信息,就清除本地存储
-						uni.removeStorageSync('userinfo_storage_key');
+						// uni.removeStorageSync('userinfo_storage_key');
 
 
 						uni.showToast({
 						uni.showToast({
 							title: '获取用户信息失败!'
 							title: '获取用户信息失败!'
@@ -381,13 +391,6 @@
 						}
 						}
 					}
 					}
 				} else {
 				} else {
-
-					// 请求选定的月份消费记录
-					this.getDianLiang()
-				} else if (res.data.mess == '未查询到用户信息') {
-					// 数据库中 未查询到用户信息,就清除本地存储
-					uni.removeStorageSync('userinfo_storage_key')
-
 					uni.showToast({
 					uni.showToast({
 						title: 'code为空!',
 						title: 'code为空!',
 						icon: 'success'
 						icon: 'success'
@@ -444,7 +447,7 @@
 					})
 					})
 					return true
 					return true
 				}
 				}
-				
+
 				uni.setStorageSync('roomSelect', this.roomSelect);
 				uni.setStorageSync('roomSelect', this.roomSelect);
 				uni.setStorageSync('stu_number', this.stu_number);
 				uni.setStorageSync('stu_number', this.stu_number);
 
 
@@ -465,8 +468,7 @@
 				} else {
 				} else {
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '../show/show?roomSelect=' + this.roomSelect + '&stu_number=' + this.stu_number,
 						url: '../show/show?roomSelect=' + this.roomSelect + '&stu_number=' + this.stu_number,
-						success: function(res) {
-						}
+						success: function(res) {}
 					});
 					});
 				}
 				}
 			},
 			},
@@ -614,7 +616,8 @@
 			 * 输入充值金额
 			 * 输入充值金额
 			 */
 			 */
 			onInput(e) {
 			onInput(e) {
-				if (this.test) { // 测试环境
+				var _this = this;
+				if (_this.test) { // 测试环境
 					return
 					return
 				}
 				}
 
 
@@ -637,7 +640,7 @@
 						final = 200
 						final = 200
 					}
 					}
 				}
 				}
-				this.$nextTick(() => {
+				_this.$nextTick(() => {
 					if (final.toString() == '0') {
 					if (final.toString() == '0') {
 						_this.amount = ''
 						_this.amount = ''
 					} else {
 					} else {
@@ -663,4 +666,4 @@
 
 
 <style>
 <style>
 	@import url("jiaofei.css");
 	@import url("jiaofei.css");
-</style>
+</style>

+ 11 - 7
pagesElectric/select/select.vue

@@ -204,6 +204,7 @@
 			 * 选择校区
 			 * 选择校区
 			 */
 			 */
 			changeSelect1(e) {
 			changeSelect1(e) {
+				// console.log(e);
 				this.array2 = []
 				this.array2 = []
 				this.array3 = []
 				this.array3 = []
 				this.array4 = []
 				this.array4 = []
@@ -215,7 +216,7 @@
 				// console.log(typeof(index))
 				// console.log(typeof(index))
 				this.arr1 = this.array1;
 				this.arr1 = this.array1;
 				//获取选择器1的值
 				//获取选择器1的值
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.index1 = index;
 					this.index1 = index;
 				} else {
 				} else {
 					for (var i = 0; i < this.nschool; i++) {
 					for (var i = 0; i < this.nschool; i++) {
@@ -228,7 +229,7 @@
 				//获取选择器二中的值
 				//获取选择器二中的值
 				this.getBuilds(this.array1[this.index1], theRoomIsExist)
 				this.getBuilds(this.array1[this.index1], theRoomIsExist)
 
 
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.arr2 = ['请选择楼栋']
 					this.arr2 = ['请选择楼栋']
 					this.arr3 = ['请选择楼层']
 					this.arr3 = ['请选择楼层']
 					this.arr4 = ['请选择房间']
 					this.arr4 = ['请选择房间']
@@ -292,6 +293,7 @@
 				}
 				}
 			},
 			},
 			changeSelect2(e) {
 			changeSelect2(e) {
+				// console.log(e);
 				this.array3 = []
 				this.array3 = []
 				this.array4 = []
 				this.array4 = []
 				this.sel2(e.detail.value, false)
 				this.sel2(e.detail.value, false)
@@ -301,7 +303,7 @@
 				// console.log(typeof index);
 				// console.log(typeof index);
 				this.arr2 = this.array2;
 				this.arr2 = this.array2;
 
 
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.index2 = index;
 					this.index2 = index;
 				} else {
 				} else {
 					for (var i = 0; i < this.nbuilds; i++) {
 					for (var i = 0; i < this.nbuilds; i++) {
@@ -313,7 +315,7 @@
 
 
 				this.getFloors(this.array1[this.index1], this.array2[this.index2], theRoomIsExist)
 				this.getFloors(this.array1[this.index1], this.array2[this.index2], theRoomIsExist)
 
 
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.arr3 = ['请选择楼层']
 					this.arr3 = ['请选择楼层']
 					this.arr4 = ['请选择房间']
 					this.arr4 = ['请选择房间']
 					this.index3 = 0
 					this.index3 = 0
@@ -375,6 +377,7 @@
 				}
 				}
 			},
 			},
 			changeSelect3(e) {
 			changeSelect3(e) {
+				// console.log(e);
 				this.array4 = []
 				this.array4 = []
 				this.sel3(e.detail.value, false)
 				this.sel3(e.detail.value, false)
 			},
 			},
@@ -382,7 +385,7 @@
 				// console.log(index)
 				// console.log(index)
 				this.arr3 = this.array3;
 				this.arr3 = this.array3;
 
 
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.index3 = index;
 					this.index3 = index;
 				} else {
 				} else {
 					for (var i = 0; i < this.floors; i++) {
 					for (var i = 0; i < this.floors; i++) {
@@ -394,7 +397,7 @@
 
 
 				this.getDoms(this.array1[this.index1], this.array2[this.index2], this.array3[this.index3], theRoomIsExit)
 				this.getDoms(this.array1[this.index1], this.array2[this.index2], this.array3[this.index3], theRoomIsExit)
 
 
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.arr4 = ['请选择房间']
 					this.arr4 = ['请选择房间']
 					this.index4 = 0
 					this.index4 = 0
 
 
@@ -455,6 +458,7 @@
 				}
 				}
 			},
 			},
 			changeSelect4(e) {
 			changeSelect4(e) {
+				// console.log(e);
 				this.sel4(e.detail.value, false)
 				this.sel4(e.detail.value, false)
 			},
 			},
 			sel4(index, theRoomIsExist) {
 			sel4(index, theRoomIsExist) {
@@ -468,7 +472,7 @@
 				}
 				}
 
 
 
 
-				if (typeof(index) == 'string') {
+				if (typeof index == 'string') {
 					this.index4 = index;
 					this.index4 = index;
 				} else {
 				} else {
 					for (var i = 0; i < this.rooms; i++) {
 					for (var i = 0; i < this.rooms; i++) {

+ 1 - 1
pagesElectric/sfxq/sfxq.vue

@@ -262,7 +262,7 @@
 							totalMoney
 							totalMoney
 						});
 						});
 					}
 					}
-
+					// 过滤掉重复数据
 					this.tableData = tableData.filter(function(item, index, self) {
 					this.tableData = tableData.filter(function(item, index, self) {
 						return index === self.findIndex(function(t) {
 						return index === self.findIndex(function(t) {
 							return t.dataTime === item.dataTime && t.totalPower === item.totalPower && t.totalMoney === item.totalMoney;
 							return t.dataTime === item.dataTime && t.totalPower === item.totalPower && t.totalMoney === item.totalMoney;

+ 12 - 4
pagesElectric/show/show.vue

@@ -235,7 +235,7 @@
 						})
 						})
 
 
 						// console.log(res.data.rows);
 						// console.log(res.data.rows);
-						// console.log(res.data);
+						// console.log(res.data);						
 						if (res.data.rows.length == 0) {
 						if (res.data.rows.length == 0) {
 							return
 							return
 						}
 						}
@@ -247,6 +247,14 @@
 							})
 							})
 							return
 							return
 						}
 						}
+						
+						var rows = res.data.rows;
+						// 过滤掉重复数据
+						rows = rows.filter(function(item, index, self) {
+							return index === self.findIndex(function(t) {
+								return t.dataTime === item.dataTime;
+							});
+						});
 
 
 						let chrt_data = {
 						let chrt_data = {
 							categories: [],
 							categories: [],
@@ -256,11 +264,11 @@
 						let dt = ''
 						let dt = ''
 						let temp = 0
 						let temp = 0
 						let data = []
 						let data = []
-						for (var i = 0; i < res.data.rows.length; i++) {
-							dt = res.data.rows[i].dataTime
+						for (var i = 0; i < rows.length; i++) {
+							dt = rows[i].dataTime
 							// chrt_data.categories.push(dt.substr(dt.indexOf('-') + 1, dt.length) + '月')
 							// chrt_data.categories.push(dt.substr(dt.indexOf('-') + 1, dt.length) + '月')
 							chrt_data.categories.push(parseInt(dt.substr(dt.indexOf('-') + 1, dt.length)) + '月')
 							chrt_data.categories.push(parseInt(dt.substr(dt.indexOf('-') + 1, dt.length)) + '月')
-							temp = (res.data.rows[i].totalMoney).toFixed(2)
+							temp = (rows[i].totalMoney).toFixed(2)
 							// temp = temp
 							// temp = temp
 							data.push(temp)
 							data.push(temp)
 							if (parseFloat(temp) > parseFloat(elc_max)) {
 							if (parseFloat(temp) > parseFloat(elc_max)) {