From 6d8c52cab318e85ff5659098983c91c02dc53bf6 Mon Sep 17 00:00:00 2001 From: cclu Date: Thu, 12 May 2022 21:23:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=9B=BE=E4=BE=8B=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/u-charts.js | 114 ++- pages/everdayRenven/AnhuiIndex.vue | 29 +- pages/everdayRenven/AnhuiServerpart.vue | 67 +- .../everdayRenven/components/CarAnalysis.vue | 7 +- .../components/CustomerAnalysis.vue | 65 +- pages/everdayRenven/index.vue | 61 +- pages/everdayRenven/serviceIndex.vue | 674 ++++++++++-------- 7 files changed, 599 insertions(+), 418 deletions(-) diff --git a/components/u-charts.js b/components/u-charts.js index cfeeea1..1e9376c 100644 --- a/components/u-charts.js +++ b/components/u-charts.js @@ -435,40 +435,84 @@ function getDataRange(minData, maxData) { function measureText(text, fontSize, context) { var width = 0; - text = String(text); + // text = String(text); // #ifdef MP-ALIPAY || MP-BAIDU || APP-NVUE context = false; // #endif + if (context !== false && context !== undefined && context.setFontSize && context.measureText) { - context.setFontSize(fontSize); - return context.measureText(text).width; + context.setFontSize(fontSize); + if(text instanceof Array) { + let max = 0 + text.map(n=>{ + let len = getLen(n) + if(max{ + let y = textPosition.y + 3 +(i*(item.textSize || config.fontSize)) + context.fillText(n, textStartX, y); + }) + }else{ + + context.fillText(item.text, textStartX, textPosition.y + 3); + } + // context.fillText(item.text, textStartX, textPosition.y + 3); context.closePath(); context.stroke(); context.closePath(); diff --git a/pages/everdayRenven/AnhuiIndex.vue b/pages/everdayRenven/AnhuiIndex.vue index b71d1a6..a3e6501 100644 --- a/pages/everdayRenven/AnhuiIndex.vue +++ b/pages/everdayRenven/AnhuiIndex.vue @@ -69,10 +69,8 @@
- - @@ -154,8 +152,8 @@ diff --git a/pages/everdayRenven/components/CarAnalysis.vue b/pages/everdayRenven/components/CarAnalysis.vue index 6121342..1701879 100644 --- a/pages/everdayRenven/components/CarAnalysis.vue +++ b/pages/everdayRenven/components/CarAnalysis.vue @@ -235,7 +235,7 @@ textColor: '#747474', textSize: uni.upx2px(20), formatter: (val) => { - console.log(val) + return parseInt(val)+'辆' } }], @@ -274,14 +274,11 @@ this.getProportion(this.canvasTab, params) this.getAnalysisDesc(this.canvasTab, params) }, - // tapchart(e, id) { - // rincanvas[id].showToolTip(e) - // }, + tap(e) { rincanvas[e.target.id].touchLegend(e); rincanvas[e.target.id].showToolTip(e); }, - showPie(obj) { let data = { series: [] diff --git a/pages/everdayRenven/components/CustomerAnalysis.vue b/pages/everdayRenven/components/CustomerAnalysis.vue index a0756f5..717693d 100644 --- a/pages/everdayRenven/components/CustomerAnalysis.vue +++ b/pages/everdayRenven/components/CustomerAnalysis.vue @@ -6,10 +6,10 @@
{{canvasTab==1 ? '消费能力分析' : '消费人群分析'}}
{{canvasTab==1? '消费人群': '消费能力'}}占比
- +
年龄层占比
- - + +
分析{{proportionList[canvasTab][1]}}
@@ -18,7 +18,7 @@ @@ -677,13 +730,15 @@ box-sizing: border-box; -webkit-overflow-scrolling: touch; } + .mt8 { margin-top: 16rpx; } + cover-view.page-title { color: #fff; } - + .page-title { background-color: #fcfcfc; display: flex; @@ -691,13 +746,15 @@ height: 110rpx; padding: 0 24rpx; justify-content: space-between; - + color: #000; font-size: 30rpx; } + .page-title text:last-child { color: #383838; } + .fixed-box { background-color: #686D8F; /* background: linear-gradient(to right, #686D8F, #A1ACC6); */ @@ -710,73 +767,84 @@ box-sizing: border-box; color: #fff; } + /* 业态 */ .operation-cate-content { height: 585rpx; width: 690rpx; margin: 0 auto; } + .operation-model-content { height: 480rpx; width: 690rpx; margin: 0 auto; } + /* 门店 */ .shop-box { margin: 32rpx 20rpx; border-radius: 8rpx; background-color: #F6F8FA; padding: 36rpx 20rpx; - + } + .tab-shop { - + color: #999999; white-space: nowrap; /* display: flex; align-items: center; */ - + } + .tab-shop .cate-name { padding-right: 16rpx; font-size: 26rpx; display: inline-block; vertical-align: middle; } - .tab-shop .cate-name + .cate-name::before { + + .tab-shop .cate-name+.cate-name::before { content: '|'; color: #eeeeee; padding-right: 16rpx; } + .tab-shop .cate-name.active { color: #000; font-size: 28rpx; font-weight: 600; - + } + .tab-content { display: flex; flex-wrap: wrap; margin-top: 24rpx; - transition: all 0.5s cubic-bezier(0, 1, 0.5, 1); + transition: all 0.5s cubic-bezier(0, 1, 0.5, 1); margin: 24rpx auto 0 auto; overflow: hidden; - height: inherit; - width: inherit; + height: inherit; + width: inherit; } - .pie-content{ + + .pie-content { margin: 0 30rpx; border-radius: 8rpx; box-shadow: 0 2rpx 10rpx 0 rgba(230, 230, 230, 0.49); background-color: #fff; position: relative; - margin-bottom: 48rpx; + margin-bottom: 48rpx; } + .pie-title { padding: 0 20rpx; line-height: 80rpx; - font-size: 26rpx; + font-size: 26rpx; } + /* 门店卡片 */ .shop-card { width: 210rpx; @@ -788,37 +856,43 @@ box-sizing: border-box; margin-top: 16rpx; } - .shop-card:nth-child(6n-5){ - background: url(/static/images/revenue/shop-card.png) no-repeat center 50%,linear-gradient(-35deg, #ed7c77 , #d6524c); + + .shop-card:nth-child(6n-5) { + background: url(/static/images/revenue/shop-card.png) no-repeat center 50%, linear-gradient(-35deg, #ed7c77, #d6524c); background-size: contain; } - - .shop-card:nth-child(6n-4){ - background: url(/static/images/revenue/shop-card.png) no-repeat center 50%,linear-gradient(-35deg, #d1bea8 , #ba9d7b ); + + .shop-card:nth-child(6n-4) { + background: url(/static/images/revenue/shop-card.png) no-repeat center 50%, linear-gradient(-35deg, #d1bea8, #ba9d7b); margin-left: 18rpx; background-size: contain; } + .shop-card:nth-child(6n-3) { - background: url(/static/images/revenue/shop-card.png) no-repeat center 50%,linear-gradient(-35deg, #929cc0 , #aab3d0 ); + background: url(/static/images/revenue/shop-card.png) no-repeat center 50%, linear-gradient(-35deg, #929cc0, #aab3d0); margin-left: 18rpx; background-size: contain; } + .shop-card:nth-child(6n-2) { - background: url(/static/images/revenue/shop-card.png) no-repeat center 50%,linear-gradient(-35deg, #779cb1 , #a3bbc9 ); + background: url(/static/images/revenue/shop-card.png) no-repeat center 50%, linear-gradient(-35deg, #779cb1, #a3bbc9); background-size: contain; margin-left: 0rpx; } + .shop-card:nth-child(6n-1) { - background: url(/static/images/revenue/shop-card.png) no-repeat center 50%,linear-gradient(-35deg, #c08d80 , #e8cbc7 ); + background: url(/static/images/revenue/shop-card.png) no-repeat center 50%, linear-gradient(-35deg, #c08d80, #e8cbc7); margin-left: 18rpx; background-size: contain; } + .shop-card:nth-child(6n) { - background: url(/static/images/revenue/shop-card.png) no-repeat center 50%,linear-gradient(-35deg, #5cbe9c , #95d5bf ); + background: url(/static/images/revenue/shop-card.png) no-repeat center 50%, linear-gradient(-35deg, #5cbe9c, #95d5bf); margin-left: 18rpx; background-size: contain; margin-left: 18rpx; } + .shop-card .shop-name { font-size: 24rpx; text-shadow: 0 2rpx 2rpx #A9a5a0; @@ -826,6 +900,7 @@ max-height: 62rpx; overflow: hidden; } + .shop-card image { border-radius: 50%; border: 2rpx solid #fff; @@ -833,8 +908,9 @@ width: 62rpx; height: 62rpx; } + .shop-card .price-num { - + font-size: 38rpx; font-family: Bahnschrift Regular; } @@ -849,32 +925,38 @@ background-size: contain; background-repeat: no-repeat; background-position: top center; - + } + .top-card { - background: linear-gradient(to top, #989fb9, #686d8f ); + background: linear-gradient(to top, #989fb9, #686d8f); margin-top: 24upx; padding: 32upx 0 32rpx 0; border-radius: 8rpx; } + .budgetamount { margin-left: 14rpx; color: #fff; font-family: 'Bahnschrift Regular'; } + .budget-title { - + color: #DEE1F1; padding: 4rpx 6rpx 2rpx 6rpx; border-radius: 2rpx; margin-right: 4rpx; - + } - .up-text-title ,.down-text-title{ + + .up-text-title, + .down-text-title { font-size: 32rpx; font-family: 'Bahnschrift Regular'; /* line-height: 1.2; */ } + .up-text-title:after { content: ""; margin-left: 6rpx; @@ -885,6 +967,7 @@ background-size: contain; } + .down-text-title:after { content: ""; margin-left: 6rpx; @@ -893,19 +976,21 @@ display: inline-block; background: url('/static/images/revenue/down-arrow.png') no-repeat center; background-size: contain; - + } - + .box-top-title { display: flex; align-items: center; justify-content: space-between; } + .title-clock { color: #999; font-size: 24upx; text-align: right; } + /* .more-btn,.weisc-ico { display: flex; @@ -914,7 +999,7 @@ color: #dd7575; font-size: 30upx; } */ - .more-btn:after{ + .more-btn:after { content: ''; display: inline-block; margin-left: 8upx; @@ -923,7 +1008,7 @@ background: url(../../static/images/effective/sj.png) no-repeat center; background-size: contain; } - + .box-center-title { font-size: 24upx; color: #010101; @@ -931,81 +1016,94 @@ padding: 0 16upx; background-color: #DEDEDE; text-align: center; - + } + .uni-icon-arrowdown { font-size: 24rpx; } + .box-center-box { - + /* margin-bottom: 16rpx; */ padding: 0 24rpx; } + .center-title { color: #DEDEDE; font-size: 24rpx; } + .center-num { font-size: 64rpx; color: #fff; font-family: Bahnschrift Regular; } - .check-unit,.budgetamount { + + .check-unit, + .budgetamount { font-size: 24rpx; color: #DEE1F1; text-align: center; } - + .main-amount-title { - + color: #DEE1F1; font-size: 24rpx; /* flex: 1; */ } - .tab-unit { + + .tab-unit { background-color: #3A3E5B; - border-radius: 24rpx 0 0 24rpx; + border-radius: 24rpx 0 0 24rpx; color: #fff; font-size: 24rpx; position: relative; right: -12px; padding: 0 20rpx; } + .check-price-color { color: #fff; font-size: 34rpx; font-family: Bahnschrift Regular; line-height: 1.2; } + .check-price-color text { font-size: 22rpx; } + .tab-icon2 { font-size: 26rpx; color: #DEDEDE; flex: 1; } - + .tab-unit-num { font-size: 24rpx; color: #fff; } - + .tab-unit-num+.tab-unit-num:before { content: '/'; margin: 0 4rpx; color: #fff; } - .priceGreen,.priceGreen.tab-unit-num { + + .priceGreen, + .priceGreen.tab-unit-num { color: #7CB9A5; /* font-size: 28rpx; */ } - - .priceRed,.tab-unit-num.priceRed { + + .priceRed, + .tab-unit-num.priceRed { color: #DD7575; /* font-size: 28rpx; */ } - + /* 弹出内容 */ .uni-mask { position: absolute; @@ -1019,6 +1117,7 @@ width: 750rpx; opacity: 0.6; } + .uni-popup { position: fixed; z-index: 999; @@ -1040,6 +1139,7 @@ justify-content: flex-start; padding: 0 30upx 30upx 30upx; } + .header-top { font-size: 30rpx; font-weight: 600; @@ -1063,12 +1163,13 @@ font-size: 24rpx; align-items: center; justify-content: space-between; - + box-sizing: border-box; position: relative; } + .pop-row .pop-row-bottom { - + position: absolute; height: 2rpx; width: 100%; @@ -1089,7 +1190,8 @@ display: inline-block; vertical-align: middle; } -/* .customer-title { + + /* .customer-title { color: #525280; font-size: 32rpx; font-weight: 600; @@ -1111,7 +1213,7 @@ color: #606060; font-size: 32rpx; } - + .analysis-tabs { margin: 24rpx auto; width: 708rpx; @@ -1121,12 +1223,14 @@ border-radius: 39rpx; display: flex; } + .tab { text-align: center; flex: 1; height: 76rpx; line-height: 76rpx; } + .tab.active { background: #f2f4f9; color: #647BD1;