From e748f683e7944ce208f83e2c1383a4ca43da0bf8 Mon Sep 17 00:00:00 2001 From: gongdi <410827992@qq.com> Date: Fri, 17 Sep 2021 14:09:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=B8=83=E5=B1=80=E6=97=B6?= =?UTF-8?q?=20=E6=A8=A1=E5=9D=97=E5=8A=A0=E8=BD=BDurl=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../moduleAndLayout/ModuleBase.vue | 19 +++++++++------- .../teacherEvaluation/teacherEvaluation.vue | 22 ++++++++++++++----- .../teacherEvaluationLarge.vue | 16 +++++++++----- .../teacherGroupEvaluation.vue | 16 +++++++++----- 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/ModuleBase.vue b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/ModuleBase.vue index 8f79758..e3822d0 100644 --- a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/ModuleBase.vue +++ b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/ModuleBase.vue @@ -60,14 +60,17 @@ }, computed: { getCom: function () { - return () => import(`@/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/${this.url}`) + let _url = this.url; + return () => import(`@/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/${_url}`) }, }, methods: { initLoadModule: function () { - let moduleTop = this.$refs.moduleRef ? this.$refs.moduleRef.offsetTop : 0; + let moduleContent = document.getElementById("moduleContent"); + let scrollTop = moduleContent.scrollTop; let initVisibleBottom = document.documentElement.clientHeight; - if (moduleTop < initVisibleBottom) { + let moduleTop = this.$refs.moduleRef ? this.$refs.moduleRef.offsetTop : initVisibleBottom; + if (moduleTop - scrollTop < initVisibleBottom) { //开始加载 this.url = this.getModuleUrl(); } @@ -123,11 +126,11 @@ }, watch: { moduleData: function (newData) { - this.type_id = newData.module_type_id - this.id = newData.module_id - this.module_size = newData.size - this.showIndex = newData.showIndex - this.url = this.getModuleUrl() + this.type_id = newData.module_type_id; + this.id = newData.module_id; + this.module_size = newData.size; + this.showIndex = newData.showIndex; + //this.url = this.getModuleUrl(); this.initLoadModule(); } } diff --git a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluation.vue b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluation.vue index 1789fdd..ae0bc3f 100644 --- a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluation.vue +++ b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluation.vue @@ -3,8 +3,8 @@
选择评价任务
- - + + {{ item.task_name }} @@ -155,6 +155,12 @@ xData.push(item); }) } +// else { +// if(echart != null){ +// echart.dispose(); +// } +// return +// } let legendData = []; let targetList = data.plandetailTable; if (targetList && targetList.length > 0) { @@ -432,10 +438,14 @@ }); }, taskChange: function (value) { - let taskId = value.substring(0, value.indexOf('-')); - if (parseInt(this.taskId) != parseInt(taskId)) { - this.taskId = taskId; - this.taskName = value.substring(value.indexOf('-') + 1); + if (parseInt(this.taskId) != parseInt(value)) { + this.taskId = value; + for(let i = 0,len = this.taskList.length;i < len;i ++){ + if(this.taskId == this.taskList[i].task_id){ + this.taskName = this.taskList[i].task_name; + break; + } + } this.buildEchart(); } }, diff --git a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluationLarge.vue b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluationLarge.vue index a88b0fe..96c1e40 100644 --- a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluationLarge.vue +++ b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherEvaluation/teacherEvaluationLarge.vue @@ -3,8 +3,8 @@
选择评价任务
- - + + {{ item.task_name }} @@ -404,10 +404,14 @@ }); }, taskChange: function (value) { - let taskId = value.substring(0, value.indexOf('-')); - if (parseInt(this.taskId) != parseInt(taskId)) { - this.taskId = taskId; - this.taskName = value.substring(value.indexOf('-') + 1); + if (parseInt(this.taskId) != parseInt(value)) { + this.taskId = value; + for(let i = 0,len = this.taskList.length;i < len;i ++){ + if(this.taskId == this.taskList[i].task_id){ + this.taskName = this.taskList[i].task_name; + break; + } + } this.buildEchart(); } }, diff --git a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherGroupEvaluation/teacherGroupEvaluation.vue b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherGroupEvaluation/teacherGroupEvaluation.vue index 07d8366..c697cb7 100644 --- a/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherGroupEvaluation/teacherGroupEvaluation.vue +++ b/src/views/superFusionPlatform/mainPlatform/moduleAndLayout/moduleCom/oa/teacherGroupEvaluation/teacherGroupEvaluation.vue @@ -59,8 +59,8 @@
评价任务
- - + + {{ item.task_name }} @@ -384,10 +384,14 @@ }) }, taskChange: function (value) { - let taskId = value.substring(0, value.indexOf('-')); - if (parseInt(this.taskId) != parseInt(taskId)) { - this.taskId = taskId; - this.taskName = value.substring(value.indexOf('-') + 1); + if (parseInt(this.taskId) != parseInt(value)) { + this.taskId = value; + for(let i = 0,len = this.taskList.length;i < len;i ++){ + if(this.taskId == this.taskList[i].task_id){ + this.taskName = this.taskList[i].task_name; + break; + } + } } }, flushDate: function (param) {