---完善性能板块国际化
This commit is contained in:
@@ -29,7 +29,7 @@ export async function listMain() {
|
||||
refresh: parseDateToStr(time),
|
||||
ipAddress: ipAddress,
|
||||
name: key.split('/').join('_'),
|
||||
status: '正常',
|
||||
status: 'Normal',
|
||||
};
|
||||
} else {
|
||||
mergedObj = {
|
||||
@@ -37,7 +37,7 @@ export async function listMain() {
|
||||
refresh: parseDateToStr(time),
|
||||
ipAddress: ipAddress,
|
||||
name: key.split('/').join('_'),
|
||||
status: '异常',
|
||||
status: 'Abnormal',
|
||||
};
|
||||
}
|
||||
return mergedObj;
|
||||
|
||||
@@ -172,6 +172,14 @@ export default {
|
||||
capability: 'capability',
|
||||
serialNum: 'serialNum',
|
||||
expiryDate: 'expiryDate',
|
||||
neStatus: 'NE status is abnormal',
|
||||
runStatus:'Running Status',
|
||||
mark:'Brief Information',
|
||||
object:'Object',
|
||||
versionNum:'Version Number',
|
||||
systemStatus:'System Status',
|
||||
realNeStatus:'Status',
|
||||
reloadTime:'Refresh Time',
|
||||
},
|
||||
error: {
|
||||
err403: {
|
||||
@@ -387,6 +395,10 @@ export default {
|
||||
stopTask:'Stop Task',
|
||||
errorTaskInfo: 'Failed to obtain task information',
|
||||
granulOptionPlease:'Please select the measurement granularity',
|
||||
letupSure:'Confirm activation of task with number [{id}]?',
|
||||
stopSure:'Confirm the pending task with number [{row.id}]?',
|
||||
letUpWarning:'Prohibit activation of activated tasks',
|
||||
stopWarning: 'Prohibit suspending inactive measurement tasks',
|
||||
},
|
||||
perfThreshold:{
|
||||
thresholdValue:'Threshold Value',
|
||||
@@ -396,6 +408,14 @@ export default {
|
||||
editThre:'Update Threshold',
|
||||
addThre:'Add Threshold',
|
||||
errorThreInfo: 'Failed to obtain threshold information',
|
||||
staticSet:'Statistical Settings',
|
||||
threValue:'Threshold Value',
|
||||
alarmLevel:'Alarm Level',
|
||||
status:'Status',
|
||||
letupSure:'Confirm the performance threshold of activation number [{id}]?',
|
||||
stopSure:'Confirm the performance threshold of the suspension number [{id}]?',
|
||||
letUpWarning:'Prohibit activation of activated performance threshold',
|
||||
stopWarning:'Prohibit suspending inactive performance thresholds',
|
||||
},
|
||||
perfData:{
|
||||
taskId:'Task ID',
|
||||
|
||||
@@ -172,6 +172,14 @@ export default {
|
||||
capability: '用户容量',
|
||||
serialNum: '序列号',
|
||||
expiryDate: '许可证到期日期',
|
||||
neStatus:'网元状态异常',
|
||||
runStatus:'运行状态',
|
||||
mark:'简略信息',
|
||||
object:'对象',
|
||||
versionNum:'版本号',
|
||||
systemStatus:'系统状态',
|
||||
realNeStatus:'网元状态',
|
||||
reloadTime:'刷新时间',
|
||||
},
|
||||
error: {
|
||||
err403: {
|
||||
@@ -387,6 +395,10 @@ export default {
|
||||
stopTask:'挂起',
|
||||
errorTaskInfo: '获取任务信息失败',
|
||||
granulOptionPlease:'请选择测量粒度',
|
||||
letupSure:'确认激活编号为 【{id}】 的任务?',
|
||||
stopSure:'确认挂起编号为 【{id}】 的任务?',
|
||||
letUpWarning:'禁止激活已激活的任务',
|
||||
stopWarning:'禁止挂起未激活的测量任务',
|
||||
},
|
||||
perfThreshold:{
|
||||
thresholdValue:'门限值',
|
||||
@@ -396,6 +408,14 @@ export default {
|
||||
editThre:'修改性能门限',
|
||||
addThre:'新增性能门限',
|
||||
errorThreInfo: '获取性能门限信息失败',
|
||||
staticSet:'统计设置',
|
||||
threValue:'门限值',
|
||||
alarmLevel:'告警级别',
|
||||
status:'状态',
|
||||
letupSure:'确认激活编号为 【{id}】 的性能门限?',
|
||||
stopSure:'确认挂起编号为 【{id}】 的性能门限?',
|
||||
letUpWarning:'禁止激活已激活的性能门限',
|
||||
stopWarning:'禁止挂起未激活的性能门限',
|
||||
},
|
||||
perfData:{
|
||||
taskId:'任务ID',
|
||||
|
||||
@@ -1056,7 +1056,7 @@ onMounted(() => {
|
||||
<a-form name="queryParams" layout="horizontal">
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="网元类型" name="neTypeSelect">
|
||||
<a-form-item :label="t('views.traceManage.task.neType')" name="neTypeSelect">
|
||||
<a-cascader
|
||||
v-model:value="neTypeSelect"
|
||||
:options="neCascaderOtions"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -91,22 +91,22 @@ let tableColumns: ColumnsType = [
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '统计设置',
|
||||
title: t('views.perfManage.perfThreshold.staticSet'),
|
||||
dataIndex: 'kpiSet',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '门限值',
|
||||
title: t('views.perfManage.perfThreshold.threValue'),
|
||||
dataIndex: 'threshold',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '告警级别',
|
||||
title: t('views.perfManage.perfThreshold.alarmLevel'),
|
||||
dataIndex: 'origSeverity',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: t('views.perfManage.perfThreshold.status'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
@@ -188,7 +188,7 @@ function fnRecordDelete(row: Record<string, any>) {
|
||||
function fnGetList(pageNum?: number) {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
if(pageNum){
|
||||
if (pageNum) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
listPerfThreshold(toRaw(queryParams)).then(res => {
|
||||
@@ -325,7 +325,7 @@ function fnModalVisibleByEdit(id?: string) {
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalOk() {
|
||||
console.log(modalState.from)
|
||||
console.log(modalState.from);
|
||||
modalStateFrom
|
||||
.validate()
|
||||
.then(e => {
|
||||
@@ -378,14 +378,16 @@ function fnModalCancel() {
|
||||
function fnRecordRun(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认激活编号为 【${row.id}】 的性能门限?`,
|
||||
content: t('views.perfManage.perfThreshold.letupSure', { id: row.id }),
|
||||
onOk() {
|
||||
const key = 'taskRun';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
threRun(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `激活成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.softwareManage.runBtn'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -409,14 +411,16 @@ function fnRecordRun(row: Record<string, any>) {
|
||||
function fnRecordStop(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认挂起编号为 【${row.id}】 的性能门限?`,
|
||||
content: t('views.perfManage.perfThreshold.stopSure', { id: row.id }),
|
||||
onOk() {
|
||||
const key = 'taskStop';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
threStop(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `挂起成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.perfManage.taskManage.stopTask'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -441,7 +445,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
||||
if (row.status === 'Active') {
|
||||
var key = 'Active';
|
||||
message.error({
|
||||
content: `禁止激活已激活的性能门限`,
|
||||
content: t('views.perfManage.perfThreshold.letUpWarning'),
|
||||
key: key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -454,7 +458,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
||||
if (row.status === 'Inactive') {
|
||||
var key = 'stop';
|
||||
message.error({
|
||||
content: `禁止挂起未激活的性能门限`,
|
||||
content: t('views.perfManage.perfThreshold.stopWarning'),
|
||||
key: key,
|
||||
duration: 2,
|
||||
});
|
||||
|
||||
@@ -216,7 +216,7 @@ function fnRecordDelete(row: Record<string, any>) {
|
||||
function fnGetList(pageNum?: number) {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
if(pageNum){
|
||||
if (pageNum) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
listPerfTask(toRaw(queryParams)).then(res => {
|
||||
@@ -595,14 +595,16 @@ function fnModalCancel() {
|
||||
function fnRecordRun(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认激活编号为 【${row.id}】 的任务?`,
|
||||
content: t('views.perfManage.taskManage.letupSure', { id: row.id }),
|
||||
onOk() {
|
||||
const key = 'taskRun';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
taskRun(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `激活成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.softwareManage.runBtn'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -626,14 +628,16 @@ function fnRecordRun(row: Record<string, any>) {
|
||||
function fnRecordStop(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `确认挂起编号为 【${row.id}】 的任务?`,
|
||||
content: t('views.perfManage.taskManage.stopSure', { id: row.id }),
|
||||
onOk() {
|
||||
const key = 'taskStop';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
taskStop(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `挂起成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.perfManage.taskManage.stopTask'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -658,7 +662,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
||||
if (row.status === 'Active') {
|
||||
var key = 'Active';
|
||||
message.error({
|
||||
content: `禁止激活已激活的任务`,
|
||||
content: t('views.perfManage.taskManage.letUpWarning'),
|
||||
key: key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -671,7 +675,7 @@ function fnTaskModalVisible(type: string | number, row: Record<string, any>) {
|
||||
if (row.status === 'Inactive') {
|
||||
var key = 'stop';
|
||||
message.error({
|
||||
content: `禁止挂起未激活的测量任务`,
|
||||
content: t('views.perfManage.taskManage.stopWarning'),
|
||||
key: key,
|
||||
duration: 2,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user