Blame view

src/api/systemData/dataInterface.js 1.96 KB
477ec56f   monkeyhouyi   权限
1
2
  import request from '@/utils/request'
  
c21fb5b0   monkeyhouyi   巡查上报页面
3
4
5
6
7
8
9
10
11
12
  // 获取字段列表
  export function getList(data) {
    return request({
        url: `/Extend/BaseInspectionReport`,
        method: 'GET',
        data
    })
  }
  
  
477ec56f   monkeyhouyi   权限
13
14
15
  // 获取接口列表(分页)
  export function getDataInterfaceList(data) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
16
      url: '/system/DataInterface',
477ec56f   monkeyhouyi   权限
17
18
19
20
21
22
23
24
      method: 'GET',
      data
    })
  }
  
  // 获取接口列表下拉框
  export function getDataInterfaceSelector() {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
25
      url: '/system/DataInterface/Selector',
477ec56f   monkeyhouyi   权限
26
27
28
29
30
31
32
      method: 'GET'
    })
  }
  
  // 添加接口
  export function createDataInterface(data) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
33
      url: '/system/DataInterface',
477ec56f   monkeyhouyi   权限
34
35
36
37
38
39
40
41
      method: 'POST',
      data
    })
  }
  
  // 修改接口
  export function updateDataInterface(data) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
42
      url: `/system/DataInterface/${data.id}`,
477ec56f   monkeyhouyi   权限
43
44
45
46
47
48
49
50
      method: 'PUT',
      data
    })
  }
  
  // 获取接口数据
  export function getDataInterfaceInfo(id) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
51
      url: `/system/DataInterface/${id}`,
477ec56f   monkeyhouyi   权限
52
53
54
55
56
57
58
      method: 'GET'
    })
  }
  
  // 删除接口数据
  export function delDataInterface(id) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
59
      url: `/system/DataInterface/${id}`,
477ec56f   monkeyhouyi   权限
60
61
62
63
64
65
66
      method: 'DELETE'
    })
  }
  
  // 更新接口状态
  export function updateDataInterfaceState(id) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
67
      url: `/system/DataInterface/${id}/Actions/State`,
477ec56f   monkeyhouyi   权限
68
69
70
71
72
73
74
      method: 'PUT'
    })
  }
  
  // 获取接口分类
  export function getDataInterfaceTypeSelector() {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
75
      url: '/system/DictionaryData/9c43287481364d348c0ea0d0f64b38be/Data/Selector',
477ec56f   monkeyhouyi   权限
76
77
78
79
80
81
82
      method: 'GET'
    })
  }
  
  // 获取接口数据
  export function previewDataInterface(id) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
83
      url: `/system/DataInterface/${id}/Actions/Response`,
477ec56f   monkeyhouyi   权限
84
85
86
87
88
89
90
      method: 'GET'
    })
  }
  
  // 导出数据接口数据
  export function exportData(id) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
91
      url: `/system/DataInterface/${id}/Action/Export`,
477ec56f   monkeyhouyi   权限
92
93
94
95
96
97
98
      method: 'GET'
    })
  }
  
  // 获取数据接口调用日志列表
  export function getDataInterfaceLog(id, data) {
    return request({
c21fb5b0   monkeyhouyi   巡查上报页面
99
      url: `/system/DataInterfaceLog/${id}`,
477ec56f   monkeyhouyi   权限
100
101
102
103
      method: 'GET',
      data
    })
  }