| | |
| | | import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index"; |
| | | |
| | | export default { |
| | | name: "PlanInfo", |
| | | name: "planInfo", |
| | | data() { |
| | | return { |
| | | loading: true, |
| | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.getProjectInfoData(); |
| | | }, |
| | | methods: { |
| | | // 页面加载 |
| | | search() { |
| | |
| | | getProjectInfoData() { |
| | | // 从查询参数中获取数据 |
| | | this.projectInfoData = this.$route.query.projectInfoData |
| | | this.planInfoData = this.$route.query.data |
| | | this.planInfoData.id = this.$route.query.id; |
| | | this.planInfoData.projectName = this.$route.query.projectName; |
| | | this.planInfoData.projectCode = this.$route.query.projectCode; |
| | | this.planInfoData.planTime = this.$route.query.planTime; |
| | | this.planInfoData.planTimeFlag = this.$route.query.planTimeFlag; |
| | | this.planInfoData.managerFlag = this.$route.query.managerFlag; |
| | | this.search(); |
| | | }, |
| | | // 获取项目计划项 |
| | |
| | | // 保存当前行数据 |
| | | handleSave(index) { |
| | | this.tableData[index].projectPlanRecordId = this.projectInfoData.id; |
| | | savePlanInfo(this.tableData[index]).then(response => { |
| | | this.search(); |
| | | savePlanInfo(this.tableData[index], this.planInfoData.id).then(response => { |
| | | this.$message.success('保存成功'); |
| | | }); |
| | | }, |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | created() { |
| | | this.getProjectInfoData(); |
| | | }, |
| | | }; |
| | | </script> |