修改接口

master
夜笙歌 6 months ago
parent e84aca216c
commit 4f32a014e7

@ -9,6 +9,7 @@
header-cell-style="text-align:center;background-color:#57c9cd;color:#fff" header-cell-style="text-align:center;background-color:#57c9cd;color:#fff"
cell-style="text-align:center" cell-style="text-align:center"
:row-style="tableRowStyle" :row-style="tableRowStyle"
:row-class-name="tableRowClass"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="ROWSEQ" prop="ROWSEQ"
@ -352,20 +353,36 @@ export default {
}, },
methods: { methods: {
tableRowStyle({row, rowIndex}) { tableRowStyle({row, rowIndex}) {
console.log(row) let date = `${new Date().getFullYear()}-${(new Date().getMonth()) > 10 ? (new Date().getMonth() + 1) : ('0' + (new Date().getMonth() + 1))}-${(new Date().getDate() > 10) ? (new Date().getDate()) : ('0' + new Date().getDate())}`
let date1 = new Date(row.PLAN_DATE).getTime()
let date2 = new Date(date).getTime()
if ((date2 - date1) === (1000 * 60 * 60 * 24)) {
return {'background-color': 'yellow', color: '#fff'};
}
if (row.STATUS === 1) { if (row.STATUS === 1) {
console.log(123) return {'background-color': 'red', color: '#fff'};
return {'background-color': 'red',color:'#fff'};
} else { } else {
console.log(456)
return {} return {}
} }
},
tableRowClass({row, rowIndex}) {
let date = `${new Date().getFullYear()}-${(new Date().getMonth()) > 10 ? (new Date().getMonth() + 1) : ('0' + (new Date().getMonth() + 1))}-${(new Date().getDate() > 10) ? (new Date().getDate()) : ('0' + new Date().getDate())}`
let date1 = new Date(row.PLAN_DATE).getTime()
let date2 = new Date(date).getTime()
if ((date2 - date1) === (1000 * 60 * 60 * 24)) {
return 'blackHover'
} }
if (row.STATUS === 1) {
return 'blackHover'
} else {
return {}
}
},
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="less" scoped>
.dashboard-editor-container { .dashboard-editor-container {
padding: 32px; padding: 32px;
background-color: rgb(240, 242, 245); background-color: rgb(240, 242, 245);
@ -387,4 +404,8 @@ export default {
.el-table th.el-table__cell > .cell { .el-table th.el-table__cell > .cell {
text-align: center; text-align: center;
} }
/deep/ .blackHover:hover {
color: #000!important;
}
</style> </style>

Loading…
Cancel
Save