xiangpei
2024-12-25 0088d05b69bea0f7877a8ca1f1a0d850b20ee097
src/views/projectEngineering/projectLibrary/component/InvestInfo.vue
@@ -219,7 +219,6 @@
    // 尝试解析JSON数据
    const parsedInvestmentForm = investmentForm ? JSON.parse(investmentForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    console.log(parsedInvestmentForm)
    // 设置investment和projectForm对象
    if(parsedInvestmentForm) {
      this.investmentForm = parsedInvestmentForm;
@@ -236,6 +235,8 @@
      this.investmentForm.plannedStartDate = this.projectForm.planStartTime;
      this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime;
    }
    this.investmentForm.projectId = this.projectForm.id;
  },
  beforeDestroy() {
    if(Object.keys(this.investmentForm).length !==0) localStorage.setItem("investmentForm", JSON.stringify(this.investmentForm));
@@ -273,6 +274,14 @@
        }
      }
    },
  },
  watch: {
    investmentForm: {
      deep: true,
      handler(newVal) {
        this.$emit('investInfoForm', newVal)
      }
    }
  }
};