| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 删除字典类别 DELETE /api/main/dictionary/deleteDictionaryCategory */ |
| | | export async function deleteDictionaryCategory( |
| | | body: API.DeleteDictionaryCategoryCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/deleteDictionaryCategory', { |
| | | method: 'DELETE', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询字典类别分页列表数据 POST /api/main/dictionary/getDictionaryCategories */ |
| | | export async function getDictionaryCategories( |
| | | body: API.GetDictionaryCategoriesQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PagedListQueryResultGetDictionaryCategoriesQueryResultItem>( |
| | | '/api/main/dictionary/getDictionaryCategories', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 获取字典数据分页列表 POST /api/main/dictionary/getDictionaryDatas */ |
| | | export async function getDictionaryDatas( |
| | | body: API.GetDictionaryDatasQuery, |
| | |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 保存字典类别 POST /api/main/dictionary/saveDictionaryCategory */ |
| | | export async function saveDictionaryCategory( |
| | | body: API.SaveDictionaryCategoryCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/main/dictionary/saveDictionaryCategory', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存字典数据 POST /api/main/dictionary/saveDictionaryData */ |
| | | export async function saveDictionaryData( |
| | | body: API.SaveDictionaryDataCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/main/dictionary/saveDictionaryData', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置字典数据是否禁用 PUT /api/main/dictionary/setDictionaryDataIsDisabled */ |
| | | export async function setDictionaryDataIsDisabled( |
| | | body: API.SetDictionaryDataIsDisabledCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/setDictionaryDataIsDisabled', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |