fix: 网元授权多语言翻译
This commit is contained in:
@@ -29,8 +29,8 @@ let queryParams = reactive({
|
||||
neType: undefined,
|
||||
/**网元ID */
|
||||
neId: '',
|
||||
/**过期时间 */
|
||||
expiryDate: '',
|
||||
/**序列号 */
|
||||
serialNum: '',
|
||||
/**当前页数 */
|
||||
pageNum: 1,
|
||||
/**每页条数 */
|
||||
@@ -42,7 +42,7 @@ function fnQueryReset() {
|
||||
queryParams = Object.assign(queryParams, {
|
||||
neType: undefined,
|
||||
neId: '',
|
||||
expiryDate: '',
|
||||
serialNum: '',
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
});
|
||||
@@ -83,48 +83,48 @@ let tableColumns = ref<TableColumnsType>([
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'neType',
|
||||
title: t('views.ne.common.neType'),
|
||||
dataIndex: 'neType',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'neId',
|
||||
title: t('views.ne.common.neId'),
|
||||
dataIndex: 'neId',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'status',
|
||||
title: t('views.ne.neLicense.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: 'serialNum',
|
||||
title: t('views.ne.common.serialNum'),
|
||||
dataIndex: 'serialNum',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'expiryDate',
|
||||
title: t('views.ne.common.expiryDate'),
|
||||
dataIndex: 'expiryDate',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: 'remark',
|
||||
title: t('views.ne.common.remark'),
|
||||
dataIndex: 'remark',
|
||||
key: 'remark',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
resizable: true,
|
||||
minWidth: 100,
|
||||
maxWidth: 200,
|
||||
maxWidth: 300,
|
||||
},
|
||||
{
|
||||
title: 'updateTime',
|
||||
title: t('common.updateTime'),
|
||||
dataIndex: 'updateTime',
|
||||
align: 'center',
|
||||
customRender(opt) {
|
||||
@@ -249,12 +249,14 @@ function fnModalCancel() {
|
||||
modalState.licenseId = '';
|
||||
}
|
||||
|
||||
/**刷新网元授权信息 */
|
||||
function fnRecordRefresh(row: Record<string, any>) {
|
||||
/**刷新网元授权状态 */
|
||||
function fnRecordState(row: Record<string, any>) {
|
||||
if (modalState.confirmLoading) return;
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: 'Refresh Ne License info?',
|
||||
content: t('views.ne.neLicense.reloadTip', {
|
||||
txt: `${row.neType} ${row.neId}`,
|
||||
}),
|
||||
onOk() {
|
||||
modalState.confirmLoading = true;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
@@ -270,9 +272,7 @@ function fnRecordRefresh(row: Record<string, any>) {
|
||||
);
|
||||
} else {
|
||||
row.status = '0';
|
||||
row.serialNum = '-';
|
||||
row.expiryDate = '-';
|
||||
message.success(
|
||||
message.warning(
|
||||
`${row.neType} ${row.neId} ${dictStatus.value[0].label}`,
|
||||
3
|
||||
);
|
||||
@@ -286,12 +286,12 @@ function fnRecordRefresh(row: Record<string, any>) {
|
||||
});
|
||||
}
|
||||
|
||||
/**勾选刷新网元状态 */
|
||||
function fnRecordState() {
|
||||
/**刷新网元授权状态 勾选 */
|
||||
function fnRecordStateBatch() {
|
||||
if (modalState.confirmLoading) return;
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `check refresh license state?`,
|
||||
content: t('views.ne.neLicense.reloadBatchTip'),
|
||||
onOk: async () => {
|
||||
modalState.confirmLoading = true;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
@@ -309,6 +309,8 @@ function fnRecordState() {
|
||||
row.status = '1';
|
||||
row.serialNum = res.data.sn;
|
||||
row.expiryDate = res.data.expire;
|
||||
} else {
|
||||
row.status = '0';
|
||||
}
|
||||
tableState.selectedRowKeys = [];
|
||||
}
|
||||
@@ -355,7 +357,7 @@ onMounted(() => {
|
||||
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="neType" name="neId ">
|
||||
<a-form-item :label="t('views.ne.common.neType')" name="neType ">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.neType"
|
||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
||||
@@ -365,7 +367,7 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="neId" name="neId">
|
||||
<a-form-item :label="t('views.ne.common.neId')" name="neId">
|
||||
<a-input
|
||||
v-model:value="queryParams.neId"
|
||||
:allow-clear="true"
|
||||
@@ -374,9 +376,12 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="expiryDate" name="expiryDate">
|
||||
<a-form-item
|
||||
:label="t('views.ne.common.serialNum')"
|
||||
name="serialNum"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="queryParams.expiryDate"
|
||||
v-model:value="queryParams.serialNum"
|
||||
:allow-clear="true"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
></a-input>
|
||||
@@ -408,10 +413,10 @@ onMounted(() => {
|
||||
type="default"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordState()"
|
||||
@click.prevent="fnRecordStateBatch()"
|
||||
>
|
||||
<template #icon><SecurityScanOutlined /></template>
|
||||
Refresh Status
|
||||
{{ t('views.ne.neLicense.reloadBatch') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -503,7 +508,7 @@ onMounted(() => {
|
||||
<template v-if="column.key === 'id'">
|
||||
<a-space :size="8" align="center">
|
||||
<a-tooltip placement="topRight">
|
||||
<template #title>Change License</template>
|
||||
<template #title>{{ t('views.ne.neLicense.change') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnModalVisibleByEdit(record.id)"
|
||||
@@ -512,8 +517,8 @@ onMounted(() => {
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="topRight">
|
||||
<template #title>Refresh Info</template>
|
||||
<a-button type="link" @click.prevent="fnRecordRefresh(record)">
|
||||
<template #title>{{ t('views.ne.neLicense.reload') }}</template>
|
||||
<a-button type="link" @click.prevent="fnRecordState(record)">
|
||||
<template #icon><SecurityScanOutlined /> </template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
Reference in New Issue
Block a user