feat(数据大屏): 调整接口
This commit is contained in:
parent
4afe02a878
commit
b0a3669433
@ -50,7 +50,7 @@
|
||||
<div id="online-info-tim-chat" class="col-info">
|
||||
<div class="title">Likei在线</div>
|
||||
<div class="content">
|
||||
<online-user-count-origin origin="LOTFUN" />
|
||||
<online-user-count-origin origin="LIKEI" />
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<div class="online-user-counts">
|
||||
<el-row>
|
||||
<el-col class="count" :span="6">
|
||||
<el-col class="count" :span="6">
|
||||
<div class="title">总额</div>
|
||||
<div><countTo :start-val="0" :end-val="total" :duration="3000" /></div>
|
||||
</el-col>
|
||||
<el-col class="count" :span="6">
|
||||
<div class="title">LotFun</div>
|
||||
<div><countTo :start-val="0" :end-val="timchatTotal" :duration="3000" /></div>
|
||||
<el-col class="count" :span="6">
|
||||
<div class="title">LIKEI</div>
|
||||
<div>
|
||||
<countTo :start-val="0" :end-val="timchatTotal" :duration="3000" />
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- <el-col class="count" :span="6">
|
||||
<div class="title">Aswat</div>
|
||||
@ -22,10 +24,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { purchaseTodayTotal, purchaseTodayTotalBySysOrigin } from '@/api/purchase'
|
||||
import { mapGetters } from 'vuex'
|
||||
import {
|
||||
purchaseTodayTotal,
|
||||
purchaseTodayTotalBySysOrigin
|
||||
} from "@/api/purchase";
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: 'PurchaseCount',
|
||||
name: "PurchaseCount",
|
||||
props: {
|
||||
timeOutSecond: {
|
||||
type: Number,
|
||||
@ -36,36 +41,40 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
timchatTotal: 0,
|
||||
}
|
||||
timchatTotal: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissionsSysOriginPlatforms']),
|
||||
...mapGetters(["permissionsSysOriginPlatforms"]),
|
||||
permissionsSysOriginCode() {
|
||||
if (!this.permissionsSysOriginPlatforms) {
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
return this.permissionsSysOriginPlatforms.map(item => item.value)
|
||||
return this.permissionsSysOriginPlatforms.map(item => item.value);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const that = this
|
||||
that.loadData()
|
||||
const that = this;
|
||||
that.loadData();
|
||||
var intervalIndex = setInterval(() => {
|
||||
that.loadData()
|
||||
}, that.timeOutSecond * 1000)
|
||||
that.$store.dispatch('app/pushRunTask', intervalIndex)
|
||||
that.loadData();
|
||||
}, that.timeOutSecond * 1000);
|
||||
that.$store.dispatch("app/pushRunTask", intervalIndex);
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
const that = this
|
||||
purchaseTodayTotal().then(res => {
|
||||
that.total = res.body || 0
|
||||
}).catch(er => {})
|
||||
const that = this;
|
||||
purchaseTodayTotal()
|
||||
.then(res => {
|
||||
that.total = res.body || 0;
|
||||
})
|
||||
.catch(er => {});
|
||||
|
||||
purchaseTodayTotalBySysOrigin('LOTFUN').then(res => {
|
||||
that.timchatTotal = res.body || 0
|
||||
}).catch(er => {})
|
||||
purchaseTodayTotalBySysOrigin("LIKEI")
|
||||
.then(res => {
|
||||
that.timchatTotal = res.body || 0;
|
||||
})
|
||||
.catch(er => {});
|
||||
|
||||
// purchaseTodayTotalBySysOrigin('ASWAT').then(res => {
|
||||
// that.aswatTotal = res.body || 0
|
||||
@ -76,15 +85,15 @@ export default {
|
||||
// }).catch(er => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.online-user-counts {
|
||||
.count {
|
||||
text-align: center;
|
||||
line-height: .6rem;
|
||||
font-size: 0.4rem;
|
||||
padding-bottom: .2rem;
|
||||
}
|
||||
.count {
|
||||
text-align: center;
|
||||
line-height: 0.6rem;
|
||||
font-size: 0.4rem;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user