xiangpei
2025-06-05 1fa6ac40e2ce16e1174cec9ca538d45eeb660fdc
src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue
@@ -164,6 +164,7 @@
  editProjectInvestmentPolicyCompliance,
  getProjectInvestmentPolicyComplianceById
} from "@/api/projectEngineering/projectInvestmentPolicyCompliance";
import {newline} from "js-beautify/js/src/javascript/acorn";
export default {
  name: 'PolicyComplianceForm',
@@ -176,6 +177,7 @@
  },
  data() {
    return {
      projectForm: {},
      policyInfoForm: {
        // id: '',
        // projectId: '',
@@ -219,6 +221,8 @@
      this.policyInfoForm.informationIsTrue= true;
      this.policyInfoForm.notBannedOrControlledProject = true;
    }
    this.policyInfoForm.projectId = this.projectForm.id;
  },
  beforeDestroy() {
    if(Object.keys(this.policyInfoForm).length !==0) localStorage.setItem("policyInfoForm", JSON.stringify(this.policyInfoForm));
@@ -229,7 +233,11 @@
        this.policyInfoForm = res.data;
        this.policyInfoForm.notBannedOrControlledProject = true
        this.policyInfoForm.informationIsTrue = true
        this.fileList =this.policyInfoForm.fileList
        if (this.policyInfoForm.fileList) {
          this.fileList = this.policyInfoForm.fileList
        } else {
          this.fileList = []
        }
      });
    },
    submit() {
@@ -259,6 +267,20 @@
      }
    }
  },
  watch: {
    policyInfoForm: {
      deep: true,
      handler(newVal) {
        this.$emit('policyInfoForm', newVal)
      }
    },
    fileList: {
      deep: true,
      handler(newVal) {
        this.policyInfoForm.fileList = newVal
      }
    }
  }
};
</script>