diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index 05fb22c..49d19ad 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -11,7 +11,7 @@
热门下载:
@@ -317,7 +317,7 @@ export default { // 获取热门下载数据 getHot(){ this.$get(this.api.queryDatabaseInfo).then(res => { - let list = JSON.parse(res.databaseInfo) + let list = res.data list.map(n => n.download) // 根据下载量排序 list.sort((a,b) => { diff --git a/src/pages/stat/list/index.vue b/src/pages/stat/list/index.vue index 739eb3c..7e7b206 100644 --- a/src/pages/stat/list/index.vue +++ b/src/pages/stat/list/index.vue @@ -3,27 +3,30 @@
-

{{schoolName}}

-
-

{{item.productName}}

-
- 使用期限: -
- {{item.endTime}} +

{{userName}}

+ +

暂无数据权限,请下单购买

@@ -69,18 +72,19 @@ 导出数据
- - - - - - - - - +
+ + + + + + + + +
- 展开更多 + {{active ? '收起' : '展开更多'}}
@@ -165,14 +169,14 @@ export default { }, computed: { ...mapState('user', [ - 'schoolId' + 'schoolId', 'userName' ]), }, watch: { keyword: function(val) { clearTimeout(this.searchTimer) this.searchTimer = setTimeout(() => { - this.searchData() + this.getDatabase() },500) }, date: function(val){ @@ -211,9 +215,6 @@ export default { n.endTime = util.formatDate('yyyy-MM-dd',new Date(n.endTime)) }) this.productList = list - if(list.length){ - this.schoolName = list[0].schoolName - } }).catch(res => {}) // 查询平均日访客量和累计下载 this.$get(`${this.api.queryAccumulate}?schoolId=${this.schoolId}`).then(res => { @@ -356,23 +357,14 @@ export default { }, // 查询按数据库统计使用概况 getDatabase(){ - this.$get(`${this.api.queryDatabaseInfo}?schoolId=${this.schoolId}&startTime=${this.startTime}&endTime=${this.endTime}`).then(res => { - let list = JSON.parse(res.databaseInfo) - // 只展示前十条,页面上点展开更多去展示全部 + this.$get(`${this.api.queryDatabaseInfo}?schoolId=${this.schoolId}&startTime=${this.startTime}&endTime=${this.endTime}&keyWord=${this.keyword}&pageNum=1&pageSize=5`).then(res => { + // let list = JSON.parse(res.databaseInfo) + let list = res.data + // 只展示前5条,页面上点展开更多去展示全部 this.listData = list.slice(0,this.initShowLen) this.listDataAll = list // 把全部数据先存起来,点展开的时候直接取这个列表 }).catch(res => {}) }, - // 模糊查询,因为后端的数据存在redis了,所以无法做模糊查询,只能在前端实现 - searchData(){ - let list = this.listDataAll - let result = [] - list.map(n => { - (n.categoryOne.includes(this.keyword) || n.categoryTwo.includes(this.keyword)) && result.push(n) - }) - this.listData = this.active ? result : result.slice(0,this.initShowLen) - this.listDataKeyword = result - }, // 表格合并 objectSpanMethod({ row, column, rowIndex, columnIndex }) { if (!columnIndex || columnIndex == 1) { @@ -484,6 +476,10 @@ export default { font-weight: 600; color: #333; } + .tips { + font-size: 12px; + color: #666; + } .product{ padding: 12px; margin-bottom: 6px; @@ -533,6 +529,10 @@ export default { .right{ max-width: calc(100% - 250px); } + .type-wrap { + max-height: 945px; + overflow: auto; + } .page{ position: relative; margin-bottom: 20px;