luohairen
2024-12-24 92b6d45b315ce11eb6c26889d5a4b6feb71348cc
src/views/projectEngineering/projectLibrary/component/investmentFunds.vue
@@ -197,6 +197,7 @@
  editProjectInvestmentFunding,
  getProjectInvestmentFundingById
} from "@/api/projectEngineering/projectInvestmentFunding";
import {editProject} from "@/api/projectEngineering/projectInfo";
export default {
  name: 'InvestmentFundsForm',
@@ -285,10 +286,20 @@
    if (this.$route.query.projectId&& !parsedInvestmentFundsForm) {
      this.getInvestmentFunds();
    }
    this.investmentFundsForm.projectId = this.projectForm.id;
  },
  beforeDestroy() {
    if(Object.keys(this.investmentFundsForm).length !==0) localStorage.setItem("investmentFundsForm", JSON.stringify(this.investmentFundsForm));
  },
  watch: {
    investmentFundsForm: {
      deep: true,
      handler(newVal) {
        this.$emit('investmentFundsForm', newVal)
      }
    }
  }
}
</script>