江河版本更新

This commit is contained in:
shixiaoman
2021-12-06 18:05:12 +08:00
parent 1b58bd132a
commit d6b0136582
5 changed files with 31 additions and 37 deletions

View File

@@ -45,7 +45,7 @@
</a-form>
<!-- 表格 -->
<a-spin :spinning="loading">
<ele-pro-table ref="table" :datasource="datasource" :columns="columns" :where="where"
<ele-pro-table ref="table" :datasource="url" :columns="columns" :where="where"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
</ele-pro-table>
</a-spin>
@@ -56,7 +56,7 @@
<script>
import {
autonomyWaterFunctionTotal,
autonomyWaterFunctionTotalUrl,
} from "@/api/ecology/river-statis";
import {
listInfo
@@ -73,9 +73,9 @@
return {
data: [],
locale,
datasource: {},
// datasource: {},
// 表格数据接口
// url: autonomyWaterFunctionTotalUrl,
url: autonomyWaterFunctionTotalUrl,
selection: [],
tableColumns,
// 表格列配置
@@ -117,21 +117,20 @@
/* 刷新表格 */
reload() {
this.loading = true;
// console.log(this.where);
// this.$refs.table.reload({
// where: this.where,
// });
// console.log(this.url);
autonomyWaterFunctionTotal(this.where).then((res) => {
console.log(res.data.data);
if (res.data.code == 0) {
this.$message.success(res.data.msg);
this.datasource=res.data.data;
} else {
this.$message.error(res.data.msg);
}
this.loading = false;
});
console.log(this.where);
this.$refs.table.reload({
where: this.where,
});
// autonomyWaterFunctionTotal(this.where).then((res) => {
// console.log(res.data.data);
// if (res.data.code == 0) {
// this.$message.success(res.data.msg);
// this.datasource=res.data.data;
// } else {
// this.$message.error(res.data.msg);
// }
// this.loading = false;
// });
this.loading = false;
},
/* 重置搜索 */