diff --git a/src/api/model/enm.js b/src/api/model/enm.js
index fcf04fbf..3ab8b32c 100644
--- a/src/api/model/enm.js
+++ b/src/api/model/enm.js
@@ -143,14 +143,6 @@ export default {
data);
}
},
- groupValues: {
- name: "测点统计记录",
- req: async function(data){
- return await http.get(
- `${config.API_URL}/enm/mpointstat/group_values/`,
- data);
- }
- },
statCreate: {
name: "添加测点统计记录",
req: async function(data){
@@ -184,6 +176,14 @@ export default {
data);
}
},
+ groupValues: {
+ name: "测点统计记录",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/enm/mpointstat/group_values/`,
+ data);
+ }
+ },
create: {
name: "新增",
req: async function(data){
diff --git a/src/views/enm_energy/electric_peak.vue b/src/views/enm_energy/electric_peak.vue
index abc5302f..e119ced7 100644
--- a/src/views/enm_energy/electric_peak.vue
+++ b/src/views/enm_energy/electric_peak.vue
@@ -180,7 +180,7 @@
obj.type = 'hour';
obj.group_by = 'val_level';
obj.mpoint__in = that.mpointList[0];
- this.$API.enm.mpoint.groupValues.req(obj)
+ this.$API.enm.mpointstat.groupValues.req(obj)
.then((res) => {
res.forEach(item => {
// 查找对应的列索引
diff --git a/src/views/enm_energy/water.vue b/src/views/enm_energy/water.vue
index 3ea6980a..07d37b3a 100644
--- a/src/views/enm_energy/water.vue
+++ b/src/views/enm_energy/water.vue
@@ -424,7 +424,7 @@ export default {
obj.end_time = this.daterange[1];
obj.mpoint__in = "3631858394648182784,3631858982832218112,3631858687335112704";
obj.page = 0;
- this.$API.enm.mpoint.groupValues.req(obj).then((res) => {
+ this.$API.enm.mpointstat.groupValues.req(obj).then((res) => {
//处理res数组中的 total_val 字段 保留两位
res.forEach(item => {
item.total_val = Number(item.total_val).toFixed(2);
diff --git a/src/views/fac_cal/mpointstat_group.vue b/src/views/fac_cal/mpointstat_group.vue
index 4972d636..437071c8 100644
--- a/src/views/fac_cal/mpointstat_group.vue
+++ b/src/views/fac_cal/mpointstat_group.vue
@@ -1,12 +1,102 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 开始计算
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+export default {
+ name: 'enstat',
+ data() {
+ return {
+ apiObjM: this.$API.enm.mpoint.list,
+ paramsM: {page: 0},
+ timeRange: [],
+ tableData: [],
+ bLoading: false,
+ query:{
+ mpoint: null,
+ start_time: null,
+ end_time: null
+ }
+ }
+ },
+ methods: {
+ start() {
+ let that = this;
+ this.query.type = "hour";
+ this.tableData = [];
+ if (this.query.mpoint == null) {
+ this.$message.error('请选择测点');
+ return;
+ }
+ if (this.timeRange.length == 0) {
+ this.$message.error('请选择时间范围');
+ return;
+ }
+ this.query.start_time = this.timeRange[0]
+ this.query.end_time = this.timeRange[1]
+ this.bLoading = true;
+ this.$API.enm.mpointstat.groupValues.req(this.query).then((res)=>{
+ this.bLoading = false;
+ this.tableData = res;
+ }).catch(e=>{
+ this.bLoading = false;
+ })
+ }
+ }
+}
+
+
+
\ No newline at end of file