From 412bc13ca1f70600eb0fb1e0f7c78785332d2c26 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Thu, 18 Jan 2024 11:29:03 +0800
Subject: [PATCH] 更新

---
 pages.json                                |   18 +
 subPackage/workbench/views/reportList.vue |  267 ++++++++++++++++++++++++++
 subPackage/house/houseNumber/index.vue    |    4 
 subPackage/bs/views/repair.vue            |    4 
 subPackage/workbench/views/auditList.vue  |  289 ++++++++++++++++++++++++++++
 5 files changed, 579 insertions(+), 3 deletions(-)

diff --git a/pages.json b/pages.json
index 245f622..5ba5ecf 100644
--- a/pages.json
+++ b/pages.json
@@ -411,6 +411,15 @@
 					}
 				},
 				{
+					"path": "views/auditList",
+					"style": {
+						"navigationBarTitleText": "标签事件",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				},
+				{
 					"path": "views/cshw",
 					"style": {
 						"onReachBottomDistance": 10,
@@ -448,6 +457,15 @@
 					}
 				},
 				{
+					"path": "views/reportList",
+					"style": {
+						"navigationBarTitleText": "报修报事",
+						"enablePullDownRefresh": false,
+						"navigationBarBackgroundColor": "#fff",
+						"navigationBarTextStyle": "black"
+					}
+				},
+				{
 					"path": "views/reportAudit",
 					"style": {
 						"navigationBarTitleText": "报事报修处理",
diff --git a/subPackage/bs/views/repair.vue b/subPackage/bs/views/repair.vue
index 019062f..f2556f0 100644
--- a/subPackage/bs/views/repair.vue
+++ b/subPackage/bs/views/repair.vue
@@ -155,7 +155,9 @@
 			},
 
 			getStatistics() {
-				getStatistics().then(res => {
+				getStatistics({
+					houseCode: uni.getStorageSync("siteInfo").houseCode
+				}).then(res => {
 					this.statistic = res.data
 				})
 			},
diff --git a/subPackage/house/houseNumber/index.vue b/subPackage/house/houseNumber/index.vue
index cf67b3f..7f0d401 100644
--- a/subPackage/house/houseNumber/index.vue
+++ b/subPackage/house/houseNumber/index.vue
@@ -374,9 +374,9 @@
 
 			navTo(type) {
 				if (type == 1) {
-					this.$u.func.globalNavigator(`/subPackage/workbench/views/report?code=${this.stdId}`)
+					this.$u.func.globalNavigator(`/subPackage/workbench/views/reportList?code=${this.stdId}`)
 				} else {
-					this.$u.func.globalNavigator(`/subPackage/workbench/views/audit?code=${this.stdId}`)
+					this.$u.func.globalNavigator(`/subPackage/workbench/views/auditList?code=${this.stdId}`)
 				}
 			}
 		},
diff --git a/subPackage/workbench/views/auditList.vue b/subPackage/workbench/views/auditList.vue
new file mode 100644
index 0000000..369be1a
--- /dev/null
+++ b/subPackage/workbench/views/auditList.vue
@@ -0,0 +1,289 @@
+<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)">
+				<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 {
+		getAuditReportingList
+	} 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: 2,
+				list: [],
+				loadingStatus: 'nomore',
+				currentPage: 1,
+				frequency: '',
+				reportType: "",
+				selectDate: [],
+				houseCode: "",
+				keyword: ""
+			}
+		},
+
+		onLoad(option) {
+			console.log(option);
+			if (option.reportType) {
+				this.reportType = option.reportType;
+				uni.setNavigationBarTitle({
+					title: "取保候审"
+				})
+			}
+			if (option.from == "index") {
+				uni.setNavigationBarTitle({
+					title: "场所任务"
+				})
+			}
+			if (option.from == "task") {
+				this.tabIndex = 1;
+				this.currentStatus = 1;
+			}
+			if (option.code) {
+				this.houseCode = option.code;
+			}
+			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 = {
+					page: this.currentPage,
+					size: 20,
+					status: this.currentStatus,
+					frequency: this.frequency
+				}
+				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, type, status) {
+				if (status == 4) {
+					if (uni.getStorageSync("activeRole").roleName == "民警") {
+						this.navToDetail(type, id)
+					} else {
+						this.navToEdit(type, id);
+					}
+				} else {
+					this.navToDetail(type, id)
+				}
+			},
+
+			navToEdit(type, id) {
+				if (type == 1) {
+					this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+				} else if (type == 2) {
+					this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`)
+				} else if (type == 3 || type == 4 || type == 5) {
+					this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+				} else if (type == 6) {
+					this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`)
+				}
+			},
+
+			navToDetail(type, id) {
+				if (type == 1) {
+					this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+				} else if (type == 2) {
+					this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
+				} else if (type == 3 || type == 4 || type == 5) {
+					this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+				} else if (type == 6) {
+					this.$u.func.globalNavigator(`schoolReportDetail?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/workbench/views/reportList.vue b/subPackage/workbench/views/reportList.vue
new file mode 100644
index 0000000..531e085
--- /dev/null
+++ b/subPackage/workbench/views/reportList.vue
@@ -0,0 +1,267 @@
+<template>
+	<view>
+		<u-sticky>
+			<view class="hander">
+				<view class="tab">
+					<!-- <u-tabs :list="tabList" :scrollable="false" :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="item in reportList" :key="item.id" @click="pushPage(item)">
+				<view class="item-title flex a-i-c j-c-s-b mb-20">
+					<text class="f-32 fw">{{ findObjValue(item.type, typeList, 'type').name }}</text>
+					<u-tag class="u_tag" size="mini" plain plainFill
+						:text="findObjValue(item.confirmFlag, tabList, 'status').name"
+						:type="findObjValue(item.confirmFlag, tabList, 'status').type"></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">{{ item.realName }}</text>
+				</view>
+				<view class="item-row flex a-i-c j-c-s-b">
+					<text class="f-28">手机</text>
+					<text class="f-28 c-66">{{ item.phone }}</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">{{ item.address || "" }}</text>
+				</view>
+				<view class="item-row flex a-i-c j-c-s-b f-28">
+					<text>时间</text>
+					<text class="c-66">{{item.createTime}}</text>
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+		<date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+	</view>
+</template>
+
+<script>
+	import {
+		getPage
+	} from '@/api/task/taskReportForRepairs.js'
+	import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+	export default {
+		components: {
+			dateRangeModal
+		},
+		data() {
+			return {
+				reportList: [],
+				pagingParams: {
+					current: 1,
+					size: 10
+				},
+				tabList: [
+
+					{
+						name: "全部",
+						status: "",
+					},
+					{
+						name: "待处理",
+						status: 1,
+						type: 'warning'
+					},
+					{
+						name: "处理中",
+						status: 2,
+						type: 'success'
+					},
+					{
+						name: "已处理",
+						status: 3,
+						type: 'success'
+					},
+				],
+				typeList: [{
+						name: "公共维修",
+						type: 1
+					},
+					{
+						name: "居家维修",
+						type: 2
+					},
+					{
+						name: "矛盾纠纷",
+						type: 3
+					},
+					{
+						name: "投诉举报",
+						type: 4
+					},
+					{
+						name: "企业商户上报",
+						type: 5
+					}
+				],
+				tabIndex: 0,
+				tabStatus: 3,
+				keyWord: '',
+				loadingStatus: 'nomore',
+				selectDate: [],
+				houseCode: ""
+			}
+		},
+
+		onLoad(option) {
+			if (option.from) {
+				this.tabIndex = 1;
+				this.tabStatus = 1;
+			}
+			if (option.code) {
+				this.houseCode = option.code;
+			}
+		},
+
+		onShow() {
+			this.currentRole = uni.getStorageSync("activeRole")
+			this.reportList = []
+			this.pagingParams.current = 1;
+			this.getPageList()
+		},
+		onReachBottom() {
+			this.pagingParams.current++
+			this.getPageList()
+		},
+		methods: {
+			async getPageList() {
+				this.loadingStatus = 'loadingmore'
+				const params = {
+					realName: this.keyWord,
+					confirmFlag: this.tabStatus
+				}
+				if (this.selectDate.length) {
+					params.startTime = this.selectDate[0]
+					params.endTime = this.selectDate[1]
+				}
+				if (this.houseCode) {
+					params.addressCode = this.houseCode;
+				}
+				const {
+					roleName
+				} = this.currentRole
+				const res = await getPage({
+					...params,
+					roleName,
+					...this.pagingParams
+				})
+				const {
+					code,
+					data: {
+						records
+					}
+				} = res
+				if (code !== 200) {
+					uni.showToast({
+						title: '数据请求失败',
+						icon: 'error'
+					})
+					return
+				}
+				this.reportList = [...this.reportList, ...records]
+				this.loadingStatus = 'nomore'
+			},
+			changeTab(e) {
+				this.tabStatus = e.status;
+				this.resetParams()
+				this.getPageList()
+			},
+			searchConfirm() {
+				this.resetParams()
+				this.getPageList()
+			},
+			clearConfirm() {
+				this.keyWord = ''
+				this.searchConfirm()
+			},
+			resetParams() {
+				this.reportList = []
+				this.pagingParams.current = 1
+			},
+			findObjValue(value, obj, word) {
+				const res = obj.find(item => {
+					return item[word] == value
+				})
+				return res
+			},
+			pushPage(item) {
+				const data = JSON.stringify(item)
+				// this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?id='+id)
+				this.$u.func.globalNavigator('/subPackage/workbench/views/reportAudit?data=' + data)
+			},
+
+			showDateModal() {
+				this.$refs.dateRane.open();
+			},
+
+			handleRestDate() {
+				this.selectDate = [];
+				this.resetParams();
+				this.getPageList()
+			},
+			handleComfirmDate(val) {
+				this.selectDate = val;
+				this.resetParams();
+				this.getPageList()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F5F5F5;
+	}
+
+	.hander {
+		background-color: #fff;
+
+		.tab {
+			width: 100%;
+		}
+
+		.tab-filter {
+			padding: 0 20rpx;
+		}
+
+		.search {
+			padding: 20rpx 30rpx;
+		}
+	}
+
+	.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: 75%;
+				text-align: right;
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3