deviceInfo.js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. import request from '@/utils/request'
  2. import { status } from 'nprogress'
  3. // 查询设备信息列表
  4. export function listDeviceInfo(query) {
  5. return request({
  6. url: '/watch-api/device/myList',
  7. method: 'get',
  8. params: query
  9. })
  10. }
  11. // 查询设备信息详细
  12. export function getDeviceInfo(deviceId) {
  13. return request({
  14. url: '/watch-api/device/' + deviceId,
  15. method: 'get'
  16. })
  17. }
  18. // 查询当月新增设备
  19. export function getAddCountByMonth() {
  20. return request({
  21. url: '/watch-api/device/getAddCountByMonth',
  22. method: 'get'
  23. })
  24. }
  25. // 根据设备编号查询设备信息详细
  26. export function getDeviceInfoByNumber(data) {
  27. return request({
  28. url: '/watch-api/device/getByNumber',
  29. method: 'get',
  30. params: data
  31. })
  32. }
  33. // 新增设备信息
  34. export function addDeviceInfo(data) {
  35. return request({
  36. url: '/watch-api/device',
  37. method: 'post',
  38. data: data
  39. })
  40. }
  41. // 修改设备信息
  42. export function updateDeviceInfo(data) {
  43. return request({
  44. url: '/watch-api/device',
  45. method: 'put',
  46. data: data
  47. })
  48. }
  49. // 删除设备信息
  50. export function delDeviceInfo(deviceId) {
  51. return request({
  52. url: '/watch-api/device/' + deviceId,
  53. method: 'delete'
  54. })
  55. }
  56. // 导出设备信息
  57. export function exportDeviceInfo(query) {
  58. return request({
  59. url: '/watch-api/device/export',
  60. method: 'get',
  61. params: query
  62. })
  63. }
  64. // 查询用户信息
  65. export function getUser(data) {
  66. return request({
  67. url: '/watch-api/device/set/up/getUserInfo',
  68. method: 'get',
  69. params:data
  70. })
  71. }
  72. // 获取心率数据
  73. export function getHeartRateData(deviceId) {
  74. return request({
  75. url: `/watch-api/watch/heart/rate/${deviceId}`,
  76. method: 'get'
  77. })
  78. }
  79. // 获取设备基本数据
  80. export function getWatchData(deviceId) {
  81. return request({
  82. url: `/watch-api/watch/basic/info/${deviceId}`,
  83. method: 'get'
  84. })
  85. }
  86. // 根据时间获取心率数据
  87. export function queryByDate(date,deviceId) {
  88. return request({
  89. url: `/watch-api/watch/heart/rate/queryByDate`,
  90. method: 'get',
  91. params: { date,deviceId }
  92. })
  93. }
  94. //exportHeartDate导出
  95. export function exportHeartDate(date,deviceId) {
  96. return request({
  97. url: `/watch-api/watch/heart/rate/exportByDate`,
  98. method: 'get',
  99. params: { date,deviceId }
  100. })
  101. }
  102. //获取运动信息
  103. export function querySportData(date,deviceId) {
  104. return request({
  105. url: `/watch-api/watch/sport/data/queryByDateAndDeviceId`,
  106. method: 'get',
  107. params: { date,deviceId }
  108. })
  109. }
  110. //导出运动信息
  111. export function exportSporttDate(date,deviceId) {
  112. return request({
  113. url: `/watch-api/watch/sport/data/exportByDate`,
  114. method: 'get',
  115. params: { date,deviceId }
  116. })
  117. }
  118. // 根据时间获取脉搏数据
  119. export function queryPulseDate(date,deviceId) {
  120. return request({
  121. url: `/watch-api/watch/continuous/spo2/data/queryPulseRate`,
  122. method: 'get',
  123. params: { date,deviceId }
  124. })
  125. }
  126. // 根据时间获取血糖数据
  127. export function queryGlucoseDate(date,deviceId) {
  128. return request({
  129. url: `/watch-api/watch/blood/glucose/queryByDateAndDeviceId`,
  130. method: 'get',
  131. params: { date,deviceId }
  132. })
  133. }
  134. // 根据时间获取房颤数据
  135. export function queryAfDate(date,deviceId) {
  136. return request({
  137. url: `/watch-api/watch/rri/data/queryByDateAndDeviceId`,
  138. method: 'get',
  139. params: { date,deviceId }
  140. })
  141. }
  142. // 根据时间获取血压数据
  143. export function queryPressure(date,deviceId) {
  144. return request({
  145. url: `/watch-api/watch/blood/pressure/queryByDateAndDeviceId`,
  146. method: 'get',
  147. params: { date,deviceId }
  148. })
  149. }
  150. // 根据时间获取温度数据
  151. export function queryTemperature(date,deviceId) {
  152. return request({
  153. url: `/watch-api/watch/temperature/queryByDateAndDeviceId`,
  154. method: 'get',
  155. params: { date,deviceId }
  156. })
  157. }
  158. // 根据时间获取概况数据
  159. export function queryOverview(date,deviceId) {
  160. return request({
  161. url: `/watch-api/watch/basic/info/queryOverview`,
  162. method: 'get',
  163. params: { date,deviceId }
  164. })
  165. }
  166. // 根据时间获取血氧数据
  167. export function querySpo2(date,deviceId) {
  168. return request({
  169. url: `/watch-api/watch/spo2/data/queryByDateAndDeviceId`,
  170. method: 'get',
  171. params: { date,deviceId }
  172. })
  173. }
  174. // 根据时间获取睡眠数据
  175. export function querySleep(date,deviceId) {
  176. return request({
  177. url: `/watch-api/watch/sleep/data/queryByDateAndDeviceId`,
  178. method: 'get',
  179. params: { date,deviceId }
  180. })
  181. }
  182. // 获取预警数据
  183. export function queryAlarm(status) {
  184. return request({
  185. url: `/watch-api/watch/alarm/queryByStatus`,
  186. method: 'get',
  187. params: { status }
  188. })
  189. }
  190. // 获取预警数据(分页版本)
  191. export function queryPageAlarm(query) {
  192. return request({
  193. url: `/watch-api/watch/alarm/queryPageByStatus`,
  194. method: 'get',
  195. params: query
  196. })
  197. }
  198. // 设置已读
  199. export function setStatus(ids) {
  200. return request({
  201. url: '/watch-api/watch/alarm/setStatusById',
  202. method: 'post',
  203. data: ids
  204. })
  205. }
  206. //获取一天的路线
  207. export function queryGnss(data) {
  208. return request({
  209. url: '/watch-api/watch/basic/info/queryGnssByDateAndDeviceId',
  210. method: 'get',
  211. params:data
  212. })
  213. }
  214. //获取一天的路线
  215. export function exportSleeptDate(data) {
  216. return request({
  217. url: '/watch-api/watch/sleep/data/exportByDate',
  218. method: 'get',
  219. params:data
  220. })
  221. }
  222. //获取血酮数据
  223. export function queryBkData(data) {
  224. return request({
  225. url: '/watch-api/watch/third/bk/queryByDateAndDeviceId',
  226. method: 'get',
  227. params:data
  228. })
  229. }
  230. //获取尿酸数据
  231. export function queryUaData(data) {
  232. return request({
  233. url: '/watch-api/watch/third/ua/queryByDateAndDeviceId',
  234. method: 'get',
  235. params:data
  236. })
  237. }
  238. //获最新健康数据
  239. export function queryLastHealthData(data) {
  240. return request({
  241. url: '/watch-api/device/queryLastWatchData',
  242. method: 'get',
  243. params:data
  244. })
  245. }
  246. //获最联系人
  247. export function querySos(data) {
  248. return request({
  249. url: '/watch-api/device/querySos',
  250. method: 'get',
  251. params:data
  252. })
  253. }
  254. //查询某个时间段心率数据 分页
  255. export function queryPageByDate(data) {
  256. return request({
  257. url: '/watch-api/watch/heart/rate/page',
  258. method: 'get',
  259. params:data
  260. })
  261. }
  262. //查询某个时间段的分类数据 分页
  263. export function querySportPageByDate(data) {
  264. return request({
  265. url: '/watch-api/watch/sport/data/queryPageByDataAndDeviceId',
  266. method: 'get',
  267. params:data
  268. })
  269. }
  270. //查询某个时间段的睡眠数据 分页
  271. export function querySleepPageByDate(data) {
  272. return request({
  273. url: '/watch-api/watch/sleep/data/page',
  274. method: 'get',
  275. params:data
  276. })
  277. }
  278. //查询某个时间段的地理数据 分页
  279. export function queryLocPageByDate(data) {
  280. return request({
  281. url: '/watch-api/watch/basic/info/page',
  282. method: 'get',
  283. params:data
  284. })
  285. }
  286. //查询某个时间段的温度数据 分页
  287. export function queryTemperaturePageByDate(data) {
  288. return request({
  289. url: '/watch-api/watch/temperature/page',
  290. method: 'get',
  291. params:data
  292. })
  293. }
  294. //查询某个时间段的温度数据 分页
  295. export function queryBOPageByDate(data) {
  296. return request({
  297. url: '/watch-api/watch/continuous/spo2/data/queryPageByDateAndDeviceId',
  298. method: 'get',
  299. params:data
  300. })
  301. }