|
|
@ -3,23 +3,23 @@ |
|
|
|
<div class="ml20 mt20 mr20 flex-row flex-align-center flex-justify-between"> |
|
|
|
<div class="ml20 mt20 mr20 flex-row flex-align-center flex-justify-between"> |
|
|
|
<div class="flex-row"> |
|
|
|
<div class="flex-row"> |
|
|
|
<a-button type="primary" @click="sVisible = true"> |
|
|
|
<a-button type="primary" @click="sVisible = true"> |
|
|
|
Click to Upload |
|
|
|
上传 |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
<a-modal :visible="sVisible" |
|
|
|
<a-modal :visible="sVisible" |
|
|
|
title="Import Firmware File" |
|
|
|
title="导入固件文件" |
|
|
|
:closable="false" |
|
|
|
:closable="false" |
|
|
|
@cancel="onCancel" |
|
|
|
@cancel="onCancel" |
|
|
|
@ok="uploadFile" |
|
|
|
@ok="uploadFile" |
|
|
|
centered> |
|
|
|
centered> |
|
|
|
<a-form :rules="rules" ref="formRef" :model="uploadParam" :label-col="{ span: 6 }"> |
|
|
|
<a-form :rules="rules" ref="formRef" :model="uploadParam" :label-col="{ span: 6 }"> |
|
|
|
<a-form-item name="status" label="Avaliable" required> |
|
|
|
<a-form-item name="status" label="是否可用" required> |
|
|
|
<a-switch v-model:checked="uploadParam.status" /> |
|
|
|
<a-switch v-model:checked="uploadParam.status" /> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item name="device_name" label="Device Name" required> |
|
|
|
<a-form-item name="device_name" label="设备型号" required> |
|
|
|
<a-select |
|
|
|
<a-select |
|
|
|
style="width: 220px" |
|
|
|
style="width: 220px" |
|
|
|
mode="multiple" |
|
|
|
mode="multiple" |
|
|
|
placeholder="can choose multiple" |
|
|
|
placeholder="请选择" |
|
|
|
v-model:value="uploadParam.device_name"> |
|
|
|
v-model:value="uploadParam.device_name"> |
|
|
|
<a-select-option |
|
|
|
<a-select-option |
|
|
|
v-for="k in DeviceNameEnum" |
|
|
|
v-for="k in DeviceNameEnum" |
|
|
@ -30,10 +30,10 @@ |
|
|
|
</a-select-option> |
|
|
|
</a-select-option> |
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item name="release_note" label="Release Note" required> |
|
|
|
<a-form-item name="release_note" label="发布说明" required> |
|
|
|
<a-textarea v-model:value="uploadParam.release_note" showCount :maxlength="300" /> |
|
|
|
<a-textarea v-model:value="uploadParam.release_note" showCount :maxlength="300" /> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="File" required> |
|
|
|
<a-form-item label="文件" required> |
|
|
|
<a-upload |
|
|
|
<a-upload |
|
|
|
:multiple="false" |
|
|
|
:multiple="false" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
:before-upload="beforeUpload" |
|
|
@ -43,7 +43,7 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
<a-button type="primary"> |
|
|
|
<a-button type="primary"> |
|
|
|
<UploadOutlined /> |
|
|
|
<UploadOutlined /> |
|
|
|
Import Firmware File |
|
|
|
导入固件文件 |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</a-upload> |
|
|
|
</a-upload> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
@ -83,7 +83,7 @@ |
|
|
|
<a-input-search |
|
|
|
<a-input-search |
|
|
|
:enter-button="true" |
|
|
|
:enter-button="true" |
|
|
|
v-model:value="param.product_version" |
|
|
|
v-model:value="param.product_version" |
|
|
|
placeholder="input search verison" |
|
|
|
placeholder="固件版本搜索" |
|
|
|
style="width: 250px" |
|
|
|
style="width: 250px" |
|
|
|
@search="getAllFirmwares(pageParam)"/> |
|
|
|
@search="getAllFirmwares(pageParam)"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -130,14 +130,14 @@ interface FirmwareData { |
|
|
|
firmware: Firmware[] |
|
|
|
firmware: Firmware[] |
|
|
|
} |
|
|
|
} |
|
|
|
const columns = [ |
|
|
|
const columns = [ |
|
|
|
{ title: 'Model', dataIndex: 'device_name', width: 120, ellipsis: true, className: 'titleStyle', slots: { customRender: 'device_name' } }, |
|
|
|
{ title: '设备型号', dataIndex: 'device_name', width: 120, ellipsis: true, className: 'titleStyle', slots: { customRender: 'device_name' } }, |
|
|
|
{ title: 'File Name', dataIndex: 'file_name', width: 220, ellipsis: true, className: 'titleStyle', slots: { customRender: 'file_name' } }, |
|
|
|
{ title: '文件名称', dataIndex: 'file_name', width: 220, ellipsis: true, className: 'titleStyle', slots: { customRender: 'file_name' } }, |
|
|
|
{ title: 'Firmware Version', dataIndex: 'product_version', width: 180, className: 'titleStyle' }, |
|
|
|
{ title: '固件版本', dataIndex: 'product_version', width: 180, className: 'titleStyle' }, |
|
|
|
{ title: 'File Size', dataIndex: 'file_size', width: 150, className: 'titleStyle', slots: { customRender: 'file_size' } }, |
|
|
|
{ title: '文件大小', dataIndex: 'file_size', width: 150, className: 'titleStyle', slots: { customRender: 'file_size' } }, |
|
|
|
{ title: 'Creator', dataIndex: 'username', width: 100, className: 'titleStyle' }, |
|
|
|
{ title: '用户名', dataIndex: 'username', width: 100, className: 'titleStyle' }, |
|
|
|
{ title: 'Release Date', dataIndex: 'released_time', width: 160, sorter: (a: Firmware, b: Firmware) => a.released_time.localeCompare(b.released_time), className: 'titleStyle' }, |
|
|
|
{ title: '发布时间', dataIndex: 'released_time', width: 160, sorter: (a: Firmware, b: Firmware) => a.released_time.localeCompare(b.released_time), className: 'titleStyle' }, |
|
|
|
{ title: 'Release Note', dataIndex: 'release_note', width: 300, ellipsis: true, className: 'titleStyle', slots: { customRender: 'release_note' } }, |
|
|
|
{ title: '发布说明', dataIndex: 'release_note', width: 300, ellipsis: true, className: 'titleStyle', slots: { customRender: 'release_note' } }, |
|
|
|
{ title: 'Status', dataIndex: 'firmware_status', width: 100, className: 'titleStyle', slots: { customRender: 'firmware_status' } }, |
|
|
|
{ title: '固件状态', dataIndex: 'firmware_status', width: 100, className: 'titleStyle', slots: { customRender: 'firmware_status' } }, |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
const data = reactive<FirmwareData>({ |
|
|
|
const data = reactive<FirmwareData>({ |
|
|
@ -153,7 +153,7 @@ const paginationProp = reactive({ |
|
|
|
total: 0 |
|
|
|
total: 0 |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const deviceNameList = ref<any[]>([{ label: 'All', value: '' }]) |
|
|
|
const deviceNameList = ref<any[]>([{ label: '全部', value: '' }]) |
|
|
|
|
|
|
|
|
|
|
|
type Pagination = TableState['pagination'] |
|
|
|
type Pagination = TableState['pagination'] |
|
|
|
|
|
|
|
|
|
|
|