fuliqi
2024-11-29 bf51119aa5735d6021c737864e93cf56dc1cf40d
src/views/projectManage/progress/progressRecord.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">
@@ -180,7 +180,7 @@
import progressRecord from "./progressRecord.vue";
export default {
  name: "progressRecord",
  name: "ProgressRecord",
  computed: {
    progressRecord() {
      return progressRecord
@@ -189,7 +189,7 @@
  data() {
    return {
      // 接收传递过来的项目计划数据
      planRecordData: {},
      projectInfoData: {},
      monthProgress: [],
      seasonProgress: [],
      yearProgress: [],
@@ -215,15 +215,15 @@
  },
  methods: {
    search() {
      this.getPlanRecordData()
      this.getProjectProgressForm(this.planRecordData.id);
      this.getProjectInfoData()
      this.getProjectProgressForm(this.projectInfoData.id);
    },
    // 获取传递过来的项目计划详情
    getPlanRecordData() {
    getProjectInfoData() {
      // 从查询参数中获取数据
      if (this.$route.query.data) {
        this.planRecordData = JSON.parse(this.$route.query.data);
        this.getProgressInfoList(this.planRecordData.id);
        this.projectInfoData = JSON.parse(this.$route.query.data);
        this.getProgressInfoList(this.projectInfoData.id);
      }
    },
    getProjectProgressForm(id) {
@@ -269,7 +269,7 @@
    },
    // 保存
    handleSave() {
      this.projectProgressForm.projectReportId = this.planRecordData.id;
      this.projectProgressForm.projectReportId = this.projectInfoData.id;
      // 判断文件不为空
        saveProjectProgressFileLists(this.projectProgressForm).then(res => {
          this.$message.success('保存成功');