/*
 * @Author: your name
 * @Date: 2021-09-14 10:22:42
 * @LastEditTime: 2022-03-31 17:24:05
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/typings.d.ts
 */



declare namespace API {
  type RecordsItemType = {
    evaluation: string;
    details?:
      | {
          userName: string;
          fileName: string;
          fileUrl: string;
          createTime: string;
          recordTypeName: string;
        }[]
      | [];
    records?:
      | {
          existHistory: boolean;
          uploadUserName: string;
          fileName: string;
          fileUrl: string;
          uploadTime: string;
          accountName: string;
          accountType: string;
          cateId: number;
          historyVersionVOList: {
            versionName: string;
            accountName: string;
            uploadUserName: string;
            fileName: string;
            fileUrl: string;
            uploadTime: string;
            id: number;
          }[];
        }[]
      | [];
  };

  export type Type_fmImplementations = {
    id: number;
    numStr: string;
    version: string;
    level: string;
    note: string;
    userAccount: string;
    userName: string;
    hospId: number;
    createTime: number;
    updateTime: number;
    deleteTime: number;
  };

  type Type_pfmViewRuleDetailDataVoList = {
    evaluation: string;
    viewRuleAndLevelVos: {
      grade: string;
      detail: string;
    }[];
  };

  type Type_reviewArticle = {
    id: number;
    ruleId: number;
    numStr: string;
    version: string;
    selfEvaluation: string;
    targetEvaluation: string;
    systemEvaluation: string;
    siteEvaluation: string;
    responsibilityDepartmentId: number;
    responsibilityDepartmentName: string; // 负责单位名称
    responsibilityUserId: number;
    responsibilityUserName: string; // 负责人名称
    accountType: string; // 条文组别
    hospId: number;
    userId: number,
    userIds:number[];
    pfmReviewArticleDepartList:{
      responsibilityDepartmentId:number;
      responsibilityDepartmentName:string;
      responsibilityUserId:number;
      responsibilityUserName:string;
    }[];  //合作单位及负责人
    // recordDay: number;
    // createTime: number;
    // updateTime: number;
    // deleteTime: number;
  };

  type LeafDataType = {
    pfmImplementations: Type_fmImplementations[]; // 执行情况
    pfmViewRuleDetailDataVoList: Type_pfmViewRuleDetailDataVoList[]; // 等级细则
    reviewArticle: Type_reviewArticle; // 四码对应的组别/负责人等数据
  };

  type settingArticlePostDataType = {
    id: number; // maybe 0
    ruleId: number;
    responsibilityDepartmentId: number;
    responsibilityDepartmentName: string;
    responsibilityUserId: number;
    responsibilityUserName: string;
    targetEvaluation: string;
    articleType: string;
    responsibilityList:{
      responsibilityDepartmentId:number;
      responsibilityDepartmentName:string;
      responsibilityUserId:number;
      responsibilityUserName:string;
    }[];
  };

  type tableDataItemType = {
    id: number;
    numStr: string;
    name: string;
    accountType: string;
    responsibilityDepartmentName: string;
    responsibilityUserName: string;
    selfEvaluation: string;
    targetEvaluation: string;
    systemEvaluation: string;
    siteEvaluation: string;
  };

  type batchSettingArticleType = {
    ruleIds: number[] | string[] | [];
    responsibilityDepartmentId: number;
    responsibilityDepartmentName: string;
    responsibilityUserId: number;
    responsibilityUserName: string;
    targetEvaluation: string;
    articleType: string;
    responsibilityList:{
      responsibilityDepartmentId:number;
      responsibilityDepartmentName:string;
      responsibilityUserId:number;
      responsibilityUserName:string;
    }[];
  };

  type GetSelfEvaluationRequestType = {
    // 获取自评记录
    id: number;
    selfEvaluation: string;
    userName: string;
    createTime: number;
    createDate: string;
  }[];

  type SelfEvolutionCommitType = {
    id: number;
    selfEvaluation: string;
    userId: number;
    userName: string;
  };

  type RuleChildsItemType = {
    levelNumber: string;
    generalNameList: { id: number; generalName: string }[];
  };

  type TaizhangDirectoryTableItem = {
    id: number,
    numStr: string,
    grade: string,
    directory: string,
    accountType: string,
    accountStatus: string
  }

  type TaizhangImplementationItem = {
    id: number,
    numStr: string,
    level: string,
    note: string,
    userAccount: string,
    userName: string,
    hospId: string,
    [key: string]: any
  }  

  type ImplementationDtoListItem =  {
    node: string,
    selfEvaluation: string
  }

  type  TaizhangDataDirectoryCommitListItem = {
    accountStatus: string,
    accountType: string,
    dataStatus: number, // 操作状态 0不操作 1增加 2修改 3删除
    directory: string,
    grade: string,
    id: number,
    numStr: string,
    version: string
  }
}
