| <template> | 
|   <v-scale-screen width="1920" height="960"> | 
|     <div class="main_app"> | 
|       <img src="@/assets/images/bg_main_app.png" class="main_bg" alt="" /> | 
|       <div class="main_header"> | 
|         <img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" /> | 
|         <div class="title">安泰智慧物流园区-绿色低碳运营</div> | 
|         <div class="time_wrap"> | 
|           <span class="date">{{ date }}</span> | 
|           <span class="week">{{ week }}</span> | 
|           <span class="time">{{ time }}</span> | 
|         </div> | 
|       </div> | 
|       <div class="main_content"> | 
|         <div class="left_box"> | 
|           <div class="left_box_one"> | 
|             <div class="com_header"> | 
|               <div class="title"> | 
|                 <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> | 
|                 <div>本年累计循环烟箱</div> | 
|               </div> | 
|               <img src="@/assets/images/title@2x.png" class="bg" alt="" /> | 
|             </div> | 
|             <div class="content"> | 
|               <img src="@/assets/images/nenghao_ic1.png" class="co2" alt=""> | 
|               <div> | 
|                 <div class="name">本年累计循环烟箱</div> | 
|                 <div><span class="num" v-if="data1.smokeBoxTotal || data1.smokeBoxTotal == 0">{{ | 
|                   data1.smokeBoxTotal.toLocaleString() | 
|                     }}</span><span>只</span></div> | 
|               </div> | 
|             </div> | 
|           </div> | 
|           <div class="left_box_two"> | 
|             <div class="com_header"> | 
|               <div class="title"> | 
|                 <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> | 
|                 <div>实时负荷曲线</div> | 
|               </div> | 
|               <img src="@/assets/images/title@2x.png" class="bg" alt="" /> | 
|             </div> | 
|             <div class="load_wrap"> | 
|               <div class="loadRef"></div> | 
|             </div> | 
|             <!-- <div v-show="data4.length == 0" class="empty_wrap load_wrap"> | 
|               <img src="@/assets/images/default_empty.png" alt=""> | 
|             </div> --> | 
|           </div> | 
|           <div class="left_box_three"> | 
|             <div class="com_header"> | 
|               <div class="title"> | 
|                 <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> | 
|                 <div>月能耗分析</div> | 
|               </div> | 
|               <div class="tabs"> | 
|                 <div class="tab" :class="{ active: activeTab2 == 0 }" @click="tabsClick2(0)">用水</div> | 
|                 <div class="separate"></div> | 
|                 <div class="tab" :class="{ active: activeTab2 == 3 }" @click="tabsClick2(3)">用电</div> | 
|                 <div class="separate"></div> | 
|                 <div class="tab" :class="{ active: activeTab2 == 1 }" @click="tabsClick2(1)">用气</div> | 
|               </div> | 
|               <img src="@/assets/images/title@2x.png" class="bg" alt="" /> | 
|             </div> | 
|             <div class="energy_wrap"> | 
|               <div class="energyRef"></div> | 
|             </div> | 
|           </div> | 
|         </div> | 
|         <div class="center_box"> | 
|           <div class="center_box_one"> | 
|             <div class="list"> | 
|               <div class="item"> | 
|                 <div class="header"> | 
|                   <img class="icon" src="@/assets/images/ic_yongdian@2x.png" alt="" /> | 
|                   <div class="content"> | 
|                     <div class="name">上月用电(kw·h)</div> | 
|                     <div class="num" v-if="data1.electricityQuantity">{{ | 
|                       data1.electricityQuantity.total.toLocaleString() }} | 
|                     </div> | 
|                   </div> | 
|                 </div> | 
|                 <div class="static" v-if="data1.electricityQuantity"> | 
|                   <span class="lab">同比</span> | 
|                   <img v-if="data1.electricityQuantity.totalNum > data1.electricityQuantity.sameNum" class="icon" | 
|                     src="@/assets/images/ic_up.webp" alt="" /> | 
|                   <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> | 
|                   <span class="val" | 
|                     v-if="data1.electricityQuantity.totalNum && data1.electricityQuantity.totalNum != 0">{{ | 
|                       Math.abs(((data1.electricityQuantity.totalNum - | 
|                         data1.electricityQuantity.sameNum) / data1.electricityQuantity.totalNum * 100).toFixed(1)) | 
|                     }}%</span> | 
|                   <span class="val" v-else>-</span> | 
|                   <span class="lab">环比</span> | 
|                   <img v-if="data1.electricityQuantity.totalNum > data1.electricityQuantity.ringNum" class="icon" | 
|                     src="@/assets/images/ic_up.webp" alt="" /> | 
|                   <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> | 
|                   <span class="val" | 
|                     v-if="data1.electricityQuantity.totalNum && data1.electricityQuantity.totalNum != 0">{{ | 
|                       Math.abs(((data1.electricityQuantity.totalNum - | 
|                         data1.electricityQuantity.ringNum) / data1.electricityQuantity.totalNum * 100).toFixed(1)) | 
|                     }}%</span> | 
|                   <span class="val" v-else>-</span> | 
|                 </div> | 
|               </div> | 
|               <div class="item"> | 
|                 <div class="header"> | 
|                   <img class="icon" src="@/assets/images/ic_yongshui@2x.png" alt="" /> | 
|                   <div class="content"> | 
|                     <div class="name">上月用水(t)</div> | 
|                     <div class="num" v-if="data1.waterQuantity">{{ data1.waterQuantity.total.toLocaleString() }}</div> | 
|                   </div> | 
|                 </div> | 
|                 <div class="static" v-if="data1.waterQuantity"> | 
|                   <span class="lab">同比</span> | 
|                   <img v-if="data1.waterQuantity.totalNum > data1.waterQuantity.sameNum" class="icon" | 
|                     src="@/assets/images/ic_up.webp" alt="" /> | 
|                   <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> | 
|                   <span class="val" v-if="data1.waterQuantity.totalNum && data1.waterQuantity.totalNum != 0">{{ | 
|                     Math.abs(((data1.waterQuantity.totalNum - | 
|                       data1.waterQuantity.sameNum) / data1.waterQuantity.totalNum * 100).toFixed(1)) }}%</span> | 
|                   <span class="val" v-else>-</span> | 
|                   <span class="lab">环比</span> | 
|                   <img v-if="data1.waterQuantity.totalNum > data1.waterQuantity.ringNum" class="icon" | 
|                     src="@/assets/images/ic_up.webp" alt="" /> | 
|                   <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> | 
|                   <span class="val" v-if="data1.waterQuantity.totalNum && data1.waterQuantity.totalNum != 0">{{ | 
|                     Math.abs(((data1.waterQuantity.totalNum - | 
|                       data1.waterQuantity.ringNum) / data1.waterQuantity.totalNum * 100).toFixed(1)) }}%</span> | 
|                   <span class="val" v-else>-</span> | 
|                 </div> | 
|               </div> | 
|               <div class="item"> | 
|                 <div class="header"> | 
|                   <img class="icon" src="@/assets/images/ic_yongqi@2x.png" alt="" /> | 
|                   <div class="content"> | 
|                     <div class="name">上月用气(t)</div> | 
|                     <div class="num" v-if="data1.gasQuantity">{{ data1.gasQuantity.total.toLocaleString() }}</div> | 
|                   </div> | 
|                 </div> | 
|                 <div class="static" v-if="data1.gasQuantity"> | 
|                   <span class="lab">同比</span> | 
|                   <img v-if="data1.gasQuantity.totalNum > data1.gasQuantity.sameNum" class="icon" | 
|                     src="@/assets/images/ic_up.webp" alt="" /> | 
|                   <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> | 
|                   <span class="val" v-if="data1.gasQuantity.totalNum && data1.gasQuantity.totalNum != 0">{{ | 
|                     Math.abs(((data1.gasQuantity.totalNum - data1.gasQuantity.sameNum) / data1.gasQuantity.totalNum | 
|                       * 100).toFixed(1)) | 
|                   }}%</span> | 
|                   <span class="val" v-else>-</span> | 
|                   <span class="lab">环比</span> | 
|                   <img v-if="data1.gasQuantity.totalNum > data1.gasQuantity.ringNum" class="icon" | 
|                     src="@/assets/images/ic_up.webp" alt="" /> | 
|                   <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> | 
|                   <span class="val" v-if="data1.gasQuantity.totalNum && data1.gasQuantity.totalNum != 0">{{ | 
|                     Math.abs(((data1.gasQuantity.totalNum - data1.gasQuantity.ringNum) / data1.gasQuantity.totalNum | 
|                       * 100).toFixed(1)) | 
|                   }}%</span> | 
|                   <span class="val" v-else>-</span> | 
|                 </div> | 
|               </div> | 
|             </div> | 
|           </div> | 
|           <div class="center_box_two"> | 
|             <img class="bg" src="@/assets/images/img_city@2x.png" alt="" /> | 
|             <template v-if="data6 && data6.secondRegionDataList && data6.secondRegionDataList.length > 0"> | 
|               <div class="item item1"> | 
|                 <div class="num fs_linear">{{ data6.secondRegionDataList[0].value }}<span class="unit">kw·h</span></div> | 
|                 <div class="name">{{ data6.secondRegionDataList[0].name }}</div> | 
|                 <img src="@/assets/images/bg_data@2x.png" class="bg" alt="" /> | 
|               </div> | 
|               <div class="item item2" v-if="data6.secondRegionDataList.length > 1"> | 
|                 <div class="num fs_linear">{{ data6.secondRegionDataList[1].value }}<span class="unit">kw·h</span></div> | 
|                 <div class="name">{{ data6.secondRegionDataList[1].name }}</div> | 
|                 <img src="@/assets/images/bg_data@2x.png" class="bg" alt="" /> | 
|               </div> | 
|               <div class="item item3" v-if="data6.secondRegionDataList.length > 2"> | 
|                 <div class="num fs_linear">{{ data6.secondRegionDataList[2].value }}<span class="unit">kw·h</span></div> | 
|                 <div class="name">{{ data6.secondRegionDataList[2].name }}</div> | 
|                 <img src="@/assets/images/bg_data@2x.png" class="bg" alt="" /> | 
|               </div> | 
|               <div class="item item4" v-if="data6.secondRegionDataList.length > 3"> | 
|                 <div class="num fs_linear">{{ data6.secondRegionDataList[3].value }}<span class="unit">kw·h</span></div> | 
|                 <div class="name">{{ data6.secondRegionDataList[3].name }}</div> | 
|                 <img src="@/assets/images/bg_data@2x.png" class="bg" alt="" /> | 
|               </div> | 
|               <div class="item item5" v-if="data6.secondRegionDataList.length > 4"> | 
|                 <div class="num fs_linear">{{ data6.secondRegionDataList[4].value }}<span class="unit">kw·h</span></div> | 
|                 <div class="name">{{ data6.secondRegionDataList[4].name }}</div> | 
|                 <img src="@/assets/images/bg_data@2x.png" class="bg" alt="" /> | 
|               </div> | 
|             </template> | 
|             <div class="bottom_wrap" v-if="data1.yesterdayElectricity"> | 
|               <div class="bottom bottom1"> | 
|                 <div class="num fs_linear">{{ data1.yesterdayElectricity.total || 0 }}</div> | 
|                 <div class="name">昨日用电</div> | 
|                 <div class="unit">kw·h</div> | 
|                 <img src="@/assets/images/ic_dianliang_b@2x.png" class="bg" alt="" /> | 
|               </div> | 
|               <div class="bottom bottom2"> | 
|                 <div class="num">{{ data1.todayElectricity.total || 0 }}</div> | 
|                 <div class="name">今日用电</div> | 
|                 <div class="unit">kw·h</div> | 
|                 <img src="@/assets/images/ic_dianliang@2x.png" class="bg" alt="" /> | 
|               </div> | 
|               <div class="bottom bottom3"> | 
|                 <div class="num fs_linear">{{ data1.monthElectricity.total || 0 }}</div> | 
|                 <div class="name">本月用电</div> | 
|                 <div class="unit">kw·h</div> | 
|                 <img src="@/assets/images/ic_dianliang_b@2x.png" class="bg" alt="" /> | 
|               </div> | 
|             </div> | 
|           </div> | 
|         </div> | 
|         <div class="right_box"> | 
|           <div class="right_box_one"> | 
|             <div class="com_header"> | 
|               <div class="title"> | 
|                 <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> | 
|                 <div>本月碳排放量统计</div> | 
|               </div> | 
|               <img src="@/assets/images/title@2x.png" class="bg" alt="" /> | 
|             </div> | 
|             <div class="content"> | 
|               <img src="@/assets/images/ic_co2@2x.png" class="co2" alt=""> | 
|               <div> | 
|                 <div class="name">本月累计碳排放</div> | 
|                 <div><span class="num" v-if="data1.carbon || data1.carbon == 0">{{ data1.carbon.toLocaleString() | 
|                     }}</span><span>吨</span> | 
|                 </div> | 
|               </div> | 
|             </div> | 
|           </div> | 
|           <div class="right_box_two"> | 
|             <div class="com_header"> | 
|               <div class="title"> | 
|                 <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> | 
|                 <div>上月油耗排行统计</div> | 
|               </div> | 
|               <div class="tabs">油耗:L</div> | 
|               <img src="@/assets/images/title@2x.png" class="bg" alt="" /> | 
|             </div> | 
|             <div v-if="data3 && data3.length > 0" class="list"> | 
|               <template v-for="item, i in data3"> | 
|                 <div v-if="i < 6" class="line"> | 
|                   <div class="top"><span v-if="i < 3">top</span>{{ i + 1 }}</div> | 
|                   <div class="id_card">{{ item.carNo }}</div> | 
|                   <div class="wrap"> | 
|                     <ChargeRate :rate="item.rate" :color="i > 2 ? 'cyan' : '#e3a83a'" /> | 
|                   </div> | 
|                   <div class="num">{{ item.quantity }}</div> | 
|                 </div> | 
|               </template> | 
|   | 
|             </div> | 
|             <div v-if="data3.length == 0" class="empty_wrap list"> | 
|               <img src="@/assets/images/default_empty.png" alt=""> | 
|             </div> | 
|           </div> | 
|           <div class="right_box_three"> | 
|             <div class="com_header"> | 
|               <div class="title"> | 
|                 <img src="@/assets/images/ic_title@2x.png" class="icon" alt="" /> | 
|                 <div>月油耗分析</div> | 
|               </div> | 
|               <img src="@/assets/images/title@2x.png" class="bg" alt="" /> | 
|             </div> | 
|             <div class="wrap"> | 
|               <div class="analyseRef"></div> | 
|             </div> | 
|           </div> | 
|         </div> | 
|       </div> | 
|     </div> | 
|   </v-scale-screen> | 
| </template> | 
|   | 
| <script setup> | 
| import { ref, onMounted } from 'vue' | 
| import dayjs from 'dayjs' | 
| import ChargeRate from '@/components/ChargeRate.vue' | 
| import * as echarts from 'echarts' | 
| import VScaleScreen from 'v-scale-screen' | 
| import { | 
|   zxcenterData, | 
|   zxenergyDataList, | 
|   zxlastMonthOil, | 
|   zxloadCurve, | 
|   zxenergyRegionData | 
| } from '@/api' | 
|   | 
|   | 
| const weekMap = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六',] | 
| const date = ref(dayjs().format('YYYY.MM.DD')) | 
| const week = ref(weekMap[new Date().getDay()]) | 
| const time = ref(dayjs().format('HH:mm:ss')) | 
| setInterval(() => { | 
|   date.value = dayjs().format('YYYY-MM-DD') | 
|   week.value = weekMap[new Date().getDay()] | 
|   time.value = dayjs().format('HH:mm:ss') | 
|   | 
| }, 1000) | 
|   | 
|   | 
| const initOperation = () => { | 
|   // 基于准备好的dom,初始化echarts实例 | 
|   var myChart = echarts.init(document.querySelector('.analyseRef')) | 
|   // 绘制图表 | 
|   myChart.setOption({ | 
|     // tooltip: { | 
|     //   trigger: 'axis', | 
|     //   axisPointer: { | 
|     //     type: 'line' | 
|     //   }, | 
|     //   formatter: function (params) { | 
|     //     setTimeout(() => { | 
|     //       console.log('params', params) | 
|     //     }) | 
|     //     return ` | 
|     //       <div style="background-color: #091123;margin: -12px;padding: 14px;border: 2px solid rgba(1,217,254,0.5);color: #fff;"> | 
|     //         <div>${params[0].name}总销售额(万元)</div> | 
|     //         <div style="display: flex;align-items: center;"> | 
|     //           <div style="width: 10px;height: 10px;border-radius: 50%;background-color: #ebbf40;"></div> | 
|     //           <div style="margin: 0 4px 0 6px;">总销售</div> | 
|     //           <span style="color: #ebbf40;">${params[0].value}</span> | 
|     //         </div> | 
|     //       </div> | 
|     //     ` | 
|     //   } | 
|     // }, | 
|     xAxis: { | 
|       type: 'category', | 
|       boundaryGap: false, | 
|       data: data5.value.map(i => i.timeData) | 
|     }, | 
|     tooltip: { | 
|       trigger: 'axis', | 
|       axisPointer: { | 
|         type: 'line' | 
|       }, | 
|     }, | 
|     yAxis: { | 
|       type: 'value', | 
|       name: '单位:L', | 
|       nameTextStyle: { | 
|         padding: [0, 0, 0, -16]    // 四个数字分别为上右下左与原位置距离 | 
|       }, | 
|       splitLine: { | 
|         show: true, | 
|         lineStyle: { | 
|           //这里输入线条的样式 | 
|           color: 'rgba(255,255,255,0.14)', | 
|           type: 'dashed', | 
|         }, | 
|         splitNumber: 4 | 
|       } | 
|     }, | 
|     grid: { | 
|       top: '22%', | 
|       left: '4%', | 
|       right: '6%', | 
|       bottom: '2%', | 
|       containLabel: true | 
|     }, | 
|     series: [ | 
|       { | 
|         data: data5.value.map(i => i.energy), | 
|         type: 'line', | 
|         areaStyle: { | 
|           normal: { | 
|             color: { | 
|               x: 0, | 
|               y: 0, | 
|               x2: 0, | 
|               y2: 1, | 
|               colorStops: [{ | 
|                 offset: 0, | 
|                 color: "rgba(192, 156, 53,.7)" // 0% 处的颜色 | 
|               }, { | 
|                 offset: 1, | 
|                 color: "#1b1b12" // 100% 处的颜色 | 
|               }], | 
|               globalCoord: false // 缺省为 false | 
|             } | 
|           } | 
|         }, | 
|         lineStyle: { // 线条样式 | 
|           color: { | 
|             type: 'linear', | 
|             x: 0, | 
|             y: 0, | 
|             x2: 0, | 
|             y2: 1, | 
|             colorStops: [{ | 
|               offset: 0, color: '#F3BD00' // 0% 处的颜色 | 
|             }, { | 
|               offset: 1, color: '#F3BD00' // 100% 处的颜色 | 
|             }], | 
|           }, | 
|           width: 2, // 线条粗细 | 
|         }, | 
|         symbol: 'circle', | 
|         symbolSize: 6, | 
|         itemStyle: { | 
|           normal: { | 
|             color: '#F3BD00', //折线点的颜色 | 
|           }, | 
|         }, | 
|         smooth: true | 
|       } | 
|     ] | 
|   }) | 
|   | 
|   window.addEventListener('resize', function () {//执行 | 
|     myChart.resize() | 
|   }) | 
| } | 
| const initLoadReal = () => { | 
|   // 基于准备好的dom,初始化echarts实例 | 
|   var myChart = echarts.init(document.querySelector('.loadRef')) | 
|   // 绘制图表 | 
|   myChart.setOption({ | 
|     tooltip: { | 
|       trigger: 'axis', | 
|       axisPointer: { | 
|         type: 'line' | 
|       }, | 
|       // trigger: 'axis', | 
|       // axisPointer: { | 
|       //   type: 'line' | 
|       // }, | 
|       // formatter: function (params) { | 
|       //   setTimeout(() => { | 
|       //     console.log('params', params) | 
|       //   }) | 
|       //   return ` | 
|       //     <div style="background-color: #091123;margin: -12px;padding: 14px;border: 2px solid rgba(1,217,254,0.5);color: #fff;"> | 
|       //       <div>${params[0].name}总销售额(万元)</div> | 
|       //       <div style="display: flex;align-items: center;"> | 
|       //         <div style="width: 10px;height: 10px;border-radius: 50%;background-color: #ebbf40;"></div> | 
|       //         <div style="margin: 0 4px 0 6px;">总销售</div> | 
|       //         <span style="color: #ebbf40;">${params[0].value}</span> | 
|       //       </div> | 
|       //     </div> | 
|       //   ` | 
|       // } | 
|     }, | 
|     xAxis: { | 
|       type: 'category', | 
|       boundaryGap: false, | 
|       data: data4.value.map(i => i.timeData) | 
|     }, | 
|     yAxis: { | 
|       type: 'value', | 
|       name: '单位:kw·h', | 
|       nameTextStyle: { | 
|         padding: [0, 0, 0, -16]    // 四个数字分别为上右下左与原位置距离 | 
|       }, | 
|       splitLine: { | 
|         show: true, | 
|         lineStyle: { | 
|           //这里输入线条的样式 | 
|           color: 'rgba(255,255,255,0.14)', | 
|           type: 'dashed', | 
|         }, | 
|         splitNumber: 4 | 
|       } | 
|     }, | 
|     grid: { | 
|       top: '26%', | 
|       left: '4%', | 
|       right: '2%', | 
|       bottom: '2%', | 
|       containLabel: true | 
|     }, | 
|     series: [ | 
|       { | 
|         data: data4.value.map(i => i.energy), | 
|         type: 'line', | 
|         areaStyle: { | 
|           normal: { | 
|             color: { | 
|               x: 0, | 
|               y: 0, | 
|               x2: 0, | 
|               y2: 1, | 
|               colorStops: [{ | 
|                 offset: 0, | 
|                 color: "#2e6ab5" // 0% 处的颜色 | 
|               }, { | 
|                 offset: 1, | 
|                 color: "#1b1b12" // 100% 处的颜色 | 
|               }], | 
|               globalCoord: false // 缺省为 false | 
|             } | 
|           } | 
|         }, | 
|         lineStyle: { // 线条样式 | 
|           color: { | 
|             type: 'linear', | 
|             x: 0, | 
|             y: 0, | 
|             x2: 0, | 
|             y2: 1, | 
|             colorStops: [{ | 
|               offset: 0, color: '#2e6ab5' // 0% 处的颜色 | 
|             }, { | 
|               offset: 1, color: '#2e6ab5' // 100% 处的颜色 | 
|             }], | 
|           }, | 
|           width: 2, // 线条粗细 | 
|         }, | 
|         symbol: 'circle', | 
|         symbolSize: 0, | 
|         itemStyle: { | 
|           normal: { | 
|             color: '#2e6ab5', //折线点的颜色 | 
|           }, | 
|         }, | 
|         smooth: true | 
|       } | 
|     ] | 
|   }) | 
|   | 
|   window.addEventListener('resize', function () {//执行 | 
|     myChart.resize() | 
|   }) | 
| } | 
|   | 
| const data1 = ref({}) | 
| const getData1 = () => { | 
|   zxcenterData().then(res => { | 
|     const result = res.data | 
|     data1.value = result | 
|   }) | 
| } | 
| const data6 = ref({}) | 
| const getData6 = () => { | 
|   zxenergyRegionData().then(res => { | 
|     const result = res.data | 
|     data6.value = result | 
|   }) | 
| } | 
|   | 
| const activeTab2 = ref(0) | 
| const tabsClick2 = (v) => { | 
|   activeTab2.value = v | 
|   getData2() | 
| } | 
| const data2 = ref([]) | 
| const initEnergy = () => { | 
|   var myChart = echarts.init(document.querySelector('.energyRef')) | 
|   // 绘制图表 | 
|   let unit = activeTab2.value == 0 ? '单位:t' : activeTab2.value == 3 ? '单位:kw·h' : '单位:m³' | 
|   | 
|   myChart.setOption({ | 
|     grid: { | 
|       top: '24%', | 
|       left: '6%', | 
|       right: '2%', | 
|       bottom: '4%', | 
|       containLabel: true | 
|     }, | 
|     tooltip: { | 
|       trigger: 'axis', | 
|       axisPointer: { | 
|         type: 'line' | 
|       }, | 
|     }, | 
|     xAxis: { | 
|       type: 'category', | 
|       data: data2.value.map(i => i.timeData) | 
|     }, | 
|     yAxis: { | 
|       type: 'value', | 
|       name: unit, | 
|       nameTextStyle: { | 
|         padding: [0, 0, 4, -30]    // 四个数字分别为上右下左与原位置距离 | 
|       }, | 
|       splitLine: { | 
|         show: true, | 
|         lineStyle: { | 
|           //这里输入线条的样式 | 
|           color: 'rgba(255,255,255,0.14)', | 
|         } | 
|       } | 
|     }, | 
|     series: [ | 
|       { | 
|         data: data2.value.map(i => i.energy), | 
|         type: 'bar', | 
|         barWidth: 10, | 
|         itemStyle: { | 
|           normal: { | 
|             color: new echarts.graphic.LinearGradient( | 
|               0, 0, 0, 1, | 
|               [ | 
|                 { offset: 0, color: '#50afd3' }, | 
|                 { offset: 1, color: '#1d4861' } | 
|               ] | 
|             ), | 
|             barBorderRadius: [3, 3, 0, 0] | 
|           } | 
|         } | 
|       } | 
|     ] | 
|   }) | 
|   window.addEventListener('resize', function () {//执行 | 
|     myChart.resize() | 
|   }) | 
| } | 
| const getData2 = () => { | 
|   zxenergyDataList({ type: activeTab2.value }).then(res => { | 
|     const result = res.data || [] | 
|     data2.value = result | 
|     initEnergy() | 
|   }) | 
| } | 
| const data3 = ref([]) | 
| const getData3 = () => { | 
|   zxlastMonthOil().then(res => { | 
|     const result = res.data || [] | 
|     if (result.length > 0) { | 
|       data3.value = result.map(i => { | 
|         if (i.quantity || i.quantity == 0) { | 
|           i.rate = ((i.quantity / result[0].quantity) * 25).toFixed(0) | 
|         } | 
|         return i | 
|       }) | 
|     } | 
|   }) | 
| } | 
| const data4 = ref([]) | 
| const getData4 = () => { | 
|   zxloadCurve().then(res => { | 
|     const result = res.data | 
|     data4.value = result | 
|     if (data4.value && data4.value.length > 0) { | 
|       initLoadReal() | 
|     } | 
|   }) | 
| } | 
|   | 
| const data5 = ref([]) | 
| const getData5 = () => { | 
|   zxenergyDataList({ type: 2 }).then(res => { | 
|     const result = res.data | 
|     data5.value = result | 
|     initOperation() | 
|   }) | 
| } | 
|   | 
| onMounted(() => { | 
|   getData1() | 
|   getData2() | 
|   getData3() | 
|   getData4() | 
|   getData5() | 
|   getData6() | 
|   setInterval(() => { | 
|     getData4() | 
|   }, 1000 * 60) | 
|   setInterval(() => { | 
|     getData1() | 
|     getData2() | 
|     getData3() | 
|     getData5() | 
|     getData6() | 
|   }, 1000 * 60 * 60) | 
|   | 
| }) | 
|   | 
|   | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
| .main_content { | 
|   display: flex; | 
|   padding: 20px 24px 0; | 
|   | 
|   .left_box { | 
|     flex: 4; | 
|   | 
|     .left_box_one { | 
|       width: 100%; | 
|       margin-bottom: 20px; | 
|   | 
|       .content { | 
|         height: 164px; | 
|         display: flex; | 
|         align-items: center; | 
|         justify-content: center; | 
|   | 
|         .co2 { | 
|           width: 100px; | 
|           margin-right: 30px; | 
|         } | 
|   | 
|         .num { | 
|           margin-top: 10px; | 
|           color: #01D9FE; | 
|           font-weight: 600; | 
|           font-size: 36px; | 
|           margin-right: 2px; | 
|         } | 
|       } | 
|     } | 
|   | 
|     .left_box_two { | 
|       margin-bottom: 20px; | 
|   | 
|       .load_wrap { | 
|         width: 100%; | 
|         height: 250px; | 
|   | 
|         .loadRef { | 
|           width: 100%; | 
|           height: 100%; | 
|         } | 
|       } | 
|     } | 
|   | 
|     .left_box_three { | 
|       .energy_wrap { | 
|         width: 100%; | 
|         height: 250px; | 
|   | 
|         .energyRef { | 
|           width: 100%; | 
|           height: 100%; | 
|         } | 
|       } | 
|     } | 
|   } | 
|   | 
|   .center_box { | 
|     flex: 9; | 
|     padding: 0 60px; | 
|   | 
|     .center_box_one { | 
|       padding: 30px 18px; | 
|       margin-bottom: 18px; | 
|   | 
|       .list { | 
|         display: flex; | 
|         justify-content: space-between; | 
|         align-items: center; | 
|   | 
|         .item { | 
|           flex: 1; | 
|   | 
|           .header { | 
|             display: flex; | 
|             margin-bottom: 14px; | 
|   | 
|             .icon { | 
|               width: 70px; | 
|               height: 73px; | 
|               margin-right: 20px; | 
|             } | 
|   | 
|             .content { | 
|               .name { | 
|                 font-size: 16px; | 
|                 color: #d2e0ff; | 
|               } | 
|   | 
|               .num { | 
|                 font-weight: bold; | 
|                 font-size: 36px; | 
|                 color: #ffffff; | 
|                 line-height: 54px; | 
|               } | 
|             } | 
|           } | 
|   | 
|           .static { | 
|             font-size: 12px; | 
|             display: flex; | 
|             align-items: center; | 
|   | 
|             .lab { | 
|               color: #869cc9; | 
|             } | 
|   | 
|             .val { | 
|               color: #d2e0ff; | 
|               margin-right: 20px; | 
|             } | 
|   | 
|             .icon { | 
|               width: 12px; | 
|               height: 12px; | 
|               margin: 0 5px; | 
|             } | 
|           } | 
|         } | 
|       } | 
|     } | 
|   | 
|     .center_box_two { | 
|       position: relative; | 
|       width: 100%; | 
|       height: 544px; | 
|   | 
|       .item { | 
|         height: 112px; | 
|         position: absolute; | 
|         text-align: center; | 
|   | 
|         .num { | 
|           font-size: 35px; | 
|           line-height: 50px; | 
|           height: 50px; | 
|           font-weight: 600; | 
|   | 
|           .unit { | 
|             font-size: 13px; | 
|           } | 
|         } | 
|   | 
|         .name { | 
|           font-weight: 500; | 
|           font-size: 17px; | 
|           color: #ffffff; | 
|         } | 
|   | 
|         .bg { | 
|           margin: 0 auto; | 
|           width: 120px; | 
|           height: 88px; | 
|           top: 24px; | 
|           left: 50%; | 
|           transform: translate(-50%, 0); | 
|         } | 
|       } | 
|   | 
|       .item1 { | 
|         left: 50%; | 
|         top: 0; | 
|         transform: translate(-50%, 0); | 
|       } | 
|   | 
|       .item2 { | 
|         top: 112px; | 
|         left: 106px; | 
|       } | 
|   | 
|       .item3 { | 
|         top: 112px; | 
|         right: 106px; | 
|       } | 
|   | 
|       .item4 { | 
|         top: 291px; | 
|         left: 56px; | 
|       } | 
|   | 
|       .item5 { | 
|         top: 291px; | 
|         right: 56px; | 
|       } | 
|   | 
|       .bottom_wrap { | 
|         position: absolute; | 
|         bottom: -110px; | 
|         left: 50%; | 
|         width: 600px; | 
|         height: 100px; | 
|         transform: translate(-50%, 0); | 
|       } | 
|   | 
|       .bottom { | 
|         width: 140px; | 
|         height: 194px; | 
|         position: absolute; | 
|         text-align: center; | 
|         padding-top: 70px; | 
|   | 
|         .num { | 
|           font-size: 24px; | 
|           color: #D0FFFA; | 
|           line-height: 33px; | 
|         } | 
|   | 
|         .name { | 
|           font-size: 15px; | 
|           color: #D0FFFA; | 
|           line-height: 21px; | 
|         } | 
|   | 
|         .unit { | 
|           font-size: 14px; | 
|           color: #D0FFFA; | 
|         } | 
|       } | 
|   | 
|       .bottom1 { | 
|         bottom: -0px; | 
|         left: 40px; | 
|       } | 
|   | 
|       .bottom3 { | 
|         bottom: -0px; | 
|         right: 40px; | 
|       } | 
|   | 
|       .bottom2 { | 
|         bottom: -0px; | 
|         left: 50%; | 
|         transform: translate(-50%, 0); | 
|         padding-top: 50px; | 
|   | 
|         .num { | 
|           font-size: 36px; | 
|           color: #01D9FE; | 
|           line-height: 54px; | 
|           font-weight: bold; | 
|         } | 
|       } | 
|     } | 
|   } | 
|   | 
|   .right_box { | 
|     flex: 4; | 
|   | 
|     .right_box_one { | 
|       margin-bottom: 20px; | 
|   | 
|       .content { | 
|         height: 164px; | 
|         display: flex; | 
|         align-items: center; | 
|         justify-content: center; | 
|   | 
|         .co2 { | 
|           width: 102px; | 
|           margin-right: 30px; | 
|         } | 
|   | 
|         .num { | 
|           margin-top: 10px; | 
|           color: #01D9FE; | 
|           font-weight: 600; | 
|           font-size: 36px; | 
|           margin-right: 2px; | 
|         } | 
|       } | 
|     } | 
|   | 
|     .right_box_two { | 
|       margin-bottom: 20px; | 
|   | 
|       .list { | 
|         padding: 20px 24px 4px; | 
|         height: 250px; | 
|   | 
|         .line { | 
|           display: flex; | 
|           align-items: center; | 
|           margin-bottom: 16px; | 
|   | 
|           .top { | 
|             font-weight: 500; | 
|             font-size: 12px; | 
|             width: 33px; | 
|             height: 19px; | 
|             line-height: 19px; | 
|             text-align: center; | 
|             color: #DBEAEA; | 
|             box-shadow: inset 0px 0px 3px 0px #01D9FE; | 
|             margin-right: 10px; | 
|           } | 
|   | 
|           .id_card { | 
|             color: #DBEAEA; | 
|             font-weight: 500; | 
|             margin-right: 6px; | 
|             font-size: 13px; | 
|             width: 64px; | 
|           } | 
|   | 
|           .num { | 
|             font-weight: 500; | 
|             font-size: 13px; | 
|             color: #DBEAEA; | 
|             margin-left: 15px; | 
|             width: 40px; | 
|           } | 
|   | 
|           .wrap { | 
|             flex: 1; | 
|             height: 20px; | 
|             border: 1px solid #686B6B; | 
|           } | 
|         } | 
|       } | 
|     } | 
|   | 
|     .right_box_three { | 
|       .wrap { | 
|         .analyseRef { | 
|           width: 100%; | 
|           height: 250px; | 
|         } | 
|       } | 
|     } | 
|   } | 
| } | 
|   | 
| .com_header { | 
|   height: 40px; | 
|   display: flex; | 
|   justify-content: space-between; | 
|   align-items: center; | 
|   padding: 0 15px 0 13px; | 
|   position: relative; | 
|   | 
|   .title { | 
|     display: flex; | 
|     align-items: center; | 
|     font-weight: bold; | 
|     font-size: 16px; | 
|     background-image: -webkit-linear-gradient(top, | 
|         #ffffff 0%, | 
|         #c8ddff 66%, | 
|         #85b4ff 72%, | 
|         #74a9ff 100%); | 
|     -webkit-background-clip: text; | 
|     -webkit-text-fill-color: transparent; | 
|   | 
|     .icon { | 
|       width: 16px; | 
|       height: 16px; | 
|       margin-right: 14px; | 
|     } | 
|   } | 
|   | 
|   .tabs { | 
|     display: flex; | 
|     align-items: center; | 
|     font-size: 14px; | 
|     color: #d2e0ff; | 
|   | 
|     .tab { | 
|       cursor: pointer; | 
|     } | 
|   | 
|     .separate { | 
|       width: 1px; | 
|       height: 14px; | 
|       background-color: #d2e0ff; | 
|       margin: 0 6px; | 
|     } | 
|   | 
|     .active { | 
|       color: #0094eb; | 
|     } | 
|   } | 
| } | 
|   | 
| .bg { | 
|   position: absolute; | 
|   left: 0; | 
|   top: 0; | 
|   width: 100%; | 
|   height: 100%; | 
|   object-fit: cover; | 
|   z-index: -1; | 
| } | 
|   | 
| .fs_linear { | 
|   background-image: -webkit-linear-gradient(top, | 
|       #ffffff 0%, | 
|       #c8ddff 70%, | 
|       #85b4ff 80%, | 
|       #74a9ff 100%); | 
|   -webkit-background-clip: text; | 
|   -webkit-text-fill-color: transparent; | 
| } | 
|   | 
| .main_header { | 
|   display: flex; | 
|   justify-content: space-between; | 
|   align-items: center; | 
|   height: 90px; | 
|   position: relative; | 
|   padding: 0px 40px 16px; | 
|   font-weight: 600; | 
|   font-size: 36px; | 
|   | 
|   .title { | 
|     background-image: -webkit-linear-gradient(top, | 
|         #ffffff 0%, | 
|         #c8ddff 70%, | 
|         #85b4ff 80%, | 
|         #74a9ff 100%); | 
|     -webkit-background-clip: text; | 
|     -webkit-text-fill-color: transparent; | 
|   } | 
|   | 
|   .time_wrap { | 
|     font-size: 26px; | 
|     font-weight: 600; | 
|     background-image: -webkit-linear-gradient(top, | 
|         #ffffff 0%, | 
|         #c8ddff 50%, | 
|         #85b4ff 80%, | 
|         #74a9ff 100%); | 
|     -webkit-background-clip: text; | 
|     -webkit-text-fill-color: transparent; | 
|     display: flex; | 
|     align-items: center; | 
|   | 
|     .time { | 
|       width: 130px; | 
|       display: flex; | 
|       justify-content: flex-end; | 
|       font-size: 30px; | 
|     } | 
|   | 
|     .week { | 
|       margin-left: 20px; | 
|     } | 
|   } | 
|   | 
|   .main_header_bg { | 
|     position: absolute; | 
|     left: 0; | 
|     top: 0; | 
|     width: 100%; | 
|     height: 100%; | 
|     object-fit: cover; | 
|     z-index: -1; | 
|   } | 
| } | 
|   | 
| .main_app { | 
|   width: 1920px; | 
|   height: 980px; | 
|   color: #ffffff; | 
|   position: relative; | 
|   | 
|   .main_bg { | 
|     position: absolute; | 
|     left: 0; | 
|     top: 0; | 
|     width: 100%; | 
|     height: 100%; | 
|     object-fit: cover; | 
|     z-index: -1; | 
|   } | 
| } | 
| </style> |