| | |
| | | <div> |
| | | <div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px"> |
| | | <div>当前流程:</div> |
| | | <div v-if="nowProcessDefId">{{selectProcessName}}</div> |
| | | <div v-if="nowProcessDefId">{{selectProcessName}}<span v-if="nowProcessInsId" style="color: red">(运行中)</span></div> |
| | | <div v-else>未绑定流程</div> |
| | | </div> |
| | | </div> |
| | |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="danger" @click="startProcess" :disable="!this.selectProcessDefId">启动流程</el-button> |
| | | <el-button type="primary" @click="changeProcess">变更</el-button> |
| | | <el-button type="danger" @click="startProcess" :disabled="(nowProcessInsId !== '') || (selectProcessDefId === '')">启动流程</el-button> |
| | | <el-button type="primary" @click="changeProcess" :disabled="((nowProcessDefId === selectProcessDefId) && nowProcessInsId !== '') || selectProcessDefId === '' || nowProcessInsId === ''">流程变更</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | required: true, |
| | | type: Array |
| | | }, |
| | | nowProcessDefId: { // 当前项目绑定的流程id |
| | | nowProcessDefId: { // 当前项目绑定的定义id |
| | | required: true, |
| | | type: String |
| | | } |
| | | }, |
| | | nowProcessInsId: { // 当前项目绑定的实例id |
| | | required: true, |
| | | type: String |
| | | }, |
| | | }, |
| | | watch: { |
| | | // 监听回显值 |
| | |
| | | selectProcessDefId: '', // 组件内部选中的流程id |
| | | selectProcessName: '', // 组件内部选中的流程id |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.nowProcessInsId, typeof this.nowProcessInsId, "wwwww") |
| | | }, |
| | | methods: { |
| | | setSelect(value) { |
| | |
| | | startProcess() { |
| | | startProcess(this.projectInfo.projectId, this.selectProcessDefId).then(res => { |
| | | this.$message.success(res.msg); |
| | | this.handleClose() |
| | | }) |
| | | }, |
| | | // 变更流程 |
| | |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | v-if="scope.row.processInsId" |
| | | @click="lookProcessDetail(scope.row)" |
| | | > |
| | | </el-button> |
| | |
| | | |
| | | <RunProcess ref="runProcess" :show="showRunProcess" |
| | | :now-process-def-id="nowProcessDefId" |
| | | :now-process-ins-id="nowProcessInsId" |
| | | :project-info="projectRunFrom" |
| | | :process-list="processList" |
| | | @close="closeRunProcess"> |
| | |
| | | processList: [], |
| | | showRunProcess: false, |
| | | nowProcessDefId: '', |
| | | nowProcessInsId: '', |
| | | isImportOrExport: false, |
| | | fileDialogVisible: false, |
| | | //是否需要新增按钮(储蓄项目需要) |
| | |
| | | projectId: null, |
| | | projectName: '' |
| | | } |
| | | this.nowProcessDefId = ""; |
| | | this.nowProcessInsId = ""; |
| | | this.showRunProcess = false |
| | | this.getList() |
| | | }, |
| | |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | getProcessConfigInfoList().then(response => { |
| | | this.processList = response.data; |
| | | this.nowProcessDefId = row.processDefId; |
| | | this.nowProcessDefId = row.processDefId ? row.processDefId : ''; |
| | | this.nowProcessInsId = row.processInsId ? row.processInsId : ''; |
| | | // // 防止:id没变不触发监听 |
| | | // this.$refs.runProcess.setSelect(row.flowableProcessId); |
| | | this.projectRunFrom.projectId = row.id; |