luohairen
2024-11-26 17ce03611f5a845a7a867f96965a587fb63ae71a
src/views/projectPlan/planRecord.vue
@@ -25,7 +25,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>
@@ -49,7 +50,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>
@@ -73,7 +75,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 +89,7 @@
</template>
<script>
import {addRecord, getPlanRecordList} from "@/api/projectPlan/index";
import {addRecord, getPlanRecordList, deletePlanRecord} from "@/api/projectPlan/index";
export default {
  name: "planRecord",
@@ -179,7 +182,7 @@
        this.search();
      });
    },
    /** 查看项目计划项 */
    /** 修改项目计划项 */
    handlePlanInfo(row) {
      this.$router.push({
        path: '/projectPlan/planInfo',
@@ -188,8 +191,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();