From db8e416fec0ab844026eb7bc91d9f59a457f4e6e Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 16 Jan 2024 17:41:30 +0800
Subject: [PATCH] 标签事件审核调整,优化

---
 subPackage/label/hotelList.vue                    |    1 
 subPackage/workbench/views/labelReportDetail.vue  |   25 ++
 subPackage/task/workLogDetail.vue                 |   37 ++-
 subPackage/label/index.vue                        |    2 
 subPackage/label/hotel.vue                        |   17 +
 subPackage/workbench/views/workLog.vue            |   77 +++----
 subPackage/label/form.vue                         |   18 +
 subPackage/workbench/views/audit.vue              |    6 
 subPackage/label/formList.vue                     |    1 
 pages/user/center.vue                             |  156 ++++++---------
 common/common.js                                  |   11 +
 subPackage/workbench/views/schoolReportDetail.vue |   76 +++++--
 subPackage/label/bail.vue                         |   81 ++++++-
 subPackage/workbench/views/hotelReportDetail.vue  |   41 ++-
 subPackage/label/schoolList.vue                   |    3 
 subPackage/workbench/views/bailReportDetail.vue   |   11 
 main.js                                           |    6 
 common/setting.js                                 |    4 
 subPackage/label/school.vue                       |   10 
 19 files changed, 352 insertions(+), 231 deletions(-)

diff --git a/common/common.js b/common/common.js
index 8bcdec0..8429715 100644
--- a/common/common.js
+++ b/common/common.js
@@ -40,7 +40,7 @@
 
 // 获取数据下标信息  (picker选择器数据回显)
 export const getIndex = (arr, value, key, nameKey) => {
-	if (key) {
+	if (!key) {
 		for (let i = 0, ii = arr.length; i < ii; i++) {
 			if (arr[i] == value) {
 				return i;
@@ -56,4 +56,13 @@
 			}
 		}
 	}
+}
+
+// 文件路径转字符串
+export const formattingUrls = (urls) => {
+	let arr = [];
+	for (let i of urls) {
+		arr.push(i.name);
+	}
+	return arr.join(",")
 }
\ No newline at end of file
diff --git a/common/setting.js b/common/setting.js
index bc3ff1f..25aaacc 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -9,9 +9,9 @@
 	// 版本号
 	version: '2.0.0',
 	// 开发环境接口Url
-	// devUrl: 'http://z4042833u6.wicp.vip',
+	devUrl: 'http://z4042833u6.wicp.vip',
 	// devUrl: 'http://192.168.0.109:9528',
-	devUrl: 'https://srgdjczzxtpt.com:2080/api',
+	// devUrl: 'https://srgdjczzxtpt.com:2080/api',
 	// devUrl: 'https://kt39592615.goho.co',
 	minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
 	// minioBaseUrl:"http://192.168.0.103:9528/",
diff --git a/main.js b/main.js
index 8e90928..efbdd37 100644
--- a/main.js
+++ b/main.js
@@ -8,7 +8,8 @@
 import {
 	setImageUrl,
 	showTips,
-	getIndex
+	getIndex,
+	formattingUrls
 } from '@/common/common.js'
 Vue.config.productionTip = false;
 
@@ -37,7 +38,8 @@
 Vue.prototype.$http = http
 Vue.prototype.$showTips = showTips;
 Vue.prototype.$setImageUrl = setImageUrl;
-Vue.prototype.$getIndex = getIndex
+Vue.prototype.$getIndex = getIndex;
+Vue.prototype.$formattingUrls = formattingUrls;
 // 公共函数
 import globalFunc from '@/utils/func.js'
 Vue.use(globalFunc, app);
diff --git a/pages/user/center.vue b/pages/user/center.vue
index 9f580d5..e7215ad 100644
--- a/pages/user/center.vue
+++ b/pages/user/center.vue
@@ -1,86 +1,54 @@
 <template>
 	<view class="container">
 		<view class="head">
-			<!-- <u-navbar :is-fixed="false" :border-bottom="false"  title="个人中心" :background="{ background: 'transprent' }" title-color="#FFFFFF">
-				<view @click="$u.func.route('/pages/system/setting')" slot="right">
-					<image src="/static/images/user/setting.png" class="set-icon" mode="widthFix"></image>
-				</view>
-			</u-navbar> -->
 			<image src="/static/img/center-bg.png" class="head-bg" />
-
 			<!-- 用户信息 -->
 			<view class="user-box">
 				<view class="left">
-					<image v-if="userInfo.avatar" :src="setAvatar(userInfo.avatar)" class="avatar" mode="aspectFill"></image>
+					<image v-if="userInfo.avatar" :src="setAvatar(userInfo.avatar)" class="avatar" mode="aspectFill">
+					</image>
 					<image v-else src="/static/icon/user-01.png" class="avatar" mode="aspectFill"></image>
-					<view class="user-name">{{ userInfo.real_name }}</view>
+					<view class="user-name" v-if="isLogin">{{ userInfo.real_name }}</view>
+					<view class="user-name" v-if="!isLogin">未登录</view>
 					<!-- <view class="tag">{{ userInfo.tenant_id }}</view> -->
 				</view>
-				<view @click="navigator('/subPackage/user/editUserInfo/editUserInfo')" class="edit-btn">编辑资料</view>
+				<view v-if="isLogin" @click="navigator('/subPackage/user/editUserInfo/editUserInfo')" class="edit-btn">
+					编辑资料</view>
+				<view v-if="!isLogin" @click="navToLogin()" class="edit-btn">前往登录 ></view>
 			</view>
 			<!-- 操作按钮 -->
-			<view class="nav"  v-if="roleType == 1 && addressType == 1">
+			<view class="nav" v-if="roleType == 1 && addressType == 1 && isLogin">
 				<navigator url="/subPackage/user/family/list" hover-class="none" class="nav-item">
-					<!-- <image src="/static/images/user/n1.png" class="icon" mode=""></image> -->
-					<u-icon name="account"  color="#fff"  size="28"></u-icon>
+					<u-icon name="account" color="#fff" size="28"></u-icon>
 					<view class="name">我的家人</view>
 				</navigator>
 				<navigator url="/subPackage/house/roomControl/index" hover-class="none" class="nav-item">
-					<!-- <image src="/static/images/user/n2.png" class="icon" mode=""></image> -->
-						<u-icon name="home"  color="#fff"  size="28"></u-icon>
+					<u-icon name="home" color="#fff" size="28"></u-icon>
 					<view class="name">我的房屋</view>
 				</navigator>
 				<navigator url="/subPackage/user/district/index" hover-class="none" class="nav-item">
-					<!-- <image src="/static/images/user/n3.png" class="icon" mode=""></image> -->
-					<u-icon name="map"  color="#fff"  size="28"></u-icon>
+					<u-icon name="map" color="#fff" size="28"></u-icon>
 					<view class="name">我的小区</view>
 				</navigator>
 				<navigator url="/subPackage/bs/views/zhsb?from=2" hover-class="none" class="nav-item">
-					<!-- <image src="/static/images/user/n4.png" class="icon" mode=""></image> -->
-					<u-icon name="file-text"  color="#fff"  size="28"></u-icon>
+					<u-icon name="file-text" color="#fff" size="28"></u-icon>
 					<view class="name">出租信息</view>
 				</navigator>
 			</view>
 		</view>
-		<!-- 功能列表 -->
-		<!-- <view class="cell-box">
-			<u-cell-group :border="false">
-				<u-cell-item title="我的评价">
-					<image slot="icon" src="/static/images/user/c1.png" class="icon" mode=""></image>
-				</u-cell-item>
-				<u-cell-item title="常见问题">
-					<image slot="icon" src="/static/images/user/c2.png" class="icon" mode=""></image>
-				</u-cell-item>
-				<u-cell-item title="客服中心" :border-bottom="false">
-					<image slot="icon" src="/static/images/user/c3.png" class="icon" mode=""></image>
-				</u-cell-item>
-			</u-cell-group>
-		</view> -->
-		<view class="cell-box">
-			<u-cell-group :border="false" icon="star"  :customStyle="{fontSize:'26rpx',color:'#585b61'}">
-				<u-cell title="切换角色"   isLink  url="/subPackage/user/role/index">
+		<view class="cell-box" v-if="isLogin">
+			<u-cell-group :border="false" icon="star" :customStyle="{fontSize:'26rpx',color:'#585b61'}">
+				<u-cell title="切换角色" isLink url="/subPackage/user/role/index">
 					<image slot="icon" src="/static/icon/menu-center-02.png" class="icon" mode=""></image>
 				</u-cell>
-				<u-cell title="修改密码"  :border="false"   isLink  url="/subPackage/user/password/index">
+				<u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index">
 					<image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image>
 				</u-cell>
-				<!-- <u-cell title="测试页面"  :border="false"   isLink  url="/subPackage/house/roomDetails/detail">
-					<image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image>
-				</u-cell> -->
-				<!-- <u-cell-item title="评分">
-					<image slot="icon" src="/static/images/user/c5.png" class="icon" mode=""></image>
-				</u-cell-item>
-				<u-cell-item title="反馈">
-					<image slot="icon" src="/static/images/user/c6.png" class="icon" mode=""></image>
-				</u-cell-item>
-				<u-cell-item title="关于" :border-bottom="false">
-					<image slot="icon" src="/static/images/user/c7.png" class="icon" mode=""></image>
-				</u-cell-item> -->
 			</u-cell-group>
 		</view>
-		<view class="cell-box" >
+		<view class="cell-box" v-if="isLogin">
 			<u-cell-group :border="false">
-				<u-cell title="退出登录"   :border="false" @click="logOut"  isLink>
+				<u-cell title="退出登录" :border="false" @click="logOut" isLink>
 					<image slot="icon" src="/static/icon/menu-center-04.png" class="icon" mode=""></image>
 				</u-cell>
 			</u-cell-group>
@@ -89,9 +57,12 @@
 </template>
 
 <script>
-	
-	import { fetchUserInfo } from "@/api/user.js"
-	import { minioBaseUrl } from "@/common/setting.js"
+	import {
+		fetchUserInfo
+	} from "@/api/user.js"
+	import {
+		minioBaseUrl
+	} from "@/common/setting.js"
 	export default {
 		data() {
 			return {
@@ -108,11 +79,11 @@
 					}
 				],
 				roleType: 1,
-				addressType:1,
-				user_info:{}
+				addressType: 1,
+				user_info: {}
 			};
 		},
-		
+
 		onShow() {
 			// this.getUserInfo();
 			let role = uni.getStorageSync('activeRole')
@@ -123,62 +94,63 @@
 			}
 			this.addressType = uni.getStorageSync("siteInfo").addressType;
 		},
-		
+
 		mounted() {
 			this.setHeadHeight()
-			
+
 		},
 		methods: {
-			
-			
-			setAvatar(avatar){
+
+
+			setAvatar(avatar) {
 				return `${minioBaseUrl}${avatar}`
 			},
-			
-			
-			getUserInfo(){
+
+
+			getUserInfo() {
 				let id = uni.getStorageSync("userInfo").user_id;
 				// console.log("userInfo===>",  uni.getStorageSync("userInfo"))
 				// return;
-			   fetchUserInfo(id).then(res=>{
-				   console.log(res)
-				   if(res.code == 200){
-					   console.log(JSON.parse(res.data));
-					   return;
-					    let data =  res.data;
+				fetchUserInfo(id).then(res => {
+					console.log(res)
+					if (res.code == 200) {
+						console.log(JSON.parse(res.data));
+						return;
+						let data = res.data;
 						let userInfo = res.data;
-					   
+
 						data = JSON.parse(data);
-					   if(data.avatar){
-						   data.avatar = `${minioBaseUrl}${data.avatar}`
-					   }
-					   this.user_info = data;
-					   this.$u.vuex('userInfo',JSON.parse(userInfo))
-					}   
-			   })
+						if (data.avatar) {
+							data.avatar = `${minioBaseUrl}${data.avatar}`
+						}
+						this.user_info = data;
+						this.$u.vuex('userInfo', JSON.parse(userInfo))
+					}
+				})
 			},
-			
+
 			setHeadHeight() {
 				const that = this
-			
+
 				uni.getSystemInfo({
 					success: function(res) {
-						that.headHeight = Number(res.statusBarHeight) + Number(res.platform == 'ios' ? 44 : 48) + 582
+						that.headHeight = Number(res.statusBarHeight) + Number(res.platform == 'ios' ? 44 :
+							48) + 582
 					}
 				});
-				
+
 			},
-			
+
 			navigator(url) {
 				this.$u.func.globalNavigator(url)
 			},
-			
+
 			navToLogin() {
 				uni.redirectTo({
 					url: "/pages/login/login-account"
 				})
 			},
-			
+
 			logOut() {
 				uni.showModal({
 					title: "提示",
@@ -194,9 +166,9 @@
 					}
 				})
 			},
-			
-			
-			
+
+
+
 		}
 	};
 </script>
@@ -348,11 +320,11 @@
 			margin-right: 22rpx;
 		}
 	}
-	
-	/deep/ .u-cell__title-text{
-		font-size:28rpx !important;
+
+	/deep/ .u-cell__title-text {
+		font-size: 28rpx !important;
 		font-family: PingFang SC;
 		font-weight: 500;
 		color: #585b61;
 	}
-</style>
+</style>
\ No newline at end of file
diff --git a/subPackage/label/bail.vue b/subPackage/label/bail.vue
index e2b792c..f511829 100644
--- a/subPackage/label/bail.vue
+++ b/subPackage/label/bail.vue
@@ -67,7 +67,9 @@
 <script>
 	import uploadMixin from "@/mixin/uploadMixin";
 	import {
-		saveBailReporting
+		saveBailReporting,
+		getBailReportingDetail,
+		updateBailReporting
 	} from "@/api/reporting/reporting";
 	export default {
 		mixins: [uploadMixin],
@@ -131,10 +133,18 @@
 					}
 				},
 				showSelectDate: false,
-				applyTime: Number(new Date())
+				applyTime: Number(new Date()),
+				status: "",
+				isEdit: false
 			}
 		},
 		onLoad(option) {
+
+			if (option.id) {
+				this.isEdit = true;
+				this.getDetail(option.id)
+			}
+
 			let siteInfo = uni.getStorageSync("siteInfo");
 			let userInfo = uni.getStorageSync("userInfo");
 			this.$set(this.info, "houseCode", siteInfo.houseCode);
@@ -150,6 +160,29 @@
 		},
 
 		methods: {
+
+
+			getDetail(id) {
+				getBailReportingDetail({
+					taskId: id
+				}).then(res => {
+					if (res.code == 200) {
+						for (let i in this.info) {
+							this.info[i] = res.data[i]
+						}
+						this.info.reportType = 1;
+						this.status = data.confirmFlag;
+						if (res.data.applyTime) {
+							this.applyTime = Number(new Date(res.data.applyTime))
+						}
+						this.form.images = this.$setImageUrl(data.locationImageUrls, 2);
+						this.info.locationImageUrls = data.locationImageUrls;
+						this.info.id = data.id;
+						this.info.taskId = data.taskId;
+					}
+				})
+			},
+
 
 			getLocation() {
 				uni.chooseLocation({
@@ -195,20 +228,40 @@
 			sumitInfo() {
 				this.$refs.form.validate().then(valid => {
 					this.checkImages();
-					saveBailReporting(this.info).then(res => {
-						uni.showToast({
-							icon: 'success',
-							title: '提交成功',
-							success() {
-								setTimeout(() => {
-									// this.$u.func.globalNavigator("", "navBack")
-									uni.navigateBack()
-								}, 1000)
-							}
-						})
-					})
+					if (this.isEdit) {
+						this.info.status = 1;
+						this.updateRequest()
+					} else {
+						this.addRequest()
+					}
 				})
 			},
+
+
+			addRequest() {
+				saveBailReporting(this.info).then(res => {
+					uni.showToast({
+						icon: 'success',
+						title: '提交成功'
+					})
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 300)
+				})
+			},
+
+			updateRequest() {
+				updateBailReporting(this.info).then(res => {
+					uni.showToast({
+						icon: 'success',
+						title: '保存成功'
+					})
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 300)
+				})
+			},
+
 			navigatorPage() {
 				this.$u.func.globalNavigator('bailList', "navTo")
 			}
diff --git a/subPackage/label/form.vue b/subPackage/label/form.vue
index 6e0cd3f..04f4567 100644
--- a/subPackage/label/form.vue
+++ b/subPackage/label/form.vue
@@ -141,14 +141,15 @@
 				goodsImageUrls: [],
 				eventType: 1,
 				isEdit: false,
-				id: ""
+				id: "",
+				status: ""
 			}
 		},
 		onLoad(option) {
 			console.log(option);
 			if (option.id) {
 				this.isEdit = true;
-				this.id = opton.id;
+				this.id = option.id;
 				this.getDetail(option.id);
 			} else {
 				if (option.type != 1) {
@@ -182,8 +183,9 @@
 				}).then(res => {
 					if (res.code == 200) {
 						let data = res.data;
+						this.status = data.confirmFlag;
 						uni.setNavigationBarTitle({
-							title: data.name
+							title: data.labelName
 						})
 						for (let i in this.info) {
 							this.info[i] = data[i]
@@ -200,7 +202,7 @@
 
 						if (data.eventType == 1) {
 							this.$set(this.info, "reportType", 3);
-						} else if (option.type == 2) {
+						} else if (data.eventType == 2) {
 							this.$set(this.info, "reportType", 4);
 						} else {
 							this.$set(this.info, "reportType", 5);
@@ -210,7 +212,7 @@
 			},
 
 			setTitle(type) {
-				if (type == 4) {
+				if (type == 2) {
 					return "二手手机维修"
 				} else if (type == 3) {
 					return "二手车交易"
@@ -302,7 +304,11 @@
 						title: '保存成功'
 					})
 					setTimeout(() => {
-						this.reLoadPrePage()
+						if (this.status == 4) {
+							this.reLoadPrePage()
+						} else {
+							uni.navigateBack();
+						}
 					}, 300)
 				})
 			},
diff --git a/subPackage/label/formList.vue b/subPackage/label/formList.vue
index 03603b2..b7ab2d1 100644
--- a/subPackage/label/formList.vue
+++ b/subPackage/label/formList.vue
@@ -6,6 +6,7 @@
 					<text class="f-32 fw" v-if="i.eventType == 1">打金店</text>
 					<text class="f-32 fw" v-if="i.eventType == 3">二手车交易</text>
 					<text class="f-32 fw" v-if="i.eventType == 2">二手手机维修</text>
+					<u-tag v-if="i.confirmFlag == 4" text="待接收" type="warning" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
diff --git a/subPackage/label/hotel.vue b/subPackage/label/hotel.vue
index 23b3d08..23afa18 100644
--- a/subPackage/label/hotel.vue
+++ b/subPackage/label/hotel.vue
@@ -4,13 +4,11 @@
 		<u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100"
 			:labelStyle="{fontSize:'28rpx'}">
 			<view class="content">
-				<u-form-item label="社区名称" prop="districtName" borderBottom>
+				<!-- <u-form-item label="社区名称" prop="districtName" borderBottom>
 					<view class="content-name f-28">
 						{{info.districtName}}
 					</view>
-					<!-- <u-input v-model="info.districtName" disabled disabledColor="#fff" border="none" placeholder="请输入"
-						placeholderClass="f-28 c-99" inputAlign="right"></u-input> -->
-				</u-form-item>
+				</u-form-item> -->
 				<u-form-item label="酒店名称" prop="hotelName" borderBottom required>
 					<u-input v-model="info.hotelName" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
 						inputAlign="right"></u-input>
@@ -333,7 +331,8 @@
 					}
 				],
 				isEdit: false,
-				id: ""
+				id: "",
+				status: ""
 			}
 		},
 		onLoad(option) {
@@ -365,6 +364,7 @@
 				}).then(res => {
 					if (res.code == 200) {
 						let data = res.data;
+						this.status = data.confirmFlag;
 						for (let i in this.info) {
 							this.info[i] = data[i]
 						}
@@ -475,7 +475,6 @@
 				this.$refs.form.validate().then(valid => {
 					this.checkImages()
 					if (this.isEdit) {
-						this.info.id = this.id;
 						this.info.status = 1;
 						this.info.reportType = 2;
 						this.setHotelReportingRequest()
@@ -507,7 +506,11 @@
 						title: '保存成功'
 					})
 					setTimeout(() => {
-						this.reLoadPrePage()
+						if (this.status == 4) {
+							this.reLoadPrePage()
+						} else {
+							uni.navigateBack();
+						}
 					}, 300)
 				})
 			},
diff --git a/subPackage/label/hotelList.vue b/subPackage/label/hotelList.vue
index b32c6ce..5949c65 100644
--- a/subPackage/label/hotelList.vue
+++ b/subPackage/label/hotelList.vue
@@ -4,6 +4,7 @@
 			<view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.taskId)">
 				<view class="item-title flex a-i-c j-c-s-b mb-20">
 					<text class="f-32 fw">{{i.hotelName}}</text>
+					<u-tag v-if="i.confirmFlag == 4" text="待接收" type="warning" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
diff --git a/subPackage/label/index.vue b/subPackage/label/index.vue
index 6cf4665..fc1bf76 100644
--- a/subPackage/label/index.vue
+++ b/subPackage/label/index.vue
@@ -92,7 +92,7 @@
 					{
 						title: "二手手机维修",
 						bgImg: "/static/icon/nav-bg-14.png",
-						path: "form?type=4",
+						path: "form?type=2",
 						background: "#13C6C7",
 						id: "130604"
 					},
diff --git a/subPackage/label/school.vue b/subPackage/label/school.vue
index c2d1db7..b30af04 100644
--- a/subPackage/label/school.vue
+++ b/subPackage/label/school.vue
@@ -380,7 +380,8 @@
 					}
 				],
 				isEdit: false,
-				id: ""
+				id: "",
+				status: ""
 			}
 		},
 		onLoad(option) {
@@ -415,6 +416,7 @@
 				}).then(res => {
 					if (res.code == 200) {
 						let data = res.data;
+						this.status = data.confirmFlag;
 						for (let i in this.info) {
 							this.info[i] = data[i]
 						}
@@ -555,7 +557,11 @@
 						title: '修改成功',
 					})
 					setTimeout(() => {
-						this.reLoadPrePage()
+						if (this.status == 4) {
+							this.reLoadPrePage()
+						} else {
+							uni.navigateBack();
+						}
 					}, 300)
 				})
 			},
diff --git a/subPackage/label/schoolList.vue b/subPackage/label/schoolList.vue
index 2bc3e8d..ff84204 100644
--- a/subPackage/label/schoolList.vue
+++ b/subPackage/label/schoolList.vue
@@ -4,6 +4,7 @@
 			<view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.taskId)">
 				<view class="item-title flex a-i-c j-c-s-b mb-20">
 					<text class="f-32 fw">{{i.campusName}}</text>
+					<u-tag v-if="i.confirmFlag == 4" text="待接收" type="warning" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 2" text="审核通过" type="success" plain plainFill></u-tag>
 					<u-tag v-if="i.confirmFlag == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
@@ -20,7 +21,7 @@
 
 <script>
 	import {
-	 getSchoolReportingList
+		getSchoolReportingList
 	} from "@/api/reporting/reporting.js"
 	export default {
 		data() {
diff --git a/subPackage/task/workLogDetail.vue b/subPackage/task/workLogDetail.vue
index 6250532..cca25cd 100644
--- a/subPackage/task/workLogDetail.vue
+++ b/subPackage/task/workLogDetail.vue
@@ -18,20 +18,23 @@
 		</view>
 		<view class="item-row flex j-c-s-b a-i-c">
 			<text>走访地址</text>
-			<text>{{houseHold.currentAddress}}</text>
+			<text class="item-content">{{houseHold.currentAddress}}</text>
 		</view>
 		<view class="item-row flex j-c-s-b a-i-c">
 			<text>内容</text>
-			<text>{{info.context}}</text>
+			<text class="item-content">{{info.context}}</text>
 		</view>
 		<view class="item-row flex j-c-s-b a-i-c">
-			<text>内容</text>
-			<text>{{info.wordTime}}</text>
+			<text>走访时间</text>
+			<text>{{info.workTime}}</text>
 		</view>
 
 		<view class="image-wrap bgc-ff">
+			<view class="mb-20">
+				走访图片
+			</view>
 			<view class="image-item" v-for="(i,k) in images" @click="previewImage(i)">
-				<u-image :src="i" width="80rpx" height="80rpx"></u-image>
+				<u-image :src="i" width="100rpx" height="100rpx"></u-image>
 			</view>
 
 		</view>
@@ -46,6 +49,13 @@
 	import {
 		getHouseholdDetail
 	} from '@/api/house/household.js'
+	import {
+		bizDictionary,
+		update
+	} from '@/api/system/dict.js'
+	import {
+		getLabelListByParentId
+	} from "@/api/label/label.js";
 	export default {
 		data() {
 			return {
@@ -60,7 +70,7 @@
 		},
 		async onLoad(option) {
 			await this.getTypeList();
-			await this.getLabelLit();
+			await this.getLabelList();
 			this.getDetail(option.id);
 		},
 		methods: {
@@ -70,9 +80,9 @@
 				}).then(res => {
 					this.info = res.data;
 					this.images = this.$setImageUrl(res.data.url);
-					this.getHousehold(res.data.houseHold);
-					this.typeName = this.getTypeValue(res.data.type);
-					this.labelName = this.getLabelValue(res.data.personType);
+					this.getHousehold(res.data.householdId);
+					this.typeName = this.$getIndex(this.typeList, res.data.type, "dictKey", "dictValue").name;
+					this.labelName = this.$getIndex(this.labelList, res.data.personType, "id", "name").name;
 				})
 			},
 
@@ -86,10 +96,11 @@
 				})
 			},
 
-			getLabelLit() {
+			getLabelList() {
 				getLabelListByParentId({
 					parentId: 100
 				}).then(res => {
+					console.log(res);
 					this.labelList = res.data;
 				})
 			},
@@ -103,6 +114,7 @@
 			},
 
 			getLabelValue(value) {
+
 				for (let i = 0, ii = this.labelList.length; i < ii; i++) {
 					if (value == this.labelList[i].id) {
 						return this.labelList[i].name
@@ -142,6 +154,11 @@
 		border-bottom: 1px solid #f5f5f5;
 		font-size: 28rpx;
 		background-color: #fff;
+
+		.item-content {
+			width: 70%;
+			text-align: right;
+		}
 	}
 
 	.image-wrap {
diff --git a/subPackage/workbench/views/audit.vue b/subPackage/workbench/views/audit.vue
index 63c59a9..9e66a7a 100644
--- a/subPackage/workbench/views/audit.vue
+++ b/subPackage/workbench/views/audit.vue
@@ -189,7 +189,11 @@
 			},
 			navTo(id, type, status) {
 				if (status == 4) {
-					this.navToEdit(type, id);
+					if (uni.getStorageSync("activeRole").roleName == "民警") {
+						this.navToDetail(type, id)
+					} else {
+						this.navToEdit(type, id);
+					}
 				} else {
 					this.navToDetail(type, id)
 				}
diff --git a/subPackage/workbench/views/bailReportDetail.vue b/subPackage/workbench/views/bailReportDetail.vue
index 8be5701..05f7278 100644
--- a/subPackage/workbench/views/bailReportDetail.vue
+++ b/subPackage/workbench/views/bailReportDetail.vue
@@ -131,8 +131,8 @@
 		<!-- <footer-btn   v-if="roleType == 1 && status == 1" text="提交审核"  @click="submit" /> -->
 
 		<audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action>
-
 		<footer-btn v-if="roleType == 2 && status == 2" text="提交" @click="submit" />
+		<footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit" />
 
 
 		<u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="goOutDate[tabIndex]" mode="datetime"
@@ -423,7 +423,7 @@
 					this.checkImages()
 					setTimeout(() => {
 						this.submitRequest(this.goOutInfo);
-					}, 1000)
+					}, 300)
 				}
 			},
 
@@ -445,7 +445,14 @@
 					}
 					// uni.navigateBack()
 				})
+			},
+
+			navToEdit() {
+				uni.navigateTo({
+					url: `/subPackage/label/bail?id=${this.id}`
+				})
 			}
+
 		}
 	}
 </script>
diff --git a/subPackage/workbench/views/hotelReportDetail.vue b/subPackage/workbench/views/hotelReportDetail.vue
index aa02910..0ae43ee 100644
--- a/subPackage/workbench/views/hotelReportDetail.vue
+++ b/subPackage/workbench/views/hotelReportDetail.vue
@@ -66,7 +66,7 @@
 			<u-button type="primary" @click="submit">提交审核</u-button>
 		</view> -->
 
-
+		<footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn>
 		<audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action>
 
 		<u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
@@ -91,11 +91,12 @@
 		},
 		data() {
 			return {
-				basicData: [{
-						label: '社区名称',
-						name: "districtName",
-						value: '未完善'
-					},
+				basicData: [
+					// {
+					// 	label: '社区名称',
+					// 	name: "districtName",
+					// 	value: '未完善'
+					// },
 					{
 						label: '酒店名称',
 						name: 'hotelName',
@@ -208,13 +209,20 @@
 		},
 		onLoad(option) {
 			this.taskId = option.id;
-			this.getDetailInfo(option.id);
+
 			let roleName = uni.getStorageSync("activeRole").roleName
 			if (roleName == "居民") {
-				this.roleType = 2
+				this.roleType = 2;
+				uni.setNavigationBarTitle({
+					title: "详情"
+				})
 			} else {
 				this.roleType = 1
 			}
+		},
+
+		onShow() {
+			this.getDetailInfo(this.taskId);
 		},
 
 		methods: {
@@ -270,18 +278,10 @@
 				let data = {
 					id: this.id,
 					taskId: this.taskId,
-					// status: this.selectStatus,
 					status: val.type,
-					// remark: this.remark
 					remark: val.remark
 				}
-				// if (this.selectStatus == 3 && !this.remark) {
-				// 	uni.showToast({
-				// 		title: "请输入拒绝原因",
-				// 		icon: "none"
-				// 	})
-				// 	return;
-				// }
+
 				setHotelReporting(data).then(res => {
 					if (res.code !== 200) {
 						uni.showToast({
@@ -308,6 +308,13 @@
 				prePage.$vm.getList();
 				uni.navigateBack();
 			},
+
+			navToEdit() {
+				uni.navigateTo({
+					url: `/subPackage/label/hotel?id=${this.id}`
+				})
+			}
+
 		}
 	}
 </script>
diff --git a/subPackage/workbench/views/labelReportDetail.vue b/subPackage/workbench/views/labelReportDetail.vue
index b181f48..944b721 100644
--- a/subPackage/workbench/views/labelReportDetail.vue
+++ b/subPackage/workbench/views/labelReportDetail.vue
@@ -17,7 +17,8 @@
 		<view class="planegraph" v-if="goodsImageUrls.length">
 			<box-title title="物品照片" class="box-title"></box-title>
 			<view class="flex-wrap">
-				<view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,imageUrls)">
+				<view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20"
+					@click="previewImg(i,goodsImageUrls)">
 					<u-image :src="i" width="80" height="80"></u-image>
 				</view>
 			</view>
@@ -49,7 +50,7 @@
 		<!-- <view class="bottom-btn" v-if="(roleType == 1 && status == 1) || (roleType == 2 && status == 2)">
 			<u-button type="primary" @click="submit">提交审核</u-button>
 		</view> -->
-
+		<footer-btn v-if="roleType ==2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn>
 		<audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action>
 
 		<u-picker :defaultIndex="defaultIndex" :closeOnClickOverlay="true" @close="isPickerShow = false"
@@ -142,7 +143,8 @@
 
 			let roleName = uni.getStorageSync("activeRole").roleName
 			if (roleName == "居民") {
-				this.roleType = 2
+				this.roleType = 2;
+
 			} else {
 				this.roleType = 1
 			}
@@ -174,6 +176,13 @@
 				}).then(res => {
 					console.log(res);
 					let data = res.data;
+					if (this.roleType == 2) {
+						uni.setNavigationBarTitle({
+							title: `${data.labelName}详情`
+						})
+					}
+
+
 					this.id = data.id;
 					this.status = data.confirmFlag;
 					this.remark = data.confirmNotion;
@@ -236,12 +245,18 @@
 			reLoadPrePage() {
 				let pages = getCurrentPages();
 				let prePage = pages[pages.length - 2];
-				prePage.$vm.currentPage = 1,
-					prePage.$vm.list = [];
+				prePage.$vm.currentPage = 1;
+				prePage.$vm.list = [];
 				prePage.$vm.getList();
 				uni.navigateBack();
 			},
 
+			navToEdit() {
+				uni.navigateTo({
+					url: `/subPackage/label/form?id=${this.id}`
+				})
+			}
+
 		}
 	}
 </script>
diff --git a/subPackage/workbench/views/schoolReportDetail.vue b/subPackage/workbench/views/schoolReportDetail.vue
index 254c15f..282c191 100644
--- a/subPackage/workbench/views/schoolReportDetail.vue
+++ b/subPackage/workbench/views/schoolReportDetail.vue
@@ -6,33 +6,60 @@
 				<lineItem :dataInfo="basicData"></lineItem>
 			</view>
 		</view>
-		<view class="licence" v-if="imageUrls.length">
-			<box-title title="手持身份证" class="box-title"></box-title>
+
+		<view class="planegraph" v-if="foImageUrls.length">
+			<box-title title="四个一工程照片" class="box-title"></box-title>
 			<view class="flex-wrap">
-				<view v-for="(i,k) in imageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,imageUrls)">
+				<view v-for="(i,k) in foImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,foImageUrls)">
 					<u-image :src="i" width="80" height="80"></u-image>
 				</view>
 			</view>
 		</view>
-		<view class="planegraph" v-if="goodsImageUrls.length">
-			<box-title title="物品照片" class="box-title"></box-title>
+		<view class="planegraph" v-if="fireFacsImageUrls.length">
+			<box-title title="灭火器照片" class="box-title"></box-title>
 			<view class="flex-wrap">
-				<view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20"
-					@click="previewImg(i,goodsImageUrls)">
+				<view v-for="(i,k) in fireFacsImageUrls" :key="k" class="ml-20 mt-20"
+					@click="previewImg(i,fireFacsImageUrls)">
+					<u-image :src="i" width="80" height="80"></u-image>
+				</view>
+			</view>
+		</view>
+		<view class="planegraph" v-if="scImageUrls.length">
+			<box-title title="安全通道照片" class="box-title"></box-title>
+			<view class="flex-wrap">
+				<view v-for="(i,k) in scImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,scImageUrls)">
+					<u-image :src="i" width="80" height="80"></u-image>
+				</view>
+			</view>
+		</view>
+		<view class="planegraph" v-if="patrolImageUrls.length">
+			<box-title title="周边巡查照片" class="box-title"></box-title>
+			<view class="flex-wrap">
+				<view v-for="(i,k) in patrolImageUrls" :key="k" class="ml-20 mt-20"
+					@click="previewImg(i,patrolImageUrls)">
+					<u-image :src="i" width="80" height="80"></u-image>
+				</view>
+			</view>
+		</view>
+		<view class="planegraph" v-if="antiCollisionImageUrls.length">
+			<box-title title="防撞装置照片" class="box-title"></box-title>
+			<view class="flex-wrap">
+				<view v-for="(i,k) in antiCollisionImageUrls" :key="k" class="ml-20 mt-20"
+					@click="previewImg(i,antiCollisionImageUrls)">
+					<u-image :src="i" width="80" height="80"></u-image>
+				</view>
+			</view>
+		</view>
+		<view class="planegraph" v-if="haImageUrls.length">
+			<box-title title="高空抛物监控照片" class="box-title"></box-title>
+			<view class="flex-wrap">
+				<view v-for="(i,k) in haImageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,haImageUrls)">
 					<u-image :src="i" width="80" height="80"></u-image>
 				</view>
 			</view>
 		</view>
 		<view class="examine">
 			<box-title title="审核信息" class="box-title"></box-title>
-			<view class="row flex j-c-s-b a-i-c">
-				<text>审核状态</text>
-				<text class="row-right">{{form.confirmFlag}}</text>
-			</view>
-			<view class="row flex j-c-s-b a-i-c" v-if="remark">
-				<text class="f-28">审核状态</text>
-				<text class="row-right">{{remark}}</text>
-			</view>
 			<view class="row flex j-c-s-b a-i-c">
 				<text>审核状态</text>
 				<text class="row-right">{{form.confirmFlag}}</text>
@@ -57,7 +84,7 @@
 		<!-- <view class="bottom-btn" v-if="(roleType == 1 && status == 1) || (roleType == 2 && status == 2)">
 			<u-button type="primary" @click="submit">提交审核</u-button>
 		</view> -->
-
+		<footer-btn v-if="roleType == 2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn>
 		<audit-action @handle="submit" v-if="roleType == 1 && status == 1"></audit-action>
 
 		<u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
@@ -81,11 +108,12 @@
 		},
 		data() {
 			return {
-				basicData: [{
-						label: '社区名称',
-						name: "districtName",
-						value: '未完善'
-					},
+				basicData: [
+					// {
+					// 	label: '社区名称',
+					// 	name: "districtName",
+					// 	value: '未完善'
+					// },
 					{
 						label: '校园名称',
 						name: 'campusName',
@@ -235,6 +263,7 @@
 					this.patrolImageUrls = this.$setImageUrl(data.patrolImageUrls);
 					this.antiCollisionImageUrls = this.$setImageUrl(data.antiCollisionImageUrls);
 					this.haImageUrls = this.$setImageUrl(data.haImageUrls);
+					this.scImageUrls = this.$setImageUrl(data.scImageUrls);
 				})
 			},
 
@@ -290,6 +319,11 @@
 				prePage.$vm.getList();
 				uni.navigateBack();
 			},
+			navToEdit() {
+				uni.navigateTo({
+					url: `/subPackage/label/school?id=${this.id}`
+				})
+			}
 		}
 	}
 </script>
diff --git a/subPackage/workbench/views/workLog.vue b/subPackage/workbench/views/workLog.vue
index 2dc904f..35234cb 100644
--- a/subPackage/workbench/views/workLog.vue
+++ b/subPackage/workbench/views/workLog.vue
@@ -157,19 +157,19 @@
 					// 	trigger: ['blur', 'change']
 					// },
 
-					'type': {
+					'info.type': {
 						type: 'string',
 						required: true,
 						message: '请选择走访类型',
 						trigger: ['blur', 'change']
 					},
-					'householdId': {
+					'info.householdId': {
 						type: 'string',
 						required: true,
 						message: '请选择被访问人',
 						trigger: ['blur', 'change']
 					},
-					'context': {
+					'info.context': {
 						type: 'string',
 						required: true,
 						message: '请输入工作内容',
@@ -206,7 +206,7 @@
 
 		async onLoad(option) {
 			await this.getTypeList();
-			await this.getLabelLit();
+			await this.getLabelList();
 			if (option.id) {
 				this.isEdit = true;
 				this.id = option.id;
@@ -214,9 +214,7 @@
 			}
 		},
 
-
 		methods: {
-
 
 			getDetail(id) {
 				getWorkLogDetail({
@@ -225,43 +223,24 @@
 					console.log(res);
 					if (res.code == 200) {
 						let data = res.data
-						this.typeIndex = this.getTypeValue(data.type).index;
-						this.typeName = this.getTypeValue(data.type).name;
-						this.workTime = Number(new Date(data.workTime))
+						this.tyepIndex = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").index;
+						this.typeName = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").name;
+						if (data.workTime) {
+							this.workTime = Number(new Date(data.workTime))
+						}
 						this.info.type = data.type;
 						this.info.workTime = data.workTime;
 						this.info.context = data.context;
 						this.info.householdId = data.householdId;
 						this.info.personType = data.personType;
-						this.labelIndex = this.getLabelValue(data.personType).index;
-						this.labelName = this.getLabelValue(data.personType).name;
+						this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index;
+						this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name;
 						this.getHouseholdList();
 						this.getHousehold(data.householdId);
 						this.form.images = this.$setImageUrl(data.url, 2);
+						this.info.id = data.id;
 					}
 				})
-			},
-
-			getTypeValue(value) {
-				for (let i = 0, ii = this.typeList[0].length; i < ii; i++) {
-					if (value == this.typeList[0][i].dictKey) {
-						return {
-							index: [i],
-							name: this.typeList[0][i].dictValue
-						}
-					}
-				}
-			},
-
-			getLabelValue(value) {
-				for (let i = 0, ii = this.labelList[0].length; i < ii; i++) {
-					if (value == this.labelList[0][i].id) {
-						return {
-							index: [i],
-							name: this.labelList[0][i].name
-						}
-					}
-				}
 			},
 
 			getTypeList() {
@@ -273,7 +252,7 @@
 				})
 			},
 
-			getLabelLit() {
+			getLabelList() {
 				getLabelListByParentId({
 					parentId: 100
 				}).then(res => {
@@ -378,7 +357,6 @@
 					} else {
 						this.addWorkLogRequest()
 					}
-
 				})
 			},
 
@@ -386,13 +364,11 @@
 				addWorkLog(this.info).then(res => {
 					uni.showToast({
 						icon: 'success',
-						title: '提交成功',
-						success() {
-							setTimeout(() => {
-								uni.navigateBack()
-							}, 1000)
-						}
+						title: '提交成功'
 					})
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 300)
 				})
 			},
 
@@ -401,14 +377,21 @@
 					uni.showToast({
 						icon: 'success',
 						title: '提交成功',
-						success() {
-							setTimeout(() => {
-								uni.navigateBack()
-							}, 1000)
-						}
 					})
+					setTimeout(() => {
+						this.reLoadPrePage()
+					}, 300)
 				})
-			}
+			},
+
+			//刷新上一页数据后返回
+			reLoadPrePage() {
+				let pages = getCurrentPages();
+				let prePage = pages[pages.length - 2];
+				prePage.$vm.resetParams();
+				prePage.$vm.getList();
+				uni.navigateBack();
+			},
 
 		}
 	}

--
Gitblit v1.9.3