diff --git a/pages/index/index.vue b/pages/index/index.vue index 87cf83d..59520db 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -17,8 +17,8 @@ {{ single }} - - + + diff --git a/pages/revenue/component/otherCharts.vue b/pages/revenue/component/otherCharts.vue index e5aeb5d..e9d6b50 100644 --- a/pages/revenue/component/otherCharts.vue +++ b/pages/revenue/component/otherCharts.vue @@ -1,6 +1,7 @@ @@ -11,7 +12,9 @@ var uChartsInstance = {}; export default { name: "OtherCharts", data() { - return {} + return { + preferPath:'' + } }, props: { success: { @@ -49,7 +52,7 @@ export default { width: 64, height: 64, series: data.series, - animation: true, + animation: false, rotate: false, rotateLock: false, background: "#FFFFFF", @@ -81,7 +84,27 @@ export default { } } }); + setTimeout( ()=>{ + this.canvasToTempImage('month') + },100) }, + canvasToTempImage(id){ + uni.canvasToTempFilePath({ + canvasId:id, + complete:(res)=>{ + if (res.tempFilePath){ + uni.getFileSystemManager().readFile({ + filePath: res.tempFilePath, + encoding: 'base64', + success: res => { + let base64 = 'data:image/png;base64,' + res.data; + this.preferPath = base64 + } + }) + } + } + },this) + }, } } diff --git a/pages/revenue/component/yearCharts.vue b/pages/revenue/component/yearCharts.vue index 4c10cea..ca06a28 100644 --- a/pages/revenue/component/yearCharts.vue +++ b/pages/revenue/component/yearCharts.vue @@ -1,6 +1,7 @@ @@ -11,7 +12,9 @@ var uChartsInstance = {}; export default { name: "YearCharts", data() { - return {} + return { + preferPath:'' + } }, props: { success: { @@ -45,7 +48,7 @@ export default { width: 34, height: 34, series: data.series, - animation: true, + animation: false, rotate: false, rotateLock: false, background: "#FFFFFF", @@ -72,6 +75,26 @@ export default { } } }); + setTimeout( ()=>{ + this.canvasToTempImage('month') + },100) + }, + canvasToTempImage(id){ + uni.canvasToTempFilePath({ + canvasId:id, + complete:(res)=>{ + if (res.tempFilePath){ + uni.getFileSystemManager().readFile({ + filePath: res.tempFilePath, + encoding: 'base64', + success: res => { + let base64 = 'data:image/png;base64,' + res.data; + this.preferPath = base64 + } + }) + } + } + },this) }, } } diff --git a/pages/revenue/index.vue b/pages/revenue/index.vue index 87b0eef..557c719 100644 --- a/pages/revenue/index.vue +++ b/pages/revenue/index.vue @@ -3,13 +3,20 @@ - - - - + + + + + + + + + + - - 收支预测 + + + 收支预测 @@ -83,7 +90,7 @@ /万元 ? - 本月收入:营业收入 + 营业外收入 + 本月支出:管理费用+销售费用+财务费用+营业外支出 @@ -888,12 +895,15 @@ export default { otherMonthSum:false,// 其它收入的本月累计 otherThisMonthRate:false,//其它收入的本月占比 otherThisMonthSuccess:false,//其它收入的完成率 + pageWidth:0,// 手机的宽度 } }, onLoad(){ // 获取手机参数对页面进行适配 let systemInfo = uni.getSystemInfoSync() - this.windowHeight = systemInfo.windowHeight + console.log('systemInfo',systemInfo) + this.pageWidth = systemInfo.windowWidth + console.log('this.pageWidth',this.pageWidth) this.statusBarHeight = Number(systemInfo.statusBarHeight) this.menu = uni.getMenuButtonBoundingClientRect() console.log('this.menu',this.menu) @@ -1071,7 +1081,7 @@ export default { }