|
@@ -152,7 +152,7 @@
|
|
permissions: JSON.parse(sessionStorage.getItem("permissions")),
|
|
permissions: JSON.parse(sessionStorage.getItem("permissions")),
|
|
radio: sessionStorage.radio!=null?sessionStorage.radio:'项目',
|
|
radio: sessionStorage.radio!=null?sessionStorage.radio:'项目',
|
|
containerHeight: 0,
|
|
containerHeight: 0,
|
|
- myChart: null,
|
|
|
|
|
|
+ // myChart: null,
|
|
params: null,
|
|
params: null,
|
|
widthHtval: document.body.clientWidth - 230,
|
|
widthHtval: document.body.clientWidth - 230,
|
|
users: [],
|
|
users: [],
|
|
@@ -775,13 +775,22 @@
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
// 更具数据的长度去加每个柱子的间距
|
|
// 更具数据的长度去加每个柱子的间距
|
|
- for(var i in res.data.costList) {
|
|
|
|
- if(i>20) {
|
|
|
|
|
|
+ // for(var i in res.data.costList) {
|
|
|
|
+ // if(i>20) {
|
|
|
|
+ // this.widthHtval = +this.widthHtval + 40
|
|
|
|
+ // } else {
|
|
|
|
+ // this.widthHtval = document.body.clientWidth - 230
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // console.log(this.dayjs().add('0','day').format("YYYY-MM-DD HH:mm:ss"), '结束处理')
|
|
|
|
+ if(res.data.costList.length > 20) {
|
|
|
|
+ for(var i in res.data.costList) {
|
|
this.widthHtval = +this.widthHtval + 40
|
|
this.widthHtval = +this.widthHtval + 40
|
|
- } else {
|
|
|
|
- this.widthHtval = document.body.clientWidth - 230
|
|
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ this.widthHtval = document.body.clientWidth - 230
|
|
}
|
|
}
|
|
|
|
+
|
|
var xList = []
|
|
var xList = []
|
|
var yList = []
|
|
var yList = []
|
|
var list
|
|
var list
|
|
@@ -868,8 +877,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
totalHours = totalHours.toFixed(1);
|
|
totalHours = totalHours.toFixed(1);
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
var myChart = echarts.init(document.getElementById("container"));
|
|
var myChart = echarts.init(document.getElementById("container"));
|
|
myChart.resize({
|
|
myChart.resize({
|
|
width: this.widthHtval
|
|
width: this.widthHtval
|
|
@@ -1045,6 +1053,7 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.myChart = null
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.containerHeight = window.innerHeight - 200
|
|
this.containerHeight = window.innerHeight - 200
|
|
@@ -1092,6 +1101,10 @@
|
|
this.jutishez()
|
|
this.jutishez()
|
|
this.scrollFunction()
|
|
this.scrollFunction()
|
|
},
|
|
},
|
|
|
|
+ beforeDestroy () {
|
|
|
|
+ var myChart = echarts.init(document.getElementById("container"));
|
|
|
|
+ myChart.clear()
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|