xiangpei
2024-12-25 0088d05b69bea0f7877a8ca1f1a0d850b20ee097
src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue
@@ -76,10 +76,26 @@
    if (this.$route.query.projectId && !parsedDocumentsInfoForm) {
      this.getDocumentsInfo();
    }
    this.documentsInfoForm.projectId = this.projectForm.id;
  },
  beforeDestroy() {
    if(Object.keys(this.documentsInfoForm).length !==0) localStorage.setItem("documentsInfoForm", JSON.stringify(this.documentsInfoForm));
  },
  watch: {
    documentsInfoForm:{
      deep: true,
      handler(newVal) {
        this.$emit('documentsInfoForm', newVal)
      }
    },
    fileList: {
      deep: true,
      handler(newVal) {
        this.documentsInfoForm.fileList = newVal
      }
    }
  }
};
</script>