Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Ver.1.4.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dzxrly committed May 5, 2020
1 parent df78dba commit fcddd72
Show file tree
Hide file tree
Showing 29 changed files with 1,024 additions and 703 deletions.
3 changes: 2 additions & 1 deletion BFVStatus-vue/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
browser: true,
},
extends: [
'elemefe',
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
Expand All @@ -25,5 +26,5 @@ module.exports = {
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
},
}
151 changes: 74 additions & 77 deletions BFVStatus-vue/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion BFVStatus-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"copy-webpack-plugin": "^4.0.1",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint": "^4.19.1",
"eslint-config-elemefe": "^0.3.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
Expand Down
12 changes: 7 additions & 5 deletions BFVStatus-vue/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div id="app">
<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
<router-view/>
<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css" />
<router-view />
</div>
</template>

Expand All @@ -12,14 +12,16 @@ export default {
</script>

<style>
html, body {
html,
body {
height: 100%;
margin: 0 0 0 0;
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
background-image: url('./assets/bg.jpg');
background-repeat: no-repeat;
}
body {
margin: 0 0 0 0
margin: 0 0 0 0;
}
</style>
78 changes: 54 additions & 24 deletions BFVStatus-vue/src/components/ChartsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
<el-page-header class="pageHeader" @back="goBack">
<template slot="content">{{playerId}}的数据统计</template>
</el-page-header>
<el-alert type="error" title="官方数据接口出错,请晚些时候重试" :closable="false" v-if="!isGetDataSuccessfully" show-icon></el-alert>
<el-alert
type="error"
title="官方数据接口出错,请晚些时候重试"
:closable="false"
v-if="!isGetDataSuccessfully"
show-icon
></el-alert>
<el-row class="updateTimeRow" type="flex" justify="center">
<el-col :span="16" class="updateTimeCol">
<el-tag size="mini" type="warning">更新于{{lastUpdateTime}}</el-tag>
Expand All @@ -16,7 +22,15 @@
<van-tab title="K/D折线图" class="vanTab">
<el-row type="flex" justify="center">
<el-col :span="20">
<el-slider v-model="selectedKdDays" show-input input-size="mini" :min="1" :max="maxKdLen" :step="1" :show-tooltip="false"></el-slider>
<el-slider
v-model="selectedKdDays"
show-input
input-size="mini"
:min="1"
:max="maxKdLen"
:step="1"
:show-tooltip="false"
></el-slider>
</el-col>
</el-row>
<el-row type="flex" justify="center">
Expand All @@ -29,7 +43,15 @@
<van-tab title="击杀数折线图" class="vanTab">
<el-row type="flex" justify="center">
<el-col :span="20">
<el-slider v-model="selectedKillsDays" show-input input-size="mini" :min="1" :max="maxKillsLen" :step="1" :show-tooltip="false"></el-slider>
<el-slider
v-model="selectedKillsDays"
show-input
input-size="mini"
:min="1"
:max="maxKillsLen"
:step="1"
:show-tooltip="false"
></el-slider>
</el-col>
</el-row>
<el-row type="flex" justify="center">
Expand All @@ -42,7 +64,15 @@
<van-tab title="SPM折线图" class="vanTab">
<el-row type="flex" justify="center">
<el-col :span="20">
<el-slider v-model="selectedSpmDays" show-input input-size="mini" :min="1" :max="maxSpmLen" :step="1" :show-tooltip="false"></el-slider>
<el-slider
v-model="selectedSpmDays"
show-input
input-size="mini"
:min="1"
:max="maxSpmLen"
:step="1"
:show-tooltip="false"
></el-slider>
</el-col>
</el-row>
<el-row type="flex" justify="center">
Expand Down Expand Up @@ -237,7 +267,7 @@ export default {
},
methods: {
goBack () {
this.$router.push({name: 'PlayerStatusInfoView'})
window.history.back()
},
clearData () {
this.kdLineOption.dataset.source.length = 0
Expand Down Expand Up @@ -272,16 +302,17 @@ export default {
thisView.drawKDLineChart()
} else {
thisView.isGetDataSuccessfully = false
console.log('error')
}
}
var onError = function (res) {
thisView.historyLoading = false
thisView.raiseError('数据表生成失败', '没有找到该用户')
window.history.back()
}
var onTimeout = function (res) {
thisView.raiseError('数据表生成失败', '连接超时')
thisView.historyLoading = false
window.history.back()
}
httpGet(params, onSuccess, onError, onTimeout, 45000)
},
Expand Down Expand Up @@ -385,24 +416,23 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus">
.chartsView-wrap {
background-color #ffffff
min-height 100vh
.pageHeader {
padding-top 5px
margin-bottom 10px
}

.updateTimeRow {
margin 10px 0px 10px 0px
text-align center
}
.echartsLinkRow {
margin 10px 0px 0px 0px
text-align center
.echartsLinkCol {
font-size 10px
color #909399
}
background-color #ffffff
min-height 100vh
.pageHeader {
padding-top 5px
margin-bottom 10px
}
.updateTimeRow {
margin 10px 0px 10px 0px
text-align center
}
.echartsLinkRow {
margin 10px 0px 0px 0px
text-align center
.echartsLinkCol {
font-size 10px
color #909399
}
}
}
</style>
136 changes: 88 additions & 48 deletions BFVStatus-vue/src/components/Loading.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
<template>
<div class="load-ani">
<svg height="91" width="65">
<!-- <polyline class="load-logoBG" fill="none" :stroke="logoColorBG" stroke-width="2"
<div class="load-ani">
<svg height="91" width="65">
<!-- <polyline class="load-logoBG" fill="none" :stroke="logoColorBG" stroke-width="2"
points="1,1 21,1 33,44 44,1 64,1 33,90 1,1"
stroke-linecap="round" stroke-linejoin="round"></polyline> -->
<polyline class="load-logo" fill="none" :stroke="logoColor" stroke-width="2"
points="1,1 21,1 33,44 44,1 64,1 33,90 1,1"
stroke-linecap="round" stroke-linejoin="round"></polyline>
</svg>
<h3 class="load-text">加载中...</h3>
</div>
stroke-linecap="round" stroke-linejoin="round"></polyline>-->
<polyline
class="load-logo"
fill="none"
:stroke="logoColor"
stroke-width="2"
points="1,1 21,1 33,44 44,1 64,1 33,90 1,1"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<h3 class="load-text">加载中...</h3>
<p class="load-slowTip" v-if="isLoadSlow">与BFVTracker连接状态较差,请耐心等待</p>
</div>
</template>

<script>
Expand All @@ -18,54 +25,87 @@ export default {
data () {
return {
logoColor: '#409EFF',
logoColorBG: '#909399'
logoColorBG: '#909399',
isLoadSlow: false,
timer: null
}
},
mounted () {
this.setLoadTimer()
},
methods: {
setLoadTimer () {
this.timer = setTimeout(() => {
this.isLoadSlow = true
clearTimeout(this.timer)
}, 20000)
},
clearLoadTimer () {
clearTimeout(this.timer)
}
},
beforeDestroy () {
this.clearLoadTimer()
}
}
</script>

<style scoped lang="stylus">
.load-ani {
position fixed
display flex
justify-content center
align-items center
min-height 100vh
width 100%
flex-direction column
background-color rgba(255, 255, 255, 0.8)
z-index 9999
pointer-events none
.load-text {
font-family Helvetica
font-size 14px
margin-top 10px
animation load-text 2s infinite alternate
-webkit-animation load-text 2s infinite alternate
position fixed
display flex
justify-content center
align-items center
min-height 100vh
width 100%
flex-direction column
background-color rgba(255, 255, 255, 0.8)
z-index 9999
pointer-events none
.load-text {
font-family Helvetica
font-size 14px
margin-top 10px
margin-bottom 5px
animation load-text 2s infinite alternate
-webkit-animation load-text 2s infinite alternate
}
.load-logo {
animation load-logo 2s infinite alternate
-webkit-animation load-logo 2s infinite alternate
stroke-dasharray 325
stroke-dashoffset 325
}
.load-slowTip {
font-family Helvetica
font-size 10px
margin-top 5px
animation load-slowTip 2s infinite alternate
-webkit-animation load-slowTip 2s infinite alternate
}
@keyframes load-logo {
from {
stroke-dashoffset 325
}
.load-logo {
animation load-logo 2s infinite alternate
-webkit-animation load-logo 2s infinite alternate
stroke-dasharray 325
stroke-dashoffset 325
to {
stroke-dashoffset 0
}
@keyframes load-logo {
from {
stroke-dashoffset 325
}
to {
stroke-dashoffset 0
}
}
@keyframes load-text {
from {
color rgba(64, 158, 255, 0.2)
}
@keyframes load-text {
from {
color rgba(64, 158, 255, 0.2)
}
to {
color rgba(64, 158, 255, 1)
}
to {
color rgba(64, 158, 255, 1)
}
}
@keyframes load-slowTip {
from {
color rgba(245, 108, 108, 0.2)
}
to {
color rgba(245, 108, 108, 1)
}
}
}
</style>
Loading

0 comments on commit fcddd72

Please sign in to comment.