From cc77824dc9385ad623c785d96adbb29d4cd47144 Mon Sep 17 00:00:00 2001
From: lonewolfyx <877085893@qq.com>
Date: Mon, 6 Jan 2025 14:33:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=9F=E8=AE=A1=E5=88=86?=
=?UTF-8?q?=E6=9E=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/RegistVisitApi/RegistVisitApi.js | 19 ++
src/views/Analysis/AccessStatistics/index.vue | 206 ++++++++++++++++++
src/views/Analysis/AccessType/index.vue | 173 +++++++++++++++
.../components/AddEditRegisterVisit.vue | 10 +-
src/views/PoliceWork/RegisterVisit/index.vue | 37 +++-
5 files changed, 439 insertions(+), 6 deletions(-)
create mode 100644 src/views/Analysis/AccessStatistics/index.vue
create mode 100644 src/views/Analysis/AccessType/index.vue
diff --git a/src/api/RegistVisitApi/RegistVisitApi.js b/src/api/RegistVisitApi/RegistVisitApi.js
index 3a97e89..22b0b2d 100644
--- a/src/api/RegistVisitApi/RegistVisitApi.js
+++ b/src/api/RegistVisitApi/RegistVisitApi.js
@@ -84,4 +84,23 @@ export const exportVisit = () => {
method: 'post',
url: '/visiting/visit/export'
})
+}
+
+// 获取来访类型统计
+export const getVisitTypeStatistics = () => {
+ return request({
+ method: 'get',
+ url: '/visiting/visit/stat_type',
+ })
+}
+
+// 获取年度访问统计趋势
+export const getVisitTrendStatistics = (data) => {
+ return request({
+ method: 'get',
+ url: '/visiting/visit/stat_year_month',
+ params: {
+ year: data
+ }
+ })
}
\ No newline at end of file
diff --git a/src/views/Analysis/AccessStatistics/index.vue b/src/views/Analysis/AccessStatistics/index.vue
new file mode 100644
index 0000000..ec07ed9
--- /dev/null
+++ b/src/views/Analysis/AccessStatistics/index.vue
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dayjs(scope.row.visitTime).format('YYYY-MM-DD hh:mm:ss') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Analysis/AccessType/index.vue b/src/views/Analysis/AccessType/index.vue
new file mode 100644
index 0000000..64bf731
--- /dev/null
+++ b/src/views/Analysis/AccessType/index.vue
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+ {{ dayjs(scope.row.visitTime).format('YYYY-MM-DD hh:mm:ss') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/PoliceWork/RegisterVisit/components/AddEditRegisterVisit.vue b/src/views/PoliceWork/RegisterVisit/components/AddEditRegisterVisit.vue
index 89b10ad..81f196c 100644
--- a/src/views/PoliceWork/RegisterVisit/components/AddEditRegisterVisit.vue
+++ b/src/views/PoliceWork/RegisterVisit/components/AddEditRegisterVisit.vue
@@ -46,6 +46,7 @@
type="datetime"
placeholder="请选择上访时间"
value-format="YYYY-MM-DD hh:mm:ss"
+ :disabled-date="disableDate"
/>
@@ -327,7 +328,6 @@ const carryHandle = (row) => {
const getRegisterVisitList = async () => {
const res = await getRegisterList()
registerList.value = res.data
- console.log(res.data)
}
// 获取详情
@@ -336,7 +336,6 @@ const getDetail = async (row) => {
queryParams.value = res.data;
queryParams.value.visitTime = dayjs(res.data.visitTime).format('YYYY-MM-DD hh:mm:ss')
idCardChangeHandle(res.data.visitorCode)
- console.log(res)
}
// 新增来访登记
@@ -347,7 +346,6 @@ const createHandle = async (elForm) => {
await addVisit(queryParams.value)
changeShowStatus()
emit('refresh')
- console.log(queryParams.value)
}
})
}
@@ -360,7 +358,6 @@ const updateHandle = async (elForm) => {
await updateVisit(queryParams.value)
changeShowStatus()
emit('refresh')
- console.log(queryParams.value)
}
})
}
@@ -369,6 +366,11 @@ const updateHandle = async (elForm) => {
const idCardChangeHandle = (value) => {
viewHistoryDisable.value = !value;
}
+
+// 禁止今日之前的时间选择
+const disableDate = (date) => {
+ return date.getTime() < new Date().getTime()
+}