|
@@ -20,6 +20,7 @@ export default {
|
|
|
// });
|
|
// });
|
|
|
// },
|
|
// },
|
|
|
myEcharts(){
|
|
myEcharts(){
|
|
|
|
|
+ var token = localStorage.getItem("token")
|
|
|
var chipStates = this.chipStates
|
|
var chipStates = this.chipStates
|
|
|
this.myChart = this.echarts.init(document.getElementById('barchartCon'));
|
|
this.myChart = this.echarts.init(document.getElementById('barchartCon'));
|
|
|
this.option = {
|
|
this.option = {
|
|
@@ -49,7 +50,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
xAxis: {
|
|
xAxis: {
|
|
|
type: 'category',
|
|
type: 'category',
|
|
|
- data: chipStates.map(o=>o.productTypeName),//[ '2016', '2017', '2018', '2019', '2020', '2021'],
|
|
|
|
|
|
|
+ data: token?(chipStates.map(o=>o.productTypeName)):[ '2016', '2017', '2018', '2019', '2020', '2021'],
|
|
|
axisLine:{
|
|
axisLine:{
|
|
|
lineStyle:{
|
|
lineStyle:{
|
|
|
color:"#0E61B6",
|
|
color:"#0E61B6",
|
|
@@ -101,7 +102,7 @@ export default {
|
|
|
barMaxWidth:15,
|
|
barMaxWidth:15,
|
|
|
barMinWidth :10,
|
|
barMinWidth :10,
|
|
|
barMinHeight :5,
|
|
barMinHeight :5,
|
|
|
- data: chipStates.map(o=>o.state10),//[120, 132, 101, 134, 90, 230, 210]
|
|
|
|
|
|
|
+ data: token?chipStates.map(o=>o.state10):[120, 132, 101, 134, 90, 230, 210]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '实时温控',
|
|
name: '实时温控',
|
|
@@ -109,7 +110,7 @@ export default {
|
|
|
barMaxWidth:15,
|
|
barMaxWidth:15,
|
|
|
barMinWidth :10,
|
|
barMinWidth :10,
|
|
|
barMinHeight :5,
|
|
barMinHeight :5,
|
|
|
- data: chipStates.map(o=>o.state11),//[120, 132, 101, 134, 90, 230, 210]
|
|
|
|
|
|
|
+ data: token?chipStates.map(o=>o.state11):[120, 132, 101, 134, 90, 230, 210]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
name: '追溯标签',
|
|
name: '追溯标签',
|
|
@@ -117,7 +118,7 @@ export default {
|
|
|
barMaxWidth:15,
|
|
barMaxWidth:15,
|
|
|
barMinWidth :10,
|
|
barMinWidth :10,
|
|
|
barMinHeight :5,
|
|
barMinHeight :5,
|
|
|
- data: chipStates.map(o=>o.state20),//[120, 132, 101, 134, 90, 230, 210]
|
|
|
|
|
|
|
+ data: token?chipStates.map(o=>o.state20):[120, 132, 101, 134, 90, 230, 210]
|
|
|
},
|
|
},
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|