From 8cb98a5184e9eb10bd51b095a74cb2113fa14c73 Mon Sep 17 00:00:00 2001
From: 18278715334 <18278715334@163.com>
Date: Fri, 19 Dec 2025 11:28:59 +0800
Subject: [PATCH] =?UTF-8?q?fix=E8=BF=94=E5=9B=9E=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AD=9B=E9=80=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/admin/recharge-records/index.vue | 21 +-
src/pages/admin/subscriptions/index.vue | 19 +-
src/pages/admin/transactions/index.vue | 18 +-
src/pages/admin/ui-components/index.vue | 666 +++++++++++++++++++++
src/pages/admin/users/index.vue | 17 +-
5 files changed, 734 insertions(+), 7 deletions(-)
create mode 100644 src/pages/admin/ui-components/index.vue
diff --git a/src/pages/admin/recharge-records/index.vue b/src/pages/admin/recharge-records/index.vue
index 8bd6d36..39aa66d 100644
--- a/src/pages/admin/recharge-records/index.vue
+++ b/src/pages/admin/recharge-records/index.vue
@@ -4,7 +4,7 @@
- 当前用户:{{ currentUser?.company_name || currentUser?.phone }}
+ 当前用户:{{ currentUser?.enterprise_info?.company_name || currentUser?.phone }}
(仅显示当前用户)
@@ -14,7 +14,7 @@
- {{ currentUser?.company_name || currentUser?.phone }}
+ {{ currentUser?.enterprise_info?.company_name || currentUser?.phone }}
@@ -622,7 +622,22 @@ const exitSingleUserMode = () => {
// 返回用户管理
const goBackToUsers = () => {
- router.push({ name: 'AdminUsers' })
+ const query = { user_id: currentUser.value?.id }
+
+ // 如果当前用户有企业名称,添加到查询参数
+ if (currentUser.value?.enterprise_info?.company_name) {
+ query.company_name = currentUser.value.enterprise_info.company_name
+ }
+
+ // 如果当前用户有手机号,添加到查询参数
+ if (currentUser.value?.phone) {
+ query.phone = currentUser.value.phone
+ }
+ console.log('query', query)
+ router.push({
+ name: 'AdminUsers',
+ query
+ })
}
// 查看详情
diff --git a/src/pages/admin/subscriptions/index.vue b/src/pages/admin/subscriptions/index.vue
index 00289c0..b863032 100644
--- a/src/pages/admin/subscriptions/index.vue
+++ b/src/pages/admin/subscriptions/index.vue
@@ -9,7 +9,7 @@
-
{{ currentUser?.company_name || '未知公司' }}
+
{{ currentUser?.enterprise_info?.company_name || '未知公司' }}
{{ currentUser?.phone || '-' }}
@@ -727,7 +727,22 @@ const exitSingleUserMode = () => {
// 返回用户管理
const goBackToUsers = () => {
- router.push({ name: 'AdminUsers' })
+ const query = { user_id: currentUser.value?.id }
+
+ // 如果当前用户有手机号,添加到查询参数
+ if (currentUser.value?.phone) {
+ query.phone = currentUser.value.phone
+ }
+
+ // 如果当前用户有企业名称,添加到查询参数
+ if (currentUser.value?.enterprise_info?.company_name) {
+ query.company_name = currentUser.value.enterprise_info.company_name
+ }
+
+ router.push({
+ name: 'AdminUsers',
+ query
+ })
}
// 监听路由变化
diff --git a/src/pages/admin/transactions/index.vue b/src/pages/admin/transactions/index.vue
index 1f6f49b..17cc83a 100644
--- a/src/pages/admin/transactions/index.vue
+++ b/src/pages/admin/transactions/index.vue
@@ -516,7 +516,23 @@ const exitSingleUserMode = () => {
// 返回用户管理
const goBackToUsers = () => {
- router.push({ name: 'AdminUsers' })
+ const query = { user_id: currentUser.value?.id }
+
+ // 如果当前用户有手机号,添加到查询参数
+ if (currentUser.value?.phone) {
+ query.phone = currentUser.value.phone
+ }
+
+// 如果当前用户有企业名称,添加到查询参数
+if (currentUser.value?.enterprise_info?.company_name) {
+ query.company_name = currentUser.value.enterprise_info.company_name
+ }
+
+
+ router.push({
+ name: 'AdminUsers',
+ query
+ })
}
// 查看详情
diff --git a/src/pages/admin/ui-components/index.vue b/src/pages/admin/ui-components/index.vue
new file mode 100644
index 0000000..b4ea450
--- /dev/null
+++ b/src/pages/admin/ui-components/index.vue
@@ -0,0 +1,666 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+ 新增UI组件
+
+
+
+
+
+
+
+
+
+
+
+
+ 已解压
+ 已上传
+ 未上传
+
+
+
+
+ {{ formatFileSize(row.file_size) }}
+ -
+
+
+
+
+
+ {{ row.is_active ? '启用' : '禁用' }}
+
+
+
+
+
+
+ {{ formatDateTime(row.created_at) }}
+
+
+
+
+ 编辑
+
+ 上传文件
+
+
+ 上传并解压
+
+
+ 查看文件夹
+
+
+ 下载文件
+
+
+ 删除文件夹
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+
+
+ 只能上传zip文件,且不超过100MB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.name }}
+ ({{ formatSize(data.size) }})
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/admin/users/index.vue b/src/pages/admin/users/index.vue
index 58afa63..f3acdfd 100644
--- a/src/pages/admin/users/index.vue
+++ b/src/pages/admin/users/index.vue
@@ -645,7 +645,7 @@ import ListPageLayout from '@/components/common/ListPageLayout.vue'
import { useMobileTable } from '@/composables/useMobileTable'
import { ArrowDown, Document, Money, Tickets, Wallet, Warning } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
-import { useRouter } from 'vue-router'
+import { useRoute, useRouter } from 'vue-router'
// 获取路由实例
const router = useRouter()
@@ -723,6 +723,21 @@ let searchTimer = null
// 初始化
onMounted(() => {
+ // 检查是否有从交易页面传来的查询参数
+ const route = useRoute()
+
+ // 如果有企业名称参数,设置为搜索条件
+ if (route.query.company_name) {
+ filters.company_name = route.query.company_name
+ }
+
+ // 如果有手机号参数,设置为搜索条件
+ if (route.query.phone) {
+ filters.phone = route.query.phone
+ }
+
+
+
loadUsers()
loadStats()
})