const KNOWLEDGE = ["词汇", "句法知识", "语篇知识", "短文理解", "音标理解"];
const RATES = ["个人得分率", "本院平均得分率"];

const KNOWLEDGE_DETAILS = [
  "名词",
  "形容词",
  "谓语动词",
  "副词",
  "复合句",
  "句子衔接",
  "短语搭配"
];

const getRandomNum = (min, max) => {
  return ((max - min) * Math.random() + min).toFixed(2) * 1;
};

const knowledgeRates = RATES.map(name => {
  return {
    name,
    datas: KNOWLEDGE.map(item => {
      return {
        name: item,
        value: getRandomNum(0.4, 1)
      };
    })
  };
});
const knowledgeDetailRates = RATES.map(name => {
  return {
    name,
    datas: KNOWLEDGE_DETAILS.map((item, index) => {
      return {
        name: item,
        label: "A" + (index + 1),
        value: getRandomNum(0.2, 1)
      };
    })
  };
});

const levels5 = [
  {
    name: "A",
    range: [90, 100]
  },
  {
    name: "B",
    range: [80, 90]
  },
  {
    name: "C",
    range: [60, 80]
  },
  {
    name: "D",
    range: [40, 60]
  },
  {
    name: "E",
    range: [0, 40]
  }
];
// const levels4 = [
//   {
//     name: "A",
//     range: [80, 100]
//   },
//   {
//     name: "B",
//     range: [60, 80]
//   },
//   {
//     name: "C",
//     range: [30, 60]
//   },
//   {
//     name: "D",
//     range: [0, 30]
//   }
// ];

export default {
  levelInfo: {
    levels: levels5,
    curLevel: "D"
  },
  knowledgeRates,
  knowledgeDetailRates,
  // main
  student: {
    name: "李雨璇",
    studentNo: "11260103",
    college: "通信技术学院",
    clazz: "通信三班",
    examName: "期末考试",
    subject: "通信技术",
    time: "2020年10月26日",
    level: "B",
    levels: [
      {
        level: "A",
        grade: [80, 100]
      },
      {
        level: "B",
        grade: [60, 80]
      },
      {
        level: "C",
        grade: [40, 60]
      },
      {
        level: "D",
        grade: [20, 40]
      },
      {
        level: "E",
        grade: [0, 20]
      }
    ]
  },
  college: {
    synthesis: {
      myScore: 65.0,
      actualCount: 429,
      overRate: 59,
      collegeMinScore: 16.0,
      collegeAvgScore: 59.2,
      collegeMaxScore: 99.0,
      clazzMinScore: 58.0,
      clazzAvgScore: 75.2,
      clazzMaxScore: 90.0,
      fullScore: 100.0,
      difficult: 0.6,
      difficultInfo: "一般"
    },
    diagnosis: {
      result: true,
      list: [
        {
          name: "知识",
          modules: {
            dios: [
              {
                name: "记忆",
                rate: 68.0,
                collegeRate: 50.0
              },
              {
                name: "学习",
                rate: 58.0,
                collegeRate: 85.0
              },
              {
                name: "应用",
                rate: 88.0,
                collegeRate: 68.0
              },
              {
                name: "理解",
                rate: 58.0,
                collegeRate: 78.0
              },
              {
                name: "推断",
                rate: 80.0,
                collegeRate: 70.0
              }
            ],
            info: "学习和运用知识的心理加工过程",
            remark:
              "与以往传统考试单纯以部分对学生进行排序的评价方式不同，四维诊断评价能够综合分析你的学业发展长短板、优劣势，经由系统分析后出具详细的学业诊断评价报告。"
          },
          detail: {
            myScore: 86.0,
            masteryRate: 86.0,
            dioFullScore: 100,
            subDios: [
              {
                code: "A01",
                name: "碱金属元素化合物",
                proficiency: "H",
                scoreRate: 60,
                collegeAvgScore: 70
              },
              {
                code: "A02",
                name: "化学实验室注意事项",
                proficiency: "H",
                scoreRate: 80,
                collegeAvgScore: 75
              },
              {
                code: "A03",
                name: "化学式",
                proficiency: "M",
                scoreRate: 90,
                collegeAvgScore: 80
              },
              {
                code: "A04",
                name: "计量仪器",
                proficiency: "L",
                scoreRate: 70,
                collegeAvgScore: 80
              },
              {
                code: "A05",
                name: "数字模拟",
                proficiency: "M",
                scoreRate: 80,
                collegeAvgScore: 85
              },
              {
                code: "A06",
                name: "函数解析",
                proficiency: "H",
                scoreRate: 90,
                collegeAvgScore: 70
              },
              {
                code: "A07",
                name: "微机原理",
                proficiency: "H",
                scoreRate: 60,
                collegeAvgScore: 80
              }
            ],
            masterys: [
              {
                level: "H",
                grade: [85, 100]
              },
              {
                level: "M",
                grade: [60, 85]
              },
              {
                level: "L",
                grade: [0, 60]
              }
            ]
          }
        },
        {
          name: "技能",
          modules: {
            dios: [
              {
                name: "记忆",
                rate: 68.0,
                collegeRate: 50.0
              },
              {
                name: "学习",
                rate: 58.0,
                collegeRate: 85.0
              },
              {
                name: "应用",
                rate: 88.0,
                collegeRate: 68.0
              },
              {
                name: "理解",
                rate: 58.0,
                collegeRate: 78.0
              }
            ],
            info: "运用技能的过程",
            remark:
              "与以往传统考试单纯以部分对学生进行排序的评价方式不同，四维诊断评价能够综合分析你的学业发展长短板、优劣势，经由系统分析后出具详细的学业诊断评价报告。"
          },
          detail: {
            myScore: 75,
            masteryRate: 75,
            dioFullScore: 100,
            subDios: [
              {
                code: "A01",
                name: "洞察",
                proficiency: "L",
                scoreRate: 50,
                collegeAvgScore: 70
              },
              {
                code: "A02",
                name: "决策",
                proficiency: "H",
                scoreRate: 90,
                collegeAvgScore: 75
              },
              {
                code: "A03",
                name: "举一反三",
                proficiency: "H",
                scoreRate: 95,
                collegeAvgScore: 80
              },
              {
                code: "A04",
                name: "逻辑运算",
                proficiency: "L",
                scoreRate: 50,
                collegeAvgScore: 80
              },
              {
                code: "A05",
                name: "建模",
                proficiency: "M",
                scoreRate: 75,
                collegeAvgScore: 85
              },
              {
                code: "A06",
                name: "转换",
                proficiency: "H",
                scoreRate: 95,
                collegeAvgScore: 70
              },
              {
                code: "A07",
                name: "推理",
                proficiency: "H",
                scoreRate: 88,
                collegeAvgScore: 80
              }
            ],
            masterys: [
              {
                level: "H",
                grade: [85, 100]
              },
              {
                level: "M",
                grade: [60, 85]
              },
              {
                level: "L",
                grade: [0, 60]
              }
            ]
          }
        }
      ]
    }
  }
};
