|
|
@@ -15,8 +15,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {censusAllTotal, censusTodayTotal} from "@/api/wel/index.js";
|
|
|
|
|
|
- export default {
|
|
|
+export default {
|
|
|
name: "wel",
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -24,18 +25,20 @@
|
|
|
data: [
|
|
|
{
|
|
|
click: () => {
|
|
|
- this.$router.push({path: "/sing_active/activerecord"});
|
|
|
+ this.$router.push({path: "/sing_active/activeproductrecord"});
|
|
|
},
|
|
|
- title: '今日作品总数',
|
|
|
+ title: '作品总数',
|
|
|
+ prop: 'activeProductCount',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-star-on',
|
|
|
color: '#00a7d0',
|
|
|
},
|
|
|
{
|
|
|
click: () => {
|
|
|
- this.$router.push({path: "/sing_active/activeproductrecord"});
|
|
|
+ this.$router.push({path: "/sing_active/activerecord"});
|
|
|
},
|
|
|
- title: '今日活动总数',
|
|
|
+ title: '活动总数',
|
|
|
+ prop: 'activeCount',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-s-flag',
|
|
|
color: 'rgb(27, 201, 142)',
|
|
|
@@ -44,7 +47,8 @@
|
|
|
click: () => {
|
|
|
this.$router.push({path: "/sing_user/loginuser"});
|
|
|
},
|
|
|
- title: '今日用户总数',
|
|
|
+ title: '用户总数',
|
|
|
+ prop: 'userCount',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-user-solid',
|
|
|
color: 'rgb(230, 71, 88)',
|
|
|
@@ -56,8 +60,9 @@
|
|
|
data: [
|
|
|
{
|
|
|
click: () => {
|
|
|
- this.$router.push({path: "/sing_active/activerecord"});
|
|
|
+ this.$router.push({path: "/sing_active/activeproductrecord"});
|
|
|
},
|
|
|
+ prop: 'activeProductCount',
|
|
|
title: '今日新增作品',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-star-on',
|
|
|
@@ -65,9 +70,10 @@
|
|
|
},
|
|
|
{
|
|
|
click: () => {
|
|
|
- this.$router.push({path: "/sing_active/activeproductrecord"});
|
|
|
+ this.$router.push({path: "/sing_active/activerecord"});
|
|
|
},
|
|
|
- title: '今日新增总数',
|
|
|
+ title: '今日新增活动',
|
|
|
+ prop: 'activeCount',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-s-flag',
|
|
|
color: 'rgb(27, 201, 142)',
|
|
|
@@ -76,7 +82,8 @@
|
|
|
click: () => {
|
|
|
this.$router.push({path: "/sing_user/loginuser"});
|
|
|
},
|
|
|
- title: '今日新增总数',
|
|
|
+ title: '今日新增用户',
|
|
|
+ prop: 'userCount',
|
|
|
count: 0,
|
|
|
icon: 'el-icon-user-solid',
|
|
|
color: 'rgb(230, 71, 88)',
|
|
|
@@ -86,10 +93,34 @@
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
+ created() {
|
|
|
+ this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ init(){
|
|
|
+ censusAllTotal().then(res=>{
|
|
|
+ let data = res.data.data;
|
|
|
+ for(const item in data){
|
|
|
+ let find = this.optionTotal.data.find(ele=>{
|
|
|
+ return ele.prop===item;
|
|
|
+ });
|
|
|
+ if(find!==undefined){
|
|
|
+ find.count = data[item];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ censusTodayTotal().then(res=>{
|
|
|
+ let data = res.data.data;
|
|
|
+ for(const item in data){
|
|
|
+ let find = this.optionToday.data.find(ele=>{
|
|
|
+ return ele.prop===item;
|
|
|
+ });
|
|
|
+ if(find!==undefined){
|
|
|
+ find.count = data[item];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|