diff --git a/src/api/qy/qyUser.ts b/src/api/qy/qyUser.ts index b952f9e..ffe100c 100644 --- a/src/api/qy/qyUser.ts +++ b/src/api/qy/qyUser.ts @@ -10,6 +10,7 @@ export interface QyUserDTO { openUserid?: string; /** 企业用户ID(导出列:企业用户ID) */ userid?: string; + openid?: string; /** 用户姓名(导出列:用户姓名) */ name?: string; /** 手机号码(导出列:手机号码) */ @@ -113,4 +114,8 @@ export const syncQyUserApi = (params: { corpid: string; code: string }) => { export const exportQyUserExcelApi = (params: QyUserQuery, fileName: string) => { return http.download("/qywx/users/excel", fileName, { params }); +}; + +export const getQyUserDetailApi = (id: number) => { + return http.request>("get", `/qywx/users/detail/${id}`); }; \ No newline at end of file diff --git a/src/router/modules/global.ts b/src/router/modules/global.ts index e2ec14b..33df1fc 100644 --- a/src/router/modules/global.ts +++ b/src/router/modules/global.ts @@ -31,6 +31,14 @@ export default { meta: { title: "柜机详情" } + }, + { + path: "/user/qy/detail", + name: "QyUserDetail", + component: () => import("@/views/user/qy/detail.vue"), + meta: { + title: "用户详情" + } } ] } as RouteConfigsTable; diff --git a/src/views/cabinet/smart-cabinet-card/detail.vue b/src/views/cabinet/smart-cabinet-card/detail.vue index 802347e..75c8a31 100644 --- a/src/views/cabinet/smart-cabinet-card/detail.vue +++ b/src/views/cabinet/smart-cabinet-card/detail.vue @@ -32,7 +32,7 @@ const cabinetInfo = ref({ location: 0 }); const loading = ref(false); -const activeTab = ref('basic'); +const activeTab = ref('cells'); const cabinetId = ref(0); const gatewayConfigVisible = ref(false); const shopConfigVisible = ref(false); @@ -198,8 +198,8 @@ onMounted(() => {
- +
@@ -262,8 +262,9 @@ onMounted(() => { + :page-sizes="[5, 8, 16, 24, 32]" layout="total, sizes, prev, pager, next, jumper" + :total="cellPagination.total" @size-change="handleCellSizeChange" @current-change="handleCellPageChange" + class="pagination" />
diff --git a/src/views/user/qy/UserDetail.vue b/src/views/user/qy/UserDetail.vue deleted file mode 100644 index bf1369b..0000000 --- a/src/views/user/qy/UserDetail.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/user/qy/detail.vue b/src/views/user/qy/detail.vue new file mode 100644 index 0000000..6a87b7d --- /dev/null +++ b/src/views/user/qy/detail.vue @@ -0,0 +1,180 @@ + + + + + \ No newline at end of file diff --git a/src/views/user/qy/hook.tsx b/src/views/user/qy/hook.tsx index 8201bf8..e9f2a39 100644 --- a/src/views/user/qy/hook.tsx +++ b/src/views/user/qy/hook.tsx @@ -13,6 +13,8 @@ import { getQyDeptListApi } from "@/api/system/dept"; import { getPostListApi } from "@/api/system/post"; import { getRoleListApi } from "@/api/system/role"; import { useWxStore } from "@/store/modules/wx"; +import { useMultiTagsStoreHook } from "@/store/modules/multiTags"; +import { useRouter } from "vue-router"; /** * 企业用户管理页面的组合式函数 @@ -20,6 +22,7 @@ import { useWxStore } from "@/store/modules/wx"; */ export function useHook() { const wxStore = useWxStore(); // 微信相关状态管理 + const router = useRouter(); // 搜索表单参数 const searchFormParams = reactive({ @@ -34,7 +37,7 @@ export function useHook() { const timeRange = ref<[string, string]>(); // 时间范围选择 // 列表相关状态 - const dataList = ref([]); // 用户列表数据 + const dataList = ref([]); // 用户列表数据 const pageLoading = ref(true); // 加载状态 const pagination = reactive({ // 分页配置 total: 0, @@ -117,8 +120,23 @@ export function useHook() { * 查看用户详情 * @param row 用户数据行 */ - const handleViewDetail = (row: any) => { - // TODO: 实现查看详情逻辑 + const handleViewDetail = (row: QyUserDTO) => { + // 保存信息到标签页 + useMultiTagsStoreHook().handleTags("push", { + path: `/user/qy/detail`, + name: "qyDetail", + query: { id: row.id }, + meta: { + title: `${row.name}`, + dynamicLevel: 3 + } + }); + router.push({ + path: '/user/qy/detail', + query: { + id: row.id + } + }); }; /** diff --git a/src/views/user/qy/index.vue b/src/views/user/qy/index.vue index a8a6940..5e2707c 100644 --- a/src/views/user/qy/index.vue +++ b/src/views/user/qy/index.vue @@ -7,6 +7,7 @@ import BalanceEditModal from "./BalanceEditModal.vue"; import Search from "@iconify-icons/ep/search"; import Refresh from "@iconify-icons/ep/refresh"; +import View from "@iconify-icons/ep/view"; defineOptions({ name: "QyUser" @@ -57,40 +58,31 @@ watch(
- - -
- - - -