新增基站信息 数据隔离
This commit is contained in:
@@ -9,6 +9,9 @@ import useI18n from '@/hooks/useI18n';
|
|||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeInfoStore from '@/store/modules/neinfo';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
import { ColumnsType } from 'ant-design-vue/lib/table';
|
||||||
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
|
import useUserStore from '@/store/modules/user';
|
||||||
const neInfoStore = useNeInfoStore();
|
const neInfoStore = useNeInfoStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -24,6 +27,8 @@ let queryParams = reactive({
|
|||||||
neType: ['', ''],
|
neType: ['', ''],
|
||||||
/**GNB_ID */
|
/**GNB_ID */
|
||||||
id: '',
|
id: '',
|
||||||
|
/** 租户名称*/
|
||||||
|
tenantName: '',
|
||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
/**每页条数 */
|
/**每页条数 */
|
||||||
@@ -35,6 +40,7 @@ function fnQueryReset() {
|
|||||||
queryParams = Object.assign(queryParams, {
|
queryParams = Object.assign(queryParams, {
|
||||||
neId: '',
|
neId: '',
|
||||||
id: '',
|
id: '',
|
||||||
|
tenantName: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
});
|
});
|
||||||
@@ -67,7 +73,7 @@ let tableState: TabeStateType = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**表格字段列 */
|
/**表格字段列 */
|
||||||
let tableColumns = ref<TableColumnsType>([
|
let tableColumns: ColumnsType = [
|
||||||
{
|
{
|
||||||
title: 'Radio ID',
|
title: 'Radio ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
@@ -89,12 +95,22 @@ let tableColumns = ref<TableColumnsType>([
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
maxWidth: 400,
|
maxWidth: 400,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Tenant Name',
|
||||||
|
dataIndex: 'tenantName',
|
||||||
|
align: 'center',
|
||||||
|
key: 'tenantName',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Radio Address',
|
title: 'Radio Address',
|
||||||
dataIndex: 'address',
|
dataIndex: 'address',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
]);
|
];
|
||||||
|
|
||||||
|
/**表格字段列排序 */
|
||||||
|
let tableColumnsDnd = ref<ColumnsType>([]);
|
||||||
|
|
||||||
/**表格分页器参数 */
|
/**表格分页器参数 */
|
||||||
let tablePagination = reactive({
|
let tablePagination = reactive({
|
||||||
@@ -160,7 +176,8 @@ function fnGetList(pageNum?: number) {
|
|||||||
tableState.loading = false;
|
tableState.loading = false;
|
||||||
fnGetList(queryParams.pageNum - 1);
|
fnGetList(queryParams.pageNum - 1);
|
||||||
}
|
}
|
||||||
} else {//AMF返回404是代表没找到这个数据 GNB_NOT_FOUND
|
} else {
|
||||||
|
//AMF返回404是代表没找到这个数据 GNB_NOT_FOUND
|
||||||
tablePagination.total = 0;
|
tablePagination.total = 0;
|
||||||
tableState.data = [];
|
tableState.data = [];
|
||||||
}
|
}
|
||||||
@@ -209,6 +226,14 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
if (useUserStore().roles.includes('tenant')) {
|
||||||
|
const operateColumnIndex = tableColumns.findIndex(
|
||||||
|
(column: any) => column.key === 'tenantName'
|
||||||
|
);
|
||||||
|
if (operateColumnIndex !== -1) {
|
||||||
|
tableColumns.splice(operateColumnIndex, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
fnGetList();
|
||||||
});
|
});
|
||||||
@@ -240,6 +265,23 @@ onMounted(() => {
|
|||||||
<a-input v-model:value="queryParams.id" allow-clear></a-input>
|
<a-input v-model:value="queryParams.id" allow-clear></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col
|
||||||
|
:lg="6"
|
||||||
|
: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="6" :md="12" :xs="24">
|
<a-col :lg="6" :md="12" :xs="24">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-space :size="8">
|
<a-space :size="8">
|
||||||
@@ -280,6 +322,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">
|
||||||
@@ -311,7 +358,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