|
|
@ -3,27 +3,30 @@ |
|
|
|
<div class="left"> |
|
|
|
<div class="left"> |
|
|
|
<div class="products"> |
|
|
|
<div class="products"> |
|
|
|
<img class="icon" width="50" src="@/assets/img/school.png" alt=""> |
|
|
|
<img class="icon" width="50" src="@/assets/img/school.png" alt=""> |
|
|
|
<p class="school-name">{{schoolName}}</p> |
|
|
|
<p class="school-name">{{userName}}</p> |
|
|
|
<div class="product" v-for="(item,index) in productList" :key="index"> |
|
|
|
<template v-if="productList.length"> |
|
|
|
<p class="product-name"><img src="@/assets/img/product.png" alt=""> {{item.productName}}</p> |
|
|
|
<div class="product" v-for="(item,index) in productList" :key="index"> |
|
|
|
<div class="date"> |
|
|
|
<p class="product-name"><img src="@/assets/img/product.png" alt=""> {{item.productName}}</p> |
|
|
|
<span class="name">使用期限:</span> |
|
|
|
<div class="date"> |
|
|
|
<div class="val"> |
|
|
|
<span class="name">使用期限:</span> |
|
|
|
{{item.endTime}} |
|
|
|
<div class="val"> |
|
|
|
|
|
|
|
{{item.endTime}} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<p class="surplus" v-if="item.deadline"><span class="name">剩余期限:</span><span class="num">{{item.deadline}}</span> 天</p> |
|
|
|
|
|
|
|
<p class="surplus"> |
|
|
|
|
|
|
|
<span class="name">账号数量:</span> |
|
|
|
|
|
|
|
<template v-if="item.accountNum > 1000"> |
|
|
|
|
|
|
|
<span>∞</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<span class="num">{{item.accountNum}}</span> 个 |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
<el-button class="renew" size="small" type="primary" v-if="!item.deadline">续费</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p class="surplus" v-if="item.deadline"><span class="name">剩余期限:</span><span class="num">{{item.deadline}}</span> 天</p> |
|
|
|
</template> |
|
|
|
<p class="surplus"> |
|
|
|
<p v-else class="tips">暂无数据权限,请下单购买</p> |
|
|
|
<span class="name">账号数量:</span> |
|
|
|
|
|
|
|
<template v-if="item.accountNum > 1000"> |
|
|
|
|
|
|
|
<span>∞</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<span class="num">{{item.accountNum}}</span> 个 |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
<el-button class="renew" size="small" type="primary" v-if="!item.deadline">续费</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="right"> |
|
|
@ -69,18 +72,19 @@ |
|
|
|
<el-button type="primary" size="small" @click="exportDatabase" v-auth="'/stat/list:数据库统计导出'">导出数据</el-button> |
|
|
|
<el-button type="primary" size="small" @click="exportDatabase" v-auth="'/stat/list:数据库统计导出'">导出数据</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="type-wrap"> |
|
|
|
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange"> |
|
|
|
<el-table :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="80" align="center"></el-table-column> |
|
|
|
<el-table-column type="selection" width="80" align="center"></el-table-column> |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> |
|
|
|
<el-table-column prop="categoryOne" label="数据分类" align="center"></el-table-column> |
|
|
|
<el-table-column prop="categoryName" label="数据分类" align="center"></el-table-column> |
|
|
|
<el-table-column prop="categoryTwo" label="数据库类别" align="center"></el-table-column> |
|
|
|
<el-table-column prop="secondName" label="数据库类别" align="center"></el-table-column> |
|
|
|
<el-table-column prop="download" label="下载量" align="center"></el-table-column> |
|
|
|
<el-table-column prop="downloads" label="下载量" align="center"></el-table-column> |
|
|
|
<el-table-column prop="click" label="点击量" align="center"></el-table-column> |
|
|
|
<el-table-column prop="clicks" label="点击量" align="center"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="fold" v-if="listDataAll.length > initShowLen"> |
|
|
|
<div class="fold" v-if="listDataAll.length > initShowLen"> |
|
|
|
<span :class="{active}" @click="toggleList"> |
|
|
|
<span :class="{active}" @click="toggleList"> |
|
|
|
展开更多 |
|
|
|
{{active ? '收起' : '展开更多'}} |
|
|
|
<i class="el-icon-arrow-down"></i> |
|
|
|
<i class="el-icon-arrow-down"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -165,14 +169,14 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
...mapState('user', [ |
|
|
|
...mapState('user', [ |
|
|
|
'schoolId' |
|
|
|
'schoolId', 'userName' |
|
|
|
]), |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
keyword: function(val) { |
|
|
|
keyword: function(val) { |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.searchData() |
|
|
|
this.getDatabase() |
|
|
|
},500) |
|
|
|
},500) |
|
|
|
}, |
|
|
|
}, |
|
|
|
date: function(val){ |
|
|
|
date: function(val){ |
|
|
@ -211,9 +215,6 @@ export default { |
|
|
|
n.endTime = util.formatDate('yyyy-MM-dd',new Date(n.endTime)) |
|
|
|
n.endTime = util.formatDate('yyyy-MM-dd',new Date(n.endTime)) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.productList = list |
|
|
|
this.productList = list |
|
|
|
if(list.length){ |
|
|
|
|
|
|
|
this.schoolName = list[0].schoolName |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
// 查询平均日访客量和累计下载 |
|
|
|
// 查询平均日访客量和累计下载 |
|
|
|
this.$get(`${this.api.queryAccumulate}?schoolId=${this.schoolId}`).then(res => { |
|
|
|
this.$get(`${this.api.queryAccumulate}?schoolId=${this.schoolId}`).then(res => { |
|
|
@ -356,23 +357,14 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 查询按数据库统计使用概况 |
|
|
|
// 查询按数据库统计使用概况 |
|
|
|
getDatabase(){ |
|
|
|
getDatabase(){ |
|
|
|
this.$get(`${this.api.queryDatabaseInfo}?schoolId=${this.schoolId}&startTime=${this.startTime}&endTime=${this.endTime}`).then(res => { |
|
|
|
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 = JSON.parse(res.databaseInfo) |
|
|
|
// 只展示前十条,页面上点展开更多去展示全部 |
|
|
|
let list = res.data |
|
|
|
|
|
|
|
// 只展示前5条,页面上点展开更多去展示全部 |
|
|
|
this.listData = list.slice(0,this.initShowLen) |
|
|
|
this.listData = list.slice(0,this.initShowLen) |
|
|
|
this.listDataAll = list // 把全部数据先存起来,点展开的时候直接取这个列表 |
|
|
|
this.listDataAll = list // 把全部数据先存起来,点展开的时候直接取这个列表 |
|
|
|
}).catch(res => {}) |
|
|
|
}).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 }) { |
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
if (!columnIndex || columnIndex == 1) { |
|
|
|
if (!columnIndex || columnIndex == 1) { |
|
|
@ -484,6 +476,10 @@ export default { |
|
|
|
font-weight: 600; |
|
|
|
font-weight: 600; |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.tips { |
|
|
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
|
|
color: #666; |
|
|
|
|
|
|
|
} |
|
|
|
.product{ |
|
|
|
.product{ |
|
|
|
padding: 12px; |
|
|
|
padding: 12px; |
|
|
|
margin-bottom: 6px; |
|
|
|
margin-bottom: 6px; |
|
|
@ -533,6 +529,10 @@ export default { |
|
|
|
.right{ |
|
|
|
.right{ |
|
|
|
max-width: calc(100% - 250px); |
|
|
|
max-width: calc(100% - 250px); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.type-wrap { |
|
|
|
|
|
|
|
max-height: 945px; |
|
|
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
} |
|
|
|
.page{ |
|
|
|
.page{ |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
margin-bottom: 20px; |
|
|
|
margin-bottom: 20px; |
|
|
|