follow-bottom.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Vue.component('follow-bottom', {
  2. template: '<div class="plr30 ptb10">\
  3. <p class="c-f16 c-37a6ed">签到信息</p>\
  4. <div class="plr30">\
  5. <div class="ui-grid mt10">\
  6. <div class="ui-col-1">签到方式:&emsp;定位签到</div>\
  7. <div class="ui-col-1">签到时间:&emsp;<span v-html="followUpData.createTime">2019-01-01 10:10:10</span></div>\
  8. </div>\
  9. <div class="mt10">签到位置:&emsp;<span v-html="followUpData.address">福建省厦门市思明区软件园望海路</span></div>\
  10. <div class="ui-grid mt10">\
  11. <div class="ui-col-0">签到拍照:&emsp;</div>\
  12. <div class="ui-col-0"><img v-for="item in imgSrc" :src="httpRequest.getImgUrl(item)" width="50" height="50" style="margin:10px;"></div>\
  13. </div>\
  14. </div>\
  15. </div>',
  16. props: ['followupid'],
  17. data: function () {
  18. return {
  19. followUpList: [],
  20. curPage: 1,
  21. followUpData: {},
  22. imgSrc:[],
  23. }
  24. },
  25. watch: {
  26. followUpData: function (val) {
  27. this.followUpList = this.followUpData;
  28. }
  29. },
  30. mounted: function () {
  31. this.getData()
  32. },
  33. methods: {
  34. getData: function () {
  35. var vm = this
  36. fangshiAPI.findByFollowupId({ followupId: this.followupid || '1' }).then(function (res) {
  37. if (res.status == 200) {
  38. var data = res.data
  39. if (data != null) {
  40. vm.followUpData = data
  41. vm.imgSrc==data.img?data.img.split(','):''
  42. }
  43. } else {
  44. top.toastr.error(res.msg);
  45. }
  46. })
  47. }
  48. },
  49. })