pull/128/head
home孙 2024-03-06 15:30:50 +08:00
parent 679ab7e1e5
commit 54f982d144
2 changed files with 23 additions and 0 deletions

View File

@ -90,6 +90,12 @@ export default {
this.dateRange = [start, end]
},
dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
if (this.active == 0) {
this.timeInit()
} else if (this.active == 1) {
@ -129,6 +135,7 @@ export default {
isEquipment: store.equipmentList[index - 1].deviceName == 30 ? 1 : 0
}
this.api.selFsTime(data).then(res => {
this.loading.close()
if (res.data.code == 200) {
var chartsData = res.data.data.data.map(item => {
return {

View File

@ -59,6 +59,7 @@
</div>
</template>
<script>
import { Loading } from 'element-ui';
export default {
data() {
return {
@ -69,6 +70,7 @@ export default {
pageSize: 10,
tableList: [],
total: 0,
loading:null,
}
},
watch: {
@ -102,6 +104,12 @@ export default {
return formattedTime
},
dataInit() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
if (this.active == 0) {
this.timeInit()
} else if (this.active == 1) {
@ -114,6 +122,12 @@ export default {
}, 0);
},
download() {
this.loading = this.$loading({
lock: true,
text: '加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var store = this.$store.state
var index = store.equipmentIndex;
var data = {
@ -126,6 +140,7 @@ export default {
}
this.api.loadHistorydata(data).then(res => {
// blob
this.loading.close()
const blob = new Blob([res.data], { type: 'text/csv' });
// a
@ -157,6 +172,7 @@ export default {
isEquipment: store.equipmentList[index - 1].deviceName == 30 ? 1 : 0
}
this.api.selFsTime(data).then(res => {
this.loading.close()
if (res.data.code == 200) {
this.tableList = []
this.tableData = []