Commit 32a716d2 by 张立顺

样式和bug修复

1 parent e002e12d
...@@ -83,6 +83,29 @@ Component({ ...@@ -83,6 +83,29 @@ Component({
left: '25%', left: '25%',
right: '15%' right: '15%'
}, },
tooltip: {
trigger: 'axis',
formatter: function(params) {
console.log(params,'formatter');
// debugger
// + '\n'
var html = params[0].name
html += '\n'
for (var i = 0; i < params.length; i++) {
let unit = i+1 == params.length? '':'\n'
let template = params[i].marker + params[i].seriesName + ':' + ' ' + params[i].value
if (option.series[params[i].seriesIndex].valueType == 'percent') {
template = template + '%' + unit
} else {
template = template + unit
}
html += template
}
// html += params[0].name
console.log(html,'html');
return html
}
},
// 滚动设置 // 滚动设置
dataZoom: [ dataZoom: [
{ {
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
padding: 24rpx 20rpx 0rpx; padding: 24rpx 20rpx 0rpx;
.row { .row {
font-size: 24rpx; font-size: 24rpx;
padding: 16rpx 0; padding: 16rpx 0;
border-bottom: 0.5rpx solid #e4e6ee; border-bottom: 0.5rpx solid #e4e6ee;
......
...@@ -30,13 +30,14 @@ ...@@ -30,13 +30,14 @@
padding: 24rpx 20rpx 0rpx; padding: 24rpx 20rpx 0rpx;
.row { .row {
height: 115rpx;
font-size: 24rpx; font-size: 24rpx;
padding: 16rpx 0; padding: 16rpx 0;
border-bottom: 0.5rpx solid #e4e6ee; border-bottom: 0.5rpx solid #e4e6ee;
.label { .label {
line-height: 18rpx; line-height: 18rpx;
margin-bottom: 19rpx; margin-bottom: 22rpx;
} }
.num { .num {
...@@ -52,10 +53,13 @@ ...@@ -52,10 +53,13 @@
} }
.td:first-child { .td:first-child {
width: 60%; width: 55%;
} }
.td:nth-child(2), .td:nth-child(2){
width: 25%;
}
// .td:nth-child(2),
.td:nth-child(3) { .td:nth-child(3) {
width: 20%; width: 20%;
} }
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
keys="{{ opts.keys }}" keys="{{ opts.keys }}"
></echart-pie> ></echart-pie>
<!-- wx:if="{{ chartData.diagnosticResults && !tabIndx }}" --> <!-- wx:if="{{ chartData.diagnosticResults && !tabIndx }}" -->
<view class="resultContainer" wx:if="{{ chartData.diagnosticResults & !tabIndex }}"> <view class="resultContainer" wx:if="{{ chartData.diagnosticResults && !tabIndex }}">
<view class="title">诊断结果</view> <view class="title">诊断结果</view>
<view class="content">{{ chartData.diagnosticResults }}</view> <view class="content">{{ chartData.diagnosticResults }}</view>
</view> </view>
......
...@@ -157,6 +157,7 @@ Page({ ...@@ -157,6 +157,7 @@ Page({
let apiNameTendency = outputApi[tabIndx ? 'analysisTendencyVdquotation' : 'analysisTendency'] let apiNameTendency = outputApi[tabIndx ? 'analysisTendencyVdquotation' : 'analysisTendency']
// console.log(apiName); // console.log(apiName);
// console.log(apiNameTendency); // console.log(apiNameTendency);
wx.$api.showLoading('加载中...')
apiName(params).then(res => { apiName(params).then(res => {
// console.log(res, 'analysisOverview') // console.log(res, 'analysisOverview')
let revenueData = res let revenueData = res
...@@ -168,6 +169,7 @@ Page({ ...@@ -168,6 +169,7 @@ Page({
revenueData[key].comparedWithLastMonth = month == null ? '0%' : Math.abs(month) + '%' revenueData[key].comparedWithLastMonth = month == null ? '0%' : Math.abs(month) + '%'
revenueData[key].comparedWithLastYear = year == null ? '0%' : Math.abs(year) + '%' revenueData[key].comparedWithLastYear = year == null ? '0%' : Math.abs(year) + '%'
} }
wx.$api.hideLoading()
this.setData({ this.setData({
revenueData revenueData
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!