From d10f56e9212d497bf873b599cd1098be2cb93b49 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Mon, 05 Feb 2024 17:34:16 +0800
Subject: [PATCH] 更新

---
 subPackage/label/checkList.vue                 |   14 ++--
 api/reporting/reporting.js                     |   20 ++++++
 common/setting.js                              |    4 
 subPackage/label/index.vue                     |    8 +-
 subPackage/label/check.vue                     |    2 
 subPackage/workbench/views/selfCheckDetail.vue |   37 +++++++----
 subPackage/workbench/views/audit.vue           |   44 ++++++++++----
 7 files changed, 88 insertions(+), 41 deletions(-)

diff --git a/api/reporting/reporting.js b/api/reporting/reporting.js
index d04f43d..a650d55 100644
--- a/api/reporting/reporting.js
+++ b/api/reporting/reporting.js
@@ -207,4 +207,24 @@
 			...params
 		}
 	})
+}
+
+//消防自查列表
+export const getPlaceCheckList = (params) => {
+	return http.request({
+		url: '/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/page',
+		method: 'get',
+		params: {
+			...params
+		}
+	})
+}
+
+//消防自查审核
+export const auditPlaceCheck = (data) => {
+	return http.request({
+		url: '/blade-taskPlaceSelfCheck/taskPlaceSelfCheck/updateTaskPlaceSelfCheck',
+		method: 'POST',
+		data: data
+	})
 }
\ No newline at end of file
diff --git a/common/setting.js b/common/setting.js
index c64e154..1fe3904 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -10,8 +10,8 @@
 	version: '2.0.0',
 	// 开发环境接口Url
 	// devUrl: 'http://z4042833u6.wicp.vip',
-	devUrl: 'http://192.168.2.109:9528',
-	// devUrl: 'https://srgdjczzxtpt.com:2080/api',
+	// devUrl: 'http://192.168.2.109:9528',
+	devUrl: 'https://srgdjczzxtpt.com:2080/api',
 	// devUrl: 'https://kt39592615.goho.co',
 	minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
 	// minioBaseUrl: "http://192.168.0.101:9528/",
diff --git a/subPackage/label/check.vue b/subPackage/label/check.vue
index 28090ef..332cdf8 100644
--- a/subPackage/label/check.vue
+++ b/subPackage/label/check.vue
@@ -327,7 +327,7 @@
 				}
 
 				this.info.taskPlaceRecordVOList = this.getSelected()
-
+				this.info.status = 1;
 				savePlaceCheck(this.info).then(res => {
 					uni.hideLoading();
 					uni.showToast({
diff --git a/subPackage/label/checkList.vue b/subPackage/label/checkList.vue
index c808060..205cd05 100644
--- a/subPackage/label/checkList.vue
+++ b/subPackage/label/checkList.vue
@@ -6,10 +6,10 @@
 					<text class="f-32 fw">消防自查</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>
+					<u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
+					<u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
+					<u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
+					<u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
 				</view>
 				<view class="item-row flex a-i-c j-c-s-b">
 					<text class="f-28">时间</text>
@@ -23,7 +23,7 @@
 
 <script>
 	import {
-		getLabelReportingList
+		getPlaceCheckList
 	} from "@/api/reporting/reporting.js"
 	export default {
 		data() {
@@ -44,11 +44,11 @@
 
 		methods: {
 			getList() {
-				getLabelReportingList({
+				getPlaceCheckList({
 					userId: uni.getStorageSync("userInfo").user_id,
 					page: this.currentPage,
 					size: 10,
-					reportType: 2
+					// reportType: 2
 					// eventType: type
 				}).then(res => {
 					if (res.code != 200) {
diff --git a/subPackage/label/index.vue b/subPackage/label/index.vue
index bddce49..3404a7d 100644
--- a/subPackage/label/index.vue
+++ b/subPackage/label/index.vue
@@ -50,7 +50,7 @@
 			</view> -->
 
 			<view class="nav flex flex-wrap j-c-s-b">
-				<view class="nav-item" :key="k" @click="navTo('check')">
+				<view class="nav-item" :key="k" @click="navTo('check')" v-if="isNine == 1">
 					<image class="nav-item-bg" src="/static/icon/nav-bg-12.png" mode="aspectFill"></image>
 					<view class="nav-item-inner flex f-d-c">
 						<text class="f-32 mb-30">消防检查</text>
@@ -58,7 +58,7 @@
 					</view>
 				</view>
 
-				<view class="nav-item" :key="k" @click="navTo('form')">
+				<view class="nav-item" :key="k" @click="navTo('form')" v-if="isFront  == 1">
 					<image class="nav-item-bg" src="/static/icon/nav-bg-11.png" mode="aspectFill"></image>
 					<view class="nav-item-inner flex f-d-c">
 						<text class="f-32 mb-30">二手交易</text>
@@ -128,7 +128,8 @@
 				count: {},
 				labelList: [],
 				isNine: 2,
-				isNineHotel: false
+				isNineHotel: false,
+				isFront: 2
 			}
 		},
 
@@ -137,6 +138,7 @@
 			let siteInfo = uni.getStorageSync("siteInfo");
 			this.curSiteInfo = siteInfo;
 			this.isNine = siteInfo.isNine || 2;
+			this.isFront = siteInfo.isFront || 2;
 			if (siteInfo.isNine == 1) {
 				for (let i of this.navList[1]) {
 					if (i.id.includes(siteInfo.categoryList[0].categoryNo)) {
diff --git a/subPackage/workbench/views/audit.vue b/subPackage/workbench/views/audit.vue
index 3bf2ed3..307b1bb 100644
--- a/subPackage/workbench/views/audit.vue
+++ b/subPackage/workbench/views/audit.vue
@@ -192,7 +192,6 @@
 			},
 			navTo(id, reportType, status, type) {
 				if (status == 4) {
-
 					if (reportType == 8) {
 						this.navToDetail(reportType, id, type)
 					} else {
@@ -202,38 +201,55 @@
 							this.navToEdit(reportType, id, type);
 						}
 					}
-
-
 				} else {
 					this.navToDetail(reportType, id, type)
 				}
 			},
 
 			navToEdit(reportType, id, type) {
+				// if (reportType == 1) {
+				// 	this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+				// } else if (reportType == 2 || type == 7) {
+				// 	this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`)
+				// } else if (reportType == 3 || reportType == 4 || reportType == 5) {
+				// 	this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+				// } else if (reportType == 6) {
+				// 	this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`)
+				// }
+
 				if (reportType == 1) {
 					this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
-				} else if (reportType == 2 || type == 7) {
-					this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`)
-				} else if (reportType == 3 || reportType == 4 || reportType == 5) {
+				} else if (reportType == 2) {
+					this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
+				} else if (reportType == 5) {
 					this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
-				} else if (reportType == 6) {
-					this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`)
 				}
 			},
 
 			navToDetail(reportType, id, type) {
+				// if (reportType == 1) {
+				// 	this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+				// } else if (reportType == 2 || type == 7) {
+				// 	this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
+				// } else if (reportType == 3 || reportType == 4 || reportType == 5) {
+				// 	this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+				// } else if (reportType == 6) {
+				// 	this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
+				// } else {
+				// 	this.$u.func.globalNavigator(`checkReform?id=${id}`)
+				// }
+
 				if (reportType == 1) {
 					this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
-				} else if (reportType == 2 || type == 7) {
-					this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
-				} else if (reportType == 3 || reportType == 4 || reportType == 5) {
+				} else if (reportType == 2) {
+					this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+				} else if (reportType == 5) {
 					this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
-				} else if (reportType == 6) {
-					this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
 				} else {
-
 					this.$u.func.globalNavigator(`checkReform?id=${id}`)
 				}
+
+
 			},
 
 			showDateModal() {
diff --git a/subPackage/workbench/views/selfCheckDetail.vue b/subPackage/workbench/views/selfCheckDetail.vue
index 7cc0b7f..858a72a 100644
--- a/subPackage/workbench/views/selfCheckDetail.vue
+++ b/subPackage/workbench/views/selfCheckDetail.vue
@@ -8,7 +8,7 @@
 			<text>标签</text>
 			<text>{{label || "未完善"}}</text>
 		</view>
-		<view class="item-row flex j-c-s-b a-i-c">
+		<!-- <view class="item-row flex j-c-s-b a-i-c">
 			<text>场所负责人</text>
 			<text>{{info.principal || "未完善"}}</text>
 		</view>
@@ -19,7 +19,7 @@
 		<view class="item-row flex j-c-s-b a-i-c">
 			<text>检查人</text>
 			<text>{{info.name}}</text>
-		</view>
+		</view> -->
 		<view class="item-row flex j-c-s-b a-i-c">
 			<text>检查时间</text>
 			<text>{{info.createTime}}</text>
@@ -85,7 +85,7 @@
 		<view class="mt-20 bgc-ff">
 			<block v-for="(item,index) in itemList">
 				<block v-for="(i,k) in item.children">
-					<block v-for="(n,m) in info.patrolRecordVOList">
+					<block v-for="(n,m) in info.taskPlaceRecordVOList">
 						<!-- <view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 1">
 							<text class="item-left">{{i.title}}</text>
 							<text>不存在</text>
@@ -151,6 +151,7 @@
 		<view class="blank"></view>
 		<!-- <footer-btn @click="submitInfo" v-if="roleType == 2 && (info.status == 4 || info.status == 3)"     /> -->
 		<audit-action v-if="roleType == 1 && info.status == 1" @handle="submitAudit" />
+		<footer-btn v-if="roleType == 2 && info.status == 3" text="重新提交" @click="navTo" />
 	</view>
 </template>
 
@@ -164,7 +165,8 @@
 	} from '@/api/place/place.js'
 
 	import {
-		getPlaceCheckDetail
+		getPlaceCheckDetail,
+		auditPlaceCheck
 	} from '@/api/reporting/reporting.js'
 
 	import auditAction from '../components/actionBtn.vue'
@@ -203,7 +205,7 @@
 
 			getDetail(id) {
 				getPlaceCheckDetail({
-					task: id
+					taskId: id
 				}).then(res => {
 					let data = res.data;
 					// this.info = res.data;
@@ -214,7 +216,7 @@
 							.labelName;
 					}
 					let ids = [];
-					for (let i of data.patrolRecordVOList) {
+					for (let i of data.taskPlaceRecordVOList) {
 						if ((data.status == 4 || data.status == 3) && this.roleType == 2) {
 							if (i.rectificationImageUrls) {
 								i.urls = this.$setImageUrl(i.rectificationImageUrls, 2);
@@ -243,7 +245,7 @@
 				uni.showLoading({
 					title: "上传中..."
 				})
-				let children = this.info.patrolRecordVOList;
+				let children = this.info.taskPlaceRecordVOList;
 				let lists = [].concat(event.file)
 				let fileListLen = item.urls.length;
 				lists.map((item) => {
@@ -252,7 +254,7 @@
 						status: 'uploading',
 						message: '上传中'
 					})
-					this.$set(this.info, "patrolRecordVOList", children)
+					this.$set(this.info, "taskPlaceRecordVOList", children)
 				})
 				for (let i = 0; i < lists.length; i++) {
 					const result = await this.uploadFilePromise(lists[i].url)
@@ -260,16 +262,16 @@
 						url: result.data.link,
 						name: result.data.name
 					}))
-					this.$set(this.info, "patrolRecordVOList", children)
+					this.$set(this.info, "taskPlaceRecordVOList", children)
 					fileListLen++
 				}
 				this.loadingClose()
 			},
 
 			deleteImages(event, index) {
-				let children = this.info.patrolRecordVOList;
+				let children = this.info.taskPlaceRecordVOList;
 				children[index].urls.splice(event.index, 1);
-				this.$set(this.info, "patrolRecordVOList", children)
+				this.$set(this.info, "taskPlaceRecordVOList", children)
 			},
 
 			setImages(key) {
@@ -297,7 +299,7 @@
 					title: "加载中..."
 				})
 				let data = this.info;
-				for (let i of data.patrolRecordVOList) {
+				for (let i of data.taskPlaceRecordVOList) {
 					if (i.urls) {
 						i.rectificationImageUrls = this.setImages(i.urls)
 					}
@@ -325,7 +327,7 @@
 				uni.showLoading({
 					title: "加载中..."
 				})
-				auditPlaceCheckReform({
+				auditPlaceCheck({
 					id: this.info.id,
 					taskId: this.info.taskId,
 					status: val.type,
@@ -340,7 +342,14 @@
 						}, 300)
 					}
 				})
-			}
+			},
+
+			navTo() {
+				uni.navigateTo({
+					url: "/subPackage/label/check"
+				})
+			},
+
 		}
 	}
 </script>

--
Gitblit v1.9.3