Przeglądaj źródła

居家养老场景审核不用选择设备

wgl 4 lat temu
rodzic
commit
615effff1c

+ 24 - 5
src/projects/business/views/Master/Company/RegisterExamine.vue

@@ -60,7 +60,7 @@
 
 				</div>
 			</div>
-			
+
 			<div v-show="recordList.length>0 && listForm.status==0" class="fyy-bindfyy-btn">
 				<form class="mui-input-group">
 					<div class="mui-input-row mui-checkbox mui-left">
@@ -211,7 +211,10 @@
 						if (e.index == 1) {
 							_this.set_register_examine_form(_this.subForm);
 							_this.$router.push({
-								name: 'MasterCompanyRegisterSelectDevice'
+								name: 'MasterCompanyRegisterSelectDevice',
+								query: {
+									hasSceneId4: _this.hasSceneId4 ? '1' : '0'
+								}
 							})
 						}
 					})
@@ -236,6 +239,21 @@
 			window.removeEventListener('scroll', _this.handleScrool);
 		},
 		computed: {
+			hasSceneId4: {
+				// getter
+				get: function() {
+					for (var i = 0; i < this.recordList.length; i++) {
+						if (this.selectIdList.indexOf(this.recordList[i]['id']) > -1 && this.recordList[i]['sceneId'] == '4') {
+							return true;
+						}
+					}
+					return false;
+				},
+				// setter
+				set: function(newValue) {
+					console.log(newValue)
+				}
+			},
 			...mapGetters({
 				openId: 'wx_openid',
 				token: 'token',
@@ -256,11 +274,12 @@
 		color: #05c8af !important;
 		border: 1px solid #05c8af !important;
 	}
+
 	/*.vongi-wordcard-sp .mui-fullscreen{
 		bottom: 50px;
 	}*/
-	
-	.fyy-bindfyy-btn button{
-		width:30%;
+
+	.fyy-bindfyy-btn button {
+		width: 30%;
 	}
 </style>

+ 18 - 1
src/projects/business/views/Master/Company/RegisterInfo.vue

@@ -157,7 +157,10 @@
 							if (e.index == 1) {
 								_this.set_register_examine_form(_this.subForm);
 								_this.$router.push({
-									name: 'MasterCompanyRegisterSelectDevice'
+									name: 'MasterCompanyRegisterSelectDevice',
+									query: {
+										hasSceneId4: _this.hasSceneId4 ? '1' : '0'
+									}
 								})
 							}
 						}
@@ -217,6 +220,20 @@
 					console.log(newValue)
 				}
 			},
+			hasSceneId4: {
+				// getter
+				get: function() {
+					if (this.selectIdList.indexOf(this.detail['id']) > -1 && this.detail['sceneId'] == '4') {
+						return true;
+					} else {
+						return false;
+					}
+				},
+				// setter
+				set: function(newValue) {
+					console.log(newValue)
+				}
+			},
 			...mapGetters({
 				openId: 'wx_openid',
 				token: 'token',

+ 10 - 2
src/projects/business/views/Master/Company/RegisterSelectDevice.vue

@@ -58,15 +58,22 @@
 				checkVal: [],
 				recordList: [],
 				successVisible: false,
+
+				hasSceneId4: this.$route.query.hasSceneId4
 			}
 		},
 		created() {
 			if (this.register_examine_form) {
 				this.subForm = this.register_examine_form;
 			}
-			if (!this.subForm.ids || !this.subForm.status) {
+			if ((!this.subForm.ids || !this.subForm.status) && this.hasSceneId4 == '0') {
 				this.$router.go(-1);
 			}
+
+			//如果是居家养老场景则自动审核,不需要选设备
+			if (this.hasSceneId4 == '1') {
+				this.submit();
+			}
 		},
 		methods: {
 			//获取设备列表
@@ -82,7 +89,8 @@
 			},
 			//表单检测
 			checkForm() {
-				if (!this.subForm.bindDevices) {
+				//只要要检测的时候才检测
+				if (!this.subForm.bindDevices && this.hasSceneId4 == '0') {
 					mui.toast('请选择设备');
 					return false;
 				} else {