From 5b02887478e754f2c1db43344c747cfc040117a8 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 24 Apr 2024 17:37:42 +0800
Subject: [PATCH] 更新

---
 subPackage/school/securityRecord.vue           |  106 +++++
 pages/home/index.vue                           |    2 
 pages.json                                     |   10 
 subPackage/school/securityList.vue             |  340 ++++++++++++++++++
 subPackage/school/security.vue                 |  109 ++++-
 subPackage/school/securityDetail.vue           |  440 ++++++++++++++++++++++++
 subPackage/workbench/views/selfCheckDetail.vue |   47 ++
 subPackage/workbench/views/audit.vue           |   15 
 8 files changed, 1,023 insertions(+), 46 deletions(-)

diff --git a/pages.json b/pages.json
index 74aa370..afceec8 100644
--- a/pages.json
+++ b/pages.json
@@ -1285,7 +1285,17 @@
 						"navigationBarTextStyle": "black",
 						"enablePullDownRefresh": false
 					}
+				},
+				{
+					"path": "securityRecord",
+					"style": {
+						"navigationBarTitleText": "校园安保检查记录",
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black",
+						"enablePullDownRefresh": false
+					}
 				}
+
 			]
 		}
 	],
diff --git a/pages/home/index.vue b/pages/home/index.vue
index b71bb14..f50aab0 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -239,7 +239,7 @@
 											<text class="nav-item-text f-26  mt-10">纠纷矛盾排查</text>
 										</view>
 									</u-grid-item>
-									<u-grid-item @click="navigatorPage('/subPackage/school/security')">
+									<u-grid-item @click="navigatorPage('/subPackage/school/securityRecord')">
 										<view class="nav-item flex f-d-c a-i-c">
 											<u-icon name="/static/icon/nav-29.png" width="80rpx"
 												height="80rpx"></u-icon>
diff --git a/subPackage/school/security.vue b/subPackage/school/security.vue
index 9652348..4355728 100644
--- a/subPackage/school/security.vue
+++ b/subPackage/school/security.vue
@@ -1,5 +1,14 @@
 <template>
 	<view class="wrap">
+
+		<!-- <view class="info-row flex j-c-s-b a-i-c" @click="isShowPopup = true">
+			<text class="f-28">场所名称</text>
+			<view class="flex">
+				<text class="mr-10">{{selectedPlace.placeName}}</text>
+				<u-icon name="arrow-right"></u-icon>
+			</view>
+		</view> -->
+
 		<view class="section mb-20">
 			<u-collapse :value="itemIndex" ref="collapse">
 				<u-collapse-item :title="item.title" :name="index" v-for="(item,index)  in questionList">
@@ -21,7 +30,7 @@
 								</view>
 							</u-form-item>
 							<view class="" v-if="i.state == 0">
-								<u-form-item labelWidth="100" label="隐患照片" prop="gateStatus">
+								<u-form-item labelWidth="100" label="照片" prop="gateStatus">
 									<u-upload :fileList="i.urls" :previewFullImage="uploadConfig.previewFullImage"
 										:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
 										:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
@@ -33,8 +42,8 @@
 										</view>
 									</u-upload>
 								</u-form-item>
-								<u-form-item labelWidth="100" label="隐患描述" prop="gateStatus">
-									<u-textarea v-model="i.remark" placeholder="请输入隐患描述"
+								<u-form-item labelWidth="100" label="描述" prop="gateStatus">
+									<u-textarea v-model="i.remark" placeholder="请输入描述"
 										placeholderClass="c-99 f-26"></u-textarea>
 								</u-form-item>
 							</view>
@@ -44,12 +53,18 @@
 			</u-collapse>
 		</view>
 
-		<view class="content bgc-ff">
+		<view class="content bgc-ff" v-if="dangerCount > 0">
 			<view class="upload ">
-				<view class="f-28 mb-20">其它隐患问题</view>
-				<u-textarea v-model="info.remark" placeholder="请输入内容" placeholderClass="c-99 f-26"></u-textarea>
+				<!-- <view class="f-28 mb-20">其它隐患问题</view> -->
+				<view class="flex j-c-s-b a-i-c" @click="showSelectDate = true">
+					<view class="f-28">整改截止时间</view>
+					<view class="flex a-i-c">
+						<text class="mr-10">{{info.rectificationEndTime}}</text>
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
 				<view class="mt-20">
-					<view class="f-28 mb-20">图片</view>
+					<view class="f-28 mb-20">整改文件</view>
 					<u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
 						:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
 						:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
@@ -60,24 +75,50 @@
 					</u-upload>
 				</view>
 			</view>
-
-
 		</view>
 
 		<!-- <footer-btn @click="sumitInfo"></footer-btn> -->
 
 
 		<button class="submit-btn" @click="sumitInfo">提交</button>
-		<button class="list-btn mb-20" @click="navTo">我上报的事件</button>
+		<button class="list-btn mb-20" @click="navTo">提交记录</button>
 
 
-		<u-popup mode="bottom" :show="showSignature" round="10" :closeable="true" @close="showSignature=false">
-			<view class="signture-popup">
-				<jushi-signature :settings="signatureSettings" @change="signatureChange"></jushi-signature>
+
+
+		<u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="time" mode="datetime"
+			:formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
+
+
+		<view class="blank"></view>
+
+
+
+
+		<u-popup :show="isShowPopup" mode="bottom" :round="10" closeable="true" @close="isShowPopup = false">
+			<view class="popup-content">
+				<view class="popup-title f-30">选择场所</view>
+				<u-search placeholder="请输入场所名称" :showAction="true" actionText="搜索" :animation="true" v-model="placeName"
+					@search="searchPlace" @custom="searchPlace" @clear="clearKeyword"></u-search>
+				<scroll-view class="popup-list" :scroll-y="true">
+					<view class="popup-list-item" v-for="(i,k) in placeList" :key="k" @click="selectPlace(i)">
+						<view class="flex a-i-c mb-10">
+							<text class="f-28 fw mr-20">{{i.placeName}}</text>
+							<text class="f-26" v-if="i.phoneNumber">{{i.phoneNumber}}</text>
+						</view>
+						<!-- 
+						<view class="f-28">
+							{{i.townStreetName}}{{i.neiName}}{{i.aoiName}}{{i.address || ""}}
+						</view> -->
+						<view class="check-icon" v-if="i.houseCode == info.houseCode">
+							<u-icon name="checkbox-mark" color="#017BFC" size="30"></u-icon>
+						</view>
+					</view>
+				</scroll-view>
 			</view>
 		</u-popup>
 
-		<view class="blank"></view>
+
 	</view>
 </template>
 
@@ -104,7 +145,7 @@
 				info: {
 					remark: "",
 					imageUrls: "",
-					signaturePath: ""
+					houseCode: ""
 				},
 
 				desc: "",
@@ -143,7 +184,9 @@
 				time: Number(new Date()),
 				showSelectDate: false,
 				dangerCount: 0, //隐患项数量
-				isEdit: false
+				isEdit: false,
+				isShowPopup: false,
+				selectedPlace: {}
 
 			}
 		},
@@ -153,11 +196,14 @@
 				this.isEdit = true;
 				this.getDetail(option.taskId)
 			} else {
-				this.info.houseCode = uni.getStorageSync("siteInfo").houseCode;
-				this.info.placeName = uni.getStorageSync("siteInfo").name;
+				this.info.houseCode = "d8460d16ec5a40ccbfe64ba65d34159c7427";
+				this.info.placeName = "塔水小学"
+				// this.info.houseCode = uni.getStorageSync("siteInfo").houseCode;
+				// this.info.placeName = uni.getStorageSync("siteInfo").name;
 			}
-
-
+			// if (option.houseCode) {
+			// 	this.info.houseCode = option.houseCode;
+			// }
 
 		},
 
@@ -199,7 +245,7 @@
 
 			getItem() {
 				getPlaceCheckItem({
-					childType: 3,
+					childType: 9,
 					type: 3
 				}).then(res => {
 					let data = res.data;
@@ -248,7 +294,8 @@
 								itemId: this.questionList[i].children[k].id,
 								state: this.questionList[i].children[k].state,
 								imageUrls: this.setImages(this.questionList[i].children[k].urls),
-								remark: this.questionList[i].children[k].remark || ""
+								remark: this.questionList[i].children[k].remark || "",
+								type: 3
 							})
 							if (this.questionList[i].children[k].state == 0) {
 								count += 1;
@@ -364,10 +411,11 @@
 					this.form.images.forEach(e => {
 						urls.push(e.name)
 					})
-					this.info.imageUrls = urls.join(",")
+					this.info.rectificationNoticeImgUrl = urls.join(",")
 				}
 				this.info.taskPlaceRecordVOList = this.getSelected()
 				this.info.status = 1;
+				this.info.type = 2;
 				if (this.isEdit) {
 					auditPlaceCheck(this.info).then(res => {
 						uni.hideLoading();
@@ -397,7 +445,6 @@
 				}
 			},
 
-
 			previewImg() {
 				uni.previewImage({
 					urls: [this.signatureUrl],
@@ -405,14 +452,16 @@
 				})
 			},
 
-			navTo() {
-				uni.navigateTo({
-					url: 'checkList'
-				})
+			confirmDate(e) {
+				this.showSelectDate = false;
+				this.info.rectificationEndTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
 			},
 
-
-
+			navTo() {
+				uni.navigateTo({
+					url: 'securityRecord'
+				})
+			},
 
 		}
 	}
diff --git a/subPackage/school/securityDetail.vue b/subPackage/school/securityDetail.vue
new file mode 100644
index 0000000..f11fce2
--- /dev/null
+++ b/subPackage/school/securityDetail.vue
@@ -0,0 +1,440 @@
+<template>
+	<view class="">
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>场所名称</text>
+			<text class="item-content">{{info.placeName}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>标签</text>
+			<text>{{label || "未完善"}}</text>
+		</view>
+		<!-- <view class="item-row flex j-c-s-b a-i-c">
+			<text>场所负责人</text>
+			<text>{{info.principal || "未完善"}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>场所负责人电话</text>
+			<text>{{info.principalPhone || "未完善"}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>检查人</text>
+			<text>{{info.name}}</text>
+		</view> -->
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>检查时间</text>
+			<text>{{info.createTime}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>地址</text>
+			<text class="item-content">{{info.location}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c" v-if="info.rectificationNoticeFlag == 2">
+			<text>下发整改通知</text>
+			<text class="item-content">是</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c" v-if="info.punishFlag == 2">
+			<text>是否处罚</text>
+			<text class="item-content">是</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c" v-if="info.punishRemark">
+			<text>处罚说明</text>
+			<text class="item-content">{{info.punishRemark}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c" v-if="info.rectificationEndTime">
+			<text>整改截至时间</text>
+			<text class="item-content">{{info.rectificationEndTime}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c" v-if="info.remark">
+			<text>其它隐患问题</text>
+			<text class="item-content">{{info.remark}}</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c">
+			<text>状态</text>
+			<text v-if="info.status == 1">待审核</text>
+			<text v-if="info.status == 2">审核成功</text>
+			<text v-if="info.status == 3">审核驳回</text>
+			<text v-if="info.status == 4">待完成</text>
+		</view>
+		<view class="item-row flex j-c-s-b a-i-c" v-if="info.status == 3 && info.reasonFailure">
+			<text>驳回原因</text>
+			<text class="item-content">{{info.reasonFailure}}</text>
+		</view>
+
+		<view class="image-wrap bgc-ff" v-if="images.length">
+			<view class="mb-20">
+				图片
+			</view>
+			<view class="flex flex-wrap">
+				<view class="image-item" v-for="(i,k) in images" @click="previewImage(images,i)">
+					<u-image :src="i" width="100rpx" height="100rpx"></u-image>
+				</view>
+			</view>
+		</view>
+
+		<view class="image-wrap bgc-ff" v-if="signatureUrl.length">
+			<view class="mb-20">
+				签名
+			</view>
+			<view class="image-item" v-for="(i,k) in signatureUrl" @click="previewImage(signatureUrl,i)">
+				<u-image :src="i" width="100rpx" height="100rpx"></u-image>
+			</view>
+		</view>
+
+
+
+		<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.taskPlaceRecordVOList">
+						<view class="item-row flex j-c-s-b a-i-c" v-if="i.id == n.itemId && n.state == 0">
+							<text class="item-left fw">{{item.title}}</text>
+							<!-- <text>不存在</text> -->
+						</view>
+						<u-collapse :value="ids" v-if="i.id == n.itemId && n.state == 0" ref="collapse">
+							<u-collapse-item :name="n.itemId" :title="i.title" value="存在" :disabled="true"
+								:clickable="false" :isLink="false">
+								<view class="mb-20" v-if="n.imageUrls">
+									<view class="f-26 mb-10 c-00">隐患照片</view>
+									<view class="flex flex-wrap">
+										<view class="mr-20" v-for="r in ($setImageUrl(n.imageUrls))">
+											<u-image :src="r" width="140rpx" height="140rpx"
+												@click="previewImage($setImageUrl(n.imageUrls),i)"></u-image>
+										</view>
+									</view>
+								</view>
+
+								<view class="mb-20" v-if="n.remark">
+									<view class="f-26 mb-10 c-00">隐患描述</view>
+									<view class="f-28 c-00">
+										{{n.remark}}
+									</view>
+								</view>
+
+								<!-- <view class="mb-20" v-if="roleType == 2 || (roleType == 1 && n.rectificationImageUrls)">
+									<view class="f-26 mb-10 c-00">整改后照片</view>
+									<u-upload v-if="roleType == 2 && (info.status == 4 || info.status == 3)"
+										:fileList="n.urls" :previewFullImage="uploadConfig.previewFullImage"
+										:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+										:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
+										@afterRead="afterReadImgs($event,n,m)" @delete="deleteImages($event,m)">
+										<view class="upload-item upload-icon flex_base">
+											<u-icon name="/static/icon/upload.png" width="60rpx"
+												height="60rpx"></u-icon>
+										</view>
+									</u-upload>
+
+
+									<view class="flex flex-wrap" v-if="info.status != 4 &&  n.rectificationImageUrls ">
+										<view class="mr-20" v-for="r in ($setImageUrl(n.rectificationImageUrls))">
+											<u-image :src="r" width="140rpx" height="140rpx"
+												@click="previewImage($setImageUrl(n.rectificationImageUrls),i)"></u-image>
+										</view>
+									</view>
+								</view> -->
+
+								<!-- 	<view class="" v-if="roleType == 2 || (roleType == 1 && n.rectificationRemark)">
+									<view class="f-26 mb-10 c-00">整改后描述</view>
+									<u-textarea v-model="n.rectificationRemark" placeholder="请输入整改后描述"
+										placeholderClass="c-99 f-26"
+										:disabled="roleType == 2 && (info.status == 4 || info.status == 3)?false:true"></u-textarea>
+								</view> -->
+
+
+
+							</u-collapse-item>
+						</u-collapse>
+					</block>
+				</block>
+			</block>
+		</view>
+
+		<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>
+
+<script>
+	import uploadMixin from "@/mixin/uploadMixinPlace";
+	import {
+		getPlaceCheckItem,
+		getPlaceCheckReformDetail,
+		addPlaceCheckReform,
+		auditPlaceCheckReform
+	} from '@/api/place/place.js'
+
+	import {
+		getPlaceCheckDetail,
+		auditPlaceCheck
+	} from '@/api/reporting/reporting.js'
+
+	import auditAction from '../components/actionBtn.vue'
+	export default {
+		mixins: [uploadMixin],
+		components: {
+			auditAction
+		},
+		data() {
+			return {
+				info: {},
+				images: [],
+				signatureUrl: [],
+				label: "",
+				itemList: [],
+				roleType: '', //1.民警/系统管理员   2.场所负责人
+				ids: [],
+				taskId: ""
+			}
+		},
+		async onLoad(option) {
+			let {
+				roleName
+			} = uni.getStorageSync("activeRole")
+			if (roleName == "居民") {
+				this.roleType = 2;
+			}
+			if (roleName == "民警" || roleName == "系统管理员") {
+				this.roleType = 1;
+			}
+
+			await this.getItem();
+			this.taskId = option.id;
+		},
+
+
+		onShow() {
+			setTimeout(() => {
+				this.getDetail();
+			}, 100)
+		},
+
+		methods: {
+
+			getDetail(id) {
+				getPlaceCheckDetail({
+					taskId: this.taskId
+				}).then(res => {
+					let data = res.data;
+					// this.info = res.data;
+					this.images = this.$setImageUrl(res.data.imageUrls);
+					this.signatureUrl = this.$setImageUrl(res.data.signaturePath);
+					if (res.data.placePoiLabelVOList.length) {
+						this.label = res.data.placePoiLabelVOList[res.data.placePoiLabelVOList.length - 1]
+							.labelName;
+					}
+					let ids = [];
+					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);
+							} else {
+								i.urls = [];
+							}
+						}
+						if (i.state == 0) {
+							ids.push(i.itemId)
+						}
+					}
+					this.ids = ids;
+					this.info = data;
+				})
+			},
+
+			getItem() {
+				let data = {
+					childType: 1,
+					type: 1
+				}
+				if (this.type == 2) {
+					data.childType = 9;
+					data.type = 3;
+				}
+				getPlaceCheckItem(data).then(res => {
+					if (res.code == 200) {
+						this.itemList = res.data;
+					}
+				})
+			},
+
+			async afterReadImgs(event, item, fIndex) {
+				uni.showLoading({
+					title: "上传中..."
+				})
+				let children = this.info.taskPlaceRecordVOList;
+				let lists = [].concat(event.file)
+				let fileListLen = item.urls.length;
+				lists.map((item) => {
+					children[fIndex].urls.push({
+						...item,
+						status: 'uploading',
+						message: '上传中'
+					})
+					this.$set(this.info, "taskPlaceRecordVOList", children)
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					children[fIndex].urls.splice(fileListLen, 1, Object.assign({}, {
+						url: result.data.link,
+						name: result.data.name
+					}))
+					this.$set(this.info, "taskPlaceRecordVOList", children)
+					fileListLen++
+				}
+				this.loadingClose()
+			},
+
+			deleteImages(event, index) {
+				let children = this.info.taskPlaceRecordVOList;
+				children[index].urls.splice(event.index, 1);
+				this.$set(this.info, "taskPlaceRecordVOList", children)
+			},
+
+			setImages(key) {
+				if (!key) {
+					return ""
+				} else {
+					let urls = [];
+					for (let i of key) {
+						urls.push(i.name);
+					}
+					return urls.join(",")
+				}
+			},
+
+			previewImage(urls, current) {
+				uni.previewImage({
+					urls,
+					current
+				})
+			},
+
+			//整改提交
+			submitInfo() {
+				uni.showLoading({
+					title: "加载中..."
+				})
+				let data = this.info;
+				for (let i of data.taskPlaceRecordVOList) {
+					if (i.urls) {
+						i.rectificationImageUrls = this.setImages(i.urls)
+					}
+					delete i.urls;
+				}
+				if (data.status == 3) {
+					data.status = 1;
+				}
+				if (data.status == 4) {
+					data.status = 1;
+				}
+				data.type = 2;
+				addPlaceCheckReform(data).then(res => {
+					uni.hideLoading()
+					if (res.code == 200) {
+						this.$showTips("操作成功", "success");
+						setTimeout(() => {
+							uni.navigateBack()
+						}, 300)
+					}
+				})
+			},
+
+			//审核
+			submitAudit(val) {
+				uni.showLoading({
+					title: "加载中..."
+				})
+				auditPlaceCheck({
+					id: this.info.id,
+					taskId: this.info.taskId,
+					status: val.type,
+					rectificationFlag: val.type == 3 ? 1 : 2,
+					reasonFailure: val.remark,
+					type: 2
+				}).then(res => {
+					uni.hideLoading()
+					if (res.code == 200) {
+						this.$showTips("操作成功", "success");
+						setTimeout(() => {
+							uni.navigateBack()
+						}, 300)
+					}
+				})
+			},
+
+			navTo() {
+				uni.navigateTo({
+					url: `/subPackage/label/check?taskId=${this.info.taskId}`
+				})
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #f5f5f5;
+	}
+
+	.item-row {
+		width: 100%;
+		padding: 30rpx;
+		box-sizing: border-box;
+		border-bottom: 1px solid #f5f5f5;
+		font-size: 28rpx;
+		background-color: #fff;
+
+		.item-content {
+			width: 70%;
+			text-align: right;
+		}
+
+		.item-left {
+			width: 70%;
+		}
+	}
+
+	.image-wrap {
+		margin-top: 20rpx;
+		padding: 20rpx;
+
+		.image-item {
+			margin-right: 20rpx;
+		}
+	}
+
+	/deep/.u-cell__title-text {
+		color: #000 !important;
+		width: 70%;
+		font-size: 28rpx !important;
+	}
+
+	/deep/ .u-cell__value {
+		color: #000 !important;
+		font-size: 28rpx !important;
+	}
+
+	.mr-20 {
+		margin-right: 20rpx;
+	}
+
+	.upload-item {
+		width: 140rpx;
+		height: 140rpx;
+		border: 1px solid #EEEEEE;
+	}
+
+	.blank {
+		width: 100%;
+		height: 140rpx;
+	}
+
+	.c-00 {
+		color: #000;
+	}
+
+	/deep/ .u-collapse-item .u-collapse-item__content {
+		height: auto !important;
+	}
+</style>
\ No newline at end of file
diff --git a/subPackage/school/securityList.vue b/subPackage/school/securityList.vue
new file mode 100644
index 0000000..30d4ae5
--- /dev/null
+++ b/subPackage/school/securityList.vue
@@ -0,0 +1,340 @@
+<template>
+	<view>
+		<u-sticky>
+			<view class="bgc-ff">
+				<view class="tab">
+					<u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
+						:activeStyle="{color:'#017BFC'}">
+					</u-tabs>
+					<view class="search flex j-c-s-b a-i-c">
+						<view class="tab-filter flex j-c-c a-i-c" @click="showDateModal">
+							<text class="f-28">时间筛选</text>
+							<u-icon name="arrow-down"></u-icon>
+						</view>
+						<u-search placeholder="请输入需要查询信息的名称" v-model="keyword" :clearabled="true" :showAction="true"
+							:animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
+					</view>
+				</view>
+			</view>
+		</u-sticky>
+
+		<view class="list">
+			<view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k"
+				@click="navTo(i.id,i.reportType,i.status,i.type)">
+				<view class="item-title flex a-i-c j-c-s-b mb-20">
+					<text class="f-32 fw">{{i.name}}</text>
+					<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>
+					<text class="f-28 c-66">{{i.createTime}}</text>
+				</view>
+				<view class="item-row flex a-i-c j-c-s-b">
+					<text class="f-28">地址</text>
+					<text class="address f-28 c-66">{{i.addressName || ""}}</text>
+				</view>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+		<u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+
+		<date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+	</view>
+</template>
+
+<script>
+	import {
+		getPlaceCheckList
+	} from "@/api/reporting/reporting"
+	import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+	export default {
+		components: {
+			dateRangeModal
+		},
+		data() {
+			return {
+				tabList: [
+
+					{
+						name: "全部",
+						status: "",
+					},
+					{
+						name: "待完成",
+						status: 4,
+					},
+					{
+						name: "待审核",
+						status: 1
+					},
+					{
+						name: "审核通过",
+						status: 2
+					},
+					{
+						name: "已拒绝",
+						status: 3
+					}
+				],
+				tabIndex: 0,
+				currentStatus: "",
+				list: [],
+				loadingStatus: 'nomore',
+				currentPage: 1,
+				frequency: '',
+				reportType: "",
+				selectDate: [],
+				houseCode: "",
+				keyword: ""
+			}
+		},
+
+		onLoad(option) {
+			console.log(option);
+			if (option.reportType) {
+				this.reportType = option.reportType;
+				if (option.from == "task") {
+					this.tabIndex = 2;
+					this.currentStatus = 1;
+				}
+				if (option.reportType == 1) {
+					uni.setNavigationBarTitle({
+						title: "取保监居"
+					})
+				} else if (option.reportType == 7) {
+					uni.setNavigationBarTitle({
+						title: "消防自查"
+					})
+				} else if (option.reportType == 5) {
+					uni.setNavigationBarTitle({
+						title: "二手交易"
+					})
+					// 去掉已完成状态
+					this.tabList.splice(1, 1);
+					this.tabIndex = 1;
+				}
+			}
+
+			if (option.from == "index") {
+				uni.setNavigationBarTitle({
+					title: "场所任务"
+				})
+			}
+
+			if (option.code) {
+				this.houseCode = option.code;
+			}
+			// this.getList()
+		},
+
+		onShow() {
+			this.resetParams();
+			this.getList()
+		},
+
+		onReachBottom() {
+			this.currentPage++
+			this.getList()
+		},
+
+		methods: {
+			searchConfirm() {
+				this.resetParams()
+				this.getList()
+			},
+			clearConfirm() {
+				this.keyword = ''
+				this.searchConfirm()
+			},
+			changeTab(e) {
+				this.tabIndex = e.index;
+				this.currentStatus = e.status;
+				this.resetParams();
+				this.getList();
+			},
+			resetParams() {
+				this.list = [];
+				this.currentPage = 1;
+			},
+			getList() {
+				this.$nextTick(() => {
+					this.loadingStatus = 'loadingmore'
+					this.$refs.uToast.show({
+						type: 'loading',
+						message: '正在加载',
+						duration: 9999999
+					})
+				})
+				let params = {
+					size: 10,
+					current: this.currentPage,
+					status: this.currentStatus,
+					userId: uni.getStorageSync("userInfo").user_id,
+					houseCode: uni.getStorageSync("curHouseCode"),
+					type: 2
+				}
+				if (this.selectDate.length) {
+					params.startTime = this.selectDate[0]
+					params.endTime = this.selectDate[1]
+				}
+				if (this.houseCode) {
+					params.houseCode = this.houseCode;
+				}
+
+				if (this.reportType) {
+					params.reportType = this.reportType
+				}
+				if (this.keyword) {
+					params.name = this.keyword;
+				}
+
+				getAuditReportingList(params).then(res => {
+					if (res.code != 200) {
+						uni.showToast({
+							title: '数据请求失败',
+							icon: 'error'
+						})
+						return
+					}
+					let records = res.data.records;
+					this.list = [...this.list, ...records]
+					this.$nextTick(() => {
+						this.$refs.uToast.isShow = false
+					})
+					this.loadingStatus = 'nomore'
+				})
+			},
+			navTo(id, reportType, status, type) {
+
+				this.$u.func.globalNavigator(`securityDetail?id=${id}`)
+
+				return;
+				if (status == 4) {
+					if (reportType == 8) {
+						this.navToDetail(reportType, id, type)
+					} else {
+						if (uni.getStorageSync("activeRole").roleName == "民警") {
+							this.navToDetail(reportType, id, type)
+						} else {
+							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) {
+					this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
+				} else if (reportType == 5) {
+					this.$u.func.globalNavigator(`/subPackage/label/form?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 == 7) {
+					this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+				} else if (reportType == 5) {
+					this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+				} else {
+					this.$u.func.globalNavigator(`checkReform?id=${id}`)
+				}
+
+
+			},
+
+			showDateModal() {
+				this.$refs.dateRane.open();
+			},
+
+			handleRestDate() {
+				this.selectDate = [];
+				this.resetParams();
+				this.getList()
+			},
+			handleComfirmDate(val) {
+				this.selectDate = val;
+				this.resetParams();
+				this.getList()
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F5F5F5;
+	}
+
+
+
+	.tab {
+		// width: 100%;
+
+	}
+
+	.search {
+		padding: 20rpx 20rpx;
+	}
+
+	// .tab /deep/.u-tabs__wrapper__nav__item {
+	// 	flex: 1;
+	// }
+	.tab-filter {
+		padding: 0 20rpx;
+	}
+
+	.list {
+		margin: 20rpx 30rpx 0;
+	}
+
+	.list-item {
+		padding: 0 30rpx 20rpx;
+		border-radius: 8rpx;
+
+		.item-title {
+			padding: 30rpx 0;
+			border-bottom: 1px solid #F5F5F5;
+		}
+
+		.item-row {
+			padding: 10rpx 0;
+
+			.address {
+				width: 65%;
+				text-align: right;
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/subPackage/school/securityRecord.vue b/subPackage/school/securityRecord.vue
new file mode 100644
index 0000000..9e9ab6f
--- /dev/null
+++ b/subPackage/school/securityRecord.vue
@@ -0,0 +1,106 @@
+<template>
+	<view class="">
+		<view class="list">
+			<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">校园安保检查</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.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>
+					<text class="f-28 c-66">{{i.createTime}}</text>
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+	</view>
+</template>
+
+<script>
+	import {
+		getPlaceCheckList
+	} from "@/api/reporting/reporting.js"
+	export default {
+		data() {
+			return {
+				list: [],
+				currentPage: 1,
+				loadingStatus: 'nomore',
+			}
+		},
+
+		onLoad(option) {
+			this.getList(option.type)
+		},
+		onReachBottom() {
+			this.currentPage++
+			this.getList()
+		},
+
+		methods: {
+			getList() {
+				let data = {
+					current: this.currentPage,
+					houseCode: uni.getStorageSync("siteInfo").houseCode,
+					size: 10,
+					type: 2
+				}
+
+				if (uni.getStorageSync("activeRole").roleAlias == "mj") {
+					data.createUser = uni.getStorageSync("userInfo").user_id
+				}
+
+				getPlaceCheckList(data).then(res => {
+					if (res.code != 200) {
+						uni.showToast({
+							title: '数据请求失败',
+							icon: 'error'
+						})
+						return
+					}
+					let records = res.data.records;
+					this.list = [...this.list, ...records]
+					this.loadingStatus = 'nomore'
+				})
+			},
+			navTo(id) {
+				uni.navigateTo({
+					url: `/subPackage/workbench/views/selfCheckDetail?id=${id}&type=2`
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F5F5F5;
+	}
+
+	.list {
+		margin: 20rpx 30rpx 0;
+	}
+
+	.list-item {
+		padding: 0 30rpx 20rpx;
+		border-radius: 8rpx;
+
+		.item-title {
+			padding: 30rpx 0;
+			border-bottom: 1px solid #F5F5F5;
+		}
+
+		.item-row {
+			padding: 10rpx 0;
+
+			.address {
+				width: 65%;
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/audit.vue b/subPackage/workbench/views/audit.vue
index 635b38f..44cffce 100644
--- a/subPackage/workbench/views/audit.vue
+++ b/subPackage/workbench/views/audit.vue
@@ -108,6 +108,10 @@
 					uni.setNavigationBarTitle({
 						title: "消防自查"
 					})
+				} else if (option.reportType == 4) {
+					uni.setNavigationBarTitle({
+						title: "校园安保检查"
+					})
 				} else if (option.reportType == 5) {
 					uni.setNavigationBarTitle({
 						title: "二手交易"
@@ -256,15 +260,18 @@
 
 				if (reportType == 1) {
 					this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
-				} else if (reportType == 7) {
-					this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+				} else if (reportType == 7 || reportType == 4) {
+					if (reportType == 4) {
+						this.$u.func.globalNavigator(`selfCheckDetail?id=${id}&type=2`)
+					} else {
+						this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+					}
+
 				} else if (reportType == 5) {
 					this.$u.func.globalNavigator(`labelReportDetail?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 758d721..35cc540 100644
--- a/subPackage/workbench/views/selfCheckDetail.vue
+++ b/subPackage/workbench/views/selfCheckDetail.vue
@@ -151,7 +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" />
+		<footer-btn v-if="roleType == 2 && info.status == 3 " text="重新提交" @click="navTo" />
 	</view>
 </template>
 
@@ -182,20 +182,28 @@
 				signatureUrl: [],
 				label: "",
 				itemList: [],
-				roleType: '', //1.民警/系统管理员   2.场所负责人
+				roleType: '', //1.民警/系统管理员   2.场所负责人 / 学校主体
 				ids: [],
-				taskId: ""
+				taskId: "",
+				type: 1 // 2学校主体
 			}
 		},
 		async onLoad(option) {
 			let {
-				roleName
+				roleName,
+				roleAlias
 			} = uni.getStorageSync("activeRole")
 			if (roleName == "居民") {
 				this.roleType = 2;
-			}
-			if (roleName == "民警" || roleName == "系统管理员") {
+			} else if (roleName == "民警" || roleName == "系统管理员") {
 				this.roleType = 1;
+			} else if (roleAlias == "xyzt") {
+				this.roleType = 2;
+			}
+
+
+			if (option.type) {
+				this.type = option.type;
 			}
 
 			await this.getItem();
@@ -216,6 +224,11 @@
 					taskId: this.taskId
 				}).then(res => {
 					let data = res.data;
+					if (data.type == 2) {
+						uni.setNavigationBarTitle({
+							title: "校园安保检查"
+						})
+					}
 					// this.info = res.data;
 					this.images = this.$setImageUrl(res.data.imageUrls);
 					this.signatureUrl = this.$setImageUrl(res.data.signaturePath);
@@ -242,10 +255,15 @@
 			},
 
 			getItem() {
-				getPlaceCheckItem({
+				let data = {
 					childType: 1,
 					type: 1
-				}).then(res => {
+				}
+				if (this.type == 2) {
+					data.childType = 9;
+					data.type = 3;
+				}
+				getPlaceCheckItem(data).then(res => {
 					if (res.code == 200) {
 						this.itemList = res.data;
 					}
@@ -356,9 +374,16 @@
 			},
 
 			navTo() {
-				uni.navigateTo({
-					url: `/subPackage/label/check?taskId=${this.info.taskId}`
-				})
+				if (this.type == 1) {
+					uni.navigateTo({
+						url: `/subPackage/label/check?taskId=${this.info.taskId}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/subPackage/school/security?taskId=${this.info.taskId}`
+					})
+				}
+
 			},
 
 		}

--
Gitblit v1.9.3