siteListAlarming.vue 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. showLoading:true
  37. })
  38. console.log(res.data.data)
  39. this.siteListData=res.data.data
  40. }
  41. }
  42. }
  43. </script>
  44. <style>
  45. </style>