| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | var now = new Date(); |
| | | var year = now.getFullYear(); |
| | | var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`; |
| | | var now = new Date() |
| | | var year = now.getFullYear() |
| | | var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}` |
| | | this.value = `${year}-${month}` |
| | | this.date1 = `${year}-${month}` |
| | | |
| | |
| | | }, |
| | | changeBB() { |
| | | if (this.radio === 'month') { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`; |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | const month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}` |
| | | this.date1 = `${year}-${month}` |
| | | } else { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | this.date1 = `${year}` |
| | | } |
| | | this.getReportLists() |
| | |
| | | } |
| | | this.column = res[0] |
| | | this.list = res.slice(1).map(row => { |
| | | const obj = {}; |
| | | const obj = {} |
| | | this.column.forEach((header, index) => { |
| | | obj[header] = row[index]; |
| | | }); |
| | | return obj; |
| | | }); |
| | | obj[header] = row[index] |
| | | }) |
| | | return obj |
| | | }) |
| | | // if (res.length === 0) { |
| | | // this.column = [] |
| | | // this.list = [] |
| | |
| | | }, |
| | | changeDateType() { |
| | | if (this.dateType === 'month') { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`; |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | const month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}` |
| | | this.value = `${year}-${month}` |
| | | } else { |
| | | let now = new Date(); |
| | | let year = now.getFullYear(); |
| | | const now = new Date() |
| | | const year = now.getFullYear() |
| | | this.value = `${year}` |
| | | } |
| | | this.getRataLists() |
| | |
| | | |
| | | const myChart = echarts.init(document.querySelector('.echart1')) |
| | | |
| | | let names = this.info.cumulativeDataList.map(item => item.name) |
| | | let datas = this.info.cumulativeDataList.map(item => item.total) |
| | | const names = this.info.cumulativeDataList.map(item => item.name) |
| | | const datas = this.info.cumulativeDataList.map(item => item.total) |
| | | |
| | | let option = { |
| | | const option = { |
| | | grid: { |
| | | left: '0%', |
| | | right: '5%', |
| | |
| | | axisLabel: { |
| | | formatter: function (value) { |
| | | // 四舍五入到最近的整数 |
| | | return Math.round(value); |
| | | return Math.round(value) |
| | | } |
| | | } |
| | | }, |
| | |
| | | console.log(dom) |
| | | const myChart = echarts.init(dom) |
| | | |
| | | let data = this.listZB.map(item => { |
| | | const data = this.listZB.map(item => { |
| | | return { |
| | | value: item.total, |
| | | name: item.name |
| | | } |
| | | }) |
| | | |
| | | let option = { |
| | | const option = { |
| | | tooltip: { |
| | | trigger: 'item', |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | show: false, |
| | |
| | | labelLine: { |
| | | normal: { |
| | | length: 30, |
| | | length2: 70, |
| | | length2: 70 |
| | | } |
| | | }, |
| | | label: { |
| | | formatter: "{a|{b}} {d}%", |
| | | formatter: '{a|{b}} {d}%', |
| | | rich: { |
| | | a: { |
| | | color: '#333333', |
| | |
| | | initDept3() { |
| | | const myChart = echarts.init(document.querySelector('#echart3')) |
| | | |
| | | let option = { |
| | | const option = { |
| | | grid: { |
| | | left: '5%', |
| | | right: '10%', |
| | |
| | | |
| | | .main_table { |
| | | display: flex; |
| | | align-items: start; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | .main_table_list { |
| | |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | /*border-right: 12px solid #f7f7f7;*/ |
| | | |
| | | |
| | | .echart1 { |
| | | width: 100%; |