政务数据资源中心(Government data Resource center) 03专项3期主要建设内容
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

68 lines
1.6 KiB

'use strict';
import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils'
export function getBackupsList(query) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query: query || {},
actionType: 'GET_BACKUPS_REPORT',
url: `${ApiTable.getBackupsList}`,
msg: { error: '获取数据备份列表失败' },
reducer: { name: 'backups' }
});
}
export function addBackups(params) {
return (dispatch) => basicAction({
type: 'post',
data: params,
dispatch,
actionType: 'ADD_BACKUPS_REPORT',
url: ApiTable.addBackups,
msg: {
option: '新增数据备份下发',
},
});
}
export function deleteBackups(id) {
return (dispatch) => basicAction({
type: 'del',
dispatch,
actionType: 'DELETE_BACKUPS_REPORT',
url: ApiTable.modifyBackups.replace('{id}', id),
msg: {
option: '数据备份删除',
},
});
}
export function modifyBackups(id, params, msg) {
return (dispatch) => basicAction({
type: 'put',
data: params,
dispatch,
actionType: 'MODIFY_BACKUPS_REPORT',
url: ApiTable.modifyBackups.replace('{id}', id),
msg: {
option: msg || '数据备份编辑',
},
});
}
export function restoreBackups(params) {
return (dispatch) => basicAction({
type: 'post',
data: params,
dispatch,
actionType: 'RESTORE_BACKUPS_REPORT',
url: ApiTable.restoreBackups,
msg: {
option: '备份恢复下发',
},
});
}