subject.js 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. import request from '@/utils/request'
  2. // 查询实验室列表
  3. export function listSubject(query) {
  4. return request({
  5. url: '/laboratory/subject/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询实验室列表-带权限
  11. export function authListSubject(query) {
  12. return request({
  13. url: '/laboratory/subject/manger/list',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询实验室列表-带权限-新
  19. export function authListSubjectTow(query) {
  20. return request({
  21. url: '/laboratory/subject/manger/pclist',
  22. method: 'get',
  23. params: query
  24. })
  25. }
  26. // 查询实验室详细
  27. export function getSubject(id) {
  28. return request({
  29. url: '/laboratory/subject/' + id,
  30. method: 'get'
  31. })
  32. }
  33. // 变更实验管理员
  34. export function setSubjectAdmin(data) {
  35. return request({
  36. url: '/laboratory/subject/'+data.userId+'/'+data.subId,
  37. method: 'put'
  38. })
  39. }
  40. // 新增实验室
  41. export function addSubject(data) {
  42. return request({
  43. url: '/laboratory/subject',
  44. method: 'post',
  45. data: data
  46. })
  47. }
  48. // 修改实验室
  49. export function updateSubject(data) {
  50. return request({
  51. url: '/laboratory/subject',
  52. method: 'put',
  53. data: data
  54. })
  55. }
  56. // 修改实验室(包含新危险源)
  57. export function updateSubjectEditJoinHazard(data) {
  58. return request({
  59. url: '/laboratory/subject/editJoinHazard',
  60. method: 'put',
  61. data: data
  62. })
  63. }
  64. // 删除实验室
  65. export function delSubject(id) {
  66. return request({
  67. url: '/laboratory/subject/' + id,
  68. method: 'delete'
  69. })
  70. }
  71. //获取指定用户权限下的实验室列表/subject/manger/my/list
  72. export function getSubjectList(id) {
  73. console.log("id",id);
  74. return request({
  75. url: '/laboratory/subject/count/'+id,
  76. method: 'get',
  77. })
  78. }
  79. //获取当前用户权限下的实验室列表/subject/manger/my/list
  80. export function getMySubjectList(data) {
  81. return request({
  82. url: '/laboratory/subject/manger/my/list',
  83. method: 'get'
  84. })
  85. }
  86. //根据院系查询未绑定的实验室
  87. export function getNoAdminSubjectList(data) {
  88. return request({
  89. url: '/laboratory/subject/list/noadmin',
  90. method: 'get',
  91. params: data
  92. })
  93. }
  94. //根据院系查询实验室
  95. export function getNoAdminSubjectListNopage(data) {
  96. return request({
  97. url: '/laboratory/subject/list/nopage',
  98. method: 'get',
  99. params: data
  100. })
  101. }
  102. //删除实验室
  103. export function removeSubject(id) {
  104. return request({
  105. url: '/laboratory/subject/'+id,
  106. method: 'delete'
  107. })
  108. }
  109. //根据ID查询摄像头列表
  110. export function channels(data) {
  111. return request({
  112. url: '/algorithm/api/device/query/devices/channels',
  113. method: 'get',
  114. params: data
  115. })
  116. }
  117. //根据ID查询摄像头地址
  118. export function startUrl(data) {
  119. return request({
  120. url: '/algorithm/api/play/startList',
  121. type:'video',
  122. method: 'get',
  123. params: data
  124. })
  125. }
  126. //播放文字接口
  127. export function mangerVoice(data,id) {
  128. return request({
  129. url: '/laboratory/subject/manger/voice/'+id,
  130. method: 'post',
  131. params: data
  132. })
  133. }
  134. //是否禁用实验室
  135. export function subjectType(id,type) {
  136. return request({
  137. url: '/laboratory/subject/'+id+'/'+type,
  138. method: 'Delete',
  139. })
  140. }
  141. //获取物联设备配置列表
  142. export function listBySubjectId(data) {
  143. return request({
  144. url: '/laboratory/hardware/listBySubjectId',
  145. method: 'get',
  146. params: data
  147. })
  148. }
  149. //添加传感器
  150. export function addSensor(data) {
  151. return request({
  152. url: '/laboratory/sensor/',
  153. method: 'post',
  154. data: data
  155. })
  156. }
  157. //编辑传感器
  158. export function putSensor(data) {
  159. return request({
  160. url: '/laboratory/sensor/',
  161. method: 'put',
  162. data: data
  163. })
  164. }
  165. //删除传感器
  166. export function delSensor(id) {
  167. return request({
  168. url: '/laboratory/sensor/'+id,
  169. method: 'Delete',
  170. })
  171. }
  172. //添加一体机
  173. export function addHardware(data) {
  174. return request({
  175. url: '/laboratory/hardware/',
  176. method: 'post',
  177. data: data
  178. })
  179. }
  180. //编辑一体机
  181. export function putHardware(data) {
  182. return request({
  183. url: '/laboratory/hardware/',
  184. method: 'put',
  185. data: data
  186. })
  187. }
  188. //删除一体机
  189. export function delHardware(id) {
  190. return request({
  191. url: '/laboratory/hardware/'+id,
  192. method: 'Delete',
  193. })
  194. }
  195. // 查询实验室详情
  196. export function subjectInfo(id,type) {
  197. return request({
  198. url: '/laboratory/subject/manger/query/'+id+'/'+type,
  199. method: 'get',
  200. })
  201. }
  202. //查询实验室门禁
  203. export function getDetalis(query) {
  204. return request({
  205. url: '/algorithm/smartlock/lockinfo/detalis',
  206. method: 'get',
  207. params: query
  208. })
  209. }
  210. //根据人员ID查询人员列表
  211. export function getSafeUserList(query) {
  212. return request({
  213. url: '/system/user/getSafeUserList',
  214. method: 'get',
  215. params: query
  216. })
  217. }
  218. // 修改实验室关联信息
  219. export function editJoinHazard(data) {
  220. return request({
  221. url: '/laboratory/subject/editJoinHazard',
  222. method: 'put',
  223. data: data
  224. })
  225. }
  226. //门锁列表接口
  227. export function subjectRelationList(query) {
  228. return request({
  229. url: '/algorithm/smartlock/subjectRelation/listSub',
  230. method: 'get',
  231. params: query
  232. })
  233. }
  234. //门锁选择列表数据
  235. export function listLockRoom(query) {
  236. return request({
  237. url: '/algorithm/smartlock/subjectRelation/listLockRoom',
  238. method: 'get',
  239. params: query
  240. })
  241. }
  242. // 新增智能门禁
  243. export function subjectRelation(data) {
  244. return request({
  245. url: '/algorithm/smartlock/subjectRelation/addSub',
  246. method: 'post',
  247. data: data
  248. })
  249. }
  250. // 删除智能门禁
  251. export function delSubjectRelation(id) {
  252. return request({
  253. url: '/algorithm/smartlock/subjectRelation/removeSub/'+id,
  254. method: 'Delete',
  255. })
  256. }
  257. //门禁授权列表
  258. export function openDoorApplyList(query) {
  259. return request({
  260. url: '/algorithm/smartlock/openDoorApply/list',
  261. method: 'get',
  262. params: query
  263. })
  264. }
  265. //门禁授权申请列表
  266. export function applyList(query) {
  267. return request({
  268. url: '/algorithm/smartlock/openDoorApply/applyList',
  269. method: 'get',
  270. params: query
  271. })
  272. }
  273. //门禁授权申请列表
  274. export function postApproval(data) {
  275. return request({
  276. url: '/algorithm/smartlock/approval',
  277. method: 'post',
  278. data: data
  279. })
  280. }
  281. //提交门禁申请
  282. export function openDoorApply(data) {
  283. return request({
  284. url: '/algorithm/smartlock/openDoorApply',
  285. method: 'post',
  286. data: data
  287. })
  288. }
  289. //申请门禁详情
  290. export function getOpenDoorApply(id) {
  291. return request({
  292. url: '/algorithm/smartlock/openDoorApply/'+id,
  293. method: 'get',
  294. })
  295. }
  296. //获取实验室详情位置灯数据
  297. export function subjectVo(id) {
  298. return request({
  299. url: '/laboratory/subject/vo/'+id,
  300. method: 'get',
  301. })
  302. }
  303. /* 一键灭火----------------- */
  304. //智能灭火设备列表
  305. export function firedeviceList(query) {
  306. return request({
  307. url: '/algorithm/firedevice/list',
  308. method: 'get',
  309. params: query
  310. })
  311. }
  312. //智能灭火设备-新增
  313. export function firedeviceAdd(data) {
  314. return request({
  315. url: '/algorithm/firedevice',
  316. method: 'post',
  317. data: data
  318. })
  319. }
  320. //智能灭火设备-编辑
  321. export function firedeviceEdit(data) {
  322. return request({
  323. url: '/algorithm/firedevice',
  324. method: 'put',
  325. data: data
  326. })
  327. }
  328. //智能灭火设备-删除
  329. export function firedeviceDle(id) {
  330. return request({
  331. url: '/algorithm/firedevice/' + id,
  332. method: 'delete'
  333. })
  334. }
  335. /* 预案执行记录 */
  336. //预案执行记录列表
  337. export function riskExeRecordList(query) {
  338. return request({
  339. url: '/laboratory/plan/group/riskExeRecordList',
  340. method: 'get',
  341. params: query
  342. })
  343. }
  344. //预案执行记录-详情
  345. export function riskPlanAbnormalDesc(query) {
  346. return request({
  347. url: '/laboratory/plan/desc/riskPlanAbnormalDesc?groupId='+query,
  348. method: 'get',
  349. })
  350. }
  351. //风险轨迹
  352. export function abnormalLogOrderByList(query) {
  353. return request({
  354. url: '/laboratory/plan/log/abnormalLogOrderByList?groupId='+query,
  355. method: 'get',
  356. })
  357. }
  358. //消息推送记录
  359. export function viewWarnMessage(query) {
  360. return request({
  361. url: '/laboratory/bigview/'+query+'/warn/getRiskLog',
  362. method: 'get',
  363. })
  364. }
  365. /* 智能门禁----------------- */
  366. //查询门禁授权列表
  367. export function getHaikangList(data) {
  368. return request({
  369. url: '/laboratory/haikang/user/subList?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
  370. method: 'post',
  371. data: data,
  372. })
  373. }
  374. //查询实验室已授权列表
  375. export function getHaikangUserList(data) {
  376. return request({
  377. url: '/laboratory/haikang/user/userList?pageNum='+data.pageNum+'&pageSize='+data.pageSize+'&startTime='+data.startTime+'&endTime='+data.endTime+'&searchValue='+data.searchValue+'&userType='+data.userType,
  378. method: 'post',
  379. data: data
  380. })
  381. }
  382. //查询门禁授权类型
  383. export function getHaikangQueryTypes(data) {
  384. return request({
  385. url: '/laboratory/haikang/user/queryTypes',
  386. method: 'post',
  387. data: data
  388. })
  389. }
  390. //新增用户授权
  391. export function AddImpowerHaikang(data) {
  392. return request({
  393. url: '/laboratory/haikang/user/add',
  394. method: 'post',
  395. data: data
  396. })
  397. }
  398. //编辑用户授权
  399. export function editImpowerHaikang(data) {
  400. return request({
  401. url: '/laboratory/haikang/user/update',
  402. method: 'post',
  403. data: data
  404. })
  405. }
  406. //新增用户授权
  407. export function retryImpowerHaikang(data) {
  408. return request({
  409. url: '/laboratory/haikang/user/retryAccredit',
  410. method: 'post',
  411. data: data
  412. })
  413. }
  414. // 删除用户授权
  415. export function delUserHaikang(id) {
  416. return request({
  417. url: '/laboratory/haikang/user/' + id,
  418. method: 'delete'
  419. })
  420. }
  421. //门禁授权日志列表
  422. export function entranceUserLogList(query) {
  423. return request({
  424. url: '/laboratory/haikang/userLog/list',
  425. method: 'get',
  426. params: query
  427. })
  428. }
  429. //门禁授权日志列表
  430. export function queryHardByTypeList(query) {
  431. return request({
  432. url: '/laboratory/hardware/queryHardByType',
  433. method: 'get',
  434. params: query
  435. })
  436. }