Commit 55a00355 authored by danfuman's avatar danfuman

修改

parent 4d595e2d
...@@ -70,7 +70,7 @@ export const constantRoutes = [ ...@@ -70,7 +70,7 @@ export const constantRoutes = [
path: 'index', path: 'index',
component: () => import('@/views/index'), component: () => import('@/views/index'),
name: 'Index', name: 'Index',
meta: { title: '首页', icon: 'index',noCache: true } meta: { title: '首页', icon: 'index',noCache: false }
} }
] ]
}, },
......
...@@ -404,7 +404,10 @@ ...@@ -404,7 +404,10 @@
}) })
}, },
getGroupByMoney(){ getGroupByMoney(){
let year=[this.year1.toString().substr(0, 4)] let year=''
if(this.year1){
year=[this.year1.toString().substr(0, 4)]
}
groupByMoney({combineId:this.customerId,year:year}).then(res=>{ groupByMoney({combineId:this.customerId,year:year}).then(res=>{
this.isSkeleton3 = false this.isSkeleton3 = false
if(res.code === 200){ if(res.code === 200){
...@@ -424,7 +427,10 @@ ...@@ -424,7 +427,10 @@
}) })
}, },
getGroupByType(){ getGroupByType(){
let year=[this.year2.toString().substr(0, 4)] let year=''
if(this.year2){
year=[this.year2.toString().substr(0, 4)]
}
groupByType({combineId:this.customerId,year:year}).then(res=>{ groupByType({combineId:this.customerId,year:year}).then(res=>{
this.isSkeleton4 = false this.isSkeleton4 = false
if(res.code === 200){ if(res.code === 200){
...@@ -436,7 +442,10 @@ ...@@ -436,7 +442,10 @@
}) })
}, },
getGroupByLowerRate(){ getGroupByLowerRate(){
let year=[this.year3.toString().substr(0, 4)] let year=''
if(this.year3){
year=[this.year3.toString().substr(0, 4)]
}
groupByLowerRate({combineId:this.customerId,year:year}).then(res=>{ groupByLowerRate({combineId:this.customerId,year:year}).then(res=>{
this.isSkeleton5 = false this.isSkeleton5 = false
if(res.code === 200){ if(res.code === 200){
...@@ -496,6 +505,8 @@ ...@@ -496,6 +505,8 @@
}, },
initChart(data) { initChart(data) {
this.$nextTick(()=>{ this.$nextTick(()=>{
// 让 指定id 的 div 的_echarts_instance_属性值 为 空状态
document.getElementById("ndzb-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("ndzb-echarts")) let myChart = echarts.init(document.getElementById("ndzb-echarts"))
let option ={ let option ={
tooltip: { tooltip: {
...@@ -627,6 +638,7 @@ ...@@ -627,6 +638,7 @@
}, },
initChart2(data) { initChart2(data) {
this.$nextTick(() => { this.$nextTick(() => {
document.getElementById("fbje-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("fbje-echarts")) let myChart = echarts.init(document.getElementById("fbje-echarts"))
let option ={ let option ={
tooltip: { tooltip: {
...@@ -676,6 +688,7 @@ ...@@ -676,6 +688,7 @@
}, },
initChart3(data) { initChart3(data) {
this.$nextTick(()=>{ this.$nextTick(()=>{
document.getElementById("lxtj-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("lxtj-echarts")) let myChart = echarts.init(document.getElementById("lxtj-echarts"))
let option ={ let option ={
tooltip: { tooltip: {
...@@ -815,6 +828,7 @@ ...@@ -815,6 +828,7 @@
}, },
initChart4(data) { initChart4(data) {
this.$nextTick(()=>{ this.$nextTick(()=>{
document.getElementById("xfl-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("xfl-echarts")) let myChart = echarts.init(document.getElementById("xfl-echarts"))
let option ={ let option ={
tooltip: { tooltip: {
......
...@@ -882,6 +882,8 @@ export default { ...@@ -882,6 +882,8 @@ export default {
data.push(list[i]) data.push(list[i])
} }
this.$nextTick(()=>{ this.$nextTick(()=>{
// 让 指定id 的 div 的_echarts_instance_属性值 为 空状态
document.getElementById("zbtj-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("zbtj-echarts")) let myChart = echarts.init(document.getElementById("zbtj-echarts"))
let option ={ let option ={
tooltip: { tooltip: {
...@@ -1020,6 +1022,8 @@ export default { ...@@ -1020,6 +1022,8 @@ export default {
require('@/assets/images/index/10.png'), require('@/assets/images/index/10.png'),
] ]
this.$nextTick(()=>{ this.$nextTick(()=>{
// 让 指定id 的 div 的_echarts_instance_属性值 为 空状态
document.getElementById("zbph-echarts").removeAttribute('_echarts_instance_');
let myChart = echarts.init(document.getElementById("zbph-echarts")) let myChart = echarts.init(document.getElementById("zbph-echarts"))
// let option ={ // let option ={
// legend: { // legend: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment