fuliqi
2024-11-28 64c13167e17fd04aec02a93c2bc1803050a097d1
src/views/projectEngineering/projectLibrary/component/investmentFunds.vue
@@ -269,16 +269,19 @@
      }
    },
  },
  created() {
  mounted() {
    this.investmentFundsForm.id = this.$route.query.projectId;
    const investmentFundsForm = Cookies.get("investmentFundsForm");
    const projectForm = Cookies.get("projectForm");
    const parsedInvestmentForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    this.investmentFundsForm = parsedInvestmentForm || {};
    this.projectForm = parsedProjectForm || {};
    if (parsedInvestmentForm) {
      this.investmentFundsForm = parsedInvestmentForm
    }
    if (parsedProjectForm){
      this.projectForm = parsedProjectForm
    }
    // 如果路由存在id且没有缓存,视为编辑或查看,调用api
    if (this.investmentFundsForm.projectId && !parsedInvestmentForm) {
      this.getInvestmentFunds();