|
@@ -72,6 +72,7 @@
|
|
|
:loading="loading"
|
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
class="j-table-force-nowrap"
|
|
|
+ :customRow="customRow"
|
|
|
@change="handleTableChange">
|
|
|
|
|
|
<template slot="htmlSlot" slot-scope="text">
|
|
@@ -296,6 +297,7 @@
|
|
|
},
|
|
|
dictOptions:{},
|
|
|
superFieldList:[],
|
|
|
+ mouseSummaryid: '',
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -307,6 +309,26 @@
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 合并后悬浮行背景色一起显示
|
|
|
+ customRow(record, index) {
|
|
|
+ return {
|
|
|
+ style: {
|
|
|
+ //样式
|
|
|
+ 'background-color': record.summaryid === this.mouseSummaryid ? '#e6faff' : ''
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ // 鼠标移入
|
|
|
+ mouseenter: event => {
|
|
|
+ // 维护一个变量记录当前行id 因为我是根据id来进行行合并的
|
|
|
+ this.mouseSummaryid = record.summaryid
|
|
|
+ },
|
|
|
+ //移除 清除id 还原样式
|
|
|
+ mouseleave: (event) => {
|
|
|
+ this.mouseSummaryid = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 处理父组件传过来的数据
|
|
|
getDataList(){
|
|
|
console.log(111,this.selectData)
|