| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * 字典数据接口
- */
- import { request } from '../../utils/request'
- import type { DictDataResponse } from '../../types/dict'
- /**
- * 根据字典类型查询字典数据信息
- * @param dictType 字典类型
- */
- export const getDictDataByType = (dictType: string): Promise<DictDataResponse> => {
- return request<DictDataResponse>({
- url: `/system/dict/data/type/${dictType}`,
- method: 'GET'
- })
- }
- /**
- * 根据字典类型查询字典数据信息(返回AjaxResult格式)
- * @param dictType 字典类型
- */
- export const getDictDataByTypeAjax = (dictType: string): Promise<AjaxResult> => {
- return request<AjaxResult>({
- url: `/system/dict/data/type/${dictType}`,
- method: 'GET'
- })
- }
- /**
- * 根据字典类型查询字典数据列表
- * @param dictType 字典类型
- */
- export const getDictDataList = (dictType: string): Promise<SysDictData[]> => {
- return request<SysDictData[]>({
- url: `/system/dict/data/type/${dictType}`,
- method: 'GET'
- })
- }
|