<template slot-scope="{ row, index }" slot="statusBox">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="
width: 8px;
height: 8px;
border-radius: 100%;
margin-right: 6px;
"
:style="{ background: row.selected ? '#03AB5A' : '#666666' }"
></div>
<div :style="{ color: row.selected ? '#03AB5A' : '#666666' }">
{{ row.selected ? "在线" : "离线" }}
</div>
</div>
</template>
<template slot-scope="{ row,index }" slot="sn">
<div class="info">
<div class="info-section" :style="{borderTop: ind > 0 ? '1px solid gainsboro' : ''}"
v-for="(val,ind) in row.seatRecords" :key="ind">
<div class="info-section-item" style="border-right: 1px solid gainsboro">{{val.segmentName}}</div>
<div class="info-section-item" style="border-right: 1px solid gainsboro">
<div v-if="val.dishName">{{val.dishName}}</div>
<div v-else style="color: red">未上菜</div>
</div>
<div class="info-section-item">
<Tag v-if="val.state === 0" style="width: 60px">已过期</Tag>
<Tag v-if="val.state === 1" style="width: 60px" color="primary">当前</Tag>
<Tag v-if="val.state === 2" style="width: 60px" color="error">未使用</Tag>
</div>
</div>
</div>
</template>
2.时间格式转换
<template slot-scope="{ row, index }" slot="gmtCreateTime">
{{ row.createTime | formatTime("yyyy-MM-dd hh:mm:ss") }}
</template>