subject.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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 laboratorySubjectEditSort(data) {
  58. return request({
  59. url: '/laboratory/subject/editSort',
  60. method: 'post',
  61. data: data
  62. })
  63. }
  64. // 查询实验室-安全信息牌
  65. export function getClassifyBySubId(data) {
  66. return request({
  67. url: '/laboratory/XxpClassify/getClassifyBySubId/',
  68. method: 'get',
  69. data: data
  70. })
  71. }
  72. // 修改实验室(包含新危险源)
  73. export function updateSubjectEditJoinHazard(data) {
  74. return request({
  75. url: '/laboratory/subject/editJoinHazard',
  76. method: 'put',
  77. data: data
  78. })
  79. }
  80. // 删除实验室
  81. export function delSubject(id) {
  82. return request({
  83. url: '/laboratory/subject/' + id,
  84. method: 'delete'
  85. })
  86. }
  87. //获取指定用户权限下的实验室列表/subject/manger/my/list
  88. export function getSubjectList(id) {
  89. return request({
  90. url: '/laboratory/subject/count/'+id,
  91. method: 'get',
  92. })
  93. }
  94. //获取当前用户权限下的实验室列表/subject/manger/my/list
  95. export function getMySubjectList(data) {
  96. return request({
  97. url: '/laboratory/subject/manger/my/list',
  98. method: 'get'
  99. })
  100. }
  101. //根据院系查询未绑定的实验室
  102. export function getNoAdminSubjectList(data) {
  103. return request({
  104. url: '/laboratory/subject/list/noadmin',
  105. method: 'get',
  106. params: data
  107. })
  108. }
  109. //根据院系查询实验室
  110. export function getNoAdminSubjectListNopage(data) {
  111. return request({
  112. url: '/laboratory/subject/list/nopage',
  113. method: 'get',
  114. params: data
  115. })
  116. }
  117. //删除实验室
  118. export function removeSubject(id) {
  119. return request({
  120. url: '/laboratory/subject/'+id,
  121. method: 'delete'
  122. })
  123. }
  124. //根据ID查询摄像头列表
  125. export function channels(data) {
  126. return request({
  127. url: '/algorithm/api/device/query/devices/channels',
  128. method: 'get',
  129. params: data
  130. })
  131. }
  132. //根据ID查询摄像头地址
  133. export function startUrl(data) {
  134. return request({
  135. url: '/algorithm/api/play/startList',
  136. type:'video',
  137. method: 'get',
  138. params: data
  139. })
  140. }
  141. //播放文字接口
  142. export function mangerVoice(data,id) {
  143. return request({
  144. url: '/laboratory/subject/manger/voice/'+id,
  145. method: 'post',
  146. params: data
  147. })
  148. }
  149. //是否禁用实验室
  150. export function subjectType(id,type) {
  151. return request({
  152. url: '/laboratory/subject/'+id+'/'+type,
  153. method: 'Delete',
  154. })
  155. }
  156. //获取物联设备配置列表
  157. export function listBySubjectId(data) {
  158. return request({
  159. url: '/laboratory/hardware/listBySubjectId',
  160. method: 'get',
  161. params: data
  162. })
  163. }
  164. //添加传感器
  165. export function addSensor(data) {
  166. return request({
  167. url: '/laboratory/sensor/',
  168. method: 'post',
  169. data: data
  170. })
  171. }
  172. //编辑传感器
  173. export function putSensor(data) {
  174. return request({
  175. url: '/laboratory/sensor/',
  176. method: 'put',
  177. data: data
  178. })
  179. }
  180. //删除传感器
  181. export function delSensor(id) {
  182. return request({
  183. url: '/laboratory/sensor/'+id,
  184. method: 'Delete',
  185. })
  186. }
  187. //添加一体机
  188. export function addHardware(data) {
  189. return request({
  190. url: '/laboratory/hardware/',
  191. method: 'post',
  192. data: data
  193. })
  194. }
  195. //编辑一体机
  196. export function putHardware(data) {
  197. return request({
  198. url: '/laboratory/hardware/',
  199. method: 'put',
  200. data: data
  201. })
  202. }
  203. //删除一体机
  204. export function delHardware(id) {
  205. return request({
  206. url: '/laboratory/hardware/'+id,
  207. method: 'Delete',
  208. })
  209. }
  210. // 查询实验室详情
  211. export function subjectInfo(id,type) {
  212. return request({
  213. url: '/laboratory/subject/manger/query/'+id+'/'+type,
  214. method: 'get',
  215. })
  216. }
  217. // 查询实验室排风扇人工还是预案
  218. export function subjectTriggerModes(id) {
  219. return request({
  220. url: '/laboratory/control/newMsg/'+id,
  221. method: 'get',
  222. })
  223. }
  224. //查询实验室门禁
  225. export function getDetalis(query) {
  226. return request({
  227. url: '/algorithm/smartlock/lockinfo/detalis',
  228. method: 'get',
  229. params: query
  230. })
  231. }
  232. //根据人员ID查询人员列表
  233. export function getSafeUserList(query) {
  234. return request({
  235. url: '/system/user/getSafeUserList',
  236. method: 'get',
  237. params: query
  238. })
  239. }
  240. // 修改实验室关联信息
  241. export function editJoinHazard(data) {
  242. return request({
  243. url: '/laboratory/subject/editJoinHazard',
  244. method: 'put',
  245. data: data
  246. })
  247. }
  248. //门锁列表接口
  249. export function subjectRelationList(query) {
  250. return request({
  251. url: '/algorithm/smartlock/subjectRelation/listSub',
  252. method: 'get',
  253. params: query
  254. })
  255. }
  256. //门锁选择列表数据
  257. export function listLockRoom(query) {
  258. return request({
  259. url: '/algorithm/smartlock/subjectRelation/listLockRoom',
  260. method: 'get',
  261. params: query
  262. })
  263. }
  264. // 新增智能门禁
  265. export function subjectRelation(data) {
  266. return request({
  267. url: '/algorithm/smartlock/subjectRelation/addSub',
  268. method: 'post',
  269. data: data
  270. })
  271. }
  272. // 删除智能门禁
  273. export function delSubjectRelation(id) {
  274. return request({
  275. url: '/algorithm/smartlock/subjectRelation/removeSub/'+id,
  276. method: 'Delete',
  277. })
  278. }
  279. // 新增电子信息牌
  280. export function subjectSignAdd(data) {
  281. return request({
  282. url: '/laboratory/XxpCardInfo/addInfo',
  283. method: 'post',
  284. data: data
  285. })
  286. }
  287. // 编辑电子信息牌
  288. export function subjectSignEdit(data) {
  289. return request({
  290. url: '/laboratory/XxpCardInfo/edit',
  291. method: 'post',
  292. data: data
  293. })
  294. }
  295. // 删除电子信息牌
  296. export function subjectSignDelete(id) {
  297. return request({
  298. url: '/laboratory/XxpCardInfo/del/'+id,
  299. method: 'post',
  300. })
  301. }
  302. //门禁授权列表
  303. export function openDoorApplyList(query) {
  304. return request({
  305. url: '/algorithm/smartlock/openDoorApply/list',
  306. method: 'get',
  307. params: query
  308. })
  309. }
  310. //门禁授权申请列表
  311. export function applyList(query) {
  312. return request({
  313. url: '/algorithm/smartlock/openDoorApply/applyList',
  314. method: 'get',
  315. params: query
  316. })
  317. }
  318. //门禁授权申请列表
  319. export function postApproval(data) {
  320. return request({
  321. url: '/algorithm/smartlock/approval',
  322. method: 'post',
  323. data: data
  324. })
  325. }
  326. //提交门禁申请
  327. export function openDoorApply(data) {
  328. return request({
  329. url: '/algorithm/smartlock/openDoorApply',
  330. method: 'post',
  331. data: data
  332. })
  333. }
  334. //申请门禁详情
  335. export function getOpenDoorApply(id) {
  336. return request({
  337. url: '/algorithm/smartlock/openDoorApply/'+id,
  338. method: 'get',
  339. })
  340. }
  341. //获取实验室详情位置灯数据
  342. export function subjectVo(id) {
  343. return request({
  344. url: '/laboratory/subject/vo/'+id,
  345. method: 'get',
  346. })
  347. }
  348. /* 一键灭火----------------- */
  349. //智能灭火设备列表
  350. export function firedeviceList(query) {
  351. return request({
  352. url: '/algorithm/firedevice/list',
  353. method: 'get',
  354. params: query
  355. })
  356. }
  357. //智能灭火设备-新增
  358. export function firedeviceAdd(data) {
  359. return request({
  360. url: '/algorithm/firedevice',
  361. method: 'post',
  362. data: data
  363. })
  364. }
  365. //智能灭火设备-编辑
  366. export function firedeviceEdit(data) {
  367. return request({
  368. url: '/algorithm/firedevice',
  369. method: 'put',
  370. data: data
  371. })
  372. }
  373. //智能灭火设备-删除
  374. export function firedeviceDle(id) {
  375. return request({
  376. url: '/algorithm/firedevice/' + id,
  377. method: 'delete'
  378. })
  379. }
  380. /* 预案执行记录 */
  381. //预案执行记录列表
  382. export function riskExeRecordList(query) {
  383. return request({
  384. url: '/laboratory/plan/group/riskExeRecordList',
  385. method: 'get',
  386. params: query
  387. })
  388. }
  389. //预案执行记录-详情
  390. export function riskPlanAbnormalDesc(query) {
  391. return request({
  392. url: '/laboratory/plan/desc/riskPlanAbnormalDesc?groupId='+query,
  393. method: 'get',
  394. })
  395. }
  396. //风险轨迹
  397. export function abnormalLogOrderByList(query) {
  398. return request({
  399. url: '/laboratory/plan/log/abnormalLogOrderByList?groupId='+query,
  400. method: 'get',
  401. })
  402. }
  403. //消息推送记录
  404. export function viewWarnMessage(query) {
  405. return request({
  406. url: '/laboratory/bigview/'+query+'/warn/getRiskLog',
  407. method: 'get',
  408. })
  409. }
  410. /* 智能门禁----------------- */
  411. //查询门禁授权列表
  412. export function getHaikangList(data) {
  413. return request({
  414. url: '/laboratory/haikang/user/subList?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
  415. method: 'post',
  416. data: data,
  417. })
  418. }
  419. //查询实验室已授权列表
  420. export function getHaikangUserList(data) {
  421. return request({
  422. url: '/laboratory/haikang/user/userList?pageNum='+data.pageNum+'&pageSize='+data.pageSize+'&startTime='+data.startTime+'&endTime='+data.endTime+'&searchValue='+data.searchValue+'&userType='+data.userType,
  423. method: 'post',
  424. data: data
  425. })
  426. }
  427. //查询门禁授权类型
  428. export function getHaikangQueryTypes(data) {
  429. return request({
  430. url: '/laboratory/haikang/user/queryTypes',
  431. method: 'post',
  432. data: data
  433. })
  434. }
  435. //新增用户授权
  436. export function AddImpowerHaikang(data) {
  437. return request({
  438. url: '/laboratory/haikang/user/add',
  439. method: 'post',
  440. data: data
  441. })
  442. }
  443. //编辑用户授权
  444. export function editImpowerHaikang(data) {
  445. return request({
  446. url: '/laboratory/haikang/user/update',
  447. method: 'post',
  448. data: data
  449. })
  450. }
  451. //新增用户授权
  452. export function retryImpowerHaikang(data) {
  453. return request({
  454. url: '/laboratory/haikang/user/retryAccredit',
  455. method: 'post',
  456. data: data
  457. })
  458. }
  459. // 删除用户授权
  460. export function delUserHaikang(id) {
  461. return request({
  462. url: '/laboratory/haikang/user/' + id,
  463. method: 'delete'
  464. })
  465. }
  466. //门禁授权日志列表
  467. export function entranceUserLogList(query) {
  468. return request({
  469. url: '/laboratory/haikang/userLog/list',
  470. method: 'get',
  471. params: query
  472. })
  473. }
  474. //门禁授权日志列表
  475. export function queryHardByTypeList(query) {
  476. return request({
  477. url: '/laboratory/hardware/queryHardByType',
  478. method: 'get',
  479. params: query
  480. })
  481. }
  482. //电子信息牌------------------------------------------------------------------------------
  483. //查询门禁授权类型
  484. export function getSignTypeList(query) {
  485. return request({
  486. url: '/laboratory/XxpUserAuth/authTypelist',
  487. method: 'get',
  488. params: query
  489. })
  490. }
  491. //新增电子信息牌用户授权
  492. export function getSignAuthAdd(data) {
  493. return request({
  494. url: '/laboratory/XxpUserAuth/addAuth',
  495. method: 'post',
  496. data: data
  497. })
  498. }
  499. //查询门禁授权列表
  500. export function getSignAuthList(query) {
  501. return request({
  502. url: '/laboratory/XxpUserAuth/list',
  503. method: 'get',
  504. params: query
  505. })
  506. }
  507. //门禁授权删除
  508. export function getSignAuthDelete(id) {
  509. return request({
  510. url: '/laboratory/XxpUserAuth/' + id,
  511. method: 'delete'
  512. })
  513. }
  514. //实验室配置声光报警列表
  515. export function laboratoryWarningNoticeLogList(data) {
  516. return request({
  517. url: '/laboratory/warningNoticeLog/list',
  518. method: 'post',
  519. data: data
  520. })
  521. }