src/api/projectManage/progress/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
New file @@ -0,0 +1,54 @@ import request from '@/utils/request' // 查询项目计划记录列表 export function getList(query) { return request({ url: '/api/plan/page', method: 'get', params: query }) } // 查询计划记录列表 export function getPlanRecordList(id) { return request({ url: '/api/project-plan-record/' + id, method: 'post' }) } // 查询项目计划记录详细 export function getRecord(id) { return request({ url: '/plan/record/' + id, method: 'get' }) } // 获取项目进度计划项 export function getProgressInfoList(id) { return request({ url: '/api/progress-plan/' + id, method: 'get' }) } // 获取进度上报内容 export function getProgressReport(id) { return request({ url: '/api/project-plan-progress-report/' + id, method: 'get' }) } // 提交上报内容 export function recordSubmit(data) { return request({ url: '/api/project-plan-progress-report', method: 'post', data: data }) } src/views/projectManage/plan/index.vue
@@ -331,7 +331,7 @@ this.$router.push({ path: '/projectManage/planRecord', query: { data: JSON.stringify(row) data: row } }) } src/views/projectManage/plan/planInfo.vue
@@ -7,6 +7,7 @@ <el-card shadow="hover"> <el-row :gutter="20"> <el-col :span="24" class="mb-4"> <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px; margin-left: 10px">返回</el-button> <el-button type="primary" size="small" @click="handleAdd" style="float: right; margin-bottom: 10px">新增</el-button> <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px"> <el-table-column prop="index" label="序号" width="50" align="center"> @@ -99,15 +100,13 @@ methods: { // 页面加载 search() { this.getPlanInfoData(this.planRecordData.id); this.getPlanInfoData(this.planInfoData.id); }, // 获取传递过来的项目计划详情 getPlanRecordData() { // 从查询参数中获取数据 if (this.$route.query.data) { this.planRecordData = JSON.parse(this.$route.query.data) } this.planInfoData = this.$route.query.planInfoData this.planRecordData = this.$route.query.planRecordData this.planInfoData = this.$route.query.data this.search(); }, // 获取项目计划项 @@ -134,12 +133,12 @@ // 遍历tableData,获得值不为空字符串的行 const validList = this.tableData.filter(item => item.title !== '' || item.startTime !== '' || item.endTime !== ''); this.addData = { projectPlanRecordId: this.planRecordData.id, projectPlanRecordId: this.planInfoData.id, actualInvest: this.actualInvest, addList: validList } addPlanInfo(this.addData).then(response => { this.handlePlanRecord(this.planInfoData) this.handlePlanRecord() }) }, // 重置当前行数据 @@ -167,11 +166,11 @@ }); }, /** 返回项目计划记录 */ handlePlanRecord(planInfoData) { handlePlanRecord() { this.$router.push({ name: '/projectManage/planRecord', path: '/projectManage/planRecord', query: { data: JSON.stringify(planInfoData) data: this.planRecordData } }) } src/views/projectManage/plan/planInfoCheck.vue
@@ -7,6 +7,7 @@ <el-card shadow="hover"> <el-row :gutter="20"> <el-col :span="24" class="mb-4"> <el-button type="primary" size="small" @click="handlePlanRecord" style="float: right; margin-bottom: 10px;">返回</el-button> <!--项目计划项--> <el-table :data="tableData" border stripe style="width: 100%; margin-bottom: 20px"> <el-table-column prop="index" label="序号" width="50" align="center"> @@ -176,9 +177,7 @@ // 获取传递过来的项目计划详情 getPlanRecordData() { // 从查询参数中获取数据 if (this.$route.query.data) { this.planRecordData = JSON.parse(this.$route.query.data) } this.planRecordData = this.$route.query.data this.planInfoData = this.$route.query.planInfoData this.search(); }, @@ -226,15 +225,15 @@ this.tableData[index].startTime = ''; this.tableData[index].endTime = ''; }, /** 返回项目计划记录页面 */ handlePlanRecord(planInfoData) { /** 返回项目计划记录 */ handlePlanRecord() { this.$router.push({ name: '/projectManage/planRecord', path: '/projectManage/planRecord', query: { data: JSON.stringify(planInfoData) data: this.planRecordData } }) }, } }, created() { this.getPlanRecordData(); src/views/projectManage/plan/planRecord.vue
@@ -1,8 +1,8 @@ <template> <div class="app-container"> <el-container> <el-header v-show="planInfoData && planInfoData.projectName" class="header-title">项目名称:{{ planInfoData.projectName }}</el-header> <h4 v-show="planInfoData && planInfoData.projectCode" style="text-align: center">项目代码:{{ planInfoData.projectCode }}</h4> <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-main> <el-card shadow="hover"> <el-row :gutter="20"> @@ -11,11 +11,11 @@ <span style="font-size: 20px; font-weight: bold;">月度计划</span> <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">新增</el-button> </div> <el-table :data="monthRecords" style="width: 100%"> <el-table :data="monthRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 表头 --> <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 prop="id" label="序号" align="center" width="50"/> <el-table-column prop="projectName" label="项目名称" align="center" /> <el-table-column prop="projectCode" label="项目代码" align="center" /> <el-table-column label="计划期" align="center"> <template slot-scope="scope"> <span> @@ -23,7 +23,7 @@ </span> </template> </el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <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> @@ -38,11 +38,11 @@ <span style="font-size: 20px; font-weight: bold;">季度计划</span> <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">新增</el-button> </div> <el-table :data="seasonRecords" style="width: 100%"> <el-table :data="seasonRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 表头 --> <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 prop="id" label="序号" align="center" width="50" /> <el-table-column prop="projectName" label="项目名称" align="center" /> <el-table-column prop="projectCode" label="项目代码" align="center" /> <el-table-column label="计划期" align="center"> <template slot-scope="scope"> <span> @@ -50,7 +50,7 @@ </span> </template> </el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <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> @@ -65,11 +65,11 @@ <span style="font-size: 20px; font-weight: bold;">年度计划</span> <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">新增</el-button> </div> <el-table :data="yearRecords" style="width: 100%"> <el-table :data="yearRecords" border stripe style="width: 100%; margin-bottom: 20px"> <!-- 表头 --> <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 prop="id" label="序号" align="center" width="50" /> <el-table-column prop="projectName" label="项目名称" align="center" /> <el-table-column prop="projectCode" label="项目代码" align="center" /> <el-table-column label="计划期" align="center"> <template slot-scope="scope"> <span> @@ -77,7 +77,7 @@ </span> </template> </el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <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> @@ -102,7 +102,7 @@ data() { return { // 接收传递过来的项目计划数据 planInfoData: {}, planRecordData: {}, // 月度计划数据 monthRecords: [], // 季度计划数据 @@ -114,15 +114,13 @@ methods: { // 页面加载 search() { this.getPlanRecordData(this.planInfoData.id); this.getPlanRecordData(this.planRecordData.id); }, // 获取传递过来的项目计划详情 getPlanInfoData() { // 从查询参数中获取数据 if (this.$route.query.data) { this.planInfoData = JSON.parse(this.$route.query.data); this.getPlanRecordData(this.planInfoData.id); } this.planRecordData = this.$route.query.data this.getPlanRecordData(this.planRecordData.id); }, // 获取项目计划记录数据 getPlanRecordData(id) { @@ -138,7 +136,7 @@ handleAddMonthPlan() { let planRecordData = { id: undefined, projectInfoId: this.planInfoData.id, projectInfoId: this.planRecordData.id, planTimeFlag: 0 } // 判断月度计划是否为空 @@ -156,7 +154,7 @@ handleAddSeasonPlan() { let planRecordData = { id: undefined, projectInfoId: this.planInfoData.id, projectInfoId: this.planRecordData.id, planTimeFlag: 1 } // 判断季度计划是否为空 @@ -174,7 +172,7 @@ handleAddYearPlan() { let planRecordData = { id: undefined, projectInfoId: this.planInfoData.id, projectInfoId: this.planRecordData.id, planTimeFlag: 2 } // 判断年度计划是否为空 @@ -191,10 +189,10 @@ /** 修改项目计划项 */ handlePlanInfo(row) { this.$router.push({ name: 'PlanInfo', path: '/projectManage/planInfo', query: { data: JSON.stringify(row), planInfoData: this.planInfoData data: row, planRecordData: this.planRecordData } }) }, @@ -209,7 +207,8 @@ this.$router.push({ path: '/projectManage/planInfoCheck', query: { data: JSON.stringify(row), data: row, planRecordData: this.planRecordData } }) } src/views/projectManage/progress/index.vue
New file @@ -0,0 +1,340 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="项目名称" prop="projectName"> <el-input v-model="queryParams.projectName" placeholder="支持模糊查询" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="项目代码" prop="projectCode"> <el-input v-model="queryParams.projectCode" placeholder="支持模糊查询" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="上报状态" prop="reportStatus"> <el-select v-model="queryParams.reportStatus" @change="handleQuery" placeholder="请选择状态" clearable> <el-option label="已上报" value="0"></el-option> <el-option label="未上报" value="1"></el-option> </el-select> </el-form-item> <el-form-item label="审批状态" prop="reportStatus"> <el-select placeholder="请选择状态" clearable> <el-option label="已审批" value="0"></el-option> <el-option label="未审批" value="1"></el-option> </el-select> </el-form-item> <el-form-item label="项目年限" prop="reportStatus"> <el-select placeholder="下拉选择" clearable> <el-option label="2024" value="2024"></el-option> <el-option label="2025" value="2025"></el-option> </el-select> </el-form-item> <el-form-item label="项目月度" prop="reportStatus"> <el-select placeholder="下拉选择" clearable> <el-option label="1月度" value="1"></el-option> <el-option label="2月度" value="2"></el-option> </el-select> </el-form-item> <el-form-item label="项目季度" prop="reportStatus"> <el-select placeholder="下拉选择" clearable> <el-option label="1季度" value="1"></el-option> <el-option label="2季度" value="2"></el-option> <el-option label="3季度" value="3"></el-option> <el-option label="4季度" value="4"></el-option> </el-select> </el-form-item> </el-form> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" >新增</el-button> </el-col> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleQuery" >查询</el-button> </el-col> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleReset" >重置</el-button> </el-col> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="ID" align="center" prop="id" /> <el-table-column label="项目名称" align="center" prop="projectName" /> <el-table-column label="上报状态" align="center" prop="reportStatus" > <template slot-scope="scope"> {{ scope.row.reportStatus === 0 ? '已上报' : '未上报' }} </template> </el-table-column> <el-table-column label="项目码" align="center" prop="" /> <el-table-column label="项目代码" align="center" prop="projectCode" /> <el-table-column label="项目类型" align="center" prop="projectType" > <template slot-scope="scope"> {{ scope.row.projectType === 0 ? '房屋建筑' : scope.row.projectType === 1 ? '城市基础设施' : scope.row.projectType === 2 ? '交通运输' : scope.row.projectType === 3 ? '水利' : scope.row.projectType === 4 ? '能源' : scope.row.projectType === 5 ? '非煤矿山' : scope.row.projectType === 6 ? '其他' : '未知' }} </template> </el-table-column> <el-table-column label="项目阶段" align="center" prop="projectPhase" > <template slot-scope="scope"> {{ scope.row.projectPhase === 0 ? '储备规划阶段' : scope.row.projectPhase === 1 ? '项目前期阶段' : scope.row.projectPhase === 2 ? '实施阶段' : scope.row.projectPhase === 3 ? '竣工投用阶段' : '未知' }} </template> </el-table-column> <el-table-column label="月度" align="center" prop="monthStatus" > <template slot-scope="scope"> {{ scope.row.monthStatus === 0 ? '已上报' : '未上报' }} </template> </el-table-column> <el-table-column label="季度" align="center" prop="seasonStatus" > <template slot-scope="scope"> {{ scope.row.seasonStatus === 0 ? '已上报' : '未上报' }} </template> </el-table-column> <el-table-column label="年度" align="center" prop="yearStatus" > <template slot-scope="scope"> {{ scope.row.yearStatus === 0 ? '已上报' : '未上报' }} </template> </el-table-column> <el-table-column label="项目状态" align="center" prop="projectStatus" > <template slot-scope="scope"> {{ scope.row.projectStatus === 0 ? '未开工' : scope.row.projectStatus === 1 ? '已开工' : scope.row.projectStatus === 2 ? '已竣工' : scope.row.projectStatus === 3 ? '暂停' : '未知状态' }} </template> </el-table-column> <el-table-column label="投资类别" align="center" prop="investType" > <template slot-scope="scope"> {{ scope.row.investType === 0 ? '企业投资' : scope.row.investType === 1 ? '政府投资' : scope.row.investType === 2 ? '外商投资' : scope.row.investType === 3 ? '境外投资' : '未知类型' }} </template> </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-edit" @click="handlePlanRecord(scope.row)" >查看</el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" >修改</el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" >删除</el-button> </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> </div> </template> <script> import { getList, getRecord, delRecord, addRecord, updateRecord } from "@/api/projectPlan/index"; export default { name: "index", data() { return { // 遮罩层 loading: true, // 选中数组 ids: [], // 非单个禁用 single: true, // 非多个禁用 multiple: true, // 显示搜索条件 showSearch: true, // 总条数 total: 0, // 项目计划记录表格数据 recordList: [], // 弹出层标题 title: "", // 是否显示弹出层 open: false, // 查询参数 queryParams: { pageNum: 1, pageSize: 10, }, // 表单参数 form: {}, // 表单校验 rules: { } }; }, created() { this.getList(); }, methods: { /** 查询项目计划记录列表 */ getList() { this.loading = true; getList(this.queryParams).then(response => { this.recordList = response.data; this.total = response.total; this.loading = false; }); }, // 取消按钮 cancel() { this.open = false; this.reset(); }, // 表单重置 reset() { this.form = { id: null, projectInfoId: null, planId: null, engineeringInfoId: null, planTime: null, planTimeFlag: null, createTime: null, reportStatus: null, actualInvest: null }; this.resetForm("form"); }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; this.getList(); }, /** 重置按钮操作 */ resetQuery() { this.resetForm("queryForm"); this.handleQuery(); }, // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.id) this.single = selection.length!==1 this.multiple = !selection.length }, /** 新增按钮操作 */ handleAdd() { this.reset(); 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', { ...this.queryParams }, `record_${new Date().getTime()}.xlsx`) }, /** 查看项目计划记录 */ handlePlanRecord(row) { this.$router.push({ path: '/projectManage/progressRecord', query: { data: JSON.stringify(row) } }) } } }; </script> src/views/projectManage/progress/progressRecord.vue
New file @@ -0,0 +1,277 @@ <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-main> <el-card shadow="hover"> <el-row :gutter="20"> <div style="margin-bottom: 10px"> <el-link style="font-size: 20px; font-weight: bold;" @click="activeTab = 'month'">月度计划/</el-link> <el-link style="font-size: 20px; font-weight: bold;" @click="activeTab ='season'">季度计划/</el-link> <el-link style="font-size: 20px; font-weight: bold;" @click="activeTab = 'year'">年度计划</el-link> </div> <el-col :span="24" class="mb-4" style="margin-top: 20px" v-if="activeTab === 'month'"> <div v-for="(item, index) in monthProgress"> <div style="margin-bottom: 10px"> <span style="font-size: 18px;">{{ item.planTime }}{{ item.planTimeFlag === 0 ? '月度' : item.planTimeFlag === 1 ? '季度' : '年度' }}</span> <el-table :data="item.planInfoList" border stripe style="width: 100%; margin-bottom: 20px"> <el-table-column prop="index" label="序号" width="50" align="center"> <template #default="scope"> {{ scope.$index + 1 }} </template> </el-table-column> <el-table-column prop="title" label="事项名称" align="center" /> <el-table-column prop="progressStatus" label="进度情况" align="center"> <template slot-scope="scope"> {{ scope.row.progressStatus === 0 ? '未完成' : scope.row.progressStatus === 1 ? '待审核' : scope.row.progressStatus === 2 ? '已驳回' : '已完成'}} </template> </el-table-column> <el-table-column prop="startTime" label="计划开始时间" align="center" /> <el-table-column prop="endTime" label="计划完成时间" align="center" /> <el-table-column fixed="right" label="操作" align="center"> <template slot-scope="scope"> <el-button type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">进度上报</el-button> <el-button type="primary" size="small" @click="handleCheckProgress(scope.row)">查看</el-button> </template> </el-table-column> </el-table> </div> </div> </el-col> <el-col :span="24" class="mb-4" style="margin-top: 20px" v-if="activeTab === 'season'" > <div v-for="(item, index) in seasonProgress"> <div style="margin-bottom: 10px"> <span style="font-size: 18px;">{{ item.planTime }}{{ item.planTimeFlag === 0 ? '月度' : item.planTimeFlag === 1 ? '季度' : '年度' }}</span> <el-table :data="item.planInfoList" border stripe style="width: 100%; margin-bottom: 20px"> <el-table-column prop="index" label="序号" width="50" align="center"> <template #default="scope"> {{ scope.$index + 1 }} </template> </el-table-column> <el-table-column prop="title" label="事项名称" align="center" /> <el-table-column prop="progressStatus" label="进度情况" align="center"> <template slot-scope="scope"> {{ scope.row.progressStatus === 0 ? '未完成' : scope.row.progressStatus === 1 ? '待审核' : scope.row.progressStatus === 2 ? '已驳回' : '已完成'}} </template> </el-table-column> <el-table-column prop="startTime" label="计划开始时间" align="center" /> <el-table-column prop="endTime" label="计划完成时间" align="center" /> <el-table-column fixed="right" label="操作" align="center"> <template slot-scope="scope"> <el-button type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">进度上报</el-button> <el-button type="primary" size="small" @click="handleCheckProgress(scope.row)">查看</el-button> </template> </el-table-column> </el-table> </div> </div> </el-col> <el-col :span="24" class="mb-4" style="margin-top: 20px" v-if="activeTab === 'year'"> <div v-for="(item, index) in yearProgress"> <div style="margin-bottom: 10px"> <span style="font-size: 18px;">{{ item.planTime }}{{ item.planTimeFlag === 0 ? '月度' : item.planTimeFlag === 1 ? '季度' : '年度' }}</span> <el-table :data="item.planInfoList" border stripe style="width: 100%; margin-bottom: 20px"> <el-table-column prop="index" label="序号" width="50" align="center"> <template #default="scope"> {{ scope.$index + 1 }} </template> </el-table-column> <el-table-column prop="title" label="事项名称" align="center" /> <el-table-column prop="progressStatus" label="进度情况" align="center"> <template slot-scope="scope"> {{ scope.row.progressStatus === 0 ? '未完成' : scope.row.progressStatus === 1 ? '待审核' : scope.row.progressStatus === 2 ? '已驳回' : '已完成'}} </template> </el-table-column> <el-table-column prop="startTime" label="计划开始时间" align="center" /> <el-table-column prop="endTime" label="计划完成时间" align="center" /> <el-table-column fixed="right" label="操作" align="center"> <template slot-scope="scope"> <el-button type="primary" size="small" :disabled="scope.row.progressStatus === 1 || scope.row.progressStatus === 3" @click="handleProgressReport(scope.row)">进度上报</el-button> <el-button type="primary" size="small" @click="handleCheckProgress(scope.row)">查看</el-button> </template> </el-table-column> </el-table> </div> </div> </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> </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> </div> </el-row> <el-dialog :title=" checkFlag ? '进度查看' : '进度上报' " :visible.sync="dialogFormVisible" custom-class="custom-dialog"> <el-form :model="progressReportData"> <el-form-item label="报告期:" :label-width="formLabelWidth"> <el-input :value="progressReportData.planTime + (progressReportData.planTimeFlag === 0 ? '月度' : progressReportData.planTimeFlag === 1 ? '季度' : '年度')" readonly /> </el-form-item> <el-form-item label="计划事项:" :label-width="formLabelWidth"> <el-input v-model="progressReportData.title" readonly /> </el-form-item> <el-form-item label="计划时间:" :label-width="formLabelWidth"> <el-date-picker v-model="progressReportData.startTime" type="date" placeholder="选择日期" size="small" style="width: 130px" readonly/> 至 <el-date-picker v-model="progressReportData.endTime" type="date" placeholder="选择日期" size="small" style="width: 130px" readonly/> </el-form-item> <el-form-item label="实际完成时间:" :label-width="formLabelWidth"> <el-date-picker v-model="progressReportData.actualStartTime" type="date" placeholder="选择日期" size="small" style="width: 130px" :readonly="checkFlag"/> 至 <el-date-picker v-model="progressReportData.actualEndTime" type="date" placeholder="选择日期" size="small" style="width: 130px" :readonly="checkFlag"/> </el-form-item> <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> <el-form-item label="截止本报告完成投资:" :label-width="formLabelWidth"> <el-input v-model="progressReportData.actualInvest" type="number" :readonly="checkFlag" /> </el-form-item> <el-form-item label="上级审核:" :label-width="formLabelWidth"> <el-input :value="progressReportData.departmentExamine === 0 ? '同意' : progressReportData.departmentExamine === 1 ? '驳回' : '未审核'" readonly /> </el-form-item> <el-form-item label="上级批复:" :label-width="formLabelWidth"> <el-input v-model="progressReportData.departmentApproval" readonly /> </el-form-item> <el-form-item label="上级批复回复:" :label-width="formLabelWidth"> <el-input type="textarea" v-model="progressReportData.departmentApprovalReply" placeholder="请输入" rows="3" :readonly="checkFlag" /> </el-form-item> <el-form-item label="主管部门审核:" :label-width="formLabelWidth"> <el-input :value="progressReportData.manageExamine === 0 ? '同意' : progressReportData.manageExamine === 1 ? '驳回' : '未审核'" readonly /> </el-form-item> <el-form-item label="主管部门审核批复:" :label-width="formLabelWidth"> <el-input v-model="progressReportData.manageApproval" readonly /> </el-form-item> <el-form-item label="主管部门批复回复:" :label-width="formLabelWidth"> <el-input type="textarea" v-model="progressReportData.manageApprovalReply" placeholder="请输入" rows="3" :readonly="checkFlag" /> </el-form-item> </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> </div> </el-dialog> </el-card> </el-main> </el-container> </div> </template> <script> import { getProgressInfoList, getProgressReport, recordSubmit } from "@/api/projectManage/progress/index"; export default { name: "progressRecord", data() { return { // 接收传递过来的项目计划数据 planRecordData: {}, monthProgress: [], seasonProgress: [], yearProgress: [], activeTab: "month", // 默认显示月度计划 dialogFormVisible: false, // 查看显示 checkFlag: false, progressReportData: {}, formLabelWidth: '150px' } }, methods: { search() { this.getPlanRecordData() }, // 获取传递过来的项目计划详情 getPlanRecordData() { // 从查询参数中获取数据 if (this.$route.query.data) { this.planRecordData = JSON.parse(this.$route.query.data); this.getProgressInfoList(this.planRecordData.id); } }, // 获取项目进度计划项 getProgressInfoList(id) { getProgressInfoList(id).then(res => { this.monthProgress = res.data.monthProgress; this.seasonProgress = res.data.seasonProgress; this.yearProgress = res.data.yearProgress; }) }, // 进度上报 handleProgressReport(row) { this.dialogFormVisible = true; getProgressReport(row.id).then(res => { this.progressReportData = res.data; }) }, // 上报提交 handleRecordSubmit() { recordSubmit(this.progressReportData).then(res => { this.dialogFormVisible = false; this.$message.success('上报成功'); this.search(); }) }, // 查看进度 handleCheckProgress(row) { this.dialogFormVisible = true; this.checkFlag = true; getProgressReport(row.id).then(res => { this.progressReportData = res.data; }) } }, created() { this.search(); }, }; </script> <style scoped> .header-title { font-size: 24px; /* 根据需要调整字体大小 */ text-align: center; /* 居中对齐 */ line-height: 64px; /* 如果需要与 header 高度对齐 */ } .custom-dialog { max-height: 70vh; /* 设置最大高度 */ overflow-y: auto; /* 允许垂直滚动 */ } </style>