subject.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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 subjectTriggerModes(id) {
  204. return request({
  205. url: '/laboratory/control/newMsg/'+id,
  206. method: 'get',
  207. })
  208. }
  209. //查询实验室门禁
  210. export function getDetalis(query) {
  211. return request({
  212. url: '/algorithm/smartlock/lockinfo/detalis',
  213. method: 'get',
  214. params: query
  215. })
  216. }
  217. //根据人员ID查询人员列表
  218. export function getSafeUserList(query) {
  219. return request({
  220. url: '/system/user/getSafeUserList',
  221. method: 'get',
  222. params: query
  223. })
  224. }
  225. // 修改实验室关联信息
  226. export function editJoinHazard(data) {
  227. return request({
  228. url: '/laboratory/subject/editJoinHazard',
  229. method: 'put',
  230. data: data
  231. })
  232. }
  233. //门锁列表接口
  234. export function subjectRelationList(query) {
  235. return request({
  236. url: '/algorithm/smartlock/subjectRelation/listSub',
  237. method: 'get',
  238. params: query
  239. })
  240. }
  241. //门锁选择列表数据
  242. export function listLockRoom(query) {
  243. return request({
  244. url: '/algorithm/smartlock/subjectRelation/listLockRoom',
  245. method: 'get',
  246. params: query
  247. })
  248. }
  249. // 新增智能门禁
  250. export function subjectRelation(data) {
  251. return request({
  252. url: '/algorithm/smartlock/subjectRelation/addSub',
  253. method: 'post',
  254. data: data
  255. })
  256. }
  257. // 删除智能门禁
  258. export function delSubjectRelation(id) {
  259. return request({
  260. url: '/algorithm/smartlock/subjectRelation/removeSub/'+id,
  261. method: 'Delete',
  262. })
  263. }
  264. //门禁授权列表
  265. export function openDoorApplyList(query) {
  266. return request({
  267. url: '/algorithm/smartlock/openDoorApply/list',
  268. method: 'get',
  269. params: query
  270. })
  271. }
  272. //门禁授权申请列表
  273. export function applyList(query) {
  274. return request({
  275. url: '/algorithm/smartlock/openDoorApply/applyList',
  276. method: 'get',
  277. params: query
  278. })
  279. }
  280. //门禁授权申请列表
  281. export function postApproval(data) {
  282. return request({
  283. url: '/algorithm/smartlock/approval',
  284. method: 'post',
  285. data: data
  286. })
  287. }
  288. //提交门禁申请
  289. export function openDoorApply(data) {
  290. return request({
  291. url: '/algorithm/smartlock/openDoorApply',
  292. method: 'post',
  293. data: data
  294. })
  295. }
  296. //申请门禁详情
  297. export function getOpenDoorApply(id) {
  298. return request({
  299. url: '/algorithm/smartlock/openDoorApply/'+id,
  300. method: 'get',
  301. })
  302. }
  303. //获取实验室详情位置灯数据
  304. export function subjectVo(id) {
  305. return request({
  306. url: '/laboratory/subject/vo/'+id,
  307. method: 'get',
  308. })
  309. }
  310. /* 一键灭火----------------- */
  311. //智能灭火设备列表
  312. export function firedeviceList(query) {
  313. return request({
  314. url: '/algorithm/firedevice/list',
  315. method: 'get',
  316. params: query
  317. })
  318. }
  319. //智能灭火设备-新增
  320. export function firedeviceAdd(data) {
  321. return request({
  322. url: '/algorithm/firedevice',
  323. method: 'post',
  324. data: data
  325. })
  326. }
  327. //智能灭火设备-编辑
  328. export function firedeviceEdit(data) {
  329. return request({
  330. url: '/algorithm/firedevice',
  331. method: 'put',
  332. data: data
  333. })
  334. }
  335. //智能灭火设备-删除
  336. export function firedeviceDle(id) {
  337. return request({
  338. url: '/algorithm/firedevice/' + id,
  339. method: 'delete'
  340. })
  341. }
  342. /* 预案执行记录 */
  343. //预案执行记录列表
  344. export function riskExeRecordList(query) {
  345. return request({
  346. url: '/laboratory/plan/group/riskExeRecordList',
  347. method: 'get',
  348. params: query
  349. })
  350. }
  351. //预案执行记录-详情
  352. export function riskPlanAbnormalDesc(query) {
  353. return request({
  354. url: '/laboratory/plan/desc/riskPlanAbnormalDesc?groupId='+query,
  355. method: 'get',
  356. })
  357. }
  358. //风险轨迹
  359. export function abnormalLogOrderByList(query) {
  360. return request({
  361. url: '/laboratory/plan/log/abnormalLogOrderByList?groupId='+query,
  362. method: 'get',
  363. })
  364. }
  365. //消息推送记录
  366. export function viewWarnMessage(query) {
  367. return request({
  368. url: '/laboratory/bigview/'+query+'/warn/getRiskLog',
  369. method: 'get',
  370. })
  371. }
  372. /* 智能门禁----------------- */
  373. //查询门禁授权列表
  374. export function getHaikangList(data) {
  375. return request({
  376. url: '/laboratory/haikang/user/subList?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
  377. method: 'post',
  378. data: data,
  379. })
  380. }
  381. //查询实验室已授权列表
  382. export function getHaikangUserList(data) {
  383. return request({
  384. url: '/laboratory/haikang/user/userList?pageNum='+data.pageNum+'&pageSize='+data.pageSize+'&startTime='+data.startTime+'&endTime='+data.endTime+'&searchValue='+data.searchValue+'&userType='+data.userType,
  385. method: 'post',
  386. data: data
  387. })
  388. }
  389. //查询门禁授权类型
  390. export function getHaikangQueryTypes(data) {
  391. return request({
  392. url: '/laboratory/haikang/user/queryTypes',
  393. method: 'post',
  394. data: data
  395. })
  396. }
  397. //新增用户授权
  398. export function AddImpowerHaikang(data) {
  399. return request({
  400. url: '/laboratory/haikang/user/add',
  401. method: 'post',
  402. data: data
  403. })
  404. }
  405. //编辑用户授权
  406. export function editImpowerHaikang(data) {
  407. return request({
  408. url: '/laboratory/haikang/user/update',
  409. method: 'post',
  410. data: data
  411. })
  412. }
  413. //新增用户授权
  414. export function retryImpowerHaikang(data) {
  415. return request({
  416. url: '/laboratory/haikang/user/retryAccredit',
  417. method: 'post',
  418. data: data
  419. })
  420. }
  421. // 删除用户授权
  422. export function delUserHaikang(id) {
  423. return request({
  424. url: '/laboratory/haikang/user/' + id,
  425. method: 'delete'
  426. })
  427. }
  428. //门禁授权日志列表
  429. export function entranceUserLogList(query) {
  430. return request({
  431. url: '/laboratory/haikang/userLog/list',
  432. method: 'get',
  433. params: query
  434. })
  435. }
  436. //门禁授权日志列表
  437. export function queryHardByTypeList(query) {
  438. return request({
  439. url: '/laboratory/hardware/queryHardByType',
  440. method: 'get',
  441. params: query
  442. })
  443. }