import Mock from 'mockjs';//es6语法引入mock模块

//后续项目需要产生模拟数据即可使用此工具
export default {
  data: Mock.mock({
    'examList|10': [{
      "id|+1": 1,   
      "name": "@cname",  
      "ago|18-28": 25,     
      "sex|1": ["男", "女"],    
      "job|1": ["web", "UI", "python", "php"]  
    }], 
    'classList|8': [{
      "id|+1": 1,
      "name": function () {
        return "高二" + this.id + "班"
      },
      "classId|+1": 140015511001,
      "average|520-630": 630,
      "totalNum|50-70": 70,
      "entryNum|50-70": function () {
        return (this.totalNum - Math.ceil(Math.random() * 20))
      },
      "gradeRank": function () {
        return this.id
      },
      "entryRate": function () {
        return (this.entryNum / this.totalNum).toFixed(2) * 100 + '%'
      },
      "standardDeviation": 55,
      "rankStatus|1-8": 1
    }],
    'studentList|60': [{
      "id|+1": 1,
      "name": "@cname",
      "className":"初一5班",
      "memberId|+1": 140015511001,
      "score|520-630": 630,
      "classRank|1-60": 1,
      "classPR": function () {
        return 100 - Math.ceil(Math.random() * 20)
      },
      "gradeRank|1-200": function () {
        return this.classRank + Math.ceil(Math.random() * 100);
      },
      "gradePR": function () {
        return 100 - Math.ceil(Math.random() * 20)
      },
      "areaRank|1-400": function () {
        return this.classRank + Math.ceil(Math.random() * 300)
      },
      "areaPR": function () {
        return 100 - Math.ceil(Math.random() * 20)
      },
      "chinese|90-150": 150,
      "math|90-150": 150,
      "english|90-150": 150,
      "chemistry|60-100": 100,
      "physics|60-100": 100,
      "biology|60-100": 100,
      "chineseRank|1-400":400,
      "mathRank|1-400":400,
      "englishRank|1-400":400,
      "chemistryRank|1-400":400,
      "physicsRank|1-400":400,
      "biologyRank|1-400": 400,
      "changesStatus|1": [1, -1, 0],
      "changesStatus2|1": [1, -1, 0],
      "changesStatus3|1": [1, -1, 0],
      "changesVal|1-30":1,
      "changesVal2|1-30":1,
      "changesVal3|1-30":1,
    }],
    'subjectList|10': [{
      "id|+1": 1,
      "className|1-10": 1,
      "chinese|60-120": 60,
      "math|60-120": 60,
      "english|60-120": 60,
      "physics|60-120": 60,
      "chemistry|60-120": 60,
      "biology|60-120": 60,
    }], 
    })
};


