ming před 3 roky
rodič
revize
5f06f18950

+ 3 - 3
manifest.json

@@ -129,7 +129,7 @@
         "title" : "智慧消防",
         "router" : {
             "mode" : "hash",
-            "base" : ""
+            "base" : "/work/"
         },
         "devServer" : {
             // "https" : true,
@@ -143,9 +143,9 @@
                     }
                 }
             },
-            "https" : true
+            "https" : false
         },
-        "domain" : "https://qhome.usky.cn/work",
+        "domain" : "https://qhome.usky.cn/",
         "sdkConfigs" : {
             "maps" : {}
         },

+ 1 - 0
pages.json

@@ -278,6 +278,7 @@
 		, {
 			"path": "pages/deviceManage/deviceManage",
 			"style": {
+				"onReachBottomDistance":100,
 				"navigationBarTitleText": "设备管理",
 				"enablePullDownRefresh": false
 			}

+ 92 - 38
pages/deviceManage/deviceManage.vue

@@ -43,15 +43,19 @@
 
 		<!-- 设备注册列表start -->
 		<block class="">
-			<view class="processList deviceRegistList" style="height: calc(100vh - 470rpx);">
+			<view class="processList deviceRegistList" style="padding-bottom:150rpx;" >
 				<checkbox-group @change="changeCheckbox">
 					<view class="cu-list menu-avatar ">
 						<view class=" site-item text-center margin-top"
 							v-if="!this.deviceManage.length&&this.deviceManageRes==1">暂无数据</view>
+							
+						
+						
 						<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
 							v-for="(item,index) in newDeviceManage" :key="index" :data-target="'move-box-' + index">
 							<view class="cu-form-group margin-top">
-								<checkbox :value="String(item.owner_code)" :checked="checkedArr.includes(String(item.owner_code))"
+								<checkbox :value="String(item.owner_code)"
+									:checked="checkedArr.includes(String(item.owner_code))"
 									:class="{'checked':checkedArr.includes(String(item.owner_code))}"></checkbox>
 							</view>
 							<view class="cu-avatar round lg">
@@ -84,6 +88,9 @@
 								</view>
 							</view> -->
 						</view>
+							<view v-show="isLoadMore&&page>1" >
+								<uni-load-more :status="loadStatus"></uni-load-more>
+							</view>
 					</view>
 				</checkbox-group>
 			</view>
@@ -105,12 +112,12 @@
 				<!-- <view @tap="showModal" data-target="DialogModal">
 					导出
 				</view> -->
-				
+
 				<view @tap="exportButton()" data-target="DialogModal">
 					导出
 				</view>
-				
-				
+
+
 			</view>
 			<view class="checkAll" style="display:inline-block">
 				<checkbox-group @change="allChoose" v-if="deviceManage.length">
@@ -218,6 +225,14 @@
 					"单元地址": "unitinfo",
 					"创建时间": "install_time",
 				},
+				
+				
+				page: 1,
+				pageSize: 10,
+				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+				isLoadMore: false, //是否加载中
+				
+				
 
 			};
 		},
@@ -242,16 +257,34 @@
 		},
 		onShow: function(option) {
 			this.getDataList({
-				'company_code': uni.getStorageSync('selectedCode')
+				'company_code': uni.getStorageSync('selectedCode'),
+				"page": this.page,
+				"pageSize": this.pageSize,
+				"transmission_mode": this.transmission_mode,
+				"dwtype": this.dwtype,
 			})
-				},
-		onLoad: function(option) {
-			this.getDataList({
-				'company_code': uni.getStorageSync('selectedCode')
-			})
-				},
+		},
+		
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.page += 1
+				this.getDataList({
+					'company_code': uni.getStorageSync('selectedCode'),
+					"page": this.page,
+					"pageSize": this.pageSize,
+					"transmission_mode": this.transmission_mode,
+					"dwtype": this.dwtype,
+				})
+				
+			}
+			// alert(this.page)
+		},
+		
+		
+	
 		methods: {
-			
+
 			exportButton() {
 				if (this.checkedArr.length == 0) {
 					uni.showModal({
@@ -259,24 +292,24 @@
 						content: '请选择至少一条需要导出的数据'
 					});
 					return;
-				} 
+				}
 				let aa;
 				let bb;
-				if(this.allChecked==true){
+				if (this.allChecked == true) {
 					alert('全选');
-					aa='status';
-					 bb=1
-				}else{
+					aa = 'status';
+					bb = 1
+				} else {
 					alert('非全选')
-					 aa='device_code_list';
-					 bb=this.checkedArr.join(",")
-					 alert(bb)
+					aa = 'device_code_list';
+					bb = this.checkedArr.join(",")
+					alert(bb)
 				}
 
-					let exportUrl = this.$BASE_URL+
-						`ExportModule/getDeviceConfigListExpor/transmission_mode/${this.transmission_mode1}/${aa}/${bb}/dwtype/${this.dwtype1}/company_code/${uni.getStorageSync('selectedCode')}/`
-					alert(exportUrl)
-					
+				let exportUrl = this.$BASE_URL +
+					`ExportModule/getDeviceConfigListExpor/transmission_mode/${this.transmission_mode1}/${aa}/${bb}/dwtype/${this.dwtype1}/company_code/${uni.getStorageSync('selectedCode')}/`
+				alert(exportUrl)
+
 				var ua = window.navigator.userAgent.toLowerCase();
 				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
 					uni.showModal({
@@ -289,22 +322,27 @@
 				} else {
 					window.location.href = exportUrl;
 				}
-			
+
 			},
-			
-			
-			
-			
+
+
+
+
 
 			//筛选请求
 			searchList() {
+				this.deviceManage=[],
+				this.page=1,
 				this.getDataList({
 					"transmission_mode": this.transmission_mode,
 					"dwtype": this.dwtype,
-					'company_code': uni.getStorageSync('selectedCode')
+					'company_code': uni.getStorageSync('selectedCode'),
+					"page": this.page,
+					"pageSize": this.pageSize,
 				})
-				this.transmission_mode1=this.transmission_mode;
-				this.dwtype1=this.dwtype;
+				
+				this.transmission_mode1 = this.transmission_mode;
+				this.dwtype1 = this.dwtype;
 			},
 
 			// 列表数据请求
@@ -314,8 +352,25 @@
 					data: params,
 					showLoading: true
 				})
-				this.deviceManage = res.data.data;
 				this.deviceManageRes = 1;
+				
+				if (res.data.data.length) {
+					
+					this.deviceManage = this.deviceManage.concat(res.data.data)
+					
+					if (res.data.data.length < this.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+						this.isLoadMore = true
+						this.loadStatus = 'nomore'
+					} else {
+						this.isLoadMore = false
+					}
+				} else {
+					this.isLoadMore = true
+					this.loadStatus = 'nomore'
+				}
+				
+				
+				
 			},
 
 			// 页面跳转
@@ -460,7 +515,7 @@
 			changeCheckbox(e) {
 				console.log(e.detail.value)
 				this.checkedArr = e.detail.value;
-				
+
 				// 如果选择的数组中有值,并且长度等于列表的长度,就是全选
 				if (this.checkedArr.length > 0 && this.checkedArr.length == this.newDeviceManage.length) {
 					this.allChecked = true;
@@ -471,11 +526,11 @@
 			// 全选事件
 			allChoose(e) {
 				let chooseItem = e.detail.value;
-				
+
 				// 全选
 				if (chooseItem[0] == 'all') {
 					this.allChecked = true;
-					
+
 					for (let item of this.newDeviceManage) {
 						let itemVal = String(item.owner_code);
 						if (!this.checkedArr.includes(itemVal)) {
@@ -495,7 +550,6 @@
 </script>
 
 <style>
-
 	.showDetailEdit {
 		position: absolute;
 		background: #fff;

+ 23 - 12
pages/repair/repairDetail/repairDetail.vue

@@ -26,26 +26,27 @@
 				<view style="color:#72D06A" v-if="cl_type==4" >已完成</view>
 				<view style="color:#F7895E" v-if="cl_type==5">超时完成</view>
 			</view>
-			<view v-if="cl_type!=1" style="color:#aaa">
-				<view class="form-item margin-top">
-					<view style="font-weight:bold;">处理记录:</view>
+			<view v-if="cl_type!=1" >
+				<view class="form-item margin-top flex justify-between" @click="detailClick()">
+					<view style="position:relative;display:block;color:#007AFF">
+						处理记录:
+					</view>
+					<text class="icon iconfont margin-right-xs margin-left-lg">{{showDetail?'&#xe63d;':'&#xe629;'}}</text>
 				</view>
-				<block v-for="(item,index) in getData2" :key="index">
-					<view class="form-item">
+				<block v-for="(item,index) in getData2" :key="index" v-if="showDetail" >
+					<view class="form-item" style="color:#aaa">
 						<view class="title">图片:</view>
 						<img :src="imgFront+item.picture_path" alt="" style="max-width:50%">
 					</view>
-					<view class="form-item">
+					<view class="form-item" style="color:#aaa">
 						<view class="title">处理时间:</view>
 						<view>{{item.cl_time}}</view>
 					</view>
-					<view class="form-item">
+					<view class="form-item" style="color:#aaa">
 						<view class="title">处理结果:</view>
 						<view>{{item.jg_remarks}}</view>
 					</view>
-					<br>
-					
-					
+
 				</block>
 				
 			</view>
@@ -61,7 +62,7 @@
 						</view>
 					</view>
 				</view>
-				<view class="form-item margin-top">
+				<view class="form-item margin-top" style="padding-bottom: 200rpx;">
 					<view class="title">
 						<text class="necessary">*</text>
 						报修描述:
@@ -92,7 +93,9 @@
 				reportName: '',
 				radioOne: 0,
 				zb_id: 0,
-				cl_type:''
+				cl_type:'',
+				
+				showDetail:true,
 			}
 		},
 
@@ -100,6 +103,9 @@
 
 		
 		onLoad: function(option) {
+			if(option.cl_type==1||option.cl_type==3){
+				this.showDetail=false
+			}
 			
 			this.imgFront=this.$websiteUrl
 			this.id = option.id;
@@ -121,6 +127,11 @@
 
 		},
 		methods: {
+			
+			detailClick(){
+				this.showDetail=!this.showDetail
+				// alert(this.showDetail)	
+			},
 			radioChange(e) {
 				console.log('type:' + e.detail.value);
 				this.radioOne = e.detail.value;

+ 32 - 18
pages/xunJian/planDetail/planDetail.vue

@@ -102,27 +102,41 @@
 				uni.chooseImage({
 					count: 1, // 最多可以选择的图片张数
 					sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
-					sourceType: ['album'], //从相册选择
+					sourceType: ['camera','album'],
 					success: function(res) {
 						console.log(res);
-						const tempFilePaths = res.tempFilePaths;
 						that.imgUrl = res.tempFilePaths[0];
-						alert(res.tempFilePaths[0])
-
-						uni.uploadFile({
-							url: that.$BASE_URL + 'Inspection/setUpload',
-							filePath: tempFilePaths[0],
-							name: 'file',
-							formData: {
-								'user': 'test'
-							},
-							success: (uploadFileRes) => {
-								console.log('uploadFileRes')
-								that.img = JSON.parse(uploadFileRes.data).img_url;
-								alert(uploadFileRes.data)
-								alert(that.img)
-							}
-						});
+						
+						const { tempFilePaths, tempFiles } = res
+						
+						
+						// var tempFilePaths = res.tempFilePaths[0];
+						
+						alert(tempFilePaths)
+						alert(tempFiles)
+						
+						// setTimeout(function(){
+							
+						// 	uni.uploadFile({
+						// 		url: that.$BASE_URL + 'Inspection/setUpload',
+						// 		filePath: tempFilePaths,
+						// 		name: 'file',
+						// 		// formData: {
+						// 		// 	'user': 'test'
+						// 		// },
+						// 		success: (uploadFileRes) => {
+						// 			console.log('uploadFileRes')
+						// 			that.img = JSON.parse(uploadFileRes.data).img_url;
+						// 			alert(1)
+						// 			alert(uploadFileRes.data)
+						// 			alert(that.img)
+						// 		}
+						// 	});
+							
+							
+						// },2000)
+
+						
 					}
 				})