1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<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-main>
        <el-card shadow="hover">
          <el-row :gutter="20">
            <el-form :model="form" label-width="80px">
              <el-row>
                <el-col :span="6">
                  <el-form-item label="报告期:">
                    <el-input v-model="form.reportPeriod"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="计划事项:">
                    <el-input v-model="form.planItem"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="计划时间:">
                    <el-date-picker type="daterange" placeholder="选择日期范围" v-model="form.planTimeRange" style="width: 100%;"></el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="实际完成时间:">
                    <el-date-picker type="daterange" placeholder="选择日期范围" v-model="form.actualCompletionTimeRange" style="width: 100%;"></el-date-picker>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="6">
                  <el-form-item label="进度情况:">
                    <el-input type="textarea" v-model="form.progressSituation"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="工程进度附件:">
                    <el-upload
                      class="upload-demo"
                      action="/api/upload"
                      :on-preview="handlePreview"
                      :on-remove="handleRemove"
                      :file-list="fileList"
                      list-type="picture-card"
                      multiple
                      :auto-upload="false"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row>
                <el-col :span="6">
                  <el-form-item label="截止本报告完成投资:">
                    <el-input v-model="form.investmentAmount"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="上级审核:">
                    <el-select v-model="form.superiorReview" placeholder="请选择">
                      <el-option label="同意" value="agree"></el-option>
                      <el-option label="不同意" value="disagree"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="上级批复:">
                    <el-input v-model="form.superiorApproval"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6">
                  <el-form-item label="主管部门审核:">
                    <el-input v-model="form.departmentReview"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <div slot="footer" class="dialog-footer">
                <el-button @click="reset">重置</el-button>
                <el-button type="primary" @click="submit">保存</el-button>
              </div>
            </el-form>
          </el-row>
        </el-card>
      </el-main>
    </el-container>
  </div>
</template>
 
<script>
import { getProgressInfoList } from "@/api/projectManage/progress/index";
 
export default {
  name: "progressReport",
  data() {
    return {
      // 接收传递过来的项目计划数据
      planRecordData: {},
      projectPlanInfo:{},
      monthProgress: [],
      seasonProgress: [],
      yearProgress: [],
      activeTab: "month", // 默认显示月度计划
 
 
      form: {
        reportPeriod: '',
        planItem: '',
        planTimeRange: [],
        actualCompletionTimeRange: [],
        progressSituation: '',
        investmentAmount: '',
        superiorReview: '',
        superiorApproval: '',
        departmentReview: ''
      },
      fileList: []
    }
  },
  methods: {
    // 页面加载
    search() {
      this.getPlanRecordData(this.planRecordData.id);
    },
    // 获取传递过来的项目计划详情
    getData() {
      // 从查询参数中获取数据
      this.planRecordData = this.$route.query.data
      this.projectPlanInfo = this.$route.query.projectPlanInfo;
    },
    // 获取项目进度计划项
    getProgressInfoList(id) {
      getProgressInfoList(id).then(res => {
        this.monthProgress = res.data.monthProgress;
        this.seasonProgress = res.data.seasonProgress;
        this.yearProgress = res.data.yearProgress;
      })
    },
 
 
 
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePreview(file) {
      console.log(file);
    },
    reset() {
      this.form = {};
      this.fileList = [];
    },
    submit() {
      // 提交表单的逻辑
    }
  },
  created() {
    this.getData();
  },
};
</script>
 
<style scoped>
.header-title {
  font-size: 24px; /* 根据需要调整字体大小 */
  text-align: center; /* 居中对齐 */
  line-height: 64px; /* 如果需要与 header 高度对齐 */
}
</style>