|
@@ -10,6 +10,7 @@
|
|
padding: '8px',
|
|
padding: '8px',
|
|
color: '#666',
|
|
color: '#666',
|
|
}"
|
|
}"
|
|
|
|
+ :row-style="setRowStyle"
|
|
>
|
|
>
|
|
<el-table-column label="节/卷" type="expand" width="70px">
|
|
<el-table-column label="节/卷" type="expand" width="70px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -264,7 +265,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <span v-else> {{ scope2.row[item.prop] }} </span>
|
|
|
|
|
|
+ <span v-else> {{ scope2.row[item.prop] +scope2.row.abnormalSign }} </span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -400,6 +401,13 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ setRowStyle({row, rowIndex}) {
|
|
|
|
+ console.log(row)
|
|
|
|
+ if (row.abnormalSign==1) { // 例如,根据某条件判断
|
|
|
|
+ return { backgroundColor: 'rgb(231 60 60)',color:'#ffffff' }; // 自定义背景颜色
|
|
|
|
+ }
|
|
|
|
+ return {}; // 默认样式或无样式返回空对象
|
|
|
|
+ },
|
|
exceed(list) {
|
|
exceed(list) {
|
|
if (list && list.length > 1 && this.erJianErZao) {
|
|
if (list && list.length > 1 && this.erJianErZao) {
|
|
let status = false;
|
|
let status = false;
|
|
@@ -514,6 +522,9 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
|
+.custom-row-class{
|
|
|
|
+ background-color: rgb(251, 123, 123);
|
|
|
|
+}
|
|
.exceedStyle {
|
|
.exceedStyle {
|
|
background-color: rgb(255, 224, 224);
|
|
background-color: rgb(255, 224, 224);
|
|
}
|
|
}
|