deviceInfo.js 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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/list',
  7. method: 'get',
  8. params: query
  9. })
  10. }
  11. // 查询设备信息列表
  12. export function myDeviceInfo(query) {
  13. return request({
  14. url: '/watch-api/device/myList',
  15. method: 'get',
  16. params: query
  17. })
  18. }
  19. // 查询设备信息详细
  20. export function getDeviceInfo(deviceId) {
  21. return request({
  22. url: '/watch-api/device/' + deviceId,
  23. method: 'get'
  24. })
  25. }
  26. // 查询当月新增设备
  27. export function getAddCountByMonth() {
  28. return request({
  29. url: '/watch-api/device/getAddCountByMonth',
  30. method: 'get'
  31. })
  32. }
  33. // 根据设备编号查询设备信息详细
  34. export function getDeviceInfoByNumber(data) {
  35. return request({
  36. url: '/watch-api/device/getByNumber',
  37. method: 'get',
  38. params: data
  39. })
  40. }
  41. // 新增设备信息
  42. export function addDeviceInfo(data) {
  43. return request({
  44. url: '/watch-api/device',
  45. method: 'post',
  46. data: data
  47. })
  48. }
  49. // 修改设备信息
  50. export function updateDeviceInfo(data) {
  51. return request({
  52. url: '/watch-api/device',
  53. method: 'put',
  54. data: data
  55. })
  56. }
  57. // 删除设备信息
  58. export function delDeviceInfo(deviceId) {
  59. return request({
  60. url: '/watch-api/device/' + deviceId,
  61. method: 'delete'
  62. })
  63. }
  64. // 导出设备信息
  65. export function exportDeviceInfo(query) {
  66. return request({
  67. url: '/watch-api/device/export',
  68. method: 'get',
  69. params: query
  70. })
  71. }
  72. // 导出我的设备信息
  73. export function exportMy(query) {
  74. return request({
  75. url: '/watch-api/device/exportMy',
  76. method: 'get',
  77. params: query
  78. })
  79. }
  80. // 查询用户信息
  81. export function getUser(data) {
  82. return request({
  83. url: '/watch-api/device/set/up/getUserInfo',
  84. method: 'get',
  85. params:data
  86. })
  87. }
  88. // 获取心率数据
  89. export function getHeartRateData(deviceId) {
  90. return request({
  91. url: `/watch-api/watch/heart/rate/${deviceId}`,
  92. method: 'get'
  93. })
  94. }
  95. // 获取设备基本数据
  96. export function getWatchData(deviceId) {
  97. return request({
  98. url: `/watch-api/watch/basic/info/${deviceId}`,
  99. method: 'get'
  100. })
  101. }
  102. // 根据时间获取心率数据
  103. export function queryByDate(date,deviceId) {
  104. return request({
  105. url: `/watch-api/watch/heart/rate/queryByDate`,
  106. method: 'get',
  107. params: { date,deviceId }
  108. })
  109. }
  110. export function queryHrList(data) {
  111. return request({
  112. url: `/watch-api/watch/heart/rate/list`,
  113. method: 'get',
  114. params: data
  115. })
  116. }
  117. //exportHeartDate导出
  118. export function exportHeartDate(date,deviceId) {
  119. return request({
  120. url: `/watch-api/watch/heart/rate/exportByDate`,
  121. method: 'get',
  122. params: { date,deviceId }
  123. })
  124. }
  125. //获取运动信息
  126. export function querySportData(date,deviceId) {
  127. return request({
  128. url: `/watch-api/watch/sport/data/queryByDateAndDeviceId`,
  129. method: 'get',
  130. params: { date,deviceId }
  131. })
  132. }
  133. //导出运动信息
  134. export function exportSporttDate(date,deviceId) {
  135. return request({
  136. url: `/watch-api/watch/sport/data/exportByDate`,
  137. method: 'get',
  138. params: { date,deviceId }
  139. })
  140. }
  141. // 根据时间获取脉搏数据
  142. export function queryPulseDate(date,deviceId) {
  143. return request({
  144. url: `/watch-api/watch/continuous/spo2/data/queryPulseRate`,
  145. method: 'get',
  146. params: { date,deviceId }
  147. })
  148. }
  149. // 根据时间获取血糖数据
  150. export function queryGlucoseDate(date,deviceId) {
  151. return request({
  152. url: `/watch-api/watch/blood/glucose/queryByDateAndDeviceId`,
  153. method: 'get',
  154. params: { date,deviceId }
  155. })
  156. }
  157. // 根据时间获取血糖数据
  158. export function queryGlucoseList(data) {
  159. return request({
  160. url: `/watch-api/watch/blood/glucose/list`,
  161. method: 'get',
  162. params: data
  163. })
  164. }
  165. // 根据时间获取房颤数据
  166. export function queryAfDate(date,deviceId) {
  167. return request({
  168. url: `/watch-api/watch/rri/data/queryByDateAndDeviceId`,
  169. method: 'get',
  170. params: { date,deviceId }
  171. })
  172. }
  173. // 根据时间获取血压数据
  174. export function queryPressure(date,deviceId) {
  175. return request({
  176. url: `/watch-api/watch/blood/pressure/queryByDateAndDeviceId`,
  177. method: 'get',
  178. params: { date,deviceId }
  179. })
  180. }
  181. // 根据时间获取血压数据
  182. export function queryPressureList(data) {
  183. return request({
  184. url: `/watch-api/watch/blood/pressure/list`,
  185. method: 'get',
  186. params:data
  187. })
  188. }
  189. // 根据时间获取温度数据
  190. export function queryTemperature(date,deviceId) {
  191. return request({
  192. url: `/watch-api/watch/temperature/queryByDateAndDeviceId`,
  193. method: 'get',
  194. params: { date,deviceId }
  195. })
  196. }
  197. // 根据时间获取概况数据
  198. export function queryOverview(date,deviceId) {
  199. return request({
  200. url: `/watch-api/watch/basic/info/queryOverview`,
  201. method: 'get',
  202. params: { date,deviceId }
  203. })
  204. }
  205. // 根据时间获取血氧数据
  206. export function querySpo2(date,deviceId) {
  207. return request({
  208. url: `/watch-api/watch/spo2/data/queryByDateAndDeviceId`,
  209. method: 'get',
  210. params: { date,deviceId }
  211. })
  212. }
  213. // 根据时间获取血氧数据
  214. export function querySpo2List(data) {
  215. return request({
  216. url: `/watch-api/watch/spo2/data/list`,
  217. method: 'get',
  218. params: data
  219. })
  220. }
  221. // 根据时间获取睡眠数据
  222. export function querySleep(date,deviceId) {
  223. return request({
  224. url: `/watch-api/watch/sleep/data/queryByDateAndDeviceId`,
  225. method: 'get',
  226. params: { date,deviceId }
  227. })
  228. }
  229. // 根据时间获取睡眠数据
  230. export function querySleepList(data) {
  231. return request({
  232. url: `/watch-api/watch/sleep/data/list`,
  233. method: 'get',
  234. params: data
  235. })
  236. }
  237. // 获取预警数据
  238. export function queryAlarm(status) {
  239. return request({
  240. url: `/watch-api/watch/alarm/queryByStatus`,
  241. method: 'get',
  242. params: { status }
  243. })
  244. }
  245. // 获取预警数据(分页版本)
  246. export function queryPageAlarm(query) {
  247. return request({
  248. url: `/watch-api/watch/alarm/queryPageByStatus`,
  249. method: 'get',
  250. params: query
  251. })
  252. }
  253. // 设置已读
  254. export function setStatus(ids) {
  255. return request({
  256. url: '/watch-api/watch/alarm/setStatusById',
  257. method: 'post',
  258. data: ids
  259. })
  260. }
  261. //获取一天的路线
  262. export function queryGnss(data) {
  263. return request({
  264. url: '/watch-api/watch/basic/info/queryGnssByDateAndDeviceId',
  265. method: 'get',
  266. params:data
  267. })
  268. }
  269. //获取一天的路线
  270. export function exportSleeptDate(data) {
  271. return request({
  272. url: '/watch-api/watch/sleep/data/exportByDate',
  273. method: 'get',
  274. params:data
  275. })
  276. }
  277. //获取血酮数据
  278. export function queryBkData(data) {
  279. return request({
  280. url: '/watch-api/watch/third/bk/queryByDateAndDeviceId',
  281. method: 'get',
  282. params:data
  283. })
  284. }
  285. //获取尿酸数据
  286. export function queryUaData(data) {
  287. return request({
  288. url: '/watch-api/watch/third/ua/queryByDateAndDeviceId',
  289. method: 'get',
  290. params:data
  291. })
  292. }
  293. //获取尿酸数据
  294. export function queryUaList(data) {
  295. return request({
  296. url: '/watch-api/watch/third/ua/list',
  297. method: 'get',
  298. params:data
  299. })
  300. }
  301. //获最新健康数据
  302. export function queryLastHealthData(data) {
  303. return request({
  304. url: '/watch-api/device/queryLastWatchData',
  305. method: 'get',
  306. params:data
  307. })
  308. }
  309. //获最联系人
  310. export function querySos(data) {
  311. return request({
  312. url: '/watch-api/device/querySos',
  313. method: 'get',
  314. params:data
  315. })
  316. }
  317. //查询某个时间段心率数据 分页
  318. export function queryPageByDate(data) {
  319. return request({
  320. url: '/watch-api/watch/heart/rate/page',
  321. method: 'get',
  322. params:data
  323. })
  324. }
  325. //查询某个时间段的分类数据 分页
  326. export function querySportPageByDate(data) {
  327. return request({
  328. url: '/watch-api/watch/sport/data/queryPageByDataAndDeviceId',
  329. method: 'get',
  330. params:data
  331. })
  332. }
  333. //查询某个时间段的睡眠数据 分页
  334. export function querySleepPageByDate(data) {
  335. return request({
  336. url: '/watch-api/watch/sleep/data/page',
  337. method: 'get',
  338. params:data
  339. })
  340. }
  341. //查询某个时间段的地理数据 分页
  342. export function queryLocPageByDate(data) {
  343. return request({
  344. url: '/watch-api/watch/basic/info/page',
  345. method: 'get',
  346. params:data
  347. })
  348. }
  349. //查询某个时间段的温度数据 分页
  350. export function queryTemperaturePageByDate(data) {
  351. return request({
  352. url: '/watch-api/watch/temperature/page',
  353. method: 'get',
  354. params:data
  355. })
  356. }
  357. //查询某个时间段的温度数据 分页
  358. export function queryBOPageByDate(data) {
  359. return request({
  360. url: '/watch-api/watch/continuous/spo2/data/queryPageByDateAndDeviceId',
  361. method: 'get',
  362. params:data
  363. })
  364. }
  365. //物联网 分页
  366. export function queryIotList(data) {
  367. return request({
  368. url: '/watch-api/watch/deviceInfo/query',
  369. method: 'get',
  370. params:data
  371. })
  372. }
  373. //查询某个时间段的压力数据 分页
  374. export function queryFatiguePageByDate(data) {
  375. return request({
  376. url: '/watch-api/watch/fatigue/page',
  377. method: 'get',
  378. params:data
  379. })
  380. }
  381. // 根据时间获取压力数据
  382. export function queryFatigue(date,deviceId) {
  383. return request({
  384. url: `/watch-api/watch/fatigue/queryByDateAndDeviceId`,
  385. method: 'get',
  386. params: { date,deviceId }
  387. })
  388. }
  389. //健康周报-步数,卡路里,睡眠等信息
  390. export function getUserHealthInfoByDeviceId(data) {
  391. return request({
  392. url: '/watch-api/watch/sport/data/getUserHealthInfoByDeviceId',
  393. method: 'get',
  394. params:data
  395. })
  396. }
  397. //健康周报-步数,卡路里,睡眠等信息
  398. export function queryHealthReport(data) {
  399. return request({
  400. url: '/watch-api/device/queryHealthReport',
  401. method: 'get',
  402. params:data
  403. })
  404. }
  405. //舌诊
  406. export function queryTongueList(data) {
  407. return request({
  408. url: '/watch-api/device/getHealthTongueList',
  409. method: 'get',
  410. params:data
  411. })
  412. }