Bläddra i källkod

顶管工程新增页面 顶管工程新增接口 顶管工程历史 修改工业工程、市政工程传参以及历史页面参数取值判断

zhnghongrui 1 år sedan
förälder
incheckning
6263eba685

+ 33 - 1
api/common.js

@@ -1,5 +1,37 @@
 import request from '@/utils/request'
 
+// 获取顶管工程历史
+export function getTopPipeHistoryList(id, type) {
+
+	return request({
+		'url': '/zdsz/engineeringPipeJacking/' + id + '/' + type,
+		'method': 'get',
+	})
+}
+//顶管工程新增
+export function SubmitTopPipeWork(param) {
+	return request({
+		'url': '/zdsz/engineeringPipeJacking/AppAdd',
+		'method': 'post',
+		'data': param
+	})
+}
+
+//查询顶管工程详情
+export function getTopPipeWorkDetails(id) {
+	return request({
+		'url': '/zdsz/engineeringPipeJacking/' + id,
+		'method': 'get',
+	})
+}
+//顶管工程查询名称
+export function getTopPipeNameList() {
+	return request({
+		'url': '/zdsz/engineeringPipeJacking/queryListNew',
+		'method': 'get',
+
+	})
+}
 //危险作业工程列表查询
 export function getDangerousWorkProjectList(param) {
 	return request({
@@ -11,7 +43,7 @@ export function getDangerousWorkProjectList(param) {
 //查询危险作业工程详情
 export function getDangerousWorkProjectDetails(id) {
 	return request({
-		'url': '/zdsz/engineeringDangerous/query/'+id,
+		'url': '/zdsz/engineeringDangerous/query/' + id,
 		'method': 'get',
 	})
 }

+ 37 - 3
components/bottomSheet/bottomSheetMore.vue

@@ -20,6 +20,22 @@
 
 							<view class="uni-media-list-text-top" style="font-size: 13px;color: #000;margin-top: 5px;">
 								施工时间:{{value.constructTime}}</view>
+							<!-- <view v-if="title=='进场'||title=='导向'||title=='挖孔'||title=='回拖'"
+								class="uni-media-list-text-top" style="font-size: 13px;color: #000;margin-top: 5px;">
+								描述:{{value.remark}}</view> -->
+							<view v-if="title=='进场'||title=='导向'||title=='挖孔'||title=='回拖'"
+								class="uni-media-list-text-top">
+								<view class="uni-common-mt" style="width: 100%;">
+									<text class="uni-title uni-common-pl" style=" font-size: 13px;color:
+											#000;margin-top: 5px;">描述:</text>
+									<view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
+										<textarea class="textarea" maxlength="255" :disabled="true"
+											placeholder-style="padding: 10rpx;"
+											style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
+											auto-height>{{value.remark}}</textarea>
+									</view>
+								</view>
+							</view>
 							<view v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
 
 								<view class="uni-media-list-text-top"
@@ -87,6 +103,10 @@
 				default: {}
 			},
 
+			TitleType: {
+				type: String
+			}
+
 		},
 		created() {
 			this.getParamsData();
@@ -106,6 +126,12 @@
 			};
 		},
 		methods: {
+			// isEmpty(str) {
+
+			// 	return (!str || 0 === str.length);
+
+			// },
+
 			showPhoto(index, list) {
 				uni.previewImage({
 					current: index,
@@ -116,9 +142,17 @@
 			getParamsData() {
 				var selectData = this.data;
 				this.outPutData = selectData;
-				this.title = selectData.zEngineeringNodeBo.type;
-				this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
-				//this.historyPhotoList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList.zEngiineeringPhotoBoList;
+				//this.title = selectData.zEngineeringNodeBo.type;
+
+				//this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
+				if (this.TitleType == '市政工程') {
+					this.title = '市政工程';
+					this.historyList = selectData.zEngineeringNodeBoList[0].zEngineeringInfoBoList;
+				} else {
+					this.title = this.TitleType;
+					this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
+				}
+
 
 
 			},

+ 1 - 1
config.js

@@ -1,7 +1,7 @@
 // 应用全局配置
 module.exports = {
   
-  baseUrl: 'http://192.168.4.20:8080',
+  baseUrl: 'http://192.168.4.6:8080',
    // baseUrl: 'http://192.168.4.14:8089',
   // 应用信息
   appInfo: {

+ 13 - 9
pages.json

@@ -114,7 +114,7 @@
 			}
 		},
 		{
-			"path" : "pages/municipal/municipal",
+			"path": "pages/municipal/municipal",
 			"style": {
 				"navigationBarTitleText": "市政工程"
 			}
@@ -126,17 +126,21 @@
 			}
 		},
 		{
-			"path" : "pages/infrastructure/infrastructure",
-			"style" : 
-			{
-				"navigationBarTitleText" : "基建工程"
+			"path": "pages/infrastructure/infrastructure",
+			"style": {
+				"navigationBarTitleText": "基建工程"
+			}
+		},
+		{
+			"path": "pages/dangerous/dangerous",
+			"style": {
+				"navigationBarTitleText": "危险作业工程"
 			}
 		},
 		{
-			"path" : "pages/dangerous/dangerous",
-			"style" : 
-			{
-				"navigationBarTitleText" : "危险作业工程"
+			"path": "pages/TopPipeWork/TopPipeWork",
+			"style": {
+				"navigationBarTitleText": "顶管工程"
 			}
 		}
 

+ 883 - 0
pages/TopPipeWork/TopPipeWork.vue

@@ -0,0 +1,883 @@
+<template>
+	<view>
+		<view class="background">
+
+			<view class="uni-list">
+				<view class="container">
+					<view>
+						工程名称
+					</view>
+					<view v-if="this.isEmpty(this.projectName.id)" style="margin-top: 10;"
+						@click="pickerShow('gcmc',0)">
+						<span style="color: darkgray;">请选择工程名称</span>
+					</view>
+					<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gcmc',0)">
+						<span style="color: black;">{{projectName.name}}</span>
+					</view>
+				</view>
+
+			</view>
+			<view class="uni-list">
+				<view class="container">
+
+					<text>工程地点</text>
+					<input class="uni-input" type="text" v-model="gcddValue" disabled="true"
+						style="margin-left: 10px;text-align: right;"></input>
+				</view>
+			</view>
+			<view class="uni-list">
+				<view class="container">
+
+					<text>工程编码</text>
+					<input class="uni-input" type="text" v-model="gcbmValue" disabled="true"
+						style="margin-left: 10px;text-align: right;"></input>
+				</view>
+			</view>
+			<view class="uni-list">
+				<view class="container">
+
+					<text>施工单位</text>
+					<input class="uni-input" type="text" v-model="sgdwValue" disabled="true"
+						style="margin-left: 10px;text-align: right;"></input>
+				</view>
+			</view>
+			<view class="uni-list">
+				<view class="container">
+
+					<text>工程规模</text>
+					<input class="uni-input" type="text" v-model="gcgmValue" disabled="true"
+						style="margin-left: 10px;text-align: right;"></input>
+				</view>
+			</view>
+			<view class="uni-list">
+				<view class="container">
+
+					<text>施工质量</text>
+					<input class="uni-input" type="text" v-model="sgzlValue" disabled="true"
+						style="margin-left: 10px;text-align: right;"></input>
+				</view>
+			</view>
+			<view class="uni-list">
+				<view class="container">
+
+					<text>施工进度</text>
+					<input class="uni-input" type="number" v-model="sgjdValue" disabled="true"
+						style="margin-left: 10px;text-align: right;"></input>
+				</view>
+			</view>
+
+
+
+			<view class="uni-list">
+				<view class="align-items" style="margin-bottom: 20px;">
+					<!-- 	<view class="container" style="color: gainsboro;">*请上传文件</view> -->
+					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
+						<!-- <image src="/static/images/chooseimg.png" mode=""
+								style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="chooseFile()"></image> -->
+						<view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
+							<view style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+								@click="chooseModel(item.picUrl,item.fileName)">
+								{{item.fileName}}
+								<!-- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
+									</image> -->
+
+							</view>
+
+							<!-- <view @click="removeFile(index)"
+									style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+									<uni-icons type="close" color="darkgray" size="18"></uni-icons>
+								</view> -->
+						</view>
+					</view>
+				</view>
+			</view>
+
+
+
+
+			<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
+				subtitleKey="id" v-model="name"></SelectPicker>
+
+
+			<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
+				titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
+		</view>
+
+		<view class="background">
+			<view>
+				<view class="uni-list">
+					<view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
+						{{objValue.value}}
+
+						<span
+							style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 15px;"
+							@click="history">历史</span>
+					</view>
+					<view class="container">
+
+						<view>
+							施工时间
+						</view>
+						<view style="margin-top: 10;" @click="openDatetimePicker()">
+							<span style="color: black;">{{time}}</span>
+						</view>
+					</view>
+					<view class="container">
+						<view class="uni-common-mt" style="width: 100%;">
+							<text class="uni-title uni-common-pl">描述</text>
+							<view style="width: 100%;padding-right: 20rpx;box-sizing: border-box;">
+								<textarea class="textarea" placeholder="请输入描述" maxlength="100"
+									placeholder-style="padding: 10rpx;"
+									style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
+									auto-height v-model="projectContent"></textarea>
+							</view>
+						</view>
+					</view>
+
+
+					<view class="uni-list">
+						<view class="container">
+
+							<view>
+								材 质
+							</view>
+							<view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
+								@click="pickerShow('cz')">
+								<span style="color: darkgray;">请选择材质</span>
+							</view>
+							<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
+								<span style="color: black;">{{materialValue.name}}</span>
+							</view>
+						</view>
+					</view>
+					<view class="uni-list">
+						<view class="container">
+
+							<view>
+								规 格
+							</view>
+							<view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
+								@click="pickerShow('gg')">
+								<span style="color: darkgray;">请选择规格</span>
+							</view>
+							<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
+								<span style="color: black;">{{specificationValue.name}}</span>
+							</view>
+						</view>
+					</view>
+					<view class="uni-list">
+						<view class="container">
+
+							<text>数 量</text>
+							<input class="uni-input" type="number" v-model="inputNumberValue" placeholder="请填写数量"
+								maxlength="11" style="margin-left: 10px;text-align: right;"></input>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
+				<view class="container" style="color: gainsboro;">*请上传照片</view>
+				<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
+					<image src="/static/images/chooseimg.png" mode=""
+						style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="choose()"></image>
+					<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
+						<view
+							v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ">
+							<image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+								@click="showPhoto(index)">
+							</image>
+						</view>
+						<view v-else>
+							<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+						</view>
+						<view @click="remove(index)"
+							style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+							<uni-icons type="close" color="darkgray" size="18"></uni-icons>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="action-btn">
+			<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
+		</view>
+
+		<bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
+		<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
+			:time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
+		<!-- 下载提示页面 -->
+		<mypopup :show="show_loding" :popupText="popupText" :titleText="titleText" :cancelText="cancelText"
+			:confirmText="confirmText" @close="cancel_loding" @confirm="confirm_loding">
+		</mypopup>
+
+	</view>
+</template>
+
+<script>
+	import SelectPicker from '../../components/selectPicker/select_picker.vue'
+	import bottomSheet from '../../components/bottomSheet/bottomSheetMore.vue'
+	import mypopup from '../../components/mypopup/mypopup.vue'
+	import uniIcons from '../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
+
+	import {
+		getDicts
+	} from "@/api/system/dict/data";
+	import {
+		getToken
+	} from '../../utils/auth';
+
+	import {
+
+		getEnginMaterialQualityList,
+		getEnginSpecificationsList,
+		getTopPipeWorkDetails,
+		getTopPipeNameList,
+		SubmitTopPipeWork,
+		getTopPipeHistoryList
+
+	} from '@/api/common'
+	export default {
+		components: {
+			SelectPicker,
+			uniIcons,
+			bottomSheet,
+			mypopup
+		},
+
+
+
+		data() {
+			return {
+
+				historyList: {}, //历史数据
+				show_loding: false,
+				popupText: '', //对话框内容
+				titleText: '',
+				cancelText: '',
+				confirmText: '',
+				objValue: '', //上一页面传过来的值  新增接口用
+				headers: {
+					Authorization: "Bearer " + getToken()
+				},
+				time: '', //施工时间
+				open: false,
+				objValue: '', //上一页面传过来的值  新增接口用
+				openDict: false,
+				selectList: [],
+				dictOptions: [],
+				imgArr: [],
+				fileArr: [],
+				projectName: '', //工程名称
+				specificationValue: {}, //规格
+				materialValue: {}, //材质
+				inputNumberValue: '',
+				gcddValue: '', //工程地点
+				gcbmValue: '', //工程编码
+				sgdwValue: '', //施工单位
+				gcgmValue: '', //工程规模
+				sgzlValue: '', //施工质量
+				sgjdValue: '', //施工进度
+				materialList: '', //材质list
+				enginId: '', //其他工程id
+				id: '', //工程id
+				fileUrl: '', //点击的文件地址
+				fileName: '', //点击的文件名称
+				projectContent: '', //描述  
+				zEngineeringMaterialBo: [], //给后台传的值  用料列表
+			}
+		},
+		created() {
+			this.time = this.traversalTime(new Date().getTime()) //在data里定义变量-nowTime
+			console.log(this.time)
+		},
+		onLoad(options) {
+			if ('params' in options) {
+				this.objValue = JSON.parse(decodeURIComponent(options.params));
+			}
+
+
+		},
+		methods: {
+			//判断是否选择
+
+			isEmpty(str) {
+
+				return (!str || 0 === str.length);
+
+			},
+
+			handleSubmit(e) {
+
+				this.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
+
+			},
+
+			//获取当前时间
+			traversalTime(timestamp) {
+				//timestamp(时间戳)是整数,否则要parseInt转换
+				let time = new Date(timestamp);
+				let y = time.getFullYear();
+				let m = time.getMonth() + 1;
+				let d = time.getDate();
+				let h = time.getHours();
+				let mm = time.getMinutes();
+				let s = time.getSeconds();
+				return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this
+					.addTimes(
+						mm) + ':' + this.addTimes(s);
+
+
+			},
+			addTimes(m) {
+				return m < 10 ? '0' + m : m
+			},
+			// 打开picker
+			openDatetimePicker() {
+				this.$refs.myPicker.show();
+			},
+
+			// 关闭picker
+			closeDatetimePicker() {
+				this.$refs.myPicker.hide();
+			},
+
+			showPhoto(index) {
+				uni.previewImage({
+					current: index,
+					urls: this.imgArr,
+				})
+
+			},
+			remove(index) {
+				uni.showModal({
+					title: '提示',
+					content: '是否删除该图片或视频?',
+					success: (res) => {
+						if (res.confirm) {
+							this.imgArr.splice(index, 1)
+							console.log('this.imgarr', this.imgArr)
+							if (this.imgArr.length <= 0) {
+								this.photo = true;
+							}
+						}
+					}
+				})
+			},
+			choose() {
+				let _this = this;
+				uni.showActionSheet({
+					title: '上传',
+					itemList: ['图片', '视频'],
+					success: (res) => {
+						console.log(res)
+						if (res.tapIndex == 0) {
+							this.chooseimage()
+						} else {
+							this.choosevideo()
+						}
+					}
+				})
+			},
+			chooseimage() {
+
+				let _this = this;
+				console.log('图片', _this.headers)
+				uni.chooseImage({
+					sizeType: ['album', 'camera'],
+					success(resp) {
+						resp.tempFiles.forEach((item, index) => {
+							const task = uni.uploadFile({
+								url: _this.$HTTP + `/obs`,
+								filePath: item.path,
+								name: 'file',
+								formData: {},
+								header: _this.headers,
+
+								success: res => {
+									// 判断是否json字符串,将其转为json格式
+									console.log("结果", res)
+									// let data = _this.$u.test.jsonString(res
+									// 	.data) ? JSON.parse(res.data) : res.data;
+									let data = JSON.parse(res.data);
+									if (![200].includes(data.code)) {
+										// this.uploadError(index, data);
+										_this.$modal.msg(data.msg)
+									} else {
+										if (_this.progress === 100) {
+											console.log('_this.progress', _this.progress)
+											//console.log('data----', data)data
+											console.log('res--', res)
+											_this.imgArr.push(data.data.url)
+											console.log('imgArr', _this.imgArr)
+											_this.$modal.msg('上传成功!')
+											_this.photo = false;
+										}
+									}
+								},
+								fail: e => {
+									console.log(e)
+									_this.$modal.msg('上传失败!')
+									//_this.uploadError(index, e);
+								},
+								complete: res => {
+									uni.hideLoading();
+									_this.uploading = false;
+
+								}
+							});
+							task.onProgressUpdate(res => {
+								_this.progress = res.progress;
+								console.log('onProgressUpdate', res)
+								console.log('task.onProgressUpdate', _this.progress)
+								uni.showLoading({
+									title: '上传中'
+								})
+								if (_this.progress != 100) {
+									_this.loading = false
+									console.log('_this.loading false', _this.loading)
+								} else {
+									_this.loading = true
+									console.log('_this.loading true', _this.loading)
+								}
+							});
+
+						})
+
+					},
+				})
+			},
+
+			choosevideo() {
+				let _this = this;
+				console.log('视频')
+				uni.chooseVideo({
+					sourceType: ['album', 'camera'],
+					maxDuration: 30,
+					success(resp) {
+						const task = uni.uploadFile({
+							url: _this.$HTTP + `/obs`,
+							filePath: resp.tempFilePath,
+							name: 'file',
+							formData: {},
+							header: _this.headers,
+							success: res => {
+								// 判断是否json字符串,将其转为json格式
+								let data = JSON.parse(res.data);
+								if (![200].includes(res.statusCode)) {
+									this.uploadError(index, data);
+								} else {
+									//上传成功
+									if (_this.progress === 100) {
+										console.log('_this.progress', _this.progress)
+										_this.imgArr.push(data.data.url)
+										console.log('imgArr', _this.imgArr)
+										_this.$modal.msg('上传成功!')
+										_this.photo = false;
+									}
+								}
+							},
+							fail: e => {
+								_this.$modal.msg('上传失败!')
+								this.uploadError(index, e);
+							},
+							complete: res => {
+								uni.hideLoading();
+								_this.uploading = false;
+							}
+						});
+						task.onProgressUpdate(res => {
+							_this.progress = res.progress;
+							console.log('onProgressUpdate', res)
+							uni.showLoading({
+								title: '上传中'
+							})
+							if (_this.progress != 100) {
+								_this.loading = false
+								console.log('_this.loading false', _this.loading)
+							} else {
+								_this.loading = true
+								console.log('_this.loading true', _this.loading)
+							}
+						});
+
+					},
+				})
+			},
+			chooseModel(url, name) {
+				this.cancelText = '复制';
+				this.confirmText = "下载";
+				this.titleText = "温馨提示"
+				this.popupText = "下载或者复制链接";
+				this.show_loding = true;
+				this.fileName = name;
+				this.fileUrl = url; //文件名称和下载地址赋值
+
+			},
+			//取消按钮
+			cancel_loding() {
+				let _this = this;
+				_this.show_loding = false;
+				console.log("复制")
+				if (!_this.isEmpty(_this.fileUrl)) {
+					console.log(_this.fileUrl)
+					console.log(_this.fileName)
+					uni.setClipboardData({
+						data: _this.fileUrl,
+						success() {
+							uni.showToast({
+								title: '已复制' + _this.fileName + '地址成功 请在浏览器打开',
+								icon: 'none'
+							});
+						},
+						fail(e) {
+							console.log("失败", e)
+							uni.showToast({
+								title: '复制失败',
+								icon: 'none'
+							});
+						}
+					});
+
+				}
+			},
+			//确定按钮
+			confirm_loding() {
+				this.show_loding = false;
+				console.log("下载")
+				this.download(this.fileUrl, this.fileName);
+
+
+			},
+
+			getDownLoadFilePath() {
+				let cachePath = `${uni.env.USER_DATA_PATH}/downloads`
+				let fm = uni.getFileSystemManager()
+				try {
+					// 访问成功则存在
+					fm.accessSync(cachePath)
+				} catch (error) {
+					// 不存在则新建
+					fm.mkdirSync(cachePath, true)
+				}
+				return cachePath
+			},
+			download(url, name) {
+
+				let savePath = this.getDownLoadFilePath();
+				console.log('点击下载', url);
+				console.log('点击下载333', savePath);
+				//var savePath = uni.env.USER_DATA_PATH + '/savePath'
+
+				uni.downloadFile({
+					url: url,
+					success: response => {
+						if (response.statusCode === 200) {
+							console.log("数据", response)
+							uni.getFileSystemManager().saveFile({
+								tempFilePath: response.tempFilePath,
+								filePath: `${savePath}/${name}`,
+								success: (resData) => {
+									console.log('保存路径', resData.savedFilePath)
+									console.log("dd", resData)
+									uni.showToast({
+										title: '下载成功'
+									})
+								},
+								fail: error => {
+									console.log('error: ', error)
+								}
+							})
+						}
+					},
+					fail: error => {
+						debugger
+						console.log("ddd", error)
+					}
+
+				})
+
+
+
+			},
+			pickerShow(e) {
+				this.type = e; //赋值类型
+				if (e == 'gcmc') {
+					this.open = true;
+					getTopPipeNameList().then(response => {
+						this.selectList = response.data;
+					});
+
+				} else if (e == 'cz') { //材质
+					this.open = true;
+					getEnginMaterialQualityList("顶管工程").then(response => {
+						this.selectList = response.data;
+					});
+
+				} else if (e == 'gg') { //规格
+					if (this.isEmpty(this.materialValue.id)) {
+						this.$modal.msg('请选择材质')
+
+					} else {
+						this.open = true;
+						this.selectList = this.materialList;
+
+					}
+
+				}
+
+			},
+			changeSelect(item, index) {
+				// this.index = index;
+				// this.address = item.communityName;
+				this.open = false;
+
+				if (this.type == 'gcmc') {
+					this.projectName = item;
+					uni.showLoading({
+						title: '加载中'
+					})
+					getTopPipeWorkDetails(item.id).then(res => {
+						uni.hideLoading();
+						this.gcddValue = res.data.enginAddre; //工程地点
+						this.gcbmValue = res.data.enginCode; //工程编码
+						this.sgdwValue = res.data.constructUnit; //施工单位
+						this.gcgmValue = res.data.enginScale; //工程规模
+						this.sgzlValue = res.data.constructQuality; //施工质量
+						this.sgjdValue = res.data.constructSchedule; //施工进度
+						this.fileArr = res.data.pics;
+						this.enginId = res.data.enginId;
+						this.id = res.data.id;
+
+
+
+					})
+
+				} else if (this.type == 'cz') {
+					this.materialValue = item;
+					this.specificationValue = ''; //重置规格
+					//根据材质ID 获取规格数据
+					getEnginSpecificationsList(item.id).then(res => {
+						this.materialList = res.data
+					})
+				} else if (this.type == 'gg') {
+					this.specificationValue = item;
+
+				}
+
+			},
+			//关闭弹窗
+			close(e) {
+				this.open = false
+			},
+			//历史
+			history() {
+				if (this.isEmpty(this.projectName.id)) {
+					this.$modal.msg('请选择工程名称')
+					return
+				}
+				getTopPipeHistoryList(this.id, this.objValue.value).then(response => {
+
+					this.historyList = response.data
+					if (response.data.zEngineeringNodeBo.zEngineeringInfoBoList != null) {
+						this.$refs.refShare.handleShowShare();
+					} else {
+						this.$modal.msg("暂无历史信息")
+					}
+
+				});
+			},
+			//提交
+			submit() {
+				if (this.isEmpty(this.projectName.id)) {
+					this.$modal.msg('请选择工程名称')
+					return
+				}
+				if (this.isEmpty(this.materialValue.id)) {
+					this.$modal.msg("请选择材质")
+					return
+				}
+				if (this.isEmpty(this.specificationValue.id)) {
+					this.$modal.msg("请选择规格")
+					return
+				}
+				if (this.isEmpty(this.inputNumberValue)) {
+					this.$modal.msg("请输入数量")
+					return
+				}
+
+				let param = {
+					id: this.id,
+					enginId: this.enginId,
+					enginName: this.projectName.name,
+					enginAddre: this.gcddValue,
+					enginCode: this.gcbmValue,
+					constructUnit: this.sgdwValue,
+					enginScale: this.gcgmValue,
+					constructQuality: this.sgzlValue,
+					constructSchedule: this.sgjdValue,
+
+					files: this.fileArr,
+					zEngineeringNodeBo: {
+						type: this.objValue.value,
+						zEngineeringInfoBo: {
+							constructTime: this.time,
+							remark: this.projectContent,
+							zEngiineeringPhotoBoList: this.imgArr,
+							zEngineeringMaterialBo: [{
+								materialQuality: this.materialValue.id, //材质
+								specifications: this.specificationValue.id, //规格
+								number: this.inputNumberValue //数量
+							}]
+						}
+					}
+				}
+
+
+				SubmitTopPipeWork(param).then(res => {
+					if (res.code == '200') {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+							//显示持续时间为 3秒
+							duration: 1000
+						});
+						setTimeout(function() {
+							uni.navigateBack();
+						}, 1000)
+
+					}
+				})
+			},
+
+		}
+	}
+</script>
+
+<style>
+	.container {
+		display: flex;
+		margin-left: 10px;
+		margin-top: 10px;
+		margin-right: 10px;
+		align-items: flex-start;
+		justify-content: space-between;
+	}
+
+	.text {
+		font-size: 16px;
+		color: #333;
+	}
+
+	.background {
+		border: 15px solid hsla(0, 0%, 100%, .5);
+		background: white;
+		background-clip: padding-box;
+		/*从padding开始往外面裁剪背景*/
+
+	}
+
+	.btn {
+		margin-top: 40px;
+		margin-right: 20px;
+		margin-bottom: 120px;
+		margin-left: 20px;
+		height: 45px;
+	}
+
+	.number {
+		display: flex;
+		/* 水平居中显示子元素 */
+		align-items: flex-start;
+		/* 垂直居中显示子元素 */
+		justify-content: space-between;
+		/* 左右间距等于间距大小 */
+		padding: 10px;
+		/* 设置padding以提高视觉效果 */
+	}
+
+	.textarea {
+		margin-top: 10upx;
+		width: 100%;
+		border: 1rpx solid red;
+		min-height: 100upx;
+		line-height: 20px;
+	}
+
+	page {
+		background: #f2f2f2;
+	}
+
+	.flex-x {
+		display: flex;
+		align-items: center;
+	}
+
+	.template_title,
+	.template_title1,
+	.template_title_list {
+		height: 90rpx;
+		background: #fff;
+		justify-content: space-between;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+	}
+
+	.template_title1 {
+		background: none;
+	}
+
+	.template_title_list {
+		margin-bottom: 4rpx;
+	}
+
+	.template_title>view,
+	.template_title1>view {
+		font-size: 32rpx;
+		color: #8f8f8f;
+		flex-shrink: 0;
+		margin-right: 20rpx;
+	}
+
+	.template_title>input {
+		font-size: 28rpx;
+		color: #808080;
+		text-align: right;
+		flex-grow: 1;
+	}
+
+	/* 添加内容 */
+
+	.add_con>text {
+		font-size: 40rpx;
+		color: #f16765;
+		display: block;
+		margin-right: 20rpx;
+		margin-left: 10rpx;
+		line-height: 44rpx;
+	}
+
+	.add_con>view {
+		font-size: 32rpx;
+		color: #7885cb;
+	}
+
+	/* 删除内容 */
+
+	.del {
+		font-size: 32rpx;
+		color: #f16765;
+		margin-right: 14rpx;
+		padding: 20rpx;
+	}
+
+	input {
+		flex-grow: 1;
+		font-size: 28rpx;
+		color: #808080;
+	}
+
+	.btn {
+		margin-top: 100rpx;
+	}
+</style>

+ 9 - 7
pages/enginproject/enginproject.vue

@@ -221,7 +221,7 @@
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
 
-			<bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
+			<bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
 			<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
 				:time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
 			<!-- 下载提示页面 -->
@@ -413,7 +413,7 @@
 					this.type = e; //赋值类型
 					if (e == 'cz') { //材质
 						this.open = true;
-						getEnginMaterialQualityList("民用工程").then(response => {
+						getEnginMaterialQualityList("工业工程").then(response => {
 							this.selectList = response.data;
 						});
 
@@ -742,9 +742,11 @@
 					} else if (this.type == 'gcmc') {
 						this.projectName = item
 						//根据工程id  获取工程信息
-
+						uni.showLoading({
+							title: '加载中'
+						})
 						getEngineeringDetails(item.id).then(response => {
-
+							uni.hideLoading();
 							console.log("res", response)
 							//	this.enginList = response.data
 							this.jlPhoneValue = response.data.supervisionPhone; //监理电话
@@ -850,7 +852,7 @@
 										console.log('保存路径', resData.savedFilePath)
 										console.log("dd", resData)
 										uni.showToast({
-											title: '下载成功' + resData.savedFilePath
+											title: '下载成功'
 										})
 									},
 									fail: error => {
@@ -878,7 +880,7 @@
 
 						console.log("历史", response)
 						this.historyList = response.data
-						if (response.data.zEngineeringNodeBo != null) {
+						if (response.data.zEngineeringNodeBo.zEngineeringInfoBoList != null) {
 							this.$refs.refShare.handleShowShare();
 						} else {
 							this.$modal.msg("暂无历史信息")
@@ -999,7 +1001,7 @@
 						console.log("数据", this.zEngineeringMaterialBo)
 
 					let param = {
-						files: this.fileArr, //文件
+						//files: this.fileArr, //文件
 						id: this.enginId, //工程id
 						type: '1', // 用来区分工业工程=1、市政工程=2
 

+ 11 - 9
pages/municipal/municipal.vue

@@ -221,7 +221,7 @@
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
 
-			<bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
+			<bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
 			<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
 				:time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
 			<!-- 下载提示页面 -->
@@ -413,7 +413,7 @@
 					this.type = e; //赋值类型
 					if (e == 'cz') { //材质
 						this.open = true;
-						getEnginMaterialQualityList("民用工程").then(response => {
+						getEnginMaterialQualityList("市政工程").then(response => {
 							this.selectList = response.data;
 						});
 
@@ -440,7 +440,7 @@
 						}
 						this.open = true;
 						//请求
-						getengineeringNameList(this.projectType.dictValue, "2").then(response => {
+						getengineeringNameList(this.projectType.dictValue, "2", null).then(response => {
 
 							this.selectList = response.data;
 						});
@@ -741,9 +741,11 @@
 					} else if (this.type == 'gcmc') {
 						this.projectName = item
 						//根据工程id  获取工程信息
-
+						uni.showLoading({
+							title: '加载中'
+						})
 						getEngineeringDetails(item.id).then(response => {
-
+							uni.hideLoading();
 							console.log("res", response)
 							//	this.enginList = response.data
 							this.jlPhoneValue = response.data.supervisionPhone; //监理电话
@@ -849,7 +851,7 @@
 										console.log('保存路径', resData.savedFilePath)
 										console.log("dd", resData)
 										uni.showToast({
-											title: '下载成功' + resData.savedFilePath
+											title: '下载成功'
 										})
 									},
 									fail: error => {
@@ -873,11 +875,11 @@
 						this.$modal.msg('请选择工程名称')
 						return
 					}
-					getEngineeringHistoryList(this.enginId, this.objValue.value).then(response => {
+					getEngineeringHistoryList(this.enginId, '').then(response => {
 
 						console.log("历史", response)
 						this.historyList = response.data
-						if (response.data.zEngineeringNodeBo != null) {
+						if (response.data.zEngineeringNodeBoList != null) {
 							this.$refs.refShare.handleShowShare();
 						} else {
 							this.$modal.msg("暂无历史信息")
@@ -998,7 +1000,7 @@
 						console.log("数据", this.zEngineeringMaterialBo)
 
 					let param = {
-						files: this.fileArr, //文件
+						//files: this.fileArr, //文件
 						id: this.enginId, //工程id
 						type: '2', // 用来区分工业工程=1、市政工程=2
 

+ 26 - 4
pages/work/index.vue

@@ -44,8 +44,8 @@
 				</uni-grid-item>
 				<uni-grid-item>
 					<view class="grid-item-box">
-						<uni-icons type="heart-filled" size="30"></uni-icons>
-						<text class="text">预警工程</text>
+						<uni-icons type="heart-filled" size="30" @click="showTopPipe"></uni-icons>
+						<text class="text">顶管工程</text>
 					</view>
 				</uni-grid-item>
 				<uni-grid-item>
@@ -180,7 +180,7 @@
 				uni.navigateTo({
 					url: '/pages/municipal/municipal?params=' + encodeURIComponent(JSON
 						.stringify(obj))
-					
+
 				});
 			},
 
@@ -302,6 +302,18 @@
 							.stringify(
 								obj))
 					})
+				} else if (this.projectType == 'DingGuan') {
+					console.log("顶管", item)
+					let obj = {
+						value: item.dictValue
+					};
+					this.handleHiddenShare();
+					uni.navigateTo({
+						url: '/pages/TopPipeWork/TopPipeWork?params=' + encodeURIComponent(JSON
+							.stringify(
+								obj))
+					})
+
 				}
 
 			},
@@ -317,6 +329,16 @@
 				});
 				this.handleShowSheet();
 			},
+			showTopPipe() {
+				this.projectType = 'DingGuan';
+				getDicts("pipe_jack").then(response => {
+					console.log("顶管工程", response.data)
+					this.typeList = response.data;
+
+
+				});
+				this.handleShowSheet();
+			},
 			showInfrastructureDialog() {
 				this.projectType = 'JiJian';
 				//基建工程
@@ -329,7 +351,7 @@
 				});
 				this.handleShowSheet();
 			},
-			showDangerous(){
+			showDangerous() {
 				console.log("危险作业工程")
 				uni.navigateTo({
 					url: '/pages/dangerous/dangerous'