dialogErrorVisible = false ; dialogErrorTitle = '' ; public get gridErrorOptions ( ) : GridOptions { return { headerHeight : 30 , rowHeight : 30 , columnDefs : [ { headerName : "序号" , field : "SerialNumber" , width : 40 , pinned : 'left' , } , { headerName : "合同产品名称" , field : "ContractName" , width : 120 , pinned : 'left' , cellClassRules : { 'pink-background' : ( params ) => { if ( params. data. ErrorColMsg && Object. keys ( params. data. ErrorColMsg) . length > 0 ) { if ( params. data. ErrorColMsg. hasOwnProperty ( 1 ) ) { return true ; } } return false ; } } } , { headerName : "备注" , field : "Remarks" , width : 80 , } , ] , showToolPanel : false , enableSorting : true , enableColResize : true , suppressLoadingOverlay : true , suppressNoRowsOverlay : true , suppressDragLeaveHidesColumns : true , suppressContextMenu : true , defaultColDef : { suppressMenu : true , } , rowSelection : "single" , isExternalFilterPresent : ( ) => { return true ; } , doesExternalFilterPass : ( node ) => { return node. data. ErrorColMsg && Object. keys ( node. data. ErrorColMsg) . length > 0 ; } , } ; }
< el-dialog class = " error-mainproject" :visible.sync = " dialogErrorVisible" width = " 136vh" top = " 8vh" :title = " dialogErrorTitle" > < div> < ag-grid-vue class = " ag-fresh absolute ag-theme-balham" :gridOptions = " gridErrorOptions" style = " height : 75vh; " > </ ag-grid-vue> </ div> </ el-dialog>
.error-mainproject .pink-background { background-color : pink;
}