index.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <view class="chart">
  2. <view class="item" wx:for="{{statistics}}" style="color: {{item.color}} !important;">
  3. <view class="circle" style="box-shadow: inset 0 0 0 8rpx {{item.color}};">
  4. <view class="circle_left ab" style="{{render.leftRate(item.achievingRate)}}" />
  5. <view class="circle_right ab" style="{{render.rightRate(item.achievingRate,item.color)}}" />
  6. <view class="circle_text">
  7. {{item.achievingRate}}%
  8. </view>
  9. </view>
  10. <view class="s-label">
  11. {{item.label}}
  12. </view>
  13. <view class="s-fulfill line-1">
  14. {{item.fulfill}}万
  15. </view>
  16. <view class="s-row line-1">
  17. 目标:{{item.target}}万
  18. </view>
  19. <view class="s-row line-1">
  20. 差额:{{item.distance}}万
  21. </view>
  22. </view>
  23. </view>
  24. <view class="table">
  25. <view class="label">
  26. <text class="text" />
  27. 业绩明细
  28. </view>
  29. <view class="row-label">
  30. <view class="line-1">
  31. 月/季/年
  32. </view>
  33. <view class="line-1">
  34. 达成金额(万)
  35. </view>
  36. <view class="line-1">
  37. 目标金额(万)
  38. </view>
  39. <view class="line-1">
  40. 达成率
  41. </view>
  42. </view>
  43. <view>
  44. <view class="row" wx:for="{{table}}">
  45. <view class="line-1">
  46. {{item.label}}
  47. </view>
  48. <view class="line-1">
  49. {{item.fulfill}}
  50. </view>
  51. <view class="line-1">
  52. {{item.target}}
  53. </view>
  54. <view class="line-1">
  55. {{item.achievingRate}}
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <My_empty wx:if="{{list.length==0}}" />
  61. <wxs module="render">
  62. module.exports = {
  63. rightRate: function (rate, color) {
  64. if (rate - 0 < 50) {
  65. return 'transform: rotate(' + 3.6 * (rate - 0) + 'deg);';
  66. } else {
  67. return "transform: rotate(0);border-color:" + color + ";";
  68. }
  69. },
  70. leftRate: function (rate) {
  71. if (rate - 0 >= 50) {
  72. if (rate - 0 >= 100) rate = 100;
  73. return 'transform: rotate(' + 3.6 * (rate - 50) + 'deg);';
  74. }
  75. }
  76. }
  77. </wxs>