修改OTA管理的表格变色

This commit is contained in:
范强强
2023-09-15 14:37:48 +08:00
parent c5536f7672
commit 5ac493610b
@@ -162,8 +162,13 @@
</div> </div>
</div> </div>
<div> <div>
<a-table ref="table" size="middle" :components="drag(columns, 'columns')" :loading="loading" :pagination="false" <a-table ref="table"
:scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="id" :data-source="dataSource" @change="tableOnChange" size="middle"
:components="drag(columns, 'columns')"
:loading="loading" :pagination="false"
:rowClassName="rowClassName"
:scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="id" :data-source="dataSource"
@change="tableOnChange"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :columns="columns"> :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :columns="columns">
<!-- --> <!-- -->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
@@ -171,7 +176,8 @@
</span> </span>
</a-table> </a-table>
<div class="page" v-if="dataSource && dataSource.length > 0"> <div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination :show-total="total => $t('total') + ` ${total} ` + $t('strip')" show-quick-jumper show-size-changer <a-pagination :show-total="total => $t('total') + ` ${total} ` + $t('strip')" show-quick-jumper
show-size-changer
:page-size.sync="pageSize" :total="total" :current="pageNo" @change="pageOnChange" :page-size.sync="pageSize" :total="total" :current="pageNo" @change="pageOnChange"
@showSizeChange="SizeChange"/> @showSizeChange="SizeChange"/>
</div> </div>
@@ -199,7 +205,7 @@ export default {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/page', list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/page',
deleteBatch: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/deleteBatch', deleteBatch: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/deleteBatch',
exportData: '/ota/otaBaCxList/exportData', exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入 importZipUrl: '/ota/otaBaCxList/importData'//导入
}, },
number: '', number: '',
visible: false, visible: false,
@@ -217,8 +223,7 @@ export default {
softwareplatformList: [], softwareplatformList: [],
vehicleTypeList: [], vehicleTypeList: [],
marketList: [], marketList: [],
queryParam: { queryParam: {},
},
formInline: {}, formInline: {},
releaseTypeList: ['BUILD', 'MARKETING', 'POC'], releaseTypeList: ['BUILD', 'MARKETING', 'POC'],
rules: { rules: {
@@ -278,7 +283,7 @@ export default {
ellipsis: true, ellipsis: true,
sorter: true, sorter: true,
dataIndex: 'releaseDate' dataIndex: 'releaseDate'
}, }
// { // {
// title: this.$t('operation'), // title: this.$t('operation'),
// align: 'left', // align: 'left',
@@ -411,6 +416,11 @@ export default {
// this.queryParamOne[item + '_name'] = [] // this.queryParamOne[item + '_name'] = []
} }
}, },
rowClassName(row, index) {
if (row.isNew) {
return 'rowClassRedYellow'
}
}
} }
} }
</script> </script>
@@ -477,10 +487,10 @@ export default {
margin-right: 4px; margin-right: 4px;
} }
::v-deep .ant-table-row:first-child { /*::v-deep .ant-table-row:first-child {*/
background: #fff !important; /* background: #fff !important;*/
opacity: 0.9; /* opacity: 0.9;*/
} /*}*/
::v-deep .ant-table-body { ::v-deep .ant-table-body {
background: transparent !important; background: transparent !important;
@@ -489,7 +499,12 @@ export default {
::v-deep .ant-table-placeholder { ::v-deep .ant-table-placeholder {
margin-top: 8px !important; margin-top: 8px !important;
} }
/deep/ .ant-calendar-range-picker-input { /deep/ .ant-calendar-range-picker-input {
margin-left: -2px !important; margin-left: -2px !important;
} }
::v-deep .rowClassRedYellow {
background: yellow!important;
}
</style> </style>