diff --git a/src/views/projectAdmin/common/jChart/bar/JBarChart.vue b/src/views/projectAdmin/common/jChart/bar/JBarChart.vue
index c0ed47b6..71c60199 100644
--- a/src/views/projectAdmin/common/jChart/bar/JBarChart.vue
+++ b/src/views/projectAdmin/common/jChart/bar/JBarChart.vue
@@ -45,22 +45,22 @@ export default {
data() {
return { jBarChart: null }
},
- watch:{
- xData:{
- handler(newVal,oldVal){
- if(newVal != oldVal){
- this.createChart();
- }
- },
- deep:true,
+ watch: {
+ xData: {
+ handler(newVal, oldVal) {
+ if (newVal != oldVal) {
+ this.createChart()
+ }
+ },
+ deep: true
},
- yData:{
- handler(newVal,oldVal){
- if(newVal != oldVal){
- this.createChart();
- }
- },
- deep:true,
+ yData: {
+ handler(newVal, oldVal) {
+ if (newVal != oldVal) {
+ this.createChart()
+ }
+ },
+ deep: true
}
},
methods: {
@@ -68,7 +68,7 @@ export default {
const { title, tooltip, grid, color, xData, yData, series } = this
const configSeries = (series => {
if (series.length) {
- return series.map(item => ({ data: item.data, type: 'bar', barWidth: 15 }))
+ return series.map(item => ({ name: item.name, type: 'bar', data: item.data, barWidth: 20, itemStyle: item.itemStyle }))
} else {
return [{ data: yData, type: 'bar', barWidth: 15 }]
}
@@ -84,6 +84,14 @@ export default {
fontWeight: 'normal'
}
},
+ legend: {
+ icon: 'circle',
+ top: 15,
+ left: 20,
+ itemWidth: 8,
+ textStyle: { color: '#fff' },
+ data: [{ name: '计划用料' }, { name: '实际用料' }]
+ },
tooltip,
grid: {
top: grid[0],
diff --git a/src/views/projectAdmin/zjsj/sourse/rightTop.vue b/src/views/projectAdmin/zjsj/sourse/rightTop.vue
index 30c1c9b0..c894b927 100644
--- a/src/views/projectAdmin/zjsj/sourse/rightTop.vue
+++ b/src/views/projectAdmin/zjsj/sourse/rightTop.vue
@@ -1,13 +1,42 @@
- 隐患趋势
+