<el-table-column
:filter-multiple="false"
:filters="[
{ text: ‘认证通过‘, value: ‘P‘ },
{ text: ‘认证驳回‘, value: ‘R‘ },
{ text: ‘未认证‘, value: ‘u‘ },
{ text: ‘待审核‘, value: ‘W‘ }
]"
column-key="auditStatus"
label="认证状态"
class-name="status-col"
prop="auditStatus.desc"
align="center"
>
<template slot-scope="{ row }">
<el-tag
v-if="row.auditStatus!==null"
:type="row.auditStatus ? row.auditStatus[‘code‘] : ‘‘ | ApplyFilter"
>{{ row.auditStatus ? row.auditStatus.desc : "" }}</el-tag>
</template>
</el-table-column>
filters: {
ApplyFilter(status) {
const map = {
P: "success",
R: "danger",
W: "primary",
U: "info"
};
return map[status] || "primary";
},
}