template代码:
<el-table
@cell-click="cellClick"
:data="dataList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%">
script代码:
cellClick(row, column, event) {
if (
column.label === "总条数" ||
column.label === "成功条数" ||
column.label === "失败条数"
) {
// console.log(column.label, " column");
let str = "";
if (column.label == "成功条数") {
str = "0";
} else if (column.label == "失败条数") {
str = "1";
} else if (column.label === "总条数") {
str = "2";
}
//let path = "/upload/" + this.identification
this.$router.replace({
path: '/upload',
query: { file_id: row.id,stateStr:str },
});
}
},