feat: PCF用户策略控制导入导出

This commit is contained in:
TsMask
2023-12-01 16:54:27 +08:00
parent 5f89732a61
commit 3a8f6964ae
2 changed files with 16 additions and 14 deletions

View File

@@ -382,7 +382,7 @@ function fnExportList(type: string) {
message.loading({ content: t('common.loading'), key });
exportRule({
neId: neID,
type: type,
fileType: type,
}).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
@@ -458,15 +458,19 @@ function fnModalUploadImportUpload(file: File) {
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
return importRuleData({
type: 'txt',
neId: neID,
filePath: res.data,
fileType: 'txt',
});
}
return res;
})
.then(res => {
uploadImportState.msg = res.msg;
if (res.code === RESULT_CODE_SUCCESS && res.data?.detail) {
uploadImportState.msg = res.data?.detail;
} else {
uploadImportState.msg = res.msg;
}
})
.finally(() => {
hide();