list.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <div>
  3. <div v-for="item in data" :key="item.date" class="list">
  4. <div class="tableTitle">{{ item.date }}</div>
  5. <el-table
  6. v-loading="table_loading"
  7. :data="item.data"
  8. style="width: 100%;"
  9. highlight-current-row
  10. :header-cell-style="{ 'background':'#F7F7F7', 'color':'#4a4a4a','font-size':'14px','font-weight':'500' }"
  11. :cell-style="{ 'font-size':'14px','color':'rgba(102,102,102,1)' }"
  12. size="small"
  13. show-overflow-tooltip="true"
  14. >
  15. <el-table-column label="优先级" width="105" prop="priority" sortable align="right">
  16. <template slot-scope="scope">
  17. <span class="div_priority" :style="{background: priorityColors[scope.row.priority]}">{{ scope.row.priorityName }}</span>
  18. </template>
  19. </el-table-column>
  20. <el-table-column label="标题" min-width="200" show-overflow-tooltip align="left">
  21. <template slot-scope="scope">
  22. <div>
  23. <div class="titleId">
  24. PROBLEM-{{ scope.row.id }}
  25. </div>
  26. <div class="title" @click.stop="gotoDetail(scope.row)">
  27. {{ scope.row.title }}
  28. </div>
  29. </div>
  30. </template>
  31. </el-table-column>
  32. <el-table-column label="责任团队" min-width="150" prop="teamName" show-overflow-tooltip align="center" />
  33. <el-table-column label="复盘链接" show-overflow-tooltip align="center">
  34. <template slot-scope="scope">
  35. <i v-if="scope.row.replayUrl" class="el-icon-link" @click="goto(scope.row.replayUrl)" />
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="改进项已完成" min-width="130" show-overflow-tooltip align="center">
  39. <template slot="header">
  40. 改进项已完成
  41. <el-tooltip effect="dark" content="已完成改进项条数/总改进项条数" placement="top-start">
  42. <i class="el-icon-info" />
  43. </el-tooltip>
  44. </template>
  45. <template slot-scope="scope">
  46. <span :class="scope.row.finishImpr !== scope.row.imprTotal && 'origin'">{{ scope.row.finishImpr }}</span>
  47. /
  48. <span :class="scope.row.finishImpr !== scope.row.imprTotal && 'origin'">{{ scope.row.imprTotal }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="是否星辰花定级" min-width="130" show-overflow-tooltip align="center">
  52. <template slot-scope="scope">{{ scope.row.isGrading ? '是' : '否' }}</template>
  53. </el-table-column>
  54. <el-table-column label="影响面" min-width="120" show-overflow-tooltip align="center">
  55. <template slot-scope="scope">{{ scope.row.influenceSurfaceName }}</template>
  56. </el-table-column>
  57. <el-table-column label="发生时间" min-width="150" prop="happenDate" show-overflow-tooltip align="center" />
  58. <el-table-column label="创建人" prop="creatorName" show-overflow-tooltip align="center" />
  59. </el-table>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. export default {
  65. components: {
  66. // searchHeader
  67. },
  68. props: {
  69. data: {
  70. type: Array,
  71. default: () => [],
  72. required: true
  73. }
  74. },
  75. data() {
  76. return {
  77. table_loading: false,
  78. priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD']
  79. }
  80. },
  81. methods: {
  82. gotoDetail(data) {
  83. const { href } = this.$router.resolve({
  84. name: '质惠线上问题详情',
  85. query: {
  86. id: data.id
  87. }
  88. })
  89. window.log({ c: 'problem', d: 'get_problem_detail' })
  90. window.open(href, '_blank')
  91. },
  92. goto(url) {
  93. window.open(url, '_blank')
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .list {
  100. padding-bottom: 40px;
  101. .tableTitle{
  102. color: #333;
  103. font-size: 16px;
  104. padding: 16px 30px;
  105. background: #fff;
  106. font-weight: 700;
  107. }
  108. .titleId {
  109. font-size: 12px;
  110. color: #A7AEBC;
  111. }
  112. .title {
  113. line-height: 23px;
  114. font-size: 14px;
  115. color: #666;
  116. &:hover {
  117. color: #409eff;
  118. cursor: pointer;
  119. background: #f5f7fa;
  120. }
  121. }
  122. .origin {
  123. color: #EE7546;
  124. }
  125. .div_priority {
  126. display: inline-block;
  127. text-align: center;
  128. width: 38px;
  129. text-align: center;
  130. line-height: 24px;
  131. font-size: 14px;
  132. color: #fff;
  133. border-radius: 4px;
  134. margin-right: 30px;
  135. }
  136. }
  137. </style>