element 单列查询

//memberType字段
<el-table-column label="认证方式" :show-overflow-tooltip="true" align="center"  width="150"  :filters="[
          { text: '个人认证', value: 'P' },
          { text: '企业认证', value: 'E' }
        ]"
        :filter-multiple="false"
        column-key="memberType"   
        >
        <template slot-scope="scope">
          <span>{{ scope.row.memberType | memberTypeFl}}</span>
        </template>
      </el-table-column>
 
 
 
<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";
  },
 
 
}
原文地址:https://www.cnblogs.com/yoututu/p/14637045.html