From 5f48a7743ea263fbd8aa56203a55bf318aa8da7b Mon Sep 17 00:00:00 2001 From: lVAL Date: Wed, 28 Oct 2020 15:01:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0AUS=E7=BA=BF=E8=B7=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A2=9E=E5=8A=A0=E8=BF=90=E8=A1=8C=E5=9B=BE?= =?UTF-8?q?=E7=BB=84=E5=90=8E=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/rpTools.js | 37 ++- src/jmapNew/theme/aus_00/planConvert copy.js | 268 ------------------ src/jmapNew/theme/aus_00/planConvert--.js | 188 ------------ src/jmapNew/theme/aus_00/planConvert.js | 22 +- src/jmapNew/theme/aus_00/utils.js | 10 - .../editToolAUS/components/drawer.vue | 18 +- .../planMonitor/editToolAUS/line/index.vue | 183 +++++++----- .../planMonitor/editToolAUS/line/modify.vue | 114 ++++++++ .../planMonitor/editToolAUS/line/stations.vue | 50 ++++ .../{ => tool}/dialog/planCreate.vue | 20 +- .../{ => tool}/dialog/planExport.vue | 2 +- .../{ => tool}/dialog/planJustRunning.vue | 2 +- .../{ => tool}/dialog/planJustStop.vue | 2 +- .../{ => tool}/dialog/planJustTurnback.vue | 2 +- .../{ => tool}/dialog/planSetParams.vue | 2 +- .../planMonitor/editToolAUS/tool/index.vue | 208 +++++++------- .../planMonitor/editToolAUS/tool/list.vue | 71 +++++ .../planMonitor/editToolAUS/tool/monitor.js | 10 +- .../planMonitor/editToolAUS/tool/schedule.vue | 7 +- 19 files changed, 540 insertions(+), 676 deletions(-) delete mode 100644 src/jmapNew/theme/aus_00/planConvert copy.js delete mode 100644 src/jmapNew/theme/aus_00/planConvert--.js create mode 100644 src/views/planMonitor/editToolAUS/line/modify.vue create mode 100644 src/views/planMonitor/editToolAUS/line/stations.vue rename src/views/planMonitor/editToolAUS/{ => tool}/dialog/planCreate.vue (70%) rename src/views/planMonitor/editToolAUS/{ => tool}/dialog/planExport.vue (99%) rename src/views/planMonitor/editToolAUS/{ => tool}/dialog/planJustRunning.vue (98%) rename src/views/planMonitor/editToolAUS/{ => tool}/dialog/planJustStop.vue (98%) rename src/views/planMonitor/editToolAUS/{ => tool}/dialog/planJustTurnback.vue (97%) rename src/views/planMonitor/editToolAUS/{ => tool}/dialog/planSetParams.vue (98%) create mode 100644 src/views/planMonitor/editToolAUS/tool/list.vue diff --git a/src/api/rpTools.js b/src/api/rpTools.js index 87e249fd9..53feb3d05 100644 --- a/src/api/rpTools.js +++ b/src/api/rpTools.js @@ -1,5 +1,36 @@ import request from '@/utils/request'; +/** + * 查询线路列表 + */ +export function listLines() { + return request({ + url: `/api/rpTools/map`, + method: 'get' + }) +} + +/** + * 查询线路列表 + */ +export function listStations(lineId) { + return request({ + url: `/api/rpTools/${lineId}/station`, + method: 'get' + }) +} + +/** + * 更新线路车站 + */ +export function updateStation(lineId, data) { + return request({ + url: `/api/rpTools/station/${lineId}`, + method: 'put', + data + }) +} + /** * 查询运行图列表 */ @@ -22,11 +53,11 @@ export function createRp(data) { } /** - * 删除运行图 + * 删除运行图组 */ -export function deleteRp(planId) { +export function deleteRp(groupId) { return request({ - url: `/api/rpTools/${planId}`, + url: `/api/rpTools/${groupId}`, method: 'delete' }) } diff --git a/src/jmapNew/theme/aus_00/planConvert copy.js b/src/jmapNew/theme/aus_00/planConvert copy.js deleted file mode 100644 index b2cb726ef..000000000 --- a/src/jmapNew/theme/aus_00/planConvert copy.js +++ /dev/null @@ -1,268 +0,0 @@ -import { createSeriesModel, createMarkLineModels, createMartPoint } from './utils'; -import { toTimeStamp } from '@/utils/date'; - -export default { - /** 边缘高度*/ - EdgeHeight: 600, - - /** 间隔高度*/ - CoordMultiple: 1, - - /** 偏移时间*/ - TranslationTime: 0, - - /** 将后台数据解析成图形*/ - parseDataToGraph(chart, planData, stations, kmRangeCoordinateMap) { - const graphs = []; - if (planData && - planData.areaList && - planData.areaList.length) { - planData.areaList.forEach(area => { - const startTime = toTimeStamp(area.startTime); - const endTime = toTimeStamp(area.endTime); - - const fartherKm = this.getCoordinateYByObj(stations, kmRangeCoordinateMap, {stationCode: area.fartherStationCode}); - const closerKm = this.getCoordinateYByObj(stations, kmRangeCoordinateMap, {stationCode: area.closerStationCode}); - const point1 = [ startTime, fartherKm]; - const point2 = [ endTime, closerKm] - const position = chart.convertToPixel('grid', point1); - const position2 = chart.convertToPixel('grid', point2) - const width = Math.abs(position[0] - position2[0]); - const height = Math.abs(position[1] - position2[1]); - - graphs.push({ - type: 'rect', - subType: 'area', - areaNo: area.areaNo, - position, - point1, - point2, - model: area, - shape: { - x: 0, - y: 0, - width, - height - }, - style: { - fill: 'rgb(255,0,0, 0.3)', - stroke: 'rgb(255, 0, 0, 0.8)' - }, - z: 100 - }) - }) - } - - return graphs; - }, - - /** 将后台数据解析成折线*/ - parseDataToSeries(chart, planData, stations, kmRangeCoordinateMap) { - const models = []; - if (planData && - planData.serviceList && - planData.serviceList.length) { - planData.serviceList.forEach((service,i) => { - if (service.tripList && - service.tripList.length) { - - service.tripList.forEach((trip,j) => { - const opt = { - name: `plan-${service.serviceNo}-${trip.tripNo}-${trip.direction}`, - type: 'line', - symbolSize: 1, - showAllSymbol: true, - markPoint: { data: [] }, - data: [] - }; - - var lastPoint = null; - var nextPoint = null; - var pointData = { - name: `${service.serviceNo}-${trip.tripNo}`, - color: '#000', - direction: trip.direction, - coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, trip.stationTimeList[0], trip.direction, false)], - }; - - opt.markPoint.data.push(createMartPoint(pointData)); - - trip.stationTimeList.forEach(elem => { - const name = `${trip.direction}${trip.tripNo}`; - if (elem.arrivalTime) { - opt.data.push([elem.arrivalTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, elem, elem.direction, false), { - stationCode: elem.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - } - - if (elem.departureTime) { - opt.data.push([elem.departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, elem, elem.direction, false), { - stationCode: elem.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - } - }); - - const model = createSeriesModel(opt, - { color: '#000', width: 1 }, - { color: '#000', fill: '#000'} - ); - models.push(model); - - if (service.tripList[j + 1] && - service.tripList[j + 1].stationTimeList) { - const opt = { - name: `reentry-${service.serviceNo}-${trip.tripNo}-${trip.direction}`, - type: 'line', - symbolSize: 1, - showAllSymbol: false, - markPoint: { data: [] }, - data: [] - }; - - lastPoint = trip.stationTimeList[trip.stationTimeList.length-1]; - nextPoint = service.tripList[j + 1].stationTimeList[0]; - const name = `${trip.direction}${trip.tripNo}`; - opt.data.push([lastPoint.arrivalTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, false), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - - opt.data.push([lastPoint.arrivalTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, true), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - opt.data.push([nextPoint.departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, true), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - opt.data.push([nextPoint.departureTime, this.getCoordinateYByObj(stations, kmRangeCoordinateMap, lastPoint, trip.direction, false), { - stationCode: lastPoint.stationCode, - serviceNo: service.serviceNo, - tripNo: trip.tripNo, - direction: trip.direction, - name - }]); - - - const model = createSeriesModel(opt, - { color: '#000', width: 1 }, - { color: '#000', fill: '#000'} - ); - models.push(model); - } - }); - } - }) - } - - return models; -}, - - /** 更新数据并解析成折线*/ - updateDataToModels(chart, planData, stations, kmRangeCoordinateMap, series) { - if (planData && planData.length) { - } - return series; - }, - - /** 初始化Y轴*/ - initializeYaxis(stations) { - return createMarkLineModels(stations, (elem) => { - return this.EdgeHeight + elem.kmRange * this.CoordMultiple; - }); - }, - - /** 将后台数据转换为试图序列模型*/ - convertStationsToMap(stations) { - var map = {}; - if (stations && stations.length) { - stations.forEach((elem) => { - map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple; - }); - } - - return map; - }, - - /** 计算y轴最小值*/ - computedYaxisMinValue(stations) { - return stations[0].kmRange * this.CoordMultiple; - }, - - /** 计算y轴最大值*/ - computedYaxisMaxValue(stations) { - return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2; - }, - - /** 格式化y轴数据*/ - computedFormatYAxis(stations, params) { - var yText = '0m'; - - stations.forEach(elem => { - if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) { - yText = Math.floor(elem.kmRange) + 'm'; - } - }); - - return yText; - }, - - /** 根据方向计算y折返偏移量*/ - getYvalueByDirectionCode(defaultVlue, direction) { - if (direction === '1') { - defaultVlue -= this.EdgeHeight / 2; - } else if (direction === '2') { - defaultVlue += this.EdgeHeight / 2; - } - - return defaultVlue; - }, - - - /** 根据elem计算y值*/ - getCoordinateYByObj(stations, kmRangeCoordinateMap, obj, direction, isSpecial) { - var defaultVlue = 0; - var station = stations.find(it => { return it.code == obj.stationCode; }); - if (station) { - defaultVlue = kmRangeCoordinateMap[`${station.kmRange}`]; - if (isSpecial) { - defaultVlue = this.getYvalueByDirectionCode(defaultVlue, direction); - } - } - - return defaultVlue; - }, - - /** 通过y坐标获取站信息 */ - getStationByCoordinateY(stations, y) { - for(var i = stations.length-1; i >= 0; i--) { - const station = stations[i]; - const edge = this.EdgeHeight - const preKm = i == 0? edge*2: Math.abs(station.kmRange-stations[i-1].kmRange)/2; - const nxtKm = i == stations.length-1? edge: Math.abs(station.kmRange-stations[i+1].kmRange)/2; - const min = edge + station.kmRange - preKm; - const max = edge + station.kmRange + nxtKm; - if (y >= min && y <= max) { - return station; - } - } - return null; - } -}; diff --git a/src/jmapNew/theme/aus_00/planConvert--.js b/src/jmapNew/theme/aus_00/planConvert--.js deleted file mode 100644 index c9ddea40c..000000000 --- a/src/jmapNew/theme/aus_00/planConvert--.js +++ /dev/null @@ -1,188 +0,0 @@ -import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; -import { toTimeStamp } from '@/utils/date'; - -export default { - /** 边缘高度*/ - EdgeHeight: 3, - - /** 间隔高度*/ - CoordMultiple: 3, - - /** 偏移时间*/ - TranslationTime: 0, - - /** 将后台数据解析成图形*/ - parseDataToGraph(chart, planData, stations, kmRangeCoordMap) { - const graphs = []; - if (planData && - planData.areaList && - planData.areaList.length) { - planData.areaList.forEach(el => { - const startTime = toTimeStamp(el.startTime); - const endTime = toTimeStamp(el.endTime); - - const fartherKm = this.getCoordYByObj(stations, kmRangeCoordMap, {stationCode: el.fartherStationCode}); - const closerKm = this.getCoordYByObj(stations, kmRangeCoordMap, {stationCode: el.closerStationCode}); - const point1 = [ startTime, fartherKm]; - const point2 = [ endTime, closerKm] - const position = chart.convertToPixel('grid', point1); - const position2 = chart.convertToPixel('grid', point2) - const width = Math.abs(position[0] - position2[0]); - const height = Math.abs(position[1] - position2[1]); - - graphs.push({ - type: 'rect', - subType: 'area', - areaNo: el.areaNo, - position, - point1, - point2, - model: el, - shape: { - x: 0, - y: 0, - width, - height - }, - style: { - fill: 'rgb(255,0,0, 0.3)', - stroke: 'rgb(255, 0, 0, 0.8)' - }, - z: 100 - }) - }) - } - - return graphs; - }, - - /** 将后台数据解析成折线*/ - parseDataToSeries(chart, planData, stations, kmRangeCoordMap) { - var models = []; - /** 按车次遍历数据*/ - if (planData && planData.length) { - planData.forEach(trip => { - const opt = { - name: `plan-${trip.tripNo}`, - type: 'line', - symbolSize: 1, - showAllSymbol: true, - lineStyle: { - color: '#000', - width: 1, - }, - itemStyle: { - color: '#000', - fill: '#000' - }, - markPoint: { data: [] }, - data: [] - }; - - /** 计算停站点坐标集合*/ - trip.stationTimeList.forEach((elem,idx) => { - if (elem.arrivalTime) { - opt.data.push([elem.arrivalTime, this.getCoordYByObj(stations, kmRangeCoordMap, elem), elem.stationCode, trip.tripNo]); - } - - if (elem.departureTime) { - opt.data.push([elem.departureTime, this.getCoordYByObj(stations, kmRangeCoordMap, elem), elem.stationCode, trip.tripNo]); - } - }); - - models.push(opt); - }); - } - - return models; - }, - - /** 更新数据并解析成折线*/ - updateDataToModels(chart, planData, stations, kmRangeCoordMap, runPlanData, series) { - if (planData && planData.length) { - } - return series; - }, - - /** 将后台数据转换为试图序列模型*/ - convertStationsToMap(stations) { - var map = {}; - if (stations && stations.length) { - stations.forEach((elem, index) => { - map[`${elem.kmRange}`] = this.EdgeHeight + index * this.CoordMultiple; - }); - } - - return map; - }, - /** 初始化Y轴*/ - initializeYaxis(stations) { - return createMarkLineModels(stations, (elem, index) => { - return this.EdgeHeight + index * this.CoordMultiple; - }); - }, - - /** 计算y轴最小值*/ - computedYaxisMinValue() { - return 0; - }, - - /** 计算y轴最大值*/ - computedYaxisMaxValue(stations) { - return this.EdgeHeight * 2 + (stations.length - 1) * this.CoordMultiple; - }, - - /** 格式化y轴数据*/ - computedFormatYAxis(stations, params) { - var yText = '0m'; - var index = Math.floor((parseInt(params.value) - this.EdgeHeight) / this.CoordMultiple); - if (index >= 0 && index < stations.length) { - yText = Math.floor(stations[index].kmRange) + 'm'; - } - return yText; - }, - - /** 根据方向计算y折返偏移量*/ - getYvalueByDirectionCode(defaultVlue, directionCode) { - if (directionCode === '1') { - defaultVlue -= this.EdgeHeight / 2; - } else if (directionCode === '2') { - defaultVlue += this.EdgeHeight / 2; - } - - return defaultVlue; - }, - - /** 根据elem计算y值*/ - getCoordYByObj(stations, kmRangeCoordMap, elem, directionCode, isSpecial) { - var defaultVlue = 0; - var station = stations.find(it => { return it.code == elem.stationCode; }); - if (station) { - defaultVlue = kmRangeCoordMap[`${station.kmRange}`]; - if (isSpecial) { - defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode); - } - } - - return defaultVlue; - }, - - /** 通过y坐标获取站信息*/ - getStationByCoordinateY(stations, y) { - for(var i = stations.length-1; i >= 0; i--) { - const station = stations[i]; - const edge = this.EdgeHeight; - const rate = this.CoordMultiple; - - const preKm = i == 0? edge*2: rate/2; - const nxtKm = i == stations.length-1? edge: rate/2; - const min = edge + i*rate - preKm; - const max = edge + i*rate + nxtKm; - - if (y >= min && y <= max) { - return station; - } - } - return null; - } -}; diff --git a/src/jmapNew/theme/aus_00/planConvert.js b/src/jmapNew/theme/aus_00/planConvert.js index 3ded17833..ae521da21 100644 --- a/src/jmapNew/theme/aus_00/planConvert.js +++ b/src/jmapNew/theme/aus_00/planConvert.js @@ -78,15 +78,15 @@ export default { name: `${service.serviceNo}-${trip.tripNo}`, color: '#000', direction: trip.direction, - coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationCode(stations, trip.stationTimeList[0].stationCode)], + coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationId(stations, trip.stationTimeList[0].stationId)], }; opt.markPoint.data.push(createMartPoint(pointData)); trip.stationTimeList.forEach(elem => { if (elem.arrivalTime) { - opt.data.push([elem.arrivalTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { - stationCode: elem.stationCode, + opt.data.push([elem.arrivalTime, this.getCoordinateYByStationId(stations, elem.stationId), { + stationId: elem.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -95,8 +95,8 @@ export default { } if (elem.departureTime) { - opt.data.push([elem.departureTime, this.getCoordinateYByStationCode(stations, elem.stationCode), { - stationCode: elem.stationCode, + opt.data.push([elem.departureTime, this.getCoordinateYByStationId(stations, elem.stationId), { + stationId: elem.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -112,8 +112,8 @@ export default { nextPoint = service.tripList[j + 1].stationTimeList[0]; opt.data.push({ - value: [lastPoint.arrivalTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { - stationCode: lastPoint.stationCode, + value: [lastPoint.arrivalTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), { + stationId: lastPoint.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -123,8 +123,8 @@ export default { symbolSize: 1, }); opt.data.push({ - value: [nextPoint.departureTime, this.getCoordinateYByStationCode(stations, lastPoint.stationCode, true, trip.direction), { - stationCode: lastPoint.stationCode, + value: [nextPoint.departureTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), { + stationId: lastPoint.stationId, serviceNo: service.serviceNo, tripNo: trip.tripNo, direction: trip.direction, @@ -209,9 +209,9 @@ export default { }, /** 通过站信息获取y坐标*/ - getCoordinateYByStationCode(stations, stationCode, isSpecial=false, direction='01') { + getCoordinateYByStationId(stations, stationId, isSpecial=false, direction='01') { var value = 0; - var station = stations.find(it => { return it.code == stationCode; }); + var station = stations.find(it => { return it.id == stationId; }); if (station) { value = this.getCoordinateYByKmRange(station.kmRange) + this.getOffsetY(isSpecial, direction); } diff --git a/src/jmapNew/theme/aus_00/utils.js b/src/jmapNew/theme/aus_00/utils.js index 7344a6fb3..0e1c833de 100644 --- a/src/jmapNew/theme/aus_00/utils.js +++ b/src/jmapNew/theme/aus_00/utils.js @@ -209,16 +209,6 @@ export function formatTime(time) { } } -/** 通过code将名称格式化*/ -export function formatName(code) { - let name = ''; - const device = store.getters['map/getDeviceByCode'](code); - if (device) { - name = device.name; - } - return name; -} - /** 将时间格式化前补零*/ export function prefixTime(time) { let str = `${time}` || ''; diff --git a/src/views/planMonitor/editToolAUS/components/drawer.vue b/src/views/planMonitor/editToolAUS/components/drawer.vue index 3cb64f3e1..2aa0e4195 100644 --- a/src/views/planMonitor/editToolAUS/components/drawer.vue +++ b/src/views/planMonitor/editToolAUS/components/drawer.vue @@ -1,7 +1,7 @@ + + diff --git a/src/views/planMonitor/editToolAUS/tool/monitor.js b/src/views/planMonitor/editToolAUS/tool/monitor.js index aaeac448f..940fcc2e1 100644 --- a/src/views/planMonitor/editToolAUS/tool/monitor.js +++ b/src/views/planMonitor/editToolAUS/tool/monitor.js @@ -7,10 +7,10 @@ export default { callRegister: [], markList: [], buildModel: { - startStationCode: '', + startStationId: '', startKmRange: 0, startTime: 0, - endStationCode: '', + endStationId: '', endKmRange: 0, endTime: 0 }, @@ -275,10 +275,10 @@ export default { if (markList.length == 1) { this.buildModel.startTime = pointInGrid[0]; - this.buildModel.startStationCode = yObj.code; + this.buildModel.startStationId = yObj.id; } else if (markList.length >= 2) { this.buildModel.endTime = pointInGrid[0]; - this.buildModel.endStationCode = yObj.code; + this.buildModel.endStationId = yObj.id; option.graphic[0].elements = elemList; this.$emit('create', this.buildModel); } @@ -375,7 +375,7 @@ export default { this.offset.x = pointInGrid[0]; this.offset.y = pointInGrid[1]; this.selected = { - stationIndex: this.stations.findIndex(el => { return el.code == obj.stationCode; }), + stationIndex: this.stations.findIndex(el => { return el.id == obj.stationId; }), dataIndex: e.dataIndex, seriesIndex: e.seriesIndex, seriesName: isService? e.seriesName: 'service-trip', diff --git a/src/views/planMonitor/editToolAUS/tool/schedule.vue b/src/views/planMonitor/editToolAUS/tool/schedule.vue index 5bdcbef18..4e8e3a6ef 100644 --- a/src/views/planMonitor/editToolAUS/tool/schedule.vue +++ b/src/views/planMonitor/editToolAUS/tool/schedule.vue @@ -204,7 +204,7 @@ export default { param.data.length) { const xVal = param.data[0]; const yObj = param.data[2]; - const station = this.stations.find(el => { return el.code == yObj.stationCode })||{ name: '', kmRange: ''}; + const station = this.stations.find(el => { return el.id == yObj.stationId })||{ name: '', kmRange: ''}; const list = [ `Service No: ${yObj.serviceNo}
`, `Trip No: ${yObj.tripNo}
`, @@ -331,6 +331,11 @@ export default { reSize({width, height}) { if (this.myChart) { this.myChart.resize({ width, height, silent: false }); + } + }, + clear() { + if (this.myChart) { + this.myChart.clear(); } }, destroy() {