|
@@ -132,12 +132,12 @@
|
|
ref="multipleTable"
|
|
ref="multipleTable"
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:data="AllData"
|
|
:data="AllData"
|
|
- row-class-name="g_table_row"
|
|
|
|
|
|
+ :row-class-name="rowStyle"
|
|
border
|
|
border
|
|
:header-cell-style="{background:'#f2f2f2'}"
|
|
:header-cell-style="{background:'#f2f2f2'}"
|
|
:cell-style="{ textAlign: 'center' }"
|
|
:cell-style="{ textAlign: 'center' }"
|
|
- highlight-current-row
|
|
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
|
|
+ @row-click="handleRowClick"
|
|
>
|
|
>
|
|
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -348,7 +348,8 @@ export default {
|
|
importType: '',
|
|
importType: '',
|
|
importTitle: '',
|
|
importTitle: '',
|
|
uploadTitle: [],
|
|
uploadTitle: [],
|
|
- excelFlag: false
|
|
|
|
|
|
+ excelFlag: false,
|
|
|
|
+ ids: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -632,6 +633,22 @@ export default {
|
|
_this.excelFlag = false
|
|
_this.excelFlag = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
+ this.multipleSelection = val
|
|
|
|
+ this.ids = val.map(item => item.id)
|
|
|
|
+ },
|
|
|
|
+ handleRowClick(row) {
|
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(row)
|
|
|
|
+ },
|
|
|
|
+ // 当前数据行背景样式
|
|
|
|
+ rowStyle({ row }) {
|
|
|
|
+ var arr = this.ids
|
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
|
+ if (row.id === arr[i]) {
|
|
|
|
+ return 'rowStyle'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
baseRequest(opUrl, postData) {
|
|
baseRequest(opUrl, postData) {
|
|
return this.$channel.globeRequest('CustomerManagementController', opUrl, postData, '')
|
|
return this.$channel.globeRequest('CustomerManagementController', opUrl, postData, '')
|
|
@@ -708,5 +725,12 @@ export default {
|
|
background-color: #ff4949;
|
|
background-color: #ff4949;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
+::v-deep .rowStyle {
|
|
|
|
+ background-color: #e8f7fd !important;
|
|
|
|
+ color: #1890ff;
|
|
|
|
+}
|
|
|
|
+::v-deep .el-table tbody tr:hover > td {
|
|
|
|
+ background-color: #e8f7fd !important;
|
|
|
|
+}
|
|
|
|
|
|
</style>
|
|
</style>
|