Kaynağa Gözat

文件下载 功能 点击文件弹窗功能 文件链接复制功能 工业工程修改接口调用 工业工程历史接口调用

zhnghongrui 1 yıl önce
ebeveyn
işleme
cb8ed7b3d0

+ 38 - 2
api/common.js

@@ -1,4 +1,40 @@
 import request from '@/utils/request'
+
+
+
+
+// 获取工业工程历史
+export function getEngineeringHistoryList(id, type) {
+
+	return request({
+		'url': '/zdsz/engineeringIndustry/' + id + '/' + type,
+		'method': 'get',
+	})
+}
+
+// 工业工程  市政工程 详情  根据id 查询
+export function getEngineeringDetails(id) {
+
+	return request({
+		'url': '/zdsz/engineeringIndustry/' + id,
+		'method': 'get',
+
+	})
+}
+
+// 工业工程  市政工程 - 根据工程类型查询列表
+export function getengineeringNameList(enginType, type) {
+	const data = {
+		enginType,
+		type
+	}
+	return request({
+		'url': '/zdsz/engineeringIndustry/queryNameByType',
+		'method': 'get',
+		'data': data
+	})
+}
+
 // 根据小区楼栋单元 获取工程用料统计(areaId(string) 小区ID realityQuality材质 realitySpecifications 规格)
 export function getMunicipalStatisticsData(param) {
 	return request({
@@ -24,11 +60,11 @@ export function submitMunicipalData(param) {
 	})
 }
 
-// 工业工程新增
+// 工业工程修改
 export function Submitengineering(engineering) {
 	return request({
 		'url': '/zdsz/engineeringIndustry',
-		'method': 'post',
+		'method': 'put',
 		'data': engineering
 	})
 }

+ 245 - 0
components/bottomSheet/bottomSheetMore.vue

@@ -0,0 +1,245 @@
+<template>
+	<view class="share">
+		<view :class="{'share-box': shareState}" @click="handleHiddenShare">
+		</view>
+		<view class="share-item" :class="{'share-show': shareState}">
+			<view class="share-to">
+				<text style="font-size: 16px;color: #000;">{{title}}</text>
+			</view>
+
+
+			<scroll-view scroll-y="true" class="scroll-Y">
+				<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(value, key) in historyList"
+					:key="key">
+					<view class="uni-media-list">
+
+						<view class="uni-media-list-body" style="margin-left: 15px;">
+
+
+
+
+							<view class="uni-media-list-text-top" style="font-size: 13px;color: #000;margin-top: 5px;">
+								施工时间:{{value.constructTime}}</view>
+							<view v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
+
+								<view class="uni-media-list-text-top"
+									style="font-size: 13px;color: #000;margin-top: 5px;">
+									材质:{{a.materialQualityName}}</view>
+
+
+
+								<view class="uni-media-list-text-top"
+									style="font-size: 13px;color: #000;margin-top: 5px;">
+									规格:{{a.specificationsName}}</view>
+
+
+
+								<view class="uni-media-list-text-top"
+									style="font-size: 13px;color: #000;margin-top: 5px;">
+									数量:{{a.number}}</view>
+
+							</view>
+
+
+							<view class="uni-media-list-text-top">
+
+								<text style="font-size: 13px;color: #000;margin-top: 5px;">负责人:</text>
+								<text
+									style="font-size: 13px;color: #000;margin-top: 5px;">{{value.constructUser}}</text>
+							</view>
+							<view class="uni-media-list-text-top">
+
+								<text style="font-size: 13px;color: #000;margin-top: 5px;">负责人联系电话:</text>
+								<text
+									style="font-size: 13px;color: #000;margin-top: 5px;">{{value.constructPhone}}</text>
+							</view>
+							<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+								<text style="margin-left: 30rpx;margin-top: 6rpx;">{{ value.published_at }}</text>
+								<view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
+									style="position: relative;">
+									<view
+										v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+										<image :src="item" mode=""
+											style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+											@click="showPhoto(index,value.zEngiineeringPhotoBoList)">
+										</image>
+									</view>
+									<view v-else>
+										<video :src="item"
+											style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+									</view>
+
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			data: {
+				type: Object,
+				default: {}
+			},
+
+		},
+		created() {
+			this.getParamsData();
+		},
+		watch: {
+			data(data) {
+				this.getParamsData();
+			}
+		},
+		data() {
+			return {
+				outPutData: {},
+				historyList: [], //历史数据
+				historyPhotoList: [], //历史图片数据
+				shareState: false,
+				title: '',
+			};
+		},
+		methods: {
+			showPhoto(index, list) {
+				uni.previewImage({
+					current: index,
+					urls: list,
+				})
+
+			},
+			getParamsData() {
+				var selectData = this.data;
+				this.outPutData = selectData;
+				this.title = selectData.zEngineeringNodeBo.type;
+				this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
+				//this.historyPhotoList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList.zEngiineeringPhotoBoList;
+
+
+			},
+			// 显示分享
+			handleShowShare() {
+				this.shareState = true;
+			},
+			// 隐藏分享
+			handleHiddenShare() {
+				this.shareState = false;
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.share {
+		width: 100%;
+		height: 100%;
+
+	}
+
+	.share-box {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0rpx;
+		left: 0rpx;
+		bottom: 0rpx;
+		right: 0rpx;
+		background-color: rgba(0, 0, 0, 0.4);
+		transition: .3s;
+		z-index: 999;
+	}
+
+	// 进入分享动画
+	.share-show {
+		transition: all 0.3s ease;
+		transform: translateY(0%) !important;
+		border-radius: 20px 20px 0px 0px;
+	}
+
+	.scroll-Y {
+		height: 750rpx;
+	}
+
+	// 离开分享动画
+	.share-item {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: 70%;
+		background-color: #FFFFFF;
+		transition: all 0.3s ease;
+		transform: translateY(100%);
+		z-index: 1999;
+
+		.share-to {
+			width: 100%;
+			height: 30px;
+			display: flex;
+			justify-content: left;
+			margin-left: 15px;
+			align-items: center;
+
+			// &::after {
+			// 	content: '';
+			// 	width: 240rpx;
+			// 	height: 0rpx;
+			// 	border-top: 1px solid #E4E7ED;
+			// 	-webkit-transform: scaleY(0.5);
+			// 	transform: scaleY(0.5);
+			// 	margin-left: 30rpx;
+			// }
+
+			// &::before {
+			// 	content: '';
+			// 	width: 240rpx;
+			// 	height: 0rpx;
+			// 	border-top: 1px solid #E4E7ED;
+			// 	-webkit-transform: scaleY(0.5);
+			// 	transform: scaleY(0.5);
+			// 	margin-right: 30rpx;
+			// }
+		}
+
+		.content {
+			width: 100%;
+			height: auto;
+			display: flex;
+			flex-wrap: wrap;
+
+			.block {
+				width: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: left;
+				height: auto;
+
+				image {
+					width: 80rpx;
+					height: 80rpx;
+				}
+
+				text {
+					margin-top: 16rpx;
+					font-size: 28rpx;
+					color: #606266;
+				}
+			}
+		}
+
+		.cancel {
+			width: 100%;
+			height: 3rem;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border-top: 1rpx solid #E4E7ED;
+		}
+	}
+</style>

+ 172 - 0
components/mypopup/mypopup.vue

@@ -0,0 +1,172 @@
+<template>
+	<view class="popup" v-show="show">
+		<view class="popup-info">
+			<view class="popup-title"> {{titleText}}</view>
+			<view class="popup-text">{{popupText}}</view>
+			<view class="popup-btn">
+				<view class="btn-left" @click="cancel">{{cancelText}}</view>
+				<view class="btn-right" @click="confirm">{{confirmText}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "my-popup",
+		props: {
+			show: {
+				type: Boolean
+			},
+			popupText: {
+				type: String
+			},
+			titleText: {
+				type: String
+			},
+			cancelText: {
+				type: String
+			},
+			confirmText: {
+				type: String
+			}
+		},
+		watch: {
+			oldshow: function(newVal, oldVal) {
+				// console.log(newVal);
+				this.show = newVal;
+				console.log(newVal)
+			}
+		},
+		data() {
+			return {};
+		},
+		methods: {
+			cancel() {
+				this.$emit('close')
+			},
+
+			confirm() {
+				this.$emit('confirm')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.popup {
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		height: 100vh;
+		background-color: rgba(0, 0, 0, 0.4) !important;
+		z-index: 9998;
+	}
+
+	.popup-info {
+		position: fixed;
+		width: 320px;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		font-size: 30upx;
+		box-shadow: 0px 1px 13px -6px rgba(0, 0, 0, 0.25);
+		background-color: #fff;
+		z-index: 9999;
+		border-radius: 8px;
+
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+
+		.popup-title {
+			width: 320px;
+			height: 56px;
+			background: linear-gradient(95.13deg, #5DA4F7 3.75%, #3285E4 95.95%);
+			border-radius: 8px 8px 0px 0px;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			font-family: 'PingFang SC';
+			font-style: normal;
+			font-weight: 500;
+			font-size: 17px;
+			line-height: 24px;
+			/* identical to box height, or 140% */
+			color: #FFFFFF;
+
+		}
+
+		.popup-text {
+			width: 262px;
+			display: flex;
+			justify-content: center;
+			margin-top: 23px;
+			text-align: center;
+
+			font-family: 'PingFang SC';
+			font-style: normal;
+			font-weight: 500;
+			font-size: 17px;
+			line-height: 24px;
+		}
+
+		.popup-btn {
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+			width: 250px;
+			height: 42px;
+			border-top-color: #f5f5f5;
+			margin: 0 auto;
+			margin-top: 22px;
+			margin-bottom: 20px;
+
+			.btn-left {
+				/* #ifndef APP-NVUE */
+				display: flex;
+				/* #endif */
+				width: 107px;
+				height: 42px;
+				border: 0.5px solid #569FF4;
+				border-radius: 35px;
+
+				justify-content: center;
+				align-items: center;
+
+				font-family: 'PingFang SC';
+				font-style: normal;
+				font-weight: 500;
+				font-size: 16px;
+				line-height: 22px;
+				letter-spacing: -0.2176px;
+				color: #569FF4;
+			}
+
+			.btn-right {
+				display: flex;
+				align-items: center;
+
+
+				width: 107px;
+				height: 42px;
+
+				background: linear-gradient(95.13deg, #5DA4F7 3.75%, #3285E4 95.95%);
+				border-radius: 35px;
+
+				justify-content: center;
+				align-items: center;
+				font-color: #FFFFFF;
+				font-family: 'PingFang SC';
+				font-style: normal;
+				font-weight: 500;
+				font-size: 16px;
+				line-height: 22px;
+				letter-spacing: -0.2176px;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 1 - 1
config.js

@@ -2,7 +2,7 @@
 module.exports = {
   
   // baseUrl: 'http://192.168.4.20:8080',
-   baseUrl: 'http://192.168.4.11:8080',
+   baseUrl: 'http://192.168.4.14:8089',
   // 应用信息
   appInfo: {
     // 应用名称

+ 1 - 0
main.js

@@ -4,6 +4,7 @@ import store from './store' // store
 import plugins from './plugins' // plugins
 import './permission' // permission
 import config from '@/config'
+
 Vue.use(plugins)
 
 Vue.config.productionTip = false

+ 1 - 1
manifest.json

@@ -41,7 +41,7 @@
     },
     "quickapp" : {},
     "mp-weixin" : {
-        "appid" : "wx6f1b92a9d915fb4d",
+        "appid" : "wx29934cbdbb6ae27f",
         "setting" : {
             "urlCheck" : false,
             "es6" : false,

+ 276 - 77
pages/enginproject/enginproject.vue

@@ -17,17 +17,24 @@
 				</view>
 				<view class="uni-list">
 					<view class="container">
-
-						<text>工程名称</text>
-						<input class="uni-input" type="text" v-model="projectName" placeholder="请填写工程名称" maxlength="100"
-							style="margin-left: 10px;text-align: right;"></input>
+						<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="jsdwValue" placeholder="请填写建设单位" maxlength="100"
+						<input class="uni-input" type="text" v-model="jsdwValue" maxlength="100" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -35,7 +42,7 @@
 					<view class="container">
 
 						<text>项目负责人</text>
-						<input class="uni-input" type="text" v-model="xmfzrValue" placeholder="请填写项目负责人" maxlength="16"
+						<input class="uni-input" type="text" v-model="xmfzrValue" maxlength="16" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -43,7 +50,7 @@
 					<view class="container">
 
 						<text>现场负责人</text>
-						<input class="uni-input" type="text" v-model="xcfzrValue" placeholder="请填写现场负责人" maxlength="16"
+						<input class="uni-input" type="text" v-model="xcfzrValue" maxlength="16" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -51,7 +58,7 @@
 					<view class="container">
 
 						<text>设计单位</text>
-						<input class="uni-input" type="text" v-model="sjdwValue" placeholder="请填写设计单位" maxlength="100"
+						<input class="uni-input" type="text" v-model="sjdwValue" maxlength="100" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -59,7 +66,7 @@
 					<view class="container">
 
 						<text>设计负责人</text>
-						<input class="uni-input" type="text" v-model="sjfzrValue" placeholder="请填写设计负责人" maxlength="16"
+						<input class="uni-input" type="text" v-model="sjfzrValue" maxlength="16" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -67,15 +74,15 @@
 					<view class="container">
 
 						<text>设计联系电话</text>
-						<input class="uni-input" type="number" v-model="sjPhoneValue" placeholder="请填写设计联系电话"
-							maxlength="11" style="margin-left: 10px;text-align: right;"></input>
+						<input class="uni-input" type="number" v-model="sjPhoneValue" disabled="true" maxlength="11"
+							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="jldwValue" placeholder="请填写监理单位" maxlength="100"
+						<input class="uni-input" type="text" v-model="jldwValue" maxlength="100" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -83,7 +90,7 @@
 					<view class="container">
 
 						<text>监理负责人</text>
-						<input class="uni-input" type="text" v-model="jlfzrValue" placeholder="请填写监理负责人" maxlength="16"
+						<input class="uni-input" type="text" v-model="jlfzrValue" maxlength="16" disabled="true"
 							style="margin-left: 10px;text-align: right;"></input>
 					</view>
 				</view>
@@ -91,27 +98,29 @@
 					<view class="container">
 
 						<text>监理联系电话</text>
-						<input class="uni-input" type="number" v-model="jlPhoneValue" placeholder="请填写监理联系电话"
-							maxlength="11" style="margin-left: 10px;text-align: right;"></input>
+						<input class="uni-input" type="number" v-model="jlPhoneValue" disabled="true" maxlength="11"
+							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="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>
+							<!-- <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;">{{item.name}}
+								<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)"
+								<!-- <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>
@@ -215,6 +224,11 @@
 			<bottom-sheet ref="refShare" :data="historyList"></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>
 
@@ -222,9 +236,10 @@
 
 	<script>
 		import SelectPicker from '../../components/selectPicker/select_picker.vue'
-		import bottomSheet from '../../components/bottomSheet/bottomSheet.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";
@@ -234,6 +249,9 @@
 			getRoomProjectList,
 			getRoomProjectId,
 			Submitengineering,
+			getengineeringNameList,
+			getEngineeringDetails,
+			getEngineeringHistoryList,
 		} from '@/api/common'
 		import {
 			getToken
@@ -248,11 +266,19 @@
 				SelectPicker,
 				uniIcons,
 				bottomSheet,
+				mypopup
 			},
+
 			data() {
 
 
 				return {
+					historyList: {}, //历史数据
+					show_loding: false,
+					popupText: '', //对话框内容
+					titleText: '',
+					cancelText: '',
+					confirmText: '',
 					zEngineeringMaterialBo: [], //给后台传的值  用料列表
 					czggslList: [{
 						cz: {
@@ -302,6 +328,12 @@
 					jsdwValue: '', //建设单位
 					projectName: '', //工程名称
 					SelectIndex: '', //选择的索引值
+					fileUrl: '', //点击的文件地址
+					fileName: '', //点击的文件名称
+					enginList: {}, //工程信息
+					enginId: '', //工程id
+					createTime: '',
+					infonId: '', //info id
 
 				}
 			},
@@ -400,12 +432,27 @@
 						getDicts("industry_engin_type").then(response => {
 							this.dictOptions = response.data;
 						});
+					} else if (e == 'gcmc') { //工程名称
+						if (this.isEmpty(this.projectType.dictValue)) {
+
+							this.$modal.msg('请选择工程类型')
+							return
+						}
+						this.open = true;
+						//请求
+						getengineeringNameList(this.projectType.dictValue, "1").then(response => {
+
+							this.selectList = response.data;
+						});
+
+
 					}
 
 
 
 				},
 
+
 				chooseFile() {
 					let _this = this;
 					console.log('文件')
@@ -657,6 +704,20 @@
 				changeSelectDict(item, index) {
 					this.openDict = false;
 					this.projectType = item
+					this.projectName = ''; //重置工程名称
+					this.jlPhoneValue = ''; //重置监理电话
+					this.jlfzrValue = ''; //重置监理负责人
+					this.jldwValue = ''; //重置监理单位
+					this.sjPhoneValue = ''; //重置设计电话
+					this.sjfzrValue = ''; //重置设计负责人
+					this.sjdwValue = ''; //重置设计单位
+					this.xcfzrValue = ''; //重置现场负责人
+					this.xmfzrValue = ''; //重置项目负责人
+					this.jsdwValue = ''; //重置建设单位
+					this.enginId = ''; //重置工程id
+					this.fileArr = ''
+					this.createTime = '';
+					this.infonId = '';
 
 				},
 				changeSelect(item, index) {
@@ -677,8 +738,28 @@
 						this.specificationValue = item;
 						this.czggslList[this.SelectIndex].gg.id = this.specificationValue.id
 						this.czggslList[this.SelectIndex].gg.name = this.specificationValue.name
-					} else if (this.type == 'gclx') {
-						this.projectType = item
+					} else if (this.type == 'gcmc') {
+						this.projectName = item
+						//根据工程id  获取工程信息
+
+						getEngineeringDetails(item.id).then(response => {
+
+							console.log("res", response)
+							//	this.enginList = response.data
+							this.jlPhoneValue = response.data.supervisionPhone; //监理电话
+							this.jlfzrValue = response.data.supervisionHead; //监理负责人
+							this.jldwValue = response.data.supervisionUnit; //监理单位
+							this.sjPhoneValue = response.data.designPhone; //设计电话
+							this.sjfzrValue = response.data.designHead; //设计负责人
+							this.sjdwValue = response.data.designUnit; //设计单位
+							this.xcfzrValue = response.data.sceneHead; //现场负责人
+							this.xmfzrValue = response.data.projectHead; //项目负责人
+							this.jsdwValue = response.data.constructUnit; //建设单位
+							this.enginId = response.data.id; //工程id
+							this.fileArr = response.data.pics
+							this.createTime = response.data.createTime;
+							this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0].id
+						});
 					}
 				},
 				//关闭弹窗
@@ -692,68 +773,181 @@
 
 
 
+				chooseModel(url, name) {
+					this.cancelText = '复制';
+					this.confirmText = "下载";
+					this.titleText = "温馨提示"
+					this.popupText = "下载或者复制链接";
+					this.show_loding = true;
+					this.fileName = name;
+					this.fileUrl = url; //文件名称和下载地址赋值
 
-				submit() {
+				},
+				//取消按钮
+				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'
+								});
+							}
+						});
 
-					console.log("文件", this.fileArr)
-					if (this.isEmpty(this.projectType.dictValue)) {
-						this.$modal.msg('请选择工程类型')
-						return
-					}
-					if (this.isEmpty(this.projectName)) {
-						this.$modal.msg('工程名称不能为空')
-						return
-					}
-					if (this.isEmpty(this.jsdwValue)) {
-						this.$modal.msg('建设单位不能为空')
-						return
-					}
-					if (this.isEmpty(this.xmfzrValue)) {
-						this.$modal.msg('项目负责人不能为空')
-						return
-					}
-					if (this.isEmpty(this.xcfzrValue)) {
-						this.$modal.msg('现场负责人不能为空')
-						return
-					}
-					if (this.isEmpty(this.sjdwValue)) {
-						this.$modal.msg('设计单位不能为空')
-						return
 					}
-					if (this.isEmpty(this.sjfzrValue)) {
-						this.$modal.msg('设计负责人不能为空')
-						return
-					}
-					if (this.isEmpty(this.sjPhoneValue)) {
-						this.$modal.msg('设计联系电话不能为空')
-						return
-					}
-					if (!this.$validation.mobile(this.sjPhoneValue)) {
-						this.$modal.msg('设计联系电话格式错误')
-						return
+				},
+				//确定按钮
+				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)
 					}
-					if (this.isEmpty(this.jldwValue)) {
-						this.$modal.msg('监理单位不能为空')
+					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: '下载成功' + resData.savedFilePath
+										})
+									},
+									fail: error => {
+										console.log('error: ', error)
+									}
+								})
+							}
+						}
+					})
+
+
+
+				},
+				//历史
+				history() {
+					if (this.isEmpty(this.projectType.dictValue)) {
+						this.$modal.msg('请选择工程类型')
 						return
 					}
-					if (this.isEmpty(this.jlfzrValue)) {
-						this.$modal.msg('监理负责人不能为空')
+					if (this.isEmpty(this.projectName.id)) {
+						this.$modal.msg('请选择工程名称')
 						return
 					}
-					if (this.isEmpty(this.jlPhoneValue)) {
-						this.$modal.msg('监理联系电话不能为空')
+					getEngineeringHistoryList(this.enginId, this.objValue.value).then(response => {
+
+						console.log("历史", response)
+						this.historyList = response.data
+						if (response.data.zEngineeringNodeBo != null) {
+							this.$refs.refShare.handleShowShare();
+						} else {
+							this.$modal.msg("暂无历史信息")
+						}
+					});
+
+				},
+
+				submit() {
+
+					console.log("文件", this.fileArr)
+
+					if (this.isEmpty(this.projectType.dictValue)) {
+						this.$modal.msg('请选择工程类型')
 						return
 					}
-					if (!this.$validation.mobile(this.jlPhoneValue)) {
-						this.$modal.msg('监理联系电话格式错误')
+					if (this.isEmpty(this.projectName.id)) {
+						this.$modal.msg('请选择工程名称')
 						return
 					}
-
-					if (this.fileArr.length <= 0) {
-						this.$modal.msg('请上传文件')
-					} else if (this.loadingFile == false) {
-						this.$modal.msg('文件未上传完毕,无法提交!')
-					}
+					// if (this.isEmpty(this.jsdwValue)) {
+					// 	this.$modal.msg('建设单位不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.xmfzrValue)) {
+					// 	this.$modal.msg('项目负责人不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.xcfzrValue)) {
+					// 	this.$modal.msg('现场负责人不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.sjdwValue)) {
+					// 	this.$modal.msg('设计单位不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.sjfzrValue)) {
+					// 	this.$modal.msg('设计负责人不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.sjPhoneValue)) {
+					// 	this.$modal.msg('设计联系电话不能为空')
+					// 	return
+					// }
+					// if (!this.$validation.mobile(this.sjPhoneValue)) {
+					// 	this.$modal.msg('设计联系电话格式错误')
+					// 	return
+					// }
+					// if (this.isEmpty(this.jldwValue)) {
+					// 	this.$modal.msg('监理单位不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.jlfzrValue)) {
+					// 	this.$modal.msg('监理负责人不能为空')
+					// 	return
+					// }
+					// if (this.isEmpty(this.jlPhoneValue)) {
+					// 	this.$modal.msg('监理联系电话不能为空')
+					// 	return
+					// }
+					// if (!this.$validation.mobile(this.jlPhoneValue)) {
+					// 	this.$modal.msg('监理联系电话格式错误')
+					// 	return
+					// }
+
+					// if (this.fileArr.length <= 0) {
+					// 	this.$modal.msg('请上传文件')
+					// } else if (this.loadingFile == false) {
+					// 	this.$modal.msg('文件未上传完毕,无法提交!')
+					// }
 
 					try {
 						//console.log("刚开始", this.czggslList);
@@ -792,7 +986,7 @@
 						this.$modal.msg('照片或视频未上传完毕,无法提交!')
 						return
 					}
-
+					this.zEngineeringMaterialBo = [];
 					this.czggslList.forEach((list) => {
 							this.zEngineeringMaterialBo.push({
 								materialQuality: list.cz.id,
@@ -805,8 +999,10 @@
 
 					let param = {
 						files: this.fileArr, //文件
+						id: this.enginId, //工程id
 						type: '1', // 用来区分工业工程=1、市政工程=2
-						enginName: this.projectName, //工程名称
+
+						enginName: this.projectName.name, //工程名称
 						enginType: this.projectType.dictValue, // 工程类型
 						constructUnit: this.jsdwValue, // 建筑单位
 						projectHead: this.xmfzrValue, // 项目负责人
@@ -819,8 +1015,11 @@
 						supervisionPhone: this.jlPhoneValue, // 监理联系电话
 						enginClassification: this.objValue.value, // 工程分类  上一页面传过来的
 						zEngineeringNodeBo: {
+							createTime: this.createTime,
 							type: '工业工程', // 写死
 							zEngineeringInfoBo: {
+								engInfoId: this.infonId,
+								constructTime: this.time, //施工时间
 								zEngiineeringPhotoBoList: this.imgArr, //照片集合
 								zEngineeringMaterialBo: this.zEngineeringMaterialBo // 用料对象
 							}

+ 3 - 5
pages/work/index.vue

@@ -193,14 +193,14 @@
 
 				} else if (e == 'courtyard') {
 					//新建庭院
-					getDicts("new_built_courtyard_engin").then(response => {
+					getDicts("new_built_courtyard").then(response => {
 						console.log("庭院", response.data)
 						this.typeList = response.data;
 
 					});
 				} else if (e == 'overhead') {
 					//新建架空
-					getDicts("new_built_courtyard_engin").then(response => {
+					getDicts("new_built_courtyard").then(response => {
 						console.log("架空", response.data)
 						this.typeList = response.data;
 
@@ -225,7 +225,7 @@
 
 				} else if (e == 'courtyard') {
 					//旧改庭院
-					getDicts("old_renovation_courtyard_engin").then(response => {
+					getDicts("old_renovation_courtyard").then(response => {
 						console.log("庭院", response.data)
 						this.typeList = response.data;
 
@@ -235,8 +235,6 @@
 					getDicts("old_renovation_overhead").then(response => {
 						console.log("架空", response.data)
 						this.typeList = response.data;
-
-
 					});
 				}