fuliqi
2024-11-26 eb7828a7adabe105449b6ef0d0188065b6218151
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>
@@ -25,14 +27,17 @@
                <el-table-column fixed="right" label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">编辑上报</el-button>
                    <el-button type="danger" size="small">删除</el-button>
                    <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">删除</el-button>
                    <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">查看</el-button>
                  </template>
                </el-table-column>
              </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>
@@ -49,14 +54,17 @@
                <el-table-column fixed="right" label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">编辑上报</el-button>
                    <el-button type="danger" size="small">删除</el-button>
                    <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">删除</el-button>
                    <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">查看</el-button>
                  </template>
                </el-table-column>
              </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>
@@ -73,7 +81,8 @@
                <el-table-column fixed="right" label="操作" align="center">
                  <template slot-scope="scope">
                    <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">编辑上报</el-button>
                    <el-button type="danger" size="small">删除</el-button>
                    <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">删除</el-button>
                    <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">查看</el-button>
                  </template>
                </el-table-column>
              </el-table>
@@ -86,7 +95,7 @@
</template>
<script>
import {addRecord, getPlanRecordList} from "@/api/projectPlan/index";
import {addRecord, getPlanRecordList, deletePlanRecord} from "@/api/projectPlan/index";
export default {
  name: "planRecord",
@@ -179,7 +188,7 @@
        this.search();
      });
    },
    /** 查看项目计划项 */
    /** 修改项目计划项 */
    handlePlanInfo(row) {
      this.$router.push({
        path: '/projectPlan/planInfo',
@@ -188,8 +197,22 @@
          planInfoData: this.planInfoData
        }
      })
    },
    // 删除项目计划记录
    handleDeletePlanRecord(id) {
      deletePlanRecord(id).then(res => {
        this.search();
      });
    },
    // 查看项目计划项
    handleCheckPlanInfo(row) {
      this.$router.push({
        path: '/projectPlan/planInfoCheck',
        query: {
          data: JSON.stringify(row),
        }
      })
    }
  },
  created() {
    this.getPlanInfoData();