File was renamed from src/views/project/plan/planRecord.vue |
| | |
| | | <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">新增</el-button> |
| | | <el-table :data="monthRecords" style="width: 100%"> |
| | | <!-- 表头 --> |
| | | <el-table-column prop="id" label="序号"></el-table-column> |
| | | <el-table-column prop="projectName" label="项目名称"></el-table-column> |
| | | <el-table-column prop="projectCode" label="项目代码"></el-table-column> |
| | | <el-table-column label="计划期"> |
| | | <el-table-column prop="id" label="序号" align="center"></el-table-column> |
| | | <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> |
| | | <el-table-column prop="projectCode" label="项目代码" align="center"></el-table-column> |
| | | <el-table-column label="计划期" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span> |
| | | {{ scope.row.planTime }}{{ scope.row.planTimeFlag === 0 ? '月度' : scope.row.planTimeFlag === 1 ? '季度' : '年度' }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间"></el-table-column> |
| | | <el-table-column fixed="right" label="操作"> |
| | | <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0">编辑上报</el-button> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">新增</el-button> |
| | | <el-table :data="seasonRecords" style="width: 100%"> |
| | | <!-- 表头 --> |
| | | <el-table-column prop="id" label="序号"></el-table-column> |
| | | <el-table-column prop="projectName" label="项目名称"></el-table-column> |
| | | <el-table-column prop="projectCode" label="项目代码"></el-table-column> |
| | | <el-table-column label="计划期"> |
| | | <el-table-column prop="id" label="序号" align="center"></el-table-column> |
| | | <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> |
| | | <el-table-column prop="projectCode" label="项目代码" align="center"></el-table-column> |
| | | <el-table-column label="计划期" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span> |
| | | {{ scope.row.planTime }}{{ scope.row.planTimeFlag === 0 ? '月度' : scope.row.planTimeFlag === 1 ? '季度' : '年度' }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间"></el-table-column> |
| | | <el-table-column fixed="right" label="操作"> |
| | | <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0">编辑上报</el-button> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">新增</el-button> |
| | | <el-table :data="yearRecords" style="width: 100%"> |
| | | <!-- 表头 --> |
| | | <el-table-column prop="id" label="序号"></el-table-column> |
| | | <el-table-column prop="projectName" label="项目名称"></el-table-column> |
| | | <el-table-column prop="projectCode" label="项目代码"></el-table-column> |
| | | <el-table-column label="计划期"> |
| | | <el-table-column prop="id" label="序号" align="center"></el-table-column> |
| | | <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> |
| | | <el-table-column prop="projectCode" label="项目代码" align="center"></el-table-column> |
| | | <el-table-column label="计划期" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span> |
| | | {{ scope.row.planTime }}{{ scope.row.planTimeFlag === 0 ? '月度' : scope.row.planTimeFlag === 1 ? '季度' : '年度' }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间"></el-table-column> |
| | | <el-table-column fixed="right" label="操作"> |
| | | <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0">编辑上报</el-button> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {addRecord, getPlanRecordList} from "@/api/project/plan/index"; |
| | | import {addRecord, getPlanRecordList} from "@/api/projectPlan/index"; |
| | | |
| | | export default { |
| | | // name: "planRecord", |
| | | name: "planRecord", |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | // 接收传递过来的项目计划数据 |
| | | planInfoData: {}, |
| | | // 月度计划数据 |
| | |
| | | seasonRecords: [], |
| | | // 年度计划数据 |
| | | yearRecords: [], |
| | | // 新增计划 |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | // 从查询参数中获取数据 |
| | | if (this.$route.query.data) { |
| | | this.planInfoData = JSON.parse(this.$route.query.data); |
| | | console.log(JSON.parse(this.$route.query.data)) |
| | | this.getPlanRecordData(this.planInfoData.id); |
| | | } |
| | | }, |
| | | // 获取项目计划记录数据 |
| | | getPlanRecordData(id) { |
| | | this.loading = true; |
| | | getPlanRecordList(id).then(res => { |
| | | this.monthRecords = res.data.monthRecords; |
| | | // 获取季度计划数据 |
| | | this.seasonRecords = res.data.seasonRecords; |
| | | // 获取年度计划数据 |
| | | this.yearRecords = res.data.yearRecords; |
| | | console.log(this.monthRecords); |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | // 新增月度计划记录 |
| | |
| | | this.search(); |
| | | }); |
| | | }, |
| | | /** 查看项目计划项 */ |
| | | handlePlanInfo(row) { |
| | | this.$router.push({ |
| | | path: '/projectPlan/planInfo', |
| | | query: { |
| | | data: JSON.stringify(row), |
| | | planInfoData: this.planInfoData |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | created() { |