Commit f4a16cce authored by dlkong's avatar dlkong

四色图增加评分判断

parent 5b3ed6c5
......@@ -62,6 +62,8 @@ export default {
"riskExecution",
"riskAssess",
"riskApprove",
"taskList",
"taskDetail"
],
// cachePage预先定义的缓存页面
......
......@@ -218,6 +218,20 @@ export default {
if (!this.isViews || item.position.type == 'thorough') { //添加页面不显示颜色
item.position.c = '#e6e5e5'
}else{
/**
* 根据风险评分来匹配相应的颜色
* score 风险评分字段
*/
// item.score = Number(item.score)
// if (item.score>=21 && item.score <= 27) { //优
// item.position.c = this.colorList[3]
// }else if(item.score>=14 && item.score <=20){ //良
// item.position.c = this.colorList[2]
// }else if (item.score>=7&& item.score <= 13) { //中
// item.position.c = this.colorList[1]
// }else if (item.score>=0 && item.score <= 6) { //差
// item.position.c = this.colorList[0]
// }
item.position.c = this.colorList[Math.floor(Math.random()*4)]
}
this.layout.push(item.position)
......@@ -440,7 +454,6 @@ export default {
.vue-grid-layout {
background: #f0f1f5;
}
.vue-grid-item:not(.vue-grid-placeholder) {
background: #ccc;
border: 1px solid black;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment