赵士淞
2023-05-09 b8441a1ac74d2c3325dd36d69ced511f19cd760b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
  <div :style="{ height: height, width: width }">
    <div class="leave-title">项目区分未完成工时排行</div>
    <div class="leave-box">
      <div class="block">
        <el-timeline :reverse="reverse">
          <el-timeline-item
            v-for="(item, index) in projectList"
            :key="index"
            :timestamp="'未完成工时:' + item.incompleteTaskTime"
          >
            TOP{{ index + 1 }} : {{ item.name }}
          </el-timeline-item>
        </el-timeline>
      </div>
    </div>
  </div>
</template>
 
<script>
import crudProject from '@/api/project/project'
import constant from '../../../utils/constant'
 
export default {
  props: {
    width: {
      type: String,
      default: '100%'
    },
    height: {
      type: String,
      default: '400px'
    },
    projectDistinguish: {
      type: String,
      default: null
    }
  },
  data() {
    return {
      // 时间线排序
      reverse: false,
      // 项目数据
      projectList: []
    }
  },
  mounted() {
    // 获取项目数据
    this.getProjectList()
  },
  methods: {
    // 获取项目数据
    getProjectList() {
      // 获取考勤请假数据
      crudProject.getSubgroupTopHours({ projectDistinguish: this.projectDistinguish, projectStatus: constant.PROJECT_STATUS_UNDER_WAY }).then(res => {
        // 项目数据
        this.projectList = res
      })
    }
  }
}
</script>
 
<style scoped>
.leave-title {
  color: #55A4C4;
  width: 100%;
  text-align: left;
  font-size: 18px;
}
.leave-box {
  margin-top: 30px;
  padding-top: 6px;
  height: 348px;
  overflow-y: auto;
}
</style>