luohairen
2024-11-28 46e29a50eccda9f92fb2feeb18fa8a0ea4092587
src/views/projectManage/plan/planRecord.vue
@@ -1,8 +1,8 @@
<template>
  <div class="app-container">
    <el-container>
      <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">项目名称:{{ planRecordData.projectName }}</el-header>
      <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">项目代码:{{ planRecordData.projectCode }}</h4>
      <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">项目名称:{{ projectInfoData.projectName }}</el-header>
      <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">项目代码:{{ projectInfoData.projectCode }}</h4>
      <el-main>
        <el-card shadow="hover">
          <el-row :gutter="20">
@@ -102,7 +102,7 @@
  data() {
    return {
      // 接收传递过来的项目计划数据
      planRecordData: {},
      projectInfoData: {},
      // 月度计划数据
      monthRecords: [],
      // 季度计划数据
@@ -114,13 +114,13 @@
  methods: {
    // 页面加载
    search() {
      this.getPlanRecordData(this.planRecordData.id);
      this.getPlanRecordData(this.projectInfoData.id);
    },
    // 获取传递过来的项目计划详情
    getPlanInfoData() {
    getProjectInfoData() {
      // 从查询参数中获取数据
      this.planRecordData = this.$route.query.data
      this.getPlanRecordData(this.planRecordData.id);
      this.projectInfoData = this.$route.query.data
      this.getPlanRecordData(this.projectInfoData.id);
    },
    // 获取项目计划记录数据
    getPlanRecordData(id) {
@@ -136,7 +136,7 @@
    handleAddMonthPlan() {
      let planRecordData = {
        id: undefined,
        projectInfoId: this.planRecordData.id,
        projectInfoId: this.projectInfoData.id,
        planTimeFlag: 0
      }
      // 判断月度计划是否为空
@@ -154,7 +154,7 @@
    handleAddSeasonPlan() {
      let planRecordData = {
        id: undefined,
        projectInfoId: this.planRecordData.id,
        projectInfoId: this.projectInfoData.id,
        planTimeFlag: 1
      }
      // 判断季度计划是否为空
@@ -172,7 +172,7 @@
    handleAddYearPlan() {
      let planRecordData = {
        id: undefined,
        projectInfoId: this.planRecordData.id,
        projectInfoId: this.projectInfoData.id,
        planTimeFlag: 2
      }
      // 判断年度计划是否为空
@@ -192,7 +192,7 @@
        path: '/projectManage/planInfo',
        query: {
          data: row,
          planRecordData: this.planRecordData
          projectInfoData: this.projectInfoData
        }
      })
    },
@@ -204,17 +204,18 @@
    },
    // 查看项目计划项
    handleCheckPlanInfo(row) {
      console.log(this.projectInfoData);
      this.$router.push({
        path: '/projectManage/planInfoCheck',
        query: {
          data: row,
          planRecordData: this.planRecordData
          projectInfoData: this.projectInfoData
        }
      })
    }
  },
  created() {
    this.getPlanInfoData();
    this.getProjectInfoData();
  },
};
</script>