zhanghongrui 1 yıl önce
ebeveyn
işleme
4fae96cb35
2 değiştirilmiş dosya ile 88 ekleme ve 14 silme
  1. 8 0
      api/common.js
  2. 80 14
      pages/statistics/statistics.vue

+ 8 - 0
api/common.js

@@ -1,5 +1,13 @@
 import request from '@/utils/request'
+getByUserListAndDicts
+// 获取节点类型
+export function getByUserListAndDicts(id) {
 
+	return request({
+		'url': '/zdsz/engineeringIndustry/getByUserListAndDicts/' + id,
+		'method': 'get',
+	})
+}
 // 获取市政历史详情
 export function getHistoryMunicipalDetails(id, name) {
 

+ 80 - 14
pages/statistics/statistics.vue

@@ -542,6 +542,7 @@
 		getRoomProjectId,
 		getRoomProjectList,
 		getHistoryByUserList,
+		getByUserListAndDicts,
 	} from '@/api/common'
 
 	export default {
@@ -861,11 +862,13 @@
 					this.EngineeringList = [];
 					this.userRole.forEach((item, index) => {
 
-						this.EngineeringList.push({
-							'id': index,
-							'name': item
-						})
-
+						if (item != '危险作业工程') {
+							console.log("===", item)
+							this.EngineeringList.push({
+								'id': index,
+								'name': item
+							})
+						}
 					});
 
 					this.selectList = this.EngineeringList;
@@ -881,26 +884,58 @@
 						this.dictOptions = response.data;
 					});
 				} else if (e == 'gcfl') {
-					if (this.isEmpty(this.ProjectType.dictValue)) {
-						this.$modal.msg('请选择工程类型')
+					if (this.EngineeringValue == '民用工程') {
+						if (this.isEmpty(this.ProjectType.dictValue)) {
+							this.$modal.msg('请选择工程类型')
+
+						} else {
+							this.openDict = true;
+							getDicts(this.ProjectType.dictValue).then(response => {
+								this.dictOptions = response.data;
 
+							});
+						}
 					} else {
+						//工业5   带起封堵施工3
+						let nodeType = '';
+						if (this.EngineeringValue == '工业工程') {
+							nodeType = '5';
+						} else if (this.EngineeringValue == '带气封堵施工') {
+							nodeType = '3';
+						}
 						this.openDict = true;
-						getDicts(this.ProjectType.dictValue).then(response => {
-							this.dictOptions = response.data;
+						getByUserListAndDicts(nodeType).then(
+							response => {
+								this.dictOptions = response.data;
+							});
 
-						});
 					}
 				} else if (e == 'gcbz') {
-					if (this.isEmpty(this.ProjectClassification.dictValue)) {
-						this.$modal.msg('请选择工程分类')
+					if (this.EngineeringValue == '民用工程') {
+						if (this.isEmpty(this.ProjectClassification.dictValue)) {
+							this.$modal.msg('请选择工程分类')
+
+						} else {
+							this.openDict = true;
+							getDicts(this.ProjectType.dictValue + "_" + this.ProjectClassification.dictValue).then(
+								response => {
+									this.dictOptions = response.data;
 
+								});
+						}
 					} else {
+						let nodeType = '';
+						if (this.EngineeringValue == '市政工程') {
+							nodeType = '4';
+						} else if (this.EngineeringValue == '基建工程') {
+							nodeType = '2';
+						} else if (this.EngineeringValue == '顶管工程') {
+							nodeType = '1';
+						}
 						this.openDict = true;
-						getDicts(this.ProjectType.dictValue + "_" + this.ProjectClassification.dictValue).then(
+						getByUserListAndDicts(nodeType).then(
 							response => {
 								this.dictOptions = response.data;
-
 							});
 					}
 				} else if (e == 'shzt') {
@@ -1052,7 +1087,32 @@
 					});
 				}
 			},
+			clear() {
+				//清空所有筛选项
+				this.XZQValue3 = '';
+				this.XQValue3 = '';
+				this.LDValue3 = '';
+				this.DYValue3 = '';
+				this.FJValue3 = '';
+				this.ProjectType = {
+					dictValue: '',
+					dictLabel: ''
+				};
+				this.ProjectClassification = {
+					dictValue: '',
+					dictLabel: ''
+				};
+				this.ProjectSteps = {
+					dictValue: '',
+					dictLabel: ''
+				};
+				this.ReviewStatus = {
+					dictValue: '',
+					dictLabel: ''
+				};
+				this.EngineeringName='';
 
+			},
 			changeSelect(item, index) {
 
 				this.open = false;
@@ -1060,6 +1120,7 @@
 				if (this.type == 'gcx') {
 					this.EngineeringValue = item.name
 					this.changeTab();
+					this.clear();
 
 				} else if (this.type == 'xzq') {
 					this.XZQValue = item;
@@ -1417,6 +1478,11 @@
 
 					let param = {
 						type: chooseType,
+						enginName: this.EngineeringName,
+						enginType: this.ProjectClassification.dictValue == undefined ? '' : this
+							.ProjectClassification.dictValue,
+						nodeType: this.ProjectSteps.dictLabel == undefined ? '' : this.ProjectSteps.dictLabel,
+						enginStatus: this.ReviewStatus.dictValue == undefined ? '' : this.ReviewStatus.dictValue,
 						district: this.XZQValue3.dictValue == undefined ? '' : this.XZQValue3.dictValue,
 						areaId: this.XQValue3.id == undefined ? '' : this.XQValue3.id,
 						buildingId: this.LDValue3.id == undefined ? '' : this.LDValue3.id,