dedsudiyu 2 lat temu
rodzic
commit
b5927f4230
1 zmienionych plików z 10 dodań i 8 usunięć
  1. 10 8
      src/views/safetyCheck/worktable/toDoListBox.vue

+ 10 - 8
src/views/safetyCheck/worktable/toDoListBox.vue

@@ -28,7 +28,7 @@
           <p class="name-p">{{item.subjectName}}-{{item.roomNumber}}</p>
           <p class="name-p">{{item.subjectName}}-{{item.roomNumber}}</p>
           <p class="type-p" v-if="item.isOverdue == 1">已逾期</p>
           <p class="type-p" v-if="item.isOverdue == 1">已逾期</p>
           <p class="null-p"></p>
           <p class="null-p"></p>
-          <img v-if="item.isAttachment == 1" @click="lookDocumentListButton(true,item)"
+          <img v-if="item.isAttachment == 1" @click="lookDocumentListButton(1,item)"
                src="@/assets/ZDimages/safetyCheck/icon_gzt_bg.png">
                src="@/assets/ZDimages/safetyCheck/icon_gzt_bg.png">
         </div>
         </div>
         <div class="for-title-box">
         <div class="for-title-box">
@@ -104,7 +104,7 @@
       //开始滚动
       //开始滚动
       tableTimerFun() {
       tableTimerFun() {
         if(this.tableList[3]){
         if(this.tableList[3]){
-          this.tableTimer = setInterval(() => {
+          this.tableTimer = window.setInterval(() => {
             let csrollTop = this.$refs.scrollDiv.scrollTop
             let csrollTop = this.$refs.scrollDiv.scrollTop
             let maxHeight = this.$refs.scrollDiv.scrollHeight - this.$refs.scrollDiv.offsetHeight
             let maxHeight = this.$refs.scrollDiv.scrollHeight - this.$refs.scrollDiv.offsetHeight
             if (csrollTop >= maxHeight) {
             if (csrollTop >= maxHeight) {
@@ -117,7 +117,7 @@
       },
       },
       //停止滚动
       //停止滚动
       tableTimerOff(){
       tableTimerOff(){
-        clearInterval(this.tableTimer)
+        window.clearInterval(this.tableTimer)
       },
       },
       //跳转
       //跳转
       goPage(item){
       goPage(item){
@@ -190,7 +190,7 @@
       //查看多个文档
       //查看多个文档
       lookDocumentListButton(type,item){
       lookDocumentListButton(type,item){
         if(type==1){
         if(type==1){
-          getFindByCheckPlanId({checkPlanId:item.id}).then(response => {
+          getFindByCheckPlanId({checkPlanId:item.checkPlanId}).then(response => {
             let list = [];
             let list = [];
             for(let i=0;i<response.data.length;i++){
             for(let i=0;i<response.data.length;i++){
               let obj = {
               let obj = {
@@ -234,13 +234,15 @@
     },
     },
     beforeDestroy() {
     beforeDestroy() {
       //清除定时器
       //清除定时器
-      clearInterval(this.tableTimer);
-      console.log("beforeDestroy");
+      window.clearInterval(this.tableTimer);
+      this.$set(this,'tableTimer',null);
+      this.$set(this,'tableList',[]);
     },
     },
     destroyed() {
     destroyed() {
       //清除定时器
       //清除定时器
-      clearInterval(this.tableTimer);
-      console.log("destroyed");
+      window.clearInterval(this.tableTimer);
+      this.$set(this,'tableTimer',null);
+      this.$set(this,'tableList',[]);
     }
     }
   }
   }
 </script>
 </script>