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) {