/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2022-06-27 15:43:25
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2023-04-13 18:25:20
 * @FilePath: /KC-MiddlePlatform/src/service/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */


import { request } from 'umi';



//获取用户首页数据

export interface UserInfo {
    gender:                     string;
    title:                      string;
    departmentId:               string;
    doctorLevel:                string;
    userCate:                   string;
    qualificationCertificateNo: string;
    account:                    string;
    jobTitle:                   string;
    entryTime:                  string;
    remark:                     string;
    name:                       string;
    id:                         string;
    departmentName:             string;
    practiceStatus:             string;
    avatarUrl:                  string;
    practiceCate:               string;
    practiceCertificateNo:      string;
    major:                      string;
    practiceSubject:string;
}

export const getUserIndexData = async () => {
    return request<{
        userInfo:UserInfo,
        recentVisit:any,
        fastEntrance:any,
        todoList:any,
        messageRecords:any
    }>('/centerSys/index/getMyIndex', {
      method: 'GET',
    });
};


//消息处理

export const todoListAct = async (data:number[]) => {
    return request('/centerSys/index/handleMessage', {
      method: 'POST',
      data: data,
    });
};


//查字典获取报表id，用于首页展示

export const getAllParams = async () => {
  return request('/centerSys/parameter', {
    method: 'GET',
  });
};

