luohairen
2024-12-11 ce20e86b57be436a42b65befe8e1da2283922030
src/views/projectManage/plan/planInfo.vue
@@ -77,7 +77,7 @@
import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index";
export default {
  name: "PlanInfo",
  name: "planInfo",
  data() {
    return {
      loading: true,
@@ -101,7 +101,9 @@
      }
    }
  },
  created() {
    this.getProjectInfoData();
  },
  methods: {
    // 页面加载
    search() {
@@ -110,8 +112,8 @@
    // 获取传递过来的项目计划详情
    getProjectInfoData() {
      // 从查询参数中获取数据
      this.projectInfoData = this.$route.query.projectInfoData
      this.planInfoData = this.$route.query.data
      this.projectInfoData = JSON.parse(this.$route.query.projectInfoData)
      this.planInfoData = JSON.parse(this.$route.query.data)
      this.search();
    },
    // 获取项目计划项
@@ -166,8 +168,7 @@
    // 保存当前行数据
    handleSave(index) {
      this.tableData[index].projectPlanRecordId = this.projectInfoData.id;
      savePlanInfo(this.tableData[index]).then(response => {
        this.search();
      savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => {
        this.$message.success('保存成功');
      });
    },
@@ -180,9 +181,6 @@
        }
      })
    }
  },
  created() {
    this.getProjectInfoData();
  },
};
</script>