84
先贴个全的
<template>
<div style="max-height:600px;overflow-y:auto">
<a-table
class="ant-table-striped"
:rowClassName="
(record, index) => (record.isChild ? 'table-striped' : null)
"
:columns="columns"
:data-source="list"
rowKey="id"
v-custom-loading="LoadingData"
:pagination="false"
:row-selection="rowSelection"
@expand="getDetail"
:expandedRowKeys="expandedRowKeys"
:expandIconColumnIndex="-1"
>
<template #createTime="{ record }">
{
{
timeFormatter(record.last_time) }}
</template>
<template #type="{ record }"> {
{
record.type_name }}模型 </template>
<template #last_transform_status="{ record }">
{
{
Status[record.last_transform_status] }}
</template>
<template #operation1="{ record }">
<a-button
class="link-btn-in-table"
type="link"
@click="getDetail(record)"
v-if="!record.isChild"
>选择模型版本<up-outlined
v-if="record.id === expandedRowKeys[0]"/><down-outlined v-else
/></a-button>
</template>
</a-table>
<div class="pagination">
<a-pagination
:current="page"
:page-size="5"
:total="total"
:showTotal="(total, range) => `共${total}条`"
@change="changePage"
>
</a-pagination>
</div>
</div>
</template>
<script>
import {
getSelectModelsList, getDetailModelsList } from '@/requests'
import {
DownOutlined, UpOutlined } from '@ant-design/icons-vue'
const Status = {
0: '转换成功'
}
const columnConfig = [
{
title: '模型名称',
dataIndex: 'name',
key: 'name',
ellipsis: true,
width: 180
},
{
title: '模型类型',
dataIndex: 'type',
key: 'type',
slots: {
customRender: 'type' },
width: 120,
ellipsis: true
},
{
title: '生成时间',
dataIndex: 'last_time',
key: 'last_time',
ellipsis: true,
width: 180,
slots: {
customRender: 'createTime' }
},
{
title: '最新状态',
dataIndex: 'last_transform_status',
key: 'last_transform_status',
slots: {
customRender: 'last_transform_status' },
width: 120
},
{
title: '模型框架',
dataIndex: 'framework',
key: 'framework',
ellipsis: tru