fix: 各模块流量曲线图测试用例修改

This commit is contained in:
hyx
2023-12-25 14:47:48 +08:00
parent e08a7a2434
commit 4ae22a1ea0
6 changed files with 30 additions and 6 deletions

View File

@@ -208,7 +208,11 @@ export default {
} }
this.toggleLoading(true) this.toggleLoading(true)
try { try {
this.initData(this.chartDateObject, val, active, show) if(this.chartDateObject.length > 0) {
this.initData(this.chartDateObject, val, active, show)
} else {
this.init(val, show, active)
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {

View File

@@ -255,7 +255,11 @@ export default {
const newVal = val ? _.clone(val) : this.metric const newVal = val ? _.clone(val) : this.metric
this.toggleLoading(true) this.toggleLoading(true)
try { try {
this.initData(this.chartDateObject, newVal, active, show, n) if(this.chartDateObject.length > 0) {
this.initData(this.chartDateObject, newVal, active, show, n)
} else {
this.init(val, show, active, n)
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {

View File

@@ -231,7 +231,11 @@ export default {
const newVal = val ? _.clone(val) : this.metric const newVal = val ? _.clone(val) : this.metric
this.toggleLoading(true) this.toggleLoading(true)
try { try {
this.initData(this.chartDateObject, newVal, active) if(this.chartDateObject.length > 0) {
this.initData(this.chartDateObject, newVal, active)
} else {
this.init(val, active)
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {

View File

@@ -261,7 +261,11 @@ export default {
const newVal = val ? _.clone(val) : this.metric const newVal = val ? _.clone(val) : this.metric
this.toggleLoading(true) this.toggleLoading(true)
try { try {
this.initData(this.chartDateObject, newVal, active, show, n) if(this.chartDateObject.length > 0) {
this.initData(this.chartDateObject, newVal, active, show, n)
} else {
this.init(val, show, active, n)
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {

View File

@@ -229,7 +229,11 @@ export default {
const newVal = val ? _.clone(val) : this.metric const newVal = val ? _.clone(val) : this.metric
this.toggleLoading(true) this.toggleLoading(true)
try { try {
this.initData(this.chartDateObject, newVal, active, show, n) if(this.chartDateObject.length > 0) {
this.initData(this.chartDateObject, newVal, active, show, n)
} else {
this.init(val, show, active, n)
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {

View File

@@ -200,7 +200,11 @@ export default {
} }
this.toggleLoading(true) this.toggleLoading(true)
try { try {
this.initLineData(this.chartDateObject, val) if(this.chartDateObject.length > 0) {
this.initLineData(this.chartDateObject, val)
} else {
this.init(val)
}
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {