1 #128
@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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 = []
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user