9 Ревизии 99ae1f5f9f ... 1c50e80753

Автор SHA1 Съобщение Дата
  menchuang 1c50e80753 Merge branch 'zdsz3.0' of http://192.168.10.18:3000/wangtong/zd_wechatApp into zdsz3.0 преди 1 година
  menchuang c643efdd22 sync преди 1 година
  menchuang b610d770fd sync преди 1 година
  menchuang bf6e8824f4 sync преди 1 година
  menchuang 4af0893898 sync преди 1 година
  menchuang f3e1388c52 sync преди 1 година
  menchuang 6d9a389506 sync преди 1 година
  menchuang 094202ec3d Merge branch 'zdsz3.0' of http://192.168.10.18:3000/wangtong/zd_wechatApp into zdsz3.0 преди 1 година
  menchuang 53d5ef5f80 sync преди 1 година
променени са 4 файла, в които са добавени 551 реда и са изтрити 10 реда
  1. 3 3
      config.js
  2. 14 6
      pages.json
  3. 1 1
      pages/login.vue
  4. 533 0
      pages/open_bolt/open_bolt.vue

+ 3 - 3
config.js

@@ -1,10 +1,10 @@
 // 应用全局配置
 module.exports = {
-
-	//baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
+	baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
 	// baseUrl: 'http://192.168.4.6:8080',
 	// baseUrl: 'http://192.168.4.20:8080',
-	baseUrl: 'http://192.168.4.23:8080',
+	// baseUrl: 'http://192.168.4.11:8080',
+	// baseUrl: 'http://192.168.4.23:8080',
 	// baseUrl: 'http://192.168.4.14:8089',
 	baseIconUrl: 'https://www.xcx.cczdsz.cn/app/images/',
 	// 应用信息

+ 14 - 6
pages.json

@@ -113,6 +113,14 @@
 			{
 				"navigationBarTitleText" : "管道施工记录"
 			}
+		},
+		{
+			"path" : "pages/open_bolt/open_bolt",
+			"style" : 
+			{
+				"navigationBarTitleText" : "",
+				"enablePullDownRefresh" : false
+			}
 		}
 
 	],
@@ -121,16 +129,16 @@
 		"selectedColor": "#2a95f1",
 		"borderStyle": "white",
 		"backgroundColor": "#ffffff",
-		"list": [{
-			"pagePath": "pages/index",
-			"iconPath": "static/images/tabbar/gg.png",
-			"selectedIconPath": "static/images/tabbar/gg_.png",
-			"text": "公告"
-		}, {
+		"list": [ {
 			"pagePath": "pages/work/index",
 			"iconPath": "static/images/tabbar/home.png",
 			"selectedIconPath": "static/images/tabbar/home_.png",
 			"text": "首页"
+		},{
+			"pagePath": "pages/index",
+			"iconPath": "static/images/tabbar/gg.png",
+			"selectedIconPath": "static/images/tabbar/gg_.png",
+			"text": "公告"
 		}, {
 			"pagePath": "pages/statistics/statistics",
 			"iconPath": "static/images/tabbar/tj.png",

+ 1 - 1
pages/login.vue

@@ -107,7 +107,7 @@
 			loginSuccess(result) {
 				// 设置用户信息
 				this.$store.dispatch('GetInfo').then(res => {
-					this.$tab.reLaunch('/pages/index')
+					this.$tab.reLaunch('/pages/work/index')
 				})
 			}
 		}

+ 533 - 0
pages/open_bolt/open_bolt.vue

@@ -0,0 +1,533 @@
+	<template>
+		<scroll-view>
+			<view class="background">
+				<view class="uni-list">
+					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<view>
+							行政区
+						</view>
+						<view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
+							@click="pickerShow('xzq')">
+							<span style="color: darkgray;">请选择行政区</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span style="color: black;">{{XZQValue.dictLabel}}</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<view>
+							小区
+						</view>
+
+						<view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('xq')">
+							<span style="color: darkgray;">请选择小区</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
+							<span style="color: black;">{{XQValue.name}}</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">
+							楼栋
+						</view>
+						<view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('ld')">
+							<span style="color: darkgray;">请选择楼栋</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
+							<span style="color: black;">{{LDValue.name}}</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list" style="margin-top: 10;">
+					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">
+							单元
+						</view>
+						<view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('dy')">
+							<span style="color: darkgray;">请选择单元</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
+							<span style="color: black;">{{DYValue.name}}</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+						<view class="uni-list-cell-left">
+							房间
+						</view>
+						<view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('fj')">
+							<span style="color: darkgray;">请选择房间</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
+							<span style="color: black;">{{FJValue.name}}</span>
+							<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="background" style="margin-top: 20px;margin-bottom: 20px;">
+				<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+					<view class="uni-common-mt" style="width: 100%;">
+						<text class="uni-title uni-common-pl">描述</text>
+						<view style="width: 100%;box-sizing: border-box;">
+							<textarea class="textarea" placeholder="请输入描述" maxlength="255"
+								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="remark"></textarea>
+						</view>
+					</view>
+				</view>
+				<view class="container" style="color: #b2b2b2;">*请上传照片</view>
+				<view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
+					<image :src="loadImgSrc('updateimg.png')" mode=""
+						style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="chooseimage()"
+						v-show="reviewStatus!='1'"></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'||item.substring(item.length-4)=='jpeg' ">
+							<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%;">
+							<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
+							</image>
+						</view>
+					</view>
+				</view>
+
+			</view>
+
+
+			<view class="action-btn" v-show="reviewStatus!='1'">
+				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
+			</view>
+
+			<bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
+
+			<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>
+
+			<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
+				:time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
+		</scroll-view>
+	</template>
+
+	<script>
+		import SelectPicker from '../../components/selectPicker/select_picker.vue'
+		import bottomSheet from '../../components/bottomSheet/bottomSheet.vue'
+
+		import {
+			getDicts
+		} from "@/api/system/dict/data";
+		import {
+			getAreaList,
+			getBuildingList,
+			getUnitList,
+			getHousesList,
+			addTearOldPipe,
+			getRoomProjectList,
+			getRoomProjectId,
+		} from '@/api/common';
+		import {
+			getToken
+		} from '../../utils/auth';
+		export default {
+			components: {
+				SelectPicker,
+				bottomSheet,
+			},
+			data() {
+				return {
+					title: '',
+					name: '开栓',
+					headers: {
+						Authorization: "Bearer " + getToken()
+					},
+					type: '',
+					open: false,
+					reviewStatus: '', //是否可以点击
+					objValue: '', //上一页面传过来的值  新增接口用
+					openDict: false,
+					selectList: [],
+					dictOptions: [],
+					imgArr: [],
+					XQValue: {},
+					XZQValue: {},
+					projectValue: {
+						'dictValue': '0'
+					},
+					remark: '',
+					LDValue: {},
+					DYValue: {},
+					FJValue: {},
+					XQList: '',
+					LDList: '',
+					DYList: '',
+					FJList: '',
+					progress: 0, //上传图片进度百分比
+					loading: false,
+					historyList: {}, //历史数据
+					inputNumberValue: '',
+					inputIntegerNumberValue: '',
+					inputDecimalNumberValue: '',
+				}
+			},
+			onLoad(options) {
+				if ('params' in options) {
+
+					this.objValue = JSON.parse(decodeURIComponent(options.params));
+
+					if (this.objValue.enginType == `old_renovation`) {
+						this.title = '旧改工程-开栓'
+
+					} else if (this.objValue.enginType == `new_built`) {
+						this.title = '新建工程-开栓'
+					}
+
+					uni.setNavigationBarTitle({
+						title: this.title
+					})
+				}
+
+			},
+			methods: {
+				//判断是否选择
+				isEmpty(str) {
+					return (!str || 0 === str.length);
+				},
+				submit() {
+					if (this.isEmpty(this.projectValue.dictValue)) {
+						this.$modal.msg("请选择工程周期")
+					} else if (this.isEmpty(this.XZQValue.dictValue)) {
+						this.$modal.msg("请选择行政区")
+					} else if (this.isEmpty(this.XQValue.id)) {
+						this.$modal.msg("请选择小区")
+					} else if (this.isEmpty(this.LDValue.id)) {
+						this.$modal.msg("请选择楼栋")
+					} else if (this.isEmpty(this.DYValue.id)) {
+						this.$modal.msg("请选择单元")
+					} else if (this.isEmpty(this.FJValue.id)) {
+						this.$modal.msg("请选择房间")
+					} else if (this.imgArr.length <= 0) {
+						this.$modal.msg("请上传照片")
+					} else {
+						uni.showLoading()
+						let param = {
+							district: this.XZQValue.dictValue,
+							areaId: this.XQValue.id,
+							buildingId: this.LDValue.id,
+							unitId: this.DYValue.id,
+							houseId:this.FJValue.id,
+							enginType: this.objValue.enginType, //写死 上一页面传过来的 
+							enginClassification: this.objValue
+								.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+							enginCycle: this.projectValue.dictValue, //工程周期
+							zEngineeringNodeBo: {
+								type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
+								zEngineeringInfoBo: {
+									constructTime: this.time,
+									zEngiineeringPhotoBoList: this.imgArr, //照片集合
+								}
+							}
+
+						}
+
+						addTearOldPipe(param).then(res => {
+							uni.hideLoading()
+							if (res.code == '200') {
+								uni.showToast({
+									title: res.msg,
+									icon: 'none',
+									//显示持续时间为 3秒
+									duration: 2000
+								});
+								setTimeout(function() {
+									uni.navigateBack();
+								}, 1000)
+
+							}
+						})
+						//提交接口执行逻辑
+					}
+				},
+				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)
+								if (this.imgArr.length <= 0) {
+									this.photo = true;
+								}
+							}
+						}
+					})
+				},
+				chooseimage() {
+
+					let _this = this;
+					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格式
+										let data = JSON.parse(res.data);
+										if (![200].includes(data.code)) {
+											_this.$modal.msg(data.msg)
+										} else {
+											if (_this.progress === 100) {
+												_this.imgArr.push(data.data.url)
+												_this.$modal.msg('上传成功!')
+												_this.photo = false;
+											}
+										}
+									},
+									fail: e => {
+										_this.$modal.msg('上传失败!')
+									},
+									complete: res => {
+										uni.hideLoading();
+										_this.uploading = false;
+
+									}
+								});
+								task.onProgressUpdate(res => {
+									_this.progress = res.progress;
+									uni.showLoading({
+										title: '上传中'
+									})
+									if (_this.progress != 100) {
+										_this.loading = false
+									} else {
+										_this.loading = true
+									}
+								});
+
+							})
+
+						},
+					})
+				},
+				pickerShow(e) {
+					this.type = e; //赋值类型
+					if (e == 'xzq') { //行政区
+						if (this.isEmpty(this.projectValue.dictValue)) {
+							this.$modal.msg('请选择工程周期')
+
+						} else {
+							this.openDict = true;
+							getDicts("district").then(response => {
+								this.dictOptions = response.data;
+							});
+						}
+
+					} else if (e == 'xq') { //小区
+						if (this.isEmpty(this.XZQValue.dictValue)) {
+							this.$modal.msg('请选择行政区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.XQList;
+						}
+					} else if (e == 'ld') { //楼栋
+
+						if (this.isEmpty(this.XQValue.id)) {
+							this.$modal.msg('请选择小区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.LDList;
+						}
+
+					} else if (e == 'dy') { //单元
+						if (this.isEmpty(this.LDValue.id)) {
+							this.$modal.msg('请选择楼栋')
+
+						} else {
+							this.open = true;
+							this.selectList = this.DYList;
+						}
+					} else if (e == 'fj') { //房间
+						if (this.isEmpty(this.DYValue.id)) {
+							this.$modal.msg('请选择单元')
+
+						} else {
+							this.open = true;
+							this.selectList = this.FJList;
+						}
+					}
+
+				},
+				changeSelectDict(item, index) {
+					this.openDict = false;
+					if (this.type == 'xzq') {
+						this.XZQValue = item;
+
+						//根据行政区id获取小区数据
+						this.XQValue = ''; //重置小区数据
+						this.LDValue = ''; //重置楼栋数据
+						this.DYValue = ''; //重置单元数据
+						getAreaList(item.dictValue).then(res => {
+							this.XQList = res.data;
+						})
+					}
+
+				},
+				changeSelect(item, index) {
+					this.open = false;
+
+					if (this.type == 'xq') {
+						this.XQValue = item;
+						//根据小区id 获取楼栋数据
+						this.LDValue = ''; //重置楼栋数据
+						this.DYValue = ''; //重置单元数据
+						getBuildingList(item.id).then(res => {
+							this.LDList = res.data
+						})
+					} else if (this.type == 'ld') {
+						this.LDValue = item;
+						//根据楼栋ID 获取单元数据
+						this.DYValue = ''; //重置单元数据
+						this.FJValue = ''; //重置房间数据
+						getUnitList(item.id).then(res => {
+							this.DYList = res.data
+						})
+					} else if (this.type == 'dy') {
+						this.DYValue = item; //根据单元数据 获取房间数据 
+						this.FJValue = ''; //重置房间数据
+						getHousesList(item.id).then(res => {
+							this.FJList = res.data
+						})
+					} else if (this.type == 'fj') {
+						this.FJValue = item;
+					}
+				},
+				//关闭弹窗
+				close(e) {
+					this.open = false
+				},
+				//关闭弹窗
+				closeDict(e) {
+					this.openDict = false
+				},
+
+			}
+		}
+	</script>
+
+	<style lang="scss">
+		.container {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 10px;
+			position: relative;
+
+		}
+
+		.uni-list {
+			border: 1xp solid #eee;
+		}
+
+		.to-right-icon {
+			width: 15px;
+			height: 15px;
+			position: absolute;
+			top: 50%;
+			transform: translateY(-50%);
+		}
+
+		.text {
+			font-size: 16px;
+			color: #333;
+		}
+
+		.background {
+			// border: 15px solid hsla(0, 0%, 100%, .5);
+			background: white;
+			background-clip: padding-box;
+			padding: 20rpx;
+			border-radius: 20rpx;
+			margin: 20rpx;
+			/*从padding开始往外面裁剪背景*/
+
+
+		}
+
+
+		.btn {
+			width: 715rpx;
+			height: 69rpx;
+			background: #79A4F0;
+			border-radius: 6rpx;
+			font-size: 25rpx;
+			font-family: Microsoft YaHei;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 69rpx;
+			margin-top: 40rpx;
+			margin-bottom: 100rpx;
+		}
+
+		.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;
+		}
+	</style>