yangyin
2023-12-26 f025a3827feeebb6f7131a93899a8f7e597a3caa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!--test/reportTable/index.wxml-->
<view>
  <view class="tabHead" style="width:{{width}}px;height:50px;">
    <view>
      <picker mode="date" fields="month" value="{{dateStart}}" end="{{endDate}}" bindchange="changeDateStart">
        <view class="tui-picker-detail">
          {{stationName}}{{requestData.year}}年{{requestData.month}}月报表
        </view>
      </picker>
    </view>
    <icon class="iconfont icon-xia {{isShowFilter?'.xia':'.down'}}"></icon>
  </view>
  <view style="display:flex;">
    <view style="width:100%;display:flex;flex-direction: column;margin-right:1px;">
      <view style="display:flex;width:100%;margin-top:1px;">
        <view class="date_thead_box"> 日期</view>
        <view class="body_item"> 供水量(m³)</view>
        <view class="body_item flex"> 用电量(KWh)</view>
        <view class="body_item flex"> 千吨水能耗</view>
      </view>
      <scroll-view scroll-y="{{true}}"
        style="height:calc({{height/2}}px - 125px);margin-top: 1px;margin-left: 1px;width:100%"
        bindscroll="VerticalMain">
 
        <view wx:for="{{timeList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="tabBox"
          id="main-{{index}}">
          <view class="date_box">
            {{item.day}}
          </view>
          <view  class="col " style="{{backgroundSizeQ[index]?'background-size:'+backgroundSizeQ[index]:''}}">
            {{item.Q}}
          </view>
          <view class="col" style="{{backgroundSizeD[index]?'background-size:'+backgroundSizeD[index]:''}}">
            {{item.D}}
          </view>
          <view class="col">
            {{item.NH}}
          </view>
        </view>
        <view class="tabBox">
          <view  class="date_box">合计</view>
          <view  class="col">{{QS}}</view>
          <view class="col ">{{DS}}</view>
          <view class="col ">{{NHS}}</view>
        </view>
      </scroll-view>
 
    </view>
 
  </view>
  <!-- <view style="background-image: linear-gradient(90deg, #80beff 50%, #0064cc 100%);color:#fff;padding:10rpx 20rpx;">图表展示</view> -->
  <!-- <view class="container">
    <ec-canvas id="mychart-dom-fh" canvas-id="mychart-fh" ec="{{fh}}"></ec-canvas>
  </view> -->
  <view  class="VerticalMain" scroll-y scroll-with-animation
    style="width:100%;">
    <scroll-view scroll-x="true" class="menubar">
      <view class="menubarItem" style="background-image: linear-gradient(90deg, #80beff 50%, #0064cc 100%);color:#fff;">
        <text class=" {{curveTabIndex==0?'active':''}}" bindtap="tapCurveTab" data-index="0">供水量</text>
        <text class=" {{curveTabIndex==1?'active':''}}" bindtap="tapCurveTab" data-index="1">用电量</text>
        <text class=" {{curveTabIndex==2?'active':''}}" bindtap="tapCurveTab" data-index="2">千吨水能耗</text>
      </view>
    </scroll-view>
 
    <view class="flex_wrp_body">
      <view wx:if="{{curveTabIndex==0}}" class="">
        <view class="container" style="width:100%;">
          <ec-canvas id="mychart-dom-q" canvas-id="mychart-q" ec="{{q}}"></ec-canvas>
        </view>
      </view>
      <view wx:if="{{curveTabIndex==1}}" class="">
        <view class="container" style="width:100%;">
          <ec-canvas id="mychart-dom-d" canvas-id="mychart-d" ec="{{d}}"></ec-canvas>
        </view>
      </view>
      <view wx:if="{{curveTabIndex==2}}" class="">
        <view class="container" style="width:100%;">
          <ec-canvas id="mychart-dom-nh" canvas-id="mychart-nh" ec="{{nh}}"></ec-canvas>
        </view>
      </view>
    </view>
  </view>
</view>