diff --git a/src/views/statistic/caseStatistic/caseAllStatistic.vue b/src/views/statistic/caseStatistic/caseAllStatistic.vue index d27160d..3883063 100644 --- a/src/views/statistic/caseStatistic/caseAllStatistic.vue +++ b/src/views/statistic/caseStatistic/caseAllStatistic.vue @@ -3,12 +3,16 @@ - + - + + + - + + + @@ -22,12 +26,14 @@ import CaseTable from './components/caseTable' import CaseSource from './components/caseSource' import SatisfiedPie from './components/satisfiedPie' +import BorderFrame from '../../../components/frame/borderFrame' export default { - name: 'CaseStatistic', - components: { SatisfiedPie, CaseSource, CaseTable, CaseHandleSearch, CaseTypeSearch, AppContainer }, + name: 'CaseAllStatistic', + components: { BorderFrame, SatisfiedPie, CaseSource, CaseTable, CaseHandleSearch, CaseTypeSearch, AppContainer }, data() { return { - listQuery: {} + listQuery: {}, + size: 'small' } }, created() { @@ -35,7 +41,12 @@ methods: { search(listQuery) { this.listQuery = listQuery - this.$refs.table.search() + const vm = this + setTimeout(function() { + vm.$refs.table.search() + vm.$refs.source.search() + vm.$refs.satisfied.search() + }, 100) } } } diff --git a/src/views/statistic/caseStatistic/caseAllStatistic.vue b/src/views/statistic/caseStatistic/caseAllStatistic.vue index d27160d..3883063 100644 --- a/src/views/statistic/caseStatistic/caseAllStatistic.vue +++ b/src/views/statistic/caseStatistic/caseAllStatistic.vue @@ -3,12 +3,16 @@ - + - + + + - + + + @@ -22,12 +26,14 @@ import CaseTable from './components/caseTable' import CaseSource from './components/caseSource' import SatisfiedPie from './components/satisfiedPie' +import BorderFrame from '../../../components/frame/borderFrame' export default { - name: 'CaseStatistic', - components: { SatisfiedPie, CaseSource, CaseTable, CaseHandleSearch, CaseTypeSearch, AppContainer }, + name: 'CaseAllStatistic', + components: { BorderFrame, SatisfiedPie, CaseSource, CaseTable, CaseHandleSearch, CaseTypeSearch, AppContainer }, data() { return { - listQuery: {} + listQuery: {}, + size: 'small' } }, created() { @@ -35,7 +41,12 @@ methods: { search(listQuery) { this.listQuery = listQuery - this.$refs.table.search() + const vm = this + setTimeout(function() { + vm.$refs.table.search() + vm.$refs.source.search() + vm.$refs.satisfied.search() + }, 100) } } } diff --git a/src/views/statistic/caseStatistic/caseStatisticMonth.vue b/src/views/statistic/caseStatistic/caseStatisticMonth.vue index 8341559..32266e4 100644 --- a/src/views/statistic/caseStatistic/caseStatisticMonth.vue +++ b/src/views/statistic/caseStatistic/caseStatisticMonth.vue @@ -49,6 +49,8 @@ import SearchArea from '../../../components/SearchArea/SearchArea' import SearchItem from '../../../components/SearchArea/SearchItem' import AppContainer from '../../../components/layout/AppContainer' +import { getCaseStatisticsByMonth } from '@/api/statistics' + export default { name: 'CaseStatisticMonth', components: { AppContainer, SearchItem, SearchArea, NormalTable }, @@ -130,43 +132,41 @@ }, fetchData() { this.listLoading = true - // getSoundList(this.listQuery).then(response => { - // if (response.code === 200) { - // this.listLoading = false - // this.list = response.data.rows - // this.total = response.data.total - // } - // }) - // const that = this - this.data = [{ - 'caseNum': 5, - 'month': '2020-01', - 'monthErlier': '0%', - 'yearErlier': '0%' - }, { - 'caseNum': 10, - 'month': '2020-02', - 'monthErlier': '0%', - 'yearErlier': '0%' - }, { - 'caseNum': 15, - 'month': '2020-03', - 'monthErlier': '0%', - 'yearErlier': '0%' - }, { - 'caseNum': 10, - 'month': '2020-04', - 'monthErlier': '0%', - 'yearErlier': '0%' - }] - this.chartData.rows = this.data - const maxValue = Math.max.apply(Math, this.data.map(function(item) { return item.caseNum })) - if (maxValue < 10) { - this.extend.yAxis = { max: 10 } - } else { - this.extend.yAxis = {} - } - this.listLoading = false + getCaseStatisticsByMonth(this.listQuery).then(response => { + if (response.code === 200) { + this.listLoading = false + // this.list = response.data.rows + // this.total = response.data.total + this.data = [{ + 'caseNum': 5, + 'month': '2020-01', + 'monthErlier': '0%', + 'yearErlier': '0%' + }, { + 'caseNum': 10, + 'month': '2020-02', + 'monthErlier': '0%', + 'yearErlier': '0%' + }, { + 'caseNum': 15, + 'month': '2020-03', + 'monthErlier': '0%', + 'yearErlier': '0%' + }, { + 'caseNum': 10, + 'month': '2020-04', + 'monthErlier': '0%', + 'yearErlier': '0%' + }] + this.chartData.rows = this.data + const maxValue = Math.max.apply(Math, this.data.map(function(item) { return item.caseNum })) + if (maxValue < 10) { + this.extend.yAxis = { max: 10 } + } else { + this.extend.yAxis = {} + } + } + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { @@ -186,12 +186,5 @@ diff --git a/src/views/statistic/caseStatistic/caseAllStatistic.vue b/src/views/statistic/caseStatistic/caseAllStatistic.vue index d27160d..3883063 100644 --- a/src/views/statistic/caseStatistic/caseAllStatistic.vue +++ b/src/views/statistic/caseStatistic/caseAllStatistic.vue @@ -3,12 +3,16 @@ - + - + + + - + + + @@ -22,12 +26,14 @@ import CaseTable from './components/caseTable' import CaseSource from './components/caseSource' import SatisfiedPie from './components/satisfiedPie' +import BorderFrame from '../../../components/frame/borderFrame' export default { - name: 'CaseStatistic', - components: { SatisfiedPie, CaseSource, CaseTable, CaseHandleSearch, CaseTypeSearch, AppContainer }, + name: 'CaseAllStatistic', + components: { BorderFrame, SatisfiedPie, CaseSource, CaseTable, CaseHandleSearch, CaseTypeSearch, AppContainer }, data() { return { - listQuery: {} + listQuery: {}, + size: 'small' } }, created() { @@ -35,7 +41,12 @@ methods: { search(listQuery) { this.listQuery = listQuery - this.$refs.table.search() + const vm = this + setTimeout(function() { + vm.$refs.table.search() + vm.$refs.source.search() + vm.$refs.satisfied.search() + }, 100) } } } diff --git a/src/views/statistic/caseStatistic/caseStatisticMonth.vue b/src/views/statistic/caseStatistic/caseStatisticMonth.vue index 8341559..32266e4 100644 --- a/src/views/statistic/caseStatistic/caseStatisticMonth.vue +++ b/src/views/statistic/caseStatistic/caseStatisticMonth.vue @@ -49,6 +49,8 @@ import SearchArea from '../../../components/SearchArea/SearchArea' import SearchItem from '../../../components/SearchArea/SearchItem' import AppContainer from '../../../components/layout/AppContainer' +import { getCaseStatisticsByMonth } from '@/api/statistics' + export default { name: 'CaseStatisticMonth', components: { AppContainer, SearchItem, SearchArea, NormalTable }, @@ -130,43 +132,41 @@ }, fetchData() { this.listLoading = true - // getSoundList(this.listQuery).then(response => { - // if (response.code === 200) { - // this.listLoading = false - // this.list = response.data.rows - // this.total = response.data.total - // } - // }) - // const that = this - this.data = [{ - 'caseNum': 5, - 'month': '2020-01', - 'monthErlier': '0%', - 'yearErlier': '0%' - }, { - 'caseNum': 10, - 'month': '2020-02', - 'monthErlier': '0%', - 'yearErlier': '0%' - }, { - 'caseNum': 15, - 'month': '2020-03', - 'monthErlier': '0%', - 'yearErlier': '0%' - }, { - 'caseNum': 10, - 'month': '2020-04', - 'monthErlier': '0%', - 'yearErlier': '0%' - }] - this.chartData.rows = this.data - const maxValue = Math.max.apply(Math, this.data.map(function(item) { return item.caseNum })) - if (maxValue < 10) { - this.extend.yAxis = { max: 10 } - } else { - this.extend.yAxis = {} - } - this.listLoading = false + getCaseStatisticsByMonth(this.listQuery).then(response => { + if (response.code === 200) { + this.listLoading = false + // this.list = response.data.rows + // this.total = response.data.total + this.data = [{ + 'caseNum': 5, + 'month': '2020-01', + 'monthErlier': '0%', + 'yearErlier': '0%' + }, { + 'caseNum': 10, + 'month': '2020-02', + 'monthErlier': '0%', + 'yearErlier': '0%' + }, { + 'caseNum': 15, + 'month': '2020-03', + 'monthErlier': '0%', + 'yearErlier': '0%' + }, { + 'caseNum': 10, + 'month': '2020-04', + 'monthErlier': '0%', + 'yearErlier': '0%' + }] + this.chartData.rows = this.data + const maxValue = Math.max.apply(Math, this.data.map(function(item) { return item.caseNum })) + if (maxValue < 10) { + this.extend.yAxis = { max: 10 } + } else { + this.extend.yAxis = {} + } + } + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { @@ -186,12 +186,5 @@ diff --git a/src/views/statistic/caseStatistic/caseStatisticYear.vue b/src/views/statistic/caseStatistic/caseStatisticYear.vue index 644c87c..8a2a52f 100644 --- a/src/views/statistic/caseStatistic/caseStatisticYear.vue +++ b/src/views/statistic/caseStatistic/caseStatisticYear.vue @@ -2,17 +2,17 @@