Quellcode durchsuchen

Merge branch 'master' of http://172.16.90.201:3000/parking/parking_pda

aleyds vor 3 Jahren
Ursprung
Commit
2082e249a1

+ 16 - 3
pages/getin/getin.vue

@@ -150,6 +150,7 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				speakParkIn:'',
 				sourceType:['camera'],
 				sourceType:['camera'],
 				time: '12:01',
 				time: '12:01',
 				visible:false,
 				visible:false,
@@ -195,6 +196,14 @@
 			}
 			}
 		},
 		},
 		onLoad(page) {
 		onLoad(page) {
+			uni.getStorage({
+				key:'speakData',
+				success: (res) => {
+					this.speakParkIn = res.data.switchVal3;
+				},
+				fail: (err) => {
+				}
+			})
 			console.log('page', page)
 			console.log('page', page)
 			this.spaceId = page.spaceId;
 			this.spaceId = page.spaceId;
 			this.orderInTime = page.orderInTime;
 			this.orderInTime = page.orderInTime;
@@ -266,7 +275,7 @@
 					console.log('files',element)
 					console.log('files',element)
 				  that.images.push(element[0].response.data.url);
 				  that.images.push(element[0].response.data.url);
 				});
 				});
-				if(that.images=='' || that.images==null){
+				if((that.images=='' || that.images==null)&&that.images.length<=3){
 					this.$refs.uToast.show({
 					this.$refs.uToast.show({
 						title: '需完整上传4张取证照片',
 						title: '需完整上传4张取证照片',
 						type: 'error',
 						type: 'error',
@@ -372,7 +381,9 @@
 						},1000)
 						},1000)
 						//#ifdef APP-PLUS
 						//#ifdef APP-PLUS
 						device.print(res.data.print);
 						device.print(res.data.print);
-						speak(res.data.speak);
+						if(this.speakParkIn==true){
+							speak(res.data.speak);
+						}
 						//#endif
 						//#endif
 						// console.log('parkInConfirm',res)
 						// console.log('parkInConfirm',res)
 					}).catch(err=>{
 					}).catch(err=>{
@@ -398,7 +409,9 @@
 					},1000)
 					},1000)
 					//#ifdef APP-PLUS
 					//#ifdef APP-PLUS
 					device.print(res.data.print);
 					device.print(res.data.print);
-					speak(res.data.speak);
+					if(this.speakParkIn==true){
+						speak(res.data.speak);
+					}
 					//#endif
 					//#endif
 					console.log('entrance',res)
 					console.log('entrance',res)
 				}).catch(err=>{
 				}).catch(err=>{

+ 12 - 2
pages/getout/getout.vue

@@ -99,6 +99,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
+				speakParkOut:'',
 				roadNo:null,//路段编码 ,示例值(RN000000004)
 				roadNo:null,//路段编码 ,示例值(RN000000004)
 				actionList:[
 				actionList:[
 					{text: '出场'},
 					{text: '出场'},
@@ -135,7 +136,14 @@
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
-			
+			uni.getStorage({
+				key:'speakData',
+				success: (res) => {
+					this.speakParkOut = res.data.switchVal4;
+				},
+				fail: (err) => {
+				}
+			})
 		},
 		},
 		onShow() {
 		onShow() {
 			let that = this;
 			let that = this;
@@ -403,7 +411,9 @@
 					});
 					});
 					//#ifdef APP-PLUS
 					//#ifdef APP-PLUS
 					device.print(res.data.print);
 					device.print(res.data.print);
-					speak(res.data.speak);
+					if(this.speakParkOut==true){
+						speak(res.data.speak);
+					}
 					//#endif
 					//#endif
 					console.log('parkInConfirm',res)
 					console.log('parkInConfirm',res)
 				}).catch(err=>{
 				}).catch(err=>{

+ 15 - 3
pages/getout/getoutpage/getoutpage.vue

@@ -120,6 +120,7 @@
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
+				speakParkOut:'',
 				vehicleImage:'/static/img/default-car.png',
 				vehicleImage:'/static/img/default-car.png',
 				showOrderDetails:false,//是否线上订单细节
 				showOrderDetails:false,//是否线上订单细节
 				leaveDetail:[],
 				leaveDetail:[],
@@ -158,7 +159,14 @@
 			// #ifdef APP-PLUS
 			// #ifdef APP-PLUS
 			// this.speaks(this.orderVehicleNo);
 			// this.speaks(this.orderVehicleNo);
 			// #endif
 			// #endif
-			
+			uni.getStorage({
+				key:'speakData',
+				success: (res) => {
+					this.speakParkOut = res.data.switchVal4;
+				},
+				fail: (err) => {
+				}
+			})
 		},
 		},
 		onShow() {
 		onShow() {
 			this.handleEntranceOutDetail();
 			this.handleEntranceOutDetail();
@@ -222,7 +230,9 @@
 						that.detailModel.payAllbtn = false;
 						that.detailModel.payAllbtn = false;
 					}
 					}
 					//#ifdef APP-PLUS
 					//#ifdef APP-PLUS
-					that.speaks(res.data.speak);
+					if(this.speakParkOut==true){
+						that.speaks(res.data.speak);
+					}
 					device.print(res.data.print);
 					device.print(res.data.print);
 					//#endif
 					//#endif
 				}).catch(err=>{
 				}).catch(err=>{
@@ -328,7 +338,9 @@
 				this.$u.api.getOut({spaceId:this.orderID})
 				this.$u.api.getOut({spaceId:this.orderID})
 				.then(res=>{
 				.then(res=>{
 					//#ifdef APP-PLUS
 					//#ifdef APP-PLUS
-					this.speaks(res.data.speak);
+					if(this.speakParkOut==true){
+						this.speaks(res.data.speak);
+					}
 					device.print(res.data.print);
 					device.print(res.data.print);
 					//#endif
 					//#endif
 					console.log('getOut',res)
 					console.log('getOut',res)

+ 9 - 0
pages/setting/setting.scss

@@ -14,3 +14,12 @@ page{
 	  bottom: 10rpx;
 	  bottom: 10rpx;
 	  text-align:center
 	  text-align:center
 }
 }
+.speack{
+	border-radius: 11rpx;
+	.speack-pop{
+	}
+	.speack-btn{
+		text-align: center;
+		padding-top: 20rpx;
+	}
+}

+ 64 - 0
pages/setting/setting.vue

@@ -20,6 +20,9 @@
 				<u-cell-item title="地锁控制" @click="lockControl()">
 				<u-cell-item title="地锁控制" @click="lockControl()">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
 				</u-cell-item>
 				</u-cell-item>
+				<u-cell-item title="语音播报开关" @click="speakControl()">
+					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
+				</u-cell-item>
 				<u-cell-item title="版本检测" @click="onCheckVersion()">
 				<u-cell-item title="版本检测" @click="onCheckVersion()">
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
 					<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
 				</u-cell-item>
 				</u-cell-item>
@@ -28,6 +31,21 @@
 				</u-cell-item>
 				</u-cell-item>
 			</u-cell-group>
 			</u-cell-group>
 		</view>
 		</view>
+		<u-popup v-model="speakShow" mode="center" length="auto" >
+			<view class="speack">
+				<view class="speack-pop">
+					<u-form>
+					<u-form-item label="设备入场开关" label-width="350"><u-switch v-model="switchVal1" @change="change1"></u-switch></u-form-item>
+					<u-form-item label="设备出场开关" label-width="350"><u-switch  v-model="switchVal2" @change="change2"></u-switch></u-form-item>
+					<u-form-item label="收费员入场开关" label-width="350"><u-switch  v-model="switchVal3" @change="change3"></u-switch></u-form-item>
+					<u-form-item label="收费员出场开关" label-width="350"><u-switch  v-model="switchVal4" @change="change4"></u-switch></u-form-item>
+					</u-form>
+				</view>
+				<view class="speack-btn">
+					<u-button @click="submitSpeak" type="primary" size="medium">执行</u-button>	
+				</view>
+			</view>
+		</u-popup>
 		<u-popup v-model="show" mode="center" length="auto" >
 		<u-popup v-model="show" mode="center" length="auto" >
 			<view>
 			<view>
 			<u-form :model="lockForm" ref="uForm">
 			<u-form :model="lockForm" ref="uForm">
@@ -56,6 +74,11 @@
 	export default{
 	export default{
 		data(){
 		data(){
 			return{
 			return{
+				switchVal1:'',
+				switchVal2:'',
+				switchVal3:'',
+				switchVal4:'',
+				speakShow:false,
 				show: false,
 				show: false,
 				wgtInfo:{},
 				wgtInfo:{},
 				lockForm:{
 				lockForm:{
@@ -82,11 +105,52 @@
 		},
 		},
 		onLoad(){
 		onLoad(){
 			this.getVersion();
 			this.getVersion();
+			
+			
 		},
 		},
 		onShow(){
 		onShow(){
 			
 			
 		},
 		},
 		methods:{
 		methods:{
+			change1(status){
+				// console.log(status)
+				this.switchVal1=status;
+			},
+			change2(status){
+				// console.log(status)
+				this.switchVal2=status;
+			},
+			change3(status){
+				// console.log(status)
+				this.switchVal3=status;
+			},
+			change4(status){
+				// console.log(status)
+				this.switchVal4=status;
+			},
+			speakControl(){
+				this.speakShow=true;
+				uni.getStorage({
+					key:'speakData',
+					success: (res) => {
+						this.switchVal1 = res.data.switchVal1;
+						this.switchVal2 = res.data.switchVal2;
+						this.switchVal3 = res.data.switchVal3;
+						this.switchVal4 = res.data.switchVal4;
+						// console.log('passWord',res.data)
+					},
+					fail: (err) => {
+						// console.log('passWord err',err)
+					}
+				})
+			},
+			submitSpeak(){
+				uni.setStorage({
+					key:'speakData',
+					data:{switchVal1:this.switchVal1, switchVal2:this.switchVal2, switchVal3:this.switchVal3, switchVal4:this.switchVal4 }							
+				});
+				this.speakShow=false;
+			},
 			lockControl(){
 			lockControl(){
 				let that = this;
 				let that = this;
 				let roadInfo = this.$store.state.vuex_user?.roadList?.[0]||[];
 				let roadInfo = this.$store.state.vuex_user?.roadList?.[0]||[];

+ 20 - 2
utils/pushUtils.js

@@ -37,7 +37,16 @@ const _handlePush = function(message) {
 // jumpTo: 页面跳转地址
 // jumpTo: 页面跳转地址
 // data: {} 其他参数,JSON格式
 // data: {} 其他参数,JSON格式
 function deviceParkIn(content){
 function deviceParkIn(content){
-	if(content.speakMsg){
+	//获取存储的设备入场语音播报开关状态
+	uni.getStorage({
+		key:'speakData',
+		success: (res) => {
+			let speakDeviceParkIn = res.data.switchVal1;
+		},
+		fail: (err) => {
+		}
+	})
+	if(content.speakMsg&&speakDeviceParkIn==true){
 		speaker.speakAction(content.speakMsg)
 		speaker.speakAction(content.speakMsg)
 	}
 	}
 	// const value = uni.getStorageSync('pushModel_switch');
 	// const value = uni.getStorageSync('pushModel_switch');
@@ -62,7 +71,16 @@ function deviceParkIn(content){
 }
 }
 
 
 function deviceParkOut(content){
 function deviceParkOut(content){
-	if(content.speakMsg){
+	//获取存储的设备出场语音播报开关状态
+	uni.getStorage({
+		key:'speakData',
+		success: (res) => {
+			let speakDeviceParkOut = res.data.switchVal2;
+		},
+		fail: (err) => {
+		}
+	})
+	if(content.speakMsg&&speakDeviceParkOut==true){
 		speaker.speakAction(content.speakMsg)
 		speaker.speakAction(content.speakMsg)
 	}
 	}
 }
 }