src/api/projectPlan/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/projectProcess/projectProcess.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/router/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectEngineering/projectLibrary/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectPlan/planInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectPlan/planInfoCheck.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectPlan/planRecord.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectProcess/components/RunProcess.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/projectProcess/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/projectPlan/index.js
@@ -44,9 +44,9 @@ } // 删除项目计划记录 export function delRecord(id) { export function deletePlanRecord(id) { return request({ url: '/plan/record/' + id, url: '/api/project-plan-record/' + id, method: 'delete' }) } src/api/projectProcess/projectProcess.js
New file @@ -0,0 +1,10 @@ import request from '@/utils/request' // 获取项目流程关系表分页 export const getProjectProcesss = (data) => { return request({ url: "/project-process/page", method: "POST", data: data }) } src/router/index.js
@@ -196,12 +196,19 @@ name: 'PlanRecord', meta: { title: '项目计划记录' } }, /** 项目计划项 */ /** 编辑项目计划项 */ { path: '/projectPlan/planInfo', component: () => import('@/views/projectPlan/planInfo'), name: 'PlanInfo', meta: { title: '项目计划项' } meta: { title: '编辑项目计划项' } }, /** 查看项目计划项 */ { path: '/projectPlan/planInfoCheck', component: () => import('@/views/projectPlan/planInfoCheck'), name: 'PlanInfoCheck', meta: { title: '查看项目计划项' } } ] }, src/views/projectEngineering/projectLibrary/index.vue
@@ -203,23 +203,19 @@ <template v-if="item.slotName"> <!-- projectStatus插槽 --> <template v-if="item.slotName === 'projectStatus'"> <div class="mx-1">{{ '自定义样式' }}</div> <dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/> </template> <!-- projectColorCode插槽 --> <template v-if="item.slotName === 'projectColorCode'"> <div class="mx-1 has-dot">{{ '自定义样式' }}<span class="dot" style="margin-left: 5px"></span></div> <dict-tag :options="dict.type.sys_project_code" :value="scope.row.projectColorCode"/> </template> <!-- projectType插槽 --> <template v-if="item.slotName === 'projectType'"> <div class="mx-1">{{ '自定义样式' }}</div> <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> </template> <!-- investType插槽 --> <template v-if="item.slotName === 'investType'"> <div class="mx-1">{{ '自定义样式' }}</div> </template> <!-- planStartTime插槽 --> <template v-if="item.slotName === 'planStartTime'"> {{ '自定义样式' }} <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> </template> </template> <!-- 默认显示 --> src/views/projectPlan/planInfo.vue
@@ -132,7 +132,7 @@ // 上报数据 handleSubmit() { // 遍历tableData,获得值不为空字符串的行 const validList = this.tableData.filter(item => item.title !== '' && item.startTime !== '' && item.endTime !== ''); const validList = this.tableData.filter(item => item.title !== '' || item.startTime !== '' || item.endTime !== ''); this.addData = { projectPlanRecordId: this.planRecordData.id, actualInvest: this.actualInvest, src/views/projectPlan/planInfoCheck.vue
New file @@ -0,0 +1,212 @@ <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-main> <el-card shadow="hover"> <el-row :gutter="20"> <el-col :span="24" class="mb-4"> <!--项目计划项--> <el-table :data="tableData" 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="taskName" label="事项名称" width="500" align="center"> <template #default="scope"> <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" /> </template> </el-table-column> <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" disabled/> </template> </el-table-column> <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" disabled/> </template> </el-table-column> <el-table-column :label="planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.planTimeFlag === 1 ? '季度' : '年度' " width="100" align="center"> <template #default="scope"> <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '月度' : planRecordData.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> </el-table> <div style="display: flex; align-items: center;"> <h1 style="margin: 0;"> 截止本计划进度完成投资(万元): </h1> <el-input placeholder="请输入投资金额" style="flex: 1" v-model="actualInvest" clearable :type="number" @input="handleInput"> </el-input> </div> <!--上级批复--> <div style="margin-bottom: 10px; margin-top: 40px;"> <span style="font-size: 20px; font-weight: bold;">上级批复</span> </div> <el-table :data="tableData" 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="taskName" label="事项名称" width="200" align="center" /> <el-table-column prop="startTime" label="上级审核" width="100" align="center" /> <el-table-column prop="startTime" label="批复内容" width="160" align="center" /> <el-table-column prop="endTime" label="批复回复" width="160" align="center"> <template #default="scope"> <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" /> </template> </el-table-column> <el-table-column prop="startTime" label="主管部门审核" width="100" align="center" /> <el-table-column prop="startTime" label="批复内容" width="160" align="center" /> <el-table-column prop="endTime" label="批复回复" width="160" align="center"> <template #default="scope"> <el-input type="textarea" v-model="scope.row.title" placeholder="请输入" rows="3" /> </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> </el-table> <!--计划日志--> <div style="margin-bottom: 10px; margin-top: 40px;"> <span style="font-size: 20px; font-weight: bold;">计划日志</span> </div> <el-table :data="tableData" 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="taskName" label="事项名称" width="200" align="center" /> <el-table-column prop="startTime" label="上级审核" width="100" align="center" /> <el-table-column prop="startTime" label="批复内容" width="160" align="center" /> <el-table-column prop="endTime" label="批复回复" width="160" align="center" /> <el-table-column prop="startTime" label="主管部门审核" width="100" align="center" /> <el-table-column prop="startTime" label="批复内容" width="160" align="center" /> <el-table-column prop="endTime" label="批复回复" width="160" align="center" /> <el-table-column fixed="right" label="时间" align="center" /> </el-table> </el-col> </el-row> </el-card> </el-main> </el-container> </div> </template> <script> import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index"; export default { name: "planInfoCheck", data() { return { loading: true, // 接收传递过来的项目计划数据 planRecordData: {}, planInfoData: {}, tableData: [ { title: '', startTime: '', endTime: '' }, ], // 投资金额 actualInvest: '', // 新增参数 addData: { projectPlanRecordId: '', actualInvest: '', addList: [] } } }, methods: { // 页面加载 search() { this.getPlanInfoData(this.planRecordData.id); // 获取项目计划项 this.getDepartmentApproval(this.planRecordData.id); // 获取上级批复 //this.getPlanLog(); // 获取计划日志 }, // 获取传递过来的项目计划详情 getPlanRecordData() { // 从查询参数中获取数据 if (this.$route.query.data) { this.planRecordData = JSON.parse(this.$route.query.data) } this.planInfoData = this.$route.query.planInfoData this.search(); }, // 获取项目计划项 getPlanInfoData(id) { getPlanInfoData(id).then(response => { this.actualInvest = response.data.actualInvest; if (response.data.list.length === 0) { this.tableData = [{title: '', startTime: '', endTime: ''}]; } else { this.tableData = response.data.list; } }); }, // 获取上级批复 getDepartmentApproval(projectPlanRecordId) { getExamineRecord(projectPlanRecordId).then(response => { console.log(response.data) }); }, // 获取计划日志 // 重置当前行数据 handleReset(index) { this.tableData[index].title = ''; this.tableData[index].startTime = ''; this.tableData[index].endTime = ''; }, /** 返回项目计划记录页面 */ handlePlanRecord(planInfoData) { this.$router.push({ path: '/projectPlan/planRecord', query: { data: JSON.stringify(planInfoData) } }) }, }, created() { this.getPlanRecordData(); }, }; </script> <style scoped> .header-title { font-size: 24px; /* 根据需要调整字体大小 */ text-align: center; /* 居中对齐 */ line-height: 64px; /* 如果需要与 header 高度对齐 */ } </style> src/views/projectPlan/planRecord.vue
@@ -7,8 +7,10 @@ <el-card shadow="hover"> <el-row :gutter="20"> <el-col :span="24" class="mb-4"> <span>月度计划</span> <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">新增</el-button> <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> </div> <el-table :data="monthRecords" style="width: 100%"> <!-- 表头 --> <el-table-column prop="id" label="序号" align="center"></el-table-column> @@ -25,14 +27,17 @@ <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">删除</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> </template> </el-table-column> </el-table> </el-col> <el-col :span="24" class="mb-4" style="margin-top: 20px"> <span>季度计划</span> <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">新增</el-button> <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> </div> <el-table :data="seasonRecords" style="width: 100%"> <!-- 表头 --> <el-table-column prop="id" label="序号" align="center"></el-table-column> @@ -49,14 +54,17 @@ <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">删除</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> </template> </el-table-column> </el-table> </el-col> <el-col :span="24" class="mb-4" style="margin-top: 20px"> <span>年度计划</span> <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">新增</el-button> <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> </div> <el-table :data="yearRecords" style="width: 100%"> <!-- 表头 --> <el-table-column prop="id" label="序号" align="center"></el-table-column> @@ -73,7 +81,8 @@ <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">删除</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> </template> </el-table-column> </el-table> @@ -86,7 +95,7 @@ </template> <script> import {addRecord, getPlanRecordList} from "@/api/projectPlan/index"; import {addRecord, getPlanRecordList, deletePlanRecord} from "@/api/projectPlan/index"; export default { name: "planRecord", @@ -179,7 +188,7 @@ this.search(); }); }, /** 查看项目计划项 */ /** 修改项目计划项 */ handlePlanInfo(row) { this.$router.push({ path: '/projectPlan/planInfo', @@ -188,8 +197,22 @@ planInfoData: this.planInfoData } }) }, // 删除项目计划记录 handleDeletePlanRecord(id) { deletePlanRecord(id).then(res => { this.search(); }); }, // 查看项目计划项 handleCheckPlanInfo(row) { this.$router.push({ path: '/projectPlan/planInfoCheck', query: { data: JSON.stringify(row), } }) } }, created() { this.getPlanInfoData(); src/views/projectProcess/components/RunProcess.vue
New file @@ -0,0 +1,119 @@ <template> <div> <el-dialog title="流程启动" :visible.sync="show" width="750px" :before-close="handleClose"> <div> <div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px"> <div>当前流程:</div> <div v-if="nowProcessId">{{nowProcessName}}</div> <div v-else>未绑定流程</div> </div> </div> <div style="margin-top: 20px"> <el-table ref="myTable" :data="processList" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55"> </el-table-column> <el-table-column prop="name" label="流程名称" > </el-table-column> <el-table-column prop="category" label="流程类型" > </el-table-column> </el-table> </div> <span slot="footer" class="dialog-footer"> <el-button @click="startProcess">启动</el-button> <el-button type="primary" @click="changeProcess">变更</el-button> </span> </el-dialog> </div> </template> <script> export default { name: "RunProcess", props: { show: { require: true, type: Boolean }, projectId: { require: true, // 项目id type: Number }, processList: { // 流程列表 require: true, type: Array }, nowProcessId: { // 当前项目绑定的流程id require: true, type: String }, nowProcessName: { require: true, type: String } }, watch: { // 监听回显值 nowProcessId(newVal, oldVal) { this.processList.forEach((item,index) => { if(item.id == newVal){ this.$nextTick(() => { this.$refs.myTable.toggleRowSelection(item); }) } }) } }, data() { return { selectProcessId: '', // 组件内部选中的流程id } }, methods: { // 实现el-table单选 handleSelectionChange(val) { console.log(val, "选中") if (val.length > 1) { this.$refs.myTable.clearSelection(); this.$refs.myTable.toggleRowSelection(val.pop()); } if(val.length != 0){ this.selectProcessId = val[val.length - 1].id; } }, // 启动流程 startProcess() { }, // 变更流程 changeProcess() { }, handleClose() { this.$emit("close") } } } </script> <style scoped> /deep/ .el-table__header-wrapper .el-checkbox{ display:none } </style> src/views/projectProcess/index.vue
@@ -203,23 +203,19 @@ <template v-if="item.slotName"> <!-- projectStatus插槽 --> <template v-if="item.slotName === 'projectStatus'"> <div class="mx-1">{{ '自定义样式' }}</div> <dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/> </template> <!-- projectColorCode插槽 --> <template v-if="item.slotName === 'projectColorCode'"> <div class="mx-1 has-dot">{{ '自定义样式' }}<span class="dot" style="margin-left: 5px"></span></div> <dict-tag :options="dict.type.sys_project_code" :value="scope.row.projectColorCode"/> </template> <!-- projectType插槽 --> <template v-if="item.slotName === 'projectType'"> <div class="mx-1">{{ '自定义样式' }}</div> <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> </template> <!-- investType插槽 --> <template v-if="item.slotName === 'investType'"> <div class="mx-1">{{ '自定义样式' }}</div> </template> <!-- planStartTime插槽 --> <template v-if="item.slotName === 'planStartTime'"> {{ '自定义样式' }} <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> </template> </template> <!-- 默认显示 --> @@ -230,29 +226,31 @@ <!-- 操作列 --> <el-table-column label="操作" width="140" align="center" > <template slot-scope="scope"> <el-button size="medium" type="text" icon="el-icon-view" @click="handleDetail(scope.row)" > </el-button> <el-button v-if="isReserve" size="medium" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" > </el-button> <el-button v-if="isReserve" size="medium" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" > </el-button> <!-- <el-button--> <!-- size="medium"--> <!-- type="text"--> <!-- icon="el-icon-view"--> <!-- @click="lookProcessDetail(scope.row)"--> <!-- >--> <!-- </el-button>--> <!-- <el-button--> <!-- v-if="isReserve"--> <!-- size="medium"--> <!-- type="text"--> <!-- icon="el-icon-edit"--> <!-- @click="handleUpdate(scope.row)"--> <!-- >--> <!-- </el-button>--> <el-tooltip content="流程" placement="top" effect="light" :enterable="false"> <el-button v-if="isReserve" size="medium" type="text" icon="el-icon-s-operation" @click="openOpProcess(scope.row)" > </el-button> </el-tooltip> </template> </el-table-column> </el-table> @@ -271,13 +269,18 @@ @fileDialogCancel="fileDialogCancel" :currentColumns="columns" /> <RunProcess :show="showRunProcess" :now-process-id="nowProcessId" :now-process-name="nowProcessName" :process-list="processList" @close="closeRunProcess"></RunProcess> </div> </template> <script> import { listDefinition } from "@/api/flowable/definition"; import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo"; import { getProjectProcesss } from "@/api/projectProcess/projectProcess" import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list'; import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog'; import RunProcess from "@/views/projectProcess/components/RunProcess"; export default { dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', @@ -285,10 +288,15 @@ 'sys_project_tags', 'sys_key_categories', 'sys_project_type'], name: "projectInfo", components: { FileDialog FileDialog, RunProcess }, data() { return { processList: [], showRunProcess: false, projectId: null, nowProcessId: '', nowProcessName: '', isImportOrExport: false, fileDialogVisible: false, //是否需要新增按钮(储蓄项目需要) @@ -371,6 +379,20 @@ this.getList(); }, methods: { closeRunProcess() { this.showRunProcess = false }, // 打开流程页面 openOpProcess(row) { this.projectId = row.id; this.nowProcessId = row.flowableProcessId; this.nowProcessName = row.flowableProcessName; // 拿到流程列表 listDefinition(this.queryParams).then(response => { this.processList = response.data.records; this.showRunProcess = true; }); }, // 重置排序的方法 handleResetSort() { this.defaultColumns = currentRest.map((item, index) => { @@ -426,7 +448,7 @@ /** 查询项目管理基础信息列表 */ getList() { this.loading = true; listInfo(this.queryParams).then(response => { getProjectProcesss(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; });