| | |
| | | }) |
| | | } |
| | | |
| | | // 获取主管标识 |
| | | export function getManagerFlag(recordId) { |
| | | return request({ |
| | | url: '/project/info/getManagerFlag/'+ recordId, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 查询计划记录列表 |
| | | export function getPlanRecordList(id) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | |
| | | // 查询项目计划记录详细 |
| | | export function getRecord(id) { |
| | | return request({ |
| | | url: '/plan/record/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 新增项目计划记录 |
| | | export function addRecord(data) { |
| | | return request({ |
| | | url: '/api/project-plan-record', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 修改项目计划记录 |
| | | export function updateRecord(data) { |
| | | return request({ |
| | | url: '/plan/record', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">项目名称:{{ planRecordData.projectName }} {{ planRecordData.planTimeFlag === 0 ? '(月度计划)' : planRecordData.planTimeFlag === 1 ? '(季度计划)' : '(年度计划)' }}</el-header> |
| | | <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">项目代码:{{ planRecordData.projectCode }}</h4> |
| | | <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">项目名称:{{ projectInfoData.projectName }} {{ projectInfoData.planTimeFlag === 0 ? '(月度计划)' : projectInfoData.planTimeFlag === 1 ? '(季度计划)' : '(年度计划)' }}</el-header> |
| | | <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">项目代码:{{ projectInfoData.projectCode }}</h4> |
| | | <el-main> |
| | | <el-card shadow="hover"> |
| | | <el-row :gutter="20"> |
| | |
| | | <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :label="planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> |
| | | <el-table-column :label="projectInfoData.planTimeFlag === 0 ? '月度' : projectInfoData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' }}</span> |
| | | <span>{{ projectInfoData.planTime }}{{ projectInfoData.planTimeFlag === 0 ? '月度' : projectInfoData.planTimeFlag === 1 ? '季度' : '年度' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center"> |
| | |
| | | return { |
| | | loading: true, |
| | | // 接收传递过来的项目计划数据 |
| | | planRecordData: {}, |
| | | projectInfoData: {}, |
| | | planInfoData: {}, |
| | | tableData: [ |
| | | { |
| | |
| | | this.getPlanInfoData(this.planInfoData.id); |
| | | }, |
| | | // 获取传递过来的项目计划详情 |
| | | getPlanRecordData() { |
| | | getProjectInfoData() { |
| | | // 从查询参数中获取数据 |
| | | this.planRecordData = this.$route.query.planRecordData |
| | | this.projectInfoData = this.$route.query.projectInfoData |
| | | this.planInfoData = this.$route.query.data |
| | | this.search(); |
| | | }, |
| | |
| | | }, |
| | | // 保存当前行数据 |
| | | handleSave(index) { |
| | | this.tableData[index].projectPlanRecordId = this.planRecordData.id; |
| | | this.tableData[index].projectPlanRecordId = this.projectInfoData.id; |
| | | savePlanInfo(this.tableData[index]).then(response => { |
| | | this.search(); |
| | | this.$message.success('保存成功'); |
| | |
| | | this.$router.push({ |
| | | path: '/projectManage/planRecord', |
| | | query: { |
| | | data: this.planRecordData |
| | | data: this.projectInfoData |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | created() { |
| | | this.getPlanRecordData(); |
| | | this.getProjectInfoData(); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | loading: true, |
| | | // 接收传递过来的项目计划数据 |
| | | planRecordData: {}, |
| | | planInfoData: {}, |
| | | projectInfoData: {}, |
| | | // 计划项数据 |
| | | tableData: [ |
| | | { |
| | |
| | | getPlanRecordData() { |
| | | // 从查询参数中获取数据 |
| | | this.planRecordData = this.$route.query.data |
| | | this.planInfoData = this.$route.query.planInfoData |
| | | this.projectInfoData = this.$route.query.projectInfoData |
| | | this.search(); |
| | | }, |
| | | // 获取项目计划项 |
| | |
| | | this.$router.push({ |
| | | path: '/projectManage/planRecord', |
| | | query: { |
| | | data: this.planRecordData |
| | | data: this.projectInfoData |
| | | } |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">项目名称:{{ planRecordData.projectName }}</el-header> |
| | | <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">项目代码:{{ planRecordData.projectCode }}</h4> |
| | | <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">项目名称:{{ projectInfoData.projectName }}</el-header> |
| | | <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">项目代码:{{ projectInfoData.projectCode }}</h4> |
| | | <el-main> |
| | | <el-card shadow="hover"> |
| | | <el-row :gutter="20"> |
| | |
| | | data() { |
| | | return { |
| | | // 接收传递过来的项目计划数据 |
| | | planRecordData: {}, |
| | | projectInfoData: {}, |
| | | // 月度计划数据 |
| | | monthRecords: [], |
| | | // 季度计划数据 |
| | |
| | | methods: { |
| | | // 页面加载 |
| | | search() { |
| | | this.getPlanRecordData(this.planRecordData.id); |
| | | this.getPlanRecordData(this.projectInfoData.id); |
| | | }, |
| | | // 获取传递过来的项目计划详情 |
| | | getPlanInfoData() { |
| | | getProjectInfoData() { |
| | | // 从查询参数中获取数据 |
| | | this.planRecordData = this.$route.query.data |
| | | this.getPlanRecordData(this.planRecordData.id); |
| | | this.projectInfoData = this.$route.query.data |
| | | this.getPlanRecordData(this.projectInfoData.id); |
| | | }, |
| | | // 获取项目计划记录数据 |
| | | getPlanRecordData(id) { |
| | |
| | | handleAddMonthPlan() { |
| | | let planRecordData = { |
| | | id: undefined, |
| | | projectInfoId: this.planRecordData.id, |
| | | projectInfoId: this.projectInfoData.id, |
| | | planTimeFlag: 0 |
| | | } |
| | | // 判断月度计划是否为空 |
| | | if (this.monthRecords.length === 0){ |
| | | if (this.monthRecords.length === 0) { |
| | | planRecordData.id = 0; |
| | | }else { |
| | | } else { |
| | | planRecordData.id = this.monthRecords[this.monthRecords.length - 1].id; |
| | | } |
| | | // 新增一行记录 |
| | |
| | | handleAddSeasonPlan() { |
| | | let planRecordData = { |
| | | id: undefined, |
| | | projectInfoId: this.planRecordData.id, |
| | | projectInfoId: this.projectInfoData.id, |
| | | planTimeFlag: 1 |
| | | } |
| | | // 判断季度计划是否为空 |
| | | if (this.seasonRecords.length === 0){ |
| | | if (this.seasonRecords.length === 0) { |
| | | planRecordData.id = 0; |
| | | }else { |
| | | } else { |
| | | planRecordData.id = this.seasonRecords[this.seasonRecords.length - 1].id; |
| | | } |
| | | // 新增一行记录 |
| | |
| | | handleAddYearPlan() { |
| | | let planRecordData = { |
| | | id: undefined, |
| | | projectInfoId: this.planRecordData.id, |
| | | projectInfoId: this.projectInfoData.id, |
| | | planTimeFlag: 2 |
| | | } |
| | | // 判断年度计划是否为空 |
| | | if (this.yearRecords.length === 0){ |
| | | if (this.yearRecords.length === 0) { |
| | | planRecordData.id = 0; |
| | | }else { |
| | | } else { |
| | | planRecordData.id = this.yearRecords[this.yearRecords.length - 1].id; |
| | | } |
| | | // 新增一行记录 |
| | |
| | | path: '/projectManage/planInfo', |
| | | query: { |
| | | data: row, |
| | | planRecordData: this.planRecordData |
| | | projectInfoData: this.projectInfoData |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | // 查看项目计划项 |
| | | handleCheckPlanInfo(row) { |
| | | console.log(this.projectInfoData); |
| | | this.$router.push({ |
| | | path: '/projectManage/planInfoCheck', |
| | | query: { |
| | | data: row, |
| | | planRecordData: this.planRecordData |
| | | projectInfoData: this.projectInfoData |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | created() { |
| | | this.getPlanInfoData(); |
| | | this.getProjectInfoData(); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">项目名称:{{ planRecordData.projectName }}</el-header> |
| | | <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">项目代码:{{ planRecordData.projectCode }}</h4> |
| | | <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">项目名称:{{ projectInfoData.projectName }}</el-header> |
| | | <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">项目代码:{{ projectInfoData.projectCode }}</h4> |
| | | <el-main> |
| | | <el-card shadow="hover"> |
| | | <el-row :gutter="20"> |
| | |
| | | data() { |
| | | return { |
| | | // 接收传递过来的项目计划数据 |
| | | planRecordData: {}, |
| | | projectInfoData: {}, |
| | | monthProgress: [], |
| | | seasonProgress: [], |
| | | yearProgress: [], |
| | |
| | | }, |
| | | methods: { |
| | | search() { |
| | | this.getPlanRecordData() |
| | | this.getProjectProgressForm(this.planRecordData.id); |
| | | this.getProjectInfoData() |
| | | this.getProjectProgressForm(this.projectInfoData.id); |
| | | }, |
| | | // 获取传递过来的项目计划详情 |
| | | getPlanRecordData() { |
| | | getProjectInfoData() { |
| | | // 从查询参数中获取数据 |
| | | if (this.$route.query.data) { |
| | | this.planRecordData = JSON.parse(this.$route.query.data); |
| | | this.getProgressInfoList(this.planRecordData.id); |
| | | this.projectInfoData = JSON.parse(this.$route.query.data); |
| | | this.getProgressInfoList(this.projectInfoData.id); |
| | | } |
| | | }, |
| | | getProjectProgressForm(id) { |
| | |
| | | }, |
| | | // 保存 |
| | | handleSave() { |
| | | this.projectProgressForm.projectReportId = this.planRecordData.id; |
| | | this.projectProgressForm.projectReportId = this.projectInfoData.id; |
| | | // 判断文件不为空 |
| | | saveProjectProgressFileLists(this.projectProgressForm).then(res => { |
| | | this.$message.success('保存成功'); |