批量新增

This commit is contained in:
lai
2024-04-25 17:10:22 +08:00
parent 5a2aa383fe
commit e64d558c27

View File

@@ -259,7 +259,6 @@ const modalStateFrom = Form.useForm(
function fnModalVisibleByEdit(row?: Record<string, any>) { function fnModalVisibleByEdit(row?: Record<string, any>) {
getPCCRule(queryParams.neId) getPCCRule(queryParams.neId)
.then((res: any) => { .then((res: any) => {
console.log(res);
pcfRuleOption.pccOpt = res.pccJson; pcfRuleOption.pccOpt = res.pccJson;
pcfRuleOption.sessOpt = res.sessJson; pcfRuleOption.sessOpt = res.sessJson;
pcfRuleOption.qosOpt = res.qosJson; pcfRuleOption.qosOpt = res.qosJson;
@@ -307,7 +306,8 @@ function fnModalOk() {
const from = toRaw(modalState.from); const from = toRaw(modalState.from);
from.neId = queryParams.neId || '-'; from.neId = queryParams.neId || '-';
from.rfsp = Number(from.rfsp) || 0; from.rfsp = Number(from.rfsp) || 0;
from.pccRules = modalState.from.pccRules.join('|');
from.sessRules = modalState.from.sessRules.join('|');
let validateArr = ['imsi', 'msisdn']; let validateArr = ['imsi', 'msisdn'];
if (modalState.isBatch) { if (modalState.isBatch) {
validateArr.push('num'); validateArr.push('num');
@@ -403,6 +403,15 @@ function fnModalCancel() {
* @param type 类型 * @param type 类型
*/ */
function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') { function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
getPCCRule(queryParams.neId)
.then((res: any) => {
pcfRuleOption.pccOpt = res.pccJson;
pcfRuleOption.sessOpt = res.sessJson;
pcfRuleOption.qosOpt = res.qosJson;
pcfRuleOption.headerOpt = res.headerJson;
pcfRuleOption.sarOpt = res.sarJson;
})
.finally(() => {
modalStateFrom.resetFields(); //重置表单 modalStateFrom.resetFields(); //重置表单
modalState.isBatch = true; modalState.isBatch = true;
modalState.type = type; modalState.type = type;
@@ -418,6 +427,7 @@ function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
modalState.title = t('views.neUser.pcf.batchDelText'); modalState.title = t('views.neUser.pcf.batchDelText');
modalState.visibleByEdit = true; modalState.visibleByEdit = true;
} }
});
} }
/** /**
@@ -572,6 +582,7 @@ function fnModalUploadImportUpload(file: File) {
}); });
} }
/**使其忽略大小写 */
function filterOption(value: any, option: any) { function filterOption(value: any, option: any) {
return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0; return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0;
} }