diff --git a/public/yhxy.pdf b/public/yhxy.pdf
index 70ee567..1f079a7 100644
Binary files a/public/yhxy.pdf and b/public/yhxy.pdf differ
diff --git a/public/yszc.pdf b/public/yszc.pdf
index b9fff67..9c32ade 100644
Binary files a/public/yszc.pdf and b/public/yszc.pdf differ
diff --git a/src/api/index.js b/src/api/index.js
index a190e06..8908677 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -229,9 +229,15 @@ export const apiKeysApi = {
export const whiteListApi = {
// 获取用户白名单列表 (需认证)
- getWhiteList: () => request.get('/white-list'),
+ getWhiteList: (remark = '') => {
+ const params = {}
+ if (remark) {
+ params.remark = remark
+ }
+ return request.get('/white-list', { params })
+ },
// 添加白名单IP (需认证)
- addWhiteListIP: (ipAddress) => request.post('/white-list', { ip_address: ipAddress }),
+ addWhiteListIP: (ipAddress, remark = '') => request.post('/white-list', { ip_address: ipAddress, remark: remark }),
// 删除白名单IP (需认证)
deleteWhiteListIP: (ipAddress) => request.delete(`/white-list/${encodeURIComponent(ipAddress)}`)
}
diff --git a/src/pages/api/WhiteList.vue b/src/pages/api/WhiteList.vue
index f6df6c0..7e71356 100644
--- a/src/pages/api/WhiteList.vue
+++ b/src/pages/api/WhiteList.vue
@@ -26,18 +26,18 @@
-
-
+
-
-
-
-
+
+
+
+
@@ -89,6 +89,12 @@
+
+
+ {{ row.remark || '-' }}
+
+
+
@@ -140,6 +146,18 @@
+
+
+
+
{
const loadWhiteList = async () => {
loading.value = true
try {
- const response = await callProtectedAPI(whiteListApi.getWhiteList)
+ const response = await callProtectedAPI(() => whiteListApi.getWhiteList(filters.remark))
if (response) {
whiteListData.value = response.data.items || []
} else {
@@ -316,10 +336,11 @@ const handleAddIP = async () => {
addLoading.value = true
try {
- const response = await callProtectedAPI(whiteListApi.addWhiteListIP, addForm.ipAddress)
+ const response = await callProtectedAPI(whiteListApi.addWhiteListIP, addForm.ipAddress, addForm.remark)
if (response) {
ElMessage.success('添加IP地址成功')
addForm.ipAddress = ''
+ addForm.remark = ''
showAddForm.value = false
await loadWhiteList()
}
@@ -366,11 +387,6 @@ const handleDeleteIP = async (ipAddress) => {
}
}
-// 处理筛选变化
-const handleFilterChange = () => {
- loadWhiteList()
-}
-
// 处理搜索
const handleSearch = () => {
if (searchTimer) {
@@ -384,7 +400,7 @@ const handleSearch = () => {
// 重置筛选
const resetFilters = () => {
filters.keyword = ''
- filters.status = ''
+ filters.remark = ''
loadWhiteList()
}