fix: 软件管理>记录编号移除

This commit is contained in:
TsMask
2023-10-25 16:23:46 +08:00
parent d47a87df64
commit 869c09ac3c
2 changed files with 17 additions and 13 deletions

View File

@@ -284,6 +284,11 @@ watch(
:scroll="{ y: 400, x: true }"
:pagination="tablePagination"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<DictTag :options="dict.neVersionStatus" :value="record.status" />
</template>
</template>
</a-table>
</a-modal>
</template>

View File

@@ -72,11 +72,6 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
title: t('common.rowId'),
dataIndex: 'id',
align: 'center',
},
{
title: t('views.configManage.softwareManage.neType'),
dataIndex: 'neType',
@@ -198,20 +193,20 @@ function fnFileModalVisible(type: string | number, row: Record<string, any>) {
fileModalState.title = t('views.configManage.softwareManage.sendTitle');
fileModalState.content = t(
'views.configManage.softwareManage.sendContent',
{ num: row.id }
{ fileName: row.fileName }
);
}
if (type === 'run') {
fileModalState.title = t('views.configManage.softwareManage.runTitle');
fileModalState.content = t('views.configManage.softwareManage.runContent', {
num: row.id,
fileName: row.fileName,
});
}
if (type === 'back') {
fileModalState.title = t('views.configManage.softwareManage.backTitle');
fileModalState.content = t(
'views.configManage.softwareManage.backContent',
{ num: row.id }
{ fileName: row.fileName }
);
}
if (!fileModalState.content) {
@@ -301,7 +296,9 @@ function fnFileModalCancel() {
function fnDownloadFile(row: Record<string, any>) {
Modal.confirm({
title: '提示',
content: `确认下载记录编号为 【${row.id}】 的数据项文件?`,
content: t('views.configManage.softwareManage.downloadTip', {
fileName: row.fileName,
}),
onOk() {
const key = 'downloadNeSoftware';
message.loading({ content: t('common.loading'), key });
@@ -331,8 +328,10 @@ function fnDownloadFile(row: Record<string, any>) {
*/
function fnRecordDelete(row: Record<string, any>) {
Modal.confirm({
title: t('commont.tipTitle'),
content: t('views.configManage.softwareManage.deleteTip', { num: row.id }),
title: t('common.tipTitle'),
content: t('views.configManage.softwareManage.deleteTip', {
fileName: row.fileName,
}),
onOk() {
const key = 'delNeSoftware';
message.loading({ content: t('common.loading'), key });
@@ -391,7 +390,7 @@ type ModalStateType = {
let modalState: ModalStateType = reactive({
visibleByEdit: false,
visibleByHistory: false,
title: '任务设置',
title: '上传更新',
from: {
neType: undefined,
version: '',
@@ -534,7 +533,7 @@ function fnBeforeUploadCms(file: FileType) {
const fileName = file.name;
const suff = fileName.substring(fileName.lastIndexOf('.'));
if (!['.cms'].includes(suff)) {
message.error('只支持上传文件格式(.deb、.rpm', 3);
message.error('只支持上传文件格式(.cms', 3);
return false;
}
return true;