index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
  4. <el-form-item label="报表名称">
  5. <el-input
  6. v-model="queryParams.name"
  7. placeholder="报表名称"
  8. clearable
  9. style="width: 160px;"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item>
  14. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  15. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  16. </el-form-item>
  17. </el-form>
  18. <div class="box-class clearfix">
  19. <div
  20. class="item-class clearfix"
  21. @click="pageLink(item.url)"
  22. v-hasPermi="[item.hasPermi]"
  23. v-for="item in itemList" :key="item.id">
  24. <div class="span-img-class"></div>
  25. <div class="span-text-class">{{ item.name }}</div>
  26. </div>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import { pageList } from '@/api/userMr/userMr'
  32. export default {
  33. name: "agreement",
  34. dicts: ['agreement_type'],
  35. data() {
  36. return {
  37. // 遮罩层
  38. loading: true,
  39. // 显示搜索条件
  40. showSearch: true,
  41. // 查询参数
  42. queryParams: {
  43. pageNum: 1,
  44. pageSize: 10,
  45. type: undefined
  46. },
  47. itemList: [
  48. // {id: 1, name: '总览统计', url: ''},
  49. // {id: 2, name: '渠道统计', url: ''},
  50. // {id: 3, name: '场次销售分析', hasPermi: 'session:session:list', url: 'statisticalReport/session'},
  51. {id: 4, name: '场次销售统计', hasPermi: 'statisticalReport:sessionInventory:list', url: 'statisticalReport/sessionInventory'},
  52. // {id: 5, name: '座位类型销售统计', hasPermi: 'statisticalReport:seatInventory:list', url: 'statisticalReport/seatInventory'},
  53. ]
  54. };
  55. },
  56. created() {
  57. // this.getList();
  58. },
  59. methods: {
  60. /** 查询列表 */
  61. getList() {
  62. this.loading = true;
  63. pageList(this.addDateRange(this.queryParams, this.dateRange))
  64. .then(response => {
  65. this.dataList = response.data.rows;
  66. this.total = response.data.total;
  67. this.loading = false;
  68. }
  69. );
  70. },
  71. /** 搜索按钮操作 */
  72. handleQuery() {
  73. this.queryParams.pageNum = 1;
  74. this.getList();
  75. },
  76. /** 重置按钮操作 */
  77. resetQuery() {
  78. this.$set(this.queryParams, 'name', '');
  79. this.handleQuery();
  80. },
  81. pageLink(url) {
  82. if(url){
  83. this.$router.push(url);
  84. }
  85. }
  86. }
  87. };
  88. </script>
  89. <style lang="scss" scoped>
  90. .box-class{
  91. padding: 20px 20px;
  92. .item-class:hover{
  93. box-shadow: 0 2px 4px rgba(93, 37, 37, 0.12), 0 0 6px rgba(0, 0, 0, .04);
  94. }
  95. .item-class{
  96. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  97. padding: 20px 40px;
  98. border-radius: 6px;
  99. float: left;
  100. cursor: pointer;
  101. margin-right: 60px;
  102. .span-img-class{
  103. background: url("../../assets/images/statistics-icon.png") no-repeat;
  104. display: inline-block;
  105. width: 40px;
  106. height: 40px;
  107. float: left;
  108. background-size: 100% 100%;
  109. }
  110. .span-text-class{
  111. display: inline-block;
  112. height: 40px;
  113. float: left;
  114. margin-left: 20px;
  115. line-height: 40px;
  116. }
  117. }
  118. }
  119. </style>