follow-bottom.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. Vue.component('follow-bottom', {
  2. template: '<div class="plr30 ptb10">\
  3. <p class="c-f16 c-37a6ed">签到信息&nbsp;(目前仅支持APP/pad签到)</p>\
  4. <div class="plr30">\
  5. <div class="ui-grid mt10">\
  6. <div v-if="followUpData.type==1" class="ui-col-1">签到方式:&emsp;定位签到</div>\
  7. <div v-if="followUpData.type==2" class="ui-col-1">签到方式:&emsp;拍照签到</div>\
  8. <div v-if="followUpData.type==3" class="ui-col-1">签到方式:&emsp;门牌签到</div>\
  9. <div class="ui-col-1">签到时间:&emsp;<span v-html="followUpData.createTime"></span></div>\
  10. </div>\
  11. <div class="mt10">签到位置:&emsp;<span v-html="followUpData.address"></span></div>\
  12. <div class="ui-grid mt10">\
  13. <div class="ui-col-0">签到拍照:&emsp;</div>\
  14. <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>\
  15. </div>\
  16. </div>\
  17. </div>',
  18. props: ['followupid'],
  19. data: function () {
  20. return {
  21. followUpList: [],
  22. curPage: 1,
  23. followUpData: {},
  24. imgSrc:[],
  25. }
  26. },
  27. watch: {
  28. followUpData: function (val) {
  29. this.followUpList = this.followUpData;
  30. }
  31. },
  32. mounted: function () {
  33. this.getData()
  34. },
  35. methods: {
  36. getData: function () {
  37. var vm = this
  38. fangshiAPI.findByFollowupId({ followupId: this.followupid || '1' }).then(function (res) {
  39. if (res.status == 200) {
  40. var data = res.data
  41. if (data != null) {
  42. vm.followUpData = data
  43. vm.imgSrc=data.img?data.img.split(','):''
  44. }
  45. } else {
  46. top.toastr.error(res.msg);
  47. }
  48. })
  49. },
  50. getImgUrl:function(str) {
  51. return httpRequest.getImgUrl(str)
  52. },
  53. toImgUrl:function(str){
  54. return window.location.href=str
  55. },
  56. }
  57. })