siteListAlarming.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <list-test :bindData="siteListData" :bindUrl="linkUrl" :bindIcon="linkIcon" :bindNum="num" :bindType="type"
  3. :bindDetailUrl="detailUrl">
  4. </list-test>
  5. </template>
  6. <script>
  7. import json from '../../data/json.js';
  8. export default {
  9. data() {
  10. return {
  11. type: 1,
  12. linkUrl: '/pages/alarmingList/alarmingList',
  13. linkIcon: '../../static/site-icon-alarm.png',
  14. siteListData: [],
  15. num: ' 共3个未处理告警',
  16. detailUrl: '/pages/siteDetail/siteDetail'
  17. };
  18. },
  19. onPullDownRefresh() {
  20. console.log('refresh');
  21. setTimeout(function() {
  22. uni.stopPullDownRefresh();
  23. }, 1000);
  24. },
  25. computed: {
  26. },
  27. mounted() {
  28. },
  29. onLoad() {
  30. this.getSiteList()
  31. },
  32. methods: {
  33. async getSiteList() {
  34. const res= await this.$myRequest({
  35. url:'IntegratedAlarm/getSiteList',
  36. // data:{
  37. // "companyCode": "13"
  38. // }
  39. })
  40. console.log(res.data.data)
  41. this.siteListData=res.data.data
  42. }
  43. }
  44. }
  45. </script>
  46. <style>
  47. </style>