处理左边线拖到右边,在拖回去之后 取值有问题处理接口异常报错是,loading 效果未取消的问题
This commit is contained in:
parent
4c7aca83cf
commit
0e9e68ec76
|
@ -429,11 +429,14 @@ export default {
|
|||
this.myChart = this.$refs.chartTwoDRef.getChartInstance()
|
||||
let graphicHeight = this.$refs.TwoChartRef.clientHeight
|
||||
graphic1.shape.height = graphicHeight
|
||||
let minleft = this.myChart.convertToPixel({ xAxisId: '2' }, 0)
|
||||
let maxRight = this.myChart.convertToPixel({ xAxisId: '2' }, 1024)
|
||||
graphic1.position = [
|
||||
this.myChart.convertToPixel({ xAxisId: '2' }, minX),
|
||||
this.myChart.convertToPixel({ yAxisId: '3' }, maxY),
|
||||
]
|
||||
graphic1.ondrag = function () {
|
||||
this.position[0] = this.position[0] < minleft ? minleft : this.position[0]
|
||||
let [a, lineSeries] = _this.twoDOption.series
|
||||
_this.startChannel = parseInt(_this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0]))
|
||||
const rect = [
|
||||
|
@ -451,12 +454,14 @@ export default {
|
|||
// }
|
||||
// _this.twoDOption.series.splice(1, _this.twoDOption.series.length - 1, ...lineSeries)
|
||||
}
|
||||
// > maxRight ? maxRight : currRight
|
||||
graphic2.shape.height = graphicHeight
|
||||
graphic2.position = [
|
||||
this.myChart.convertToPixel({ xAxisId: '2' }, maxX),
|
||||
this.myChart.convertToPixel({ yAxisId: '3' }, maxY),
|
||||
]
|
||||
graphic2.ondrag = function () {
|
||||
this.position[0] = this.position[0] > maxRight ? maxRight : this.position[0]
|
||||
let [a, lineSeries] = _this.twoDOption.series
|
||||
_this.endChannel = parseInt(_this.myChart.convertFromPixel({ xAxisId: '2' }, this.position[0]))
|
||||
const rect = [
|
||||
|
@ -682,6 +687,8 @@ export default {
|
|||
color: '#99CA53',
|
||||
}
|
||||
// this.reDrawRect()
|
||||
} else {
|
||||
this.$emit('update:isLoading', false)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
|
Loading…
Reference in New Issue
Block a user