统计分析和系统日志的完善

This commit is contained in:
夕阳微笑1 2025-01-24 17:52:39 +08:00
parent c98b04a85b
commit 5efd56164f
2 changed files with 43 additions and 121 deletions

View File

@ -47,11 +47,6 @@ tableData: {
}, },
}); });
// //
// const moduleList = ref([]);
// //
// const labelList = ref([]);
// api // api
const syslogApi = logApi(); const syslogApi = logApi();
@ -75,84 +70,12 @@ try {
}; };
// //
// const handleChangeModule = async(val: any) => {
// try {
// state.tableData.param.labelName = '';
// if(!val){labelList.value=[]; return;}
// const op:any = event?.currentTarget;
// let res = await artApi.getLabelList(op.dataset.op);
// if(res?.success){
// labelList.value = res.data;
// }else{
// ElMessage.error('');
// }
// } catch (error) {
// ElMessage.error('');
// } finally {
// }
// }
// //
// const reset = () =>{
// state.tableData.param = {
// labelName: '',
// moduleName: '',
// title: '',
// current: 1,
// size: 10,
// }
// getTableData();
// }
// //
// const toAddArticle = () => {
// router.push({ path: '/article/add' });
// }
// //
// const toEditArticle = (row: any) => {
// router.push({ path: '/article/edit', query: { id:row.id, moduleName: row.moduleName, labelName: row.labelName } });
// }
// //
// const toShowDetail = (row: any) => {
// router.push({ path: '/article/detail' , query: { id:row.id, moduleName: row.moduleName, labelName: row.labelName } });
// }
// //
// const deleteArticle = (id: number) => {
// ElMessageBox.confirm('?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// })
// .then(async() => {
// try {
// state.tableData.loading = true;
// let res = await artApi.deleteArticle(id);
// if(res?.success){
// await getTableData();
// ElMessage.success('');
// } else ElMessage.error('');
// } catch(e) {
// ElMessage.error('');
// } finally {
// state.tableData.loading = false;
// }
// })
// }
// //
const dateFormatter = (row: any, column: TableColumnCtx<String>) => { const dateFormatter = (row: any, column: TableColumnCtx<String>) => {
let date = new Date(row.createtime); let date = new Date(row.createtime);
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
} }
// //
// const typeFormatter = (row: any, column: TableColumnCtx<String>) => {
// return row.articletype === 1 ? '' : '';
// }
// //
const onHandleSizeChange = (val: number) => { const onHandleSizeChange = (val: number) => {

View File

@ -176,44 +176,7 @@ const state = reactive({
homeCharThree: null, homeCharThree: null,
dispose: [null, '', undefined], dispose: [null, '', undefined],
} as any, } as any,
homeOne: [ homeOne: [],
// {
// num1: '125,12',
// num2: '-12.32',
// num3: '',
// num4: 'fa fa-meetup',
// color1: '#FF6462',
// color2: '--next-color-primary-lighter',
// color3: '--el-color-primary',
// },
// {
// num1: '653,33',
// num2: '+42.32',
// num3: '',
// num4: 'iconfont icon-ditu',
// color1: '#6690F9',
// color2: '--next-color-success-lighter',
// color3: '--el-color-success',
// },
// {
// num1: '125,65',
// num2: '+17.32',
// num3: '',
// num4: 'iconfont icon-zaosheng',
// color1: '#6690F9',
// color2: '--next-color-warning-lighter',
// color3: '--el-color-warning',
// },
// {
// num1: '520,43',
// num2: '-10.01',
// num3: '访',
// num4: 'fa fa-github-alt',
// color1: '#FF6462',
// color2: '--next-color-danger-lighter',
// color3: '--el-color-danger',
// },
],
homeThree: [ homeThree: [
{ {
icon: 'iconfont icon-yangan', icon: 'iconfont icon-yangan',
@ -304,23 +267,59 @@ const getList = async() =>{
num4: "iconfont icon-ditu", num4: "iconfont icon-ditu",
}, },
{ {
num1: data.homeviewTodayCount, num1: data.homeviewCount,
// num2: "17.32", // // num2: "17.32", //
num3: "今日首页浏览数", num3: "首页浏览数",
color1: '#6690F9', color1: '#6690F9',
color2: '--next-color-warning-lighter', color2: '--next-color-warning-lighter',
color3: '--el-color-warning', color3: '--el-color-warning',
num4: "iconfont icon-zaosheng", num4: "iconfont icon-ico_shuju",
}, },
{ {
num1: data.homeviewCount, num1: data.homeviewTodayCount,
// num2: '-10.01', // num2: '-10.01',
num3: '首页浏览数', num3: '今日首页浏览数',
num4: 'fa fa-github-alt', num4: 'fa fa-github-alt',
color1: '#FF6462', color1: '#FF6462',
color2: '--next-color-danger-lighter', color2: '--next-color-danger-lighter',
color3: '--el-color-danger', color3: '--el-color-danger',
}, },
{
num1: data.rechargeAmount,
// num2: '-10.01',
num3: '总充值数',
num4: 'iconfont icon-xingqiu',
color1: '#FF6462',
color2: '--next-color-primary-lighter',
color3: '--el-color-primary',
},
{
num1: data.rechargeTodayAmount,
// num2: '-10.01',
num3: '今日充值数',
num4: 'iconfont icon-shuju',
color1: '#FF6462',
color2: '--next-color-success-lighter',
color3: '--el-color-success',
},
{
num1: data.consumptionAmount,
// num2: '-10.01',
num3: '总消费数',
num4: 'fa fa-mixcloud',
color1: '#FF6462',
color2: '--next-color-warning-lighter',
color3: '--el-color-warning',
},
{
num1: data.consumptionTodayAmount,
// num2: '-10.01',
num3: '今日消费数',
num4: 'fa fa-diamond',
color1: '#FF6462',
color2: '--next-color-danger-lighter',
color3: '--el-color-danger',
},
]; ];
} }
}catch(error){ }catch(error){
@ -961,6 +960,6 @@ $homeNavLengh: 8;
}; };
} }
.layout-container .layout-padding-auto{ .layout-container .layout-padding-auto{
width: 361px; width: 363px;
} }
</style> </style>