From afc91098038482d93344a40cb296701d25668063 Mon Sep 17 00:00:00 2001
From: Theo <971366405@qq.com>
Date: Sat, 10 Aug 2024 15:36:46 +0800
Subject: [PATCH 1/2] =?UTF-8?q?feat:=20:sparkles:=20=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E6=97=A5=E5=BF=97=E6=96=B0=E5=A2=9E=E6=93=8D=E4=BD=9C=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
操作日志新增操作时间查询条件
---
src/api/log.ts | 2 ++
src/api/user.ts | 2 +-
src/views/system/log/index.vue | 26 ++++++++++++++++++++++----
src/views/system/user/index.vue | 4 ++--
4 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/src/api/log.ts b/src/api/log.ts
index 9fb11b3c..a8c71e50 100644
--- a/src/api/log.ts
+++ b/src/api/log.ts
@@ -52,6 +52,8 @@ export default LogAPI;
export interface LogPageQuery extends PageQuery {
/** 搜索关键字 */
keywords?: string;
+ /** 操作时间 */
+ createTime?: [string, string];
}
/**
diff --git a/src/api/user.ts b/src/api/user.ts
index a2a5c095..c9a40966 100644
--- a/src/api/user.ts
+++ b/src/api/user.ts
@@ -175,7 +175,7 @@ export interface UserPageQuery extends PageQuery {
deptId?: number;
/** 开始时间 */
- createTimeRange?: [string, string];
+ createTime?: [string, string];
}
/** 用户分页对象 */
diff --git a/src/views/system/log/index.vue b/src/views/system/log/index.vue
index 41896de2..d234135c 100644
--- a/src/views/system/log/index.vue
+++ b/src/views/system/log/index.vue
@@ -10,12 +10,28 @@
@keyup.enter="handleQuery"
/>
+
+
+
- 搜索
- 重置
+
+
+ 搜索
+
+
+
+ 重置
+
@@ -75,6 +91,7 @@ const queryParams = reactive({
pageNum: 1,
pageSize: 10,
keywords: "",
+ createTime: ["", ""],
});
// 日志表格数据
@@ -96,6 +113,7 @@ function handleQuery() {
function handleResetQuery() {
queryFormRef.value.resetFields();
queryParams.pageNum = 1;
+ queryParams.createTime = undefined;
handleQuery();
}
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 14867eee..811049b1 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -37,7 +37,7 @@
Date: Sun, 11 Aug 2024 08:34:56 +0800
Subject: [PATCH 2/2] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D=E5=88=87?=
=?UTF-8?q?=E6=8D=A2=E5=88=B0horizontal=E6=97=B6=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Sidebar/components/SidebarMenu.vue | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/layout/components/Sidebar/components/SidebarMenu.vue b/src/layout/components/Sidebar/components/SidebarMenu.vue
index 418c9cda..526a24ce 100644
--- a/src/layout/components/Sidebar/components/SidebarMenu.vue
+++ b/src/layout/components/Sidebar/components/SidebarMenu.vue
@@ -1,6 +1,7 @@
();
const settingsStore = useSettingsStore();
const appStore = useAppStore();
const currentRoute = useRoute();
@@ -63,4 +68,22 @@ function resolvePath(routePath: string) {
const fullPath = path.resolve(props.basePath, routePath);
return fullPath;
}
+/**
+ * 修复切换到horizontal时,展开的菜单显示问题,切换时关闭全部菜单
+ */
+const menuIndexArray = ref([]);
+const handleOpen = (index: string, keyPath: string[]) => {
+ menuIndexArray.value.push(index);
+};
+const handleClose = (index: string) => {
+ menuIndexArray.value = menuIndexArray.value.filter((item) => item !== index);
+};
+watch(
+ () => mode.value,
+ () => {
+ if (mode.value === "horizontal") {
+ menuIndexArray.value.map((item: string) => menuRef.value!.close(item));
+ }
+ }
+);