Merge remote-tracking branch 'origin/master'
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 获取项目流程关系表分页 |
| | | export const getProjectProcesss = (data) => { |
| | | return request({ |
| | | url: "/project-process/page", |
| | | method: "POST", |
| | | data: data |
| | | }) |
| | | } |
New file |
| | |
| | | <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> |
| | |
| | | <!-- 操作列 --> |
| | | <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> |
| | |
| | | @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', |
| | |
| | | '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, |
| | | //是否需要新增按钮(储蓄项目需要) |
| | |
| | | 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) => { |
| | |
| | | /** 查询项目管理基础信息列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInfo(this.queryParams).then(response => { |
| | | getProjectProcesss(this.queryParams).then(response => { |
| | | this.projectInfoList = response.data; |
| | | this.total = response.total; |
| | | }); |