diff --git a/src/utils/http.js b/src/utils/http.js index 4730d76..967fbc6 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -15,7 +15,7 @@ import store from '@/store' // } // 请求超时时间 -axios.defaults.timeout = 30000; +axios.defaults.timeout = 1000000000; // post请求头 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'; diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue index 095beda..107d739 100644 --- a/src/views/Transaction.vue +++ b/src/views/Transaction.vue @@ -677,7 +677,6 @@ export default { } }, getTreeData() { // 获取树结构数据 - if(this.treeDataStore.length) { const tmp = deepCopy(this.treeDataStore) this.treeData = this.toTreeId(tmp, this.treeDataStore[0].parentId); @@ -685,12 +684,14 @@ export default { this.lcId = this.$route.query.lcId; this.getInfoData(this.$route.query.lcId); } + this.loading = false }else { this.$get(this.api.getLcRecord).then(res => { if (res.status == 200 && res.list.length>0) { if (res.list.length>0) { this.$store.commit('setTreeDataStore', { treeDataStore: res.list}) this.treeData = this.toTreeId(res.list, res.list[0].parentId); + this.loading = false if (this.$route.query.lcId) { this.lcId = this.$route.query.lcId; this.getInfoData(this.$route.query.lcId); @@ -700,7 +701,7 @@ export default { this.$message.warning(res.message); } }).catch(err => { - // console.log(err); + this.loading = false }); }