From 10a48af368dafa401eeed2c4e56c941b97d832f4 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 23 Nov 2023 21:49:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20UDM=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 63 ++-- src/i18n/locales/zh-CN.ts | 49 ++- src/views/neUser/auth/index.vue | 306 ++++++++------- src/views/neUser/sub/index.vue | 639 +++++++++++++++++++++++--------- 4 files changed, 700 insertions(+), 357 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 341561ef..674e17a1 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -476,13 +476,20 @@ export default { loadDataConfirm: 'Are you sure you want to reload the data?', loadData: 'Load Data', loadDataTip: 'Successfully obtained updated data: {num} items. The system is updating the data internally. Please do not click repeatedly to obtain updates!!!', - num: 'Number allocation', - batchAddText: 'Batch Add', - batchDelText: 'Batch Delete', - delNum:'Number of deletions', - imsiTip:'SUPI=MCC+MNC+MSIN MCC=mobile country code, consisting of three digits MNC=Mobile Network Number, consisting of two digits MSIN=Mobile Customer Identification Number, composed of 10 digits of equal length', - delSure:'Are you sure to delete the user with IMSI number: {imsi}?', - noListData:'No network element list data yet', + startIMSI: 'Start IMSI', + batchAddText: 'Batch Addition', + batchDelText: 'Batch Deletion', + numAdd: 'Number of releases', + numDel: 'Number of deletion', + imsiTip: 'IMSI=MCC+MNC+MSIN', + imsiTip1: 'MCC=Mobile Country Code, consisting of three digits.', + imsiTip2: 'MNC = Mobile Network Number, consisting of two digits', + imsiTip3: 'MSIN = Mobile Subscriber Identification Number, consisting of 10 equal digits.', + amfTip: 'Authentication management field, maximum parameter length is 4', + algoIndexTip: 'Algorithm index, between 0 and 15', + kiTip: 'User signing key information, the maximum length of 32', + 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}?', }, sub: { subInfo:'Subscription Info', @@ -492,23 +499,33 @@ export default { exportConfirm: 'Are you sure to export all signed user data?', import: 'Import', loadDataConfirm: 'Are you sure you want to reload the data?', - loadData: 'Load Data', - loadDataTip: 'Successfully obtained updated data: {num} items. The system is updating the data internally. Please do not click repeatedly to obtain updates!!!', - num: 'Number of deletions', - batchAddText: 'Batch Add', - batchDelText: 'Batch Delete', + loadData: 'Updated Data', + loadDataTip: 'Successfully fetched updated data: {num} items, the system internally carries out the data update, please do not repeatedly click to get the update!!!!', + numAdd: 'Number of releases', + numDel: 'Number of deletion', + batchAddText: 'Batch Addition', + batchDelText: 'Batch Deletion', + enable:'Enable', + disable:'Disable', startIMSI: 'Start IMSI', - msisdnTip:'Parameter maximum length: {msg}', - arfbTip:'Restricted area template. In the restricted area specified by the template, the UE is not allowed to communicate with the network.', - sarTip:'Service area restriction template defines the allowed areas in which the UE can communicate with the network; defines the disallowed areas in which the UE and the network are not allowed to initiate Service Request or SM signaling to obtain user services.', - micoTip:'Signed MICO business flag', - rfspTip:'RFSP index, in NG-RAN, the index of a specific RRM configuration, the parameter is between 0 and 127', - epsFlagTip:'Whether to enable 4G EPS service, 0=disable, 1=enable', - contextIdTip:'To sign up for the APN context ID, you must select it from the APN Context list.', - staticIpTip:'Specify the static IP address used by mobile phone users when surfing the Internet. If it is "-", it means using a dynamic IP address.', - epsOdbTip:"ODB (Operator-Determined Barring) operator-determined blocking, that is, the user's business ability to access the EPS network is determined by the operator. Selected --- the corresponding service is allowed Unselected --- the corresponding service is prohibited", - hplmnOdbTip:"HPLMN-ODB blocking determined by the home operator, that is, the user's service ability to access the EPS network is determined by the user's home operator. Selected --- the corresponding service is allowed Unselected -- the corresponding service is prohibited", - ardTip:'The access control flag (Access-Restriction-Data) can be used to distinguish 2G/3G/LTE users, which facilitates differentiated services for different types of users when 2G/3G/LTE networks coexist.', + imsiTip: 'IMSI=MCC+MNC+MSIN', + imsiTip1: 'MCC=Mobile Country Code, consisting of three digits.', + imsiTip2: 'MNC = Mobile Network Number, consisting of two digits', + imsiTip3: 'MSIN = Mobile Subscriber Identification Number, consisting of 10 equal digits.', + msisdnTip: 'Maximum parameter length {num}', + inputTip: 'The maximum length of the parameter is {num}', + arfbTip: 'Restricted area template, in which the UE is not allowed to communicate with the network in the restricted area specified in the template', + sarTip: 'Service Area Restriction template, defining permitted areas in which the UE can communicate with the network, and disallowed areas in which the UE and the network are not allowed to initiate Service Requests or SM signaling to obtain subscriber services', + micoTip: 'Signed MICO business flag bits', + rfspTip:'RFSP index, in NG-RAN, the index of a specific RRM configuration, parameter between 0 and 127', + ueTypeTip: 'Operator-defined subscriber UE Usage Type, integer, parameter between 0 and 127', + epsFlagTip: 'Enable or disable 4G EPS service', + contextIdTip: 'To sign up for an APN Context ID, you must select it from the APN Context list.', + apnContextTip: 'The list of APNs available to the phone, up to six, is defined in the HSS.', + staticIpTip: 'Specify the static IP address to be used by the cell phone user to access the Internet, and "-" means dynamic IP address is used.', + epsOdbTip: 'ODB (Operator-Determined Barring) Operator-determined blocking, i.e. the ability of a subscriber to access the EPS network is determined by the operator.', + hplmnOdbTip: 'HPLMN-ODB homing operator-determined blocking, i.e., the ability of a subscriber to access services in the EPS network is determined by the subscriber is homing operator', + ardTip:'Access-Restriction-Data (Access-Restriction-Data), can be used to distinguish between 2G/3G/LTE users, to facilitate the coexistence of 2G/3G/LTE network for different types of users to distinguish between the service', }, base5G: { neTypePlease: 'Query network element object', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 69f76e5d..5f71d6c7 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -476,13 +476,20 @@ export default { loadDataConfirm: '确认要重新加载数据吗?', loadData: '更新数据', loadDataTip: '成功获取更新数据:{num}条,系统内部进行数据更新,请勿重复点击获取更新!!!', - num: '放号数', + startIMSI: '起始IMSI', batchAddText: '批量新增', batchDelText: '批量删除', - delNum:'删除个数', - imsiTip:' SUPI=MCC+MNC+MSIN MCC=移动国家号码, 由三位数字组成 MNC=移动网络号,由两位数字组成 MSIN=移动客户识别码,采用等长10位数字构成', - delSure:'确认删除IMSI编号为: {imsi} 的用户嘛?', - noListData:'暂无网元列表数据', + numAdd: '放号个数', + numDel:'删除个数', + imsiTip: 'IMSI=MCC+MNC+MSIN', + imsiTip1: 'MCC=移动国家号码, 由三位数字组成', + imsiTip2: 'MNC=移动网络号,由两位数字组成', + imsiTip3: 'MSIN=移动客户识别码,采用等长10位数字构成', + amfTip: '鉴权管理域,参数最大长度为 4', + algoIndexTip: '算法索引,介于0到15之间', + kiTip: '用户签权密钥信息,最大长度为32', + opcTip: '鉴权秘钥,OPC是由Ki和OP经过计算得来的,OP为运营商的根秘钥,ki是鉴权秘钥,最大长度为32', + delSure:'确认删除IMSI编号为: {imsi} 的用户吗?', }, sub: { subInfo:'签约信息', @@ -494,20 +501,30 @@ export default { loadDataConfirm: '确认要重新加载数据吗?', loadData: '更新数据', loadDataTip: '成功获取更新数据:{num}条,系统内部进行数据更新,请勿重复点击获取更新!!!', - num: '删除个数', + numAdd: '放号个数', + numDel: '删除个数', batchAddText: '批量新增', batchDelText: '批量删除', + enable:'开启', + disable:'关闭', startIMSI: '起始IMSI', - msisdnTip:'参数最大长度{msg}', - arfbTip:'限制区域模板,在模板指定的限制区域中,UE 不允许与网络通信', - sarTip:'服务区域限制模板,定义允许的区域,UE在这些区域中可以和网络通信;定义不允许的区,UE和网络在这些区域中,不允许发起Service Request 或 SM信令来获取用户服务', - micoTip:'签约的MICO业务标志位', - rfspTip:'RFSP 索引,在 NG-RAN中,特定RRM配置的索引,参数介于0到127之间', - epsFlagTip:'是否开启4G EPS 服务,0=不开启,1=开启', - contextIdTip:'签约APN 上下文ID,必须从APN Context list 中选择', - staticIpTip:'指定手机用户上网时使用的静态IP地址,为"-"时表示使用动态IP地址', - epsOdbTip:'ODB(Operator-Determined Barring)运营商决定的闭锁,即用户接入EPS网络的业务能力由运营商决定.选中 ---对应服务被允许 未选 --- 对应服务被禁止', - hplmnOdbTip:'HPLMN-ODB归属运营商决定的闭锁,即用户接入EPS网络的业务能力由用户归宿运营商决定.选中 --- 对应服务被允许 未选 -- 对应服务被禁止', + imsiTip: 'IMSI=MCC+MNC+MSIN', + imsiTip1: 'MCC=移动国家号码, 由三位数字组成', + imsiTip2: 'MNC=移动网络号,由两位数字组成', + imsiTip3: 'MSIN=移动客户识别码,采用等长10位数字构成', + msisdnTip: '参数最大长度 {num}', + inputTip: '参数最大长度为 {num}', + arfbTip: '限制区域模板,在模板指定的限制区域中,UE 不允许与网络通信', + sarTip: '服务区域限制模板,定义允许的区域,UE 在这些区域中可以和网络通信;定义不允许的区,UE 和网络在这些区域中,不允许发起Service Request 或 SM 信令来获取用户服务', + micoTip: '签约的 MICO 业务标志位', + rfspTip:'RFSP 索引,在 NG-RAN 中,特定 RRM 配置的索引,参数介于0到127之间', + ueTypeTip: '运营商定义的用户 UE Usage Type,整型,参数介于0到127之间', + epsFlagTip: '是否开启4G EPS 服务', + contextIdTip: '签约APN 上下文ID,必须从APN Context list 中选择。', + apnContextTip: '手机可用的APN列表,最多六个,在HSS中定义。', + staticIpTip: '指定手机用户上网时使用的静态IP地址,为"-"时表示使用动态IP地址', + epsOdbTip: 'ODB(Operator-Determined Barring)运营商决定的闭锁,即用户接入EPS网络的业务能力由运营商决定.选中 ---对应服务被允许 未选 --- 对应服务被禁止', + hplmnOdbTip: 'HPLMN-ODB归属运营商决定的闭锁,即用户接入EPS网络的业务能力由用户归宿运营商决定.选中 --- 对应服务被允许 未选 -- 对应服务被禁止', ardTip:'接入控制标志(Access-Restriction-Data),可用于区分2G/3G/LTE用户,便于为2G/3G/LTE网络共存时,对不同类型用户进行区分服务', }, base5G: { diff --git a/src/views/neUser/auth/index.vue b/src/views/neUser/auth/index.vue index c35b2ffa..5eb1cf3d 100644 --- a/src/views/neUser/auth/index.vue +++ b/src/views/neUser/auth/index.vue @@ -112,7 +112,7 @@ let tableColumns: ColumnsType = [ // width: 10, // }, { - title: 'ALGO Index', + title: 'Algo Index', dataIndex: 'algoIndex', align: 'center', width: 4, @@ -122,7 +122,7 @@ let tableColumns: ColumnsType = [ key: 'imsi', align: 'center', fixed: 'right', - width: 5, + width: 2, }, ]; @@ -173,8 +173,6 @@ function fnTableChange(pagination: any, filters: any, sorter: any, extra: any) { /**对话框对象信息状态类型 */ type ModalStateType = { - /**详情框是否显示 */ - visibleByView: boolean; /**新增框或修改框是否显示 */ visibleByEdit: boolean; /**批量新增新增框是否显示 */ @@ -197,7 +195,6 @@ type ModalStateType = { /**对话框对象信息状态 */ let modalState: ModalStateType = reactive({ - visibleByView: false, visibleByEdit: false, visibleByBatch: false, visibleByBatchDel: false, @@ -207,19 +204,19 @@ let modalState: ModalStateType = reactive({ imsi: '', amf: '8000', ki: '', - algoIndex: '0', + algoIndex: 0, opc: '', }, BatchForm: { - num: '', + num: 1, imsi: '', - amf: '', + amf: '8000', ki: '', - algoIndex: '', + algoIndex: 0, opc: '', }, BatchDelForm: { - num: '', + num: 1, imsi: '', }, confirmLoading: false, @@ -246,7 +243,7 @@ const modalStateBatchFrom = Form.useForm( num: [ { required: true, - message: t('views.neUser.auth.num') + t('common.unableNull'), + message: t('views.neUser.auth.numAdd') + t('common.unableNull'), }, ], imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }], @@ -265,39 +262,13 @@ const modalStateBatchDelFrom = Form.useForm( num: [ { required: true, - message: t('views.neUser.auth.delNum') + t('common.unableNull'), + message: t('views.neUser.auth.numDel') + t('common.unableNull'), }, ], imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }], }) ); -/** - * 对话框弹出显示为 详情框 - * @param imsi 网元id, 不传为新增 - */ -function fnModalVisibleByVive(imsi: string) { - if (modalState.confirmLoading) return; - const hide = message.loading('Waiting...', 0); - modalState.confirmLoading = true; - const neID = queryParams.neId || '-'; - getAuth(neID, imsi) - .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - modalState.from = Object.assign(modalState.from, res.data); - modalState.title = - t('common.viewText') + t('views.neUser.auth.authInfo'); - modalState.visibleByView = true; - } else { - message.error(t('common.getInfoFail'), 2); - } - }) - .finally(() => { - hide(); - modalState.confirmLoading = false; - }); -} - /** * 对话框弹出显示为 新增或者修改 * @param noticeId 网元id, 不传为新增 @@ -312,7 +283,7 @@ function fnModalVisibleByEdit(row?: Record) { const hide = message.loading(t('common.loading'), 0); modalState.confirmLoading = true; const neID = queryParams.neId || '-'; - getAuth(neID, row?.imsi) + getAuth(neID, row.imsi) .then(res => { if (res.code === RESULT_CODE_SUCCESS) { modalState.from = Object.assign(modalState.from, res.data); @@ -353,14 +324,13 @@ function fnModalVisibleByBatch(batchFlag?: number) { * 进行表达规则校验 */ function fnModalOk() { - const neID = queryParams.neId; - if (!neID) return; modalStateFrom .validate() .then(e => { modalState.confirmLoading = true; const from = toRaw(modalState.from); - from.neId = neID; + from.neId = queryParams.neId || '-'; + from.algoIndex = `${from.algoIndex}`; const result = from.id ? updateAuth(from) : addAuth(from); const hide = message.loading({ content: t('common.loading') }); result @@ -400,9 +370,8 @@ function fnBatchModalOk() { .then(e => { modalState.confirmLoading = true; const from = toRaw(modalState.BatchForm); - const neID = queryParams.neId || '-'; - // const result = from.id ? updateAuth(from) : addAuth(neID, from); - from.neID = neID; + from.neID = queryParams.neId || '-'; + from.algoIndex = `${from.algoIndex}`; const result = batchAuth(from); const hide = message.loading({ content: t('common.loading') }); result @@ -481,7 +450,6 @@ function fnBatchDelModalOk() { */ function fnBatchModalCancel() { modalState.visibleByBatch = false; - modalState.visibleByView = false; modalStateBatchFrom.resetFields(); } @@ -491,7 +459,6 @@ function fnBatchModalCancel() { */ function fnBatchDelModalCancel() { modalState.visibleByBatchDel = false; - modalState.visibleByView = false; modalStateBatchDelFrom.resetFields(); } @@ -501,7 +468,6 @@ function fnBatchDelModalCancel() { */ function fnModalCancel() { modalState.visibleByEdit = false; - modalState.visibleByView = false; modalStateFrom.resetFields(); } @@ -579,12 +545,12 @@ function fnLoadData() { description: t('views.neUser.auth.loadDataTip', { num: res.data }), duration: 10, }); - // 延迟3s后关闭loading刷新列表 + // 延迟5s后关闭loading刷新列表 setTimeout(() => { modalState.loadDataLoading = false; tableState.loading = false; // 表格loading fnQueryReset(); - }, 3000); + }, 5000); } else { message.error({ content: t('common.getInfoFail'), @@ -687,7 +653,7 @@ onMounted(() => { } } else { message.warning({ - content: t('views.neUser.auth.noListData'), + content: t('common.noData'), duration: 2, }); } @@ -877,17 +843,6 @@ onMounted(() => {