提交
This commit is contained in:
1 parent
246ad2228e
commit
8e2dd8b9f0
186 files changed
+38821
-2571
No files matched your search
+555
-31
@@ -1,5 +1,6 @@
|
||||
import request from '@/utils/http'
|
||||
import type { AppRouteRecord } from '@/types/router'
|
||||
import { MAX_ADMIN_LIST_PAGE_SIZE } from '@/utils/fetch-paged-list'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 后端菜单 / 角色(与 router 后端模式、用户弹窗对齐)
|
||||
@@ -21,6 +22,20 @@ export function fetchGetRoleList() {
|
||||
})
|
||||
}
|
||||
|
||||
/** 流程设计器:用户下拉选项(label=昵称,value=用户ID) */
|
||||
export function fetchUserOptions() {
|
||||
return request.get<Array<{ label: string; value: string }>>({
|
||||
url: '/web/admin/users/options'
|
||||
})
|
||||
}
|
||||
|
||||
/** 流程设计器:角色下拉选项(label=角色名,value=角色ID UUID) */
|
||||
export function fetchRoleOptions() {
|
||||
return request.get<Array<{ label: string; value: string }>>({
|
||||
url: '/web/admin/roles/options'
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 租户(系统管理)
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -219,7 +234,7 @@ export async function fetchNotDeletedRegions() {
|
||||
const cache = anyFn.__cache as undefined | { ts: number; data: Api.Region.RegionItem[] }
|
||||
if (cache && now - cache.ts < 5 * 60 * 1000) return cache.data
|
||||
|
||||
const pageSize = 100
|
||||
const pageSize = MAX_ADMIN_LIST_PAGE_SIZE
|
||||
const all: Api.Region.RegionItem[] = []
|
||||
let page = 1
|
||||
|
||||
@@ -450,14 +465,20 @@ export function fetchProductBannerList(productId: string) {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateProductBanners(productId: string, items: Api.Product.ProductBannerCreate[]) {
|
||||
export function fetchCreateProductBanners(
|
||||
productId: string,
|
||||
items: Api.Product.ProductBannerCreate[]
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/product-banners/product/${productId}`,
|
||||
params: items
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateProductBannerSort(productId: string, items: { id: string; sortOrder: number }[]) {
|
||||
export function fetchUpdateProductBannerSort(
|
||||
productId: string,
|
||||
items: { id: string; sortOrder: number }[]
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/product-banners/product/${productId}/sort`,
|
||||
params: { items }
|
||||
@@ -491,7 +512,10 @@ export function fetchCreateProductDetailMedia(
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateProductDetailMediaSort(productId: string, items: { id: string; sortOrder: number }[]) {
|
||||
export function fetchUpdateProductDetailMediaSort(
|
||||
productId: string,
|
||||
items: { id: string; sortOrder: number }[]
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/product-detail-media/product/${productId}/sort`,
|
||||
params: { items }
|
||||
@@ -526,7 +550,10 @@ export function fetchCategoryParameters(categoryId: string) {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateCategoryParameters(categoryId: string, items: Api.Product.CategoryParameterCreate[]) {
|
||||
export function fetchUpdateCategoryParameters(
|
||||
categoryId: string,
|
||||
items: Api.Product.CategoryParameterCreate[]
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/categories/${categoryId}/parameters`,
|
||||
params: { items }
|
||||
@@ -558,11 +585,7 @@ export function fetchSaveProductParameterValues(
|
||||
// 字典类型
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchDictTypeList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
export function fetchDictTypeList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{
|
||||
list: Api.Dict.DictTypeItem[]
|
||||
total: number
|
||||
@@ -703,12 +726,43 @@ export function fetchDeleteDept(id: string) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchSiteList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{ list: Api.Site.SiteItem[]; total: number; page: number; pageSize: number; totalPages: number }>({ url: '/web/admin/sites', params })
|
||||
return request.get<{
|
||||
list: Api.Site.SiteItem[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/sites', params })
|
||||
}
|
||||
export function fetchCreateSite(data: { siteName: string; siteCode: string; siteType?: string; status?: string; address?: string; contactName?: string; contactPhone?: string; businessScope?: string; orderNum?: number; remark?: string }) {
|
||||
export function fetchCreateSite(data: {
|
||||
siteName: string
|
||||
siteCode: string
|
||||
siteType?: string
|
||||
status?: string
|
||||
address?: string
|
||||
contactName?: string
|
||||
contactPhone?: string
|
||||
businessScope?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/sites', params: data })
|
||||
}
|
||||
export function fetchUpdateSite(id: string, data: Partial<{ siteName: string; siteCode: string; siteType: string; status: string; address: string; contactName: string; contactPhone: string; businessScope: string; orderNum: number; remark: string }>) {
|
||||
export function fetchUpdateSite(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
siteName: string
|
||||
siteCode: string
|
||||
siteType: string
|
||||
status: string
|
||||
address: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
businessScope: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/sites/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteSite(id: string) {
|
||||
@@ -720,46 +774,381 @@ export function fetchDeleteSite(id: string) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchPostList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{ list: Api.Post.PostItem[]; total: number; page: number; pageSize: number; totalPages: number }>({ url: '/web/admin/posts', params })
|
||||
return request.get<{
|
||||
list: Api.Post.PostItem[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/posts', params })
|
||||
}
|
||||
export function fetchCreatePost(data: { postName: string; postCode: string; status?: string; orderNum?: number; remark?: string }) {
|
||||
export function fetchCreatePost(data: {
|
||||
postName: string
|
||||
postCode: string
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/posts', params: data })
|
||||
}
|
||||
export function fetchUpdatePost(id: string, data: Partial<{ postName: string; postCode: string; status: string; orderNum: number; remark: string }>) {
|
||||
export function fetchUpdatePost(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
postName: string
|
||||
postCode: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/posts/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeletePost(id: string) {
|
||||
return request.del({ url: `/web/admin/posts/${id}` })
|
||||
}
|
||||
|
||||
export function fetchPostBoundUserIds(postId: string) {
|
||||
return request.get<{ userIds: string[] }>({ url: `/web/admin/posts/${postId}/users` })
|
||||
}
|
||||
|
||||
export function fetchUpdatePostBoundUsers(postId: string, userIds: string[]) {
|
||||
return request.put({
|
||||
url: `/web/admin/posts/${postId}/users`,
|
||||
params: { userIds },
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 物品单位管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchItemUnitList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{ list: Api.ItemUnit.ItemUnitItem[]; total: number; page: number; pageSize: number; totalPages: number }>({ url: '/web/admin/item-units', params })
|
||||
return request.get<{
|
||||
list: Api.ItemUnit.ItemUnitItem[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/item-units', params })
|
||||
}
|
||||
export function fetchCreateItemUnit(data: { unitCode: string; unitName: string; orderNum?: number; remark?: string }) {
|
||||
export function fetchCreateItemUnit(data: {
|
||||
unitCode: string
|
||||
unitName: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/item-units', params: data })
|
||||
}
|
||||
export function fetchUpdateItemUnit(id: string, data: Partial<{ unitCode: string; unitName: string; orderNum: number; remark: string }>) {
|
||||
export function fetchUpdateItemUnit(
|
||||
id: string,
|
||||
data: Partial<{ unitCode: string; unitName: string; orderNum: number; remark: string }>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/item-units/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteItemUnit(id: string) {
|
||||
return request.del({ url: `/web/admin/item-units/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 基础信息管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
type PageResult<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export function fetchCustomerList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<PageResult<Api.BizCustomer.CustomerItem>>({
|
||||
url: '/web/admin/customers',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function fetchCreateCustomer(data: {
|
||||
customerName: string
|
||||
sex?: string
|
||||
idCardNo?: string
|
||||
age?: number | null
|
||||
phoneNo?: string
|
||||
customerTags?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/customers', params: data })
|
||||
}
|
||||
export function fetchUpdateCustomer(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
customerName: string
|
||||
sex: string
|
||||
idCardNo: string
|
||||
age: number | null
|
||||
phoneNo: string
|
||||
customerTags: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/customers/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteCustomer(id: string) {
|
||||
return request.del({ url: `/web/admin/customers/${id}` })
|
||||
}
|
||||
|
||||
export function fetchCellSampleTypeList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<PageResult<Api.BizCellSampleType.CellSampleTypeItem>>({
|
||||
url: '/web/admin/cell-sample-types',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function fetchCreateCellSampleType(data: {
|
||||
typeCode: string
|
||||
typeName: string
|
||||
storageYears?: number | null
|
||||
storagePrice?: number | null
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/cell-sample-types', params: data })
|
||||
}
|
||||
export function fetchUpdateCellSampleType(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
typeCode: string
|
||||
typeName: string
|
||||
storageYears: number | null
|
||||
storagePrice: number | null
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/cell-sample-types/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteCellSampleType(id: string) {
|
||||
return request.del({ url: `/web/admin/cell-sample-types/${id}` })
|
||||
}
|
||||
|
||||
export function fetchCollectionRegionList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<PageResult<Api.BizCollectionRegion.RegionItem>>({
|
||||
url: '/web/admin/collection-regions',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function fetchCreateCollectionRegion(data: {
|
||||
regionName: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/collection-regions', params: data })
|
||||
}
|
||||
export function fetchUpdateCollectionRegion(
|
||||
id: string,
|
||||
data: Partial<{ regionName: string; orderNum: number; remark: string }>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/collection-regions/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteCollectionRegion(id: string) {
|
||||
return request.del({ url: `/web/admin/collection-regions/${id}` })
|
||||
}
|
||||
|
||||
export function fetchHospitalList(
|
||||
regionId: string,
|
||||
params?: { page?: number; pageSize?: number; keyword?: string }
|
||||
) {
|
||||
return request.get<PageResult<Api.BizCollectionHospital.HospitalItem>>({
|
||||
url: `/web/admin/collection-regions/${regionId}/hospitals`,
|
||||
params
|
||||
})
|
||||
}
|
||||
export function fetchCreateHospital(
|
||||
regionId: string,
|
||||
data: { hospitalName: string; orderNum?: number; remark?: string }
|
||||
) {
|
||||
return request.post({ url: `/web/admin/collection-regions/${regionId}/hospitals`, params: data })
|
||||
}
|
||||
export function fetchUpdateHospital(
|
||||
regionId: string,
|
||||
hospitalId: string,
|
||||
data: Partial<{ hospitalName: string; orderNum: number; remark: string }>
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/collection-regions/${regionId}/hospitals/${hospitalId}`,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
export function fetchDeleteHospital(regionId: string, hospitalId: string) {
|
||||
return request.del({ url: `/web/admin/collection-regions/${regionId}/hospitals/${hospitalId}` })
|
||||
}
|
||||
|
||||
export function fetchCollectionProtocolNoList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<PageResult<Api.BizCollectionProtocolNo.ProtocolNoItem>>({
|
||||
url: '/web/admin/collection-protocol-nos',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function fetchCreateCollectionProtocolNo(data: {
|
||||
protocolNo: string
|
||||
issued?: number
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/collection-protocol-nos', params: data })
|
||||
}
|
||||
export function fetchUpdateCollectionProtocolNo(
|
||||
id: string,
|
||||
data: Partial<{ protocolNo: string; issued: number; orderNum: number; remark: string }>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/collection-protocol-nos/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteCollectionProtocolNo(id: string) {
|
||||
return request.del({ url: `/web/admin/collection-protocol-nos/${id}` })
|
||||
}
|
||||
|
||||
export function fetchBatchGenerateProtocolNos(data: {
|
||||
prefix: string
|
||||
middle: string
|
||||
seqStart: number
|
||||
seqEnd: number
|
||||
digitCount?: number
|
||||
}) {
|
||||
return request.post({
|
||||
url: '/web/admin/collection-protocol-nos/batch-generate',
|
||||
params: data,
|
||||
showSuccessMessage: true,
|
||||
timeout: 120_000
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchBatchIssueProtocolNos(data: {
|
||||
ids: string[]
|
||||
issuedUserId: string
|
||||
issuedUserName?: string
|
||||
}) {
|
||||
return request.post({
|
||||
url: '/web/admin/collection-protocol-nos/batch-issue',
|
||||
params: data,
|
||||
showSuccessMessage: true,
|
||||
timeout: 120_000
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchBatchRevokeProtocolNos(ids: string[]) {
|
||||
return request.post({
|
||||
url: '/web/admin/collection-protocol-nos/batch-revoke',
|
||||
params: { ids },
|
||||
showSuccessMessage: true,
|
||||
timeout: 120_000
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSampleCodeList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<PageResult<Api.BizSampleCode.SampleCodeItem>>({
|
||||
url: '/web/admin/sample-codes',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function fetchCreateSampleCode(data: {
|
||||
sampleCode: string
|
||||
issued?: number
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/sample-codes', params: data })
|
||||
}
|
||||
export function fetchUpdateSampleCode(
|
||||
id: string,
|
||||
data: Partial<{ sampleCode: string; issued: number; orderNum: number; remark: string }>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/sample-codes/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteSampleCode(id: string) {
|
||||
return request.del({ url: `/web/admin/sample-codes/${id}` })
|
||||
}
|
||||
export function fetchBatchGenerateSampleCodes(data: {
|
||||
sampleCodeType: string
|
||||
middle: string
|
||||
seqStart: number
|
||||
seqEnd: number
|
||||
digitCount?: number
|
||||
}) {
|
||||
return request.post({
|
||||
url: '/web/admin/sample-codes/batch-generate',
|
||||
params: data,
|
||||
showSuccessMessage: true,
|
||||
timeout: 120_000
|
||||
})
|
||||
}
|
||||
export function fetchBatchIssueSampleCodes(data: {
|
||||
ids: string[]
|
||||
issuedUserId: string
|
||||
issuedUserName?: string
|
||||
}) {
|
||||
return request.post({
|
||||
url: '/web/admin/sample-codes/batch-issue',
|
||||
params: data,
|
||||
showSuccessMessage: true,
|
||||
timeout: 120_000
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchBatchRevokeSampleCodes(ids: string[]) {
|
||||
return request.post({
|
||||
url: '/web/admin/sample-codes/batch-revoke',
|
||||
params: { ids },
|
||||
showSuccessMessage: true,
|
||||
timeout: 120_000
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 快递公司管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchExpressCompanyList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{ list: Api.ExpressCompany.ExpressCompanyItem[]; total: number; page: number; pageSize: number; totalPages: number }>({ url: '/web/admin/express-companies', params })
|
||||
export function fetchExpressCompanyList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<{
|
||||
list: Api.ExpressCompany.ExpressCompanyItem[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/express-companies', params })
|
||||
}
|
||||
export function fetchCreateExpressCompany(data: { expressCode: string; expressName: string; orderNum?: number; remark?: string }) {
|
||||
export function fetchCreateExpressCompany(data: {
|
||||
expressCode: string
|
||||
expressName: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/express-companies', params: data })
|
||||
}
|
||||
export function fetchUpdateExpressCompany(id: string, data: Partial<{ expressCode: string; expressName: string; orderNum: number; remark: string }>) {
|
||||
export function fetchUpdateExpressCompany(
|
||||
id: string,
|
||||
data: Partial<{ expressCode: string; expressName: string; orderNum: number; remark: string }>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/express-companies/${id}`, params: data })
|
||||
}
|
||||
export function fetchDeleteExpressCompany(id: string) {
|
||||
@@ -821,13 +1210,38 @@ export function fetchDeleteMenu(id: string) {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchRoleList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{ list: Api.Role.RoleItem[]; total: number; page: number; pageSize: number; totalPages: number }>({ url: '/web/admin/role-management', params })
|
||||
return request.get<{
|
||||
list: Api.Role.RoleItem[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/role-management', params })
|
||||
}
|
||||
export function fetchCreateRole(data: { roleName: string; dataScope?: string; status?: string; orderNum?: number; remark?: string }) {
|
||||
export function fetchCreateRole(data: {
|
||||
roleName: string
|
||||
dataScope?: string
|
||||
status?: string
|
||||
orderNum?: number
|
||||
remark?: string
|
||||
}) {
|
||||
return request.post({ url: '/web/admin/role-management', params: data, showSuccessMessage: true })
|
||||
}
|
||||
export function fetchUpdateRole(id: string, data: Partial<{ roleName: string; dataScope: string; status: string; orderNum: number; remark: string }>) {
|
||||
return request.put({ url: `/web/admin/role-management/${id}`, params: data, showSuccessMessage: true })
|
||||
export function fetchUpdateRole(
|
||||
id: string,
|
||||
data: Partial<{
|
||||
roleName: string
|
||||
dataScope: string
|
||||
status: string
|
||||
orderNum: number
|
||||
remark: string
|
||||
}>
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/role-management/${id}`,
|
||||
params: data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
export function fetchDeleteRole(id: string) {
|
||||
return request.del({ url: `/web/admin/role-management/${id}`, showSuccessMessage: true })
|
||||
@@ -836,11 +1250,121 @@ export function fetchRoleMenuIds(roleId: string) {
|
||||
return request.get<{ menuIds: string[] }>({ url: `/web/admin/role-management/${roleId}/menus` })
|
||||
}
|
||||
export function fetchUpdateRoleMenus(roleId: string, menuIds: string[]) {
|
||||
return request.put({ url: `/web/admin/role-management/${roleId}/menus`, params: { menuIds }, showSuccessMessage: true })
|
||||
return request.put({
|
||||
url: `/web/admin/role-management/${roleId}/menus`,
|
||||
params: { menuIds },
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
export function fetchRoleDataScope(roleId: string) {
|
||||
return request.get<{ dataScope: string; scopeDetails: Array<{ scopeType: string; scopeValue: string }> }>({ url: `/web/admin/role-management/${roleId}/data-scope` })
|
||||
return request.get<{
|
||||
dataScope: string
|
||||
scopeDetails: Array<{ scopeType: string; scopeValue: string }>
|
||||
}>({ url: `/web/admin/role-management/${roleId}/data-scope` })
|
||||
}
|
||||
export function fetchUpdateRoleDataScope(roleId: string, data: { dataScope: string; scopeDetails?: Array<{ scopeType: string; scopeValue: string }> }) {
|
||||
return request.put({ url: `/web/admin/role-management/${roleId}/data-scope`, params: data, showSuccessMessage: true })
|
||||
export function fetchUpdateRoleDataScope(
|
||||
roleId: string,
|
||||
data: { dataScope: string; scopeDetails?: Array<{ scopeType: string; scopeValue: string }> }
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/role-management/${roleId}/data-scope`,
|
||||
params: data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 洁净室管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCleanRoomList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get({ url: '/web/admin/clean-rooms', params })
|
||||
}
|
||||
|
||||
export function fetchCreateCleanRoom(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/clean-rooms', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateCleanRoom(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/clean-rooms/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCleanRoom(id: string) {
|
||||
return request.del({ url: `/web/admin/clean-rooms/${id}` })
|
||||
}
|
||||
|
||||
export function fetchAccessLogList(params?: { page?: number; pageSize?: number; cleanRoomId?: string; keyword?: string }) {
|
||||
return request.get({ url: '/web/admin/clean-room-access-logs', params })
|
||||
}
|
||||
|
||||
export function fetchCreateAccessLog(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/clean-room-access-logs', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateAccessLog(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/clean-room-access-logs/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteAccessLog(id: string) {
|
||||
return request.del({ url: `/web/admin/clean-room-access-logs/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 库位管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchStorageFacilityList(params?: { keyword?: string }) {
|
||||
return request.get({ url: '/web/admin/storage-facilities', params })
|
||||
}
|
||||
|
||||
export function fetchCreateStorageFacility(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/storage-facilities', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateStorageFacility(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/storage-facilities/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteStorageFacility(id: string) {
|
||||
return request.del({ url: `/web/admin/storage-facilities/${id}` })
|
||||
}
|
||||
|
||||
export function fetchStorageSlotList(params?: { facilityNodeId?: string }) {
|
||||
return request.get({ url: '/web/admin/storage-facility-slots', params })
|
||||
}
|
||||
|
||||
export function fetchCreateStorageSlot(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/storage-facility-slots', params: data })
|
||||
}
|
||||
|
||||
export function fetchBatchCreateSlots(data: { facilityNodeId: string; rows: number; cols: number; codePrefix?: string }) {
|
||||
return request.post({ url: '/web/admin/storage-facility-slots/batch', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateStorageSlot(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/storage-facility-slots/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteStorageSlot(id: string) {
|
||||
return request.del({ url: `/web/admin/storage-facility-slots/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 展馆预约
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchExhibitionAppointmentList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get({ url: '/web/admin/exhibition-appointments', params })
|
||||
}
|
||||
|
||||
export function fetchCreateExhibitionAppointment(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/exhibition-appointments', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateExhibitionAppointment(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/exhibition-appointments/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteExhibitionAppointment(id: string) {
|
||||
return request.del({ url: `/web/admin/exhibition-appointments/${id}` })
|
||||
}
|
||||
Reference in new issue
Block a user