给预警等级做颜色区分
This commit is contained in:
parent
2d8e2c3c2b
commit
a9705465b5
@ -26,6 +26,12 @@
|
|||||||
<template #region_name="scope">
|
<template #region_name="scope">
|
||||||
<span v-if="scope.row.region_info">{{scope.row.region_info.region_name}}</span>
|
<span v-if="scope.row.region_info">{{scope.row.region_info.region_name}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #risk_level="scope">
|
||||||
|
<span :class="{'success':scope.row.risk_level===1,'warning':scope.row.risk_level===2,'danger':scope.row.risk_level===3}">{{scope.row['risk_level']}}</span>
|
||||||
|
</template>
|
||||||
|
<template #risk_description="scope">
|
||||||
|
<span :class="{'success':scope.row.risk_level===1,'warning':scope.row.risk_level===2,'danger':scope.row.risk_level===3}">{{scope.row['risk_description']}}</span>
|
||||||
|
</template>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
@ -286,5 +292,13 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.danger{
|
||||||
|
color: var(--el-color-danger);
|
||||||
|
}
|
||||||
|
.warning{
|
||||||
|
color: var(--el-color-warning);
|
||||||
|
}
|
||||||
|
.success{
|
||||||
|
color: var(--el-color-success);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" stripe border :size="size" :hideDo="true" :hidePagination="true" @selection-change="selectionChange">
|
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" stripe border :size="size" :hideDo="true" :hidePagination="true" @selection-change="selectionChange">
|
||||||
|
<el-table-column type="selection" align="center" width="40"></el-table-column>
|
||||||
<el-table-column width="200" label="备件类别" prop="spare_parts_category"></el-table-column>
|
<el-table-column width="200" label="备件类别" prop="spare_parts_category"></el-table-column>
|
||||||
<el-table-column width="200" label="故障率" prop="failure_rate"></el-table-column>
|
<el-table-column width="200" label="故障率" prop="failure_rate"></el-table-column>
|
||||||
<el-table-column width="200" label="配置人" prop="creator_name"></el-table-column>
|
<el-table-column width="200" label="配置人" prop="creator_name"></el-table-column>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user