|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="global-variable">
|
|
|
+ <div class="global-variable" v-loading="loading">
|
|
|
<div class="condition">
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
<el-form-item label="测风塔名称:">
|
|
@@ -218,6 +218,7 @@ import {
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading: false,
|
|
|
tableData: [],
|
|
|
formInline: {
|
|
|
anemometerName: "",
|
|
@@ -299,10 +300,16 @@ export default {
|
|
|
pageNum: this.formInline.pageNum || 1,
|
|
|
pageSize: this.formInline.pageSize,
|
|
|
};
|
|
|
- getAnemometerTowerPage(paramsData).then((res) => {
|
|
|
- this.tableData = res.data.list;
|
|
|
- this.formInline.totalSize = res.data.totalSize;
|
|
|
- });
|
|
|
+ this.loading = true;
|
|
|
+ getAnemometerTowerPage(paramsData)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.data.list;
|
|
|
+ this.formInline.totalSize = res.data.totalSize;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
},
|
|
|
// 重置
|
|
|
reset() {
|
|
@@ -388,20 +395,28 @@ export default {
|
|
|
|
|
|
// 编辑
|
|
|
compile(row) {
|
|
|
- this.title = "编辑";
|
|
|
- this.isEdit = true;
|
|
|
- this.nuedialog = true;
|
|
|
- getAnemometerTower({ anemometerCode: row.anemometerCode }).then((res) => {
|
|
|
- this.hightower = res.data;
|
|
|
- this.cftList = res.data.list;
|
|
|
- const item = JSON.parse(JSON.stringify(res.data));
|
|
|
- this.detail = item;
|
|
|
- this.$set(this.dynamicValidateForm, 'anemometerName', item.anemometerName);
|
|
|
- this.$set(this.dynamicValidateForm, 'latitude', item.latitude);
|
|
|
- this.$set(this.dynamicValidateForm, 'longitude', item.longitude);
|
|
|
- this.$set(this.dynamicValidateForm, 'anemometerTowerHeightDtoList', this.cftList);
|
|
|
- });
|
|
|
-},
|
|
|
+ this.title = "编辑";
|
|
|
+ this.isEdit = true;
|
|
|
+ this.nuedialog = true;
|
|
|
+ getAnemometerTower({ anemometerCode: row.anemometerCode }).then((res) => {
|
|
|
+ this.hightower = res.data;
|
|
|
+ this.cftList = res.data.list;
|
|
|
+ const item = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.detail = item;
|
|
|
+ this.$set(
|
|
|
+ this.dynamicValidateForm,
|
|
|
+ "anemometerName",
|
|
|
+ item.anemometerName
|
|
|
+ );
|
|
|
+ this.$set(this.dynamicValidateForm, "latitude", item.latitude);
|
|
|
+ this.$set(this.dynamicValidateForm, "longitude", item.longitude);
|
|
|
+ this.$set(
|
|
|
+ this.dynamicValidateForm,
|
|
|
+ "anemometerTowerHeightDtoList",
|
|
|
+ this.cftList
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
//分页数据切换
|
|
|
handleCurrentChange(val) {
|