|
@ -10,7 +10,7 @@ |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ |
|
|
<Table :columns="tableColumns" :stripe="false" :row-style="tableRowClassName" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ |
|
|
total: tableObject.total |
|
|
total: tableObject.total |
|
|
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
v-model:sort="tableObject.sort"> |
|
|
v-model:sort="tableObject.sort"> |
|
@ -254,6 +254,22 @@ |
|
|
templateTitle: '物料导入模版.xlsx' |
|
|
templateTitle: '物料导入模版.xlsx' |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
function tableRowClassName({row, rowIndex}) { |
|
|
|
|
|
console.log(row.classification); |
|
|
|
|
|
if (row.classification =='A') { |
|
|
|
|
|
return { |
|
|
|
|
|
background: 'red !important' |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
if (row.classification =='B') { |
|
|
|
|
|
return { |
|
|
|
|
|
background: 'yellow !important' |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
return ''; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
// 导入成功之后 |
|
|
const importSuccess = () => { |
|
|
const importSuccess = () => { |
|
|
getList() |
|
|
getList() |
|
@ -274,9 +290,31 @@ |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
::v-deep .el-table--enable-row-transition .el-table__body td.el-table__cell{ |
|
|
// ::v-deep .el-table--enable-row-transition .el-table__body td.el-table__cell{ |
|
|
transition: background-color .25s ease !important; |
|
|
// transition: background-color .25s ease !important; |
|
|
|
|
|
// background: red !important; |
|
|
|
|
|
// color: white !important; |
|
|
|
|
|
// } |
|
|
|
|
|
::v-deep .el-table .red-row { |
|
|
background: red !important; |
|
|
background: red !important; |
|
|
color: white !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
::v-deep .el-table .yellow-row { |
|
|
|
|
|
background: yellow !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table tr > red-row{ |
|
|
|
|
|
background: red !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ::v-deep .el-table .red-row { |
|
|
|
|
|
// --el-table-tr-bg-color: var(--el-color-warning-light-9) !important; |
|
|
|
|
|
// } |
|
|
|
|
|
// ::v-deep .el-table .yellow-row { |
|
|
|
|
|
// --el-table-tr-bg-color: var(--el-color-success-light-9) !important; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// ::v-deep .el-table--enable-row-transition .el-table__body td.el-table__cell .yellow-row { |
|
|
|
|
|
// background: yellow !important; |
|
|
|
|
|
// } |
|
|
</style> |
|
|
</style> |
|
|