diff --git a/vue/gold-system/src/views/workspace/index.vue b/vue/gold-system/src/views/workspace/index.vue index 772747a..445f2ec 100644 --- a/vue/gold-system/src/views/workspace/index.vue +++ b/vue/gold-system/src/views/workspace/index.vue @@ -341,6 +341,7 @@ const handleClick = function () { goldTypePay.value = '全部类型'; goldTypeConsume.value = '全部类型'; } + // 切换平台 const changePlatform = function () { console.log('changePlatform', platform.value); @@ -445,7 +446,7 @@ const changePlatform = function () { // 计算属性 // 格式化数字 const formatNum = function (val) { - console.log(val); + // console.log(val); if (val === undefined) { return ''; // 或者返回其他合适的默认值,避免调用toString报错 } else { @@ -599,6 +600,7 @@ onMounted(async function () { // 使用刚指定的配置项和数据显示图表。 consumeBar.setOption(option2); + // 第一个饼状图 基于准备好的dom,初始化echarts实例 var yearRechargePie = echarts.init(document.getElementById('yearRecharge')); const option3 = { @@ -612,7 +614,7 @@ onMounted(async function () { }, series: [ { - name: '全年累计金币数(个)\n' + statistics.value.totalSumCoin, + name: '全年累计金币数(个)\n' + Math.abs(statistics.value.totalSumCoin), type: 'pie', radius: ['60%', '80%'], avoidLabelOverlap: false, @@ -650,7 +652,7 @@ onMounted(async function () { }, series: [ { - name: '全年累计消耗金币数(个)\n' + getYearConsumeCoin.value.yearsumCoin, + name: '全年累计消耗金币数(个)\n' + Math.abs(getYearConsumeCoin.value.yearsumCoin), type: 'pie', radius: ['60%', '80%'], avoidLabelOverlap: false, @@ -688,7 +690,7 @@ onMounted(async function () { }, series: [ { - name: '当前金币余量(个)\n' + getSumCoin.value.todayTotalCoin, + name: '当前金币余量(个)\n' + Math.abs(getSumCoin.value.todayTotalCoin), type: 'pie', radius: ['60%', '80%'], avoidLabelOverlap: false, @@ -841,7 +843,7 @@ onMounted(async function () { - +
合计:充值金币: