From f6a92065c83f146f8a4d278a61b3db1f55780eb8 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sat, 18 Nov 2023 22:30:56 +0800
Subject: [PATCH] 解决一些加载问题,minio 图片基础路径修改

---
 subPackage/workbench/views/rental.vue      |   13 +-
 subPackage/house/roomDetails/index.vue     |    1 
 subPackage/house/houseNumber/index.vue     |  141 +++++++++++++++++------------------
 subPackage/workbench/views/cscj.vue        |    8 +
 subPackage/workbench/views/csjl.vue        |   14 ++-
 common/setting.js                          |    8 +-
 subPackage/house/member/householdLabel.vue |   10 +-
 subPackage/house/roomControl/index.vue     |    2 
 subPackage/workbench/views/cshw.vue        |   13 ++-
 9 files changed, 107 insertions(+), 103 deletions(-)

diff --git a/common/setting.js b/common/setting.js
index cce0c57..57b4fe9 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -11,11 +11,11 @@
 	// 开发环境接口Url
 	// devUrl: 'https://sk.hubeishuiyi.cn',
 	// devUrl: 'http://192.168.1.156:9528',
-	// devUrl:'http://192.168.1.50:9528',
-	devUrl: 'http://192.168.0.102:9528',
+	devUrl:'http://192.168.1.50:9528',
+	// devUrl: 'http://192.168.0.102:9528',
 	// devUrl: 'https://srgdjczzxtpt.com:2080/api',
-	// minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
-	minioBaseUrl: 'https://srgdjczzxtpt.com:2080/',
+	minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
+	// minioBaseUrl: 'https://srgdjczzxtpt.com:2080/',
 	// 数据中台接口url
 	// dataCenterUrl: 'http://10.10.2.192/services',
 	dataCenterUrl: 'https://sk.hubeishuiyi.cn/services',
diff --git a/subPackage/house/houseNumber/index.vue b/subPackage/house/houseNumber/index.vue
index 8c4a6bd..cc4eba3 100644
--- a/subPackage/house/houseNumber/index.vue
+++ b/subPackage/house/houseNumber/index.vue
@@ -63,6 +63,7 @@
 		getPlaceDetail
 	} from '@/api/place/place.js'
 	import boxTitle from '../components/boxTitle/index2.vue'
+	import { minioBaseUrl } from "../../../common/setting";
 	export default {
 		components: {
 			lineItem,
@@ -205,16 +206,12 @@
 		},
 		methods: {
 			async getBuildingDetail() {
-				this.$refs.uToast.show({
-					type: 'loading',
-					message: '正在加载',
-					duration: 9999999
-				})
-				// const {
-				// 	code,
-				// 	data
-				// } = await getDoorplateAddressDetail({
-				// 	stdId: this.stdId
+				// this.$nextTick(() => {
+				// 	this.$refs.uToast.show({
+				// 		type: 'loading',
+				// 		message: '正在加载',
+				// 		duration: 9999999
+				// 	})
 				// })
 				const {
 					code,
@@ -222,7 +219,6 @@
 				} = await getPlaceDetail({
 					houseCode: this.stdId
 				})
-				console.log(data);
 				if (code !== 200) {
 					uni.showToast({
 						title: "数据请求失败",
@@ -231,69 +227,70 @@
 					})
 					return
 				}
-				const doorplateAddressEntity = data?.doorplateAddressEntity || {}
-				const placePoiLabelVOList = data?.placePoiLabelVOList || {}
-				this.houseNumberData.forEach(item => {
-					if (!data[item.name]) {
-						item.value = data.doorplateAddressEntity[item.name] || '未完善'
-					} else {
-						item.value = data[item.name] || '未完善'
+				if(data){
+					const doorplateAddressEntity = data?.doorplateAddressEntity || {}
+					const placePoiLabelVOList = data?.placePoiLabelVOList || {}
+					this.houseNumberData.forEach(item => {
+						if (!data[item.name]) {
+							item.value = data.doorplateAddressEntity[item.name] || '未完善'
+						} else {
+							item.value = data[item.name] || '未完善'
+						}
+					
+						if (item.name == 'label') {
+					
+							let labelArr = []
+							placePoiLabelVOList.forEach(item => {
+								labelArr.push(item.labelName)
+							})
+					
+							item.value = labelArr.join('、')
+						}
+					})
+					
+					this.gridData.forEach(item => {
+						if (!data[item.name]) {
+							item.value = data.grid[item.name] || '未完善'
+						} else {
+							item.value = data[item.name] || '未完善'
+						}
+					})
+					
+					this.collectData.forEach(item => {
+						if (!data[item.name]) {
+							item.value = data.doorplateAddressEntity[item.name] || '未完善'
+						} else {
+							item.value = data[item.name] || '未完善'
+							if(item.name == "imageUrls" ){
+								item.value = minioBaseUrl + data[item.name] || '未完善'
+							}
+						}
+					})
+					
+					this.policeData.forEach(item => {
+						if (!data[item.name]) {
+							item.value = data.doorplateAddressEntity[item.name] || '未完善'
+						} else {
+							item.value = data[item.name] || '未完善'
+						}
+					})
+					
+					const {
+						lat,
+						lng
+					} = data
+					this.lngLat = {
+						lat,
+						lng
 					}
-
-					if (item.name == 'label') {
-
-						let labelArr = []
-						placePoiLabelVOList.forEach(item => {
-							labelArr.push(item.labelName)
-						})
-
-						item.value = labelArr.join('、')
-					}
-				})
-
-				this.gridData.forEach(item => {
-					if (!data[item.name]) {
-						item.value = data.grid[item.name] || '未完善'
-					} else {
-						item.value = data[item.name] || '未完善'
-					}
-				})
-
-				this.collectData.forEach(item => {
-					if (!data[item.name]) {
-						item.value = data.doorplateAddressEntity[item.name] || '未完善'
-					} else {
-						item.value = data[item.name] || '未完善'
-					}
-				})
-
-
-				this.policeData.forEach(item => {
-					if (!data[item.name]) {
-						item.value = data.doorplateAddressEntity[item.name] || '未完善'
-					} else {
-						item.value = data[item.name] || '未完善'
-					}
-				})
-
-				const {
-					lat,
-					lng
-				} = data
-				this.lngLat = {
-					lat,
-					lng
+					this.marker = [{
+						id: 1,
+						width: 30,
+						height: 40,
+						latitude: lat,
+						longitude: lng,
+					}]
 				}
-				this.marker = [{
-					id: 1,
-					width: 30,
-					height: 40,
-					latitude: lat,
-					longitude: lng,
-				}]
-				this.$nextTick(() => {
-					this.$refs.uToast.isShow = false
-				})
 			},
 			imgPreview(value) {
 				uni.previewImage({
diff --git a/subPackage/house/member/householdLabel.vue b/subPackage/house/member/householdLabel.vue
index d4e5a1c..3be1b2a 100644
--- a/subPackage/house/member/householdLabel.vue
+++ b/subPackage/house/member/householdLabel.vue
@@ -119,11 +119,11 @@
 		created() {},
 		mounted() {
 			this.getDoorPlateAddressDetail()
-			this.$nextTick(() => {
-				if (this.labelBtnList.length === 0) {
-					this.getLabelList()
-				}
-			})
+			// this.$nextTick(() => {
+			// 	if (this.labelBtnList.length === 0) {
+			// 		this.getLabelList()
+			// 	}
+			// })
 		},
 		onLoad(option) {
 			const data = JSON.parse(option.data);
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index dadc33a..fb00768 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -223,7 +223,7 @@
 						imageUrls,
 						houseLabelVOList
 					} = res.data
-					if (imageUrls.length > 0) {
+					if (imageUrls && imageUrls.length > 0) {
 						const urls = imageUrls.split(',')
 						// 遍历
 						urls.forEach(e => {
diff --git a/subPackage/house/roomDetails/index.vue b/subPackage/house/roomDetails/index.vue
index 71a165f..b5d2268 100644
--- a/subPackage/house/roomDetails/index.vue
+++ b/subPackage/house/roomDetails/index.vue
@@ -245,7 +245,6 @@
 					householdList,
 					subAoi
 				} = res.data
-				console.log(res.data);
 				this.houseCode = addressCode
 				this.rentOutList = houseRentalList
 				this.ownerInfoList = householdList
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 52238bb..b545e0a 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -172,6 +172,7 @@
 		format
 	} from "echarts";
 	import boxTitle from '../components/boxTitle/index.vue'
+import { minioBaseUrl } from "../../../common/setting";
 	export default {
 		mixins: [uploadMixin],
 		components: {
@@ -354,11 +355,9 @@
 			},
 			"form.buildingCode": {
 				handler(newVal) {
-					console.log(newVal)
 				}
 			},
 			showLabelList(newVal) {
-				console.log(newVal);
 			}
 
 		},
@@ -505,6 +504,9 @@
 								item.value = gridEntity[item.name] || '未完善'
 							} else {
 								item.value = data[item.name] || '未完善'
+								if(item.name == "imageUrls" ){
+									item.value = minioBaseUrl + data[item.name] || '未完善'
+								}
 							}
 						})
 						this.publicData[key].forEach(item => {
@@ -712,7 +714,7 @@
 			},
 			imgPreview(value) {
 				uni.previewImage({
-					urls: [value],
+					urls: minioBaseUrl + [value],
 				})
 			},
 		}
diff --git a/subPackage/workbench/views/cshw.vue b/subPackage/workbench/views/cshw.vue
index 2b544d9..b0d318f 100644
--- a/subPackage/workbench/views/cshw.vue
+++ b/subPackage/workbench/views/cshw.vue
@@ -84,12 +84,15 @@
 		},
 		methods: {
 			async getSiteList() {
-				this.$refs.uToast.show({
-					type: 'loading',
-					message: '正在加载',
-					duration: 9999999
+				this.$nextTick(() => {
+					this.$refs.uToast.show({
+						type: 'loading',
+						message: '正在加载',
+						duration: 9999999
+					})
+					this.loadingStatus = 'loadingmore'
 				})
-				this.loadingStatus = 'loadingmore'
+				
 				const params = {
 					placeName: this.keyWord,
 					confirmFlag: this.tabStatus
diff --git a/subPackage/workbench/views/csjl.vue b/subPackage/workbench/views/csjl.vue
index bff8ece..eadf56f 100644
--- a/subPackage/workbench/views/csjl.vue
+++ b/subPackage/workbench/views/csjl.vue
@@ -70,6 +70,7 @@
 		onShow() {
 			this.recordsData = []
 			this.currentRole = uni.getStorageSync('activeRole')
+			
 			this.getrRecordList()
 		},
 		onReachBottom() {
@@ -78,16 +79,17 @@
 		},
 		methods: {
 			async getrRecordList(placeName = this.iptContext, isPerfect = this.tabsType) {
-				this.$refs.uToast.show({
-					type: 'loading',
-					message: '正在加载',
-					duration: 9999999
+				this.$nextTick(() => {
+					this.$refs.uToast.show({
+						type: 'loading',
+						message: '正在加载',
+						duration: 9999999
+					})
+					this.status = 'loadmore'
 				})
-				this.status = 'loadmore'
 				const {
 					roleName
 				} = this.currentRole
-				console.log(this.currentRole);
 				const {
 					code,
 					data: {
diff --git a/subPackage/workbench/views/rental.vue b/subPackage/workbench/views/rental.vue
index f311ab6..fb474f6 100644
--- a/subPackage/workbench/views/rental.vue
+++ b/subPackage/workbench/views/rental.vue
@@ -208,7 +208,6 @@
 					}
 				}
 				getStatistics(params).then(res => {
-					console.log(res, "+------------")
 					this.statistics = res.data
 				})
 			},
@@ -219,11 +218,13 @@
 				return res.name
 			},
 			async getRentalHouseInfo(params = {}) {
-				this.loadingStatus = 'loadmore'
-				this.$refs.uToast.show({
-					type: 'loading',
-					message: '正在加载',
-					duration: 9999999
+				this.$nextTick(() => {
+					this.loadingStatus = 'loadmore'
+					this.$refs.uToast.show({
+						type: 'loading',
+						message: '正在加载',
+						duration: 9999999
+					})
 				})
 				const {
 					roleName

--
Gitblit v1.9.3