KPI更新
This commit is contained in:
@@ -985,7 +985,6 @@ onBeforeUnmount(() => {
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<TableColumnsDnd
|
<TableColumnsDnd
|
||||||
v-if="tableColumns.length > 0"
|
v-if="tableColumns.length > 0"
|
||||||
:cache-id="`kpiTarget_${state.neType[0]}`"
|
|
||||||
:columns="tableColumns"
|
:columns="tableColumns"
|
||||||
v-model:columns-dnd="tableColumnsDnd"
|
v-model:columns-dnd="tableColumnsDnd"
|
||||||
></TableColumnsDnd>
|
></TableColumnsDnd>
|
||||||
|
|||||||
@@ -240,34 +240,33 @@ const statsColumns: TableColumnType<any>[] = [
|
|||||||
title: t('views.perfManage.kpiOverView.kpiName'),
|
title: t('views.perfManage.kpiOverView.kpiName'),
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
key: 'title',
|
key: 'title',
|
||||||
width: '65%',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('views.perfManage.kpiOverView.totalValue'),
|
|
||||||
dataIndex: 'total',
|
|
||||||
key: 'total',
|
|
||||||
width: '12%',
|
|
||||||
sortDirections: ['ascend', 'descend'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('views.perfManage.kpiOverView.avgValue'),
|
|
||||||
dataIndex: 'avg',
|
|
||||||
key: 'avg',
|
|
||||||
width: '24%',
|
|
||||||
sortDirections: ['ascend', 'descend'],
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// title: t('views.perfManage.kpiOverView.totalValue'),
|
||||||
|
// dataIndex: 'total',
|
||||||
|
// key: 'total',
|
||||||
|
// width: '12%',
|
||||||
|
// sortDirections: ['ascend', 'descend'],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: t('views.perfManage.kpiOverView.avgValue'),
|
||||||
|
// dataIndex: 'avg',
|
||||||
|
// key: 'avg',
|
||||||
|
// width: '24%',
|
||||||
|
// sortDirections: ['ascend', 'descend'],
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: t('views.perfManage.kpiOverView.maxValue'),
|
title: t('views.perfManage.kpiOverView.maxValue'),
|
||||||
dataIndex: 'max',
|
dataIndex: 'max',
|
||||||
key: 'max',
|
key: 'max',
|
||||||
width: '17%',
|
width: '200px',
|
||||||
sortDirections: ['ascend', 'descend'],
|
sortDirections: ['ascend', 'descend'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.perfManage.kpiOverView.minValue'),
|
title: t('views.perfManage.kpiOverView.minValue'),
|
||||||
dataIndex: 'min',
|
dataIndex: 'min',
|
||||||
key: 'min',
|
key: 'min',
|
||||||
width: '17%',
|
width: '200px',
|
||||||
sortDirections: ['ascend', 'descend'],
|
sortDirections: ['ascend', 'descend'],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -424,8 +423,8 @@ function fnGetList() {
|
|||||||
duration: 2,
|
duration: 2,
|
||||||
});
|
});
|
||||||
tableState.data = [];
|
tableState.data = [];
|
||||||
tableColumns.value = [];
|
// tableColumns.value = [];
|
||||||
tableColumnsDnd.value = [];
|
// tableColumnsDnd.value = [];
|
||||||
kpiStats.value = []; //清空数据
|
kpiStats.value = []; //清空数据
|
||||||
fnRanderChartData();
|
fnRanderChartData();
|
||||||
return false;
|
return false;
|
||||||
@@ -469,6 +468,26 @@ function fnGetList() {
|
|||||||
total: total,
|
total: total,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
kpiStats.value = [];
|
||||||
|
for (const columns of tableColumns.value) {
|
||||||
|
if (
|
||||||
|
columns.key === 'neName' ||
|
||||||
|
columns.key === 'startIndex' ||
|
||||||
|
columns.key === 'timeGroup'
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
kpiStats.value.push({
|
||||||
|
kpiId: columns.key,
|
||||||
|
title: columns.title,
|
||||||
|
unit: columns.unit,
|
||||||
|
max: 0,
|
||||||
|
min: 0,
|
||||||
|
avg: 0,
|
||||||
|
total: 0,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -757,7 +776,6 @@ const selectedUnit = ref<string | null>(null);
|
|||||||
// 添加处理行点击的方法
|
// 添加处理行点击的方法
|
||||||
function handleRowClick(record: any) {
|
function handleRowClick(record: any) {
|
||||||
const index = selectedRow.value.indexOf(record.kpiId);
|
const index = selectedRow.value.indexOf(record.kpiId);
|
||||||
console.log(record);
|
|
||||||
// 如果已经选中,取消选中
|
// 如果已经选中,取消选中
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
selectedRow.value.splice(index, 1);
|
selectedRow.value.splice(index, 1);
|
||||||
@@ -891,7 +909,7 @@ onMounted(() => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 无查询参数neType时 默认选择UPF
|
// 无查询参数neType时 默认选择UPF
|
||||||
const queryNeType = (route.query.neType as string) || 'UPF';
|
const queryNeType = (route.query.neType as string) || 'IMS';
|
||||||
const item = neCascaderOptions.value.find(
|
const item = neCascaderOptions.value.find(
|
||||||
s => s.value === queryNeType
|
s => s.value === queryNeType
|
||||||
);
|
);
|
||||||
@@ -954,6 +972,7 @@ onBeforeUnmount(() => {
|
|||||||
v-model:value="state.neType"
|
v-model:value="state.neType"
|
||||||
:options="neCascaderOptions"
|
:options="neCascaderOptions"
|
||||||
:allow-clear="false"
|
:allow-clear="false"
|
||||||
|
@change="fnGetListTitle()"
|
||||||
:placeholder="t('common.selectPlease')"
|
:placeholder="t('common.selectPlease')"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -1041,7 +1060,6 @@ onBeforeUnmount(() => {
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<TableColumnsDnd
|
<TableColumnsDnd
|
||||||
v-if="tableColumns.length > 0"
|
v-if="tableColumns.length > 0"
|
||||||
:cache-id="`kpiTarget_${state.neType[0]}`"
|
|
||||||
:columns="tableColumns"
|
:columns="tableColumns"
|
||||||
v-model:columns-dnd="tableColumnsDnd"
|
v-model:columns-dnd="tableColumnsDnd"
|
||||||
></TableColumnsDnd>
|
></TableColumnsDnd>
|
||||||
@@ -1129,7 +1147,7 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<a-table
|
<a-table
|
||||||
:columns="state.neType[0] !== 'UPF' ? statsColumns.filter(c => c.key !== 'total') : statsColumns"
|
:columns="statsColumns"
|
||||||
:data-source="kpiStats"
|
:data-source="kpiStats"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ y: 250 }"
|
:scroll="{ y: 250 }"
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const toggleRealtime = () => {
|
|||||||
const TARGET_KPI_IDS: Record<NeType, string[]> = {
|
const TARGET_KPI_IDS: Record<NeType, string[]> = {
|
||||||
AMF: ['AMF.02', 'AMF.03'],
|
AMF: ['AMF.02', 'AMF.03'],
|
||||||
UPF: ['UPF.04', 'UPF.05'],
|
UPF: ['UPF.04', 'UPF.05'],
|
||||||
IMS: ['SCSCF.03', 'SCSCF.04', 'SCSCF.06', 'SCSCF.08'],
|
IMS: ['SCSCF.03', 'SCSCF.04', 'SCSCF.05', 'SCSCF.06', 'SCSCF.07', 'SCSCF.08'],
|
||||||
|
|
||||||
// AMF: ['AMF.02', 'AMF.03', 'AMF.A.07', 'AMF.A.08'],
|
// AMF: ['AMF.02', 'AMF.03', 'AMF.A.07', 'AMF.A.08'],
|
||||||
// SMF: ['SMF.02', 'SMF.03', 'SMF.04', 'SMF.05'],
|
// SMF: ['SMF.02', 'SMF.03', 'SMF.04', 'SMF.05'],
|
||||||
@@ -1001,6 +1001,7 @@ const tableRowConfig = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* 基础布局样式 */
|
||||||
.kpi-overview {
|
.kpi-overview {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
@@ -1114,12 +1115,10 @@ const tableRowConfig = computed(() => {
|
|||||||
background-color: rgba(24, 144, 255, 0.2) !important;
|
background-color: rgba(24, 144, 255, 0.2) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme='dark'] :deep(.selected-row:hover) {
|
:deep(.ant-checkbox-wrapper) {
|
||||||
background-color: rgba(24, 144, 255, 0.3) !important;
|
width: 100%;
|
||||||
}
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
/* 鼠标悬停样式 */
|
white-space: nowrap;
|
||||||
:deep(.ant-table-tbody tr:hover) {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user