统计代码优化

This commit is contained in:
shixiaoman
2021-11-24 18:33:51 +08:00
parent 694ecf71ef
commit c6ddce366d
8 changed files with 88 additions and 74 deletions

View File

@@ -30,9 +30,11 @@
</a-row>
</a-form>
<!-- 表格 -->
<a-spin :spinning="loading">
<ele-pro-table ref="table" :datasource="momData" :columns="columns" :where="where" :scroll="{ x: 'max-content' }"
@done="(d) => (data = d.data)">
</ele-pro-table>
</a-spin>
</a-card>
</div>
<!-- 编辑弹窗 -->
@@ -54,7 +56,6 @@
return {
data: [],
momData: [],
yoyData: [],
datasource: {},
columns: [{
title: '断面名称',
@@ -118,19 +119,18 @@
methods: {
/* 刷新表格 */
reload() {
this.loading=true;
listMonthCompositeIndex(this.where).then((res) => {
console.log(res.data.data);
if (res.data.code == 0) {
this.$message.success(res.data.msg);
res.data.data.momData.forEach((m) => {
res.data.data.forEach((m) => {
this.momData.push(m);
})
res.data.data.yoyData.forEach((y) => {
this.yoyData.push(y);
})
} else {
this.$message.error(res.data.msg);
}
this.loading=false;
});
},
/* 重置搜索 */