<template #bodyCell="{ column, record, text }">
<template v-if="column.dataIndex === 'taskStatusOnOrOff'">
<a-switch v-model:checked="record['taskStatusOnOrOff']" :disabled="record.children && record.children.length" @change="changeTaskStatusOnOrOff(record)" />
</template>
<template v-if="column.dataIndex === 'taskStatus'">
<template v-if="text === null">
<span></span
><!-- 显示一个默认值,你可以根据需求设置 -->
</template>
<template v-else-if="text.includes('临期')">
<a-button type="text" size="small" danger>{{ text }}</a-button>
</template>
<template v-else-if="text === '延期'">
<a-button type="text" size="small" danger>{{ text }}</a-button>
</template>
<span v-else>{{ text }}</span>
</template>
<template v-if="column.dataIndex === 'operation'">
<a-space>
<a-button type="link" @click="beforeOk(record)">完成</a-button>
<a-button type="link" :disabled="record.disabledEditBtn" @click="handlerEdit(record)">编辑</a-button>
<a-popconfirm title="确定要删除吗?" :disabled="record.disabledDelBtn" @confirm="handlerDelete(record)">
<a-button :disabled="record.disabledDelBtn" type="link">删除</a-button>
</a-popconfirm>
<a-button type="link" :disabled="record.disabledRiskBtn" @click="handlerShowRisks(record)"> 风险 </a-button>
<a-button type="link" :disabled="record.disabledFileBtn" @click="handlerShowUpdate(record)"> 附件 </a-button>
<a-button type="link" :disabled="record.disabledNoteBtn" @click="handlerShowNotes(record)"> 备注 </a-button>
</a-space>
</template>
</template>
a-table表格自定义内容
最新推荐文章于 2024-05-16 13:30:42 发布