Quellcode durchsuchen

修改能源管理,增加参数历史查询

dongjh vor 1 Jahr
Ursprung
Commit
fca17f2b8b

+ 5 - 10
src/views/dashboard/Analysis.vue

@@ -228,7 +228,10 @@ export default {
   },
   mounted() {
     this.$nextTick(() => {
-    this.getList();
+      // 延迟绘制,否则echarts会超出父容器
+      setTimeout(() => {
+        this.getList();
+      },1000);
       // this.getDemandanalysis()
     })
     // this.getAlarmList()
@@ -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 - 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 () {

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

@@ -4,7 +4,7 @@
     <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'
@@ -17,6 +17,7 @@ export default {
   },
   data() {
     return {
+      description: '需量分析',
       loading: true,
       echartsHeight: window.innerHeight - 84 - 60 - 30,
       myChart: null,
@@ -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,
       // 选中数组

+ 4 - 3
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>
@@ -98,6 +98,7 @@ export default {
   },
   data() {
     return {
+      description: '能耗总览',
       loading: true,
       energySpace: {},
       demandStatistics: {

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

@@ -70,7 +70,7 @@
     <div class="trend-charts" ref="trendCharts"></div>
   </div>
 </template>
-// 分项能耗
+
 <script>
   import * as echarts from 'echarts';
   import commonSearch from '../components/commonSearch.vue'
@@ -83,6 +83,7 @@
     },
     data () {
       return {
+      description: '分项能耗',
         loading: true,
         itemizedStatistics: {
           nowDay: null,

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

@@ -30,7 +30,7 @@
     </a-table>
   </div>
 </template>
-// 能耗排名
+
 <script>
 import * as echarts from 'echarts'
 import commonSearch from '../components/commonSearch.vue'
@@ -45,6 +45,7 @@ export default {
   },
   data() {
     return {
+      description: '能耗排名',
       loading: true,
       columns: [
         {

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

@@ -4,7 +4,7 @@
     <div class="sankey-chart" ref="sankeyChart" style="height:1800px"></div>
   </div>
 </template>
-// 能流分析
+
 <script>
   import * as echarts from 'echarts';
   import commonSearch from '../components/commonSearch.vue'
@@ -17,6 +17,7 @@
     },
     data () {
       return {
+      description: '能流分析页面',
         loading: true,
         echartsHeight: window.innerHeight - 84 - 60 - 30,
         // 每一个数据及当前总数据(可能多条路线的和)

+ 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 { testdata } from '../testdata';
+
+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 = testdata.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>

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


+ 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 { testdata } from '../testdata'
+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 = testdata.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: "2%",
+          },
+        ],
+        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>

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

@@ -66,6 +66,7 @@
     },
     data () {
       return {
+        description: '用能平衡分析',
         showSearch: true,
         dataLists: [
           { name: '尖时', number: 11514.45, pieValue: 34.37 },

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

@@ -22,7 +22,7 @@
     <div class="item-echarts" ref="echarts"></div>
   </div>
 </template>
-// 节能分析
+
 <script>
 import * as echarts from 'echarts'
 import commonSearch from '../components/commonSearch.vue'
@@ -35,6 +35,7 @@ export default {
   },
   data() {
     return {
+        description: '节能分析',
       loading: true,
       anlysis: null,
       shijiAll: null,

Datei-Diff unterdrückt, da er zu groß ist
+ 66961 - 3
src/views/module_ems/energyAnalyse/testdata.json