<block wx:if="{{statistics.length}}">
	<view class="label">区域业绩目标
		<picker wx:if="{{areafullname}}" mode="selector" range='{{areanames}}' range-key='areaname' bindchange="onChange">
			({{areafullname}})
		</picker>
	</view>
	<view class="chart">
		<view class="item" wx:for="{{statistics}}" style="color: {{item.color}} !important;">
			<view class="circle" style="box-shadow: inset 0 0 0 8rpx  {{item.color}};">
				<view class="circle_left ab" style="{{render.leftRate(item.achievingRate)}}" />
				<view class="circle_right ab" style="{{render.rightRate(item.achievingRate,item.color)}}" />
				<view class="circle_text">
					{{item.achievingRate}}%
				</view>
			</view>
			<view class="s-label">
				{{item.label}}
			</view>
			<view class="s-fulfill line-1">
				{{item.fulfill}}万
			</view>
			<view class="s-row line-1">
				目标:{{item.target}}万
			</view>
			<view class="s-row line-1">
				差额:{{item.distance}}万
			</view>
		</view>
	</view>
	<view style="height: 20rpx;" />
</block>
<wxs module="render">
	module.exports = {
		rightRate: function (rate, color) {
			if (rate - 0 < 50) {
				return 'transform: rotate(' + 3.6 * (rate - 0) + 'deg);';
			} else {
				return "transform: rotate(0);border-color:" + color + ";";
			}
		},
		leftRate: function (rate) {
			if (rate - 0 >= 50) {
				if (rate - 0 >= 100) rate = 100;
				return 'transform: rotate(' + 3.6 * (rate - 50) + 'deg);';
			}
		}
	}
</wxs>