diff --git a/src/components/chartsCont/ChartsCont.vue b/src/components/chartsCont/ChartsCont.vue index 439a843..09bee04 100644 --- a/src/components/chartsCont/ChartsCont.vue +++ b/src/components/chartsCont/ChartsCont.vue @@ -1,6 +1,6 @@ @@ -126,6 +122,11 @@ export default { advancedStates: { type: Boolean, required: true + }, + // 加载状态 + loadings: { + type: Boolean, + required: true } }, data () { @@ -366,7 +367,9 @@ export default { // 执行状态 hangZhiState: false, // 高级查询数据 - startsyui: false + startsyui: false, + // 初始化左侧状态 + leftState: false } }, watch: { @@ -568,7 +571,11 @@ export default { this.$nextTick(() => { console.log(this.hangZhiState, 'this.hangZhiState') this.$store.state.advancedSearchState = false - this.getDatas() + if (this.leftState) { + this.getDatas() + } else { + this.leftState = true + } }) } // 调接口拿到所有当前分类下的所有的指标、地区、时间 @@ -582,7 +589,6 @@ export default { stateTells (val) { console.log(val, 'jjjjjj') if (val) { - console.log(val, 'jjjjjj') if (JSON.parse(sessionStorage.getItem('classFiyData')) && JSON.parse(sessionStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id)) { this.transBefore = {} this.transBefore.tableExplain = JSON.parse(sessionStorage.getItem('classFiyData')).find(item => item.id === this.defaultDataRight.id).data.tableExplain @@ -598,15 +604,7 @@ export default { this.$store.state.transBefore = this.transBefore // 全局永久不变数据 this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore)) - } else { - console.log('走else') } - // } else { - // console.log(this.defaultDataRight, '获取左侧选中数据555') - // console.log(this.$store.state.selectData, 'this.$store.state.selectData') - // console.log(this.$store.state.selectfilter, 'this.$store.state.selectfilter') - // this.getDatas() - // } } }, // 筛选 @@ -1048,7 +1046,6 @@ export default { }, // 获取后台数据表中的数据 getDatas () { - console.log('执行getDatas') if (!this.$store.state.advancedSearchState) { // 初始化计算数据 if (this.transBefore) { @@ -1145,6 +1142,7 @@ export default { this.$emit('prentsState', false) } this.hangZhiState = true + this.$emit('update:loading', false) } else { this.transBefore = null // this.$store.state.transdtr = null @@ -1153,17 +1151,18 @@ export default { this.$store.state.noChangeData = null // 调用父组件的comTime方法告诉父组件重置状态 this.$parent.comTime({ name: '', extendData: '', active: true }) + this.$store.state.noDataState = false + this.$emit('update:loading', false) } if (this.$route.query.type !== 'area') { this.$store.state.SelecttDimension.col = 'zb' this.$store.state.SelecttDimension.row = 'sj' } - this.$emit('stateDataGet', false) + // this.$emit('stateDataGet', false) }).catch((fail) => { console.log(fail, 2369) }) } else { - console.log('zhixingelse') this.transBefore = this.$store.state.transBefore this.$store.state.noChangeData = JSON.parse(JSON.stringify(this.transBefore)) } @@ -1201,8 +1200,11 @@ export default { this.transBefore = transBefore // 全局永久不变数据 this.$store.state.noChangeData = JSON.parse(JSON.stringify(transBefore)) + this.$emit('update:loading', false) } else { this.$store.state.transBefore = null + this.$store.state.noDataState = false + this.$emit('update:loading', false) } // 告诉父组件我完成任务重置状态 this.$emit('prentsState', false) @@ -1306,7 +1308,7 @@ export default {