美文网首页
助教君项目

助教君项目

作者: 彭奕泽 | 来源:发表于2018-10-25 10:03 被阅读0次
  1. 报告首页
    首页考试列表数据就在list里,首页展示的列表在rest里。
    更新后把词汇和阅读一起获取到list里

  2. 报告首页点击
    点击list是通过那一项里有没有subject_id来判断的,有就是普通考试,无就是联考(在union.js里)

  3. 报告首页图表判断
    通过联考无subject数据,普通考试有subject判断,在exam-rank-card卡片里

4. 小技巧

  1. 在plugins里给vue的原型定义一个属性$query,在全局用这个属性随时取到当前页面的query
Object.defineProperty(Vue.prototype, '$query', {
  get () {
    return this.$route.query
  },
})
  1. 改mint-ui样式时,没有scoped的css需要加个/deep/
<style> 
  .mt-progress /deep/ .mt-progress-progress
    background-color white
</style>
  1. 巧用map!

我的垃圾代码

let read = this.recent.knowledge[0].avg_score / this.recent.knowledge[0].total_score
let obj = {}
obj.cn_name = '阅读'
obj.value = read
obj.key = 0
rank.push(obj)
let listening = this.recent.knowledge[1].avg_score / this.recent.knowledge[1].total_score
obj.cn_name = '听力'
obj.value = listening
obj.key = 1
rank.push(obj)
let grammar = this.recent.knowledge[0].avg_score / this.recent.knowledge[0].total_score
obj.cn_name = '语法'
obj.value = grammar
obj.key = 2
rank.push(obj)

风鸣改的

let rank = ['阅读', '听力', '语法'].map((title, key) => {
  return {
    title,
    value: this.recent.knowledge[key].avg_score / this.recent.knowledge[key].total_score,
    key,
  }
})
  1. 巧用map
    风鸣写的,echart的配置
series: [
  {
    name: '班级',
    type: 'bar',
    barMaxWidth: 30,
    label: { 
      normal: { show: true, position: 'top', color: '#444' } },
      color: ['#4db5f8'],
      data: classData.map(d => ({
        value: d || 0,
        label: { normal: { show: d > 0 } },
      })),
    },
    {
      name: '学生',
      type: 'bar',
      barMaxWidth: 30,
      label: { 
        normal: { show: true, position: 'top', color: '#444' } },
        color: ['#f5aa41'],
        data: studentData.map(d => ({
          value: d || 0,
          label: { normal: { show: d > 0 } },
        })),
     },
],
  1. 组织router-link的点击事件
<router-link :to="getDownloadRoute(item)" @click.native="$event.stopPropagation()">
  <mt-button type="primary" size="normal">下载</mt-button>
</router-link>

相关文章

  • 助教君项目

    报告首页首页考试列表数据就在list里,首页展示的列表在rest里。更新后把词汇和阅读一起获取到list里 报告首...

  • lodash入门

    1. _.orderBy 助教君项目把name===English的放前面 a.en_name === 'engl...

  • 如何看待这件事?

    一大早,在项目组的小群里,项目负责人发了一封来自一位助教的建议书。 对昨天早上召开的助教复盘会议,提了几点这位助教...

  • 万万没想到

    万万没想到 —— 我的特岗青椒助教之旅 佘丽君...

  • 【周检视】0304-0310.2019

    易效能相关项目: 1. 成人班易效能见习助教 1.1报名参加见习助教学习/加入技术部见习 1.2完成见习助教青蛙&...

  • 统整课程助教小结

    走进统整项目课程,纯粹是一种机缘巧合,因为助教工作的调整,我被调到了统整项目课程来做助教。从此,我就...

  • ppt里学问多,不妨给她化化妆--听君君老师分享有感

    今天有幸听君君美女在互加多彩助教群里讲ppt的制作技术,感觉太实用了。 今晚分享内容 君君老师按照找模板、定板块、...

  • 做PPT的化妆师

    互加多彩助教第五次会议,由君君老师为我们带来的《PPT的化妆术》,君君老师柔声细语、慢条斯理的为我们一一的分析了如...

  • 2017.11.26 反思日记

    今天是正式参与精鹰项目的第一天。我虽身为助教角色,但由于有其他项目任务兼具,在助教义务履行方面并未达到自身预期目标...

  • 学车助教-项目参考

    学车应用APP,考试的基本线路是决定的,考试的路线也是确定的,考试的基本技巧也是确定的。为什么不用百度地图模拟一个...

网友评论

      本文标题:助教君项目

      本文链接:https://www.haomeiwen.com/subject/kaiswftx.html