diff --git a/smart-power-dist.zip b/smart-power-dist.zip
new file mode 100644
index 00000000..18b2184c
Binary files /dev/null and b/smart-power-dist.zip differ
diff --git a/src/api/iot/contract.js b/src/api/iot/contract.js
index f212d04e..8a684473 100644
--- a/src/api/iot/contract.js
+++ b/src/api/iot/contract.js
@@ -20,7 +20,7 @@ export function getContract(contractId) {
// 新增电价合同
export function addContract(data) {
return request({
- url: '/iot/contract',
+ url: '/iot/contract/addContract',
method: 'post',
data: data
})
diff --git a/src/api/iot/staistics.js b/src/api/iot/staistics.js
index 16e9e2d3..b443ebd8 100644
--- a/src/api/iot/staistics.js
+++ b/src/api/iot/staistics.js
@@ -23,3 +23,27 @@ export function monthOnCircleEnergy(query) {
params: query
})
}
+
+export function exportEnergy(query) {
+ return request({
+ url: '/iot/stat/exportProjectEnergy',
+ method: 'get',
+ params: query
+ })
+}
+
+export function exportOnMonth(query) {
+ return request({
+ url: '/iot/stat/exportMOMEnergy',
+ method: 'get',
+ params: query
+ })
+}
+
+export function exportOnCircle(query) {
+ return request({
+ url: '/iot/stat/exportMOCEnergy',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/src/views/iot/alarm/record/index.vue b/src/views/iot/alarm/record/index.vue
index 56876997..cfb13e44 100644
--- a/src/views/iot/alarm/record/index.vue
+++ b/src/views/iot/alarm/record/index.vue
@@ -41,26 +41,16 @@
重置
-
-
-
-
-
导出
-
-
-
+
+
重置
-
-
-
-
-
导出
-
-
-
+
+
0) {
- // let result = this.list.filter(v => { if (v['deviceKey'] === param['deviceKey']) { return v }});
this.list = this.list.map((v) => {
if (v["deviceKey"] === param["deviceKey"]) {
return Object.assign(v, param);
diff --git a/src/views/iot/statistics/chain/index.vue b/src/views/iot/statistics/chain/index.vue
index 549d76ba..066b4852 100644
--- a/src/views/iot/statistics/chain/index.vue
+++ b/src/views/iot/statistics/chain/index.vue
@@ -36,6 +36,14 @@
+ 导出
@@ -194,6 +202,12 @@ export default {
this.$refs.chainTemplate[0].getChartList();
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ if (this.$refs.chainTemplate) {
+ this.$refs.chainTemplate[0].handleExport();
+ }
+ },
},
};
diff --git a/src/views/iot/statistics/chain/template.vue b/src/views/iot/statistics/chain/template.vue
index 8fa5c976..ab48738a 100644
--- a/src/views/iot/statistics/chain/template.vue
+++ b/src/views/iot/statistics/chain/template.vue
@@ -66,7 +66,7 @@
diff --git a/src/views/iot/statistics/compared/index.vue b/src/views/iot/statistics/compared/index.vue
index fef7d881..5d91556d 100644
--- a/src/views/iot/statistics/compared/index.vue
+++ b/src/views/iot/statistics/compared/index.vue
@@ -43,6 +43,14 @@
+ 导出
@@ -208,6 +216,12 @@ export default {
this.$refs.comparedTemplate[0].getChartList();
}
},
+ /** 导出按钮操作 */
+ handleExport() {
+ if (this.$refs.comparedTemplate) {
+ this.$refs.comparedTemplate[0].handleExport();
+ }
+ },
},
};
diff --git a/src/views/iot/statistics/compared/profile/template.vue b/src/views/iot/statistics/compared/profile/template.vue
index ea4dc812..55e9fd13 100644
--- a/src/views/iot/statistics/compared/profile/template.vue
+++ b/src/views/iot/statistics/compared/profile/template.vue
@@ -25,14 +25,22 @@
>
-
-
- {{
- Number(scope.row.homochronousValue).toFixed(2) || "--"
- }}
-
+
+
+ {{
+ Number(scope.row.homochronousValue).toFixed(2) || "--"
+ }}
+
-
+
{{
Number(scope.row.currentPeriodValue).toFixed(2) || "--"
@@ -46,11 +54,11 @@
}}
-
+
- {{
- Number(scope.row.increaseRate).toFixed(2) || "--"
- }} %
+ {{ Number(scope.row.increaseRate).toFixed(2) || "--" }} %
@@ -58,7 +66,7 @@
diff --git a/src/views/iot/statistics/energy/index.vue b/src/views/iot/statistics/energy/index.vue
index fd89111b..d6b2610f 100644
--- a/src/views/iot/statistics/energy/index.vue
+++ b/src/views/iot/statistics/energy/index.vue
@@ -1,133 +1,155 @@
-
+
-
-
-
+ :model="queryParams"
+ ref="queryForm"
+ :inline="true"
+ label-width="68px"
+ >
+
+
+
-
-
-
-
-
- 搜索
- 重置
-
-
+
+
+
-
-
-
-
-
-
-
- {{ Number(scope.row.electric).toFixed(2) || '--' }}
-
-
-
-
- {{ Number(0).toFixed(2) || '--' }}
-
-
-
-
- {{ Number(0).toFixed(2) || '--' }}
-
-
-
-
- {{ Number(scope.row.coal).toFixed(2) || '--' }}
-
-
-
+
+
+
+
+
+ {{
+ Number(scope.row.electric).toFixed(2) || "--"
+ }}
+
+
+
+
+ {{
+ Number(scope.row.water).toFixed(2) || "--"
+ }}
+
+
+
+
+ {{
+ Number(scope.row.gas).toFixed(2) || "--"
+ }}
+
+
+
+
+ {{
+ Number(scope.row.coal).toFixed(2) || "--"
+ }}
+
+
+
-
-
+
+
\ No newline at end of file
+ getList() {
+ this.loading = true;
+ projectEnergy(Object.assign(this.queryParams)).then((res) => {
+ this.tableList = res.rows;
+ this.total = res.total;
+ this.loading = false;
+ });
+ },
+ /** 导出按钮操作 */
+ handleExport() {
+ const queryParams = this.queryParams;
+ this.$confirm("是否确认导出数据项?", "警告", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(function () {
+ return exportEnergy(queryParams);
+ })
+ .then((response) => {
+ this.download(response.msg);
+ });
+ },
+ },
+};
+
diff --git a/src/views/iot/trigger/index.vue b/src/views/iot/trigger/index.vue
index f8c1a928..2dab7800 100644
--- a/src/views/iot/trigger/index.vue
+++ b/src/views/iot/trigger/index.vue
@@ -114,35 +114,36 @@
/>
-
-
+
-
-
+
+
-
-
+