feat:imsUDM界面添加功能修复

This commit is contained in:
zhongzm
2025-04-11 20:52:04 +08:00
parent 84b0ab50f4
commit 72bd9004cc

View File

@@ -27,7 +27,6 @@ import { listTenant } from '@/api/system/tenant';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile'; import { getNeViewFile } from '@/api/tool/neFile';
const { t } = useI18n(); const { t } = useI18n();
/**网元参数 */ /**网元参数 */
let neOtions = ref<Record<string, any>[]>([]); let neOtions = ref<Record<string, any>[]>([]);
@@ -37,13 +36,11 @@ let queryParams = reactive({
neId: undefined, neId: undefined,
/**移动编号 */ /**移动编号 */
imsi: '', imsi: '',
/**imsi匹配方式 */
imsiMatch: 'fuzzy', imsiMatch: 'fuzzy',
/**租户名 */ /**租户名 */
tenantName: '', tenantName: '',
/**移动号 */ /**移动号 */
msisdn: '', msisdn: '',
/**TAG */
tag:undefined, tag:undefined,
/**排序字段 */ /**排序字段 */
sortField: 'imsi', sortField: 'imsi',
@@ -59,7 +56,6 @@ let queryParams = reactive({
function fnQueryReset() { function fnQueryReset() {
queryParams = Object.assign(queryParams, { queryParams = Object.assign(queryParams, {
imsi: '', imsi: '',
imsiMatch: 'fuzzy',
msisdn: '', msisdn: '',
tenantName: '', tenantName: '',
tag: undefined, tag: undefined,
@@ -148,7 +144,10 @@ let tableColumns = ref<ColumnsType>([
dataIndex: 'tag', dataIndex: 'tag',
align: 'center', align: 'center',
width: 150, width: 150,
key: 'tag' key: 'tag',
customRender: ({ text }: { text: number }) => {
return text === 0 ? 'VoIP' : 'VoLTE';
}
}, },
{ {
title: t('common.operate'), title: t('common.operate'),
@@ -194,62 +193,6 @@ let tablePagination = reactive({
function fnTableSize({ key }: MenuInfo) { function fnTableSize({ key }: MenuInfo) {
tableState.size = key as SizeType; tableState.size = key as SizeType;
} }
/**表格分页、排序、筛选变化时触发操作, 排序方式,取值为 ascend descend */
function fnTableChange(pagination: any, filters: any, sorter: any, extra: any) {
const { field, order } = sorter;
if (order) {
queryParams.sortField = field;
queryParams.sortOrder = order.replace('end', '');
} else {
queryParams.sortOrder = 'asc';
}
fnGetList(1);
}
/**表格多选 */
function fnTableSelectedRowKeys(keys: (string | number)[]) {
tableState.selectedRowKeys = keys;
}
/**对话框对象信息状态类型 */
type ModalStateType = {
/**新增框是否显示 */
openByAdd: boolean;
/**批量删除框是否显示 */
openByBatchDel: boolean;
/**标题 */
title: string;
/**表单数据 */
from: Record<string, any>;
/**批量删除表单数据 */
BatchDelForm: Record<string, any>;
/**确定按钮 loading */
confirmLoading: boolean;
/**更新加载数据按钮 loading */
loadDataLoading: boolean;
};
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
openByAdd: false,
openByBatchDel: false,
title: 'UDM签约用户',
from: {
imsi: '',
msisdn: '',
tag: '0',
vni: '',
num: 1,
},
BatchDelForm: {
num: 1,
imsi: '',
},
confirmLoading: false,
loadDataLoading: false,
});
/**表单中多选的OPTION */ /**表单中多选的OPTION */
const modalStateFromOption = reactive({ const modalStateFromOption = reactive({
ardJson: [ ardJson: [
@@ -302,24 +245,188 @@ const modalStateFromOption = reactive({
}, },
], ],
}); });
/**表格分页、排序、筛选变化时触发操作, 排序方式,取值为 ascend descend */
function fnTableChange(pagination: any, filters: any, sorter: any, extra: any) {
const { field, order } = sorter;
if (order) {
queryParams.sortField = field;
queryParams.sortOrder = order.replace('end', '');
} else {
queryParams.sortOrder = 'asc';
}
fnGetList(1);
}
/**表格多选 */
function fnTableSelectedRowKeys(keys: (string | number)[]) {
tableState.selectedRowKeys = keys;
}
/**对话框对象信息状态类型 */
type ModalStateType = {
/**新增框或修改框是否显示 */
openByEdit: boolean;
/**批量新增新增框是否显示 */
openByBatch: boolean;
/**批量新增删除框是否显示 */
openByBatchDel: boolean;
/**标题 */
title: string;
/**表单数据 */
from: Record<string, any>;
/**表单数据 */
BatchDelForm: Record<string, any>;
/**确定按钮 loading */
confirmLoading: boolean;
/**更新加载数据按钮 loading */
loadDataLoading: boolean;
};
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
openByEdit: false,
openByBatch: false,
openByBatchDel: false,
title: 'UDM鉴权用户',
from: {
imsi: '',
msisdn: '',
tag: undefined,
vni: '',
num: 1,
},
BatchDelForm: {
num: 1,
imsi: '',
},
confirmLoading: false,
loadDataLoading: false,
});
/**对话框内表单属性和校验规则 */
const modalStateFrom = Form.useForm(
modalState.from,
reactive({
num: [
{
required: true,
message: t('views.neUser.auth.numAdd') + t('common.unableNull'),
},
],
imsi: [
{ 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') },
],
// algoIndex: [
// { required: true, message: 'algoIndex' + t('common.unableNull') },
// ],
})
);
function fnTenantNameFocus() {
Promise.allSettled([listTenant({ parentId: 0 })]).then(resArr => {
if (resArr[0].status === 'fulfilled') {
var tenantNameData = resArr[0].value;
if (
tenantNameData.code === RESULT_CODE_SUCCESS &&
Array.isArray(tenantNameData.data)
) {
modalStateFromOption.tenantName = []; //上面置为空数组时会报错 故在此
tenantNameData.data.forEach((item: any) => {
if (item.parentId === '0') {
modalStateFromOption.tenantName.push({
value: item.tenantName,
label: item.tenantName,
});
}
});
}
}
});
}
/**对话框内批量删除表单属性和校验规则 */
const modalStateBatchDelFrom = Form.useForm(
modalState.BatchDelForm,
reactive({
num: [
{
required: true,
message: t('views.neUser.auth.numDel') + t('common.unableNull'),
},
],
imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }],
})
);
/**
* 对话框弹出显示为 新增或者修改
* @param noticeId 网元id, 不传为新增
*/
function fnModalVisibleByEdit(row?: Record<string, any>) {
if (!row) {
modalStateFrom.resetFields(); //重置表单
modalState.title = t('common.addText') + t('views.neUser.auth.authInfo');
modalState.openByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
const neId = queryParams.neId || '-';
getIMSSub(neId, row.imsi)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
modalState.from = Object.assign(modalState.from, res.data);
modalState.title =
t('common.editText') + t('views.neUser.auth.authInfo');
modalState.openByEdit = true;
} else {
message.error(t('common.getInfoFail'), 2);
}
})
.finally(() => {
hide();
modalState.confirmLoading = false;
});
}
}
/**
* 对话框弹出显示为 批量删除
* @param noticeId 网元id, 不传为新增
*/
function fnModalVisibleByBatch() {
modalStateBatchDelFrom.resetFields(); //重置表单
modalState.title =
t('views.neUser.auth.batchDelText') + t('views.neUser.auth.authInfo');
modalState.openByBatchDel = true;
}
/** /**
* 对话框弹出确认执行函数 * 对话框弹出确认执行函数
* 进行表达规则校验 * 进行表达规则校验
*/ */
function fnModalOk() { function fnModalOk() {
const from = Object.assign({}, toRaw(modalState.from)); console.log(modalState.from)
modalStateFrom modalStateFrom
.validate() .validate()
.then(e => { .then(e => {
const from = Object.assign({}, toRaw(modalState.from));
modalState.confirmLoading = true; modalState.confirmLoading = true;
from.neId = queryParams.neId || '-'; from.neId = queryParams.neId || '-';
console.log(from)
const result = from.num === 1 const result = from.num === 1
? addIMSSub(from)//单条新增 ? addIMSSub(from)
: batchAddIMSSub(from, from.num);//批量新增 : batchAddIMSSub(from, from.num);
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
result
return result
.then((res: any) => { .then((res: any) => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
if (from.num === 1) { if (from.num === 1) {
@@ -364,59 +471,80 @@ function fnModalOk() {
}); });
}) })
.catch(e => { .catch(e => {
console.error(e);
message.error(t('common.errorFields', { num: e.errorFields.length }), 3); message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
}); });
} }
/**
* 对话框弹出 批量删除确认执行函数
* 进行表达规则校验
*/
function fnBatchDelModalOk() {
modalStateBatchDelFrom
.validate()
.then(e => {
modalState.confirmLoading = true;
const from = toRaw(modalState.BatchDelForm);
const neId = queryParams.neId || '-';
batchDelIMSSub(neId, from.imsi, from.num).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const timerS = Math.ceil(+from.num / 1500) + 1;
notification.success({
message: modalState.title,
description: t('common.operateOk'),
duration: timerS,
});
setTimeout(() => {
modalState.openByBatchDel = false;
modalState.confirmLoading = false;
modalStateBatchDelFrom.resetFields();
fnGetList(1);
}, timerS * 1000);
} else {
modalState.confirmLoading = false;
notification.error({
message: modalState.title,
description: res.msg,
duration: 3,
});
}
});
})
.catch(e => {
message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
});
}
/**
* 批量删除对话框弹出关闭执行函数
* 进行表达规则校验
*/
function fnBatchDelModalCancel() {
modalState.openByBatchDel = false;
modalStateBatchDelFrom.resetFields();
}
/** /**
* 对话框弹出关闭执行函数 * 对话框弹出关闭执行函数
* 进行表达规则校验 * 进行表达规则校验
*/ */
function fnModalCancel() { function fnModalCancel() {
modalState.openByAdd = false; modalState.openByEdit = false;
modalStateFrom.resetFields(); modalStateFrom.resetFields();
} }
/**对话框内表单属性和校验规则 */
const modalStateFrom = Form.useForm(
modalState.from,
reactive({
num: [
{
required: true,
message: t('views.neUser.sub.numAdd') + t('common.unableNull'),
},
],
imsi: [
{
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') },
],
})
);
/** /**
* UDM签约用户删除 * UDM鉴权用户删除
* @param imsi 编号imsi * @param imsi 编号imsi
*/ */
function fnRecordDelete(imsi: string) { function fnRecordDelete(imsi: string) {
const neId = queryParams.neId; const neId = queryParams.neId;
if (!neId) return; if (!neId) return;
let imsiMsg = imsi;//单条/批量删除逻辑 let imsiMsg = imsi;
if (imsi === '0') { if (imsi === '0') {
imsiMsg = `${tableState.selectedRowKeys[0]}... ${t( imsiMsg = `${tableState.selectedRowKeys[0]}... ${t(
'views.neUser.sub.numDel' 'views.neUser.auth.numDel'
)} ${tableState.selectedRowKeys.length}`; )} ${tableState.selectedRowKeys.length}`;
imsi = tableState.selectedRowKeys.join(','); imsi = tableState.selectedRowKeys.join(',');
} }
@@ -424,37 +552,37 @@ function fnRecordDelete(imsi: string) {
Modal.confirm({ Modal.confirm({
title: t('common.tipTitle'), title: t('common.tipTitle'),
content: t('views.neUser.auth.delSure', { imsi: imsiMsg }), content: t('views.neUser.auth.delSure', { imsi: imsiMsg }),
onOk() {//删除操作 onOk() {
modalState.loadDataLoading = true;//设置加载状态 modalState.loadDataLoading = true;
const hide = message.loading(t('common.loading'), 0);//显示加载提示 const hide = message.loading(t('common.loading'), 0);
delIMSSub(neId, imsi)//调用删除接口方法 delIMSSub(neId, imsi)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) {//返回删除成功 if (res.code === RESULT_CODE_SUCCESS) {
const msgContent = t('common.msgSuccess', { const msgContent = t('common.msgSuccess', {
msg: t('common.deleteText'), msg: t('common.deleteText'),
}); });
message.success({//显示成功提示 message.success({
content: `${msgContent} : ${imsiMsg}`, content: `${msgContent} : ${imsiMsg}`,
duration: 3, duration: 3,
}); });
} else {//删除失败 } else {
message.error({//显示错误信息 message.error({
content: `${res.msg}`, content: `${res.msg}`,
duration: 3, duration: 3,
}); });
} }
}) })
.finally(() => {//无论结果固定执行 .finally(() => {
hide();//隐藏加载提示 hide();
fnGetList();//刷新列表数据 fnGetList();
modalState.loadDataLoading = false;//重置加载状态 modalState.loadDataLoading = false;
}); });
}, },
}); });
} }
/** /**
* UDM签约用户导出 * UDM鉴权用户勾选导出
*/ */
function fnRecordExport(type: string = 'txt') { function fnRecordExport(type: string = 'txt') {
const selectLen = tableState.selectedRowKeys.length; const selectLen = tableState.selectedRowKeys.length;
@@ -465,16 +593,10 @@ function fnRecordExport(type: string = 'txt') {
exportIMSSub({ type: type, neId: neId, imsis: tableState.selectedRowKeys }) exportIMSSub({ type: type, neId: neId, imsis: tableState.selectedRowKeys })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success(t('common.msgSuccess', { msg: t('common.export') }), 3);
content: t('common.msgSuccess', { msg: t('common.export') }), saveAs(res.data, `UDMAuth_select_${Date.now()}.${type}`);
duration: 2,
});
saveAs(res.data, `UDMSub_select_${Date.now()}.${type}`);
} else { } else {
message.error({ message.error(`${res.msg}`, 3);
content: `${res.msg}`,
duration: 2,
});
} }
}) })
.finally(() => { .finally(() => {
@@ -482,37 +604,22 @@ function fnRecordExport(type: string = 'txt') {
}); });
} }
/**列表导出 */ /**列表导出全部数据 */
function fnExportList(type: string) { function fnExportList(type: string) {
const neId = queryParams.neId; const neId = queryParams.neId;
const imsiMatchRule: any = {
prefix: queryParams.imsi ? `${queryParams.imsi}%` : '',
fuzzy: queryParams.imsi ? `%${queryParams.imsi}%` : '',
};
const realImsi = imsiMatchRule[queryParams.imsiMatch] || '';
if (!neId) return; if (!neId) return;
const key = 'exportSub'; const hide = message.loading(t('common.loading'), 0);
message.loading({ content: t('common.loading'), key }); exportIMSSub(Object.assign({ type: type }, queryParams))
.then(res => {
exportIMSSub({
...queryParams,
imsi: realImsi,
type: type,
}).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success(t('common.msgSuccess', { msg: t('common.export') }), 3);
content: t('common.msgSuccess', { msg: t('common.export') }), saveAs(res.data, `UDMAuth_${Date.now()}.${type}`);
key,
duration: 2,
});
saveAs(res.data, `UDMSub_${Date.now()}.${type}`);
} else { } else {
message.error({ message.error(`${res.msg}`, 3);
content: `${res.msg}`,
key,
duration: 2,
});
} }
})
.finally(() => {
hide();
}); });
} }
@@ -527,13 +634,13 @@ function fnLoadData() {
resetIMSSub(neId).then(res => { resetIMSSub(neId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const num = res.data; const num = res.data;
const timerS = Math.ceil(+num / 2000) + 3; const timerS = Math.ceil(+num / 3000) + 3;
notification.success({ notification.success({
message: t('views.neUser.sub.loadData'), message: t('views.neUser.auth.loadData'),
description: t('views.neUser.sub.loadDataTip', { num, timer: timerS }), description: t('views.neUser.auth.loadDataTip', { num, timer: timerS }),
duration: timerS, duration: timerS,
}); });
// 延迟20s后关闭loading刷新列表 // 延迟10s后关闭loading刷新列表
setTimeout(() => { setTimeout(() => {
modalState.loadDataLoading = false; modalState.loadDataLoading = false;
tableState.loading = false; // 表格loading tableState.loading = false; // 表格loading
@@ -574,7 +681,6 @@ function fnGetList(pageNum?: number) {
pageNum: queryParams.pageNum, pageNum: queryParams.pageNum,
pageSize: queryParams.pageSize, pageSize: queryParams.pageSize,
}; };
listIMSSub({ listIMSSub({
...queryParams, ...queryParams,
imsi: imsiMatchRule[queryParams.imsiMatch], imsi: imsiMatchRule[queryParams.imsiMatch],
@@ -632,7 +738,7 @@ function fnModalUploadImportFailReason() {
neType: 'UDM', neType: 'UDM',
neId: neId, neId: neId,
path: '/tmp', path: '/tmp',
fileName: 'import_udmuser_err_records.txt', fileName: 'import_authdata_err_records.txt',
}) })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
@@ -640,7 +746,7 @@ function fnModalUploadImportFailReason() {
const blob = new Blob([res.data], { const blob = new Blob([res.data], {
type: 'text/plain', type: 'text/plain',
}); });
saveAs(blob, `import_udmuser_err_records_${Date.now()}.txt`); saveAs(blob, `import_authdata_err_records_${Date.now()}.txt`);
} else { } else {
message.error(`${res.msg}`, 3); message.error(`${res.msg}`, 3);
} }
@@ -661,7 +767,7 @@ function fnModalUploadImportOpen() {
/**对话框表格信息导入关闭窗口 */ /**对话框表格信息导入关闭窗口 */
function fnModalUploadImportClose() { function fnModalUploadImportClose() {
uploadImportState.open = false; uploadImportState.open = false;
fnGetList(); fnGetList(1);
} }
/**对话框表格信息导入上传 */ /**对话框表格信息导入上传 */
@@ -712,126 +818,6 @@ function fnModalUploadImportUpload(file: File) {
}); });
} }
function fnTenantNameFocus() {
Promise.allSettled([listTenant({ parentId: 0 })]).then(resArr => {
if (resArr[0].status === 'fulfilled') {
var tenantNameData = resArr[0].value;
if (
tenantNameData.code === RESULT_CODE_SUCCESS &&
Array.isArray(tenantNameData.data)
) {
modalStateFromOption.tenantName = []; //上面置为空数组时会报错 故在此
tenantNameData.data.forEach((item: any) => {
if (item.parentId === '0') {
modalStateFromOption.tenantName.push({
value: item.tenantName,
label: item.tenantName,
});
}
});
}
}
});
}
/**
* 对话框弹出显示为 新增
*/
function fnModalVisibleByAdd() {
modalState.openByAdd = true;
modalState.title = t('common.addText') + t('views.neUser.sub.subInfo');
modalState.from = {
imsi: '',
msisdn: '',
tag: '0',
vni: '',
num: 1,
};
}
/**
* 对话框弹出显示为 批量删除
*/
function fnModalVisibleByBatch() {
modalState.openByBatchDel = true;
modalState.title = t('views.neUser.auth.batchDelText');
modalState.BatchDelForm = {
num: 1,
imsi: '',
};
}
/**
* 批量删除对话框确认
*/
function fnBatchDelModalOk() {
modalStateBatchDelFrom
.validate()
.then(() => {
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
const neId = queryParams.neId;
if (!neId) return;
batchDelIMSSub(neId, modalState.BatchDelForm.imsi, modalState.BatchDelForm.num)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const timerS = Math.max(
Math.ceil(modalState.BatchDelForm.num / 500),
`${modalState.BatchDelForm.num}`.length * 5
);
notification.success({
message: modalState.title,
description: t('common.operateOk'),
duration: timerS,
});
setTimeout(() => {
fnGetList(1);
}, timerS * 1000);
} else {
notification.error({
message: modalState.title,
description: res.msg,
duration: 3,
});
}
})
.finally(() => {
hide();
fnBatchDelModalCancel();
modalState.confirmLoading = false;
});
})
.catch(e => {
message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
});
}
/**
* 批量删除对话框取消
*/
function fnBatchDelModalCancel() {
modalState.openByBatchDel = false;
modalStateBatchDelFrom.resetFields();
}
/**批量删除对话框内表单属性和校验规则 */
const modalStateBatchDelFrom = Form.useForm(
modalState.BatchDelForm,
reactive({
imsi: [
{ required: true, message: 'IMSI' + t('common.unableNull') },
{ min: 15, max: 15, message: t('views.neUser.auth.imsiConfirm') },
],
num: [
{
required: true,
message: t('views.neUser.sub.numDel') + t('common.unableNull'),
},
],
})
);
onMounted(() => { onMounted(() => {
// 获取网元网元列表 // 获取网元网元列表
useNeInfoStore() useNeInfoStore()
@@ -875,7 +861,7 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal"> <a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.neUser.sub.neType')" name="neId"> <a-form-item :label="t('views.neUser.auth.neType')" name="neId ">
<a-select <a-select
v-model:value="queryParams.neId" v-model:value="queryParams.neId"
:options="neOtions" :options="neOtions"
@@ -884,35 +870,36 @@ onMounted(() => {
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-col :lg="10" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi"> <a-form-item label="IMSI" name="imsi">
<a-input <a-input
v-model:value="queryParams.imsi" v-model:value="queryParams.imsi"
allow-clear allow-clear
:maxlength="15" :maxlength="15"
style="width: 70%"
:placeholder="t('common.inputPlease')" :placeholder="t('common.inputPlease')"
></a-input> ></a-input>
<a-select
:label="t('views.neUser.sub.imsiMode')"
style="width: 30%"
v-model:value="queryParams.imsiMatch"
v-show="queryParams.imsi"
:options="[
{ label: t('views.neUser.sub.fuzzyMatch'), value: 'fuzzy' },
{ label: t('views.neUser.sub.prefixMatch'), value: 'prefix' },
]"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8" :md="12" :xs="24"> <a-col :lg="8" :md="12" :xs="24">
<a-form-item label="MSISDN" name="msisdn"> <a-form-item label="MSISDN" name="msisdn">
<a-input v-model:value="queryParams.msisdn" allow-clear :maxlength="32" <a-input v-model:value="queryParams.msisdn" allow-clear :maxlength="32"
:placeholder="t('common.inputPlease')"></a-input> :placeholder="t('common.inputPlease')"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="TAG" name="tag">
<a-select
v-model:value="queryParams.tag"
:options="[
{ label: 'All', value: undefined },
{ label: 'VoIP', value: 0 },
{ label: 'VoLTE', value: 1 }
]"
:placeholder="t('common.selectPlease')"
>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item <a-form-item
:label="t('views.neUser.sub.tenantName')" :label="t('views.neUser.sub.tenantName')"
@@ -925,19 +912,6 @@ onMounted(() => {
></a-auto-complete> ></a-auto-complete>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="TAG" name="tag">
<a-select
v-model:value="queryParams.tag"
:options="[
{ label: 'VoIP', value: '0' },
{ label: 'VoLTE', value: '1' }
]"
:placeholder="t('common.selectPlease')"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item> <a-form-item>
<a-space :size="8"> <a-space :size="8">
@@ -964,7 +938,7 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title>
<a-flex wrap="wrap" gap="small"> <a-flex wrap="wrap" gap="small">
<a-button type="primary" @click.prevent="fnModalVisibleByAdd"> <a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
<template #icon> <template #icon>
<PlusOutlined /> <PlusOutlined />
</template> </template>
@@ -984,7 +958,7 @@ onMounted(() => {
</a-button> </a-button>
<a-popconfirm <a-popconfirm
:title="t('views.neUser.sub.loadDataConfirm')" :title="t('views.neUser.auth.loadDataConfirm')"
:ok-text="t('common.ok')" :ok-text="t('common.ok')"
:cancel-text="t('common.cancel')" :cancel-text="t('common.cancel')"
:disabled="modalState.loadDataLoading" :disabled="modalState.loadDataLoading"
@@ -996,32 +970,26 @@ onMounted(() => {
:disabled="modalState.loadDataLoading" :disabled="modalState.loadDataLoading"
:loading="modalState.loadDataLoading" :loading="modalState.loadDataLoading"
> >
<template #icon> <template #icon><SyncOutlined /></template>
<SyncOutlined /> {{ t('views.neUser.auth.loadData') }}
</template>
{{ t('views.neUser.sub.loadData') }}
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen"> <a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
<template #icon> <template #icon><ImportOutlined /></template>
<ImportOutlined /> {{ t('views.neUser.auth.import') }}
</template>
{{ t('views.neUser.sub.import') }}
</a-button> </a-button>
<a-popconfirm <a-popconfirm
:title="t('views.neUser.sub.exportConfirm')" :title="t('views.neUser.auth.exportConfirm')"
placement="topRight" placement="topRight"
ok-text="TXT" ok-text="TXT"
ok-type="default" ok-type="default"
@confirm="fnExportList('txt')" @confirm="fnExportList('txt')"
> >
<a-button type="dashed"> <a-button type="dashed">
<template #icon> <template #icon><ExportOutlined /></template>
<ExportOutlined /> {{ t('views.neUser.auth.export') }}
</template>
{{ t('views.neUser.sub.export') }}
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
@@ -1032,14 +1000,12 @@ onMounted(() => {
:loading="modalState.loadDataLoading" :loading="modalState.loadDataLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
> >
<template #icon> <template #icon><DeleteOutlined /></template>
<DeleteOutlined /> {{ t('views.neUser.auth.checkDel') }}
</template>
{{ t('views.neUser.sub.checkDel') }}
</a-button> </a-button>
<a-popconfirm <a-popconfirm
:title="t('views.neUser.sub.checkExportConfirm')" :title="t('views.neUser.auth.checkExportConfirm')"
placement="topRight" placement="topRight"
ok-text="TXT" ok-text="TXT"
ok-type="default" ok-type="default"
@@ -1050,10 +1016,8 @@ onMounted(() => {
type="default" type="default"
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
> >
<template #icon> <template #icon><ExportOutlined /></template>
<ExportOutlined /> {{ t('views.neUser.auth.checkExport') }}
</template>
{{ t('views.neUser.sub.checkExport') }}
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
</a-flex> </a-flex>
@@ -1074,24 +1038,19 @@ onMounted(() => {
<a-tooltip> <a-tooltip>
<template #title>{{ t('common.reloadText') }}</template> <template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList()"> <a-button type="text" @click.prevent="fnGetList()">
<template #icon> <template #icon><ReloadOutlined /></template>
<ReloadOutlined />
</template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<TableColumnsDnd <TableColumnsDnd
cache-id="udmSubData" cache-id="udmAuthData"
:columns="tableColumns" :columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd" v-model:columns-dnd="tableColumnsDnd"
> ></TableColumnsDnd>
</TableColumnsDnd>
<a-tooltip placement="topRight"> <a-tooltip placement="topRight">
<template #title>{{ t('common.sizeText') }}</template> <template #title>{{ t('common.sizeText') }}</template>
<a-dropdown placement="bottomRight" trigger="click"> <a-dropdown placement="bottomRight" trigger="click">
<a-button type="text"> <a-button type="text">
<template #icon> <template #icon><ColumnHeightOutlined /></template>
<ColumnHeightOutlined />
</template>
</a-button> </a-button>
<template #overlay> <template #overlay>
<a-menu <a-menu
@@ -1133,23 +1092,6 @@ onMounted(() => {
}" }"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'cnFlag'">
{{
['1', '3'].includes(record.cnType)
? t('views.neUser.sub.enable')
: t('views.neUser.sub.disable')
}}
</template>
<template v-if="column.key === 'epsFlag'">
{{
record.epsFlag === '1'
? t('views.neUser.sub.enable')
: t('views.neUser.sub.disable')
}}
</template>
<template v-if="column.key === 'tag'">
{{ record.tag === '0' || record.tag === 0 ? 'VoIP' : 'VoLTE' }}
</template>
<template v-if="column.key === 'imsi'"> <template v-if="column.key === 'imsi'">
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-tooltip> <a-tooltip>
@@ -1174,12 +1116,10 @@ onMounted(() => {
:drag="true" :drag="true"
:width="800" :width="800"
:destroyOnClose="true" :destroyOnClose="true"
style="top: 0px"
:body-style="{ maxHeight: '600px', 'overflow-y': 'auto' }"
:keyboard="false" :keyboard="false"
:mask-closable="false" :mask-closable="false"
:open="modalState.openByAdd" :open="modalState.openByEdit"
:title="t('common.addText') + t('views.neUser.sub.subInfo')" :title="modalState.title"
:confirm-loading="modalState.confirmLoading" :confirm-loading="modalState.confirmLoading"
@ok="fnModalOk" @ok="fnModalOk"
@cancel="fnModalCancel" @cancel="fnModalCancel"
@@ -1270,8 +1210,8 @@ onMounted(() => {
<a-select <a-select
v-model:value="modalState.from.tag" v-model:value="modalState.from.tag"
:options="[ :options="[
{ label: 'VoIP', value: '0' }, { label: 'VoIP', value:0 },
{ label: 'VoLTE', value: '1' } { label: 'VoLTE', value: 1 }
]" ]"
:placeholder="t('common.selectPlease')" :placeholder="t('common.selectPlease')"
> >
@@ -1293,11 +1233,11 @@ onMounted(() => {
</a-row> </a-row>
</a-form> </a-form>
</ProModal> </ProModal>
<!-- 批量删除-->
<!-- 批量删除框 -->
<ProModal <ProModal
:drag="true" :drag="true"
:destroyOnClose="true" :destroyOnClose="true"
style="top: 0px"
:keyboard="false" :keyboard="false"
:mask-closable="false" :mask-closable="false"
:open="modalState.openByBatchDel" :open="modalState.openByBatchDel"
@@ -1315,7 +1255,7 @@ onMounted(() => {
<a-row> <a-row>
<a-col :lg="24" :md="24" :xs="24"> <a-col :lg="24" :md="24" :xs="24">
<a-form-item <a-form-item
:label="t('views.neUser.sub.startIMSI')" :label="t('views.neUser.auth.startIMSI')"
name="imsi" name="imsi"
v-bind="modalStateBatchDelFrom.validateInfos.imsi" v-bind="modalStateBatchDelFrom.validateInfos.imsi"
> >
@@ -1327,10 +1267,10 @@ onMounted(() => {
<template #prefix> <template #prefix>
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template #title> <template #title>
{{ t('views.neUser.sub.imsiTip') }}<br /> {{ t('views.neUser.auth.imsiTip') }}<br />
{{ t('views.neUser.sub.imsiTip1') }}<br /> {{ t('views.neUser.auth.imsiTip1') }}<br />
{{ t('views.neUser.sub.imsiTip2') }}<br /> {{ t('views.neUser.auth.imsiTip2') }}<br />
{{ t('views.neUser.sub.imsiTip3') }} {{ t('views.neUser.auth.imsiTip3') }}
</template> </template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit" /> <InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip> </a-tooltip>
@@ -1340,7 +1280,7 @@ onMounted(() => {
</a-col> </a-col>
<a-col :lg="24" :md="24" :xs="24"> <a-col :lg="24" :md="24" :xs="24">
<a-form-item <a-form-item
:label="t('views.neUser.sub.numDel')" :label="t('views.neUser.auth.numDel')"
name="num" name="num"
v-bind="modalStateBatchDelFrom.validateInfos.num" v-bind="modalStateBatchDelFrom.validateInfos.num"
> >