Skip to content

Commit

Permalink
修复:颜色问题,标注列表显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
PPzXiao committed May 22, 2020
1 parent e7c4a94 commit 8b1f5f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/views/label/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
min-width="100"
>
<template slot-scope="scope">
<span>{{ scope.row.annotate_progress.finish_num }}</span>
<span>{{ scope.row.annotate_progress.waiting_num }}</span>
</template>
</el-table-column>
<el-table-column
Expand All @@ -73,7 +73,7 @@
>
<template slot-scope="scope">
<el-progress
:percentage="percent(scope.row.annotate_progress.finish_num,scope.row.annotate_progress.total_num)"
:percentage="percent(scope.row.annotate_progress.waiting_num,scope.row.annotate_progress.total_num)"
:format="format"
/>
</template>
Expand Down Expand Up @@ -160,7 +160,7 @@ export default {
}
})
})
// console.log(this.list)
console.log(this.list)
}
})
},
Expand Down
15 changes: 12 additions & 3 deletions src/views/specification/newSpecification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1206,10 +1206,19 @@ export default {
this.form2.entityGroups[this.editIndex].entitys.splice(index, 1)
},
color16() { // 十六进制颜色随机
var r = Math.floor(Math.random() * 256)
var g = Math.floor(Math.random() * 256)
var b = Math.floor(Math.random() * 256)
var r = Math.floor(Math.random() * 240) + 16
var g = Math.floor(Math.random() * 240) + 16
var b = Math.floor(Math.random() * 240) + 16
var color = '#' + r.toString(16) + g.toString(16) + b.toString(16)
console.log(r, g, b, color)
for (let i = 0; i < this.form2.entityGroups.length; i++) {
for (let j = 0; j < this.form2.entityGroups[i].entitys.length; j++) {
if (this.form2.entityGroups[i].entitys[j].color === color) {
this.color16()
}
}
}
return color
},
newEntity() {
Expand Down

0 comments on commit 8b1f5f1

Please sign in to comment.