浏览代码

Merge remote-tracking branch 'origin/master'

LLL 1 年之前
父节点
当前提交
2c8a7744da
共有 41 个文件被更改,包括 110464 次插入3451 次删除
  1. 29 5
      src/components/module_ems/UModal/UModal.vue
  2. 26 31
      src/views/dashboard/Analysis.vue
  3. 2 2
      src/views/module_cmms/inspectContent/modules/InspectContentForm.vue
  4. 62 9
      src/views/module_cmms/inspectSpot/modules/InspectSpotForm.vue
  5. 143 0
      src/views/module_cmms/inspectSpot/modules/InspectSpotModalAdd.vue
  6. 261 0
      src/views/module_cmms/upkeep/UpkeepList.vue
  7. 179 0
      src/views/module_cmms/upkeep/modules/UpkeepForm.vue
  8. 84 0
      src/views/module_cmms/upkeep/modules/UpkeepModal.Style#Drawer.vue
  9. 60 0
      src/views/module_cmms/upkeep/modules/UpkeepModal.vue
  10. 2 2
      src/views/module_cmms/upkeepItem/UpkeepItemList.vue
  11. 2 2
      src/views/module_cmms/upkeepItem/modules/UpkeepItemForm.vue
  12. 306 0
      src/views/module_cmms/upkeepPlan/UpkeepPlanList.vue
  13. 209 0
      src/views/module_cmms/upkeepPlan/modules/UpkeepPlanForm.vue
  14. 84 0
      src/views/module_cmms/upkeepPlan/modules/UpkeepPlanModal.Style#Drawer.vue
  15. 60 0
      src/views/module_cmms/upkeepPlan/modules/UpkeepPlanModal.vue
  16. 2 1
      src/views/module_ems/energyAnalyse/balanceAnalysis/index.vue
  17. 6 6
      src/views/module_ems/energyAnalyse/demandAnalysis/index.vue
  18. 1 0
      src/views/module_ems/energyAnalyse/electricityDay/index.vue
  19. 1 0
      src/views/module_ems/energyAnalyse/emsdata.js
  20. 70323 0
      src/views/module_ems/energyAnalyse/emsdata.json
  21. 6 5
      src/views/module_ems/energyAnalyse/energyDashboard/index.vue
  22. 4 3
      src/views/module_ems/energyAnalyse/energyItem/index.vue
  23. 4 3
      src/views/module_ems/energyAnalyse/energyRank/index.vue
  24. 5 4
      src/views/module_ems/energyAnalyse/flowAnalysis/index.vue
  25. 206 0
      src/views/module_ems/energyAnalyse/meterReadData/index.vue
  26. 185 0
      src/views/module_ems/energyAnalyse/moniparamData/index.vue
  27. 178 0
      src/views/module_ems/energyAnalyse/paramData/index.vue
  28. 2 1
      src/views/module_ems/energyAnalyse/peakValleyAnalysis/index.vue
  29. 12 11
      src/views/module_ems/energyAnalyse/savingAnalysis/index.vue
  30. 0 1
      src/views/module_ems/energyAnalyse/testdata.js
  31. 0 3365
      src/views/module_ems/energyAnalyse/testdata.json
  32. 851 0
      src/views/module_ems/photovoltaic/inverterAnalysis/index.vue
  33. 851 0
      src/views/module_ems/photovoltaic/inverterMonitor/index.vue
  34. 851 0
      src/views/module_ems/photovoltaic/inverterStatis/index.vue
  35. 851 0
      src/views/module_ems/photovoltaic/mdCurveAnalysis/index.vue
  36. 225 0
      src/views/module_ems/photovoltaic/pvDashboard/index.vue
  37. 1 0
      src/views/module_ems/photovoltaic/pvdata.js
  38. 31837 0
      src/views/module_ems/photovoltaic/pvdata.json
  39. 851 0
      src/views/module_ems/photovoltaic/stationDiagram/index.vue
  40. 851 0
      src/views/module_ems/photovoltaic/stationMonitor/index.vue
  41. 851 0
      src/views/module_ems/photovoltaic/stationStatis/index.vue

+ 29 - 5
src/components/module_ems/UModal/UModal.vue

@@ -22,8 +22,7 @@
           <a-button class="ant-modal-close ant-modal-close-x" ghost type="link" :icon="fullscreenButtonIcon"/>
         </a-col> -->
         <a-col class="right-btn">
-          <a-icon type="menu-fold" />
-          <a-icon type="menu-unfold" />
+          <a-icon :type="isModalFull?'menu-unfold':'menu-fold'" @click="isModalFull = !isModalFull"/>
           <!-- <a-icon type="column-width" /> -->
           <a-icon :type="isContentFull?'pic-right':'pic-center'" @click="isContentFull = !isContentFull"/>
           <a-button type="primary" @click="handleOk">确定</a-button>
@@ -70,6 +69,11 @@ export default {
         type: Boolean,
         default: false
       },
+      // 全屏显示
+      modalFull: {
+        type: Boolean,
+        default: false
+      },
       title: {
         type: String,
         default: '内容'
@@ -107,7 +111,7 @@ export default {
         innerFullscreen: this.fullscreen,
         // 内容展现形式:居中活全屏
         isContentFull: null,
-        isSetWidthFull: true,
+        isModalFull: false,
       }
     },
     computed: {
@@ -126,6 +130,8 @@ export default {
           'fullscreen': this.innerFullscreen,
           // 'no-title': this.isNoTitle,
           'no-footer': this.isNoFooter,
+          'modalFullcss': this.isModalFull,
+          'modalMarginLeft': !this.isModalFull
         }
       },
       modalStyle() {
@@ -179,6 +185,13 @@ export default {
           this.isContentFull = newV
         },
         immediate: true
+      },
+      modalFull: {
+        handler(newV, oldV){
+          console.log(newV, oldV)
+          this.isModalFull = newV
+        },
+        immediate: true
       }
     },
     methods: {
@@ -233,10 +246,8 @@ export default {
   .u-modal-box {
     // 宽高
     .ant-modal{
-      width: calc(100vw - 208px) !important;
       height: 100vh !important;
       padding: 0 !important;
-      margin-left: 208px;
       margin-right: 0;
       top: 0;
       .ant-modal-content{
@@ -363,6 +374,19 @@ export default {
     // }
   }
 
+  .modalFullcss{
+    .ant-modal{
+      width: 100vw !important;
+      margin-left: 0;
+    }
+  }
+  .modalMarginLeft{
+    .ant-modal{
+      width: calc(100vw - 208px) !important;
+      margin-left: 208px;
+    }
+  }
+
   @media (max-width: 767px) {
     .u-modal-box.fullscreen {
       margin: 0;

+ 26 - 31
src/views/dashboard/Analysis.vue

@@ -116,7 +116,7 @@ import * as echarts from 'echarts'
 // import { firstload } from "@/api/homepage.js";
 // import { envirinfo } from "@/api/environSafe/hsmsstatistics.js";
   import { httpAction, getAction } from '@/api/manage'
-import { testdata } from '../module_ems/energyAnalyse/testdata';
+import { emsdata } from '../module_ems/energyAnalyse/emsdata';
 
 export default {
   name: 'Index',
@@ -228,7 +228,10 @@ export default {
   },
   mounted() {
     this.$nextTick(() => {
-    this.getList();
+      // 延迟绘制,否则echarts会超出父容器
+      setTimeout(() => {
+        this.getList();
+      },1000);
       // this.getDemandanalysis()
     })
     // this.getAlarmList()
@@ -247,38 +250,38 @@ export default {
     },
     // 正式需要删除
     getTest() {
-        if (testdata.homedata.RepairSum != null) {
-          this.operaStatistics.repairCompleted = testdata.homedata.RepairSum[0].howManyTimes;
-          this.operaStatistics.repairIncomplete = testdata.homedata.RepairSum[1].howManyTimes;
+        if (emsdata.homedata.RepairSum != null) {
+          this.operaStatistics.repairCompleted = emsdata.homedata.RepairSum[0].howManyTimes;
+          this.operaStatistics.repairIncomplete = emsdata.homedata.RepairSum[1].howManyTimes;
         }
         
-        if (testdata.homedata.UpkeepSum != null) {
-          this.operaStatistics.upkeepCompleted = testdata.homedata.UpkeepSum[0].howManyTimes;
-          this.operaStatistics.upkeepIncomplete = testdata.homedata.UpkeepSum[1].howManyTimes;
+        if (emsdata.homedata.UpkeepSum != null) {
+          this.operaStatistics.upkeepCompleted = emsdata.homedata.UpkeepSum[0].howManyTimes;
+          this.operaStatistics.upkeepIncomplete = emsdata.homedata.UpkeepSum[1].howManyTimes;
         }
         
-        if (testdata.homedata.AlarmSum != null) {
-          this.operaStatistics.alarmCompleted = testdata.homedata.AlarmSum[0].howManyTimes;
-          this.operaStatistics.alarmIncomplete = testdata.homedata.AlarmSum[1].howManyTimes;
+        if (emsdata.homedata.AlarmSum != null) {
+          this.operaStatistics.alarmCompleted = emsdata.homedata.AlarmSum[0].howManyTimes;
+          this.operaStatistics.alarmIncomplete = emsdata.homedata.AlarmSum[1].howManyTimes;
         }
         
-        if (testdata.homedata.InspeceSum != null) {
-          this.operaStatistics.inspectCompleted = testdata.homedata.InspeceSum[0].howManyTimes;
-          this.operaStatistics.inspectIncomplete = testdata.homedata.InspeceSum[1].howManyTimes;
+        if (emsdata.homedata.InspeceSum != null) {
+          this.operaStatistics.inspectCompleted = emsdata.homedata.InspeceSum[0].howManyTimes;
+          this.operaStatistics.inspectIncomplete = emsdata.homedata.InspeceSum[1].howManyTimes;
         }
 
-        if (testdata.homedata.MachineSum != null) {
-          this.operaStatistics.machineIncomplete = testdata.homedata.MachineSum[1].howManyTimes;
-          this.operaStatistics.machineCompleted = testdata.homedata.MachineSum[4].howManyTimes;
+        if (emsdata.homedata.MachineSum != null) {
+          this.operaStatistics.machineIncomplete = emsdata.homedata.MachineSum[1].howManyTimes;
+          this.operaStatistics.machineCompleted = emsdata.homedata.MachineSum[4].howManyTimes;
         }
 
-        this.TodayElectricity = testdata.homedata.TodayElectricity;
-        this.EnvironmentTemp = testdata.homedata.EnvironmentTemp;
+        this.TodayElectricity = emsdata.homedata.TodayElectricity;
+        this.EnvironmentTemp = emsdata.homedata.EnvironmentTemp;
 
-        this.alarmList = testdata.homedata.alarmData;
-        this.noticeList = testdata.homedata.noticeData;
+        this.alarmList = emsdata.homedata.alarmData;
+        this.noticeList = emsdata.homedata.noticeData;
 
-        this.temperatureData = testdata.homedata.envirData;
+        this.temperatureData = emsdata.homedata.envirData;
 
         this.initEcharts();
         this.initTempAndHumiEcharts();
@@ -424,7 +427,7 @@ export default {
       
 
       option && myChart.setOption(option);
-      
+
       window.addEventListener("resize",function (){
         myChart.resize();
       });
@@ -646,14 +649,6 @@ export default {
     background: #fff;
     border-radius: 4px;
   }
-  .trend-charts{
-    min-height: calc(100vh - 18vh - 5.8vh - 84px - 58px - 57px - 50px);
-    padding: 10px;
-    margin-top: 10px;
-    box-shadow: 0 2px 10px rgba(0,0,0,.1);
-    background: #fff;
-    border-radius: 4px;
-  }
   .alarmandnotice{
     margin-top: 10px;
   }

+ 2 - 2
src/views/module_cmms/inspectContent/modules/InspectContentForm.vue

@@ -58,7 +58,7 @@
           <!-- :loading="loading" -->
         </a-table>
       </a-form-model>
-      <inspect-content-modal-add ref="addItemRef" :equipmentId="model.equipmentid" :selectData="model.cmmsInspectContentItemList" @ok="handleItemOk"></inspect-content-modal-add>
+      <inspect-content-modal-add ref="addItemRef" :equipmentId="model.equipmentid" :selectData="model.cmmsInspectContentItemList" @ok="handleOk"></inspect-content-modal-add>
     </j-form-container>
   </a-spin>
 </template>
@@ -217,7 +217,7 @@
 
         })
       },
-      handleItemOk(data){
+      handleOk(data){
         console.log(data)
         this.model.cmmsInspectContentItemList = data;
       }

+ 62 - 9
src/views/module_cmms/inspectSpot/modules/InspectSpotForm.vue

@@ -15,11 +15,6 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="选择设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipdefid">
-              <a-input v-model="model.equipdefid" placeholder="请输入设备类型"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
             <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
               <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
             </a-form-model-item>
@@ -27,12 +22,11 @@
         </a-row>
         <div class="cmms-dialog-item-title u-flex-jab">
           <div>巡检项目设置</div>
-          <div @click="addInspectItem"><a-icon type="plus"/>巡检项目</div>
+          <div @click="addInspectContent"><a-icon type="plus"/>巡检项目</div>
         </div>
         <a-table
           ref="table"
           size="middle"
-          :scroll="{x:true}"
           bordered
           rowKey="id"
           :columns="columns"
@@ -40,8 +34,21 @@
           :pagination="false"
           class="j-table-force-nowrap">
           <!-- :loading="loading" -->
+          <div slot="expandedRowRender" slot-scope="record">
+            <a-table
+              ref="table"
+              size="middle"
+              bordered
+              rowKey="id"
+              :columns="innerColumns"
+              :dataSource="record.cmmsInspectContentItemList"
+              :pagination="false"
+              class="j-table-force-nowrap">
+            </a-table>
+          </div>
         </a-table>
       </a-form-model>
+      <inspect-spot-modal-add ref="addContentRef"  :selectData="model.inspectContentList" @ok="handleOk"></inspect-spot-modal-add>
     </j-form-container>
   </a-spin>
 </template>
@@ -50,10 +57,12 @@
 
   import { httpAction, getAction } from '@/api/manage'
   import { validateDuplicateValue } from '@/utils/util'
+  import InspectSpotModalAdd from './InspectSpotModalAdd.vue'
 
   export default {
     name: 'InspectSpotForm',
     components: {
+        InspectSpotModalAdd
     },
     props: {
       //表单禁用
@@ -66,7 +75,8 @@
     data () {
       return {
         model:{
-         },
+          inspectContentList: []
+        },
         labelCol: {
           xs: { span: 24 },
           sm: { span: 5 },
@@ -81,7 +91,7 @@
         url: {
           add: "/cmmsInspectSpot/cmmsInspectSpot/add",
           edit: "/cmmsInspectSpot/cmmsInspectSpot/edit",
-          queryById: "/cmmsInspectSpot/cmmsInspectSpot/queryById"
+          queryById: "/cmmsInspectSpot/cmmsInspectSpot/queryById",
         },
         columns: [
           // {
@@ -125,6 +135,38 @@
             dataIndex: 'remark'
           }
         ],
+        innerColumns: [
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'点检项编号',
+            align:"center",
+            dataIndex: 'itemcode'
+          },
+          {
+            title:'点检项名称',
+            align:"center",
+            dataIndex: 'itemname'
+          },
+          {
+            title:'标准',
+            align:"center",
+            dataIndex: 'inspectionstandards',
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          }
+        ],
       }
     },
     computed: {
@@ -141,12 +183,17 @@
         this.visible = true;
         // this.edit(this.modelDefault);
       },
+      addInspectContent(){
+        this.$refs.addContentRef.add();
+        this.$refs.addContentRef.title = "选择巡检项目";
+      },
       edit (record) {
         this.visible = true;
         this.confirmLoading = true
         // this.model = Object.assign({}, record);
         getAction(this.url.queryById, {id: record.id}).then((res) => {
           this.model = res.result
+          console.log(res)
           this.confirmLoading = false
         })
       },
@@ -179,6 +226,12 @@
          
         })
       },
+      handleOk(data){
+        data.map(res=>{
+
+        })
+        this.model.inspectContentList = data;
+      },
     }
   }
 </script>

+ 143 - 0
src/views/module_cmms/inspectSpot/modules/InspectSpotModalAdd.vue

@@ -0,0 +1,143 @@
+<template>
+  <j-modal
+  :title="title"
+  :width="width"
+  :visible="visible"
+  @ok="handleOk"
+  @cancel="handleCancel"
+  cancelText="关闭">
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+      :pagination="false"
+      class="j-table-force-nowrap">
+    </a-table>
+  </j-modal>
+</template>
+
+<script>
+  import { httpAction, getAction } from '@/api/manage'
+  
+  export default {
+    name: 'SpotcheckContentModalAdd',
+    components: {
+        
+    },
+    props: {
+      //表单禁用
+      equipmentId: {
+        type: String,
+        default: ''
+      },
+      selectData: {
+        type: Array,
+        default: function(){
+          return [] // 使用工厂函数返回默认值
+        }
+      },
+    },
+    data () {
+      return {
+        title:'',
+        width: 1000,
+        visible: false,
+        /* table选中keys*/
+        selectedRowKeys: [],
+        /* table选中records*/
+        selectionRows: [],
+        columns: [
+          // {
+          //   title: '',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'巡检项目编号',
+            align:"center",
+            dataIndex: 'contentcode'
+          },
+          {
+            title:'巡检项目名称',
+            align:"center",
+            dataIndex: 'contentname'
+          },
+          {
+            title:'设备',
+            align:"center",
+            dataIndex: 'equipmentid'
+          },
+          // {
+          //   title:'状态',
+          //   align:"center",
+          //   dataIndex: 'status'
+          // },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+        ],
+        dataSource: [],
+        url: {
+          getList: "/cmmsInspectItem/cmmsInspectItem/getItemByEqId",
+          contentList: "/cmmsInspectContent/cmmsInspectContent/listDetails",
+        },
+      }
+    },
+    methods: {
+      add () {
+        this.visible = true;
+        getAction(this.url.contentList, {status: '0'}).then((res) => {
+          this.dataSource = res.result.records
+        })
+        this.selectList()
+      },
+      // 将以选中的值重新在列表中选中
+      selectList() {
+        this.selectionRows = this.selectData
+        console.log(this.selectData)
+        this.selectedRowKeys = this.selectData.map((res) => {
+          return res.id
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.onClearSelected()
+        this.selectionRows = this.selectData
+        this.selectedRowKeys = this.selectData.map((res) => {
+          return res.id
+        })
+        this.dataSource = []
+      },
+      handleOk () {
+        console.log(this.selectionRows)
+        this.$emit('ok', this.selectionRows);
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedRowKeys = selectedRowKeys;
+        this.selectionRows = selectionRows;
+        console.log(this.selectedRowKeys,this.selectionRows)
+      },
+      onClearSelected() {
+        this.selectedRowKeys = [];
+        this.selectionRows = [];
+      },
+    }
+  }
+</script>

+ 261 - 0
src/views/module_cmms/upkeep/UpkeepList.vue

@@ -0,0 +1,261 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('保养工单')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <upkeep-modal ref="modalForm" @ok="modalFormOk"></upkeep-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import UpkeepModal from './modules/UpkeepModal'
+
+  export default {
+    name: 'UpkeepList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      UpkeepModal
+    },
+    data () {
+      return {
+        description: '保养工单管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title:'保养工单编号',
+            align:"center",
+            dataIndex: 'upkeepcode'
+          },
+          {
+            title:'保养名称(标题)',
+            align:"center",
+            dataIndex: 'upkeepname'
+          },
+          {
+            title:'保养计划ID',
+            align:"center",
+            dataIndex: 'upkeepplanid'
+          },
+          {
+            title:'保养工作项目ID',
+            align:"center",
+            dataIndex: 'upkeepprojid'
+          },
+          {
+            title:'工作项目名称',
+            align:"center",
+            dataIndex: 'projectname'
+          },
+          {
+            title:'计划名称',
+            align:"center",
+            dataIndex: 'planname'
+          },
+          {
+            title:'地点',
+            align:"center",
+            dataIndex: 'address'
+          },
+          {
+            title:'厂商名称',
+            align:"center",
+            dataIndex: 'supplier'
+          },
+          {
+            title:'厂商电话',
+            align:"center",
+            dataIndex: 'suppliertel'
+          },
+          {
+            title:'联系人',
+            align:"center",
+            dataIndex: 'linker'
+          },
+          {
+            title:'联系人电话',
+            align:"center",
+            dataIndex: 'linkertel'
+          },
+          {
+            title:'负责人',
+            align:"center",
+            dataIndex: 'chargeruser'
+          },
+          {
+            title:'描述',
+            align:"center",
+            dataIndex: 'upkeepdesc'
+          },
+          {
+            title:'状态:0待处理、1已通知、2未执行、3未完成、4已完成',
+            align:"center",
+            dataIndex: 'status'
+          },
+          {
+            title:'处理意见',
+            align:"center",
+            dataIndex: 'opinion'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/cmmsUpkeep/cmmsUpkeep/list",
+          delete: "/cmmsUpkeep/cmmsUpkeep/delete",
+          deleteBatch: "/cmmsUpkeep/cmmsUpkeep/deleteBatch",
+          exportXlsUrl: "/cmmsUpkeep/cmmsUpkeep/exportXls",
+          importExcelUrl: "cmmsUpkeep/cmmsUpkeep/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
+        fieldList.push({type:'string',value:'upkeepcode',text:'保养工单编号',dictCode:''})
+        fieldList.push({type:'string',value:'upkeepname',text:'保养名称(标题)',dictCode:''})
+        fieldList.push({type:'string',value:'upkeepplanid',text:'保养计划ID',dictCode:''})
+        fieldList.push({type:'string',value:'upkeepprojid',text:'保养工作项目ID',dictCode:''})
+        fieldList.push({type:'string',value:'projectname',text:'工作项目名称',dictCode:''})
+        fieldList.push({type:'string',value:'planname',text:'计划名称',dictCode:''})
+        fieldList.push({type:'string',value:'address',text:'地点',dictCode:''})
+        fieldList.push({type:'string',value:'supplier',text:'厂商名称',dictCode:''})
+        fieldList.push({type:'string',value:'suppliertel',text:'厂商电话',dictCode:''})
+        fieldList.push({type:'string',value:'linker',text:'联系人',dictCode:''})
+        fieldList.push({type:'string',value:'linkertel',text:'联系人电话',dictCode:''})
+        fieldList.push({type:'string',value:'chargeruser',text:'负责人',dictCode:''})
+        fieldList.push({type:'string',value:'upkeepdesc',text:'描述',dictCode:''})
+        fieldList.push({type:'string',value:'status',text:'状态:0待处理、1已通知、2未执行、3未完成、4已完成',dictCode:''})
+        fieldList.push({type:'string',value:'opinion',text:'处理意见',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 179 - 0
src/views/module_cmms/upkeep/modules/UpkeepForm.vue

@@ -0,0 +1,179 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="保养工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upkeepcode">
+              <a-input v-model="model.upkeepcode" placeholder="请输入保养工单编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="保养名称(标题)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upkeepname">
+              <a-input v-model="model.upkeepname" placeholder="请输入保养名称(标题)"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="保养计划ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upkeepplanid">
+              <a-input v-model="model.upkeepplanid" placeholder="请输入保养计划ID"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="保养工作项目ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upkeepprojid">
+              <a-input v-model="model.upkeepprojid" placeholder="请输入保养工作项目ID"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="工作项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectname">
+              <a-input v-model="model.projectname" placeholder="请输入工作项目名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="计划名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planname">
+              <a-input v-model="model.planname" placeholder="请输入计划名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地点"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="厂商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplier">
+              <a-input v-model="model.supplier" placeholder="请输入厂商名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="厂商电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suppliertel">
+              <a-input v-model="model.suppliertel" placeholder="请输入厂商电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="linker">
+              <a-input v-model="model.linker" placeholder="请输入联系人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="联系人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="linkertel">
+              <a-input v-model="model.linkertel" placeholder="请输入联系人电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chargeruser">
+              <a-input v-model="model.chargeruser" placeholder="请输入负责人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upkeepdesc">
+              <a-input v-model="model.upkeepdesc" placeholder="请输入描述"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="状态:0待处理、1已通知、2未执行、3未完成、4已完成" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+              <a-input v-model="model.status" placeholder="请输入状态:0待处理、1已通知、2未执行、3未完成、4已完成"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="处理意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="opinion">
+              <a-input v-model="model.opinion" placeholder="请输入处理意见"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'UpkeepForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/cmmsUpkeep/cmmsUpkeep/add",
+          edit: "/cmmsUpkeep/cmmsUpkeep/edit",
+          queryById: "/cmmsUpkeep/cmmsUpkeep/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_cmms/upkeep/modules/UpkeepModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <upkeep-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></upkeep-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import UpkeepForm from './UpkeepForm'
+
+  export default {
+    name: 'UpkeepModal',
+    components: {
+      UpkeepForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_cmms/upkeep/modules/UpkeepModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <upkeep-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></upkeep-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import UpkeepForm from './UpkeepForm'
+  export default {
+    name: 'UpkeepModal',
+    components: {
+      UpkeepForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 2 - 2
src/views/module_cmms/upkeepItem/UpkeepItemList.vue

@@ -178,7 +178,7 @@
             dataIndex: 'itemcode'
           },
           {
-            title:'保养描述',
+            title:'保养标准',
             align:"center",
             dataIndex: 'itemcontent'
           },
@@ -224,7 +224,7 @@
         fieldList.push({type:'string',value:'itemcode',text:'保养编号',dictCode:''})
         fieldList.push({type:'string',value:'itemname',text:'名称',dictCode:''})
         fieldList.push({type:'string',value:'equipdefid',text:'设备类型ID(设备树,可单选可多选,多选设备类型用逗号连接)',dictCode:''})
-        fieldList.push({type:'string',value:'itemcontent',text:'保养描述',dictCode:''})
+        fieldList.push({type:'string',value:'itemcontent',text:'保养标准',dictCode:''})
         fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
         this.superFieldList = fieldList
       }

+ 2 - 2
src/views/module_cmms/upkeepItem/modules/UpkeepItemForm.vue

@@ -30,8 +30,8 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="保养描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemcontent">
-              <a-input v-model="model.itemcontent" placeholder="请输入保养描述"  ></a-input>
+            <a-form-model-item label="保养标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemcontent">
+              <a-input v-model="model.itemcontent" placeholder="请输入保养标准"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">

+ 306 - 0
src/views/module_cmms/upkeepPlan/UpkeepPlanList.vue

@@ -0,0 +1,306 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('保养计划')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <upkeep-plan-modal ref="modalForm" @ok="modalFormOk"></upkeep-plan-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import UpkeepPlanModal from './modules/UpkeepPlanModal'
+
+  export default {
+    name: 'UpkeepPlanList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      UpkeepPlanModal
+    },
+    data () {
+      return {
+        description: '保养计划管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'保养计划编号',
+            align:"center",
+            dataIndex: 'plancode'
+          },
+          {
+            title:'保养计划名称',
+            align:"center",
+            dataIndex: 'planname'
+          },
+          // {
+          //   title:'保养工作项目ID',
+          //   align:"center",
+          //   dataIndex: 'upkeepprojid'
+          // },
+          {
+            title:'工作项目名称',
+            align:"center",
+            dataIndex: 'projectname'
+          },
+          {
+            title:'地点',
+            align:"center",
+            dataIndex: 'address'
+          },
+          {
+            title:'厂商名称',
+            align:"center",
+            dataIndex: 'supplier'
+          },
+          {
+            title:'厂商电话',
+            align:"center",
+            dataIndex: 'suppliertel'
+          },
+          {
+            title:'联系人',
+            align:"center",
+            dataIndex: 'linker'
+          },
+          {
+            title:'联系人电话',
+            align:"center",
+            dataIndex: 'linkertel'
+          },
+          {
+            title:'负责人',
+            align:"center",
+            dataIndex: 'chargeruser'
+          },
+          {
+            title:'描述',
+            align:"center",
+            dataIndex: 'plandesc'
+          },
+          {
+            title:'开始时间',
+            align:"center",
+            dataIndex: 'begintime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'重复',
+            align:"center",
+            dataIndex: 'repeatnum'
+          },
+          {
+            title:'重复类型:年、月、周、日、时、分',
+            align:"center",
+            dataIndex: 'repeattype'
+          },
+          {
+            title:'提前通知时间',
+            align:"center",
+            dataIndex: 'noticenum'
+          },
+          {
+            title:'提前通知类型:天、时、分',
+            align:"center",
+            dataIndex: 'noticetype'
+          },
+          {
+            title:'状态(0启用 1停用)',
+            align:"center",
+            dataIndex: 'status'
+          },
+          {
+            title:'下次执行时间',
+            align:"center",
+            dataIndex: 'nexttime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'下次通知时间',
+            align:"center",
+            dataIndex: 'noticetime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'是否已通知:是/否',
+            align:"center",
+            dataIndex: 'ifnotice'
+          },
+          {
+            title:'设备id(根据设备id查找保养项内容)',
+            align:"center",
+            dataIndex: 'equipmentid'
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/cmmsUpkeepPlan/cmmsUpkeepPlan/list",
+          delete: "/cmmsUpkeepPlan/cmmsUpkeepPlan/delete",
+          deleteBatch: "/cmmsUpkeepPlan/cmmsUpkeepPlan/deleteBatch",
+          exportXlsUrl: "/cmmsUpkeepPlan/cmmsUpkeepPlan/exportXls",
+          importExcelUrl: "cmmsUpkeepPlan/cmmsUpkeepPlan/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
+        fieldList.push({type:'string',value:'plancode',text:'保养计划编号',dictCode:''})
+        fieldList.push({type:'string',value:'planname',text:'保养计划名称',dictCode:''})
+        fieldList.push({type:'string',value:'upkeepprojid',text:'保养工作项目ID',dictCode:''})
+        fieldList.push({type:'string',value:'projectname',text:'工作项目名称',dictCode:''})
+        fieldList.push({type:'string',value:'address',text:'地点',dictCode:''})
+        fieldList.push({type:'string',value:'supplier',text:'厂商名称',dictCode:''})
+        fieldList.push({type:'string',value:'suppliertel',text:'厂商电话',dictCode:''})
+        fieldList.push({type:'string',value:'linker',text:'联系人',dictCode:''})
+        fieldList.push({type:'string',value:'linkertel',text:'联系人电话',dictCode:''})
+        fieldList.push({type:'string',value:'chargeruser',text:'负责人',dictCode:''})
+        fieldList.push({type:'string',value:'plandesc',text:'描述',dictCode:''})
+        fieldList.push({type:'date',value:'begintime',text:'开始时间'})
+        fieldList.push({type:'int',value:'repeatnum',text:'重复',dictCode:''})
+        fieldList.push({type:'string',value:'repeattype',text:'重复类型:年、月、周、日、时、分',dictCode:''})
+        fieldList.push({type:'int',value:'noticenum',text:'提前通知时间',dictCode:''})
+        fieldList.push({type:'string',value:'noticetype',text:'提前通知类型:天、时、分',dictCode:''})
+        fieldList.push({type:'string',value:'status',text:'状态(0启用 1停用)',dictCode:''})
+        fieldList.push({type:'date',value:'nexttime',text:'下次执行时间'})
+        fieldList.push({type:'date',value:'noticetime',text:'下次通知时间'})
+        fieldList.push({type:'string',value:'ifnotice',text:'是否已通知:是/否',dictCode:''})
+        fieldList.push({type:'string',value:'equipmentid',text:'设备id(根据设备id查找保养项内容)',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 209 - 0
src/views/module_cmms/upkeepPlan/modules/UpkeepPlanForm.vue

@@ -0,0 +1,209 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item label="保养计划编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="plancode">
+              <a-input v-model="model.plancode" placeholder="请输入保养计划编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="保养计划名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planname">
+              <a-input v-model="model.planname" placeholder="请输入保养计划名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="保养工作项目ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="upkeepprojid">
+              <a-input v-model="model.upkeepprojid" placeholder="请输入保养工作项目ID"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="工作项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="projectname">
+              <a-input v-model="model.projectname" placeholder="请输入工作项目名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="地点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地点"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="厂商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplier">
+              <a-input v-model="model.supplier" placeholder="请输入厂商名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="厂商电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="suppliertel">
+              <a-input v-model="model.suppliertel" placeholder="请输入厂商电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="linker">
+              <a-input v-model="model.linker" placeholder="请输入联系人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="联系人电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="linkertel">
+              <a-input v-model="model.linkertel" placeholder="请输入联系人电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chargeruser">
+              <a-input v-model="model.chargeruser" placeholder="请输入负责人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="plandesc">
+              <a-input v-model="model.plandesc" placeholder="请输入描述"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="begintime">
+              <j-date placeholder="请选择开始时间" v-model="model.begintime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="重复" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repeatnum">
+              <a-input-number v-model="model.repeatnum" :min="1" placeholder="请输入重复" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="重复类型:年、月、周、日、时、分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repeattype">
+              <a-input v-model="model.repeattype" placeholder="请输入重复类型:年、月、周、日、时、分"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="提前通知时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noticenum">
+              <a-input-number v-model="model.noticenum" :min="1" placeholder="请输入提前通知时间" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="提前通知类型:天、时、分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noticetype">
+              <a-input v-model="model.noticetype" placeholder="请输入提前通知类型:天、时、分"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="状态(0启用 1停用)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+              <a-input v-model="model.status" placeholder="请输入状态(0启用 1停用)"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="下次执行时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nexttime">
+              <j-date placeholder="请选择下次执行时间" v-model="model.nexttime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="下次通知时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noticetime">
+              <j-date placeholder="请选择下次通知时间" v-model="model.noticetime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="是否已通知:是/否" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ifnotice">
+              <a-input v-model="model.ifnotice" placeholder="请输入是否已通知:是/否"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="设备id(根据设备id查找保养项内容)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
+              <a-input v-model="model.equipmentid" placeholder="请输入设备id(根据设备id查找保养项内容)"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'UpkeepPlanForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/cmmsUpkeepPlan/cmmsUpkeepPlan/add",
+          edit: "/cmmsUpkeepPlan/cmmsUpkeepPlan/edit",
+          queryById: "/cmmsUpkeepPlan/cmmsUpkeepPlan/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_cmms/upkeepPlan/modules/UpkeepPlanModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <upkeep-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></upkeep-plan-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import UpkeepPlanForm from './UpkeepPlanForm'
+
+  export default {
+    name: 'UpkeepPlanModal',
+    components: {
+      UpkeepPlanForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_cmms/upkeepPlan/modules/UpkeepPlanModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <upkeep-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></upkeep-plan-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import UpkeepPlanForm from './UpkeepPlanForm'
+  export default {
+    name: 'UpkeepPlanModal',
+    components: {
+      UpkeepPlanForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 2 - 1
src/views/module_ems/energyAnalyse/balanceAnalysis/index.vue

@@ -3,13 +3,14 @@
     
   </div>
 </template>
-// 用能平衡分析
+
 <script>
 import { httpAction, getAction } from '@/api/manage'
   export default {
     name: '',
     data () {
       return {
+        description: '用能平衡分析',
       }
     },
     created () {

+ 6 - 6
src/views/module_ems/energyAnalyse/demandAnalysis/index.vue

@@ -4,12 +4,12 @@
     <div class="item-echarts" ref="echarts" :style="{ height: echartsHeight + 'px' }"></div>
   </div>
 </template>
-// 需量分析
+
 <script>
 import * as echarts from 'echarts'
 import commonSearch from '../components/commonSearch.vue'
 import { httpAction, getAction } from '@/api/manage'
-import { testdata } from '../testdata';
+import { emsdata } from '../emsdata';
 export default {
   name: '',
   components: {
@@ -17,6 +17,7 @@ export default {
   },
   data() {
     return {
+      description: '需量分析',
       loading: true,
       echartsHeight: window.innerHeight - 84 - 60 - 30,
       myChart: null,
@@ -38,9 +39,9 @@ export default {
   methods: {
     // 后端好了需要删掉
     getTest() {
-      this.monthsplit = testdata.demanddata.monthsplit
-      this.mubiao = testdata.demanddata.mubiao
-      this.shiji = testdata.demanddata.shiji
+      this.monthsplit = emsdata.demanddata.monthsplit
+      this.mubiao = emsdata.demanddata.mubiao
+      this.shiji = emsdata.demanddata.shiji
       this.initEcharts()
     },
     async getDemandanalysis() {
@@ -112,7 +113,6 @@ export default {
     initEcharts() {
       var _this = this
       var chartDom = _this.$refs.echarts
-      console.log("需量", this.$refs)
       _this.myChart = echarts.init(chartDom)
       var option
 

+ 1 - 0
src/views/module_ems/energyAnalyse/electricityDay/index.vue

@@ -74,6 +74,7 @@ export default {
   name: "emselectricityday",
   data() {
     return {
+      description: '日用电量',
       // 遮罩层
       loading: false,
       // 选中数组

+ 1 - 0
src/views/module_ems/energyAnalyse/emsdata.js

@@ -0,0 +1 @@
+export const emsdata = require('./emsdata.json');

文件差异内容过多而无法显示
+ 70323 - 0
src/views/module_ems/energyAnalyse/emsdata.json


+ 6 - 5
src/views/module_ems/energyAnalyse/energyDashboard/index.vue

@@ -27,12 +27,12 @@
               <div class="name">即时需量</div>
               <div class="value">{{ demandStatistics.jishi }}</div>
             </div>
-            <el-divider direction="vertical"></el-divider>
+            <!-- <a-divider direction="vertical"></a-divider> -->
             <div class="item-info">
               <div class="name">需量峰值</div>
               <div class="value">{{ demandStatistics.fengzhi }}</div>
             </div>
-            <el-divider direction="vertical"></el-divider>
+            <!-- <a-divider direction="vertical"></a-divider> -->
             <div class="item-info">
               <div class="name">目标需量</div>
               <div class="value">{{ demandStatistics.mubiao }}</div>
@@ -56,7 +56,7 @@
                 <div class="name">湿度(%)</div>
                 <div class="value">{{ demandStatistics.shidu }}</div>
               </div>
-              <el-divider direction="vertical"></el-divider>
+              <!-- <a-divider direction="vertical"></a-divider> -->
               <div class="item-info">
                 <div class="name">温度(℃)</div>
                 <div class="value">{{ demandStatistics.wendu }}</div>
@@ -90,7 +90,7 @@
 import * as echarts from 'echarts'
 import commonSearch from '../components/commonSearch'
 import { httpAction, getAction } from '@/api/manage'
-import { testdata } from '../testdata';
+import { emsdata } from '../emsdata';
 export default {
   name: '',
   components: {
@@ -98,6 +98,7 @@ export default {
   },
   data() {
     return {
+      description: '能耗总览',
       loading: true,
       energySpace: {},
       demandStatistics: {
@@ -143,7 +144,7 @@ export default {
   methods: {
     // 后端好了需要删掉
     getTest() {
-      var listData = testdata.dashboarddata
+      var listData = emsdata.dashboarddata
       console.log(listData)
       // 用电需量
       this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue

+ 4 - 3
src/views/module_ems/energyAnalyse/energyItem/index.vue

@@ -70,12 +70,12 @@
     <div class="trend-charts" ref="trendCharts"></div>
   </div>
 </template>
-// 分项能耗
+
 <script>
   import * as echarts from 'echarts';
   import commonSearch from '../components/commonSearch.vue'
   import { httpAction, getAction } from '@/api/manage'
-  import { testdata } from '../testdata';
+  import { emsdata } from '../emsdata';
   export default {
     name: '',
     components: {
@@ -83,6 +83,7 @@
     },
     data () {
       return {
+      description: '分项能耗',
         loading: true,
         itemizedStatistics: {
           nowDay: null,
@@ -124,7 +125,7 @@
     methods: {
       // 后端好了需要删掉
       getTest() {
-        var listData = testdata.itemdata
+        var listData = emsdata.itemdata
         // 日
         this.itemizedStatistics.nowDay = (listData.dayStatistics.find(item=>item.type === '当日用能')).howManyValue
         this.itemizedStatistics.lastDay = (listData.dayStatistics.find(item=>item.type === '昨日用能')).howManyValue

+ 4 - 3
src/views/module_ems/energyAnalyse/energyRank/index.vue

@@ -30,13 +30,13 @@
     </a-table>
   </div>
 </template>
-// 能耗排名
+
 <script>
 import * as echarts from 'echarts'
 import commonSearch from '../components/commonSearch.vue'
 import { httpAction, getAction } from '@/api/manage'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import { testdata } from '../testdata';
+import { emsdata } from '../emsdata';
 export default {
   name: '',
   components: {
@@ -45,6 +45,7 @@ export default {
   },
   data() {
     return {
+      description: '能耗排名',
       loading: true,
       columns: [
         {
@@ -149,7 +150,7 @@ export default {
   methods: {
     // 后端好了需要删掉
     getTest() {
-      this.tableData = testdata.rankdata
+      this.tableData = emsdata.rankdata
       var yuanquName, numbers
       yuanquName = this.tableData.map((obj) => {
         return obj.equipmentname

+ 5 - 4
src/views/module_ems/energyAnalyse/flowAnalysis/index.vue

@@ -4,12 +4,12 @@
     <div class="sankey-chart" ref="sankeyChart" style="height:1800px"></div>
   </div>
 </template>
-// 能流分析
+
 <script>
   import * as echarts from 'echarts';
   import commonSearch from '../components/commonSearch.vue'
   import { httpAction, getAction } from '@/api/manage'
-  import { testdata } from '../testdata';
+  import { emsdata } from '../emsdata';
   export default {
     name: '',
     components: {
@@ -17,6 +17,7 @@
     },
     data () {
       return {
+      description: '能流分析页面',
         loading: true,
         echartsHeight: window.innerHeight - 84 - 60 - 30,
         // 每一个数据及当前总数据(可能多条路线的和)
@@ -38,8 +39,8 @@
     methods: {
     // 后端好了需要删掉
     getTest() {
-      this.sourceData = testdata.flowdata.sourceData
-      this.linksData = testdata.flowdata.linksData
+      this.sourceData = emsdata.flowdata.sourceData
+      this.linksData = emsdata.flowdata.linksData
       this.initEcharts()
     },
       async getEnergyflowAnalysis(){

+ 206 - 0
src/views/module_ems/energyAnalyse/meterReadData/index.vue

@@ -0,0 +1,206 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24"> </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button type="primary" icon="download" @click="handleExportXls('base_elecfee_base')">导出</a-button>
+      <!-- <a-upload
+        name="file"
+        :showUploadList="false"
+        :multiple="false"
+        :headers="tokenHeader"
+        :action="importExcelUrl"
+        @change="handleImportExcel"
+      >
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <j-super-query
+        :fieldList="superFieldList"
+        ref="superQueryModal"
+        @handleSuperQuery="handleSuperQuery"
+      ></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :loading="loading"
+        class="j-table-force-nowrap"
+        :pagination="false"
+      >
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
+          <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+      </a-table>
+    </div>
+
+  </a-card>
+</template>
+
+<script>
+import '@/assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { loadCategoryData } from '@/api/api'
+// import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
+import { emsdata } from '../emsdata';
+
+export default {
+  name: 'meterReadData',
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // filterMultiDictText,
+  },
+  data() {
+    return {
+      description: '用电集抄页面',
+      // 表头
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1
+          },
+        },
+        {
+          title: '设备名称',
+          align: 'center',
+          dataIndex: 'equipmentname',
+          width: 200,
+        },
+        {
+          title: '设备编号',
+          align: 'center',
+          dataIndex: 'equipmentcode',
+          width: 150,
+        },
+        {
+          title: '开始表数',
+          align: 'center',
+          dataIndex: 'beginvalue',
+          width: 200,
+        },
+        {
+          title: '结束表数',
+          align: 'center',
+          dataIndex: 'endvalue',
+          width: 150,
+        },
+        {
+          title: '用电量(kWh)',
+          align: 'center',
+          dataIndex: 'tagvalue',
+          width: 130,
+        },
+        {
+          title: '电费(元)',
+          align: 'center',
+          dataIndex: 'electricityvalue',
+          width: 130,
+        },
+      ],
+      url: {
+        list: '/ems/emselectricity/liststa',
+        exportXlsUrl: '/ems/emselectricity/exportXls',
+      },
+      superFieldList: [],
+      dataSource: [],
+    }
+  },
+  created() {
+    // this.getSuperFieldList()
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getData()
+    })
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    },
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      this.dataSource = emsdata.meterreadData
+    },
+    getData() {
+        console.log("查询")
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+    //   getAction(this.url.list, data).then((response) => {
+    //     this.dataSource = response.data
+    //     this.loading = false
+    //   })
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = []
+      fieldList.push({ type: 'int', value: 'elecfeebaseid', text: '基本电费ID', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
+      fieldList.push({ type: 'sel_depart', value: 'deptid', text: '部门' })
+      fieldList.push({ type: 'string', value: 'feetype', text: '计费类型', dictCode: 'elecfee_base_feetype' })
+      fieldList.push({ type: 'double', value: 'kva', text: '变压器容量/合同最大需量(kVA)', dictCode: '' })
+      fieldList.push({ type: 'double', value: 'price', text: '基本电价(元/kw)', dictCode: '' })
+      fieldList.push({ type: 'date', value: 'begintime', text: '开始时间' })
+      fieldList.push({ type: 'date', value: 'endtime', text: '结束时间' })
+      this.superFieldList = fieldList
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 185 - 0
src/views/module_ems/energyAnalyse/moniparamData/index.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="demand-analysis" :loading="loading">
+    <!-- <commonSearch ref="commonSearch" type="daterange" @search="handleSearch"></commonSearch> -->
+    <div class="item-echarts" ref="echarts" :style="{ height: echartsHeight + 'px' }"></div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+import commonSearch from '../components/commonSearch.vue'
+import { httpAction, getAction } from '@/api/manage'
+import { emsdata } from '../emsdata'
+export default {
+  name: '',
+  components: {
+    commonSearch,
+  },
+  data() {
+    return {
+      description: '参数历史查询',
+      loading: true,
+      echartsHeight: window.innerHeight - 84 - 60 - 30,
+      myChart: null,
+      url: {
+        list: '/ems/statistics/demandanalysis',
+      },
+      moniparamData: {},
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      setTimeout(() => {
+        this.getTest()
+      }, 1000)
+      // this.getDemandanalysis()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      this.moniparamData = emsdata.moniparamData
+      this.initEcharts()
+    },
+    async getDemandanalysis() {
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((response) => {
+        console.log(response)
+        this.monthsplit = response.data.monthsplit
+        this.mubiao = response.data.mubiao
+        this.shiji = response.data.shiji
+        this.loading = false
+      })
+      this.initEcharts()
+    },
+    initEcharts() {
+      var _this = this
+      var chartDom = _this.$refs.echarts
+      _this.myChart = echarts.init(chartDom)
+
+      var option = {
+        tooltip: {
+          trigger: 'axis',
+          position: function (pt) {
+            return [pt[0], '20%']
+          },
+        },
+        title: {
+          left: 'left',
+          text: '参数历史数据',
+        },
+        legend: {
+          data: ['Pa', 'Pb', 'Pc', 'P'],
+        },
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: _this.moniparamData.times,
+        },
+        yAxis: {
+          type: 'value',
+          boundaryGap: [0, '100%'],
+        },
+        dataZoom: [
+          {
+            type: 'inside',
+            start: 0,
+            end: 100,
+            xAxisIndex: 0,
+          },
+          {
+            start: 0,
+            end: 10,
+          },
+          {
+            show: true,
+            yAxisIndex: 0,
+            filterMode: "empty",
+            width: 30,
+            height: "80%",
+            right: "7%",
+          },
+        ],
+        series: [
+          {
+            name: 'Pa',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            itemStyle: {
+              color: '#91CC75',
+            },
+            data: _this.moniparamData.result.Pa,
+          },
+          {
+            name: 'Pb',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            itemStyle: {
+              color: '#EE6666',
+            },
+            data: _this.moniparamData.result.Pb,
+          },
+          {
+            name: 'Pc',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            itemStyle: {
+              color: '#FAAD14',
+            },
+            data: _this.moniparamData.result.Pc,
+          },
+          {
+            name: 'P',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            itemStyle: {
+              color: '#5470C6',
+            },
+            data: _this.moniparamData.result.P,
+          },
+        ],
+      }
+
+      option && _this.myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        _this.myChart.resize()
+      })
+    },
+    /** 搜索按钮操作 */
+    handleSearch(param) {
+      this.getTest()
+      // this.getDemandanalysis()
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+@import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.demand-analysis {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .search-container {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding-top: 12px;
+    margin-bottom: 10px;
+    .el-form-item--small.el-form-item {
+      margin-bottom: 14px;
+    }
+  }
+  .item-echarts {
+    // min-height: calc(100vh - 174px);
+    padding: 10px;
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+  }
+}
+</style>

+ 178 - 0
src/views/module_ems/energyAnalyse/paramData/index.vue

@@ -0,0 +1,178 @@
+<template>
+  <div class="demand-analysis" :loading="loading">
+    <!-- <commonSearch ref="commonSearch" type="daterange" @search="handleSearch"></commonSearch> -->
+    <div class="item-echarts" ref="echarts" :style="{ height: echartsHeight + 'px' }"></div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+import commonSearch from '../components/commonSearch.vue'
+import { httpAction, getAction } from '@/api/manage'
+import { emsdata } from '../emsdata'
+export default {
+  name: '',
+  components: {
+    commonSearch,
+  },
+  data() {
+    return {
+      description: '参数历史查询',
+      loading: true,
+      echartsHeight: window.innerHeight - 84 - 60 - 30,
+      myChart: null,
+      url: {
+        list: '/ems/statistics/demandanalysis',
+      },
+      paramData: {},
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      setTimeout(() => {
+        this.getTest()
+      }, 1000)
+      // this.getDemandanalysis()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      this.paramData = emsdata.paramData
+      this.initEcharts()
+    },
+    async getDemandanalysis() {
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((response) => {
+        console.log(response)
+        this.monthsplit = response.data.monthsplit
+        this.mubiao = response.data.mubiao
+        this.shiji = response.data.shiji
+        this.loading = false
+      })
+      this.initEcharts()
+    },
+    initEcharts() {
+      var _this = this
+      var chartDom = _this.$refs.echarts
+      _this.myChart = echarts.init(chartDom)
+
+      var option = {
+        tooltip: {
+          trigger: 'axis',
+          position: function (pt) {
+            return [pt[0], '20%']
+          },
+        },
+        title: {
+          left: 'left',
+          text: '参数历史数据',
+        },
+        legend: {
+          data: ['A相电压', 'B相电压', 'C相电压'],
+        },
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: _this.paramData.times,
+        },
+        yAxis: {
+          type: 'value',
+          boundaryGap: [0, '100%'],
+        },
+        dataZoom: [
+          {
+            type: 'inside',
+            start: 0,
+            end: 100,
+            xAxisIndex: 0,
+          },
+          {
+            start: 0,
+            end: 10,
+          },
+          {
+            show: true,
+            yAxisIndex: 0,
+            filterMode: "empty",
+            width: 30,
+            height: "80%",
+            left: "5%",
+          },
+        ],
+        series: [
+          {
+            name: 'A相电压',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            color: '#5470C6',
+            itemStyle: {
+              color: '#5470C6',
+            },
+            data: _this.paramData.result.Ua,
+          },
+          {
+            name: 'B相电压',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            color: '#91CC75',
+            itemStyle: {
+              color: '#91CC75',
+            },
+            data: _this.paramData.result.Ub,
+          },
+          {
+            name: 'C相电压',
+            type: 'line',
+            symbol: 'none',
+            sampling: 'lttb',
+            color: '#EE6666',
+            itemStyle: {
+              color: '#EE6666',
+            },
+            data: _this.paramData.result.Uc,
+          },
+        ],
+      }
+
+      option && _this.myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        _this.myChart.resize()
+      })
+    },
+    /** 搜索按钮操作 */
+    handleSearch(param) {
+      this.getTest()
+      // this.getDemandanalysis()
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+@import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.demand-analysis {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .search-container {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding-top: 12px;
+    margin-bottom: 10px;
+    .el-form-item--small.el-form-item {
+      margin-bottom: 14px;
+    }
+  }
+  .item-echarts {
+    // min-height: calc(100vh - 174px);
+    padding: 10px;
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+  }
+}
+</style>

+ 2 - 1
src/views/module_ems/energyAnalyse/peakValleyAnalysis/index.vue

@@ -58,7 +58,7 @@
   import * as echarts from 'echarts';
   import commonSearch from '../components/commonSearch.vue'
   import { httpAction, getAction } from '@/api/manage'
-  import { testdata } from '../testdata';
+  import { emsdata } from '../emsdata';
   export default {
     name: '',
     components: {
@@ -66,6 +66,7 @@
     },
     data () {
       return {
+        description: '用能平衡分析',
         showSearch: true,
         dataLists: [
           { name: '尖时', number: 11514.45, pieValue: 34.37 },

+ 12 - 11
src/views/module_ems/energyAnalyse/savingAnalysis/index.vue

@@ -22,12 +22,12 @@
     <div class="item-echarts" ref="echarts"></div>
   </div>
 </template>
-// 节能分析
+
 <script>
 import * as echarts from 'echarts'
 import commonSearch from '../components/commonSearch.vue'
 import { httpAction, getAction } from '@/api/manage'
-import { testdata } from '../testdata';
+import { emsdata } from '../emsdata';
 export default {
   name: '',
   components: {
@@ -35,6 +35,7 @@ export default {
   },
   data() {
     return {
+        description: '节能分析',
       loading: true,
       anlysis: null,
       shijiAll: null,
@@ -60,15 +61,15 @@ export default {
   methods: {
     // 后端好了需要删掉
     getTest() {
-        this.jienengData = testdata.savedata.jienengData
-        this.chaobiaoData = testdata.savedata.chaobiaoData
-        this.jihuaData = testdata.savedata.jihuaData
-        this.leijiData = testdata.savedata.leijiData
-        this.monthDate = testdata.savedata.monthDate
-        this.anlysis = testdata.savedata.anlysis
-        this.jihuaAll = testdata.savedata.jihuaAll
-        this.shijiAll = testdata.savedata.shijiAll
-        this.leijiAll = testdata.savedata.leijiAll
+        this.jienengData = emsdata.savedata.jienengData
+        this.chaobiaoData = emsdata.savedata.chaobiaoData
+        this.jihuaData = emsdata.savedata.jihuaData
+        this.leijiData = emsdata.savedata.leijiData
+        this.monthDate = emsdata.savedata.monthDate
+        this.anlysis = emsdata.savedata.anlysis
+        this.jihuaAll = emsdata.savedata.jihuaAll
+        this.shijiAll = emsdata.savedata.shijiAll
+        this.leijiAll = emsdata.savedata.leijiAll
       this.initEcharts()
     },
     async getSavinganalysis() {

+ 0 - 1
src/views/module_ems/energyAnalyse/testdata.js

@@ -1 +0,0 @@
-export const testdata = require('./testdata.json');

文件差异内容过多而无法显示
+ 0 - 3365
src/views/module_ems/energyAnalyse/testdata.json


+ 851 - 0
src/views/module_ems/photovoltaic/inverterAnalysis/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>

+ 851 - 0
src/views/module_ems/photovoltaic/inverterMonitor/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>

+ 851 - 0
src/views/module_ems/photovoltaic/inverterStatis/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>

+ 851 - 0
src/views/module_ems/photovoltaic/mdCurveAnalysis/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>

+ 225 - 0
src/views/module_ems/photovoltaic/pvDashboard/index.vue

@@ -0,0 +1,225 @@
+<template>
+  <div class="page-header-index-wide">
+    <a-row :gutter="24">
+      <a-col :sm="24" :md="12" :xl="18" :style="{ marginBottom: '24px' }">
+        <a-row :gutter="24">
+          <a-col :sm="24" :md="12" :xl="8" :style="{ marginBottom: '24px' }">
+            <chart-card :loading="loading" title="总销售额" total="¥126,560">
+              <a-tooltip title="指标说明" slot="action">
+                <a-icon type="info-circle-o" />
+              </a-tooltip>
+              <div>
+                <trend flag="up" style="margin-right: 16px">
+                  <span slot="term">周同比</span>
+                  12%
+                </trend>
+                <trend flag="down">
+                  <span slot="term">日同比</span>
+                  11%
+                </trend>
+              </div>
+              <template slot="footer">日均销售额<span>¥ 234.56</span></template>
+            </chart-card>
+          </a-col>
+          <a-col :sm="24" :md="12" :xl="8" :style="{ marginBottom: '24px' }">
+            <chart-card :loading="loading" title="订单量" :total="8846 | NumberFormat">
+              <a-tooltip title="指标说明" slot="action">
+                <a-icon type="info-circle-o" />
+              </a-tooltip>
+              <div>
+                <mini-area />
+              </div>
+              <template slot="footer"
+                >日订单量<span> {{ '1234' | NumberFormat }}</span></template
+              >
+            </chart-card>
+          </a-col>
+          <a-col :sm="24" :md="12" :xl="8" :style="{ marginBottom: '24px' }">
+            <chart-card :loading="loading" title="支付笔数" :total="6560 | NumberFormat">
+              <a-tooltip title="指标说明" slot="action">
+                <a-icon type="info-circle-o" />
+              </a-tooltip>
+              <div>
+                <mini-bar :height="40" />
+              </div>
+              <template slot="footer">转化率 <span>60%</span></template>
+            </chart-card>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24"> </a-row>
+      </a-col>
+
+      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+        <a-row>
+          <bar title="销售额趋势" :dataSource="barData" />
+        </a-row>
+
+        <a-row>
+          <a-col :span="24">
+            <a-card :loading="loading" :bordered="false" title="最近一周访问量统计" :style="{ marginTop: '24px' }">
+              <a-row>
+                <a-col :span="6">
+                  <head-info title="今日IP" :content="loginfo.todayIp"></head-info>
+                </a-col>
+                <a-col :span="2">
+                  <a-spin class="circle-cust">
+                    <a-icon slot="indicator" type="environment" style="font-size: 24px" />
+                  </a-spin>
+                </a-col>
+                <a-col :span="6">
+                  <head-info title="今日访问" :content="loginfo.todayVisitCount"></head-info>
+                </a-col>
+                <a-col :span="2">
+                  <a-spin class="circle-cust">
+                    <a-icon slot="indicator" type="team" style="font-size: 24px" />
+                  </a-spin>
+                </a-col>
+                <a-col :span="6">
+                  <head-info title="总访问量" :content="loginfo.totalVisitCount"></head-info>
+                </a-col>
+                <a-col :span="2">
+                  <a-spin class="circle-cust">
+                    <a-icon slot="indicator" type="rise" style="font-size: 24px" />
+                  </a-spin>
+                </a-col>
+              </a-row>
+              <line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
+            </a-card>
+          </a-col>
+        </a-row>
+      </a-col>
+    </a-row>
+  </div>
+</template>
+
+<script>
+import ChartCard from '@/components/ChartCard'
+import ACol from 'ant-design-vue/es/grid/Col'
+import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
+import MiniArea from '@/components/chart/MiniArea'
+import MiniBar from '@/components/chart/MiniBar'
+import MiniProgress from '@/components/chart/MiniProgress'
+import RankList from '@/components/chart/RankList'
+import Bar from '@/components/chart/Bar'
+import LineChartMultid from '@/components/chart/LineChartMultid'
+import HeadInfo from '@/components/tools/HeadInfo.vue'
+
+import Trend from '@/components/Trend'
+import { getLoginfo, getVisitInfo } from '@/api/api'
+
+const rankList = []
+for (let i = 0; i < 7; i++) {
+  rankList.push({
+    name: '白鹭岛 ' + (i + 1) + ' 号店',
+    total: 1234.56 - i * 100,
+  })
+}
+const barData = []
+for (let i = 0; i < 12; i += 1) {
+  barData.push({
+    x: `${i + 1}月`,
+    y: Math.floor(Math.random() * 1000) + 200,
+  })
+}
+export default {
+  name: 'IndexChart',
+  components: {
+    ATooltip,
+    ACol,
+    ChartCard,
+    MiniArea,
+    MiniBar,
+    MiniProgress,
+    RankList,
+    Bar,
+    Trend,
+    LineChartMultid,
+    HeadInfo,
+  },
+  data() {
+    return {
+      loading: true,
+      center: null,
+      rankList,
+      barData,
+      loginfo: {},
+      visitFields: ['ip', 'visit'],
+      visitInfo: [],
+      indicator: <a-icon type="loading" style="font-size: 24px" spin />,
+    }
+  },
+  created() {
+    setTimeout(() => {
+      this.loading = !this.loading
+    }, 1000)
+    this.initLogInfo()
+  },
+  methods: {
+    initLogInfo() {
+      getLoginfo(null).then((res) => {
+        if (res.success) {
+          Object.keys(res.result).forEach((key) => {
+            res.result[key] = res.result[key] + ''
+          })
+          this.loginfo = res.result
+        }
+      })
+      getVisitInfo().then((res) => {
+        if (res.success) {
+          this.visitInfo = res.result
+        }
+      })
+    },
+  },
+}
+</script>
+
+<style lang="less" scoped>
+.circle-cust {
+  position: relative;
+  top: 28px;
+  left: -100%;
+}
+.extra-wrapper {
+  line-height: 55px;
+  padding-right: 24px;
+
+  .extra-item {
+    display: inline-block;
+    margin-right: 24px;
+
+    a {
+      margin-left: 24px;
+    }
+  }
+}
+
+/* 首页访问量统计 */
+.head-info {
+  position: relative;
+  text-align: left;
+  padding: 0 32px 0 0;
+  min-width: 125px;
+
+  &.center {
+    text-align: center;
+    padding: 0 32px;
+  }
+
+  span {
+    color: rgba(0, 0, 0, 0.45);
+    display: inline-block;
+    font-size: 0.95rem;
+    line-height: 42px;
+    margin-bottom: 4px;
+  }
+  p {
+    line-height: 42px;
+    margin: 0;
+    a {
+      font-weight: 600;
+      font-size: 1rem;
+    }
+  }
+}
+</style>

+ 1 - 0
src/views/module_ems/photovoltaic/pvdata.js

@@ -0,0 +1 @@
+export const pvdata = require('./pvdata.json');

文件差异内容过多而无法显示
+ 31837 - 0
src/views/module_ems/photovoltaic/pvdata.json


+ 851 - 0
src/views/module_ems/photovoltaic/stationDiagram/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>

+ 851 - 0
src/views/module_ems/photovoltaic/stationMonitor/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>

+ 851 - 0
src/views/module_ems/photovoltaic/stationStatis/index.vue

@@ -0,0 +1,851 @@
+<template>
+  <div class="energy-overView" :loading="loading">
+    <!-- <commonSearch hasAreaSearch ref="commonSearch" type="nodate" @search="handleSearch"></commonSearch> -->
+    <div class="top-container u-flex">
+      <div class="louyu u-flex common-box">
+        <div class="common-title">区域基本信息</div>
+        <img src="../../../../assets/louyu.png" alt="" />
+        <a-descriptions :column="2">
+          <a-descriptions-item label="建筑名称">{{ energySpace.name }}</a-descriptions-item>
+          <a-descriptions-item label="建筑面积">{{ energySpace.builtarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="空调面积">{{ energySpace.aircondarea }} ㎡</a-descriptions-item>
+          <a-descriptions-item label="采暖面积">{{ energySpace.heatarea }} ㎡</a-descriptions-item>
+          <!-- <el-descriptions-item label="用能人数">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑年代">{{energySpace.}}</el-descriptions-item> -->
+          <!-- <el-descriptions-item label="建筑用途">{{energySpace.}}</el-descriptions-item> -->
+        </a-descriptions>
+      </div>
+      <div class="sort-top5-container common-box">
+        <div class="common-title">当月用电量TOP5(kWh)</div>
+        <div class="sort-top5" ref="sortTop5"></div>
+      </div>
+      <div class="info-total">
+        <div class="yongdian-xuliang common-box">
+          <div class="common-title">用电需量(kVA)</div>
+          <div class="info-container u-flex-jaa">
+            <div class="item-info">
+              <div class="name">即时需量</div>
+              <div class="value">{{ demandStatistics.jishi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">需量峰值</div>
+              <div class="value">{{ demandStatistics.fengzhi }}</div>
+            </div>
+            <a-divider direction="vertical"></a-divider>
+            <div class="item-info">
+              <div class="name">目标需量</div>
+              <div class="value">{{ demandStatistics.mubiao }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="u-flex co2-tianqi">
+          <div class="co2 common-box">
+            <div class="common-title">CO2排放</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">本月排放(Kg)</div>
+                <div class="value">{{ demandStatistics.co2 }}</div>
+              </div>
+            </div>
+          </div>
+          <div class="tianqi common-box">
+            <div class="common-title">环境信息</div>
+            <div class="info-container u-flex-jaa">
+              <div class="item-info">
+                <div class="name">湿度(%)</div>
+                <div class="value">{{ demandStatistics.shidu }}</div>
+              </div>
+              <a-divider direction="vertical"></a-divider>
+              <div class="item-info">
+                <div class="name">温度(℃)</div>
+                <div class="value">{{ demandStatistics.wendu }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bottom-container u-flex">
+      <div class="xiaohao common-box">
+        <div class="common-title">当月能源消耗总标煤(kg)</div>
+        <div class="zongbiao-chart" ref="zongbiao"></div>
+        <!-- <div class="legend">
+          <div class="u-flex item" v-for="(item, index) in dataLists" :key="index">
+            <div class="text">{{item.name}}</div>
+            <div class="number">{{item.number}}tec</div>
+            <div class="pieValue">{{item.pieValue}}%</div>
+          </div>
+        </div> -->
+      </div>
+      <div class="qushi common-box">
+        <div class="common-title">总用电趋势图(kWh)</div>
+        <div class="totalEle-trend" ref="totalEleTrend"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+// import commonSearch from '../components/commonSearch'
+import { httpAction, getAction } from '@/api/manage'
+import { pvdata } from '../pvdata';
+export default {
+  name: '',
+  components: {
+    // commonSearch,
+  },
+  data() {
+    return {
+      description: '能耗总览',
+      loading: true,
+      energySpace: {},
+      demandStatistics: {
+        jishi: null,
+        fengzhi: null,
+        mubiao: null,
+        co2: null,
+        shidu: null,
+        wendu: null,
+      },
+      dataLists: [
+        { name: '空调用电', number: 80, pieValue: 20 },
+        { name: '动力用电', number: 100, pieValue: 25 },
+        { name: '照明用电', number: 140, pieValue: 35 },
+        { name: '其他用电', number: 80, pieValue: 20 },
+      ],
+      sortTop5Name: [],
+      nowMonthData: [],
+      lastMonthData: [],
+      // sortTop5Name: ['电信盘','烧机设备', '插座', '全空气机组', '照明', ],
+      // nowMonthData: [7773.50, 8809.40, 10065.20, 17371.00, 20478.60],
+      // lastMonthData: [-6979.80, -6458.10 -13762.10, -16628.50, -8037.70],
+      totalEleTrend: {
+        daysplit: [],
+        kongtiao: [],
+        zhaoming: [],
+        dongli: [],
+        qita: [],
+      },
+      zongbiao: [],
+      url: {
+        list: '/ems/statistics/energyoverview',
+      },
+    }
+  },
+  created() {},
+  mounted() {
+    this.$nextTick(() => {
+      this.getTest()
+      // this.getEnergyoverview()
+    })
+  },
+  methods: {
+    // 后端好了需要删掉
+    getTest() {
+      var listData = pvdata.dashboarddata
+      console.log(listData)
+      // 用电需量
+      this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+      this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+      this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+      // co2+气象
+      this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+      this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+        : ''
+      this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+        ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+        : ''
+
+      // top5
+      this.sortTop5Name = []
+      this.nowMonthData = []
+      this.lastMonthData = []
+      listData.top5Statistics.forEach((res) => {
+        this.sortTop5Name.push(res.equipmentname)
+        this.nowMonthData.push(res.howManyValue)
+        this.lastMonthData.push(res.howManyValue2)
+      })
+
+      // 总标煤
+      this.zongbiao = listData.kgceStatistics.map((res) => {
+        var item = {
+          name: res.type,
+          value: res.howManyValue,
+        }
+        return item
+      })
+
+      this.totalEleTrend.daysplit = listData.daysplit
+      this.totalEleTrend.kongtiao = listData.kongtiao
+      this.totalEleTrend.dongli = listData.dongli
+      this.totalEleTrend.zhaoming = listData.zhaoming
+      this.totalEleTrend.qita = listData.qita
+      this.energySpace = listData.energySpace
+      this.loading = false
+      this.initSortTop5()
+      this.initPieDianliang()
+      this.initTotalEleTrend()
+    },
+    async getEnergyoverview() {
+      // {spaceId: 277797283102721}
+      this.loading = true
+      var data = this.$refs.commonSearch.queryParams
+      getAction(this.url.list, data).then((res) => {
+        console.log(res)
+        var listData = res.data
+        // 用电需量
+        this.demandStatistics.jishi = listData.demandStatistics.find((item) => item.type === '即时需量').howManyValue
+        this.demandStatistics.fengzhi = listData.demandStatistics.find((item) => item.type === '需量峰值').howManyValue
+        this.demandStatistics.mubiao = listData.demandStatistics.find((item) => item.type === '目标需量').howManyValue
+
+        // co2+气象
+        this.demandStatistics.co2 = listData.environmentStatistics.find((item) => item.type === 'CO2排放').howManyValue
+        this.demandStatistics.shidu = listData.environmentStatistics.find((item) => item.type === '室外湿度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外湿度').howManyValue
+          : ''
+        this.demandStatistics.wendu = listData.environmentStatistics.find((item) => item.type === '室外温度')
+          ? listData.environmentStatistics.find((item) => item.type === '室外温度').howManyValue
+          : ''
+
+        // top5
+        this.sortTop5Name = []
+        this.nowMonthData = []
+        this.lastMonthData = []
+        listData.top5Statistics.forEach((res) => {
+          this.sortTop5Name.push(res.equipmentname)
+          this.nowMonthData.push(res.howManyValue)
+          this.lastMonthData.push(res.howManyValue2)
+        })
+
+        // 总标煤
+        this.zongbiao = listData.kgceStatistics.map((res) => {
+          var item = {
+            name: res.type,
+            value: res.howManyValue,
+          }
+          return item
+        })
+
+        this.totalEleTrend.daysplit = listData.daysplit
+        this.totalEleTrend.kongtiao = listData.kongtiao
+        this.totalEleTrend.dongli = listData.dongli
+        this.totalEleTrend.zhaoming = listData.zhaoming
+        this.totalEleTrend.qita = listData.qita
+        this.energySpace = listData.energySpace
+        this.loading = false
+      })
+      this.$nextTick(() => {
+        this.initSortTop5()
+        this.initPieDianliang()
+        this.initTotalEleTrend()
+      })
+    },
+    handleSearch(param) {
+      this.getTest()
+      // this.getEnergyoverview()
+    },
+    // 当月用电量TOP5 柱状图
+    initSortTop5() {
+      var _this = this
+      var chartDom = this.$refs.sortTop5
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+          data: ['上月', '当月'],
+        },
+        // grid: {
+        //   left: '3%',
+        //   right: '4%',
+        //   bottom: '12%',
+        //   top: '0%',
+        //   containLabel: true
+        // },
+        grid: [
+          // 左边柱子
+          {
+            show: false,
+            left: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+          // 中间
+          {
+            show: false,
+            left: '51%',
+            top: '10%',
+            bottom: '20',
+            width: '30%',
+          },
+          // 右边柱子
+          {
+            show: false,
+            right: '10%',
+            top: '10%',
+            bottom: '20',
+            containLabel: true,
+            width: '25%',
+          },
+        ],
+        xAxis: [
+          {
+            type: 'value',
+            inverse: true,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          {
+            gridIndex: 1,
+            show: false,
+          },
+          {
+            gridIndex: 2,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+          // {
+          //   type: 'value'
+          // }
+        ],
+        yAxis: [
+          {
+            type: 'category',
+            inverse: true,
+            position: 'right',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 1,
+            type: 'category',
+            inverse: true,
+            position: 'center',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: true,
+              align: 'center',
+              // color: '#CDD7D7',
+              fontSize: 14,
+            },
+            data: this.sortTop5Name,
+          },
+          {
+            gridIndex: 2,
+            type: 'category',
+            inverse: true,
+            position: 'left',
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: this.sortTop5Name,
+          },
+          // {
+          //   type: 'category',
+          //   axisTick: {
+          //     show: false
+          //   },
+          //   data: this.sortTop5Name
+          // }
+        ],
+        series: [
+          {
+            name: '当月',
+            type: 'bar',
+            xAxisIndex: 2,
+            yAxisIndex: 2,
+            barWidth: 15,
+            stack: 'Total',
+            // barWidth: '50%',
+            label: {
+              show: true,
+              position: 'right',
+              // color: '#4BE6E6'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.nowMonthData,
+          },
+          {
+            name: '上月',
+            type: 'bar',
+            stack: 'Total',
+            xAxisIndex: 0,
+            yAxisIndex: 0,
+            barWidth: 15,
+            label: {
+              show: true,
+              position: 'left',
+              // color: '#F29740'
+            },
+            emphasis: {
+              focus: 'series',
+            },
+            data: this.lastMonthData,
+          },
+        ],
+      }
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 当月能源消耗总标煤 饼图
+    initPieDianliang1() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        series: [
+          {
+            type: 'gauge',
+            radius: '70%',
+            center: ['50%', '50%'],
+            clockwise: true, // 仪表盘刻度是否是顺时针增长
+            startAngle: '90', // 开始角度
+            endAngle: '-269.9999', // 结束角度
+            splitNumber: 36, // 仪表盘刻度的分割段数
+            detail: {
+              offsetCenter: [0, -20],
+              formatter: ' ',
+            },
+            detail: {
+              // 仪表盘详情,用于显示数据-value
+              show: true, // 是否显示详情,默认 true
+              offsetCenter: [0, -4], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '600',
+              fontSize: '18',
+              formatter: '{value}', // 格式化函数或者字符串
+            },
+            title: {
+              //仪表盘标题-name。
+              show: true, //是否显示标题,默认 true
+              offsetCenter: [0, 16], // 相对于仪表盘中心的偏移位置
+              color: '#000',
+              fontWeight: '100',
+              fontSize: '14',
+            },
+            pointer: {
+              // 指针
+              show: false,
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: [
+                  [0.3437, '#5470C6'],
+                  [0.6269, '#91CC75'],
+                  [0.8648, '#FAC858'],
+                  [1, '#EE6666'],
+                  // [0.3437, '#e2e14f'],
+                  // [0.6269, '#00a7fb'],
+                  // [0.8648, '#00e0fb'],
+                  // [1, '#00ffb4']
+                ],
+                width: 18,
+              },
+            },
+            axisTick: {
+              // 刻度线
+              show: false,
+            },
+            splitLine: {
+              // 分割线
+              show: true,
+              distance: -18, // 分割线与轴线的距离(在哪儿显示)
+              length: 18,
+              lineStyle: {
+                color: '#f1f1f1',
+                width: 2,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            data: [
+              {
+                value: 400,
+                name: 'tce',
+              },
+            ],
+          },
+          {
+            type: 'pie',
+            name: '内层细圆环',
+            radius: ['52%', '53%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+          {
+            type: 'pie',
+            name: '外层细圆环',
+            radius: ['72%', '71%'],
+            center: ['50%', '50%'],
+            hoverAnimation: false,
+            startAngle: 200,
+            itemStyle: {
+              color: '#E3EBFA',
+            },
+            label: {
+              show: false,
+            },
+            data: [100],
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    // 总用电趋势图 柱状图
+    initPieDianliang() {
+      var chartDom = this.$refs.zongbiao
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        tooltip: {
+          trigger: 'item',
+        },
+        legend: {
+          // orient: 'vertical',
+          // top: '10%',
+          // right: 10,
+          bottom: 0,
+        },
+        series: [
+          {
+            name: '',
+            type: 'pie',
+            radius: ['30%', '48%'], // 内圈 外圈
+            center: ['50%', '45%'],
+            avoidLabelOverlap: false,
+            itemStyle: {
+              borderRadius: 10,
+              borderColor: '#fff',
+              borderWidth: 2,
+            },
+            label: {
+              show: true,
+              formatter(param) {
+                // return param.name  + '\n (' + param.percent + '%)';
+                return param.name + '\n' + param.value + ' (' + param.percent + '%)'
+              },
+              // formatter: '{a} <br/>{b}: {c} ({d}%)'
+              // position: 'center'
+            },
+            labelLine: {
+              show: true,
+            },
+            emphasis: {
+              label: {
+                // 饼图每一个的名称显示
+                show: true,
+                // fontSize: 40,
+                // fontWeight: 'bold'
+              },
+            },
+            data: this.zongbiao,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+    initTotalEleTrend() {
+      console.log(this.totalEleTrend.daysplit)
+      var _this = this
+      var chartDom = this.$refs.totalEleTrend
+      var myChart = echarts.init(chartDom)
+      var option
+
+      option = {
+        // title: {
+        //   text: '用能趋势',
+        //   left: 'center'
+        // },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+          },
+        },
+        legend: {
+          bottom: 0,
+        },
+        grid: {
+          top: '10%',
+          left: '3%',
+          right: '4%',
+          bottom: '25px',
+          containLabel: true,
+        },
+        xAxis: {
+          type: 'category',
+          // data: ['6月','7月','8月','9月','10月','11月','12月','1月','2月','3月','4月','5月',]
+          data: this.totalEleTrend.daysplit,
+        },
+        yAxis: {
+          type: 'value',
+        },
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {},
+          },
+        },
+        series: [
+          {
+            name: '动力用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#5470C6',
+            emphasis: {
+              focus: 'series',
+            },
+            // data: [150, 212, 201, 154, 190, 330, 410, 320, 199, 254, 324, 225]
+            data: this.totalEleTrend.dongli,
+          },
+          {
+            name: '空调用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#91CC75',
+            // label: { // 是否显示柱形图上数字
+            //   show: true
+            // },
+            // emphasis: { // 悬浮时是否模糊其他柱形图
+            //   focus: 'series'
+            // },
+            // data: [120, 132, 101, 134, 90, 230, 210, 209, 150, 140, 152, 143]
+            data: this.totalEleTrend.kongtiao,
+          },
+          {
+            name: '照明用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#EE6666',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [220, 182, 191, 234, 290, 330, 310, 320, 145, 222, 245, 301]
+            data: this.totalEleTrend.zhaoming,
+          },
+          {
+            name: '其他用电',
+            type: 'bar',
+            stack: 'total',
+            color: '#FAC858',
+            // barWidth: '50%',
+            // emphasis: {
+            //   focus: 'series'
+            // },
+            // data: [320, 302, 301, 334, 390, 330, 320, 300, 310, 316, 304, 322]
+            data: this.totalEleTrend.qita,
+          },
+        ],
+      }
+
+      option && myChart.setOption(option)
+
+      window.addEventListener('resize', function () {
+        myChart.resize()
+      })
+    },
+  },
+}
+</script>
+<style lang="less" scoped>
+  @import '~@/assets/less/uStyle.less';
+</style>
+<style lang="less" scoped>
+.energy-overView {
+  min-height: calc(100vh - 84px);
+  padding: 10px;
+  .common-title {
+    text-align: center;
+    font-weight: bold;
+    font-size: 18px;
+    color: #1b2128;
+  }
+  .common-box {
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+    padding: 1.1vh 1.2vh;
+    // padding: 16px 20px;
+  }
+  .info-container {
+    width: 100%;
+    .item-info {
+      padding: 1.4vh 0;
+      // padding: 22px 0;
+      text-align: center;
+      .name {
+        font-size: 14px;
+      }
+      .value {
+        margin-top: 15px;
+        font-size: 20px;
+      }
+    }
+  }
+  .top-container {
+    height: calc(50vh - 124px);
+    .louyu {
+      flex: 1;
+      margin-right: 10px;
+      flex-direction: column;
+      justify-content: space-between;
+      align-items: center;
+      padding-bottom: 1.2vh;
+      // padding-bottom: 30px;
+      img {
+        object-fit: contain;
+      }
+      .ant-descriptions {
+        background-color: #ffffff;
+      }
+    }
+    .sort-top5-container {
+      flex: 1.2;
+      .sort-top5 {
+        height: calc(100% - 20px);
+        padding-top: 16px;
+      }
+    }
+    .info-total {
+      flex: 1.5;
+      padding-left: 10px;
+      .yongdian-xuliang {
+        height: 50%;
+      }
+      .co2-tianqi {
+        height: calc(50% - 10px);
+        margin-top: 10px;
+      }
+      .co2 {
+        flex: 1;
+        margin-right: 10px;
+      }
+      .tianqi {
+        flex: 1;
+      }
+    }
+  }
+  .bottom-container {
+    height: calc(50vh - 60px);
+    margin-top: 10px;
+    .xiaohao {
+      flex: 1;
+      margin-right: 10px;
+      .zongbiao-chart {
+        height: 90%;
+      }
+      .legend {
+        height: calc(50% - 25px);
+        display: flex;
+        flex-direction: column;
+        justify-content: space-around;
+        // align-items: start;
+        align-items: flex-start;
+        padding: 20px;
+        font-size: 14px;
+        .item {
+          width: 100%;
+          align-items: center;
+          justify-content: space-around;
+          .example {
+            width: 20px;
+            height: 10px;
+            background: #000;
+            margin-right: 10px;
+          }
+          .text {
+            min-width: 50px;
+          }
+          .number {
+            min-width: 40px;
+            // margin-right: 22px;
+          }
+          .pieValue {
+          }
+        }
+      }
+    }
+    .qushi {
+      flex: 2.7;
+      .totalEle-trend {
+        height: calc(100% - 25px);
+      }
+    }
+  }
+}
+</style>