Shannon_mu 1 год назад
Родитель
Сommit
56a00ffee9

+ 41 - 8
energyManagement/src/views/refrigeration/energyEfficiencyAnalysis/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="main">
         <div class="search">
-            <el-input placeholder="输入项目名称" class="search-input" clearable v-model="mixins_query.deviceNo"></el-input>
+            <el-input placeholder="输入项目名称" class="search-input" clearable v-model="mixins_query.projectName"></el-input>
             <el-date-picker
                 v-model="times"
                 value-format="yyyyMM"
@@ -16,13 +16,15 @@
                 <el-tooltip class="item" effect="light" placement="bottom" content="导出">
                     <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel"></i>
                 </el-tooltip>
-
+                <el-tooltip class="item" effect="light" placement="bottom" content="删除">
+                    <i class="zoniot_font zoniot-icon-shanchu2" @click="deluserbyidsFn"></i>
+                </el-tooltip>
                 <el-dropdown type="primary" @command="addCommand">
-                    <span class=" zoniot_font zoniot-icon-tianjia2"></span>
+                    <span class="zoniot_font zoniot-icon-tianjia2"></span>
                     <el-dropdown-menu slot="dropdown" hide-on-click="false" class="device-search-dropdown">
                         <el-dropdown-item command="batchAdd">
                             <div class="upload_div">
-                                <xk-upload class="upload_class" @callback="mixins_search" :params="{ importType: 'WATER' }">
+                                <xk-upload class="upload_class" @callback="mixins_search" actionUrl="/sc-energy/projectData/import/excel">
                                     <span class="upload_text" slot="content">批量添加</span>
                                 </xk-upload>
                             </div>
@@ -35,11 +37,12 @@
         <div class="roles-wrap">
             <zz-table
                 :cols="cols"
-                :settings="{ showIndex: true, stripe: true }"
+                :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
                 :loading="mixins_onQuery"
                 :data="mixins_list"
                 :pageset="mixins_pageset"
                 @page-change="pageChange"
+                @selection-change="selectionChange"
             >
             </zz-table>
         </div>
@@ -53,6 +56,7 @@ export default {
     data() {
         return {
             times: [],
+            selectRow: [],
             cols: [
                 {
                     label: '项目名称',
@@ -77,7 +81,7 @@ export default {
                 {
                     label: '基准用电量(kw.h)',
                     prop: 'standardPowerConsumption'
-                },
+                }
             ],
             mixins_post: 'get'
         };
@@ -94,6 +98,35 @@ export default {
                 return;
             }
         },
+        selectionChange(val) {
+            this.selectRow = val;
+        },
+        deluserbyidsFn() {
+            //获取选中列表的ids
+            let ids = [];
+            if (!this.selectRow.length) {
+                this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+                return;
+            }
+            this.selectRow.forEach((v) => {
+                ids.push(v.id);
+            });
+            this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+                .then(() => {
+                    this.$http.post('/sc-energy/projectData/batchDelete', ids).then(({ status, data, msg }) => {
+                        if (0 === status) {
+                            this.$message({
+                                type: 'success',
+                                message: '删除成功!'
+                            });
+                            this.mixins_search();
+                        } else {
+                            this.$message.error(msg);
+                        }
+                    });
+                })
+                .catch(() => {});
+        },
         effectiveDateToggle(va) {
             let arr = va;
             if (!arr) {
@@ -104,12 +137,12 @@ export default {
         },
         exportExcel() {
             this.__exportExcel('/sc-energy/projectData/export/excel', this.mixins_query);
-        },
+        }
     }
 };
 </script>
 <style lang="scss" scoped>
-.zoniot_font{
+.zoniot_font {
     font-size: 30px;
 }
 </style>

+ 1 - 0
energyManagement/src/views/refrigeration/energySavingPlatform/energyAnalyze.vue

@@ -164,6 +164,7 @@ export default {
                         }
                     }
                 ];
+                this.options.yAxis[0].max = standardCop
             } else if (this.type == '2') {
                 this.label = '月度电量分析';
                 this.icon = require('../../../assets/img/energyIcon/icon_dianliang.png');

+ 9 - 2
energyManagement/src/views/refrigeration/energySavingPlatform/energyEfficiencyRatio.vue

@@ -38,9 +38,16 @@ export default {
         };
     },
 
-    mounted() {},
+    mounted() {this.getdata()},
 
-    methods: {}
+methods: {
+    getdata(){
+        this.$http.get('/sc-energy/board/getProjectDataInfo').then(({data})=>{
+            this.list[0].value = data.cop;
+            this.list[1].value = data.rate * 100 +'%';
+        })
+    }
+}
 };
 </script>