From 9402749e7e8bd7d7be88084a55323c748ea02cc6 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 17 二月 2025 14:45:50 +0800 Subject: [PATCH] feat: api --- src/views/Account/AccountManageList.vue | 69 +++++++++++++++++----------------- 1 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/views/Account/AccountManageList.vue b/src/views/Account/AccountManageList.vue index e4ae234..0aad4b1 100644 --- a/src/views/Account/AccountManageList.vue +++ b/src/views/Account/AccountManageList.vue @@ -43,7 +43,7 @@ useFormDialog, } from '@bole-core/components'; import { useAccess } from '@/hooks'; -import * as userServices from '@/services/api/User'; +// import * as userServices from '@/services/api/User'; import { RoleClientType } from '@/constants'; import { Message, OrderInputType } from '@bole-core/core'; import AddOrEditAccountDialog from './components/AddOrEditAccountDialog.vue'; @@ -80,18 +80,19 @@ } = useTable( async ({ pageIndex, pageSize }, extraParamState) => { try { - let params: API.QueryUserPageInput = { - pageModel: { - rows: pageSize, - page: pageIndex, - orderInput: extraParamState.orderInput, - }, - searchKey: extraParamState.keyword, - }; - let res = await userServices.getUserPage(params, { - showLoading: !state.loading, - }); - return res; + // let params: API.QueryUserPageInput = { + // pageModel: { + // rows: pageSize, + // page: pageIndex, + // orderInput: extraParamState.orderInput, + // }, + // searchKey: extraParamState.keyword, + // }; + // let res = await userServices.getUserPage(params, { + // showLoading: !state.loading, + // }); + // return res; + return {}; } catch (error) {} }, { @@ -141,27 +142,27 @@ async function handleAddOrEdit() { try { let isEdit = !!editForm.id; - let params: API.CreateAccountInput = { - name: editForm.name, - userName: editForm.userName, - remark: editForm.remark, - password: editForm.password, - phoneNumber: editForm.phoneNumber, - channel: editForm.channel, - // clientId: RoleClientType.RoleBackendClientId, - roleNames: [editForm.roleName], - }; - let res; - if (isEdit) { - (params as API.UpdateAccountInput).id = editForm.id; - res = await userServices.updateAccount(params); - } else { - res = await userServices.createAccount(params); - } - if (res) { - Message.successMessage('鎿嶄綔鎴愬姛'); - getList(isEdit ? paginationState.pageIndex : 1); - } + // let params: API.CreateAccountInput = { + // name: editForm.name, + // userName: editForm.userName, + // remark: editForm.remark, + // password: editForm.password, + // phoneNumber: editForm.phoneNumber, + // channel: editForm.channel, + // // clientId: RoleClientType.RoleBackendClientId, + // roleNames: [editForm.roleName], + // }; + // let res; + // if (isEdit) { + // (params as API.UpdateAccountInput).id = editForm.id; + // res = await userServices.updateAccount(params); + // } else { + // res = await userServices.createAccount(params); + // } + // if (res) { + // Message.successMessage('鎿嶄綔鎴愬姛'); + // getList(isEdit ? paginationState.pageIndex : 1); + // } } catch (error) {} } </script> -- Gitblit v1.9.1