src/api/projectManage/progress/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/projectPlan/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectManage/plan/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectManage/plan/planInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectManage/plan/planInfoCheck.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectManage/plan/planRecord.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectManage/progress/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectManage/progress/progressRecord.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/projectManage/progress/index.js
@@ -50,5 +50,21 @@ }) } // 保存竣工报告、情况说明附件 export function saveProjectProgressFileLists(data) { return request({ url: '/api/progress-plan/saveProjectProgressFileLists', method: 'post', data: data }) } export function getProjectProgressForm(id) { return request({ url: '/api/progress-plan/getProjectProgressForm/' + id, method: 'get' }) } src/api/projectPlan/index.js
@@ -9,6 +9,14 @@ }) } // 获取主管标识 export function getManagerFlag(recordId) { return request({ url: '/project/info/getManagerFlag/'+ recordId, method: 'get' }) } // 查询计划记录列表 export function getPlanRecordList(id) { return request({ @@ -17,28 +25,11 @@ }) } // 查询项目计划记录详细 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 }) } @@ -94,10 +85,19 @@ }) } // 回复上级批复 export function replyDepartmentApproval(data) { // 保存审批 export function saveExamine(data) { return request({ url: '/api/project-plan-examine-record/replyDepartmentApproval', url: '/api/project-plan-examine-record/saveExamine', method: 'post', data: data }) } // 回复审批 export function replyExamine(data) { return request({ url: '/api/project-plan-examine-record/replyExamine', method: 'post', data: data }) src/views/projectManage/plan/index.vue
@@ -189,12 +189,14 @@ </template> <script> import { getList, getRecord, delRecord, addRecord, updateRecord } from "@/api/projectPlan/index"; import {getList, getManagerFlag} from "@/api/projectPlan/index"; export default { name: "index", name: "Index", data() { return { // 主管标识 managerFlag: undefined, // 遮罩层 loading: true, // 选中数组 @@ -280,46 +282,6 @@ this.open = true; this.title = "添加项目计划记录"; }, /** 修改按钮操作 */ handleUpdate(row) { this.reset(); const id = row.id || this.ids getRecord(id).then(response => { this.form = response.data; this.open = true; this.title = "修改项目计划记录"; }); }, /** 提交按钮 */ submitForm() { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { updateRecord(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addRecord(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); }); } } }); }, /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; this.$modal.confirm('是否确认删除项目计划记录编号为"' + ids + '"的数据项?').then(function() { return delRecord(ids); }).then(() => { this.getList(); this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, /** 导出按钮操作 */ handleExport() { this.download('plan/record/export', { @@ -328,12 +290,18 @@ }, /** 查看项目计划记录 */ handlePlanRecord(row) { this.$router.push({ path: '/projectManage/planRecord', query: { data: row } // 获得主管标志 getManagerFlag(row.id).then(res => { this.managerFlag = res.data; row.managerFlag = this.managerFlag; this.$router.push({ path: '/projectManage/planRecord', query: { data: row } }) }) } } }; src/views/projectManage/plan/planInfo.vue
@@ -1,8 +1,8 @@ <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 class="header-title">项目名称:{{ planInfoData.projectName }} ({{planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '月度计划' : planInfoData.planTimeFlag === 1 ? '季度计划' : '年度计划' }})</el-header> <h4 style="text-align: center">项目代码:{{ planInfoData.projectCode }}</h4> <el-main> <el-card shadow="hover"> <el-row :gutter="20"> @@ -30,9 +30,9 @@ <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="planInfoData.planTimeFlag === 0 ? '月度' : planInfoData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> <template #default="scope"> <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' }}</span> <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '月度' : planInfoData.planTimeFlag === 1 ? '季度' : '年度' }}</span> </template> </el-table-column> <el-table-column fixed="right" label="操作" align="center"> @@ -72,12 +72,12 @@ import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index"; export default { name: "planInfo", name: "PlanInfo", data() { return { loading: true, // 接收传递过来的项目计划数据 planRecordData: {}, projectInfoData: {}, planInfoData: {}, tableData: [ { @@ -103,9 +103,9 @@ 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(); }, @@ -159,7 +159,7 @@ }, // 保存当前行数据 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('保存成功'); @@ -170,13 +170,13 @@ this.$router.push({ path: '/projectManage/planRecord', query: { data: this.planRecordData data: this.projectInfoData } }) } }, created() { this.getPlanRecordData(); this.getProjectInfoData(); }, }; </script> src/views/projectManage/plan/planInfoCheck.vue
@@ -1,8 +1,8 @@ <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 class="header-title">项目名称:{{ planInfoData.projectName }} ({{ planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '月度计划' : planInfoData.planTimeFlag === 1 ? '季度计划' : '年度计划' }})</el-header> <h4 style="text-align: center">项目代码:{{ planInfoData.projectCode }}</h4> <el-main> <el-card shadow="hover"> <el-row :gutter="20"> @@ -17,34 +17,36 @@ </el-table-column> <el-table-column prop="taskName" label="事项名称" width="500" align="center"> <template #default="scope"> <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" /> <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" readonly /> </template> </el-table-column> <el-table-column prop="startTime" label="计划开始时间" width="160" align="center"> <el-table-column prop="startTime" label="计划开始时间" width="160" align="center" > <template #default="scope"> <el-date-picker v-model="scope.row.startTime" type="date" placeholder="选择日期" size="small" style="width: 130px"/> <el-date-picker v-model="scope.row.startTime" type="date" placeholder="选择日期" size="small" style="width: 130px" :readonly="projectInfoData.managerFlag"/> </template> </el-table-column> <el-table-column prop="endTime" label="计划完成时间" width="160" align="center"> <el-table-column prop="endTime" label="计划完成时间" width="160" align="center" > <template #default="scope"> <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px"/> <el-date-picker v-model="scope.row.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px" :readonly="projectInfoData.managerFlag" /> </template> </el-table-column> <el-table-column :label="planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> <el-table-column :label="planInfoData.planTimeFlag === 0 ? '月度' : planInfoData.planTimeFlag === 1 ? '季度' : '年度' " align="center"> <template #default="scope"> <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' }}</span> <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '月度' : planInfoData.planTimeFlag === 1 ? '季度' : '年度' }}</span> </template> </el-table-column> <el-table-column fixed="right" label="操作" align="center"> <template #default="scope"> <el-button size="small" @click="handleDelay(scope.$index)">延期</el-button> <el-button size="small" type="danger" @click="handleReset(scope.$index)">重置</el-button> </template> </el-table-column> <div v-if="!projectInfoData.managerFlag"> <el-table-column fixed="right" label="操作" align="center"> <template #default="scope"> <el-button size="small" @click="handleDelay(scope.$index)">延期</el-button> <el-button size="small" type="danger" @click="handleReset(scope.$index)">重置</el-button> </template> </el-table-column> </div> </el-table> <div style="display: flex; align-items: center;"> <h1 style="margin: 0;"> 截止本计划进度完成投资(万元): 计划投资金额(万元): </h1> <el-input placeholder="请输入投资金额" @@ -52,7 +54,8 @@ v-model="actualInvest" clearable :type="number" @input="handleInput"> @input="handleInput" readonly> </el-input> </div> @@ -67,32 +70,55 @@ </template> </el-table-column> <el-table-column prop="title" label="事项名称" width="200" align="center" /> <el-table-column prop="departmentExamine" label="上级审核" width="100" align="center"> <template #default="scope"> <el-table-column prop="departmentExamine" label="上级审核" width="130" align="center"> <template #default="scope" v-if="!projectInfoData.managerFlag"> {{ scope.row.departmentExamine === 0 ? '同意' : scope.row.departmentExamine === 1 ? '驳回' : '未审核' }} </template> <template v-if="projectInfoData.managerFlag" #default="scope"> <el-select v-model="scope.row.departmentExamine" placeholder="请选择" size="small" clearable> <el-option label="同意" :value="0"></el-option> <el-option label="驳回" :value="1"></el-option> </el-select> </template> </el-table-column> <el-table-column prop="departmentApproval" label="批复内容" width="160" align="center" /> <el-table-column prop="departmentApproval" label="批复内容" width="160" align="center"> <template v-if="projectInfoData.managerFlag" #default="scope"> <el-input type="textarea" v-model="scope.row.departmentApproval" placeholder="请输入" rows="3" /> </template> </el-table-column> <el-table-column prop="departmentApprovalReply" label="批复回复" width="160" align="center"> <template #default="scope"> <template #default="scope" v-if="!projectInfoData.managerFlag"> <el-input type="textarea" v-model="scope.row.departmentApprovalReply" placeholder="请输入" rows="3" /> </template> </el-table-column> <el-table-column prop="manageExamine" label="主管部门审核" width="100" align="center" > <template #default="scope"> <el-table-column prop="manageExamine" label="主管部门审核" width="130" align="center" > <template #default="scope" v-if="!projectInfoData.managerFlag"> {{ scope.row.manageExamine === 0 ? '同意' : scope.row.manageExamine === 1 ? '驳回' : '未审核' }} </template> <template v-if="projectInfoData.managerFlag" #default="scope"> <el-select v-model="scope.row.manageExamine" placeholder="请选择" size="small" clearable> <el-option label="同意" :value="0"></el-option> <el-option label="驳回" :value="1"></el-option> </el-select> </template> </el-table-column> <el-table-column prop="manageApproval" label="批复内容" width="160" align="center" /> <el-table-column prop="manageApproval" label="批复内容" width="160" align="center"> <template v-if="projectInfoData.managerFlag" #default="scope"> <el-input type="textarea" v-model="scope.row.manageApproval" placeholder="请输入" rows="3" /> </template> </el-table-column> <el-table-column prop="manageApprovalReply" label="批复回复" width="160" align="center"> <template #default="scope"> <template #default="scope" v-if="!projectInfoData.managerFlag"> <el-input type="textarea" v-model="scope.row.manageApprovalReply" placeholder="请输入" rows="3" /> </template> </el-table-column> <el-table-column fixed="right" label="操作" align="center"> <template #default="scope"> <template #default="scope" v-if="!projectInfoData.managerFlag"> <el-button size="small" @click="handleReply(scope.$index)">回复</el-button> <el-button size="small" type="danger" @click="handleReset(scope.$index)">重置</el-button> </template> <template v-if="projectInfoData.managerFlag" #default="scope"> <el-button size="small" @click="handleSave(scope.$index)">保存</el-button> </template> </el-table-column> </el-table> @@ -134,16 +160,16 @@ </template> <script> import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyDepartmentApproval } from "@/api/projectPlan/index"; import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyExamine, saveExamine } from "@/api/projectPlan/index"; export default { name: "planInfoCheck", name: "PlanInfoCheck", data() { return { loading: true, // 接收传递过来的项目计划数据 planRecordData: {}, planInfoData: {}, projectInfoData: {}, // 计划项数据 tableData: [ { @@ -170,15 +196,15 @@ methods: { // 页面加载 search() { this.getPlanInfoData(this.planRecordData.id); // 获取项目计划项 this.getDepartmentApproval(this.planRecordData.id); // 获取上级批复 this.getPlanLog(this.planRecordData.id); // 获取计划日志 this.getPlanInfoData(this.planInfoData.id); // 获取项目计划项 this.getDepartmentApproval(this.planInfoData.id); // 获取上级批复 this.getPlanLog(this.planInfoData.id); // 获取计划日志 }, // 获取传递过来的项目计划详情 getPlanRecordData() { // 从查询参数中获取数据 this.planRecordData = this.$route.query.data this.planInfoData = this.$route.query.planInfoData this.planInfoData = this.$route.query.data this.projectInfoData = this.$route.query.projectInfoData this.search(); }, // 获取项目计划项 @@ -205,14 +231,19 @@ this.departmentApprovalData = response.data; }); }, // 回复 // 回复审批 handleReply(index) { replyDepartmentApproval(this.departmentApprovalData[index]).then(response => { replyExamine(this.departmentApprovalData[index]).then(response => { this.$message.success('回复成功'); this.search() }); }, // 保存审批 handleSave(index) { saveExamine(this.departmentApprovalData[index]).then(response => { this.$message.success('保存成功'); }); }, // 获取计划日志 getPlanLog(projectPlanRecordId) { getPlanLog(projectPlanRecordId).then(response => { @@ -230,7 +261,7 @@ this.$router.push({ path: '/projectManage/planRecord', query: { data: this.planRecordData data: this.projectInfoData } }) } src/views/projectManage/plan/planRecord.vue
@@ -1,15 +1,15 @@ <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"> <el-col :span="24" class="mb-4"> <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> <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan" v-show="!projectInfoData.managerFlag">新增</el-button> </div> <el-table :data="monthRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 表头 --> @@ -26,9 +26,14 @@ <el-table-column prop="createTime" label="创建时间" align="center" /> <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" 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> <div v-show="!projectInfoData.managerFlag"> <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">编辑上报</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> </div> <div v-show="projectInfoData.managerFlag"> <el-button type="primary" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">查看</el-button> </div> </template> </el-table-column> </el-table> @@ -36,7 +41,7 @@ <el-col :span="24" class="mb-4" style="margin-top: 20px"> <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> <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan" v-show="!projectInfoData.managerFlag">查看</el-button> </div> <el-table :data="seasonRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 表头 --> @@ -53,9 +58,14 @@ <el-table-column prop="createTime" label="创建时间" align="center" /> <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" 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> <div v-show="!projectInfoData.managerFlag"> <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">编辑上报</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> </div> <div v-show="projectInfoData.managerFlag"> <el-button type="primary" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">查看</el-button> </div> </template> </el-table-column> </el-table> @@ -63,7 +73,7 @@ <el-col :span="24" class="mb-4" style="margin-top: 20px"> <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> <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan" v-show="!projectInfoData.managerFlag">新增</el-button> </div> <el-table :data="yearRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 表头 --> @@ -80,9 +90,14 @@ <el-table-column prop="createTime" label="创建时间" align="center" /> <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" 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> <div v-show="!projectInfoData.managerFlag"> <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">编辑上报</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> </div> <div v-show="projectInfoData.managerFlag"> <el-button type="primary" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">查看</el-button> </div> </template> </el-table-column> </el-table> @@ -102,7 +117,7 @@ data() { return { // 接收传递过来的项目计划数据 planRecordData: {}, projectInfoData: {}, // 月度计划数据 monthRecords: [], // 季度计划数据 @@ -114,13 +129,14 @@ methods: { // 页面加载 search() { this.getPlanRecordData(this.planRecordData.id); this.getPlanRecordData(this.projectInfoData.id); console.log(this.projectInfoData); }, // 获取传递过来的项目计划详情 getPlanInfoData() { getProjectInfoData() { // 从查询参数中获取数据 this.planRecordData = this.$route.query.data this.getPlanRecordData(this.planRecordData.id); this.projectInfoData = this.$route.query.data this.search(); }, // 获取项目计划记录数据 getPlanRecordData(id) { @@ -136,13 +152,13 @@ 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; } // 新增一行记录 @@ -154,13 +170,13 @@ 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; } // 新增一行记录 @@ -172,13 +188,13 @@ 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; } // 新增一行记录 @@ -192,7 +208,7 @@ path: '/projectManage/planInfo', query: { data: row, planRecordData: this.planRecordData projectInfoData: this.projectInfoData } }) }, @@ -204,17 +220,18 @@ }, // 查看项目计划项 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> src/views/projectManage/progress/index.vue
@@ -192,7 +192,7 @@ import { getList, getRecord, delRecord, addRecord, updateRecord } from "@/api/projectPlan/index"; export default { name: "index", name: "Index", data() { return { // 遮罩层 src/views/projectManage/progress/progressRecord.vue
@@ -1,8 +1,8 @@ <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"> @@ -97,35 +97,26 @@ </el-col> <div style="margin-bottom: 10px"> <h1 style="font-size: 20px; font-weight: bold;">竣工报告</h1> <div style="display: flex; justify-content: center; align-items: center;"> <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple> <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> </el-upload> <div style="display: flex;margin-left: 20px;"> <file-upload v-model="projectProgressForm.completedReportFileList" :fileType="projectProgressForm.accept" :isShowTip="false"/> </div> </div> <div style="margin-bottom: 10px"> <h1 style="font-size: 20px; font-weight: bold;">情况说明</h1> <div style="display: flex; justify-content: center; align-items: center;"> <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple> <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> </el-upload> <div style="display: flex;margin-left: 20px;"> <file-upload v-model="projectProgressForm.situationDescriptionFileList" :fileType="projectProgressForm.accept" :isShowTip="false"/> </div> </div> <div style="display: flex; justify-content: center; align-items: center; margin-top: 20px;"> <el-button type="primary" @click="handleSave">保 存</el-button> </div> </el-row> <el-dialog :title=" checkFlag ? '进度查看' : '进度上报' " :visible.sync="dialogFormVisible" custom-class="custom-dialog"> <el-dialog :title=" checkFlag ? '进度查看' : '进度上报' " :visible.sync="dialogFormVisible" custom-class="custom-dialog" :close-on-click-modal="false" @close="handleCancel"> <el-form :model="progressReportData"> <el-form-item label="报告期:" :label-width="formLabelWidth"> <el-input :value="progressReportData.planTime + (progressReportData.planTimeFlag === 0 ? '月度' : progressReportData.planTimeFlag === 1 ? '季度' : '年度')" readonly /> @@ -146,17 +137,10 @@ <el-form-item label="进度情况:" :label-width="formLabelWidth"> <el-input type="textarea" v-model="progressReportData.progressStatus" placeholder="请输入" rows="3" :readonly="checkFlag" /> </el-form-item> <el-form-item label="工程进度附件:" :label-width="formLabelWidth"> <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple :disabled="checkFlag" > <i class="el-icon-upload"></i> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> </el-upload> <el-form-item prop="fileList" label="工程进度附件:" :label-width="formLabelWidth"> <file-upload v-model="progressReportData.fileList" :fileType="accept" :isShowTip="false"/> </el-form-item> <el-form-item label="截止本报告完成投资:" :label-width="formLabelWidth"> <el-input v-model="progressReportData.actualInvest" type="number" :readonly="checkFlag" /> @@ -182,7 +166,7 @@ </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="handleRecordSubmit" v-if="!checkFlag">上 报</el-button> <el-button @click="dialogFormVisible = false">取 消</el-button> <el-button @click="handleCancel">取 消</el-button> </div> </el-dialog> </el-card> @@ -192,14 +176,20 @@ </template> <script> import { getProgressInfoList, getProgressReport, recordSubmit } from "@/api/projectManage/progress/index"; import { getProgressInfoList, getProgressReport, recordSubmit, saveProjectProgressFileLists, getProjectProgressForm } from "@/api/projectManage/progress/index"; import progressRecord from "./progressRecord.vue"; export default { name: "progressRecord", name: "ProgressRecord", computed: { progressRecord() { return progressRecord } }, data() { return { // 接收传递过来的项目计划数据 planRecordData: {}, projectInfoData: {}, monthProgress: [], seasonProgress: [], yearProgress: [], @@ -209,20 +199,37 @@ // 查看显示 checkFlag: false, progressReportData: {}, formLabelWidth: '150px' formLabelWidth: '150px', // 竣工报告、情况说明附件 projectProgressForm: { completedReportFileList: [], situationDescriptionFileList: [], projectReportId: null, accept: ['pdf'], }, // 进度上报附件类型 accept: ['pdf','jpg','mp4'], } }, methods: { search() { this.getPlanRecordData() 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) { getProjectProgressForm(id).then(res => { this.projectProgressForm = res.data; }) }, // 获取项目进度计划项 getProgressInfoList(id) { @@ -254,6 +261,20 @@ getProgressReport(row.id).then(res => { this.progressReportData = res.data; }) }, // 关闭弹窗 handleCancel() { this.dialogFormVisible = false; this.checkFlag = false; }, // 保存 handleSave() { this.projectProgressForm.projectReportId = this.projectInfoData.id; // 判断文件不为空 saveProjectProgressFileLists(this.projectProgressForm).then(res => { this.$message.success('保存成功'); this.search(); }) } }, created() {