production-api.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. import http from './interface'
  2. /**
  3. * 将业务所有接口统一起来便于维护
  4. * 如果项目很大可以将 url 独立成文件,接口分成不同的模块
  5. *
  6. */
  7. // 单独导出(测试接口) import {test} from '@/common/vmeitime-http/'
  8. export const test = (data) => {
  9. // http.config.baseUrl = "http://localhost:8080/api/"
  10. //设置请求前拦截器
  11. http.interceptor.request = (config) => {
  12. config.header = {
  13. // "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  14. }
  15. }
  16. //设置请求结束后拦截器
  17. http.interceptor.response = (response) => {
  18. // console.log('个性化response....')
  19. //判断返回状态 执行相应操作
  20. return response;
  21. }
  22. return http.request({
  23. baseUrl: 'https://unidemo.dcloud.net.cn/',
  24. url: 'ajax/echo/text?name=uni-app',
  25. dataType: 'text',
  26. data,
  27. })
  28. }
  29. // 默认全部导出 import api from '@/common/vmeitime-http/'
  30. // export default {
  31. // test,
  32. // }
  33. // //方式一
  34. // sendRequest1(){
  35. // this.$api.getNavs({
  36. // noncestr: Date.now(),
  37. // user:123456,
  38. // }).then((res)=>{
  39. // this.res = '请求结果 : ' + JSON.stringify(res);
  40. // console.log('request success', res)
  41. // }).catch((err)=>{
  42. // console.log('request fail', err);
  43. // })
  44. // },
  45. // // 方式二
  46. // async sendRequest2() {
  47. // let res = await this.$api.getBlocksList();
  48. // this.res = '请求结果 : ' + JSON.stringify(res);
  49. // }
  50. // 生产数据
  51. // 列表页数据
  52. // // 井下人数
  53. // export const personnel_mineall_people = (data) => {
  54. // return http.request({
  55. // method:"POST",
  56. // url: '/personnel/mineall/people',
  57. // data,
  58. // })
  59. // }
  60. // // 安全监测今日总量
  61. // export const jt_safety_total_count = (data) => {
  62. // return http.request({
  63. // method:"POST",
  64. // url: '/jt/safety/total/count',
  65. // data,
  66. // })
  67. // }
  68. // // 当日生产
  69. // export const coalmine_output = (data) => {
  70. // return http.request({
  71. // url: '/coalmine/output',
  72. // data,
  73. // })
  74. // }
  75. // 人员定位
  76. // 当前人员统计
  77. export const personnel_people_now = (data) => {
  78. return http.request({
  79. method:"POST",
  80. url: '/personnel/people/now',
  81. data,
  82. })
  83. }
  84. // 职能科室人数统计
  85. export const personnel_office_total = (data) => {
  86. return http.request({
  87. method:"POST",
  88. url: '/personnel/office/total',
  89. data,
  90. })
  91. }
  92. // 基层区队人数统计
  93. export const personnel_basic_total = (data) => {
  94. return http.request({
  95. method:"POST",
  96. url: '/personnel/basic/total',
  97. data,
  98. })
  99. }
  100. // 今日各部门人数统计
  101. export const personnel_depart_today = (data) => {
  102. return http.request({
  103. method:"POST",
  104. url: '/personnel/depart/today',
  105. data,
  106. })
  107. }
  108. // 下井人员查询
  109. export const personnel_people_search = (data) => {
  110. return http.request({
  111. method:"POST",
  112. url: '/personnel/people/search',
  113. data,
  114. })
  115. }
  116. // 部门下井人员列表
  117. export const personnel_depart_people = (data) => {
  118. return http.request({
  119. method:"POST",
  120. url: '/personnel/depart/people',
  121. data,
  122. })
  123. }
  124. // 人员定位统计
  125. // 下井月份列表
  126. export const personnel_downwell_monthlist_once = (data) => {
  127. return http.request({
  128. method:"POST",
  129. url: '/personnel/downwell/monthlist/once',
  130. data,
  131. })
  132. }
  133. // 当月下井信息
  134. export const personnel_downwell_month_once = (data) => {
  135. return http.request({
  136. method:"POST",
  137. url: '/personnel/downwell/month/once',
  138. data,
  139. })
  140. }
  141. // 当月下井记录
  142. export const personnel_downwell_month_info = (data) => {
  143. return http.request({
  144. method:"POST",
  145. url: '/personnel/downwell/month/info',
  146. data,
  147. })
  148. }
  149. // 人员轨迹
  150. export const personnel_downwell_once_info = (data) => {
  151. return http.request({
  152. method:"POST",
  153. url: '/personnel/downwell/once/info',
  154. data,
  155. })
  156. }
  157. // 定位信息
  158. export const personnel_people_info = (data) => {
  159. return http.request({
  160. method:"POST",
  161. url: '/personnel/people/info',
  162. data,
  163. })
  164. }
  165. // 安全监测
  166. // 模拟量统计
  167. export const jt_safety_simulation_total = (data) => {
  168. return http.request({
  169. method:"POST",
  170. url: '/jt/safety/simulation/total',
  171. data,
  172. })
  173. }
  174. // 开关量统计
  175. export const jt_safety_sluice_total = (data) => {
  176. return http.request({
  177. method:"POST",
  178. url: '/jt/safety/sluice/total',
  179. data,
  180. })
  181. }
  182. // 开关量模拟量查询
  183. export const jt_safety_info_search = (data) => {
  184. return http.request({
  185. method:"POST",
  186. url: '/jt/safety/info/search',
  187. data,
  188. })
  189. }
  190. // 监测类型详情
  191. export const jt_safety_info_total = (data) => {
  192. return http.request({
  193. method:"POST",
  194. url: '/jt/safety/info/total',
  195. data,
  196. })
  197. }
  198. // 监测详情
  199. export const jt_safety_info_detail = (data) => {
  200. return http.request({
  201. method:"POST",
  202. url: '/jt/safety/info/detail',
  203. data,
  204. })
  205. }
  206. // 安全监测报警列表
  207. export const jt_safety_Safety_bj_info = (data) => {
  208. return http.request({
  209. method:"POST",
  210. url: '/jt/safety/Safety/bj/info',
  211. data,
  212. })
  213. }
  214. // 通风管理
  215. export const jt_safety_aerator_list = (data) => {
  216. return http.request({
  217. method:"POST",
  218. url: '/jt/safety/aerator/list',
  219. data,
  220. })
  221. }
  222. // 井口计量
  223. // 今日产量
  224. export const coalmine_days_output = (data) => {
  225. return http.request({
  226. url: '/coalmine/days/output',
  227. data,
  228. })
  229. }
  230. // 工作面列表
  231. export const coalmine_working_face = (data) => {
  232. return http.request({
  233. url: '/coalmine/working/face',
  234. data,
  235. })
  236. }
  237. // 工作面详情
  238. export const coalmine_working_face_info = (data) => {
  239. return http.request({
  240. url: '/coalmine/working/face/info',
  241. data,
  242. })
  243. }
  244. // 产量趋势
  245. export const coalmine_one_trend = (data) => {
  246. return http.request({
  247. url: '/coalmine/one/trend',
  248. data,
  249. })
  250. }