diff --git a/src/views/log/index.vue b/src/views/log/index.vue index bdd2938..b9edef0 100644 --- a/src/views/log/index.vue +++ b/src/views/log/index.vue @@ -47,11 +47,6 @@ tableData: { }, }); -// // 模块列表 -// const moduleList = ref([]); - -// // 标签列表 -// const labelList = ref([]); // 引入 api 请求接口 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) => { let date = new Date(row.createtime); return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; } -// // 文章类型格式化 -// const typeFormatter = (row: any, column: TableColumnCtx) => { -// return row.articletype === 1 ? '外链' : '图文'; -// } // 分页改变 const onHandleSizeChange = (val: number) => { diff --git a/src/views/statistics/index.vue b/src/views/statistics/index.vue index f7b83a5..209182c 100644 --- a/src/views/statistics/index.vue +++ b/src/views/statistics/index.vue @@ -176,44 +176,7 @@ const state = reactive({ homeCharThree: null, dispose: [null, '', undefined], } as any, - 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', - // }, - ], + homeOne: [], homeThree: [ { icon: 'iconfont icon-yangan', @@ -304,23 +267,59 @@ const getList = async() =>{ num4: "iconfont icon-ditu", }, { - num1: data.homeviewTodayCount, + num1: data.homeviewCount, // num2: "17.32", // 示例百分比变化值 - num3: "今日首页浏览数", + num3: "首页总浏览数", color1: '#6690F9', color2: '--next-color-warning-lighter', color3: '--el-color-warning', - num4: "iconfont icon-zaosheng", + num4: "iconfont icon-ico_shuju", }, { - num1: data.homeviewCount, + num1: data.homeviewTodayCount, // num2: '-10.01', - num3: '首页总浏览数', + num3: '今日首页浏览数', num4: 'fa fa-github-alt', color1: '#FF6462', color2: '--next-color-danger-lighter', 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){ @@ -961,6 +960,6 @@ $homeNavLengh: 8; }; } .layout-container .layout-padding-auto{ - width: 361px; + width: 363px; } \ No newline at end of file