riku
2025-04-21 30748ea70f14c675743c7ea54e5c162d4a5e2839
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
  }
};