follow-bottom.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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"></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="getImgUrl(item)" @click="toImgUrl(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. getImgUrl:function(str) {
  49. return httpRequest.getImgUrl(str)
  50. },
  51. toImgUrl:function(str){
  52. return window.location.href=str
  53. },
  54. }
  55. })