lj-report-bottom-link.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <div class="report-bottom">
  3. <div><i class="iconfont icon-ic_notifications_active" style="font-size: 14px; padding-right: 5px;" />您还可以查看其他报表:
  4. </div>
  5. <template v-for="item in linkList">
  6. <div class="report-bottom-link" @click="goto(item.winName)" v-if="userFunids.indexOf(item.funcid) > -1">
  7. {{item.name}}</div>
  8. </template>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'LjReportBottomLink',
  14. props: {
  15. linkList: {
  16. type: Array,
  17. default: function () {
  18. return []
  19. }
  20. },
  21. beforeDate: {
  22. type: String,
  23. default: ""
  24. },
  25. afterDate: {
  26. type: String,
  27. default: ""
  28. },
  29. },
  30. data() {
  31. return {
  32. userFunids: [],
  33. }
  34. },
  35. created() {
  36. this.userFunids = $lj.getStorage('user').rsltFunids;
  37. },
  38. methods: {
  39. goto(winName) {
  40. if (winName) {
  41. var mainObject = {};
  42. if (this.beforeDate === "" && this.afterDate === "") {
  43. mainObject = {
  44. openType: 0,
  45. }
  46. } else {
  47. mainObject = {
  48. openType: 1,
  49. beginDate: this.beforeDate,
  50. afterDate: this.afterDate
  51. }
  52. }
  53. $lj.openWin(winName, {
  54. mainObject: mainObject
  55. }, false, true);
  56. } else {
  57. alert("未定义窗口");
  58. }
  59. }
  60. }
  61. }
  62. </script>
  63. <style>
  64. .report-bottom {
  65. background-color: rgb(246, 246, 246);
  66. padding: 10px 15px;
  67. margin: 20px 10px 0 10px;
  68. font-size: 14px;
  69. border-radius: 15px;
  70. color: #666
  71. }
  72. .report-bottom div {
  73. padding: 4px 0 4px 0
  74. }
  75. .report-bottom-link {
  76. color: #6495ed;
  77. margin-left: 18px;
  78. }
  79. </style>