Ver código fonte

sync
统计页面新增 工业/市政/顶管/碰口 统计功能

menchuang 11 meses atrás
pai
commit
aecdf44593
3 arquivos alterados com 338 adições e 13 exclusões
  1. 8 0
      api/common.js
  2. 3 3
      config.js
  3. 327 10
      pages/statistics/statistics.vue

+ 8 - 0
api/common.js

@@ -564,4 +564,12 @@ export function getGasSealingHistoryList(id, type) {
 		'url': '/zdsz/engineeringAirWall/' + id + '/' + type,
 		'method': 'get',
 	})
+}
+
+//统计 工业/市政/顶管/碰口
+export function getProjectStatisticsData(id, type) {
+	return request({
+		'url': '/zdsz/engineeringWasteMaterial/' + id + '/' + type,
+		'method': 'get',
+	})
 }

+ 3 - 3
config.js

@@ -2,10 +2,10 @@
 module.exports = {
 
 	//baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
-	//baseUrl: 'http://192.168.4.88:8080',
+	// baseUrl: 'http://192.168.4.88:8080',
 	 //baseUrl: 'http://192.168.4.23:8080',
-	//baseUrl: 'http://192.168.4.20:8080',
-	baseUrl: 'http://192.168.4.6:8080',
+	baseUrl: 'http://192.168.4.20:8080',
+	// baseUrl: 'http://192.168.4.6:8080',
 
 	baseIconUrl: 'https://www.xcx.cczdsz.cn/app/images/',
 	// 应用信息

+ 327 - 10
pages/statistics/statistics.vue

@@ -176,13 +176,13 @@
 						</view>
 
 					</view>
-					<image :src="loadImgSrc('lou-img-bg.png')" style="width: 110%;
+					<!-- <image :src="loadImgSrc('lou-img-bg.png')" style="width: 110%;
     height: 121px;
     position: absolute;
     bottom: 15px;
     left: -5px;
     z-index: 1;
-"></image>
+"></image> -->
 					<scroll-view :scroll-x="true" class="view_bg_build" v-if="roomList.length > 0">
 						<view class="HuaDongBiao">
 							<view class="NeiRong" v-for="(item,index) in roomList" :key="index">
@@ -215,22 +215,214 @@
 						</view>
 
 					</view>
+
 				</view>
 
+				<view class="view-bg" style="margin-bottom: 40rpx;">
+					<text class="title-txt">工业工程</text>
+					<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">工程名称</view>
+						<view class="uni-list-cell-db">
+							<view v-if="isEmpty(projectObj01.id)" style="margin-top: 10;"
+								@click="getProjectTypeList('engineeringIndustry')">
+								<span style="color: darkgray;">请选择工程</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+							<view v-else style="margin-top: 10;" @click="getProjectTypeList('engineeringIndustry')">
+								<span style="color: black;">{{projectObj01.name}}</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+						</view>
 
-			</scroll-view>
-		</view>
-		<view v-else-if="isLeader=='app_user'">
+					</view>
+					<view v-if="!isEmpty(projectObj01.id)">
+						<view class="table">
+							<view class="felx-row">
+								<view class="h-tr" style="flex: 1">名称</view>
+								<view class="h-tr" style="flex: 1">实际用料</view>
+								<view class="h-tr" style="flex: 1;align-items: center;">预计用料</view>
+								<view class="h-tr" style="flex: 1">占比</view>
+							</view>
+						</view>
+						<view class="felx-row">
+							<view class="h-td" style="flex: 1">PE材料</view>
+							<view class="h-td" style="flex: 1">{{ projectBody01.materialPercentagePE.actuality }}</view>
+							<view class="h-td" style="flex: 1">{{ projectBody01.materialPercentagePE.anticipation }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody01.materialPercentagePE.percentage }}
+							</view>
+						</view>
+						<view class="felx-row">
+							<view class="h-td" style="flex: 1">钢材</view>
+							<view class="h-td" style="flex: 1">{{ projectBody01.materialPercentageIron.actuality }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody01.materialPercentageIron.anticipation }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody01.materialPercentageIron.percentage }}
+							</view>
+						</view>
+						<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+							<view class="uni-list-cell-left">工程进度</view>
+							<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;"></view>
+						</view>
+						<view class="felx-row" v-for="(item, index) in projectBody01.nodeCheck" :key="index">
+							<view class="h-td" style="flex: 1">{{ item.name }}</view>
+							<view class="h-td" style="flex: 1">{{ item.value }}</view>
+						</view>
+					</view>
+				</view>
 
+				<view class="view-bg" style="margin-bottom: 40rpx;">
+					<text class="title-txt">市政工程</text>
+					<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">工程名称</view>
+						<view class="uni-list-cell-db">
+							<view v-if="isEmpty(projectObj02.id)" style="margin-top: 10;"
+								@click="getProjectTypeList('engineeringMunicipal')">
+								<span style="color: darkgray;">请选择工程</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+							<view v-else style="margin-top: 10;" @click="getProjectTypeList('engineeringMunicipal')">
+								<span style="color: black;">{{projectObj02.name}}</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+						</view>
 
+					</view>
+					<view v-if="!isEmpty(projectObj02.id)">
+						<view class="table">
+							<view class="felx-row">
+								<view class="h-tr" style="flex: 1">名称</view>
+								<view class="h-tr" style="flex: 1">实际用料</view>
+								<view class="h-tr" style="flex: 1;align-items: center;">预计用料</view>
+								<view class="h-tr" style="flex: 1">占比</view>
+							</view>
+						</view>
+						<view class="felx-row">
+							<view class="h-td" style="flex: 1">PE材料</view>
+							<view class="h-td" style="flex: 1">{{ projectBody02.materialPercentagePE.actuality }}</view>
+							<view class="h-td" style="flex: 1">{{ projectBody02.materialPercentagePE.anticipation }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody02.materialPercentagePE.percentage }}
+							</view>
+						</view>
+						<view class="felx-row">
+							<view class="h-td" style="flex: 1">钢材</view>
+							<view class="h-td" style="flex: 1">{{ projectBody02.materialPercentageIron.actuality }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody02.materialPercentageIron.anticipation }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody02.materialPercentageIron.percentage }}
+							</view>
+						</view>
+						<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+							<view class="uni-list-cell-left">工程进度</view>
+							<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;"></view>
+						</view>
+						<view class="felx-row" v-for="(item, index) in projectBody02.nodeCheck" :key="index">
+							<view class="h-td" style="flex: 1">{{ item.name }}</view>
+							<view class="h-td" style="flex: 1">{{ item.value }}</view>
+						</view>
+					</view>
+				</view>
 
 
 
-			<view class="background">
+				<view class="view-bg" style="margin-bottom: 40rpx;">
+					<text class="title-txt">顶管工程</text>
+					<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">工程名称</view>
+						<view class="uni-list-cell-db">
+							<view v-if="isEmpty(projectObj03.id)" style="margin-top: 10;"
+								@click="getProjectTypeList('engineeringPipeJacking')">
+								<span style="color: darkgray;">请选择工程</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+							<view v-else style="margin-top: 10;" @click="getProjectTypeList('engineeringPipeJacking')">
+								<span style="color: black;">{{projectObj03.name}}</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+						</view>
+
+					</view>
+					<view v-if="!isEmpty(projectObj03.id)">
+						<view class="table">
+							<view class="felx-row">
+								<view class="h-tr" style="flex: 1">名称</view>
+								<view class="h-tr" style="flex: 1">实际用料</view>
+								<view class="h-tr" style="flex: 1;align-items: center;">预计用料</view>
+								<view class="h-tr" style="flex: 1">占比</view>
+							</view>
+						</view>
+						<view class="felx-row">
+							<view class="h-td" style="flex: 1">PE材料</view>
+							<view class="h-td" style="flex: 1">{{ projectBody03.materialPercentagePE.actuality }}</view>
+							<view class="h-td" style="flex: 1">{{ projectBody03.materialPercentagePE.anticipation }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody03.materialPercentagePE.percentage }}
+							</view>
+						</view>
+						<view class="felx-row">
+							<view class="h-td" style="flex: 1">钢材</view>
+							<view class="h-td" style="flex: 1">{{ projectBody03.materialPercentageIron.actuality }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody03.materialPercentageIron.anticipation }}
+							</view>
+							<view class="h-td" style="flex: 1">{{ projectBody03.materialPercentageIron.percentage }}
+							</view>
+						</view>
+						<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+							<view class="uni-list-cell-left">工程进度</view>
+							<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;"></view>
+						</view>
+						<view class="felx-row" v-for="(item, index) in projectBody03.nodeCheck" :key="index">
+							<view class="h-td" style="flex: 1">{{ item.name }}</view>
+							<view class="h-td" style="flex: 1">{{ item.value }}</view>
+						</view>
+					</view>
+				</view>
 
 
-				<view>
 
+				<view class="view-bg" style="margin-bottom: 40rpx;">
+					<text class="title-txt">碰口工程</text>
+					<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">工程名称</view>
+						<view class="uni-list-cell-db">
+							<view v-if="isEmpty(projectObj04.id)" style="margin-top: 10;"
+								@click="getProjectTypeList('touchOperationEngineering')">
+								<span style="color: darkgray;">请选择工程</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+							<view v-else style="margin-top: 10;"
+								@click="getProjectTypeList('touchOperationEngineering')">
+								<span style="color: black;">{{projectObj04.name}}</span>
+								<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+							</view>
+						</view>
+
+					</view>
+					<view v-if="!isEmpty(projectObj04.id)">
+						<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
+							<view class="uni-list-cell-left">工程进度</view>
+							<view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;"></view>
+						</view>
+						<view class="felx-row" v-for="(item, index) in projectBody04.nodeCheck" :key="index">
+							<view class="h-td" style="flex: 1">{{ item.name }}</view>
+							<view class="h-td" style="flex: 1">{{ item.value }}</view>
+						</view>
+					</view>
+				</view>
+
+
+
+
+
+			</scroll-view>
+		</view>
+		<view v-else-if="isLeader=='app_user'">
+			<view class="background">
+				<view>
 					<view
 						style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
 						筛选
@@ -510,6 +702,9 @@
 
 		<SelectPicker :list="dictOptions" @change="changeSelect" v-if="openDict" @close="closeDict" titleKey="dictLabel"
 			subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
+
+		<SelectPicker :list="projectList" @change="changeSelectP" v-if="openP" @close="closeP" titleKey="name"
+			subtitleKey="id" v-model="name"></SelectPicker>
 	</view>
 </template>
 
@@ -520,6 +715,7 @@
 	import {
 		gethistoryList,
 		getKShistoryList,
+		getProjectStatisticsData
 	} from '@/api/common'
 
 	import {
@@ -543,6 +739,10 @@
 		getRoomProjectList,
 		getHistoryByUserList,
 		getByUserListAndDicts,
+		getengineeringNameListNew,
+		getengineeringNameList,
+		getTopPipeNameList,
+		getProjectName
 	} from '@/api/common'
 
 	export default {
@@ -622,7 +822,61 @@
 				nodeType: '',
 				roomItem: {},
 				roomId: '',
-
+				projectList: [],
+				projectBody01: {
+					'materialPercentagePE': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					},
+					'materialPercentageIron': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					}
+				},
+				projectBody02: {
+					'materialPercentagePE': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					},
+					'materialPercentageIron': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					}
+				},
+				projectBody03: {
+					'materialPercentagePE': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					},
+					'materialPercentageIron': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					}
+				},
+				projectBody04: {
+					'materialPercentagePE': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					},
+					'materialPercentageIron': {
+						'actuality': '',
+						'anticipation': '',
+						'percentage': ''
+					}
+				},
+				projectObj01: {},
+				projectObj02: {},
+				projectObj03: {},
+				projectObj04: {},
+				openP: false,
+				currentProjectType: ''
 			}
 		},
 		created() {},
@@ -653,6 +907,66 @@
 
 		},
 		methods: {
+			changeSelectP(item, index) {
+				this.openP = false;
+				let type = this.currentProjectType;
+				if (type == 'engineeringIndustry') { // 工业工程
+					this.projectObj01 = item;
+				} else if (type == 'engineeringMunicipal') { // 市政工程
+					this.projectObj02 = item;
+				} else if (type == 'engineeringPipeJacking') { // 顶管工程
+					this.projectObj03 = item;
+				} else if (type == 'touchOperationEngineering') { // 碰口作业
+					this.projectObj04 = item;
+				}
+				this.getProjectData(item.id, type);
+			},
+			getProjectTypeList(type) {
+				this.currentProjectType = type;
+				if (type == 'engineeringIndustry') {
+					this.projectList = null;
+					getengineeringNameListNew("", "").then(res => {
+						this.projectList = res.data;
+						this.openP = true;
+					})
+				} else if (type == 'engineeringMunicipal') {
+					this.projectList = null;
+					getengineeringNameList("", "", "").then(res => {
+						this.projectList = res.data;
+						this.openP = true;
+
+					})
+				} else if (type == 'engineeringPipeJacking') {
+					this.projectList = null;
+					getTopPipeNameList("", "").then(res => {
+						this.projectList = res.data;
+						this.openP = true;
+
+					})
+				} else if (type == 'touchOperationEngineering') {
+					this.projectList = null;
+					getProjectName("", 1, 999999).then(res => {
+						let result = JSON.parse(JSON.stringify(res.rows).replace(/enginName/g, 'name'));
+						this.projectList = result;
+						this.openP = true;
+
+					})
+				}
+
+			},
+			getProjectData(id, type) {
+				getProjectStatisticsData(id, type).then(response => {
+					if (type == 'engineeringIndustry') { // 工业工程
+						this.projectBody01 = response.data;
+					} else if (type == 'engineeringMunicipal') { // 市政工程
+						this.projectBody02 = response.data;
+					} else if (type == 'engineeringPipeJacking') { // 顶管工程
+						this.projectBody03 = response.data;
+					} else if (type == 'touchOperationEngineering') { // 碰口作业
+						this.projectBody04 = response.data;
+					}
+				})
+			},
 			goHistory(item) {
 
 				this.roomItem = item;
@@ -719,7 +1033,7 @@
 								obj))
 					})
 				} else if (this.EngineeringValue == '市政工程' || this.EngineeringValue == '基建工程' || this.EngineeringValue ==
-					'顶管工程' || this.EngineeringValue == '工业工程'|| this.EngineeringValue == '碰口作业') {
+					'顶管工程' || this.EngineeringValue == '工业工程' || this.EngineeringValue == '碰口作业') {
 					this.nodeId = item.id;
 					let result = JSON.parse(JSON.stringify(item.status).replace(/type/g, 'Type'));
 					this.typeList = result;
@@ -871,7 +1185,7 @@
 							id: this.nodeId,
 							type: item.Type,
 						};
-						console.log("===",obj)
+						console.log("===", obj)
 						uni.navigateTo({
 							url: '/pages/statistics/historyDetailsMouth?params=' + encodeURIComponent(JSON
 								.stringify(
@@ -1163,6 +1477,9 @@
 				this.changeTab();
 
 			},
+			closeP(item, index) {
+				this.openP = false;
+			},
 			changeSelect(item, index) {
 
 				this.open = false;