[update 首页] 标准状态颜色
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
<template v-slot:standardState="text, record">
|
<template v-slot:standardState="text, record">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div v-if="text" class="status-style" :class="getStandardStateClass(record)">{{ text }}</div>
|
<div v-if="text" class="status-style" :style="getStandardStateStyle(record)">{{ text }}</div>
|
||||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -328,34 +328,48 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取标准状态
|
// 获取标准状态
|
||||||
getStandardStateClass (row) {
|
getStandardStateStyle (row) {
|
||||||
|
let color = ''
|
||||||
switch (row.standardState + '') {
|
switch (row.standardState + '') {
|
||||||
// 起草
|
// 草案
|
||||||
case StandardStatus.DRAFT.value:
|
case StandardStatus.DRAFT.value:
|
||||||
return 'status-style-1'
|
color = '243, 129, 65'
|
||||||
// 征求意见
|
break
|
||||||
|
// 征求意见
|
||||||
case StandardStatus.SEEK_FOR_OPTIONS.value:
|
case StandardStatus.SEEK_FOR_OPTIONS.value:
|
||||||
return 'status-style-2'
|
color = '129, 206, 94'
|
||||||
// 审查
|
break
|
||||||
|
// 审查
|
||||||
case StandardStatus.EXAMINE.value:
|
case StandardStatus.EXAMINE.value:
|
||||||
return 'status-style-3'
|
color = '255, 98, 98'
|
||||||
// 报批
|
break
|
||||||
|
// 报批
|
||||||
case StandardStatus.APPROVAL.value:
|
case StandardStatus.APPROVAL.value:
|
||||||
return 'status-style-4'
|
color = '48, 175, 255'
|
||||||
// 发布
|
break
|
||||||
|
// 发布
|
||||||
case StandardStatus.RELEASE.value:
|
case StandardStatus.RELEASE.value:
|
||||||
return 'status-style-5'
|
color = '6, 176, 140'
|
||||||
// 现行有效(外部标准\企标)
|
break
|
||||||
|
// 现行有效(外部标准\企标)
|
||||||
case StandardStatus.CURRENTLY_EFFECTIVE.value:
|
case StandardStatus.CURRENTLY_EFFECTIVE.value:
|
||||||
case EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value:
|
case EnterpriseStandardStatus.CURRENTLY_EFFECTIVE.value:
|
||||||
return 'status-style-6'
|
color = '137, 138, 233'
|
||||||
// 废止(外部标准\企标)
|
break
|
||||||
|
// 废止(外部标准\企标)
|
||||||
case StandardStatus.ABOLISH.value:
|
case StandardStatus.ABOLISH.value:
|
||||||
case EnterpriseStandardStatus.ABOLISH.value:
|
case EnterpriseStandardStatus.ABOLISH.value:
|
||||||
return 'status-style-7'
|
color = '156, 177, 208'
|
||||||
default:
|
break
|
||||||
return ''
|
|
||||||
}
|
}
|
||||||
|
if (color) {
|
||||||
|
return {
|
||||||
|
backgroundColor: `rgba(${color}, 0.1)`,
|
||||||
|
border: `1px solid rgba(${color}, 0.5)`,
|
||||||
|
color: `rgba(${color}, 1)`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 查看标准分解单
|
* 查看标准分解单
|
||||||
@@ -595,46 +609,4 @@ export default {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
// 起草
|
|
||||||
.status-style-1 {
|
|
||||||
background-color: rgba(243, 129, 65, 0.1);
|
|
||||||
border: 1px solid rgba(243, 129, 65, 0.5);
|
|
||||||
color: rgba(243, 129, 65, 1);
|
|
||||||
}
|
|
||||||
// 征求意见
|
|
||||||
.status-style-2 {
|
|
||||||
background-color: rgba(129, 206, 94, 0.1);
|
|
||||||
border: 1px solid rgba(129, 206, 94, 0.5);
|
|
||||||
color: rgba(129, 206, 94, 1);
|
|
||||||
}
|
|
||||||
// 审查
|
|
||||||
.status-style-3 {
|
|
||||||
background-color: rgba(255, 98, 98, 0.1);
|
|
||||||
border: 1px solid rgba(255, 98, 98, 0.5);
|
|
||||||
color: rgba(255, 98, 98, 1);
|
|
||||||
}
|
|
||||||
// 报批
|
|
||||||
.status-style-4 {
|
|
||||||
background-color: rgba(48, 175, 255, 0.1);
|
|
||||||
border: 1px solid rgba(48, 175, 255, 0.5);
|
|
||||||
color: rgba(48, 175, 255, 1);
|
|
||||||
}
|
|
||||||
// 发布
|
|
||||||
.status-style-5 {
|
|
||||||
background-color: rgba(6, 176, 140, 0.1);
|
|
||||||
border: 1px solid rgba(6, 176, 140, 0.5);
|
|
||||||
color: rgba(6, 176, 140, 1);
|
|
||||||
}
|
|
||||||
// 现行有效
|
|
||||||
.status-style-6 {
|
|
||||||
background-color: rgba(137, 138, 233, 0.1);
|
|
||||||
border: 1px solid rgba(137, 138, 233, 0.5);
|
|
||||||
color: rgba(137, 138, 233, 1);
|
|
||||||
}
|
|
||||||
// 废止
|
|
||||||
.status-style-7 {
|
|
||||||
background-color: rgba(156, 177, 208, 0.1);
|
|
||||||
border: 1px solid rgba(156, 177, 208, 0.5);
|
|
||||||
color: rgba(156, 177, 208, 1);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user