<template>
  <div class="online">
    <m-scroll :length="list.length" :limit="6">
      <div class="item" v-for="(item, i) in list" :key="i">
        <p :title="item.question">{{i+1}}. {{item.question}}</p>
        <span :style="`color:${getColor(item.status)}`">{{item.date}} {{item.status ? '已处理' : '未处理'}}</span>
      </div>
    </m-scroll>
  </div>
</template>

<script>
export default {
  name: 'Online',
  data() {
    return {
      list: [
        {question: '病鱼上下颌，眼眶，鳍条基部，腹部充血发红，严重时眼球外突，两侧鳞片脱落，腹腔有淡红色液体。', date: '2020-8-21', status: 1},
        {question: '病鱼体色发黑，身体消瘦，食欲减退，严重时有大量鱼体聚集池边，鳃丝肿胀，呼吸困难而死。', date: '2020-8-20', status: 1},
        {question: '病鱼体色发黑，独游于池边，鳃丝腐烂带污泥，鳃丝末端有许多粘液。鳃盖骨内表中央部分被腐蚀成一个不规则的透明圆形窗。', date: '2020-8-20', status: 1},
        {question: '鳃丝末端发白腐烂， 常粘有污泥．软骨外露，一些病鱼鳍条腐烂，严重患者鳃盖骨内、外表皮充血发炎', date: '2020-8-19', status: 1},
        {question: '送检蟹活力较强，血液凝固较好，肠内有食，肝胰腺正常。镜检：鳃内未发现寄生虫，鳃丝清晰，肠内细菌', date: '2020-8-11', status: 1},
        {question: '送检蟹活力好，体表清晰，肝胰腺颜色正常，肠内有食。镜检：鳃内未发现寄生虫，肠内细菌正常。', date: '2020-8-11', status: 1},
        {question: '如何治疗河蟹水瘪子病？如何进行预防？', date: '2020-8-2', status: 1},
        {question: '高温期间，如何做好鳜鱼病的防治工作', date: '2020-8-1', status: 1},
        {question: '送检蟹活力较差，底板发黄，指尖发红，肝脏发肉色和白色。镜检：鳃内未发现寄生虫，污物较多，肠内细', date: '2020-7-30', status: 1},
        {question: '镜检腮丝有纤毛虫，肠道与肛门红肿充血', date: '2020-7-30', status: 1},
        {question: '鱼体表有疥疮，鱼鳍有部分腐烂，腮丝红肿充血，', date: '2020-7-30', status: 1},
        {question: '鱼大批死亡', date: '2020-7-30', status: 1},
      ],
    }
  },
  methods: {
    getColor(status) {
      return status ? '#3897b5' : '#d04e4b'
    }
  }
}
</script>

<style lang="stylus" scoped>
.online
  width 100%
  height 100%
  overflow hidden
  .item
    display flex
    align-items center
    justify-content space-between
    line-height 2.5
    border-bottom .1rem solid $color-map(.6)
    >p
      width 66%
      overflow hidden
      white-space nowrap
      text-overflow ellipsis
    >span
      font-size .9rem
</style>
