Преглед изворни кода

非工厂园区审核都不用选部门

wgl пре 4 година
родитељ
комит
d4e6a7f944

+ 22 - 6
src/projects/business/views/Master/Company/RegisterExamine.vue

@@ -217,16 +217,17 @@
 							//同意
 							if (_this.subForm.status == 1) {
 								_this.set_register_examine_form(_this.subForm);
-								if (_this.hasSceneId4) {
+								if (_this.hasSceneId1) {
 									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDevice',
-										query: {
-											hasSceneId4: _this.hasSceneId4 ? '1' : '0'
-										}
+										name: 'MasterCompanyRegisterSelectDepartment',
 									})
 								} else {
 									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDepartment',
+										name: 'MasterCompanyRegisterSelectDevice',
+										query: {
+											hasSceneId1: _this.hasSceneId1 ? '1' : '0',
+											hasSceneId4: _this.hasSceneId4 ? '1' : '0',
+										}
 									})
 								}
 							} else {
@@ -265,6 +266,21 @@
 			window.removeEventListener('scroll', _this.handleScrool);
 		},
 		computed: {
+			hasSceneId1: {
+				// 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'] == '1') {
+							return true;
+						}
+					}
+					return false;
+				},
+				// setter
+				set: function(newValue) {
+					console.log(newValue)
+				}
+			},
 			hasSceneId4: {
 				// getter
 				get: function() {

+ 21 - 6
src/projects/business/views/Master/Company/RegisterInfo.vue

@@ -162,16 +162,17 @@
 							//同意
 							if (_this.subForm.status == 1) {
 								_this.set_register_examine_form(_this.subForm);
-								if (_this.hasSceneId4) {
+								if (_this.hasSceneId1) {
 									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDevice',
-										query: {
-											hasSceneId4: _this.hasSceneId4 ? '1' : '0'
-										}
+										name: 'MasterCompanyRegisterSelectDepartment',
 									})
 								} else {
 									_this.$router.push({
-										name: 'MasterCompanyRegisterSelectDepartment',
+										name: 'MasterCompanyRegisterSelectDevice',
+										query: {
+											hasSceneId1: _this.hasSceneId1 ? '1' : '0',
+											hasSceneId4: _this.hasSceneId4 ? '1' : '0',
+										}
 									})
 								}
 							} else {
@@ -243,6 +244,20 @@
 					console.log(newValue)
 				}
 			},
+			hasSceneId1: {
+				// getter
+				get: function() {
+					if (this.selectIdList.indexOf(this.detail['id']) > -1 && this.detail['sceneId'] == '1') {
+						return true;
+					} else {
+						return false;
+					}
+				},
+				// setter
+				set: function(newValue) {
+					console.log(newValue)
+				}
+			},
 			hasSceneId4: {
 				// getter
 				get: function() {