diff --git a/src/api/configManage/configParam.ts b/src/api/configManage/configParam.ts index 537b8190..494176cb 100644 --- a/src/api/configManage/configParam.ts +++ b/src/api/configManage/configParam.ts @@ -33,53 +33,3 @@ export async function updateNeConfigReload(neType: string, neId: string) { } return result; } - -/** - * 从参数配置PCF中获取对应信息提供给PCC用户策略输入框 - * @param neId - * @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction} - */ -export async function getPCCRule(neId: any) { - const paramNameArr = [ - 'pccRules', - 'sessionRules', - 'qosTemplate', - 'headerEnrichTemplate', - 'serviceAreaRestriction', - ]; - const reqArr = []; - for (const paramName of paramNameArr) { - reqArr.push( - request({ - url: `/ne/config/data`, - params: { neType: 'PCF', neId, paramName }, - method: 'GET', - }) - ); - } - return await Promise.allSettled(reqArr).then(resArr => { - // 规则数据 - const obj: any = {}; - resArr.forEach((item, i: number) => { - if (item.status === 'fulfilled') { - const res = item.value; - if (res.code === RESULT_CODE_SUCCESS) { - const key = paramNameArr[i]; - obj[key] = res.data.map((item: any) => { - if ('qosTemplate' === key) { - return { value: item.qosId, label: item.qosId }; - } - if ('headerEnrichTemplate' === key) { - return { value: item.templateName, label: item.templateName }; - } - if ('serviceAreaRestriction' === key) { - return { value: item.name, label: item.name }; - } - return { value: item.ruleId, label: item.ruleId }; - }); - } - } - }); - return obj; - }); -} diff --git a/src/api/ne/neConfig.ts b/src/api/ne/neConfig.ts index c6b657d9..6631562f 100644 --- a/src/api/ne/neConfig.ts +++ b/src/api/ne/neConfig.ts @@ -1,3 +1,4 @@ +import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { request } from '@/plugins/http-fetch'; /** @@ -64,3 +65,53 @@ export function delNeConfigData(params: Record) { params, }); } + +/** + * 从参数配置PCF中获取对应信息提供给PCF用户策略输入框 + * @param neId + * @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction} + */ +export async function getPCFRule(neId: any) { + const paramNameArr = [ + 'pccRules', + 'sessionRules', + 'qosTemplate', + 'headerEnrichTemplate', + 'serviceAreaRestriction', + ]; + const reqArr = []; + for (const paramName of paramNameArr) { + reqArr.push( + request({ + url: `/ne/config/data`, + params: { neType: 'PCF', neId, paramName }, + method: 'GET', + }) + ); + } + return await Promise.allSettled(reqArr).then(resArr => { + // 规则数据 + const obj: any = {}; + resArr.forEach((item, i: number) => { + if (item.status === 'fulfilled') { + const res = item.value; + if (res.code === RESULT_CODE_SUCCESS) { + const key = paramNameArr[i]; + obj[key] = res.data.map((item: any) => { + if ('qosTemplate' === key) { + return { value: item.qosId, label: item.qosId }; + } + if ('headerEnrichTemplate' === key) { + return { value: item.templateName, label: item.templateName }; + } + if ('serviceAreaRestriction' === key) { + return { value: item.name, label: item.name }; + } + return { value: item.ruleId, label: item.ruleId }; + }); + } + } + }); + return obj; + }); +} diff --git a/src/api/neData/pcf.ts b/src/api/neData/pcf.ts new file mode 100644 index 00000000..96a9e3b6 --- /dev/null +++ b/src/api/neData/pcf.ts @@ -0,0 +1,82 @@ +import { request } from '@/plugins/http-fetch'; + +/** + * PCF-策略配置列表 + * @param query 查询参数 + * @returns object + */ +export function listPCFRule(query: Record) { + return request({ + url: '/neData/pcf/rule/list', + method: 'GET', + params: query, + timeout: 60_000, + }); +} + +/** + * PCF-策略配置添加 + * @param data 参数 + * @returns object + */ +export function addPCFRule(data: Record) { + return request({ + url: `/neData/pcf/rule`, + method: 'POST', + data, + }); +} + +/** + * PCF-策略配置更新 + * @param data 参数 + * @returns object + */ +export function editPCFRule(data: Record) { + return request({ + url: `/neData/pcf/rule`, + method: 'PUT', + data, + }); +} + +/** + * PCF-策略配置删除 + *@param data 参数 + * @returns object + */ +export function delPCFRule(data: Record) { + return request({ + url: `/neData/pcf/rule`, + method: 'DELETE', + params: data, + }); +} + +/** + * PCF-策略配置导出 + * @param data 参数{ neId, fileType } + * @returns object + */ +export function exportPCFRule(data: Record) { + return request({ + url: '/neData/pcf/rule/export', + method: 'GET', + params: data, + responseType: 'blob', + timeout: 60_000, + }); +} + +/** + * PCF-策略配置导入 + * @param data 参数 + * @returns object + */ +export function importPCFRule(data: Record) { + return request({ + url: '/neData/pcf/rule/import', + method: 'PUT', + data, + }); +} diff --git a/src/api/neUser/pcf.ts b/src/api/neUser/pcf.ts deleted file mode 100644 index 2495c373..00000000 --- a/src/api/neUser/pcf.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { - RESULT_CODE_ERROR, - RESULT_CODE_SUCCESS, -} from '@/constants/result-constants'; -import { request } from '@/plugins/http-fetch'; -import { parseObjLineToHump } from '@/utils/parse-utils'; - -/** - * 规则导出 - * @param data 表单数据对象 - * @returns bolb - */ -export function exportRule(data: Record) { - return request({ - url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/export`, - method: 'GET', - params: data, - responseType: 'blob', - timeout: 180_000, - }); -} - -/** - * 导入规则数据 - * @param data 表单数据对象 - * @returns object - */ -export function importRuleData(data: Record) { - return request({ - url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/import?neId=${data.neId}&filePath=${data.filePath}&fileType=${data.fileType}`, - method: 'PUT', - data, - timeout: 60_000, - }); -} - -/** - * 查询规则列表 - * @param query 查询参数 - * @returns object - */ -export async function listRules(query: Record) { - const result = await request({ - url: '/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo', - method: 'GET', - params: query, - }); - const data = { - data: { total: 0, rows: [] } as any, - code: result.code, - msg: result.msg, - }; - - // 解析数据 - if (result.code === RESULT_CODE_SUCCESS) { - if (result.data?.status) { - return { - code: RESULT_CODE_ERROR, - msg: result.data?.cause, - data: result.data, - }; - } - if (Array.isArray(result.data.data)) { - const rows = parseObjLineToHump(result.data.data); - data.data.total = rows.length; - data.data.rows = rows; - } - } - - // 模拟数据 - // data.rows = [ - // { - // "hdrEnrich": "dnn", - // "imsi": "160990100000003", - // "msisdn": "86755900011", - // "pccRules": "internet|ims_sig", - // "qosAudio": "qos_audio", - // "qosVideo": "qos_video", - // "rfsp": 0, - // "sar": "def_sar", - // "sessRules": "internet|ims_sig", - // "uePolicy": "uep_001" - // } - // ] - - return data; -} - -/** - * 查询规则详细 - * @param neId 网元ID - * @returns object - */ -export async function getRule(neId: string, imsi: string) { - const result = await request({ - url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`, - method: 'GET', - }); - // 解析数据 - if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) { - result.data = result.data.data[0]; - } - return result; -} - -/** - * 修改规则 - * @param data 规则对象 - * @returns object - */ -export async function updateRule(data: Record) { - const result = await request({ - url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`, - method: 'PUT', - data: data, - }); - // 解析数据 - if (result.code === RESULT_CODE_SUCCESS && result.data?.status) { - return { - code: RESULT_CODE_ERROR, - msg: result.data?.cause, - data: result.data, - }; - } - return result; -} - -/** - * 批量修改规则 - * @param data 规则对象 - * @returns object - */ -export async function batchUpdateRule(data: Record) { - const result = await request({ - 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) { - if (result.data?.status) { - return { - code: RESULT_CODE_ERROR, - msg: result.data?.cause, - data: result.data, - }; - } - if (result.data?.data) { - result.data = result.data.data; - return result; - } - } - return result; -} - -/** - * 新增规则 - * @param data 规则对象 - * @returns object - */ -export async function addRule(data: Record) { - const result = await request({ - 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) { - return { - code: RESULT_CODE_ERROR, - msg: result.data?.cause, - data: result.data, - }; - } - return result; -} - -/** - * 批量新增规则 - * @param data 规则对象 - * @returns object - */ -export async function batchAddRule(data: Record) { - const result = await request({ - 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) { - if (result.data?.status) { - return { - code: RESULT_CODE_ERROR, - msg: result.data?.cause, - data: result.data, - }; - } - if (result.data?.data) { - result.data = result.data.data; - return result; - } - } - return result; -} - -/** - * 删除规则 - * @param data 规则对象 - * @returns object - */ -export function delRule(neId: string, imsi: string) { - return request({ - url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`, - method: 'DELETE', - timeout: 60_000, - }); -} - -/** - * 批量删除规则 - * @param data 规则对象 - * @returns object - */ -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/views/neData/pcf-sub/index.vue b/src/views/neData/pcf-sub/index.vue index 638b18ec..66e96587 100644 --- a/src/views/neData/pcf-sub/index.vue +++ b/src/views/neData/pcf-sub/index.vue @@ -6,24 +6,20 @@ import { message, Modal, Form, TableColumnsType } from 'ant-design-vue/es'; import { SizeType } from 'ant-design-vue/es/config-provider'; import { MenuInfo } from 'ant-design-vue/es/menu/src/interface'; import UploadModal from '@/components/UploadModal/index.vue'; -import { - listRules, - getRule, - updateRule, - addRule, - delRule, - exportRule, - importRuleData, - batchAddRule, - batchDelRule, - batchUpdateRule, -} from '@/api/neUser/pcf'; -import { getPCCRule } from '@/api/configManage/configParam'; import useNeInfoStore from '@/store/modules/neinfo'; import useI18n from '@/hooks/useI18n'; +import { + addPCFRule, + delPCFRule, + editPCFRule, + exportPCFRule, + importPCFRule, + listPCFRule, +} from '@/api/neData/pcf'; +import { getPCFRule } from '@/api/ne/neConfig'; +import { uploadFileToNE } from '@/api/tool/file'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { saveAs } from 'file-saver'; -import { uploadFileToNE } from '@/api/tool/file'; const { t } = useI18n(); /**网元参数 */ @@ -149,7 +145,7 @@ let tableColumns = ref([ dataIndex: 'pccRules', align: 'left', resizable: true, - width: 150, + width: 200, minWidth: 100, maxWidth: 300, }, @@ -157,7 +153,10 @@ let tableColumns = ref([ title: 'SESS Rules', dataIndex: 'sessRules', align: 'left', - width: 150, + resizable: true, + width: 200, + minWidth: 100, + maxWidth: 300, }, { title: 'HDR Enrich', @@ -169,13 +168,13 @@ let tableColumns = ref([ title: 'UE Policy', dataIndex: 'uePolicy', align: 'left', - width: 150, }, { title: t('common.operate'), key: 'imsi', align: 'left', - width: 100, + width: 150, + fixed: 'right', }, ]); @@ -241,7 +240,7 @@ let modalState: ModalStateType = reactive({ openByEdit: false, title: '用户策略', from: { - num: 1, + num: undefined, imsi: '', msisdn: '', qosAudio: '', @@ -265,11 +264,13 @@ const modalStateFrom = Form.useForm( num: [ { required: true, - message: t('views.neUser.pcf.batchNum') + t('common.unableNull'), + message: t('views.neData.common.batchNum'), }, ], - imsi: [{ required: true, message: `IMSI ${t('common.unableNull')}` }], - msisdn: [{ required: true, message: `MSISDN ${t('common.unableNull')}` }], + imsi: [{ required: true, message: t('views.neData.common.imsiPlease') }], + msisdn: [ + { required: true, message: t('views.neData.common.msisdnPlease') }, + ], }) ); @@ -278,7 +279,7 @@ const modalStateFrom = Form.useForm( * @param noticeId 网元id, 不传为新增 */ function fnModalVisibleByEdit(row?: Record) { - getPCCRule(queryParams.neId) + getPCFRule(queryParams.neId) .then((data: any) => { pcfRuleOption.value = data; }) @@ -286,51 +287,39 @@ function fnModalVisibleByEdit(row?: Record) { modalState.isBatch = false; if (!row) { modalStateFrom.resetFields(); //重置表单 - modalState.title = t('views.neUser.pcf.addTitle'); + modalState.title = t('views.neData.pcfSub.addTitle'); modalState.openByEdit = true; modalState.type = 'add'; } else { - if (modalState.confirmLoading) return; - const hide = message.loading(t('common.loading'), 0); - modalState.confirmLoading = true; - const neID = queryParams.neId || '-'; - getRule(neID, row.imsi) - .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - Object.assign(modalState.from, res.data); + Object.assign(modalState.from, row); - let pccRules = res.data.pccRules; - if (!pccRules) { - pccRules = []; - } else if (pccRules.includes('|')) { - pccRules = pccRules.split('|'); - } else { - pccRules = [pccRules]; - } - modalState.from.pccRules = pccRules; - let sessRules = res.data.sessRules; - if (!sessRules) { - sessRules = []; - } else if (sessRules.includes('|')) { - sessRules = sessRules.split('|'); - } else { - sessRules = [sessRules]; - } - modalState.from.sessRules = sessRules; + // 处理多选框数据 + let pccRules = row.pccRules; + if (!pccRules) { + pccRules = []; + } else if (pccRules.includes('|')) { + pccRules = pccRules.split('|'); + } else { + pccRules = [pccRules]; + } + modalState.from.pccRules = pccRules; + // 处理多选框数据 + let sessRules = row.sessRules; + if (!sessRules) { + sessRules = []; + } else if (sessRules.includes('|')) { + sessRules = sessRules.split('|'); + } else { + sessRules = [sessRules]; + } + modalState.from.sessRules = sessRules; - modalState.title = t('views.neUser.pcf.updateTitle', { - imsi: row.imsi, - }); - modalState.openByEdit = true; - modalState.type = 'update'; - } else { - message.error(t('common.getInfoFail'), 2); - } - }) - .finally(() => { - hide(); - modalState.confirmLoading = false; - }); + // 打开对话框 + modalState.title = t('views.neData.pcfSub.updateTitle', { + imsi: row.imsi, + }); + modalState.openByEdit = true; + modalState.type = 'update'; } }); } @@ -341,8 +330,9 @@ function fnModalVisibleByEdit(row?: Record) { */ function fnModalOk() { const from = JSON.parse(JSON.stringify(modalState.from)); - from.neId = queryParams.neId || '-'; + const neId = queryParams.neId || '-'; from.rfsp = Number(from.rfsp) || 0; + // 处理多选框数据 let pccRules = modalState.from.pccRules; if (Array.isArray(pccRules)) { pccRules = pccRules.join('|'); @@ -350,7 +340,7 @@ function fnModalOk() { pccRules = ''; } from.pccRules = pccRules; - + // 处理多选框数据 let sessRules = modalState.from.sessRules; if (Array.isArray(sessRules)) { sessRules = sessRules.join('|'); @@ -359,6 +349,7 @@ function fnModalOk() { } from.sessRules = sessRules; + // 必要字段校验 let validateArr = ['imsi', 'msisdn']; if (modalState.isBatch) { validateArr.push('num'); @@ -377,20 +368,40 @@ function fnModalOk() { let result: any = null; if (modalState.isBatch) { if (modalState.type === 'add') { - result = batchAddRule(from); + result = addPCFRule({ + neId: neId, + num: from.num, + paramData: from, + }); } if (modalState.type === 'update') { - result = batchUpdateRule(from); + result = editPCFRule({ + neId: neId, + num: from.num, + paramData: from, + }); } if (modalState.type === 'delete') { - result = batchDelRule(from); + result = delPCFRule({ + neId: neId, + num: from.num, + imsi: from.imsi, + }); } } else { if (modalState.type === 'add') { - result = addRule(from); + result = addPCFRule({ + neId: neId, + num: 0, + paramData: from, + }); } if (modalState.type === 'update') { - result = updateRule(from); + result = editPCFRule({ + neId: neId, + num: 0, + paramData: from, + }); } } @@ -454,7 +465,7 @@ function fnModalCancel() { * @param type 类型 */ function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') { - getPCCRule(queryParams.neId) + getPCFRule(queryParams.neId) .then((data: any) => { pcfRuleOption.value = data; console.log(data); @@ -462,17 +473,18 @@ function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') { .finally(() => { modalStateFrom.resetFields(); //重置表单 modalState.isBatch = true; + modalState.from.num = 1; modalState.type = type; if (type === 'add') { - modalState.title = t('views.neUser.pcf.batchAddText'); + modalState.title = t('views.neData.common.batchAddText'); modalState.openByEdit = true; } if (type === 'update') { - modalState.title = t('views.neUser.pcf.batchUpdateText'); + modalState.title = t('views.neData.common.batchUpdateText'); modalState.openByEdit = true; } if (type === 'delete') { - modalState.title = t('views.neUser.pcf.batchDelText'); + modalState.title = t('views.neData.common.batchDelText'); modalState.openByEdit = true; } }); @@ -483,8 +495,8 @@ function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') { * @param imsi 网元编号ID */ function fnRecordDelete(imsi: string) { - const neID = queryParams.neId; - if (!neID) return; + const neId = queryParams.neId; + if (!neId) return; let imsiMsg = imsi; if (imsi === '0') { imsiMsg = `${tableState.selectedRowKeys[0]}... ${tableState.selectedRowKeys.length}`; @@ -493,55 +505,60 @@ function fnRecordDelete(imsi: string) { Modal.confirm({ title: t('common.tipTitle'), - content: t('views.neUser.pcf.delSure', { imsi: imsiMsg }), + content: t('views.neData.pcfSub.delSure', { imsi: imsiMsg }), onOk() { - const key = 'delRule'; - message.loading({ content: t('common.loading'), key }); - delRule(neID, imsi).then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - message.success({ - content: `${res.msg}`, - key, - duration: 3, - }); + const hide = message.loading(t('common.loading'), 0); + delPCFRule({ + neId: neId, + imsi: imsi, + }) + .then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + message.success({ + content: `${t('common.operateOk')}`, + duration: 3, + }); + } else { + message.error({ + content: `${res.msg}`, + duration: 3, + }); + } + }) + .finally(() => { + hide(); fnGetList(); - } else { - message.error({ - content: `${res.msg}`, - key: key, - duration: 3, - }); - } - }); + }); }, }); } /**列表导出 */ function fnExportList(type: string) { - const neID = queryParams.neId; - if (!neID) return; - const key = 'exportRule'; - message.loading({ content: t('common.loading'), key }); - exportRule({ - neId: neID, + const neId = queryParams.neId; + if (!neId) return; + const hide = message.loading(t('common.loading'), 0); + exportPCFRule({ + neId: neId, fileType: type, - }).then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - message.success({ - content: t('common.msgSuccess', { msg: t('common.export') }), - key, - duration: 2, - }); - saveAs(res.data, `PCF_${neID}_${Date.now()}.${type}`); - } else { - message.error({ - content: `${res.msg}`, - key, - duration: 2, - }); - } - }); + }) + .then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + message.success({ + content: t('common.msgSuccess', { msg: t('common.export') }), + duration: 3, + }); + saveAs(res.data, `PCFRlue_${neId}_${Date.now()}.${type}`); + } else { + message.error({ + content: `${res.msg}`, + duration: 3, + }); + } + }) + .finally(() => { + hide(); + }); } /**查询列表, pageNum初始页数 */ @@ -552,15 +569,14 @@ function fnGetList(pageNum?: number) { queryParams.pageNum = pageNum; tablePagination.current = pageNum; } - listRules(toRaw(queryParams)).then(res => { + listPCFRule(toRaw(queryParams)).then(res => { if (res.code === RESULT_CODE_SUCCESS) { // 取消勾选 if (tableState.selectedRowKeys.length > 0) { tableState.selectedRowKeys = []; } - const { total, rows } = res.data; - tablePagination.total = total; - tableState.data = rows; + tablePagination.total = res.data.length; + tableState.data = res.data; } else { tableState.data = []; } @@ -578,6 +594,8 @@ type ModalUploadImportStateType = { loading: boolean; /**上传结果信息 */ msg: string; + /**含失败信息 */ + hasFail: boolean; }; /**对话框表格信息导入对象信息状态 */ @@ -586,6 +604,7 @@ let uploadImportState: ModalUploadImportStateType = reactive({ title: t('components.UploadModal.uploadTitle'), loading: false, msg: '', + hasFail: false, }); /**对话框表格信息导入弹出窗口 */ @@ -603,31 +622,42 @@ function fnModalUploadImportClose() { /**对话框表格信息导入上传 */ function fnModalUploadImportUpload(file: File) { - const neID = queryParams.neId; - if (!neID) { + const neId = queryParams.neId; + if (!neId) { return Promise.reject('Unknown network element'); } const hide = message.loading(t('common.loading'), 0); uploadImportState.loading = true; - uploadFileToNE('PCF', neID, file, 5) + // 上传文件 + uploadFileToNE('PCF', neId, file, 3) .then(res => { if (res.code === RESULT_CODE_SUCCESS) { - return importRuleData({ - neId: neID, - filePath: res.data, - fileType: 'txt', - }); + return res.data; + } else { + uploadImportState.msg = res.msg; + uploadImportState.loading = false; + return ''; } - return res; + }) + .then((filePath: string) => { + if (!filePath) return; + // 文件导入 + return importPCFRule({ + neId: neId, + fileType: 'txt', + filePath: filePath, + }); }) .then(res => { - if (res.code === RESULT_CODE_SUCCESS && res.data?.data) { - uploadImportState.msg = res.data?.data; - // uploadImportState.msg = t('views.neUser.pcf.uploadFileOk'); - } else if (res.code === RESULT_CODE_SUCCESS && res.data?.detail) { - uploadImportState.msg = res.data?.detail; + if (!res) return; + uploadImportState.msg = res.msg; + const regex = /fail num: (\d+)/; + const match = res.msg.match(regex); + if (match) { + const failNum = Number(match[1]); + uploadImportState.hasFail = failNum > 0; } else { - uploadImportState.msg = t('views.neUser.pcf.uploadFileErr'); + uploadImportState.hasFail = false; } }) .finally(() => { @@ -704,7 +734,7 @@ onMounted(() => { - + { @click.prevent="fnRecordDelete('0')" > - {{ t('views.neUser.pcf.checkDel') }} + {{ t('views.neData.common.checkDel') }} - {{ t('views.neUser.pcf.batchOper') }} + {{ t('views.neData.common.batchOper') }} @@ -800,18 +830,18 @@ onMounted(() => { - {{ t('views.neUser.pcf.import') }} + {{ t('common.import') }} - {{ t('views.neUser.pcf.export') }} + {{ t('common.export') }} @@ -882,7 +912,7 @@ onMounted(() => { :data-source="tableState.data" :size="tableState.size" :pagination="tablePagination" - :scroll="{ y: 'calc(100vh - 480px)' }" + :scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }" @resizeColumn="(w:number, col:any) => (col.width = w)" :row-selection="{ type: 'checkbox', @@ -924,12 +954,13 @@ onMounted(() => { {