批量新增
This commit is contained in:
@@ -259,7 +259,6 @@ const modalStateFrom = Form.useForm(
|
||||
function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
getPCCRule(queryParams.neId)
|
||||
.then((res: any) => {
|
||||
console.log(res);
|
||||
pcfRuleOption.pccOpt = res.pccJson;
|
||||
pcfRuleOption.sessOpt = res.sessJson;
|
||||
pcfRuleOption.qosOpt = res.qosJson;
|
||||
@@ -307,7 +306,8 @@ function fnModalOk() {
|
||||
const from = toRaw(modalState.from);
|
||||
from.neId = queryParams.neId || '-';
|
||||
from.rfsp = Number(from.rfsp) || 0;
|
||||
|
||||
from.pccRules = modalState.from.pccRules.join('|');
|
||||
from.sessRules = modalState.from.sessRules.join('|');
|
||||
let validateArr = ['imsi', 'msisdn'];
|
||||
if (modalState.isBatch) {
|
||||
validateArr.push('num');
|
||||
@@ -403,21 +403,31 @@ function fnModalCancel() {
|
||||
* @param type 类型
|
||||
*/
|
||||
function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
|
||||
modalStateFrom.resetFields(); //重置表单
|
||||
modalState.isBatch = true;
|
||||
modalState.type = type;
|
||||
if (type === 'add') {
|
||||
modalState.title = t('views.neUser.pcf.batchAddText');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
if (type === 'update') {
|
||||
modalState.title = t('views.neUser.pcf.batchUpdateText');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
if (type === 'delete') {
|
||||
modalState.title = t('views.neUser.pcf.batchDelText');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
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(); //重置表单
|
||||
modalState.isBatch = true;
|
||||
modalState.type = type;
|
||||
if (type === 'add') {
|
||||
modalState.title = t('views.neUser.pcf.batchAddText');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
if (type === 'update') {
|
||||
modalState.title = t('views.neUser.pcf.batchUpdateText');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
if (type === 'delete') {
|
||||
modalState.title = t('views.neUser.pcf.batchDelText');
|
||||
modalState.visibleByEdit = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -572,6 +582,7 @@ function fnModalUploadImportUpload(file: File) {
|
||||
});
|
||||
}
|
||||
|
||||
/**使其忽略大小写 */
|
||||
function filterOption(value: any, option: any) {
|
||||
return option.value.toUpperCase().indexOf(value.toUpperCase()) >= 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user