From 74be1ba604932667824df4720aeedb48e1b36ad1 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 29 Oct 2020 11:07:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E5=9B=BE=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editTool/menus/createEmptyPlan.vue | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/views/planMonitor/editTool/menus/createEmptyPlan.vue b/src/views/planMonitor/editTool/menus/createEmptyPlan.vue index a89d2047f..1ed6aa68f 100644 --- a/src/views/planMonitor/editTool/menus/createEmptyPlan.vue +++ b/src/views/planMonitor/editTool/menus/createEmptyPlan.vue @@ -220,22 +220,22 @@ export default { jsonData = that.planConvert.importData(wb.Sheets[index], jsonData); } - if (that.$route.query.lineCode == '02' && !jsonData[0].downTrack && !jsonData[0].upTrack) { + // if (that.$route.query.lineCode == '02' && !jsonData[0].downTrack && !jsonData[0].upTrack) { + // that.loadingDig.close(); + // that.$message.warning(`运行图暂无默认上行折返轨或默认下行折返轨,请输入`); + // } else { + importRunPlan({ mapId: that.$route.params.mapId || that.$route.query.mapId || '02', runPlanList: jsonData }).then(response => { that.loadingDig.close(); - that.$message.warning(`运行图暂无默认上行折返轨或默认下行折返轨,请输入`); - } else { - importRunPlan({ mapId: that.$route.params.mapId || that.$route.query.mapId || '02', runPlanList: jsonData }).then(response => { - that.loadingDig.close(); - if (response && response.code == 200) { - that.$message.success(that.$t('tip.importOperationGraphSuccessfully')); - that.$emit('refresh'); + if (response && response.code == 200) { + that.$message.success(that.$t('tip.importOperationGraphSuccessfully')); + that.$emit('refresh'); // this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} }); - } - }).catch(error => { - that.loadingDig.close(); - that.$message.warning(`${that.$t('tip.importRunGraphFailed')} ${error.message}`); - }); - } + } + }).catch(error => { + that.loadingDig.close(); + that.$message.warning(`${that.$t('tip.importRunGraphFailed')} ${error.message}`); + }); + // } } catch (error) { that.loadingDig.close(); that.$message.warning(`${that.$t('tip.parseRunGraphFailed')} ${error.message}`); From dee76b4288f07c42b40f22385d367d1c3750f6c8 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 29 Oct 2020 18:37:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=A9=BA=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/fuzhou_01/planConvert.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jmapNew/theme/fuzhou_01/planConvert.js b/src/jmapNew/theme/fuzhou_01/planConvert.js index 39eb6ccc7..e20541a08 100644 --- a/src/jmapNew/theme/fuzhou_01/planConvert.js +++ b/src/jmapNew/theme/fuzhou_01/planConvert.js @@ -267,7 +267,13 @@ export default { } }); } - return JsonData; + const arr = []; + JsonData.forEach((item, i) => { + if (item.code) { + arr.push(item); + } + }); + return arr; }, /** 将后台数据解析成图表*/