diff --git a/src/views/neUser/base5G/index.vue b/src/views/neUser/base5G/index.vue index 668e8cf7..01bb4aea 100644 --- a/src/views/neUser/base5G/index.vue +++ b/src/views/neUser/base5G/index.vue @@ -9,6 +9,9 @@ import useI18n from '@/hooks/useI18n'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import useNeInfoStore from '@/store/modules/neinfo'; 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 route = useRoute(); const { t } = useI18n(); @@ -24,6 +27,8 @@ let queryParams = reactive({ neType: ['', ''], /**GNB_ID */ id: '', + /** 租户名称*/ + tenantName: '', /**当前页数 */ pageNum: 1, /**每页条数 */ @@ -35,6 +40,7 @@ function fnQueryReset() { queryParams = Object.assign(queryParams, { neId: '', id: '', + tenantName: '', pageNum: 1, pageSize: 20, }); @@ -67,7 +73,7 @@ let tableState: TabeStateType = reactive({ }); /**表格字段列 */ -let tableColumns = ref([ +let tableColumns: ColumnsType = [ { title: 'Radio ID', dataIndex: 'id', @@ -89,12 +95,22 @@ let tableColumns = ref([ minWidth: 150, maxWidth: 400, }, + { + title: 'Tenant Name', + dataIndex: 'tenantName', + align: 'center', + key: 'tenantName', + width: 150, + }, { title: 'Radio Address', dataIndex: 'address', align: 'left', }, -]); +]; + +/**表格字段列排序 */ +let tableColumnsDnd = ref([]); /**表格分页器参数 */ let tablePagination = reactive({ @@ -160,7 +176,8 @@ function fnGetList(pageNum?: number) { tableState.loading = false; fnGetList(queryParams.pageNum - 1); } - } else {//AMF返回404是代表没找到这个数据 GNB_NOT_FOUND + } else { + //AMF返回404是代表没找到这个数据 GNB_NOT_FOUND tablePagination.total = 0; tableState.data = []; } @@ -209,6 +226,14 @@ onMounted(() => { } }) .finally(() => { + if (useUserStore().roles.includes('tenant')) { + const operateColumnIndex = tableColumns.findIndex( + (column: any) => column.key === 'tenantName' + ); + if (operateColumnIndex !== -1) { + tableColumns.splice(operateColumnIndex, 1); + } + } // 获取列表数据 fnGetList(); }); @@ -240,6 +265,23 @@ onMounted(() => { + + + + + @@ -280,6 +322,11 @@ onMounted(() => { + @@ -311,7 +358,7 @@ onMounted(() => {