| | |
| | | }) |
| | | } |
| | | |
| | | // 启动流程 |
| | | export const startProcess = (projectId, processId) => { |
| | | // 获取项目流程详情分页数据 |
| | | export const getProjectProcessDetailTaskList = (params) => { |
| | | return request({ |
| | | url: "/project-process/start/" + projectId + "/" + processId, |
| | | url: "/project-process/detail/task/list", |
| | | method: "GET", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 启动流程 |
| | | export const startProcess = (projectId, processDefId) => { |
| | | return request({ |
| | | url: "/project-process/start/" + projectId + "/" + processDefId, |
| | | method: "POST" |
| | | }) |
| | | } |
| | |
| | | <div> |
| | | <div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px"> |
| | | <div>当前流程:</div> |
| | | <div v-if="nowProcessId">{{selectProcessName}}</div> |
| | | <div v-if="nowProcessDefId">{{selectProcessName}}</div> |
| | | <div v-else>未绑定流程</div> |
| | | </div> |
| | | </div> |
| | |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="danger" @click="startProcess" :disable="!this.selectProcessId">启动流程</el-button> |
| | | <el-button type="danger" @click="startProcess" :disable="!this.selectProcessDefId">启动流程</el-button> |
| | | <el-button type="primary" @click="changeProcess">变更</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | required: true, |
| | | type: Array |
| | | }, |
| | | nowProcessId: { // 当前项目绑定的流程id |
| | | nowProcessDefId: { // 当前项目绑定的流程id |
| | | required: true, |
| | | type: String |
| | | } |
| | |
| | | projectInfo: { |
| | | handler(newVal, oldVal) { |
| | | console.log("传入值:", newVal, this.processList) |
| | | this.setSelect(this.nowProcessId) |
| | | this.setSelect(this.nowProcessDefId) |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | selectProcessId: '', // 组件内部选中的流程id |
| | | selectProcessDefId: '', // 组件内部选中的流程id |
| | | selectProcessName: '', // 组件内部选中的流程id |
| | | } |
| | | }, |
| | |
| | | this.$refs.myTable.toggleRowSelection(val[val.length - 1]); |
| | | } |
| | | if(val.length != 0){ |
| | | this.selectProcessId = val[val.length - 1].id; |
| | | console.log("选中id:", this.selectProcessId) |
| | | this.selectProcessDefId = val[val.length - 1].id; |
| | | console.log("选中id:", this.selectProcessDefId) |
| | | } |
| | | }, |
| | | // 启动流程 |
| | | startProcess() { |
| | | startProcess(this.projectInfo.projectId, this.selectProcessId).then(res => { |
| | | startProcess(this.projectInfo.projectId, this.selectProcessDefId).then(res => { |
| | | this.$message.success(res.msg); |
| | | }) |
| | | }, |
| | | // 变更流程 |
| | | changeProcess() { |
| | | if (!this.selectProcessId) { |
| | | if (!this.selectProcessDefId) { |
| | | this.$message.error("选则一个流程后才能变更") |
| | | return |
| | | } |
| | | const data = { |
| | | projectId: this.projectInfo.projectId, |
| | | flowableProcessId: this.selectProcessId |
| | | processDefId: this.selectProcessDefId |
| | | } |
| | | projectSetProcess(data).then(res => { |
| | | this.$message.success("变更成功") |
| | |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.selectProcessId = "" |
| | | this.selectProcessDefId = "" |
| | | this.selectProcessName = "" |
| | | this.$emit("close") |
| | | } |
| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="procDefName" |
| | | prop="processName" |
| | | label="流程名称" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="startUserName" |
| | | prop="promoterName" |
| | | label="发起人" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="startDeptName" |
| | | prop="promoterUnitName" |
| | | label="发起单位" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="assigneeDeptName" |
| | | prop="handlerUnitName" |
| | | label="处理单位" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="assigneeName" |
| | | prop="handlerName" |
| | | label="实际处理人" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taskStatus" |
| | | label="任务状态" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="操作" |
| | | width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="goToProcessDetail(scope.row)" type="text" size="small">查看</el-button> |
| | | <el-button @click="goToDo(scope.row)" type="text" size="small">办理</el-button> |
| | | <el-button v-if="scope.row.taskStatus !== '未开始'" @click="goToProcessDetail(scope.row)" type="text" size="small">查看</el-button> |
| | | <el-button v-if="scope.row.taskStatus === '待办'" @click="goToDo(scope.row)" type="text" size="small">办理</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div> |
| | | <el-pagination |
| | | v-if="total > pageSize" |
| | | :page-size="pageSize" |
| | | :current-page="pageNum" |
| | | v-if="total > queryParams.pageSize" |
| | | :page-size="queryParams.pageSize" |
| | | :current-page="queryParams.currentPage" |
| | | :total="total" |
| | | layout="total, prev, pager, next" |
| | | @current-change="getList" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getProjectProcessDetail} from "@/api/projectProcess/projectProcess"; |
| | | import {getProjectProcessDetail, getProjectProcessDetailTaskList} from "@/api/projectProcess/projectProcess"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | projectId: null, |
| | | processId: null, |
| | | detailData: {}, |
| | | selectTabId: 2, |
| | | taskList: [], |
| | | total: 0, |
| | | pageSize: 5, |
| | | pageNum: 1, |
| | | selectTabId: 2, |
| | | queryParams: { |
| | | taskName: '' |
| | | taskName: '', |
| | | taskType: 'todo', |
| | | pageSize: 5, |
| | | currentPage: 1, |
| | | projectId: null, |
| | | processDefId: null, |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.projectId = this.$route.query.projectId |
| | | this.processId = this.$route.query.processId |
| | | this.queryParams.projectId = this.$route.query.projectId |
| | | this.queryParams.processDefId = this.$route.query.processDefId |
| | | this.getProjectProcessInfo() |
| | | }, |
| | | methods: { |
| | |
| | | this.$router.push({ |
| | | path: '/flowable/task/todo/detail/index', |
| | | query: { |
| | | taskName: row.procDefName, |
| | | startUser: row.startUserName, |
| | | taskName: row.taskName, |
| | | startUser: row.promoterName, |
| | | deployId: row.deployId, |
| | | taskId: row.taskId, |
| | | procInsId: row.procInsId, |
| | | procInsId: row.processInsId, |
| | | executionId: row.executionId |
| | | } |
| | | }) |
| | |
| | | path: '/flowable/task/myProcess/send/index', |
| | | query: { |
| | | deployId: row.deployId, |
| | | procDefId: row.procDefId, |
| | | procDefId: row.processDefId, |
| | | processName: row.taskName, |
| | | taskId: row.taskId |
| | | } |
| | |
| | | goToProcessDetail(row) { |
| | | this.$router.push({ path: '/flowable/task/myProcess/detail/index', |
| | | query: { |
| | | procInsId: row.procInsId, |
| | | procInsId: row.processInsId, |
| | | deployId: row.deployId, |
| | | taskId: row.taskId |
| | | }}) |
| | | }, |
| | | getList() { |
| | | // 获取任务列表 |
| | | getProjectProcessDetailTaskList(this.queryParams).then(res => { |
| | | this.taskList = res.data |
| | | this.total = res.total |
| | | }) |
| | | }, |
| | | // 查询详情 |
| | | getProjectProcessInfo() { |
| | | getProjectProcessDetail(this.projectId, this.processId).then(res => { |
| | | getProjectProcessDetail(this.queryParams.projectId, this.queryParams.processDefId).then(res => { |
| | | this.detailData = res.data |
| | | this.taskList = res.taskList |
| | | }) |
| | | }, |
| | | changeTab(id, event) { |
| | | let beforeId = this.selectTabId |
| | | this.selectTabId = id |
| | | this.queryParams.taskType = event |
| | | if (beforeId !== id) { |
| | | this.getList() |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | /> |
| | | |
| | | <RunProcess ref="runProcess" :show="showRunProcess" |
| | | :now-process-id="nowProcessId" |
| | | :now-process-def-id="nowProcessDefId" |
| | | :project-info="projectRunFrom" |
| | | :process-list="processList" |
| | | @close="closeRunProcess"> |
| | |
| | | }, |
| | | processList: [], |
| | | showRunProcess: false, |
| | | nowProcessId: '', |
| | | nowProcessDefId: '', |
| | | isImportOrExport: false, |
| | | fileDialogVisible: false, |
| | | //是否需要新增按钮(储蓄项目需要) |
| | |
| | | methods: { |
| | | // 查看详情 |
| | | lookProcessDetail(row) { |
| | | console.log(row.processDefId) |
| | | this.$router.push({ |
| | | path: '/projectFlow/detail', |
| | | query: { |
| | | projectId: row.id, |
| | | processId: row.flowableProcessId |
| | | processDefId: row.processDefId |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | getProcessConfigInfoList().then(response => { |
| | | this.processList = response.data; |
| | | this.nowProcessId = row.flowableProcessId; |
| | | this.nowProcessDefId = row.processDefId; |
| | | // // 防止:id没变不触发监听 |
| | | // this.$refs.runProcess.setSelect(row.flowableProcessId); |
| | | this.projectRunFrom.projectId = row.id; |