Merge branch 'main' into multi-tenant
This commit is contained in:
@@ -530,7 +530,7 @@ function fnRecordDelete(imsi: string) {
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户导出
|
||||
* UDM鉴权用户勾选导出
|
||||
*/
|
||||
function fnRecordExport(type: string = 'txt') {
|
||||
const selectLen = tableState.selectedRowKeys.length;
|
||||
@@ -543,13 +543,15 @@ function fnRecordExport(type: string = 'txt') {
|
||||
let content = '';
|
||||
if (type == 'txt') {
|
||||
for (const row of rows) {
|
||||
content += `${row.imsi},${row.ki},${row.algoIndex},${row.amf},${row.opc}\r\n`;
|
||||
const opc = row.opc === '-' ? '' : `,${row.opc}`;
|
||||
content += `${row.imsi},${row.ki},${row.algoIndex},${row.amf}${opc}\r\n`;
|
||||
}
|
||||
}
|
||||
if (type == 'csv') {
|
||||
content = `IMSI,ki,Algo Index,AMF,OPC\r\n`;
|
||||
for (const row of rows) {
|
||||
content += `${row.imsi},${row.ki},${row.algoIndex},${row.amf},${row.opc}\r\n`;
|
||||
const opc = row.opc === '-' ? '' : `,${row.opc}`;
|
||||
content += `${row.imsi},${row.ki},${row.algoIndex},${row.amf}${opc}\r\n`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,7 +559,7 @@ function fnRecordExport(type: string = 'txt') {
|
||||
saveAs(blob, `UDMAuth_${Date.now()}.${type}`);
|
||||
}
|
||||
|
||||
/**列表导出 */
|
||||
/**列表导出全部数据 */
|
||||
function fnExportList(type: string) {
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
@@ -651,6 +653,10 @@ type ModalUploadImportStateType = {
|
||||
loading: boolean;
|
||||
/**上传结果信息 */
|
||||
msg: string;
|
||||
/**导入类型 */
|
||||
typeOptions: { label: string; value: string }[];
|
||||
/**表单 */
|
||||
from: { typeVal: string; typeData: any };
|
||||
};
|
||||
|
||||
/**对话框表格信息导入对象信息状态 */
|
||||
@@ -659,11 +665,27 @@ let uploadImportState: ModalUploadImportStateType = reactive({
|
||||
title: t('components.UploadModal.uploadTitle'),
|
||||
loading: false,
|
||||
msg: '',
|
||||
typeOptions: [
|
||||
{ label: 'Default', value: 'default' },
|
||||
{ label: 'K4', value: 'k4' },
|
||||
],
|
||||
from: {
|
||||
typeVal: 'default',
|
||||
typeData: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
/**对话框表格信息导入类型选择 */
|
||||
function fnModalUploadImportTypeChange() {
|
||||
uploadImportState.from.typeData = '';
|
||||
uploadImportState.msg = '';
|
||||
}
|
||||
|
||||
/**对话框表格信息导入弹出窗口 */
|
||||
function fnModalUploadImportOpen() {
|
||||
uploadImportState.msg = '';
|
||||
uploadImportState.from.typeVal = 'default';
|
||||
uploadImportState.from.typeData = undefined;
|
||||
uploadImportState.loading = false;
|
||||
uploadImportState.visible = true;
|
||||
}
|
||||
@@ -702,6 +724,7 @@ function fnModalUploadImportUpload(file: File) {
|
||||
return importUDMAuth({
|
||||
neId: neId,
|
||||
uploadPath: filePath,
|
||||
...uploadImportState.from,
|
||||
});
|
||||
})
|
||||
.then(res => {
|
||||
@@ -1103,54 +1126,52 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="KI"
|
||||
name="ki"
|
||||
v-bind="modalStateFrom.validateInfos.ki"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.ki"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
:disabled="!!modalState.from.id"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.kiTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
<a-form-item
|
||||
label="KI"
|
||||
name="ki"
|
||||
v-bind="modalStateFrom.validateInfos.ki"
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.ki"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
:disabled="!!modalState.from.id"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.kiTip') }}
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="OPC"
|
||||
name="opc"
|
||||
v-bind="modalStateFrom.validateInfos.opc"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.opc"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
:disabled="!!modalState.from.id"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.opcTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="OPC"
|
||||
name="opc"
|
||||
v-bind="modalStateFrom.validateInfos.opc"
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.opc"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
:disabled="!!modalState.from.id"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.opcTip') }}
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</ProModal>
|
||||
|
||||
@@ -1276,52 +1297,50 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="KI"
|
||||
name="ki"
|
||||
v-bind="modalStateBatchFrom.validateInfos.ki"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.ki"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.kiTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
<a-form-item
|
||||
label="KI"
|
||||
name="ki"
|
||||
v-bind="modalStateBatchFrom.validateInfos.ki"
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.ki"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.kiTip') }}
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="OPC"
|
||||
name="opc"
|
||||
v-bind="modalStateBatchFrom.validateInfos.opc"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.opc"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.opcTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="OPC"
|
||||
name="opc"
|
||||
v-bind="modalStateBatchFrom.validateInfos.opc"
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.BatchForm.opc"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.opcTip') }}
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</ProModal>
|
||||
|
||||
@@ -1399,6 +1418,16 @@ onMounted(() => {
|
||||
:size="10"
|
||||
>
|
||||
<template #default>
|
||||
<a-radio-group
|
||||
v-model:value="uploadImportState.from.typeVal"
|
||||
:options="uploadImportState.typeOptions"
|
||||
@change="fnModalUploadImportTypeChange"
|
||||
/>
|
||||
<a-input-password
|
||||
v-if="uploadImportState.from.typeVal === 'k4'"
|
||||
v-model:value="uploadImportState.from.typeData"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
/>
|
||||
<a-textarea
|
||||
:disabled="true"
|
||||
:hidden="!uploadImportState.msg"
|
||||
|
||||
@@ -8,7 +8,6 @@ import { ColumnsType } from 'ant-design-vue/lib/table';
|
||||
import UploadModal from '@/components/UploadModal/index.vue';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import saveAs from 'file-saver';
|
||||
@@ -27,15 +26,6 @@ import {
|
||||
import { listTenant } from '@/api/system/tenant';
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
/**CN Type可选类型 */
|
||||
udmSubCNType: DictType[];
|
||||
} = reactive({
|
||||
udmSubCNType: [],
|
||||
});
|
||||
|
||||
/**网元参数 */
|
||||
let neOtions = ref<Record<string, any>[]>([]);
|
||||
@@ -154,15 +144,16 @@ let tableColumns = ref<ColumnsType>([
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'CN Type',
|
||||
title: '5G',
|
||||
dataIndex: 'cn',
|
||||
key: 'cn',
|
||||
key: 'cnFlag',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: 'EPS',
|
||||
title: '4G',
|
||||
dataIndex: 'epsFlag',
|
||||
key: 'epsFlag',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
@@ -1241,14 +1232,10 @@ function delBigRow(bigIndex: any) {
|
||||
onMounted(() => {
|
||||
// 初始字典数据
|
||||
Promise.allSettled([
|
||||
getDict('udm_sub_cn_type'),
|
||||
listTenant({ parentId: 0 }),
|
||||
]).then(resArr => {
|
||||
if (resArr[0].status === 'fulfilled') {
|
||||
dict.udmSubCNType = resArr[0].value;
|
||||
}
|
||||
if (resArr[1].status === 'fulfilled') {
|
||||
var tenantNameData = resArr[1].value;
|
||||
var tenantNameData = resArr[0].value;
|
||||
if (
|
||||
tenantNameData.code === RESULT_CODE_SUCCESS &&
|
||||
Array.isArray(tenantNameData.data)
|
||||
@@ -1559,8 +1546,19 @@ onMounted(() => {
|
||||
}"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'cn'">
|
||||
<DictTag :options="dict.udmSubCNType" :value="record.cn" />
|
||||
<template v-if="column.key === 'cnFlag'">
|
||||
{{
|
||||
record.cn === '3'
|
||||
? t('views.neUser.sub.enable')
|
||||
: t('views.neUser.sub.disable')
|
||||
}}
|
||||
</template>
|
||||
<template v-if="column.key === 'epsFlag'">
|
||||
{{
|
||||
record.epsFlag === '1'
|
||||
? t('views.neUser.sub.enable')
|
||||
: t('views.neUser.sub.disable')
|
||||
}}
|
||||
</template>
|
||||
<template v-if="column.key === 'imsi'">
|
||||
<a-space :size="8" align="center">
|
||||
@@ -1639,17 +1637,6 @@ onMounted(() => {
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="CN Type"
|
||||
name="cn"
|
||||
:help="t('views.neUser.sub.cnTypeTip')"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.cn"
|
||||
:options="dict.udmSubCNType"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
@@ -1788,6 +1775,22 @@ onMounted(() => {
|
||||
<a-divider orientation="left" style="margin: -2px">5G</a-divider>
|
||||
</template>
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item
|
||||
label="5GC Flag"
|
||||
name="cnFlag"
|
||||
:help="t('views.neUser.sub.cnFlag')"
|
||||
>
|
||||
<a-select v-model:value="modalState.from.cn">
|
||||
<a-select-option value="3">
|
||||
{{ t('views.neUser.sub.enable') }}
|
||||
</a-select-option>
|
||||
<a-select-option value="0">
|
||||
{{ t('views.neUser.sub.disable') }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item
|
||||
label="5G Subscribed UE AMBR Template"
|
||||
@@ -2190,17 +2193,6 @@ onMounted(() => {
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="CN Type"
|
||||
name="cn"
|
||||
:help="t('views.neUser.sub.cnTypeTip')"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.BatchForm.cn"
|
||||
:options="dict.udmSubCNType"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
@@ -2340,6 +2332,22 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item
|
||||
label="5GC Flag"
|
||||
name="cnFlag"
|
||||
:help="t('views.neUser.sub.cnFlag')"
|
||||
>
|
||||
<a-select v-model:value="modalState.BatchForm.cn">
|
||||
<a-select-option value="3">
|
||||
{{ t('views.neUser.sub.enable') }}
|
||||
</a-select-option>
|
||||
<a-select-option value="0">
|
||||
{{ t('views.neUser.sub.disable') }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
<a-form-item
|
||||
label="5G Subscribed UE AMBR Template"
|
||||
|
||||
Reference in New Issue
Block a user