效果图:
这里我上通过审核意见那列的值判断操作里面的审核按钮的显示隐藏。
首先审核意见那列后台给我返回的是A、B、null三种值,然后我再将这三种值转换为已驳回、已通过、未审核。三个中文显示在页面上。
这个是通过 :formatter属性改的,前面有讲过就不细讲了。然后如果是已通过或者已驳回审核按钮都不显示,只有是未审核的情况下才会显示审核按钮。
看代码:
核心代码:
slot-scope="scope"
v-if="scope.row.yzdb01D290 ==null?true:false"
HTML:
html"> <el-table-column
prop="yzdb01D290"
label="审核意见"
:formatter="shyj"
fixed="right"
></el-table-column>
<el-table-column
label="操作"
width="120"
fixed="right">
<!-- eslint-disable-next-line -->
<template slot-scope="scope">
<el-button
type="text"
v-if="scope.row.yzdb01D290 ==null?true:false"
size="small"
style="color:red"
data-toggle="modal"
data-target="#review"
@click="deitstimes"
>审核</el-button>
</template>
</el-table-column>
没了,结束了,是不是很简单呐
最后:如果此篇博文对您有帮助,还请动动小手点点关注点点赞呐~,谢谢 ~ ~