| | |
| | | }) |
| | | } |
| | | |
| | | // 获取流程类型配置信息表 |
| | | export const getProcessConfigInfoList = (params) => { |
| | | return request({ |
| | | url: "/process-config-info/list", |
| | | method: "GET", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 保存流程类型配置信息表 |
| | | export const saveProcessConfigInfo = (data) => { |
| | | return request({ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // 获取项目流程关系表分页 |
| | | export const getProjectProcesss = (data) => { |
| | | export const getProjectProcess = (data) => { |
| | | return request({ |
| | | url: "/project-process/page", |
| | | method: "POST", |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 获取项目流程关系表分页 |
| | | export const projectSetProcess = (data) => { |
| | | return request({ |
| | | url: "/project-process/set", |
| | | method: "POST", |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | :title="`流程基础配置:` + deployName" |
| | | :visible.sync="processConfigShow" |
| | | width="500px" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | :before-close="handleClose"> |
| | | |
| | |
| | | name: "EditProcessConfig", |
| | | props: { |
| | | processConfigShow: { |
| | | require: true, |
| | | required: true, |
| | | type: Boolean |
| | | }, |
| | | deployName: { |
| | | require: true, |
| | | required: true, |
| | | type: String |
| | | }, |
| | | form: { |
| | | require: true, |
| | | required: true, |
| | | type: Object |
| | | } |
| | | }, |
| | |
| | | data() { |
| | | return { |
| | | configForm: { |
| | | processDefId: '', |
| | | deployId: '', |
| | | deployVersion: null, |
| | | processDefVersion: null, |
| | | projectType: '', // 项目类型 |
| | | fundType: '', // 资金类型 |
| | | investType: '', // 投资类别 |
| | |
| | | }, |
| | | methods: { |
| | | closeConfig() { |
| | | this.configForm = { |
| | | processDefId: '', |
| | | deployId: '', |
| | | processDefVersion: null, |
| | | projectType: '', // 项目类型 |
| | | fundType: '', // 资金类型 |
| | | investType: '', // 投资类别 |
| | | importanceType: '', // 重点分类 |
| | | } |
| | | this.processConfigShow = false |
| | | }, |
| | | handleConfig(row) { |
| | | const infoArr = row.id.split(":"); |
| | | |
| | | const params = { |
| | | deployId: infoArr[2], |
| | | deployVersion: infoArr[1] |
| | | processDefId: row.id, |
| | | processDefVersion: row.version |
| | | } |
| | | getProcessConfigInfoByDeploy(params).then(res => { |
| | | if (res.data) { |
| | | this.configForm = res.data |
| | | } |
| | | }) |
| | | this.configForm.deployId = infoArr[2] |
| | | this.configForm.deployVersion = infoArr[1] |
| | | this.configForm.processDefId = row.id |
| | | this.configForm.deployId = row.deploymentId |
| | | this.configForm.processDefVersion = row.version |
| | | this.configDeployName = row.name |
| | | this.processConfigShow = true |
| | | }, |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | title="流程启动" |
| | | :title="`流程启动:` + projectInfo.projectName" |
| | | :visible.sync="show" |
| | | width="750px" |
| | | width="950px" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | :before-close="handleClose"> |
| | | <div> |
| | |
| | | label="流程类型" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column label="项目类型" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_project_type" |
| | | :value="scope.row.projectType" |
| | | > |
| | | </dict-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="资金类型" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_funding_type" |
| | | :value="scope.row.fundType" |
| | | > |
| | | </dict-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="投资类别" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_investment_type" |
| | | :value="scope.row.investType" |
| | | > |
| | | </dict-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="重点分类" > |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_key_categories" |
| | | :value="scope.row.importanceType" |
| | | > |
| | | </dict-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="startProcess">启动</el-button> |
| | | <el-button type="danger" @click="startProcess">启动</el-button> |
| | | <el-button type="primary" @click="changeProcess">变更</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {projectSetProcess} from "@/api/projectProcess/projectProcess"; |
| | | |
| | | export default { |
| | | dicts: ['sys_project_type', 'sys_funding_type', 'sys_investment_type', 'sys_key_categories'], |
| | | name: "RunProcess", |
| | | props: { |
| | | show: { |
| | | require: true, |
| | | required: true, |
| | | type: Boolean |
| | | }, |
| | | projectId: { |
| | | require: true, // 项目id |
| | | type: Number |
| | | projectInfo: { |
| | | required: true, // 项目id、名称 |
| | | type: Object |
| | | }, |
| | | processList: { // 流程列表 |
| | | require: true, |
| | | required: true, |
| | | type: Array |
| | | }, |
| | | nowProcessId: { // 当前项目绑定的流程id |
| | | require: true, |
| | | required: true, |
| | | type: String |
| | | }, |
| | | nowProcessName: { |
| | | require: true, |
| | | required: true, |
| | | type: String |
| | | } |
| | | }, |
| | | watch: { |
| | | // 监听回显值 |
| | | nowProcessId(newVal, oldVal) { |
| | | console.log("传入值:", newVal, this.processList) |
| | | this.processList.forEach((item,index) => { |
| | | if(item.id == newVal){ |
| | | console.log(item.id, newVal, item.id === newVal) |
| | | if(item.id === newVal){ |
| | | console.log("wwwwwww") |
| | | this.selectProcessId = newVal |
| | | this.$nextTick(() => { |
| | | this.$refs.myTable.toggleRowSelection(item); |
| | | }) |
| | |
| | | }, |
| | | // 变更流程 |
| | | changeProcess() { |
| | | |
| | | if (!this.selectProcessId) { |
| | | this.$message.error("选则一个流程后才能变更") |
| | | return |
| | | } |
| | | const data = { |
| | | projectId: this.projectInfo.projectId, |
| | | flowableProcessId: this.selectProcessId |
| | | } |
| | | projectSetProcess(data).then(res => { |
| | | this.$message.success("变更成功") |
| | | this.handleClose() |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.$emit("close") |
| | |
| | | :currentColumns="columns" |
| | | /> |
| | | |
| | | <RunProcess :show="showRunProcess" :now-process-id="nowProcessId" :now-process-name="nowProcessName" :process-list="processList" @close="closeRunProcess"></RunProcess> |
| | | <RunProcess :show="showRunProcess" |
| | | :now-process-id="nowProcessId" |
| | | :now-process-name="nowProcessName" |
| | | :project-info="projectRunFrom" |
| | | :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 { getProjectProcess } 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"; |
| | | import {getProcessConfigInfoList} from "@/api/projectProcess/processConfigInfo"; |
| | | |
| | | export default { |
| | | dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | projectRunFrom: { |
| | | projectId: null, |
| | | projectName: '' |
| | | }, |
| | | processList: [], |
| | | showRunProcess: false, |
| | | projectId: null, |
| | | nowProcessId: '', |
| | | nowProcessName: '', |
| | | isImportOrExport: false, |
| | |
| | | methods: { |
| | | closeRunProcess() { |
| | | this.showRunProcess = false |
| | | this.getList() |
| | | }, |
| | | // 打开流程页面 |
| | | openOpProcess(row) { |
| | | this.projectId = row.id; |
| | | this.nowProcessId = row.flowableProcessId; |
| | | this.nowProcessName = row.flowableProcessName; |
| | | // 拿到流程列表 |
| | | listDefinition(this.queryParams).then(response => { |
| | | this.processList = response.data.records; |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | getProcessConfigInfoList().then(response => { |
| | | this.processList = response.data; |
| | | this.projectRunFrom.projectId = row.id; |
| | | this.projectRunFrom.projectName = row.projectName; |
| | | this.nowProcessId = row.flowableProcessId; |
| | | this.nowProcessName = row.flowableProcessName; |
| | | this.showRunProcess = true; |
| | | }); |
| | | }, |
| | |
| | | /** 查询项目管理基础信息列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | getProjectProcesss(this.queryParams).then(response => { |
| | | getProjectProcess(this.queryParams).then(response => { |
| | | this.projectInfoList = response.data; |
| | | this.total = response.total; |
| | | }); |