mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-14 18:21:53 +08:00
feat: add vue3(element-plus)
This commit is contained in:
32
yudao-ui-admin-vue3/src/api/system/tenant/index.ts
Normal file
32
yudao-ui-admin-vue3/src/api/system/tenant/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { TenantVO } from './types'
|
||||
|
||||
// 查询租户列表
|
||||
export const getTenantPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<TenantVO>>({ url: '/system/tenant/page', params })
|
||||
}
|
||||
|
||||
// 查询租户详情
|
||||
export const getTenantApi = (id: number) => {
|
||||
return defHttp.get<TenantVO>({ url: '/system/tenant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户
|
||||
export const createTenantApi = (params: TenantVO) => {
|
||||
return defHttp.post({ url: '/system/tenant/create', params })
|
||||
}
|
||||
|
||||
// 修改租户
|
||||
export const updateTenantApi = (params: TenantVO) => {
|
||||
return defHttp.put({ url: '/system/tenant/update', params })
|
||||
}
|
||||
|
||||
// 删除租户
|
||||
export const deleteTenantApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/tenant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出租户
|
||||
export const exportTenantApi = (params) => {
|
||||
return defHttp.get({ url: '/system/tenant/export-excel', params, responseType: 'blob' })
|
||||
}
|
12
yudao-ui-admin-vue3/src/api/system/tenant/types.ts
Normal file
12
yudao-ui-admin-vue3/src/api/system/tenant/types.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export type TenantVO = {
|
||||
id: number
|
||||
name: string
|
||||
packageId: number
|
||||
contactName: string
|
||||
contactMobile: string
|
||||
accountCount: number
|
||||
expireTime: string
|
||||
domain: string
|
||||
status: number
|
||||
createTime: string
|
||||
}
|
Reference in New Issue
Block a user