<template>
  <div style="display: flex; flex-direction: column">
  </div>
</template>

<script>
import moment from 'moment'
import { timeFix } from '../../../packages/utils/util'

import { mapState } from 'vuex'
export default {
  name: 'Analysis',
  components: {
  },
  data () {
    return {
      timeFix: timeFix(),
      user: {},
      version: 3.0,
      dailyMonth: true,
      mode: ['month', 'month'],
      monthRange: [moment(), moment()],
      monthPick: moment(),
      favorLists: [],
      noticeLists1: [],
      noticeLists2: [],
      loading: true,
      height: null
    }
  },
  created () {
    this.user = this.userInfo
    this.height = window.innerHeight - 100
  },
  mounted () {
  },
  computed: {
    ...mapState({
      nickname: (state) => state.user.nickname,
      welcome: (state) => state.user.welcome
    }),
    userInfo () {
      return this.$store.getters.userInfo
    },
    datePick () {
      const endofMonth = moment(this.monthPick).endOf('month').format('DD')
      const selectMonth = this.monthPick.format('YYYY-MM')
      const pickMonth = []
      pickMonth.push(`${selectMonth}-01 00:00:00`)
      pickMonth.push(`${selectMonth}-${endofMonth} 23:59:59`)
      return pickMonth
    },
    dateRange () {
      const endofMonth = moment(this.monthRange[1]).endOf('month').format('DD')
      const startMonth = this.monthRange[0].format('YYYY-MM')
      const endMonth = this.monthRange[1].format('YYYY-MM')
      const pickMonth = []
      pickMonth.push(`${startMonth}-01 00:00:00`)
      pickMonth.push(`${endMonth}-${endofMonth} 23:59:59`)
      return pickMonth
    },
    show () {
      return process.env.NODE_ENV !== 'test'
    }
  },
  methods: {
    startLoading () {
      this.loading = true
    },
    stopLoading () {
      this.loading = false
    },
    handlePanelChange (value, mode) {
      this.monthRange = value
      this.mode = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]]
    },
    handleChange () {},
    dailyUpdate () {
      this.dailyMonth = true
    },
    monthUpdate () {
      this.dailyMonth = false
    },
    goPage (favor) {
      this.$router.push({
        path: favor.tailInfos.tUmResource.webUrl
      })
    }
  }
}
</script>
<style lang="less" scoped>
@import './Workplace.less';
.card-content {
  display: inline-block;
  flex: 1;
  margin: 5px 10px;
  height: 100%;
}
.extra-wrapper {
  line-height: 55px;
  padding-right: 24px;
  font-size: 12px;
  .extra-item {
    display: inline-block;
    margin-right: 24px;

    a {
      margin-left: 24px;
    }
  }
}
.content-item {
  position: relative;
  display: inline-block;
  vertical-align: top;
  text-align: center;
  width: 80px;
  height: 100px;
  margin: 18px;
  border-radius: 4px;
  background: #fff;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
}
.content-item-icon {
  display: inline-block;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 8px;
}
.content-item-name {
  width: 100%;
  margin: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 20px;
}
.notice-button {
  margin-top: 10px;
  float: right;
}
</style>
