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.
 
 
 
 

83 lines
2.3 KiB

'use strict';
import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils'
export function getProjectGraph(projectId) {
return (dispatch) => basicAction({
type: 'get',
dispatch,
actionType: 'GET_PROJECT_PLANAR_GRAPH',
url: ApiTable.getProjectGraph.replace('{projectId}', projectId),
msg: { option: '获取结构物平面图' },
reducer: { name: 'projectGraph' }
});
}
export function createGraph(data) {
return (dispatch) => basicAction({
type: 'post',
data,
dispatch,
actionType: 'ADD_PROJECT_PLANAR_GRAPH',
url: ApiTable.createGraph,
msg: { option: '新增结构物平面图' },
});
}
export function updateGraph(id, data) {
return (dispatch) => basicAction({
type: 'post',
data,
dispatch,
actionType: 'UPDATE_PROJECT_PLANAR_GRAPH',
url: ApiTable.updateGraph.replace('{id}', id),
msg: { option: '修改结构物平面图' },
});
}
export function deleteGraph(id) {
return (dispatch) => basicAction({
type: 'del',
dispatch,
actionType: 'DELETE_PROJECT_GRAPH',
url: ApiTable.deleteGraph.replace('{id}', id),
msg: {
option: '删除结构物布设图',
},
});
}
export function getProjectPoints(projectId) {
return (dispatch) => basicAction({
type: 'get',
dispatch,
actionType: 'GET_PROJECT_ALL_POINTS',
url: ApiTable.getProjectPoints.replace('{projectId}', projectId),
msg: { option: '获取结构物所有点位' },
reducer: { name: 'projectAllPoints' }
});
}
export function getDeployPoints(pictureId) {
return (dispatch) => basicAction({
type: 'get',
dispatch,
actionType: 'GET_PROJECT_DEPLOY_POINTS',
url: ApiTable.getDeployPoints.replace('{pictureId}', pictureId),
msg: { option: '获取结构物平面图测点分布' },
reducer: { name: 'projectDeployPoints' }
});
}
export function setDeployPoints(pictureId, data) {
return (dispatch) => basicAction({
type: 'post',
data,
dispatch,
actionType: 'SET_PROJECT_DEPLOY_POINTS',
url: ApiTable.setDeployPoints.replace('{pictureId}', pictureId),
msg: { option: '结构物平面图点位布设' },
});
}