2025-01-24 09:19:03 +08:00

169 lines
5.2 KiB
Vue

<template>
<div>
<!-- <t-back-top-->
<!-- container=".tdesign-starter-layout"-->
<!-- :visible-height="0"-->
<!-- style="position: absolute"-->
<!-- :offset="['24px', '80px']"-->
<!-- >-->
<!-- <t-icon name="backtop" size="20px" />-->
<!-- </t-back-top>-->
<!-- 顶部 card -->
<!-- <top-panel class="row-container" />-->
<!-- &lt;!&ndash; 中部图表 &ndash;&gt;-->
<!-- <middle-chart class="row-container" />-->
<!-- &lt;!&ndash; 列表排名 &ndash;&gt;-->
<!-- <rank-list class="row-container" />-->
<!-- &lt;!&ndash; 出入库概览 &ndash;&gt;-->
<!-- <output-overview class="row-container" />-->
<div class="dashboard-detail">
<t-card title="待办事项" class="dashboard-detail-card" :bordered="false">
<t-row :gutter="[16, 16]">
<t-col v-for="(item, index) in list" :key="index" :xs="6" :xl="3">
<div @click="openDbUrl(index)">
<t-card :title="item.name" style="cursor: pointer;">
<div style="display: flex;justify-content: space-between;align-items: center">
<div style="font-size: 30px;color:#0052D9">{{ item.value }}</div>
<div>
<icon name="chevron-right-s" style=""/>
</div>
</div>
</t-card>
</div>
</t-col>
</t-row>
</t-card>
</div>
<div class="dashboard-detail" style="margin-top: 10px;">
<t-card title="账户信息" class="dashboard-detail-card" :bordered="false">
<t-row :gutter="[16, 16]">
<t-col v-for="(item, index) in user_list" :key="index" :xs="6" :xl="3">
<div @click="openDbUrlTwo(index)">
<t-card :title="item.name" style="cursor: pointer;">
<div style="display: flex;justify-content: space-between;align-items: center">
<div style="font-size: 30px;color:#0052D9">{{ item.value }}</div>
<div>
<icon name="chevron-right-s" style=""/>
</div>
</div>
</t-card>
</div>
</t-col>
</t-row>
</t-card>
</div>
</div>
</template>
<script lang="ts">
import {Icon} from 'tdesign-icons-vue';
export default {
components: {
Icon,
},
data() {
return {
list: [
{name: '入会审核', value: '0'},
{name: '青企圈审核', value: '0'},
{name: '青企圈评论审核', value: '0'},
{name: '会员发票', value: '0'},
{name: '报名审核', value: '0'},
{name: '生日提醒', value: '0'},
{name: '会费逾期', value: '0'},
],
user_list: [
{name: '登陆日志', value: '0'},
{name: '操作日志', value: '0'},
{name: '短信余量', value: '0'},
{name: '已用空间', value: '0'},
]
}
},
mounted() {
this.getInfo();
this.getInfoTwo();
this.getMsg();
},
methods: {
getMsg(){
this.$request
.post('/sending_message/duanxinCount')
.then((res) => {
var key=res.data.Response.SmsPackagesStatisticsSet[0];
this.user_list[2].value=key.CurrentUsage+'/'+key.PackageAmount;
})
.catch((e) => {
console.log(e);
});
},
getInfo(){
this.$request
.post('/index/todo')
.then((res) => {
console.log(res.data);
var d=res.data;
this.list[0].value=d.membershipReview;
this.list[1].value=d.YouthEnterpriseCircleAudit;
this.list[2].value=d.CommentModeration;
this.list[3].value=d.Membershipinvoice;
this.list[4].value=d.Registrationreview;
this.list[5].value=d.birthdays;
this.list[6].value=d.Overduemembershipfees;
})
.catch((e) => {
console.log(e);
});
},
getInfoTwo(){
this.$request
.post('/index/AccountInformation')
.then((res) => {
console.log(res.data);
var d=res.data;
this.user_list[0].value=d.AccessLog;
this.user_list[1].value=d.BackendLog;
//this.user_list[2].value=d.SMSmargin;
this.user_list[3].value=d.fileSize+' / '+d.Storagespace;
//this.user_list[4].value=d.formattedRemainingspace;
})
.catch((e) => {
console.log(e);
});
},
openDbUrlTwo(index){
if(index==0){
this.$router.push('/log/visit');
}else if(index==1){
this.$router.push('/log/operate');
}
},
openDbUrl(index) {
console.log(index);
if(index==0){
this.$router.push('/user/user_index_0');
}else if(index==1){
this.$router.push('/tweets/tweets_index/tweets_index1');
}else if(index==2){
this.$router.push('/tweets/pl_index/pl_index1');
}else if(index==3){
this.$router.push('/user_invoice/user_invoice3');
}else if(index==4){
this.$router.push('/activity1/activity_index1');
}else if(index==6){
this.$router.push('/user/user_index_3');
}
}
}
}
</script>
<style scoped lang="less">
.row-container {
margin-bottom: 16px;
}
/deep/ .t-card__body {
padding-top: 0;
}
</style>