From 6d7cde605813c15bb54443cc86c292c98dc36df3 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 22 Apr 2025 15:49:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96udm-voip/ims=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 2 - src/i18n/locales/zh-CN.ts | 2 - src/views/neUser/imsUDM/index.vue | 62 +++++------ src/views/neUser/voip/index.vue | 179 ++++++++++-------------------- 4 files changed, 86 insertions(+), 159 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 949f0db1..7c783e6b 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -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: { diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 758a2158..b4684673 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -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: { diff --git a/src/views/neUser/imsUDM/index.vue b/src/views/neUser/imsUDM/index.vue index b9243fc7..cd2431da 100644 --- a/src/views/neUser/imsUDM/index.vue +++ b/src/views/neUser/imsUDM/index.vue @@ -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([ { title: 'IMSI', dataIndex: 'imsi', - align: 'center', - fixed: 'left', + align: 'left', sorter: true, resizable: true, width: 150, @@ -108,33 +106,33 @@ let tableColumns = ref([ { 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(() => { - + @@ -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(() => { diff --git a/src/views/neUser/voip/index.vue b/src/views/neUser/voip/index.vue index ead10ac9..dac59340 100644 --- a/src/views/neUser/voip/index.vue +++ b/src/views/neUser/voip/index.vue @@ -87,25 +87,19 @@ let tableColumns = ref([ { 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(() => { { :label-col="{ span: 6 }" :labelWrap="true" > - - - - - - - - - - - - - - - - + + + + + + + + - @@ -1050,23 +1001,15 @@ onMounted(() => { name="userName" v-bind="modalStateBatchDelFrom.validateInfos.userName" > - - - + @@ -1099,16 +1042,6 @@ onMounted(() => { :size="10" >