|
|
@ -30,38 +30,31 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="asset-table-wrap"> |
|
|
<div class="asset-table-wrap"> |
|
|
<table class="asset-table"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th style="width:12%">版本</th> |
|
|
|
|
|
<th style="width:14%">组件</th> |
|
|
|
|
|
<th style="width:22%">描述</th> |
|
|
|
|
|
<th style="width:9%">大小</th> |
|
|
|
|
|
<th style="width:8%">升级方式</th> |
|
|
|
|
|
<th style="width:9%">状态</th> |
|
|
|
|
|
<th style="width:16%">创建时间</th> |
|
|
|
|
|
<th style="width:10%">操作</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
<tr v-for="f in list" :key="f.id"> |
|
|
|
|
|
<td><strong>{{ f.version }}</strong></td> |
|
|
|
|
|
<td>{{ f.component }}</td> |
|
|
|
|
|
<td><span :title="f.description">{{ f.description || '—' }}</span></td> |
|
|
|
|
|
<td>{{ f.sizeText }}</td> |
|
|
|
|
|
<td>{{ f.mandatory ? '强制' : '普通' }}</td> |
|
|
|
|
|
<td><span class="table-status" :class="f.statusClass"><i></i>{{ f.statusName }}</span></td> |
|
|
|
|
|
<td>{{ f.createdAt }}</td> |
|
|
|
|
|
<td> |
|
|
|
|
|
|
|
|
<t-table |
|
|
|
|
|
row-key="id" |
|
|
|
|
|
:data="list" |
|
|
|
|
|
:columns="columns" |
|
|
|
|
|
empty="暂无固件版本" |
|
|
|
|
|
> |
|
|
|
|
|
<template #version="{ row }"> |
|
|
|
|
|
<strong>{{ row.version }}</strong> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #description="{ row }"> |
|
|
|
|
|
<span :title="row.description">{{ row.description || '—' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #mandatory="{ row }"> |
|
|
|
|
|
{{ row.mandatory ? '强制' : '普通' }} |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #status="{ row }"> |
|
|
|
|
|
<span class="table-status" :class="row.statusClass"><i></i>{{ row.statusName }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template #actions="{ row }"> |
|
|
<div class="row-actions"> |
|
|
<div class="row-actions"> |
|
|
<t-button variant="text" theme="primary" @click="openEdit(f)">编辑</t-button> |
|
|
|
|
|
<t-button variant="text" theme="danger" shape="square" @click="remove(f)"><svg><use href="#i-trash" /></svg></t-button> |
|
|
|
|
|
|
|
|
<t-button variant="text" theme="primary" @click="openEdit(row)">编辑</t-button> |
|
|
|
|
|
<t-button variant="text" theme="danger" shape="square" @click="remove(row)"><svg><use href="#i-trash" /></svg></t-button> |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table> |
|
|
|
|
|
<div v-if="!list.length" class="table-empty">暂无固件版本</div> |
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
</t-table> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="table-footer"> |
|
|
<div class="table-footer"> |
|
|
@ -147,6 +140,17 @@ const statusOptions = [ |
|
|
{ label: '已弃用', value: 'deprecated' } |
|
|
{ label: '已弃用', value: 'deprecated' } |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
const columns = [ |
|
|
|
|
|
{ colKey: 'version', title: '版本', width: '12%' }, |
|
|
|
|
|
{ colKey: 'component', title: '组件', width: '14%' }, |
|
|
|
|
|
{ colKey: 'description', title: '描述', width: '22%', ellipsis: true }, |
|
|
|
|
|
{ colKey: 'sizeText', title: '大小', width: '9%' }, |
|
|
|
|
|
{ colKey: 'mandatory', title: '升级方式', width: '8%' }, |
|
|
|
|
|
{ colKey: 'status', title: '状态', width: '9%' }, |
|
|
|
|
|
{ colKey: 'createdAt', title: '创建时间', width: '16%' }, |
|
|
|
|
|
{ colKey: 'actions', title: '操作', width: '10%' } |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
const STATUS = { |
|
|
const STATUS = { |
|
|
draft: { name: '草稿', cls: 'pending' }, |
|
|
draft: { name: '草稿', cls: 'pending' }, |
|
|
released: { name: '已发布', cls: 'online' }, |
|
|
released: { name: '已发布', cls: 'online' }, |
|
|
|