From b03f4bb1d61d0a02f3da2310a0563e989fc7dfc2 Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Fri, 12 Apr 2024 10:35:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?PCF=E7=AD=96=E7=95=A5=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 18 +++++++++--------- src/i18n/locales/zh-CN.ts | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 6ccbb09a..90e23005 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -719,14 +719,14 @@ export default { delSure:'Are you sure you want to delete the user with IMSI number: {imsi}?', uploadFileOk: 'File Upload Successful', uploadFileErr: 'File Upload Failed', - pccRuleTip:'templates of PCC rule(pccRules.yaml)', - sessRuleTip:'templates of session rule(sessRules.yaml)', - qosAudioTip:'QoS of audio call(qosTpl.yaml)', - qosVideoTip:'QoS of video call(qosTpl.yaml)', - hdrTip:'HTTP header enrich(headerEnrichTpl.yaml)', - ueTip:'template of UE Policy(ursp.yaml)', - sarTip1:'Service Area Restriction', - sarTip2:'(serviceAreaRestriction.yaml)', + pccRuleTip:'PCC policy rule template (corresponding to parameter configuration -PCC Rules)', + sessRuleTip:' Session policy rule template (corresponding to parameter configuration-session Rules)', + qosAudioTip:' Voice call QoS(corresponding parameter configuration -QoS Template QoS ID)', + qosVideoTip:' Video call QoS(corresponding parameter configuration -QoS Template QoS ID)', + hdrTip:'HTTP Header enhancement (corresponding parameter configuration -Header Enrich Template)', + ueTip:'UE policy template (example: uep_001)', + sarTip1:' Service area Restriction ', + sarTip2:'(corresponding parameter setting -Service Area Restriction)', rfsfTip:'RAT Frequency Selection Priority', }, base5G: { @@ -1199,7 +1199,7 @@ export default { cacheInfo: { baseInfo: "Basic Info", version: "Service Versions", - mode: "Perating Mode", + mode: "Operating Mode", modeStandalone: "stand-alone", modeClusters: "clusters", port: "Port", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 609a9390..d0dcd5da 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -719,14 +719,14 @@ export default { delSure:'确认删除IMSI编号为: {imsi} 的用户吗?', uploadFileOk: '文件上传成功', uploadFileErr: '文件上传失败', - pccRuleTip:'PCC策略规则模板(pccRules.yaml)', - sessRuleTip:'会话策略规则模板(sessRules.yaml)', - qosAudioTip:'语音呼叫QoS(qosTpl.yaml)', - qosVideoTip:'视频呼叫QoS(qosTpl.yaml)', - hdrTip:'HTTP头增强(headerEnrichTpl.yaml)', - ueTip:'UE策略模板(ursp.yaml)', + pccRuleTip:'PCC策略规则模板(对应参数配置-PCC Rules)', + sessRuleTip:'会话策略规则模板(对应参数配置-Session Rules)', + qosAudioTip:'语音呼叫QoS(对应参数配置-QoS Template的QoS ID)', + qosVideoTip:'视频呼叫QoS(对应参数配置-QoS Template的QoS ID)', + hdrTip:'HTTP头增强(对应参数配置-Header Enrich Template)', + ueTip:'UE策略模板(样例: uep_001)', sarTip1:'服务区限制', - sarTip2:'(serviceAreaRestriction.yaml)', + sarTip2:'(对应参数配置-Service Area Restriction)', rfsfTip:'无线频率选择优先级', }, base5G: { From f050e500e92fe02d694db50f0d4b9b6be0d91ae6 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 12 Apr 2024 17:47:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20pcf=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E9=A1=B5=E6=94=AF=E6=8C=81=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/neUser/pcf.ts | 9 +- src/i18n/locales/en-US.ts | 2 + src/i18n/locales/zh-CN.ts | 4 +- src/views/neUser/pcf/index.vue | 178 +++++++++++++++++++++++---------- 4 files changed, 139 insertions(+), 54 deletions(-) diff --git a/src/api/neUser/pcf.ts b/src/api/neUser/pcf.ts index 77109c77..32214aa3 100644 --- a/src/api/neUser/pcf.ts +++ b/src/api/neUser/pcf.ts @@ -136,6 +136,7 @@ export async function batchUpdateRule(data: Record) { url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`, method: 'put', data: data, + timeout: 60_000, }); // 解析数据 if (result.code === RESULT_CODE_SUCCESS) { @@ -164,6 +165,7 @@ export async function addRule(data: Record) { url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`, method: 'post', data: data, + timeout: 60_000, }); // 解析数据 if (result.code === RESULT_CODE_SUCCESS && result.data?.status) { @@ -186,6 +188,7 @@ export async function batchAddRule(data: Record) { url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`, method: 'post', data: data, + timeout: 60_000, }); // 解析数据 if (result.code === RESULT_CODE_SUCCESS) { @@ -209,10 +212,11 @@ export async function batchAddRule(data: Record) { * @param data 规则对象 * @returns object */ -export function delRule(neId: string, data: Record) { +export function delRule(neId: string, imsi: string) { return request({ - url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${data.imsi}`, + url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`, method: 'delete', + timeout: 60_000, }); } @@ -225,5 +229,6 @@ export async function batchDelRule(data: Record) { return request({ url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}&imsi=${data.imsi}`, method: 'delete', + timeout: 60_000, }); } diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 90e23005..4287c962 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -708,6 +708,7 @@ export default { addTitle: 'Adding Policy Control Information', updateTitle: '{imsi} Policy control information', startIMSI: 'Start IMSI', + batchOper: 'Batch Operations', batchAddText: 'Batch Add', batchDelText: 'Batch Delete', batchUpdateText: 'Batch Modify', @@ -716,6 +717,7 @@ export default { 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.', + checkDel: 'Check Delete', delSure:'Are you sure you want to delete the user with IMSI number: {imsi}?', uploadFileOk: 'File Upload Successful', uploadFileErr: 'File Upload Failed', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index d0dcd5da..3f4e865d 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -708,6 +708,7 @@ export default { addTitle: '新增策略控制信息', updateTitle: '{imsi} 策略控制信息', startIMSI: '起始IMSI', + batchOper: '批量操作', batchAddText: '批量新增', batchDelText: '批量删除', batchUpdateText: '批量更新', @@ -716,7 +717,8 @@ export default { imsiTip1: 'MCC=移动国家号码, 由三位数字组成', imsiTip2: 'MNC=移动网络号,由两位数字组成', imsiTip3: 'MSIN=移动客户识别码,采用等长10位数字构成', - delSure:'确认删除IMSI编号为: {imsi} 的用户吗?', + checkDel:'勾选删除', + delSure:'确认删除IMSI编号为: {imsi} 的数据项吗?', uploadFileOk: '文件上传成功', uploadFileErr: '文件上传失败', pccRuleTip:'PCC策略规则模板(对应参数配置-PCC Rules)', diff --git a/src/views/neUser/pcf/index.vue b/src/views/neUser/pcf/index.vue index 9cab9454..838ecc70 100644 --- a/src/views/neUser/pcf/index.vue +++ b/src/views/neUser/pcf/index.vue @@ -35,6 +35,10 @@ let queryParams = reactive({ imsi: '', /**号码 */ msisdn: '', + /**当前页数 */ + pageNum: 1, + /**每页条数 */ + pageSize: 20, }); /**查询参数重置 */ @@ -58,6 +62,8 @@ type TabeStateType = { seached: boolean; /**记录数据 */ data: object[]; + /**勾选记录 */ + selectedRowKeys: (string | number)[]; }; /**表格状态 */ @@ -67,6 +73,7 @@ let tableState: TabeStateType = reactive({ striped: false, seached: true, data: [], + selectedRowKeys: [], }); /**表格字段列 */ @@ -144,6 +151,37 @@ let tableColumns = ref([ }, ]); +/**表格字段列排序 */ +let tableColumnsDnd = ref([]); + +/**表格分页器参数 */ +let tablePagination = reactive({ + /**当前页数 */ + current: 1, + /**每页条数 */ + pageSize: 20, + /**默认的每页条数 */ + defaultPageSize: 20, + /**指定每页可以显示多少条 */ + pageSizeOptions: ['10', '20', '50', '100'], + /**只有一页时是否隐藏分页器 */ + hideOnSinglePage: false, + /**是否可以快速跳转至某页 */ + showQuickJumper: true, + /**是否可以改变 pageSize */ + showSizeChanger: true, + /**数据总数 */ + total: 0, + showTotal: (total: number) => t('common.tablePaginationTotal', { total }), + onChange: (page: number, pageSize: number) => { + tablePagination.current = page; + tablePagination.pageSize = pageSize; + queryParams.pageNum = page; + queryParams.pageSize = pageSize; + // fnGetList(); + }, +}); + /**表格紧凑型变更操作 */ function fnTableSize({ key }: MenuInfo) { tableState.size = key as SizeType; @@ -154,6 +192,11 @@ function fnTableStriped(_record: unknown, index: number): any { return tableState.striped && index % 2 === 1 ? 'table-striped' : undefined; } +/**表格多选 */ +function fnTableSelectedRowKeys(keys: (string | number)[]) { + tableState.selectedRowKeys = keys; +} + /**对话框对象信息状态类型 */ type ModalStateType = { /**新增框或修改框是否显示 */ @@ -366,31 +409,36 @@ function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') { /** * 记录删除 - * @param row 网元编号ID + * @param imsi 网元编号ID */ -function fnRecordDelete(row: Record) { +function fnRecordDelete(imsi: string) { + const neID = queryParams.neId; + if (!neID) return; + let imsiMsg = imsi; + if (imsi === '0') { + imsiMsg = `${tableState.selectedRowKeys[0]}... ${tableState.selectedRowKeys.length}`; + imsi = tableState.selectedRowKeys.join(','); + } + Modal.confirm({ title: t('common.tipTitle'), - content: t('views.neUser.pcf.delSure', { imsi: row.imsi }), + content: t('views.neUser.pcf.delSure', { imsi: imsiMsg }), onOk() { const key = 'delRule'; message.loading({ content: t('common.loading'), key }); - const neID = queryParams.neId || '-'; - delRule(neID, row).then(res => { + delRule(neID, imsi).then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: t('common.msgSuccess', { - msg: `${t('common.deleteText')} ${row.imsi}`, - }), + content: `${res.msg}`, key, - duration: 2, + duration: 3, }); fnGetList(); } else { message.error({ content: `${res.msg}`, key: key, - duration: 2, + duration: 3, }); } }); @@ -431,6 +479,10 @@ function fnGetList() { tableState.loading = true; listRules(toRaw(queryParams)).then(res => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { + // 取消勾选 + if (tableState.selectedRowKeys.length > 0) { + tableState.selectedRowKeys = []; + } tableState.data = res.rows; } else { tableState.data = []; @@ -560,12 +612,20 @@ onMounted(() => { - + - + @@ -602,42 +662,45 @@ onMounted(() => { - - {{ t('views.neUser.pcf.batchAddText') }} - - - - {{ t('views.neUser.pcf.batchUpdateText') }} - - - - {{ t('views.neUser.pcf.batchDelText') }} + + {{ t('views.neUser.pcf.checkDel') }} + + + {{ t('views.neUser.pcf.batchOper') }} + + + + + {{ t('views.neUser.pcf.import') }} { size="small" /> + @@ -724,14 +792,19 @@ onMounted(() => {