Commit dd5e929738a09ab38c5fff274401f7289832b159

Authored by 周铨
1 parent 955548a6

调试滚动列表接口和优化整体运行情况模块

... ... @@ -27,6 +27,11 @@ export const API_CONST = {
27 27 miniData: {
28 28 url: `/open/qx-apaas-custom/hczd/index`,
29 29 method: "POST"//参数:{"corpCode": "default"}
  30 + },
  31 + getDate:{
  32 + url:`/open/qx-apaas-custom/hczd/getDate`,
  33 + method:"POST"//参数
  34 +
30 35 }
31 36 }
32 37
... ...
1   -.overallOperation_main{background:#FFFFFF;border-radius:20rpx;display:flex;flex-direction:column;flex-wrap:wrap;justify-content:space-between;margin:54rpx 24rpx 20rpx;max-height:900rpx;padding-bottom:20rpx}.overallOperation_main .circle_left_show{margin:0 24rpx;height:240rpx}.overallOperation_main .circle_left_show .deviceNum{font-family:DINAlternate-Bold;font-size:40rpx;color:#323241;letter-spacing:0;font-weight:700}.overallOperation_main .circle_left_show .deviceCont{font-family:PingFangSC-Regular;font-size:28rpx;color:#323241;letter-spacing:0;font-weight:400}.overallOperation_main .overall_data{flex:1;padding:24rpx;background:#F6F6F6;border-radius:16rpx;margin-top:24rpx}.overallOperation_main .overall_data .device_type{font-family:PingFangSC-Medium;font-size:28rpx;color:#323241;letter-spacing:0;height:36rpx;line-height:36rpx;font-weight:550;margin-bottom:28rpx}.overallOperation_main .overall_data .data_two{height:34rpx;display:flex;justify-content:space-between;align-items:center;width:100%}.overallOperation_main .overall_data .data_two .left{font-family:PingFangSC-Regular;font-size:24rpx;color:#666671;letter-spacing:0;font-weight:400}.overallOperation_main .overall_data .data_two .right .right_num{font-family:PingFangSC-Regular;font-size:24rpx;color:#00C653;letter-spacing:0;font-weight:400}.overallOperation_main .overall_data .data_two .right .right_unit{font-family:PingFangSC-Regular;font-size:24rpx;color:#9898A0;letter-spacing:0;font-weight:400}.overallOperation_main .smallBox{height:170rpx}.overallOperation_main .marginRight{margin-right:20rpx}
  1 +.overallOperation_main{background:#FFFFFF;border-radius:20rpx;display:flex;flex-direction:column;flex-wrap:wrap;justify-content:space-between;margin:54rpx 24rpx 20rpx;max-height:900rpx;padding-bottom:20rpx}.overallOperation_main .circle_left_show{margin:0 24rpx;height:240rpx}.overallOperation_main .circle_left_show .deviceNum{font-family:DINAlternate-Bold;font-size:40rpx;color:#323241;letter-spacing:0;font-weight:700}.overallOperation_main .circle_left_show .deviceCont{font-family:PingFangSC-Regular;font-size:28rpx;color:#323241;letter-spacing:0;font-weight:400}.overallOperation_main .overall_data{padding:24rpx;background:#F6F6F6;border-radius:16rpx;margin-top:24rpx}.overallOperation_main .overall_data .device_type{font-family:PingFangSC-Medium;font-size:28rpx;color:#323241;letter-spacing:0;height:36rpx;line-height:36rpx;font-weight:550;margin-bottom:28rpx}.overallOperation_main .overall_data .data_two{height:34rpx;display:flex;justify-content:space-between;align-items:center;width:100%}.overallOperation_main .overall_data .data_two .left{font-family:PingFangSC-Regular;font-size:24rpx;color:#666671;letter-spacing:0;font-weight:400}.overallOperation_main .overall_data .data_two .right .right_num{font-family:PingFangSC-Regular;font-size:24rpx;color:#00C653;letter-spacing:0;font-weight:400}.overallOperation_main .overall_data .data_two .right .right_unit{font-family:PingFangSC-Regular;font-size:24rpx;color:#9898A0;letter-spacing:0;font-weight:400}.overallOperation_main .smallBox{height:170rpx}.overallOperation_main .marginRight{margin-right:20rpx}.overallOperation_main .viewHeight{height:192rpx;margin-top:0}
... ...
... ... @@ -13,7 +13,6 @@
13 13 .circle_left_show {
14 14 margin: 0 24rpx ;
15 15 height: 240rpx;
16   - // background: red;
17 16
18 17 .deviceNum {
19 18 font-family: DINAlternate-Bold;
... ... @@ -32,65 +31,62 @@
32 31 }
33 32
34 33 }
35   -
36 34 .overall_data {
37   - // width: 266rpx;
38   - flex: 1;
  35 + // flex: 1;
39 36 padding: 24rpx;
40 37 background: #F6F6F6;
41 38 border-radius: 16rpx;
42 39 margin-top: 24rpx;
43   -
44   - // margin: 0 12rpx;
45   - .device_type {
46   - font-family: PingFangSC-Medium;
47   - font-size: 14*2rpx;
48   - color: #323241;
49   - letter-spacing: 0;
50   - height: 36rpx;
51   - line-height: 36rpx;
52   - font-weight: 550;
53   - margin-bottom: 28rpx;
54   - }
55   -
56   - .deviceMargin {
57   - // margin: 4rpx 0;
58   - }
59   -
60   - .data_two {
61   - height: 34rpx;
62   - display: flex;
63   - justify-content: space-between;
64   - align-items: center;
65   - width: 100%;
66   -
67   -
68   - .left {
69   - font-family: PingFangSC-Regular;
70   - font-size: 12*2rpx;
71   - color: #666671;
72   - letter-spacing: 0;
73   - font-weight: 400;
74   - }
75   -
76   - .right {
77   - .right_num {
78   - font-family: PingFangSC-Regular;
79   - font-size: 12*2rpx;
80   - color: #00C653;
  40 + // margin: 0 12rpx;
  41 + .device_type {
  42 + font-family: PingFangSC-Medium;
  43 + font-size: 14*2rpx;
  44 + color: #323241;
81 45 letter-spacing: 0;
82   - font-weight: 400;
  46 + height: 36rpx;
  47 + line-height: 36rpx;
  48 + font-weight: 550;
  49 + margin-bottom: 28rpx;
83 50 }
84   -
85   - .right_unit {
86   - font-family: PingFangSC-Regular;
87   - font-size: 12*2rpx;
88   - color: #9898A0;
89   - letter-spacing: 0;
90   - font-weight: 400;
  51 +
  52 + .deviceMargin {
  53 + // margin: 4rpx 0;
  54 + }
  55 +
  56 + .data_two {
  57 + height: 34rpx;
  58 + display: flex;
  59 + justify-content: space-between;
  60 + align-items: center;
  61 + width: 100%;
  62 +
  63 +
  64 + .left {
  65 + font-family: PingFangSC-Regular;
  66 + font-size: 12*2rpx;
  67 + color: #666671;
  68 + letter-spacing: 0;
  69 + font-weight: 400;
  70 + }
  71 +
  72 + .right {
  73 + .right_num {
  74 + font-family: PingFangSC-Regular;
  75 + font-size: 12*2rpx;
  76 + color: #00C653;
  77 + letter-spacing: 0;
  78 + font-weight: 400;
  79 + }
  80 +
  81 + .right_unit {
  82 + font-family: PingFangSC-Regular;
  83 + font-size: 12*2rpx;
  84 + color: #9898A0;
  85 + letter-spacing: 0;
  86 + font-weight: 400;
  87 + }
  88 + }
91 89 }
92   - }
93   - }
94 90 }
95 91 .smallBox {
96 92 height: 170rpx;
... ... @@ -98,4 +94,8 @@
98 94 .marginRight {
99 95 margin-right: 20rpx;
100 96 }
  97 + .viewHeight {
  98 + height: 192rpx ;
  99 + margin-top: 0;
  100 + }
101 101 }
\ No newline at end of file
... ...
... ... @@ -11,7 +11,7 @@
11 11 </view>
12 12 </van-circle>
13 13 </view>
14   - <view class="{{['overall_data',index === 0||index === 2|| index === 4?'smallBox':'',index === 0||index === 1?'marginRight':'']}}" wx:for="{{overallDataList}}" wx:for-item="item" wx:for-index="index" wx:key="index" data-index='{{index}}'>
  14 + <view class="{{['overall_data',index === 0||index === 2|| index === 3?'smallBox':'',index === 0||index === 1?'marginRight':'',index === 2 ? 'viewHeight':'']}}" wx:for="{{overallDataList}}" wx:for-item="item" wx:for-index="index" wx:key="index" data-index='{{index}}'>
15 15 <view class="device_type">
16 16 {{item.type}}
17 17 </view>
... ... @@ -19,35 +19,35 @@
19 19 <text class="left">{{item.oneLabelName}}</text>
20 20 <text class="right">
21 21 <text class="right_num">{{item.oneLabelNum}}</text>
22   - <text class="right_unit">{{item.unit}}</text>
  22 + <text class="right_unit">{{item.unitOne}}</text>
23 23 </text>
24 24 </view>
25 25 <view class="data_two deviceMargin">
26 26 <text class="left">{{item.twoLabelName}}</text>
27 27 <text class="right">
28 28 <text class="right_num">{{item.twoLabelNum}}</text>
29   - <text class="right_unit">{{item.unit}}</text>
  29 + <text class="right_unit">{{item.unitTwo}}</text>
30 30 </text>
31 31 </view>
32 32 <view class="data_two deviceMargin">
33 33 <text class="left">{{item.threeLabelName}}</text>
34 34 <text class="right">
35 35 <text class="right_num">{{item.threeLabelNum}}</text>
36   - <text class="right_unit">{{item.unit}}</text>
  36 + <text class="right_unit">{{item.unitThree}}</text>
37 37 </text>
38 38 </view>
39   - <view class="data_two deviceMargin" wx:if="{{item.fiveLabelName}}">
  39 + <view class="data_two deviceMargin" wx:if="{{item.fourLabelName}}">
40 40 <text class="left">{{item.fourLabelName}}</text>
41 41 <text class="right">
42 42 <text class="right_num">{{item.fourLabelNum}}</text>
43   - <text class="right_unit">{{item.unit}}</text>
  43 + <text class="right_unit">{{item.unitFour}}</text>
44 44 </text>
45 45 </view>
46 46 <view class="data_two deviceMargin" wx:if="{{item.fiveLabelName}}">
47 47 <text class="left">{{item.fiveLabelName}}</text>
48 48 <text class="right">
49 49 <text class="right_num">{{item.fiveLabelNum}}</text>
50   - <text class="right_unit">{{item.unit}}</text>
  50 + <text class="right_unit">{{item.unitFive}}</text>
51 51 </text>
52 52 </view>
53 53 </view>
... ...
... ... @@ -32,7 +32,6 @@
32 32 }
33 33
34 34 .overallOperation_main .overall_data {
35   - flex: 1;
36 35 padding: 24rpx;
37 36 background: #F6F6F6;
38 37 border-radius: 16rpx;
... ... @@ -89,3 +88,8 @@
89 88 .overallOperation_main .marginRight {
90 89 margin-right: 20rpx;
91 90 }
  91 +
  92 +.overallOperation_main .viewHeight {
  93 + height: 192rpx;
  94 + margin-top: 0;
  95 +}
... ...
1   -.tableData_main{border-bottom:1px solid #B0C8FE}.tableData_main .table_head{background:#DCE7FF;border:1px solid #B0C8FE;border-radius:6rpx 6rpx 0 0;height:72rpx;line-height:72rpx;display:flex}.tableData_main .head_col{font-family:PingFangSC-Regular;font-size:28rpx;color:#323241;text-align:left;font-weight:400;padding-left:24rpx}.tableData_main .head_one{width:150rpx}.tableData_main .head_two{width:100rpx}.tableData_main .head_three{flex:1}.tableData_main .swiper_container{height:350rpx}.tableData_main .table_item{display:flex;font-family:PingFangSC-Regular;font-size:24rpx;color:#323241;text-align:center;font-weight:400;background:#F5F6FD;border:1rpx solid #B0C8FE;height:72rpx;line-height:72rpx;padding-left:24rpx}
  1 +.tableData_main{width:180%;overflow:auto;border-bottom:1px solid #B0C8FE}.tableData_main .table_head{background:#DCE7FF;border:1px solid #B0C8FE;border-radius:6rpx 6rpx 0 0;height:72rpx;line-height:72rpx;display:flex}.tableData_main .head_col,.tableData_main .content_col{font-family:PingFangSC-Regular;font-size:28rpx;color:#323241;text-align:left;font-weight:400;padding-left:24rpx;white-space:nowrap}.tableData_main .head_one{min-width:300rpx}.tableData_main .head_two{min-width:250rpx}.tableData_main .head_three{min-width:250rpx}.tableData_main .head_four{min-width:250rpx}.tableData_main .swiper_container{height:350rpx}.tableData_main .table_item{display:flex;font-family:PingFangSC-Regular;font-size:24rpx;color:#323241;text-align:center;font-weight:400;background:#F5F6FD;border:1rpx solid #B0C8FE;height:72rpx;line-height:72rpx}
... ...
1 1 .tableData_main {
2   -
3   - // background: red;
  2 + width: 180%;
  3 + overflow: auto;
4 4 border-bottom: 1px solid #B0C8FE;
  5 +
5 6 .table_head {
6 7 background: #DCE7FF;
7 8 border: 1px solid #B0C8FE;
... ... @@ -11,27 +12,34 @@
11 12 display: flex;
12 13 }
13 14
14   - .head_col {
  15 + .head_col,
  16 + .content_col {
15 17 font-family: PingFangSC-Regular;
16 18 font-size: 14*2rpx;
17 19 color: #323241;
18 20 text-align: left;
19 21 font-weight: 400;
20 22 padding-left: 24rpx;
  23 + white-space: nowrap;
21 24 }
22 25
  26 +
23 27 .head_one {
24   - width: 150rpx;
  28 + min-width: 300rpx;
25 29 }
26 30
27 31 .head_two {
28   - width: 100rpx;
  32 + min-width: 250rpx;
29 33 }
30 34
31 35 .head_three {
32   - flex: 1
  36 + min-width: 250rpx;
33 37 }
34 38
  39 + .head_four {
  40 + min-width: 250rpx;
  41 +
  42 + }
35 43
36 44 .swiper_container {
37 45 height: 350rpx;
... ... @@ -49,7 +57,7 @@
49 57 border: 1rpx solid #B0C8FE;
50 58 height: 72rpx;
51 59 line-height: 72rpx;
52   - padding-left: 24rpx;
  60 + // padding-left: 24rpx;
53 61
54 62 }
55 63 }
\ No newline at end of file
... ...
... ... @@ -7,6 +7,10 @@ Component({
7 7 tableList: {
8 8 type: Array,
9 9 value: []
  10 + },
  11 + tableHeader: {
  12 + type: Object,
  13 + value: {}
10 14 }
11 15 },
12 16
... ... @@ -14,13 +18,15 @@ Component({
14 18 * 组件的初始数据
15 19 */
16 20 data: {
17   -
  21 +
18 22 },
19 23
20 24 /**
21 25 * 组件的方法列表
22 26 */
23 27 methods: {
24   -
  28 +
  29 + },
  30 + ready() {
25 31 }
26 32 })
... ...
1 1 <view class="tableData_main">
2 2 <view class="table_head">
3 3 <text class="head_col head_one">日期</text>
4   - <text class="head_col head_two">变量</text>
5   - <text class="head_col head_three">数值</text>
  4 + <text class="head_col head_two">{{tableHeader.one}}</text>
  5 + <text class="head_col head_three">{{tableHeader.two}}</text>
  6 + <text class="head_col head_four">{{tableHeader.three}}</text>
6 7 </view>
7   - <swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="2000" display-multiple-items="5">
  8 + <swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="2000" display-multiple-items="{{tableList.length>5?5:tableList.length}}">
8 9 <view wx:for="{{tableList}}" class="container_swiper" wx:key="index" wx:for-item="item" wx:for-index="index">
9 10 <swiper-item>
10 11 <view class="table_item">
... ... @@ -12,10 +13,13 @@
12 13 {{item.date}}
13 14 </view>
14 15 <view class="content_col head_two">
15   - {{item.name}}
  16 + {{item[tableHeader.val+tableHeader.key_one]}}
16 17 </view>
17 18 <view class="content_col head_three">
18   - {{item.num}}
  19 + {{item[tableHeader.val+tableHeader.key_two]}}
  20 + </view>
  21 + <view class="content_col head_four">
  22 + {{item[tableHeader.val+tableHeader.key_three]}}
19 23 </view>
20 24 </view>
21 25 </swiper-item>
... ...
1 1 .tableData_main {
  2 + width: 180%;
  3 + overflow: auto;
2 4 border-bottom: 1px solid #B0C8FE;
3 5 }
4 6
... ... @@ -11,25 +13,31 @@
11 13 display: flex;
12 14 }
13 15
14   -.tableData_main .head_col {
  16 +.tableData_main .head_col,
  17 +.tableData_main .content_col {
15 18 font-family: PingFangSC-Regular;
16 19 font-size: 28rpx;
17 20 color: #323241;
18 21 text-align: left;
19 22 font-weight: 400;
20 23 padding-left: 24rpx;
  24 + white-space: nowrap;
21 25 }
22 26
23 27 .tableData_main .head_one {
24   - width: 150rpx;
  28 + min-width: 300rpx;
25 29 }
26 30
27 31 .tableData_main .head_two {
28   - width: 100rpx;
  32 + min-width: 250rpx;
29 33 }
30 34
31 35 .tableData_main .head_three {
32   - flex: 1;
  36 + min-width: 250rpx;
  37 +}
  38 +
  39 +.tableData_main .head_four {
  40 + min-width: 250rpx;
33 41 }
34 42
35 43 .tableData_main .swiper_container {
... ... @@ -47,5 +55,4 @@
47 55 border: 1rpx solid #B0C8FE;
48 56 height: 72rpx;
49 57 line-height: 72rpx;
50   - padding-left: 24rpx;
51 58 }
... ...
... ... @@ -37,121 +37,76 @@ Page({
37 37 type: 5
38 38 }
39 39 ],
40   - deviceDataList: [
41   - {
42   - type: '光伏',
43   - imgUrl: "./../../img/device_photovoltaic.png",
44   - dayNumName: "日发电量",
45   - dayNum: "0",
46   - unit: "kWh",
47   - totalNum: "0",
48   - totalNumName: "总发电量"
49   - },
50   - {
51   - type: '储能',
52   - imgUrl: "./../../img/device_energyStorage.png",
53   - dayNumName: "日发电量",
54   - dayNum: "0",
55   - unit: "kWh",
56   - totalNum: "0",
57   - totalNumName: "放发电量"
58   - },
59   - {
60   - type: '电能表',
61   - imgUrl: "./../../img/device_electricEnergy.png",
62   - dayNumName: "总有功功率",
63   - dayNum: "0",
64   - unit: "kWh",
65   - totalNum: "0",
66   - totalNumName: "总无功功率"
67   - },
68   - {
69   - type: '充电桩',
70   - imgUrl: "./../../img/device_chargeStation.png",
71   - dayNumName: "总有功功率",
72   - dayNum: "0",
73   - unit: "kWh",
74   - totalNum: "0",
75   - totalNumName: "总无功功率"
76   - },
77   - {
78   - type: '负载',
79   - imgUrl: "./../../img/device_load.png",
80   - dayNumName: "总有功功率",
81   - dayNum: "0",
82   - unit: "kWh",
83   - totalNum: "0",
84   - totalNumName: "总无功功率"
85   - },
86   - {
87   - type: '风电',
88   - imgUrl: "./../../img/device_windPower.png",
89   - dayNumName: "在线状态",
90   - dayNum: "0",
91   - unit: "",
92   - totalNum: "0",
93   - totalNumName: "故障状态"
94   - },
95   - ],
  40 + deviceDataList: [],
96 41 overallDataList: [
97 42 {
98 43 type: '光伏',
99   - oneLabelName: "总有功功率",
  44 + oneLabelName: "母线电压",
100 45 oneLabelNum: "20.21",
101   - unit: "kWh",
  46 + unitOne: "V",
  47 + unitTwo: "Hz",
  48 + unitThree: "kW",
102 49 twoLabelNum: "320.00",
103   - twoLabelName: "总无功功率",
104   - threeLabelName: "总直流功率",
  50 + twoLabelName: "PV电网频率",
  51 + threeLabelName: "PV负载功率",
105 52 threeLabelNum: '320.00'
106 53 },
107 54 {
108 55 type: '风电',
109 56 oneLabelName: "总有功功率",
110   - oneLabelNum: "20.21",
111   - unit: "kWh",
112   - twoLabelNum: "320.00",
  57 + oneLabelNum: "",
  58 + // unitOne: "kW",
  59 + // unitTwo: "kW",
  60 + // unitThree: "A",
  61 + // unitFour: "A",
  62 + // unitFive: "A",
  63 + twoLabelNum: "",
113 64 twoLabelName: "总无功功率",
114 65 threeLabelName: "A相电流",
115   - threeLabelNum: '65%',
  66 + threeLabelNum: '',
116 67 fourLabelName: "B相电流",
117   - fourLabelNum: '65%',
  68 + fourLabelNum: '',
118 69 fiveLabelName: "C相电流",
119   - fiveLabelNum: '65%',
  70 + fiveLabelNum: '',
120 71 },
121 72 {
122 73 type: '充电桩',
123   - oneLabelName: "充电桩数量",
  74 + oneLabelName: "A枪电压",
124 75 oneLabelNum: "20.21",
125   - unit: "kWh",
  76 + unitOne: "V",
  77 + unitTwo: "%",
  78 + unitthree: "V",
  79 + unitFour: "%",
126 80 twoLabelNum: "320.00",
127   - twoLabelName: "桩额功率",
128   - threeLabelName: "EMS使用",
129   - threeLabelNum: '320.00'
  81 + twoLabelName: "A枪SOC",
  82 + threeLabelName: "B枪电压",
  83 + threeLabelNum: '320.00',
  84 + fourLabelName: "B枪SOC",
  85 + fourLabelNum: '65%',
130 86 },
131 87
132 88 {
133 89 type: '电网',
134   - oneLabelName: "有功功率",
  90 + oneLabelName: "A相有功功率",
135 91 oneLabelNum: "20.21",
136   - unit: "kWh",
  92 + unitOne: "kW",
  93 + unitTwo: "kW",
  94 + unitthree: "kW",
137 95 twoLabelNum: "320.00",
138   - twoLabelName: "总无功功率",
139   - threeLabelName: "A相电流",
  96 + twoLabelName: "B相有功功率",
  97 + threeLabelName: "C相有功功率",
140 98 threeLabelNum: '65%',
141   - fourLabelName: "B相电流",
142   - fourLabelNum: '65%',
143   - fiveLabelName: "C相电流",
144   - fiveLabelNum: '65%',
145 99 },
146   -
147 100 {
148 101 type: '储能',
149   - oneLabelName: "组端SOC",
  102 + oneLabelName: "SOC",
150 103 oneLabelNum: "20.21",
151   - unit: "kWh",
  104 + unitOne: "%",
  105 + unitTwo: "A",
  106 + unitThree: "V",
152 107 twoLabelNum: "320.00",
153   - twoLabelName: "交流功率",
154   - threeLabelName: "母线电压",
  108 + twoLabelName: "总电流",
  109 + threeLabelName: "总电压",
155 110 threeLabelNum: '320.00'
156 111 },
157 112
... ... @@ -212,109 +167,7 @@ Page({
212 167 }
213 168 ],
214 169 dashboardList: [],// 仪表盘list数据,
215   - tableList: [
216   - //表格数据
217   - {
218   - date: "2024-10-10",
219   - name: 'Tom',
220   - num: "No.189,Grove St,Lot Angeles"
221   - },
222   - {
223   - date: "2024-10-10",
224   - name: 'Tom',
225   - num: "No.189,Grove St,Lot Angeles"
226   - },
227   - {
228   - date: "2024-10-10",
229   - name: 'Tom',
230   - num: "No.189,Grove St,Lot Angeles"
231   - },
232   - {
233   - date: "2024-10-10",
234   - name: 'Tom',
235   - num: "No.189,Grove St,Lot Angeles"
236   - },
237   - {
238   - date: "2024-10-10",
239   - name: 'Tom',
240   - num: "No.189,Grove St,Lot Angeles"
241   - },
242   - {
243   - date: "2024-10-10",
244   - name: 'Tom',
245   - num: "No.189,Grove St,Lot Angeles"
246   - },
247   - {
248   - date: "2024-10-10",
249   - name: 'Tom',
250   - num: "No.189,Grove St,Lot Angeles"
251   - },
252   - {
253   - date: "2024-10-10",
254   - name: 'Tom',
255   - num: "No.189,Grove St,Lot Angeles"
256   - },
257   - {
258   - date: "2024-10-10",
259   - name: 'Tom',
260   - num: "No.189,Grove St,Lot Angeles"
261   - },
262   - {
263   - date: "2024-10-10",
264   - name: 'Tom',
265   - num: "No.189,Grove St,Lot Angeles"
266   - },
267   - {
268   - date: "2024-10-10",
269   - name: 'Tom',
270   - num: "No.189,Grove St,Lot Angeles"
271   - },
272   - {
273   - date: "2024-10-10",
274   - name: 'Tom',
275   - num: "No.189,Grove St,Lot Angeles"
276   - },
277   - {
278   - date: "2024-10-10",
279   - name: 'Tom',
280   - num: "No.189,Grove St,Lot Angeles"
281   - },
282   - {
283   - date: "2024-10-10",
284   - name: 'Tom',
285   - num: "No.189,Grove St,Lot Angeles"
286   - },
287   - {
288   - date: "2024-10-10",
289   - name: 'Tom',
290   - num: "No.189,Grove St,Lot Angeles"
291   - },
292   - {
293   - date: "2024-10-10",
294   - name: 'Tom',
295   - num: "No.189,Grove St,Lot Angeles"
296   - },
297   - {
298   - date: "2024-10-10",
299   - name: 'Tom',
300   - num: "No.189,Grove St,Lot Angeles"
301   - },
302   - {
303   - date: "2024-10-10",
304   - name: 'Tom',
305   - num: "No.189,Grove St,Lot Angeles"
306   - },
307   - {
308   - date: "2024-10-10",
309   - name: 'Tom',
310   - num: "No.189,Grove St,Lot Angeles"
311   - },
312   - {
313   - date: "2024-10-10",
314   - name: 'Tom',
315   - num: "No.189,Grove St,Lot Angeles"
316   - },
317   - ],
  170 + tableList: [],
318 171 allcardList: [],// 卡片list数据
319 172 myLineObj: {
320 173 dataList: [[18, 36, 65, 30, 78, 40, 33], [12, 50, 51, 35, 70, 30, 20]],
... ... @@ -323,7 +176,60 @@ Page({
323 176 homeLineObj: {
324 177 dataList: [[180, 306, 65, 30, 78, 40, 133], [12, 50, 251, 235, 170, 30, 20]],
325 178 nameList: ['总电压', '总电流']
326   - }
  179 + },
  180 + tableHeaderList: [
  181 + {
  182 + type: "BMS",
  183 + val: "bms",
  184 + one: "BMS-最高电压模块",
  185 + two: "BMS-单体最低温度",
  186 + three: "BMS-允许充电电流",
  187 + key_one: "05",
  188 + key_two: "16",
  189 + key_three: "29"
  190 + },
  191 + {
  192 + type: "PCS",
  193 + val: "pcs",
  194 + one: "PCS-交流B相电流",
  195 + two: "PCS-交流C相电流",
  196 + three: "PCS-交流A相电流",
  197 + key_one: "21",
  198 + key_two: "22",
  199 + key_three: "23"
  200 + },
  201 + {
  202 + type: "CP",
  203 + val: "cp",
  204 + one: "CP-B枪需求功率",
  205 + two: "CP-B枪需求电流",
  206 + three: "CP-A枪需求电流",
  207 + key_one: "16",
  208 + key_two: "27",
  209 + key_three: "28"
  210 + },
  211 + {
  212 + type: "PV",
  213 + val: "pv",
  214 + one: "PV-总电网取电电量",
  215 + two: "PV-绝缘阻抗",
  216 + three: "PV-电网频率",
  217 + key_one: "04",
  218 + key_two: "06",
  219 + key_three: "24"
  220 + },
  221 + {
  222 + type: "EM",
  223 + val: "em",
  224 + one: "EM-A相电流",
  225 + two: "EM-C相电流",
  226 + three: "EM-B相电流",
  227 + key_one: "04",
  228 + key_two: "05",
  229 + key_three: "06"
  230 + },
  231 + ],//滚动list头部展示
  232 + tableHeader: {}
327 233 },
328 234
329 235 /**
... ... @@ -394,7 +300,7 @@ Page({
394 300 return "CP"
395 301 break;
396 302 case 4: //光伏
397   - return "CP"
  303 + return "PV"
398 304 break;
399 305 case 5: //电能表
400 306 return "EM"
... ... @@ -407,12 +313,20 @@ Page({
407 313 tabsItemChange(e: any) {
408 314 this.setData({
409 315 dashboardList: [],
410   - allcardList:[]
  316 + allcardList: [],
  317 + tableList: [],
  318 + tableHeader: {}
411 319 })
  320 +
412 321 // console.log(e, '----tab传过来的值', e.detail.type)
413 322 // console.log(this, '-------------this-----------')
414 323 const idx = e.detail.type
415 324 const idxToName: string = this.getTypeVal(idx)
  325 + let tableHeaderNew: any = {}
  326 + tableHeaderNew = this.data.tableHeaderList.find((item: any) => {
  327 + return item.type === idxToName
  328 + })
  329 + console.log(tableHeaderNew, '0000', idxToName)
416 330 // this.allData
417 331 let dashboardListNew: any = [] // 仪表盘数据
418 332 let allcardListNew: any = [] // 所有卡片数据
... ... @@ -421,8 +335,12 @@ Page({
421 335 this.setData({
422 336 currentIndex: Number(idx),
423 337 dashboardList: dashboardListNew,
424   - allcardList:allcardListNew
  338 + allcardList: allcardListNew,
  339 + tableHeader: tableHeaderNew
425 340 })
  341 + if (idx !== 0) {
  342 + this.__getOpenQxCustomHczdGetDate(idxToName)
  343 + }
426 344 console.log(dashboardListNew, 'dashboardListdashboardList', this.data.dashboardList)
427 345
428 346 },
... ... @@ -442,8 +360,10 @@ Page({
442 360 console.log(data, '-----------datat')
443 361 let PV = data.data.PV // 光伏
444 362 let BMS = data.data.BMS//储能
445   - let EM = data.data.EM // 电能表
446   - const deviceDataListNew = [
  363 + let EM = data.data.EM // 电能表---电网
  364 + let CP = data.data.CP // 充电桩
  365 + let PCS = data.data.PCS // PCS--风电
  366 + const deviceDataListNew: any = [
447 367 {
448 368 type: '光伏',
449 369 imgUrl: "./../../img/device_photovoltaic.png",
... ... @@ -499,16 +419,102 @@ Page({
499 419 totalNumName: "故障状态"
500 420 },
501 421 ]
502   -
  422 + const overallDataListNew = [
  423 + {
  424 + type: '光伏',
  425 + oneLabelName: "母线电压",
  426 + oneLabelNum: PV.PV29,
  427 + unitOne: "V",
  428 + unitTwo: "Hz",
  429 + unitThree: "kW",
  430 + twoLabelNum: PV.PV30,
  431 + twoLabelName: "PV电网频率",
  432 + threeLabelName: "PV负载功率",
  433 + threeLabelNum: PV.PV22
  434 + },
  435 + {
  436 + type: '风电',//暂时假数据
  437 + oneLabelName: "总有功功率",
  438 + oneLabelNum: "",
  439 + // unitOne: "kW",
  440 + // unitTwo: "kW",
  441 + // unitThree: "A",
  442 + // unitFour: "A",
  443 + // unitFive: "A",
  444 + twoLabelNum: "",
  445 + twoLabelName: "总无功功率",
  446 + threeLabelName: "A相电流",
  447 + threeLabelNum: '',
  448 + fourLabelName: "B相电流",
  449 + fourLabelNum: '',
  450 + fiveLabelName: "C相电流",
  451 + fiveLabelNum: '',
  452 + },
  453 + {
  454 + type: '电网',
  455 + oneLabelName: "A相有功功率",
  456 + oneLabelNum: EM.EM07,
  457 + unitOne: "kW",
  458 + unitTwo: "kW",
  459 + unitThree: "kW",
  460 + twoLabelNum: EM.EM08,
  461 + twoLabelName: "B相有功功率",
  462 + threeLabelName: "C相有功功率",
  463 + threeLabelNum: EM.EM09,
  464 + },
  465 + {
  466 + type: '储能',
  467 + oneLabelName: "SOC",
  468 + oneLabelNum: BMS.BMS03,
  469 + unitOne: "%",
  470 + unitTwo: "A",
  471 + unitThree: "V",
  472 + twoLabelNum: BMS.BMS02,
  473 + twoLabelName: "总电流",
  474 + threeLabelName: "总电压",
  475 + threeLabelNum: BMS.BMS01
  476 + },
  477 + {
  478 + type: '充电桩',
  479 + oneLabelName: "A枪电压",
  480 + oneLabelNum: CP.CP13,
  481 + unitOne: "V",
  482 + unitTwo: "%",
  483 + unitThree: "V",
  484 + unitFour: "%",
  485 + twoLabelNum: CP.CP10,
  486 + twoLabelName: "A枪SOC",
  487 + threeLabelName: "B枪电压",
  488 + threeLabelNum: CP.CP25,
  489 + fourLabelName: "B枪SOC",
  490 + fourLabelNum: CP.CP22,
  491 + },
  492 + ]
503 493
504 494
505 495 this.setData({
506 496 allData: data.data,
507 497 deviceDataList: deviceDataListNew,
  498 + overallDataList: overallDataListNew
508 499 })
509 500 const app = getApp();
510 501 app.globalData.allData = data.data;
511 502
512 503 })
513 504 },
  505 +
  506 + __getOpenQxCustomHczdGetDate(type: String) {//列表滚动数据
  507 + HTTP.POST({
  508 + ...API_CONST.home.getDate,
  509 + payload: {
  510 + corpCode: "default",
  511 + type: type
  512 + }
  513 + }).then((res: any) => {
  514 + console.log(res, 'res-----------getDate')
  515 + this.setData({
  516 + tableList: res.data
  517 + })
  518 + })
  519 + }
514 520 })
\ No newline at end of file
... ...
... ... @@ -67,8 +67,8 @@
67 67 <loadCurveEchart echartData="{{homeLineObj}}"></loadCurveEchart>
68 68 </view>
69 69
70   - <view class="tableData_home">
71   - <tableData tableList="{{tableList}}"></tableData>
  70 + <view class="tableData_home" wx:if="{{tableList&&tableHeader}}">
  71 + <tableData tableList="{{tableList}}" tableHeader="{{tableHeader}}"></tableData>
72 72 </view>
73 73 <view class="allcardList_home">
74 74 <allcardList allcardList="{{allcardList}}"></allcardList>
... ...
... ... @@ -143,6 +143,8 @@
143 143 background: #fff;
144 144 margin-top: 24rpx;
145 145 border-radius: 20rpx;
  146 + overflow: auto;
  147 +
146 148 }
147 149
148 150 .allcardList_home {
... ...