|
@@ -137,7 +137,7 @@ export default {
|
|
|
this.newTableList.forEach((item) => {
|
|
|
if (this.xStr === 'year') {
|
|
|
arrX.unshift(item[xAxis])
|
|
|
- arrY.unshift(item[xAxis])
|
|
|
+ arrY.unshift(item[yAxis])
|
|
|
}
|
|
|
if (this.hengzhu === 'yes') {
|
|
|
arrX.unshift(item[xAxis])
|
|
@@ -156,6 +156,9 @@ export default {
|
|
|
},
|
|
|
// 单选框改变事件
|
|
|
changRadio(item) {
|
|
|
+ console.log(item, 'item')
|
|
|
+ console.log(this.x, 'this.x')
|
|
|
+ console.log(this.y, 'this.y')
|
|
|
this.$emit('change-radio', this.radio)
|
|
|
this.setTable(this.xStr, item.prop)
|
|
|
this.echartsInit(this.echartsId, this.type, this.danwei, this.x, this.y, this.isX, this.isY)
|
|
@@ -299,22 +302,54 @@ export default {
|
|
|
return colorList[params.dataIndex]
|
|
|
}
|
|
|
}
|
|
|
- option.title = {
|
|
|
- title: true,
|
|
|
- text: this.all,
|
|
|
- subtext: this.allNum + this.danwei,
|
|
|
- top: 170,
|
|
|
- left: 700,
|
|
|
- textAlign: 'center',
|
|
|
- textStyle: {
|
|
|
- fontSize: '30',
|
|
|
- fontWeight: 'bold',
|
|
|
- color: '#86AFDE'
|
|
|
- },
|
|
|
- subtextStyle: {
|
|
|
- fontSize: '30',
|
|
|
- color: '#FFBA44'
|
|
|
- }
|
|
|
+ // option.title = {
|
|
|
+ // title: true,
|
|
|
+ // text: this.all,
|
|
|
+ // subtext: this.allNum + this.danwei,
|
|
|
+ // top: 170,
|
|
|
+ // left: 700,
|
|
|
+ // textAlign: 'center',
|
|
|
+ // textStyle: {
|
|
|
+ // fontSize: '30',
|
|
|
+ // fontWeight: 'bold',
|
|
|
+ // color: '#86AFDE'
|
|
|
+ // },
|
|
|
+ // subtextStyle: {
|
|
|
+ // fontSize: '30',
|
|
|
+ // color: '#FFBA44'
|
|
|
+ // }
|
|
|
+ option.graphic = {
|
|
|
+ type: 'group',
|
|
|
+ left: 'center',
|
|
|
+ top: 'center',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ //图形中间⽂字
|
|
|
+ type: 'text',
|
|
|
+ left: 'center',
|
|
|
+ top: 'center',
|
|
|
+ style: {
|
|
|
+ text: this.all + '\n',
|
|
|
+ textAlign: 'center',
|
|
|
+ fill: '#492dcb',
|
|
|
+ fontSize: 30,
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ //图形中间⽂字
|
|
|
+ type: 'text',
|
|
|
+ left: 'center',
|
|
|
+ top: 'center',
|
|
|
+ style: {
|
|
|
+ text: '\n\n' + this.allNum + this.danwei,
|
|
|
+ textAlign: 'center',
|
|
|
+ fill: '#fad360',
|
|
|
+ fontSize: 30,
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
option.xAxis = {
|
|
|
type: 'category',
|
|
@@ -407,12 +442,17 @@ export default {
|
|
|
}
|
|
|
|
|
|
myChart.setOption(option)
|
|
|
+ },
|
|
|
+ resetRadio(val) {
|
|
|
+ console.log(val, 'val')
|
|
|
+ if (val) {
|
|
|
+ this.radio = 'total'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
- console.log(this.radioName, '子节点中的radioname')
|
|
|
- console.log(this.radio, 'radio值')
|
|
|
+ this.$bus.$on('reset-radio', this.resetRadio)
|
|
|
},
|
|
|
watch: {
|
|
|
unit(newVal) {
|