import { $clue } from '../index';
|
import { getGridRecord, getGridRecordList } from '@/model/gridRecord';
|
|
export default {
|
/**
|
* 获取方案网格信息
|
*/
|
fetchGridList(schemeId) {
|
return $clue.get(`grid/info/fetch?id=${schemeId}`).then((res) => {
|
return getGridRecordList(res.data);
|
});
|
},
|
|
/**
|
* 新建网格
|
* @param {Object} grid
|
*/
|
createGrid(gridInfo) {
|
return $clue.post(`grid/info/create`, gridInfo).then((res) => {
|
return getGridRecord(res.data);
|
});
|
},
|
|
/**
|
* 更新网格
|
* @param {Object} gridInfo
|
*/
|
updateGrid(gridInfo) {
|
return $clue
|
.post(`grid/info/update`, gridInfo)
|
.then((res) => res.data);
|
}
|
};
|