bug
luohairen
2024-11-26 4c261f55500e6c877ce1c414d9688e35845bfcd2
bug
3个文件已修改
104 ■■■■ 已修改文件
src/views/projectPlan/planInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectPlan/planInfoCheck.vue 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectPlan/planRecord.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectPlan/planInfo.vue
@@ -132,7 +132,7 @@
    // 上报数据
    handleSubmit() {
      // 遍历tableData,获得值不为空字符串的行
      const validList = this.tableData.filter(item => item.title !== '' && item.startTime !== '' && item.endTime !== '');
      const validList = this.tableData.filter(item => item.title !== '' || item.startTime !== '' || item.endTime !== '');
      this.addData = {
        projectPlanRecordId: this.planRecordData.id,
        actualInvest: this.actualInvest,
src/views/projectPlan/planInfoCheck.vue
@@ -7,6 +7,7 @@
        <el-card shadow="hover">
          <el-row :gutter="20">
            <el-col :span="24" class="mb-4">
              <!--项目计划项-->
              <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
                <el-table-column prop="index" label="序号" width="50" align="center">
                  <template #default="scope">
@@ -20,12 +21,12 @@
                </el-table-column>
                <el-table-column prop="startTime" label="计划开始时间" width="160" align="center">
                  <template #default="scope">
                    <el-date-picker v-model="scope.row.startTime" type="date" placeholder="选择日期" size="small" style="width: 130px" />
                    <el-date-picker v-model="scope.row.startTime" type="date" placeholder="选择日期" size="small" style="width: 130px" disabled/>
                  </template>
                </el-table-column>
                <el-table-column prop="endTime" label="计划完成时间" width="160" align="center">
                  <template #default="scope">
                    <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px" />
                    <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px" disabled/>
                  </template>
                </el-table-column>
                <el-table-column :label="planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center">
@@ -37,7 +38,6 @@
                  <template #default="scope">
                    <el-button size="small" @click="handleDelay(scope.$index)">延期</el-button>
                    <el-button size="small" type="danger" @click="handleReset(scope.$index)">重置</el-button>
                    <el-button size="small" type="danger" @click="handleDelete(scope.$index)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
@@ -54,6 +54,60 @@
                  @input="handleInput">
                </el-input>
              </div>
              <!--上级批复-->
              <div style="margin-bottom: 10px; margin-top: 40px;">
                <span style="font-size: 20px; font-weight: bold;">上级批复</span>
              </div>
              <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
                <el-table-column prop="index" label="序号" width="50" align="center">
                  <template #default="scope">
                    {{ scope.$index + 1 }}
                  </template>
                </el-table-column>
                <el-table-column prop="taskName" label="事项名称" width="200" align="center" />
                <el-table-column prop="startTime" label="上级审核" width="100" align="center" />
                <el-table-column prop="startTime" label="批复内容" width="160" align="center" />
                <el-table-column prop="endTime" label="批复回复" width="160" align="center">
                  <template #default="scope">
                    <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" />
                  </template>
                </el-table-column>
                <el-table-column prop="startTime" label="主管部门审核" width="100" align="center" />
                <el-table-column prop="startTime" label="批复内容" width="160" align="center" />
                <el-table-column prop="endTime" label="批复回复" width="160" align="center">
                  <template #default="scope">
                    <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" />
                  </template>
                </el-table-column>
                <el-table-column fixed="right" label="操作" align="center">
                  <template #default="scope">
                    <el-button size="small" @click="handleDelay(scope.$index)">回复</el-button>
                    <el-button size="small" type="danger" @click="handleReset(scope.$index)">重置</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <!--计划日志-->
              <div style="margin-bottom: 10px; margin-top: 40px;">
                <span style="font-size: 20px; font-weight: bold;">计划日志</span>
              </div>
              <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px">
                <el-table-column prop="index" label="序号" width="50" align="center">
                  <template #default="scope">
                    {{ scope.$index + 1 }}
                  </template>
                </el-table-column>
                <el-table-column prop="taskName" label="事项名称" width="200" align="center" />
                <el-table-column prop="startTime" label="上级审核" width="100" align="center" />
                <el-table-column prop="startTime" label="批复内容" width="160" align="center" />
                <el-table-column prop="endTime" label="批复回复" width="160" align="center" />
                <el-table-column prop="startTime" label="主管部门审核" width="100" align="center" />
                <el-table-column prop="startTime" label="批复内容" width="160" align="center" />
                <el-table-column prop="endTime" label="批复回复" width="160" align="center" />
                <el-table-column fixed="right" label="时间" align="center" />
              </el-table>
            </el-col>
          </el-row>
        </el-card>
@@ -86,7 +140,7 @@
      addData: {
        projectPlanRecordId: '',
        actualInvest: '',
        addList:[]
        addList: []
      }
    }
  },
@@ -94,7 +148,9 @@
  methods: {
    // 页面加载
    search() {
      this.getPlanInfoData(this.planRecordData.id);
      this.getPlanInfoData(this.planRecordData.id); // 获取项目计划项
      this.getDepartmentApproval(this.planRecordData.id); // 获取上级批复
      //this.getPlanLog(); // 获取计划日志
    },
    // 获取传递过来的项目计划详情
    getPlanRecordData() {
@@ -109,17 +165,21 @@
    getPlanInfoData(id) {
      getPlanInfoData(id).then(response => {
        this.actualInvest = response.data.actualInvest;
        if (response.data.list.length === 0){
          this.tableData = [{ title: '', startTime: '', endTime: '' }];
        }else {
        if (response.data.list.length === 0) {
          this.tableData = [{title: '', startTime: '', endTime: ''}];
        } else {
          this.tableData = response.data.list;
        }
      });
    },
    // 删除一行数据
    handleDelete(index) {
      this.tableData.splice(index, 1);
    // 获取上级批复
    getDepartmentApproval(projectPlanRecordId) {
      getExamineRecord(projectPlanRecordId).then(response => {
        console.log(response.data)
      });
    },
    // 获取计划日志
    // 重置当前行数据
    handleReset(index) {
      this.tableData[index].title = '';
@@ -134,7 +194,7 @@
          data: JSON.stringify(planInfoData)
        }
      })
    }
    },
  },
  created() {
    this.getPlanRecordData();
src/views/projectPlan/planRecord.vue
@@ -7,8 +7,10 @@
        <el-card shadow="hover">
          <el-row :gutter="20">
            <el-col :span="24" class="mb-4">
              <span>月度计划</span>
              <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">新增</el-button>
              <div style="margin-bottom: 10px">
                <span style="font-size: 20px; font-weight: bold;">月度计划</span>
                <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">新增</el-button>
              </div>
              <el-table :data="monthRecords" style="width: 100%">
                <!-- 表头 -->
                <el-table-column prop="id" label="序号" align="center"></el-table-column>
@@ -32,8 +34,10 @@
              </el-table>
            </el-col>
            <el-col :span="24" class="mb-4" style="margin-top: 20px">
              <span>季度计划</span>
              <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">新增</el-button>
              <div style="margin-bottom: 10px">
                <span style="font-size: 20px; font-weight: bold;">季度计划</span>
                <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">新增</el-button>
              </div>
              <el-table  :data="seasonRecords" style="width: 100%">
                <!-- 表头 -->
                <el-table-column prop="id" label="序号" align="center"></el-table-column>
@@ -57,8 +61,10 @@
              </el-table>
            </el-col>
            <el-col :span="24" class="mb-4" style="margin-top: 20px">
              <span>年度计划</span>
              <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">新增</el-button>
              <div style="margin-bottom: 10px">
                <span style="font-size: 20px; font-weight: bold;">年度计划</span>
                <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">新增</el-button>
              </div>
              <el-table  :data="yearRecords" style="width: 100%">
                <!-- 表头 -->
                <el-table-column prop="id" label="序号" align="center"></el-table-column>