siteListAlarming.vue 1.2 KB

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