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