index.vue 3.0 KB

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