fix: 优化udm-voip/ims功能页面
This commit is contained in:
@@ -762,8 +762,6 @@ export default {
|
||||
opcTip: 'The authentication key, OPC, is calculated from Ki and OP, OP is the root key of the operator, ki is the authentication key, and the maximum length is 32.',
|
||||
delSure:'Are you sure you want to delete the user with IMSI number: {imsi} ?',
|
||||
imsiConfirm:'The length of the IMSI must be 15',
|
||||
passwordTip:'The password length is 5~32 digits',
|
||||
usernameTip:'The username length is 1~32 digits',
|
||||
startUserName:'Start username',
|
||||
},
|
||||
sub: {
|
||||
|
||||
@@ -762,8 +762,6 @@ export default {
|
||||
opcTip: '鉴权秘钥,OPC是由Ki和OP经过计算得来的,OP为运营商的根秘钥,ki是鉴权秘钥,最大长度为32',
|
||||
delSure:'确认删除IMSI编号为: {imsi} 的用户吗?',
|
||||
imsiConfirm:'IMSI的长度必须为15',
|
||||
passwordTip:'密码长度为5~32位',
|
||||
usernameTip:'用户名长度为1~32位数字',
|
||||
startUserName:'起始用户名',
|
||||
},
|
||||
sub: {
|
||||
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
listIMSSub,
|
||||
resetIMSSub,
|
||||
} from '@/api/neData/ims_sub';
|
||||
import { listTenant } from '@/api/system/tenant';
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { getNeViewFile } from '@/api/tool/neFile';
|
||||
const { t } = useI18n();
|
||||
@@ -41,7 +40,7 @@ let queryParams = reactive({
|
||||
tenantName: '',
|
||||
/**移动号 */
|
||||
msisdn: '',
|
||||
tag:undefined,
|
||||
tag: undefined,
|
||||
/**排序字段 */
|
||||
sortField: 'imsi',
|
||||
/**排序方式 */
|
||||
@@ -97,8 +96,7 @@ let tableColumns = ref<ColumnsType>([
|
||||
{
|
||||
title: 'IMSI',
|
||||
dataIndex: 'imsi',
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
align: 'left',
|
||||
sorter: true,
|
||||
resizable: true,
|
||||
width: 150,
|
||||
@@ -108,33 +106,33 @@ let tableColumns = ref<ColumnsType>([
|
||||
{
|
||||
title: 'MSISDN',
|
||||
dataIndex: 'msisdn',
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
align: 'left',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'TAG',
|
||||
dataIndex: 'tag',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
align: 'left',
|
||||
width: 100,
|
||||
key: 'tag',
|
||||
customRender: ({ text }: { text: number }) => {
|
||||
return text === 0 ? 'VoIP' : 'VoLTE';
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'VNI',
|
||||
dataIndex: 'vni',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
align: 'left',
|
||||
resizable: true,
|
||||
width: 250,
|
||||
minWidth: 150,
|
||||
maxWidth: 400,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
key: 'imsi',
|
||||
align: 'left',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -294,16 +292,15 @@ const modalStateFrom = Form.useForm(
|
||||
},
|
||||
],
|
||||
imsi: [
|
||||
{ required: computed(() => modalState.from.tag === 1), message: 'IMSI' + t('common.unableNull') },
|
||||
{
|
||||
required: computed(() => modalState.from.tag === 1),
|
||||
message: 'IMSI' + t('common.unableNull'),
|
||||
},
|
||||
{ min: 15, max: 15, message: t('views.neUser.auth.imsiConfirm') },
|
||||
],
|
||||
msisdn: [{ required: true, message: 'MSISDN' + t('common.unableNull') }],
|
||||
tag: [
|
||||
{ required: true, message: 'TAG' + t('common.unableNull') }
|
||||
],
|
||||
vni: [
|
||||
{ required: true, message: 'vni' + t('common.unableNull') },
|
||||
],
|
||||
tag: [{ required: true, message: 'TAG' + t('common.unableNull') }],
|
||||
vni: [{ required: true, message: 'vni' + t('common.unableNull') }],
|
||||
// algoIndex: [
|
||||
// { required: true, message: 'algoIndex' + t('common.unableNull') },
|
||||
// ],
|
||||
@@ -372,17 +369,14 @@ function fnModalVisibleByBatch() {
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalOk() {
|
||||
console.log(modalState.from)
|
||||
modalStateFrom
|
||||
.validate()
|
||||
.then(e => {
|
||||
const from = Object.assign({}, toRaw(modalState.from));
|
||||
modalState.confirmLoading = true;
|
||||
from.neId = queryParams.neId || '-';
|
||||
console.log(from)
|
||||
const result = from.num === 1
|
||||
? addIMSSub(from)
|
||||
: batchAddIMSSub(from, from.num);
|
||||
const result =
|
||||
from.num === 1 ? addIMSSub(from) : batchAddIMSSub(from, from.num);
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
|
||||
return result
|
||||
@@ -593,7 +587,7 @@ function fnLoadData() {
|
||||
resetIMSSub(neId).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
const num = res.data;
|
||||
const timerS = Math.ceil(+num / 3000) + 3;
|
||||
const timerS = Math.ceil(+num / 500) + 3;
|
||||
notification.success({
|
||||
message: t('views.neUser.auth.loadData'),
|
||||
description: t('views.neUser.auth.loadDataTip', { num, timer: timerS }),
|
||||
@@ -653,7 +647,7 @@ function fnGetList(pageNum?: number) {
|
||||
tableState.data = res.rows;
|
||||
if (
|
||||
tablePagination.total <=
|
||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||
queryParams.pageNum !== 1
|
||||
) {
|
||||
tableState.loading = false;
|
||||
@@ -840,8 +834,12 @@ onMounted(() => {
|
||||
</a-col>
|
||||
<a-col :lg="8" :md="12" :xs="24">
|
||||
<a-form-item label="MSISDN" name="msisdn">
|
||||
<a-input v-model:value="queryParams.msisdn" allow-clear :maxlength="32"
|
||||
:placeholder="t('common.inputPlease')"></a-input>
|
||||
<a-input
|
||||
v-model:value="queryParams.msisdn"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
@@ -850,7 +848,7 @@ onMounted(() => {
|
||||
v-model:value="queryParams.tag"
|
||||
:options="[
|
||||
{ label: 'VoIP', value: 0 },
|
||||
{ label: 'VoLTE', value: 1 }
|
||||
{ label: 'VoLTE', value: 1 },
|
||||
]"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
>
|
||||
@@ -1155,8 +1153,8 @@ onMounted(() => {
|
||||
<a-select
|
||||
v-model:value="modalState.from.tag"
|
||||
:options="[
|
||||
{ label: 'VoIP', value:0 },
|
||||
{ label: 'VoLTE', value: 1 }
|
||||
{ label: 'VoIP', value: 0 },
|
||||
{ label: 'VoLTE', value: 1 },
|
||||
]"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
>
|
||||
|
||||
@@ -87,25 +87,19 @@ let tableColumns = ref<ColumnsType>([
|
||||
{
|
||||
title: 'User Name',
|
||||
dataIndex: 'userName',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: 'Password',
|
||||
dataIndex: 'password',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
align: 'left',
|
||||
width: 200,
|
||||
customRender(opt) {
|
||||
return opt.value ? '*'.repeat(opt.value.length) : '';
|
||||
return '******';
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: 'NEID',
|
||||
// dataIndex: 'neId',
|
||||
// align: 'center',
|
||||
// width: 100,
|
||||
// },
|
||||
{
|
||||
title: t('common.operate'),
|
||||
key: 'userName',
|
||||
@@ -195,7 +189,7 @@ let modalState: ModalStateType = reactive({
|
||||
from: {
|
||||
num: 1,
|
||||
id: '',
|
||||
userName: '',
|
||||
userName: undefined,
|
||||
password: '',
|
||||
},
|
||||
BatchDelForm: {
|
||||
@@ -218,12 +212,9 @@ const modalStateFrom = Form.useForm(
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: 'UserName' + t('common.unableNull') },
|
||||
{ min: 1, max: 32, message: t('views.neUser.auth.usernameTip') },
|
||||
{ pattern: /^\d+$/, message: t('views.neUser.auth.usernameTip') }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: 'Password' + t('common.unableNull') },
|
||||
{ min: 6, max: 32, message: t('views.neUser.auth.passwordTip') },
|
||||
],
|
||||
})
|
||||
);
|
||||
@@ -238,7 +229,9 @@ const modalStateBatchDelFrom = Form.useForm(
|
||||
message: t('views.neUser.auth.numDel') + t('common.unableNull'),
|
||||
},
|
||||
],
|
||||
userName: [{ required: true, message: 'UserName' + t('common.unableNull') }],
|
||||
userName: [
|
||||
{ required: true, message: 'UserName' + t('common.unableNull') },
|
||||
],
|
||||
})
|
||||
);
|
||||
|
||||
@@ -275,11 +268,10 @@ function fnModalOk() {
|
||||
.then(e => {
|
||||
modalState.confirmLoading = true;
|
||||
const from = toRaw(modalState.from);
|
||||
from.algoIndex = `${from.algoIndex}`;
|
||||
from.userName = `${from.userName}`;
|
||||
from.neId = queryParams.neId || '-';
|
||||
const result = from.num === 1
|
||||
? addUDMAuth(from)
|
||||
: batchAddUDMAuth(from, from.num);
|
||||
const result =
|
||||
from.num === 1 ? addUDMAuth(from) : batchAddUDMAuth(from, from.num);
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
result
|
||||
.then(res => {
|
||||
@@ -344,7 +336,7 @@ function fnBatchDelModalOk() {
|
||||
modalState.confirmLoading = true;
|
||||
const from = toRaw(modalState.BatchDelForm);
|
||||
const neId = queryParams.neId || '-';
|
||||
batchDelUDMAuth(neId, from.userName, from.num).then(res => {
|
||||
batchDelUDMAuth(neId, `${from.userName}`, from.num).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
const timerS = Math.ceil(+from.num / 1500) + 1;
|
||||
notification.success({
|
||||
@@ -447,7 +439,11 @@ function fnRecordExport(type: string = 'txt') {
|
||||
const neId = queryParams.neId;
|
||||
if (!neId) return;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
exportUDMAuth({ type: type, neId: neId, userNames: tableState.selectedRowKeys })
|
||||
exportUDMAuth({
|
||||
type: type,
|
||||
neId: neId,
|
||||
userNames: tableState.selectedRowKeys,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success(t('common.msgSuccess', { msg: t('common.export') }), 3);
|
||||
@@ -533,7 +529,7 @@ function fnGetList(pageNum?: number) {
|
||||
tableState.data = res.rows;
|
||||
if (
|
||||
tablePagination.total <=
|
||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||
queryParams.pageNum !== 1
|
||||
) {
|
||||
tableState.loading = false;
|
||||
@@ -556,10 +552,6 @@ type ModalUploadImportStateType = {
|
||||
msg: string;
|
||||
/**含失败信息 */
|
||||
hasFail: boolean;
|
||||
/**导入类型 */
|
||||
typeOptions: { label: string; value: string }[];
|
||||
/**表单 */
|
||||
from: { typeVal: string; typeData: any };
|
||||
};
|
||||
|
||||
/**对话框表格信息导入对象信息状态 */
|
||||
@@ -569,22 +561,8 @@ let uploadImportState: ModalUploadImportStateType = reactive({
|
||||
loading: false,
|
||||
msg: '',
|
||||
hasFail: false,
|
||||
// typeOptions: [
|
||||
// { label: 'Default', value: 'default' },
|
||||
// { label: 'K4', value: 'k4' },
|
||||
// ],
|
||||
from: {
|
||||
typeVal: 'default',
|
||||
typeData: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
/**对话框表格信息导入类型选择 */
|
||||
function fnModalUploadImportTypeChange() {
|
||||
uploadImportState.from.typeData = '';
|
||||
uploadImportState.msg = '';
|
||||
}
|
||||
|
||||
/**对话框表格信息导入失败原因 */
|
||||
function fnModalUploadImportFailReason() {
|
||||
const neId = queryParams.neId;
|
||||
@@ -616,8 +594,6 @@ function fnModalUploadImportFailReason() {
|
||||
function fnModalUploadImportOpen() {
|
||||
uploadImportState.msg = '';
|
||||
uploadImportState.hasFail = false;
|
||||
uploadImportState.from.typeVal = 'default';
|
||||
uploadImportState.from.typeData = undefined;
|
||||
uploadImportState.loading = false;
|
||||
uploadImportState.open = true;
|
||||
}
|
||||
@@ -656,7 +632,6 @@ function fnModalUploadImportUpload(file: File) {
|
||||
return importUDMAuth({
|
||||
neId: neId,
|
||||
uploadPath: filePath,
|
||||
...uploadImportState.from,
|
||||
});
|
||||
})
|
||||
.then(res => {
|
||||
@@ -941,7 +916,7 @@ onMounted(() => {
|
||||
<!-- 新增框或修改框 -->
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:width="800"
|
||||
:width="500"
|
||||
:destroyOnClose="true"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
@@ -957,69 +932,45 @@ onMounted(() => {
|
||||
:label-col="{ span: 6 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.neUser.auth.numAdd')"
|
||||
name="num"
|
||||
v-bind="modalStateFrom.validateInfos.num"
|
||||
:label-col="{ span: 10 }"
|
||||
:labelWrap="false"
|
||||
>
|
||||
<a-input-number
|
||||
v-model:value="modalState.from.num"
|
||||
style="width: 100%"
|
||||
:min="1"
|
||||
:max="10000"
|
||||
placeholder="<=10000"
|
||||
></a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="User Name"
|
||||
name="userName"
|
||||
v-bind="modalStateFrom.validateInfos.userName"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.userName"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.usernameTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-item
|
||||
:label="t('views.neUser.auth.numAdd')"
|
||||
name="num"
|
||||
v-bind="modalStateFrom.validateInfos.num"
|
||||
>
|
||||
<a-input-number
|
||||
v-model:value="modalState.from.num"
|
||||
style="width: 100%"
|
||||
:min="1"
|
||||
:max="10000"
|
||||
placeholder="<=10000"
|
||||
></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="User Name"
|
||||
name="userName"
|
||||
v-bind="modalStateFrom.validateInfos.userName"
|
||||
>
|
||||
<a-input-number
|
||||
v-model:value="modalState.from.userName"
|
||||
allow-clear
|
||||
style="width: 100%"
|
||||
:maxlength="17"
|
||||
placeholder="length <= 17"
|
||||
>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
label="Password"
|
||||
name="password"
|
||||
v-bind="modalStateFrom.validateInfos.password"
|
||||
:label-col="{ span: 3 }"
|
||||
:labelWrap="true"
|
||||
>
|
||||
<a-input-password
|
||||
v-model:value="modalState.from.password"
|
||||
allow-clear
|
||||
:maxlength="32"
|
||||
:maxlength="16"
|
||||
placeholder="password"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.passwordTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input-password>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@@ -1050,23 +1001,15 @@ onMounted(() => {
|
||||
name="userName"
|
||||
v-bind="modalStateBatchDelFrom.validateInfos.userName"
|
||||
>
|
||||
<a-input
|
||||
<a-input-number
|
||||
v-model:value="modalState.BatchDelForm.userName"
|
||||
allow-clear
|
||||
:maxlength="15"
|
||||
style="width: 100%"
|
||||
:min="1"
|
||||
:max="10000"
|
||||
:maxlength="16"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.neUser.auth.usernameTip') }}<br />
|
||||
{{ t('views.neUser.auth.usernameTip1') }}<br />
|
||||
{{ t('views.neUser.auth.usernameTip2') }}<br />
|
||||
{{ t('views.neUser.auth.usernameTip3') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="24" :xs="24">
|
||||
@@ -1099,16 +1042,6 @@ 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-alert
|
||||
:message="uploadImportState.msg"
|
||||
:type="uploadImportState.hasFail ? 'warning' : 'info'"
|
||||
|
||||
Reference in New Issue
Block a user