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.
54 lines
1.4 KiB
54 lines
1.4 KiB
'use strict';
|
|
|
|
import { basicAction } from '@peace/utils'
|
|
import { ApiTable } from '$utils'
|
|
export function getProjectDisclosureList(query = {}) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: query,
|
|
actionType: 'GET_CHECK_TASK_LIST',
|
|
url: ApiTable.getCheckTask,
|
|
msg: { option: '获取巡查任务' },
|
|
reducer: { name: 'getCheckTask' }
|
|
});
|
|
}
|
|
|
|
export function addProjectDisclosure(params) {
|
|
return dispatch => basicAction({
|
|
type: 'post',
|
|
data: params,
|
|
dispatch: dispatch,
|
|
actionType: 'ADD_CHECK_TASK',
|
|
url: ApiTable.addCheckTask,
|
|
msg: { option: '新增巡查任务' },
|
|
});
|
|
}
|
|
|
|
export function editProjectDisclosure(data) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
data,
|
|
dispatch: dispatch,
|
|
actionType: 'EDIT_CHECK_TASK',
|
|
url: ApiTable.editCheckTask,
|
|
msg: { option: '' },
|
|
});
|
|
}
|
|
|
|
export function delProjectDisclosure(id) {
|
|
return dispatch => basicAction({
|
|
type: 'delete',
|
|
dispatch: dispatch,
|
|
actionType: 'DEL_CHECK_TASK',
|
|
url: ApiTable.delCheckTask.replace(':id', id),
|
|
msg: { option: '删除巡查任务' },
|
|
})
|
|
}
|
|
|
|
export default {
|
|
getProjectDisclosureList,
|
|
addProjectDisclosure,
|
|
editProjectDisclosure,
|
|
delProjectDisclosure,
|
|
}
|