subject.js 11 KB

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