safety_monitoring.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view>
  3. <!-- navbar -->
  4. <p-safety-monitoring-navbar :mine="mine"></p-safety-monitoring-navbar>
  5. 678
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. mine:"",
  13. active:1,
  14. // 模拟量
  15. // 监测统计
  16. simulation:[],
  17. simulationList:[],
  18. // 开关量
  19. sluice:[],
  20. sluiceList:[],
  21. };
  22. },
  23. onLoad(option) {
  24. this.mine = option.mine
  25. // 模拟量统计
  26. this.getSimulation()
  27. // 开关量统计
  28. this.getSluice()
  29. },
  30. methods:{
  31. click_item(item){
  32. this.active = item
  33. },
  34. // 模拟量统计
  35. getSimulation(){
  36. uni.showLoading()
  37. this.$p_api.jt_safety_simulation_total({
  38. mine:this.mine,
  39. mine_code:this.mine
  40. }).then((res)=>{
  41. uni.hideLoading()
  42. // console.log(res)
  43. this.simulation = res.data.content.total
  44. this.simulationList = res.data.content.data
  45. })
  46. },
  47. // 开关量统计
  48. getSluice(){
  49. uni.showLoading()
  50. this.$p_api.jt_safety_sluice_total({
  51. mine:this.mine,
  52. mine_code:this.mine
  53. }).then((res)=>{
  54. uni.hideLoading()
  55. // console.log(res.data.content)
  56. this.sluice = res.data.content.total
  57. this.sluiceList = res.data.content.data
  58. })
  59. },
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. </style>