liuxiaolong
2019-05-06 8700cf1dc46c350371d865532c2914595187788e
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import { httpGET, httpPOST } from './common/httpFetch'
/**
 * @description 设备列表查询接口
 * @param { string } orgId    分库orgId
 * @param { string } start  分页起始
 * @param { string } searchName  设备ip,设备名称位置描述模糊查询
 * @param { string } length  每页条数
 * @param { string } deviceType 设备类型
 * @param { string } authorizationSystem 授权系统
 */
export const getDeviceList = body => {
  return httpGET('data/api-d/device/findDeviceList', {
    body
  })
}
 
/**
 * @description 设备添加
 * @param { string } orgId    分库orgId
 * @param { string } description 设备位置
 * @param { string } deviceName 设备名称
 * @param { string } deviceSn 设备编号
 * @param { string } deviceType 设备类型
 * @param { string } authorizationSystem 授权系统
 * @param { string } cameraType 摄像机品牌
 * @param { string } ip ip
 * @param { string } port 端口
 * @param { string } equipmentSupper 设备供应商
 * @param { string } maintenanceUnit 维保单位
 * @param { string } systemIntegrator 系统集成商
 * @param { string } username 用户名
 * @param { string } password 密码
 */
export const addDevice = body => {
  return httpPOST('data/api-d/device/add', {
    body
  })
}
/**
 * @description 设备修改
 * @param { string } orgId    分库orgId
 * @param { string } id 设备id
 * @param { string } description 设备描述
 * @param { string } deviceName 设备名称
 * @param { string } deviceSn 设备编号
 * @param { string } deviceType 设备类型
 * @param { string } authorizationSystem 授权系统
 * @param { string } cameraType 摄像机品牌
 * @param { string } ip ip
 * @param { string } port 端口
 * @param { string } equipmentSupper 设备供应商
 * @param { string } maintenanceUnit 维保单位
 * @param { string } systemIntegrator 系统集成商
 * @param { string } username 用户名
 * @param { string } password 密码
 */
export const updateDevice = body => {
  return httpPOST('data/api-d/device/update', {
    body
  })
}
/**
 * @description 设备删除
 * @param { string } orgId    分库orgId
 * @param { string } id 设备id
 */
export const delDevice = body => {
  return httpGET('data/api-d/device/delete', {
    body
  })
}
 
/**
 * @description 根据id查询设备详情
 * @param { string } orgId    分库orgId
 * @param { string } id 设备id
 */
export const getDeviceInfo = body => {
  return httpGET('data/api-d/device/findDeviceById', {
    body
  })
}
 
/**
 * @description 获取设备图片 (测试摄像机是否连通)
 * @param { string } orgId    分库orgId
 * @param { string } deviceId 设备id
 * @param { string } deviceJson {"ip":"","port":"","username":"","password":""}
 */
export const getDeviceCaptureImage = body => {
  return httpPOST('data/api-d/DataSync/getCaptureImage1', {
    body,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
 
/**
 * @description 测试其他设备是否连通
 * @param { string } orgId    分库orgId
 * @param { string } deviceId 设备id
 * @param { string } deviceJson {"ip":"","port":"","username":"","password":""}
 */
export const testConnection = body => {
  return httpPOST('data/api-d/DataSync/testConnection', {
    body,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}