12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /*
- * @Author: code4eat awesomedema@gmail.com
- * @Date: 2022-07-06 11:46:24
- * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-01-10 13:16:27
- * @FilePath: /KC-MiddlePlatform/src/service/dictionary.ts
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
- import { request } from 'umi';
- //获取平台字典
- export type PlatformPubDirDataType = { code: string; value: string | number; dataVoList: { code: string; value: string | number; sort: number; defaultValue: number }[] }
- export const getPlatformDictionary = async (key?: string) => {
- return request<PlatformPubDirDataType[]>('/centerSys/sysdictdata/getDictData', {
- method: 'GET',
- params: { dictType: key },
- });
- };
- //获取指标相关字典
- export type IndicatorDictionaryDataType = {
- type:number;
- status:string;
- parentId:number;
- name:string;
- id:number;
- dictSort:number;
- code:string;
- children:IndicatorDictionaryDataType[]
- }
- export const getIndicatorDictionary = async () => {
- return request<IndicatorDictionaryDataType[]>('/centerSys/indicator/getDict', {
- method: 'GET',
- });
- };
|