UE在线信息数据隔离
This commit is contained in:
@@ -9,6 +9,9 @@ import { listUEInfoBySMF } from '@/api/neUser/smf';
|
|||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeInfoStore from '@/store/modules/neinfo';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
|
import useUserStore from '@/store/modules/user';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**网元参数 */
|
/**网元参数 */
|
||||||
@@ -22,6 +25,8 @@ let queryParams = reactive({
|
|||||||
imsi: '',
|
imsi: '',
|
||||||
/**msisdn */
|
/**msisdn */
|
||||||
msisdn: '',
|
msisdn: '',
|
||||||
|
/** 租户名称*/
|
||||||
|
tenantName: '',
|
||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
/**每页条数 */
|
/**每页条数 */
|
||||||
@@ -33,6 +38,7 @@ function fnQueryReset() {
|
|||||||
queryParams = Object.assign(queryParams, {
|
queryParams = Object.assign(queryParams, {
|
||||||
imsi: '',
|
imsi: '',
|
||||||
msisdn: '',
|
msisdn: '',
|
||||||
|
tenantName: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
});
|
});
|
||||||
@@ -118,6 +124,13 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Tenant Name',
|
||||||
|
dataIndex: 'tenantName',
|
||||||
|
align: 'center',
|
||||||
|
key: 'tenantName',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t('common.operate'),
|
title: t('common.operate'),
|
||||||
key: 'imsi',
|
key: 'imsi',
|
||||||
@@ -125,6 +138,9 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**表格字段列排序 */
|
||||||
|
let tableColumnsDnd = ref<ColumnsType>([]);
|
||||||
|
|
||||||
/**表格分页器参数 */
|
/**表格分页器参数 */
|
||||||
let tablePagination = reactive({
|
let tablePagination = reactive({
|
||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
@@ -274,6 +290,14 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
if (useUserStore().roles.includes('tenant')) {
|
||||||
|
const operateColumnIndex = tableColumns.findIndex(
|
||||||
|
column => column.key === 'tenantName'
|
||||||
|
);
|
||||||
|
if (operateColumnIndex !== -1) {
|
||||||
|
tableColumns.splice(operateColumnIndex, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
fnGetList();
|
||||||
});
|
});
|
||||||
@@ -310,6 +334,18 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :lg="8" :md="12" :xs="24" :gutter="16" v-roles:has="['administrator']">
|
||||||
|
<a-form-item
|
||||||
|
:label="t('views.neUser.sub.tenantName')"
|
||||||
|
name="tenantName "
|
||||||
|
>
|
||||||
|
<a-input
|
||||||
|
v-model:value="queryParams.tenantName"
|
||||||
|
allow-clear
|
||||||
|
></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
<a-col :lg="8" :md="12" :xs="24">
|
<a-col :lg="8" :md="12" :xs="24">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-space :size="8">
|
<a-space :size="8">
|
||||||
@@ -350,6 +386,11 @@ onMounted(() => {
|
|||||||
<template #icon><ReloadOutlined /></template>
|
<template #icon><ReloadOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<TableColumnsDnd
|
||||||
|
cache-id="udmSubData"
|
||||||
|
:columns="tableColumns"
|
||||||
|
v-model:columns-dnd="tableColumnsDnd"
|
||||||
|
></TableColumnsDnd>
|
||||||
<a-tooltip placement="topRight">
|
<a-tooltip placement="topRight">
|
||||||
<template #title>{{ t('common.sizeText') }}</template>
|
<template #title>{{ t('common.sizeText') }}</template>
|
||||||
<a-dropdown placement="bottomRight" trigger="click">
|
<a-dropdown placement="bottomRight" trigger="click">
|
||||||
@@ -381,7 +422,7 @@ onMounted(() => {
|
|||||||
<a-table
|
<a-table
|
||||||
class="table"
|
class="table"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:columns="tableColumns"
|
:columns="tableColumnsDnd"
|
||||||
:loading="tableState.loading"
|
:loading="tableState.loading"
|
||||||
:data-source="tableState.data"
|
:data-source="tableState.data"
|
||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
|
|||||||
Reference in New Issue
Block a user