---完善性能板块国际化
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { PageContainer } from '@ant-design-vue/pro-layout';
|
||||
import { ColumnsType } from 'ant-design-vue/lib/table';
|
||||
import { message } from 'ant-design-vue/lib';
|
||||
import { reactive, toRaw, ref, onMounted,onBeforeUnmount} from 'vue';
|
||||
import { reactive, toRaw, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { listMain } from '@/api/index';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { TooltipComponent } from 'echarts/components';
|
||||
@@ -27,28 +27,28 @@ echarts.use([
|
||||
//customRender(){} ----单元格处理
|
||||
let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: '对象',
|
||||
title: t('views.index.object'),
|
||||
dataIndex: 'name',
|
||||
align: 'center',
|
||||
key: 'status',
|
||||
},
|
||||
{
|
||||
title: '网元状态',
|
||||
title: t('views.index.realNeStatus'),
|
||||
dataIndex: 'status',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '刷新时间',
|
||||
title: t('views.index.reloadTime'),
|
||||
dataIndex: 'refresh',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '版本',
|
||||
title: t('views.index.version'),
|
||||
dataIndex: 'version',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: 'IP地址',
|
||||
title: t('views.index.ipAddress'),
|
||||
dataIndex: 'ipAddress',
|
||||
key: 'groupName',
|
||||
align: 'center',
|
||||
@@ -142,7 +142,7 @@ function fnGetList() {
|
||||
var errorNum = 0;
|
||||
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].status == '正常'||res[i].status=='Normal') {
|
||||
if (res[i].status == '正常' || res[i].status == 'Normal') {
|
||||
rightNum++;
|
||||
} else {
|
||||
errorNum++;
|
||||
@@ -326,8 +326,11 @@ const closeDrawer = () => {
|
||||
function rowClick(record: any, index: any) {
|
||||
return {
|
||||
onClick: (event: any) => {
|
||||
if (toRaw(record).status == '异常'||toRaw(record).status == 'Abnormal') {
|
||||
message.error(`网元状态异常`, 2);
|
||||
if (
|
||||
toRaw(record).status == '异常' ||
|
||||
toRaw(record).status == 'Abnormal'
|
||||
) {
|
||||
message.error(t('views.index.neStatus'), 2);
|
||||
return false;
|
||||
} else {
|
||||
let pronData = toRaw(record);
|
||||
@@ -436,7 +439,7 @@ onBeforeUnmount(() => {
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'status'">
|
||||
<div v-if="record.status == '正常'||record.status == 'Normal'">
|
||||
<div v-if="record.status == '正常' || record.status == 'Normal'">
|
||||
<a-tag color="blue" @click="init(record)">{{
|
||||
record.name
|
||||
}}</a-tag>
|
||||
@@ -449,34 +452,34 @@ onBeforeUnmount(() => {
|
||||
</a-table>
|
||||
</a-col>
|
||||
<a-col :lg="10" :md="8" :xs="24">
|
||||
<a-card title="运行状态" style="margin-bottom: 16px">
|
||||
<a-card :title="t('views.index.runStatus')" style="margin-bottom: 16px">
|
||||
<div
|
||||
id="echarts-records"
|
||||
style="width: 100%; min-height: 200px"
|
||||
></div>
|
||||
</a-card>
|
||||
<a-card title="简略信息" style="margin-top: 16px">
|
||||
<a-card :title="t('views.index.mark')" style="margin-top: 16px">
|
||||
<a-descriptions
|
||||
bordered
|
||||
:column="1"
|
||||
:label-style="{ width: '160px' }"
|
||||
>
|
||||
<a-descriptions-item label="对象">{{
|
||||
<a-descriptions-item :label="t('views.index.object')">{{
|
||||
nfInfo.obj
|
||||
}}</a-descriptions-item>
|
||||
<template v-if="nfInfo.obj === 'OMC'">
|
||||
<a-descriptions-item label="版本号">{{
|
||||
<a-descriptions-item :label="t('views.index.veisonNum')">{{
|
||||
nfInfo.version
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="系统状态">{{
|
||||
<a-descriptions-item :label="t('views.index.systemStatus')">{{
|
||||
nfInfo.status
|
||||
}}</a-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-descriptions-item label="序列号">{{
|
||||
<a-descriptions-item :label="t('views.index.serialNum')">{{
|
||||
nfInfo.number
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="许可证到期日期">{{
|
||||
<a-descriptions-item :label="t('views.index.expiryDate')">{{
|
||||
nfInfo.outTimeDate
|
||||
}}</a-descriptions-item>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user