Merge remote-tracking branch 'origin/main' into lichang
This commit is contained in:
@@ -136,6 +136,7 @@ export async function batchUpdateRule(data: Record<string, any>) {
|
||||
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<string, any>) {
|
||||
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<string, any>) {
|
||||
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<string, any>) {
|
||||
* @param data 规则对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delRule(neId: string, data: Record<string, any>) {
|
||||
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<string, any>) {
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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,17 +717,18 @@ 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',
|
||||
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 +1201,7 @@ export default {
|
||||
cacheInfo: {
|
||||
baseInfo: "Basic Info",
|
||||
version: "Service Versions",
|
||||
mode: "Perating Mode",
|
||||
mode: "Operating Mode",
|
||||
modeStandalone: "stand-alone",
|
||||
modeClusters: "clusters",
|
||||
port: "Port",
|
||||
|
||||
@@ -708,6 +708,7 @@ export default {
|
||||
addTitle: '新增策略控制信息',
|
||||
updateTitle: '{imsi} 策略控制信息',
|
||||
startIMSI: '起始IMSI',
|
||||
batchOper: '批量操作',
|
||||
batchAddText: '批量新增',
|
||||
batchDelText: '批量删除',
|
||||
batchUpdateText: '批量更新',
|
||||
@@ -716,17 +717,18 @@ export default {
|
||||
imsiTip1: 'MCC=移动国家号码, 由三位数字组成',
|
||||
imsiTip2: 'MNC=移动网络号,由两位数字组成',
|
||||
imsiTip3: 'MSIN=移动客户识别码,采用等长10位数字构成',
|
||||
delSure:'确认删除IMSI编号为: {imsi} 的用户吗?',
|
||||
checkDel:'勾选删除',
|
||||
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: {
|
||||
|
||||
@@ -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<TableColumnsType>([
|
||||
},
|
||||
]);
|
||||
|
||||
/**表格字段列排序 */
|
||||
let tableColumnsDnd = ref<TableColumnsType>([]);
|
||||
|
||||
/**表格分页器参数 */
|
||||
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<string, any>) {
|
||||
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(() => {
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="IMSI" name="imsi">
|
||||
<a-input v-model:value="queryParams.imsi" allow-clear></a-input>
|
||||
<a-input
|
||||
v-model:value="queryParams.imsi"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="MSISDN" name="msisdn">
|
||||
<a-input v-model:value="queryParams.msisdn" allow-clear></a-input>
|
||||
<a-input
|
||||
v-model:value="queryParams.msisdn"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
@@ -602,42 +662,45 @@ onMounted(() => {
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch('add')"
|
||||
>
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
{{ t('views.neUser.pcf.batchAddText') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch('update')"
|
||||
>
|
||||
<template #icon>
|
||||
<FormOutlined />
|
||||
</template>
|
||||
{{ t('views.neUser.pcf.batchUpdateText') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
type="default"
|
||||
danger
|
||||
ghost
|
||||
@click.prevent="fnModalVisibleByBatch('delete')"
|
||||
:disabled="tableState.selectedRowKeys.length <= 0"
|
||||
:loading="modalState.confirmLoading"
|
||||
@click.prevent="fnRecordDelete('0')"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
{{ t('views.neUser.pcf.batchDelText') }}
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
{{ t('views.neUser.pcf.checkDel') }}
|
||||
</a-button>
|
||||
|
||||
<a-dropdown>
|
||||
<a-button>
|
||||
{{ t('views.neUser.pcf.batchOper') }}
|
||||
<DownOutlined />
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)">
|
||||
<a-menu-item key="add">
|
||||
<PlusOutlined />
|
||||
{{ t('views.neUser.pcf.batchAddText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="update">
|
||||
<FormOutlined />
|
||||
{{ t('views.neUser.pcf.batchUpdateText') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="delete">
|
||||
<DeleteOutlined />
|
||||
{{ t('views.neUser.pcf.batchDelText') }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
|
||||
<template #icon><ImportOutlined /></template>
|
||||
{{ t('views.neUser.pcf.import') }}
|
||||
</a-button>
|
||||
<a-popconfirm
|
||||
placement="topRight"
|
||||
:title="t('views.neUser.pcf.exportConfirm')"
|
||||
ok-text="TXT"
|
||||
ok-type="default"
|
||||
@@ -687,6 +750,11 @@ onMounted(() => {
|
||||
size="small"
|
||||
/>
|
||||
</a-tooltip>
|
||||
<TableColumnsDnd
|
||||
cache-id="pcfData"
|
||||
:columns="tableColumns"
|
||||
v-model:columns-dnd="tableColumnsDnd"
|
||||
></TableColumnsDnd>
|
||||
<a-tooltip>
|
||||
<template #title>{{ t('common.reloadText') }}</template>
|
||||
<a-button type="text" @click.prevent="fnGetList()">
|
||||
@@ -724,14 +792,19 @@ onMounted(() => {
|
||||
<a-table
|
||||
class="table"
|
||||
row-key="imsi"
|
||||
:columns="tableColumns"
|
||||
:columns="tableColumnsDnd"
|
||||
:loading="tableState.loading"
|
||||
:data-source="tableState.data"
|
||||
:size="tableState.size"
|
||||
:row-class-name="fnTableStriped"
|
||||
:pagination="false"
|
||||
:pagination="tablePagination"
|
||||
:scroll="{ y: 'calc(100vh - 480px)' }"
|
||||
@resizeColumn="(w:number, col:any) => (col.width = w)"
|
||||
:row-selection="{
|
||||
type: 'checkbox',
|
||||
selectedRowKeys: tableState.selectedRowKeys,
|
||||
onChange: fnTableSelectedRowKeys,
|
||||
}"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'imsi'">
|
||||
@@ -749,7 +822,10 @@ onMounted(() => {
|
||||
</a-tooltip>
|
||||
<a-tooltip>
|
||||
<template #title>{{ t('common.deleteText') }}</template>
|
||||
<a-button type="link" @click.prevent="fnRecordDelete(record)">
|
||||
<a-button
|
||||
type="link"
|
||||
@click.prevent="fnRecordDelete(record.imsi)"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user