统计等bug修复

dev
Jo 3 years ago
parent 9f404f0a3d
commit dfa2603ef9
  1. 8
      src/layouts/header/index.vue
  2. 2
      src/layouts/navbar/index.vue
  3. 2
      src/pages/account/login/index.vue
  4. 18
      src/pages/data/list/index.vue
  5. 100
      src/pages/stat/list/index.vue
  6. 20
      src/pages/user/list/index.vue

@ -5,7 +5,7 @@
</a>
<div class="inner">
<div style="height: 64px;"></div>
<navbar ref="nav"></navbar>
<navbar ref="nav" @hideSetting="hideSetting"></navbar>
<div class="action" v-if="token">
<img v-if="showSetting" class="icon m-r-20" src="../../assets/img/setting.png" alt="" @click="toManager">
<el-dropdown class="user-wrap" @command="userCommand">
@ -119,9 +119,6 @@ export default {
userName && this.setInfo({
userName
})
} else {
// 3/data/list
if (this.routes.length && !this.routes.find(e => e.name !== '/data/list')) this.showSetting = false
}
// ,
setTimeout(() => {
@ -145,6 +142,9 @@ export default {
})
}).catch(err => { })
},
hideSetting() {
this.showSetting = false
},
toIndex() {
this.$route.path === '/index/list'
? location.reload()

@ -106,6 +106,8 @@ export default {
getPer() {
this.$get(`${this.api.getPermissions}?platformId=${Setting.platformId}`).then(res => {
let routes = res.permissionMenu[0].children
// 3/data/list
routes.length && !routes.find(e => e.path !== '/data/list') && this.$emit('hideSetting')
Setting.dynamicRoute && addRoutes(routes)
this.initMenu()
}).catch(err => {

@ -34,7 +34,7 @@
</div>
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%">
<p class="tips">依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台</p>
<p class="tips">依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台</p>
<el-form ref="form" label-width="60px">
<el-form-item label="手机号">
<el-input style="width: 394px;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input>

@ -111,7 +111,7 @@
</template>
</el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="170" align="center"></el-table-column>
<el-table-column label="操作" width="200">
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button>
<el-button type="text" @click="download(scope.row)" v-auth>下载</el-button>
@ -280,16 +280,19 @@ export default {
let introduce = ''// children
let dataSource = '' //
let action
let isFirst = true //
//
function actionId(arr) {//res
arr && arr.map((e, i) => {
e.id = String(e.id)
if (!i) {
if (!i && isFirst) {
//
if (e.introduce) introduce = e.introduce
if (e.dataSource) dataSource = e.dataSource
if (!action) action = e.children[0].children.length ? String(e.children[0].children[0].id) : String(e.children[0].id)
}
//
if (i) isFirst = false
if (typeId && e.id == typeId) {// id
action = String(e.id)
if (e.children.length) {//
@ -299,7 +302,7 @@ export default {
action = String(e.children[0].children[0].id)
}
}
} else if (e.children.length) {// id
} else if (e.children.length) { // id
actionId(e.children)
}
})
@ -352,19 +355,21 @@ export default {
getDeepest(data[0].children)
} else {
select = data[0].id
if (data[0].introduce) introduce = data[0].introduce
if (data[0].dataSource) dataSource = data[0].dataSource
}
}
function handleData(data) {
data.map((n, i) => {
//
if (n.id == index) {
if (n.introduce) introduce = n.introduce
if (n.dataSource) dataSource = n.dataSource
// idid
if (n.children.length) {
getDeepest(n.children)
} else {
select = index
if (n.introduce) introduce = n.introduce
if (n.dataSource) dataSource = n.dataSource
}
} else {
handleData(n.children)
@ -577,6 +582,9 @@ export default {
&.is-active{
color: #fff;
background-color: #0070FF;
span {
color: #fff;
}
}
}
.level-6 {

@ -13,7 +13,15 @@
</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><span class="num">{{item.accountNum}}</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>
@ -234,36 +242,86 @@ export default {
// 使
initChart(list){
const seriesList = []
const data = ['下载量', '点击量', '登录量']
// series
for (let i in list) {
const series = []
for (let n in list[i]) {
const datas = list[i][n]
const item = []
datas.map((e, j) => {
item.push([`${j + 1}`, e])
})
const temp = {
name: n,
type: 'line',
stack: 'Total',
data: list[i][n]
smooth: true,
stack: 'a',
symbol: 'circle',
symbolSize: 5,
sampling: 'average',
data: item
}
//
if (n === '下载量') {
temp.name = '下载量'
temp.itemStyle = {
color: '#55D3DE'
}
temp.areaStyle = {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(109,219,229,0.3)'
},
{
offset: 1,
color: 'rgba(37,237,225,0.6)'
}
])
}
} else if (n === '点击量') {
temp.name = '点击量'
temp.itemStyle = {
color: '#7ED321'
}
temp.areaStyle = {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(255, 255, 255, 0.18)'
},
{
offset: 1,
color: 'rgba(210, 247, 215, 0.6)'
}
])
}
} else if (n === '登录量') {
temp.name = '登录量'
temp.itemStyle = {
color: '#57A0FF'
}
temp.areaStyle = {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#E8F0FF'
},
{
offset: 1,
color: 'rgba(255, 255, 255, 0.5)'
}
])
}
}
series.push(temp)
}
seriesList.push(series)
}
//
seriesList.map((e, i) => {
echarts.init(document.querySelector(`#chart${i + 1}`)).setOption({
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
// legend: {
// data
// },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
trigger: 'item'
},
xAxis: {
show: false
@ -271,6 +329,12 @@ export default {
yAxis: {
show: false
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
series: e
})
})

@ -100,7 +100,7 @@
<el-input disabled v-model="form.uniqueIdentification" placeholder="唯一标识"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input v-model="form.email" placeholder="请输入邮箱"></el-input>
<el-input v-model="form.email" placeholder="请输入邮箱" @change="emailChange"></el-input>
</el-form-item>
<el-form-item prop="workNumber" label="工号/学号">
<el-input v-model="form.workNumber" placeholder="请输入工号/学号" @change="workNumberChange"></el-input>
@ -244,9 +244,11 @@ export default {
accountRepeat: false,
workNumberRepeat: false,
phoneRepeat: false,
emailRepeat: false,
originalAccount: '',
originalWorkNumber: '',
originalPhone: ''
originalPhone: '',
originalEmail: ''
};
},
computed: {
@ -369,6 +371,17 @@ export default {
this.phoneRepeat = false
}
},
emailChange(){
if(this.form.email !== this.originalEmail){
this.$post(`${this.api.checkEmailOrPhone}?email=${this.form.email}${this.form.accountId ? '&accountId=' + this.form.accountId : ''}`).then(res => {
this.emailRepeat = false
}).catch(res => {
this.emailRepeat = true
})
}else{
this.emailRepeat = false
}
},
closeUser(){
this.$refs.form.resetFields()
this.form.userId = ''
@ -400,9 +413,11 @@ export default {
uniqueIdentification: data.uniqueIdentification,
password: ''
}
//
this.originalAccount = data.account
this.originalWorkNumber = data.workNumber
this.originalPhone = data.phone
this.originalEmail = data.email
}).catch(res => {})
},
edit(row){
@ -419,6 +434,7 @@ export default {
if(this.accountRepeat) return util.errorMsg('该账号已存在!')
if(this.workNumberRepeat) return util.errorMsg('该学号/工号已存在!')
if(this.phoneRepeat) return util.errorMsg('该手机号已存在!')
if(this.emailRepeat) return util.errorMsg('该邮箱已存在!')
let data = this.form
// ,schoolId
data.schoolId = data.schoolId ? data.schoolId : this.schoolId

Loading…
Cancel
Save