diff --git a/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue b/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue index 5ce1b8f..ede63aa 100644 --- a/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue +++ b/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue @@ -65,7 +65,7 @@ export default { let dataStr = '' let index = params[0].dataIndex const showLabelName = xAxisDataName[index] - + dataStr += `
${showLabelName}
` params.forEach(item => { let color = '' if(typeof item.color === 'string') { @@ -74,9 +74,9 @@ export default { color = item.color.colorStops[0].color } dataStr += `
-
+
- ${showLabelName} + ${item.seriesName} ${item.value}
` @@ -90,7 +90,7 @@ export default { }, series: [ { - name: '', + name: '总数', type: 'bar', barMaxWidth:20, itemStyle:{ diff --git a/src/views/dashboard/screen/wp29/MeetingCalendar.vue b/src/views/dashboard/screen/wp29/MeetingCalendar.vue index a68eb8f..5a9484d 100644 --- a/src/views/dashboard/screen/wp29/MeetingCalendar.vue +++ b/src/views/dashboard/screen/wp29/MeetingCalendar.vue @@ -197,7 +197,7 @@ export default { tippy(data.el, { content: '
' + - '' + content[0].orgType + '' + '' + content[0].name + '' + + '' + content[0].name + '' + '
技术领域: ' + content[0].type + '
' + '' + '
时间: ' + content[0].timeAll + '
' + '' + '
地点: ' + content[0].place + '
' + diff --git a/src/views/dashboard/screen/wp29/RegulationQuantityChart.vue b/src/views/dashboard/screen/wp29/RegulationQuantityChart.vue index 70adf28..45e89c5 100644 --- a/src/views/dashboard/screen/wp29/RegulationQuantityChart.vue +++ b/src/views/dashboard/screen/wp29/RegulationQuantityChart.vue @@ -47,10 +47,12 @@ export default { this.xAxisData = arr[0].xaxis this.xAxisDataName = arr[0].departNameCnList this.yData = [] + this.yDataArr = [] this.legendData = [] arr.map(tt => { this.yData.push(tt.data || []) this.legendData.push(tt.name) + this.yDataArr = tt.totalOneList }) }, // 初始化图表 @@ -67,32 +69,30 @@ export default { }, tooltip: { formatter: params => { - console.log("---params---------", params) // 获取xAxis data中的数据 let dataStr = '' - let total = 0 - for (let i = 0; i < params.length; i++) { - total += parseInt(params[i].data) - } + // let total = 0 + // for (let i = 0; i < params.length; i++) { + // total += parseInt(params[i].data) + // } let index = params[0].dataIndex const showLabelName = this.xAxisDataName[index] - dataStr += `
${showLabelName} 总数: ${total}
` - - // params.forEach(item => { - // let color = '' - // if(typeof item.color === 'string') { - // color = item.color - // } else { - // color = item.color.colorStops[0].color - // } - // dataStr += `
- //
- // - // ${item.seriesName} - // ${item.value} - //
- //
` - // }) + dataStr += `
${showLabelName}
` + params.forEach(item => { + let color = '' + if(typeof item.color === 'string') { + color = item.color + } else { + color = item.color.colorStops[0].color + } + dataStr += `
+
+ + ${item.seriesName} + ${item.value} +
+
` + }) return dataStr } }, @@ -100,35 +100,45 @@ export default { data: this.xAxisData }, series: [ + // { + // name: this.legendData[0], + // type: 'bar', + // stack: 'total', + // barMaxWidth:20, + // itemStyle:{ + // borderRadius:[0,0,0,0], + // }, + // data: this.yData[0] + // }, + // { + // name: this.legendData[1], + // type: 'bar', + // stack: 'total', + // barMaxWidth:20, + // itemStyle:{ + // borderRadius:[0,0,0,0], + // }, + // data: this.yData[1] + // }, + // { + // name: this.legendData[2], + // type: 'bar', + // stack: 'total', + // barMaxWidth:20, + // itemStyle:{ + // borderRadius:[4,4,0,0], + // }, + // data: this.yData[2] + // }, { - name: this.legendData[0], - type: 'bar', - stack: 'total', - barMaxWidth:20, - itemStyle:{ - borderRadius:[0,0,0,0], - }, - data: this.yData[0] - }, - { - name: this.legendData[1], - type: 'bar', - stack: 'total', - barMaxWidth:20, - itemStyle:{ - borderRadius:[0,0,0,0], - }, - data: this.yData[1] - }, - { - name: this.legendData[2], + name: '总数', type: 'bar', stack: 'total', barMaxWidth:20, itemStyle:{ borderRadius:[4,4,0,0], }, - data: this.yData[2] + data: this.yDataArr }, ] }