TaskStatistics.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="dashboard-editor-container" v-if="getTaskData">
  3. <!-- <div class="board-title">-->
  4. <!-- {{ getTaskData && getTaskData.taskName }}-->
  5. <!--&lt;!&ndash; <el-button type="primary" @click="goToReview" class="review-btn">去评审</el-button>&ndash;&gt;-->
  6. <!-- </div>-->
  7. <project-search :firstSelectedProjectCode="selectedProjectCode"></project-search>
  8. <task-search :firstSelectedTaskCode="selectedTaskCode" :selectedCallback="getTaskData"></task-search>
  9. <panel-group :info="taskInfo" :taskCode="selectedTaskCode"/>
  10. <el-row :gutter="20" style="background:transparent;margin-bottom:32px;height: 650px">
  11. <el-col :xs="24" :sm="24" :lg="5" style="height: 100%">
  12. <info-card style="height:100%;margin-bottom: 20px" :task="taskInfo"/>
  13. <!-- <box-card style="height: 37%;position: relative;bottom: 0"/>-->
  14. </el-col>
  15. <el-col :xs="24" :sm="24" :lg="14">
  16. <StaffDistribution
  17. :task-info="taskInfo"
  18. v-if="taskInfo"
  19. class="card-shadow">
  20. </StaffDistribution>
  21. <div style="height: 650px;width: 100%"
  22. v-else
  23. v-loading="loading"
  24. element-loading-text="数据加载中">
  25. </div>
  26. </el-col>
  27. <el-col :xs="24" :sm="24" :lg="5" style="height: 100%">
  28. <transaction-table :list="taskInfo.testers" :task-code="selectedTaskCode" style="height: 100%" class="card-shadow"/>
  29. </el-col>
  30. </el-row>
  31. <el-row :gutter="15">
  32. <el-col :xs="24" :sm="24" :lg="8">
  33. <div class="chart-wrapper card-shadow">
  34. <bug-level-chart :counts="taskInfo.defectSeriCounts"/>
  35. </div>
  36. </el-col>
  37. <el-col :xs="24" :sm="24" :lg="8">
  38. <div class="chart-wrapper card-shadow">
  39. <bug-time-count-chart :bug-time-counts="taskInfo.defectTimeCountMap"/>
  40. </div>
  41. </el-col>
  42. <el-col :xs="24" :sm="24" :lg="8">
  43. <div class="chart-wrapper card-shadow">
  44. <bug-type-chart :gradeList="gradeList" :bug-type-counts="taskInfo.defectTypeCountMap"/>
  45. </div>
  46. </el-col>
  47. </el-row>
  48. </div>
  49. </template>
  50. <script>
  51. import PanelGroup from './components/PanelGroup'
  52. import BugLevelChart from './components/BugLevelChart'
  53. import BugTimeCountChart from './components/BugTimeCountChart'
  54. import BugTypeChart from './components/BugTypeChart'
  55. import TransactionTable from './components/TransactionTable'
  56. import TodoList from './components/TodoList'
  57. import InfoCard from './components/InfoCard'
  58. import StaffDistribution from './components/map/StaffDistributionMap'
  59. import ProjectSearch from '@/components/project/ProjectSearch'
  60. import TaskSearch from '@/components/project/TaskSearch'
  61. import Api from '@/js/api'
  62. import Http from '@/js/http'
  63. import {notify} from '@/constants'
  64. import Project from '../../components/project/Project'
  65. export default {
  66. name: 'TaskBoard',
  67. components: {
  68. Project,
  69. PanelGroup,
  70. BugTimeCountChart,
  71. BugLevelChart,
  72. BugTypeChart,
  73. TransactionTable,
  74. TodoList,
  75. InfoCard,
  76. StaffDistribution,
  77. ProjectSearch,
  78. TaskSearch
  79. },
  80. data () {
  81. return {
  82. topData: {},
  83. taskInfo: {},
  84. workList: [],
  85. gradeList: {},
  86. workerDistribute: [],
  87. loading: true,
  88. progress: 0,
  89. selectedProjectCode: this.$route.params.projectCode,
  90. selectedTaskCode: this.$route.params.taskCode
  91. }
  92. },
  93. methods: {
  94. getTaskData (taskCode) {
  95. Http.get(Api.TASK.TASK_STATISTICS.replace('{taskCode}', taskCode)).then((res) => {
  96. this.taskInfo = res.data
  97. }).catch((error) => {
  98. notify('error', '获取任务信息失败:系统异常')
  99. })
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss" scoped>
  105. .dashboard-editor-container {
  106. padding: 20px;
  107. background-color: rgb(240, 242, 245);
  108. position: relative;
  109. .board-title {
  110. text-align: center;
  111. font-size: 30px;
  112. font-weight: bolder;
  113. margin-bottom: 15px;
  114. position: relative;
  115. .review-btn {
  116. position: absolute;
  117. right: 0;
  118. }
  119. }
  120. .github-corner {
  121. position: absolute;
  122. top: 0px;
  123. border: 0;
  124. right: 0;
  125. }
  126. .chart-wrapper {
  127. background: #fff;
  128. padding: 16px 16px 0;
  129. margin-bottom: 32px;
  130. }
  131. }
  132. .card-shadow {
  133. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  134. }
  135. @media (max-width: 1024px) {
  136. .chart-wrapper {
  137. padding: 8px;
  138. }
  139. }
  140. @media (max-width: 550px) {
  141. .review-btn {
  142. display: none;
  143. }
  144. }
  145. </style>