diff --git a/src/api/workCenter.js b/src/api/workCenter.js index f75bed0c..7d8b1912 100644 --- a/src/api/workCenter.js +++ b/src/api/workCenter.js @@ -1,7 +1,7 @@ import { getAction, postAction } from './manage.js' // 查询定义流程列表 -const getProcessNodeList = (params) => getAction('/process/fb/processFbInfo/getNodeList', params) +const getProcessNodeList = (params) => getAction('/activiti/getNodeList', params) // 流程配置-部署 const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params) @@ -43,6 +43,8 @@ const activelyReportAgree = (params) => postAction('/process/es/annualReport/agr const activelyReportReject = (params) => postAction('/process/es/annualReport/reject', params) // 根据流程id获取流程信息 const activelyReportGetDataById = (taskId, params) => getAction(`/process/es/annualReport/handle/${taskId}`, params) +// 草稿的办理回显数据 +const activelyReportGetDataDraft = (params) => getAction('', params) // 年度制修订计划(标准化发起) // 发起 @@ -363,6 +365,7 @@ export { activelyReportAgree, activelyReportReject, activelyReportGetDataById, + activelyReportGetDataDraft, standardizationInitApproval, standardizationInitSave, diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js index a4c88bea..118aa3ad 100644 --- a/src/enums/commonEnums.js +++ b/src/enums/commonEnums.js @@ -415,6 +415,17 @@ export const EsInitChangeNodes = new EsEnums({ mainDrafterCopy: { text: '主起草人抄送', value: 'sid-08D0381A-5C20-4708-9D73-C7EB5C51DB02' } }) +// 年度制修订计划-各部门主动上报 +export const EsRevisionPlanActivityReportNodes = new EsEnums({ + standardizationStart: { text: '标准化工程师发起', value: 'sid-A6DD8A92-30D8-4733-9EE3-D8C6636D73C6' }, + contactEnterSendTask: { text: '各部所联络人 填写/下发任务', value: 'sid-ECCB8ADE-F528-482C-8714-0D33471EF662' }, + contactEnterEs: { text: '工作组/所联络人填写企标', value: 'sid-B6F66797-8F09-4B84-AA8E-28B841067217' }, + contactLeaderApproval: { text: '收集联络人主管级领导审批', value: 'sid-2A8155BC-4634-4353-BD0E-89CE07F0D335' }, + contactsApproval: { text: '各部所联络人汇总', value: 'sid-69F04E36-5EDB-4693-8284-FFF3FCBE2B3D' }, + contactLeaderLeaderApproval: { text: '联络人主管级上一级领导审批', value: 'sid-60783E25-8671-404F-9E7D-B9181CA07B69' }, + standardizationSumUp: { text: '标准化工程师归档', value: 'sid-482034AD-DB3C-4A93-9E0D-B8834F4767F0' } +}) + // 企标更改流程 export const EsChangeNodes = new EsEnums({ mainDrafterStart: { text: '主起草人发起', value: 'sid-030A34BF-65B2-460C-BCAB-4BFEE0F77987' }, diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue index c18ca831..ac7bd1ef 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/RevisionPlanActivelyReportFlow.vue @@ -51,7 +51,7 @@ - +
- +
@@ -157,22 +157,12 @@ import { activelyReportTurnTo, activelyReportAgree, activelyReportReject, - activelyReportGetDataById + activelyReportGetDataById, + activelyReportGetDataDraft } from '@/api/workCenter' import pick from 'lodash.pick' import { WorkCenterMixin } from '@/mixins/WorkCenterMixin' -import { ProcessKey } from '@/enums/commonEnums' - -const taskNameConstant = { - STANDARD_ENGINEER_INIT: '标准化工程师发起', - CONTACT_USER_DISTRIBUTE: '各部所联络人 填写/下发任务', - WORK_GROUP_COLLECT: '工作组联络人 线下收集,填写计划内容(可跳过)', - COLLECT_LEADER_APPROVAL: '收集联络人主管级领导审批', - CONTACT_USER_COLLECT: '各部所联络人汇总', - CONTACT_USER_LEADER_APPROVAL: '联络人主管级上级领导审批', - CONTACT_USER_EDIT: '各部所联络人修改调整', - STANDARD_ENGINEER_COLLECT: '标准化工程师归档' -} +import { ProcessKey, EsRevisionPlanActivityReportNodes } from '@/enums/commonEnums' export default { name: 'RevisionPlanActivelyReportFlow', @@ -197,37 +187,28 @@ export default { } }, mounted () { - // 获取人员信息结构 - this.getPersonInfoStructure(ProcessKey.ES_ANNUAL_REPORT.value) - if (this.$route.query.taskId) { - this.currentNodeName = this.$route.query.taskName - // 有流程id说明是从流程中心来的,需要初始化数据 - this.getProcessData(this.$route.query.taskId) - } else { - this.currentNodeName = '标准化工程师发起' - } // 初始化节点 - const taskName = this.$route.query.taskName - if (taskName) { - if (taskName === taskNameConstant.STANDARD_ENGINEER_INIT) { + const nodeId = this.$route.query.nodeId + if (nodeId) { + if (nodeId === EsRevisionPlanActivityReportNodes.standardizationStart.value) { // 标准化工程师发起 this.currentNode = 1 - } else if (taskName === taskNameConstant.CONTACT_USER_DISTRIBUTE) { + } else if (nodeId === EsRevisionPlanActivityReportNodes.contactEnterSendTask.value) { // 各部所联络人 填写/下发任务 this.currentNode = 2 - } else if (taskName === taskNameConstant.WORK_GROUP_COLLECT) { + } else if (nodeId === EsRevisionPlanActivityReportNodes.contactEnterEs.value) { // 工作组联络人 线下收集,填写计划内容(可跳过) this.currentNode = 3 - } else if (taskName === taskNameConstant.COLLECT_LEADER_APPROVAL) { + } else if (nodeId === EsRevisionPlanActivityReportNodes.contactLeaderApproval.value) { // 收集联络人主管级领导审批 this.currentNode = 4 - } else if (taskName === taskNameConstant.CONTACT_USER_COLLECT) { + } else if (nodeId === EsRevisionPlanActivityReportNodes.contactsApproval.value) { // 各部所联络人汇总 this.currentNode = 5 - } else if (taskName === taskNameConstant.CONTACT_USER_LEADER_APPROVAL) { + } else if (nodeId === EsRevisionPlanActivityReportNodes.contactLeaderLeaderApproval.value) { // 联络人主管级上级领导审批 this.currentNode = 6 - } else if (taskName === taskNameConstant.STANDARD_ENGINEER_COLLECT) { + } else if (nodeId === EsRevisionPlanActivityReportNodes.standardizationSumUp.value) { // 标准化工程师归档 this.currentNode = 7 } else { @@ -235,9 +216,32 @@ export default { this.currentNode = 999 } } - // 如果不是第一个节点,人员信息全部不可选 - if (this.currentNode !== 1) { - this.initPersonInfoData() + // 获取人员信息结构 + this.getPersonInfoStructure(ProcessKey.ES_ANNUAL_REPORT.value, () => { + if (this.$route.query.processInstanceId) { + if (this.currentNode === 1) { + this.disabled = false + this.initPersonInfoData(true) + } else { + this.disabled = true + // 如果不是第一个节点,人员信息全部不可选 + this.initPersonInfoData(false) + } + } + }) + if (this.$route.query.taskId && !this.$route.query.draftId) { + // 有流程id说明是从流程中心来的,需要初始化数据 + this.getProcessData('todo', { taskId: this.$route.query.taskId }) + } + if (this.$route.query.draftId) { + // 有草稿id,说明是从流程中心-草稿来的,需要初始化数据 + this.getProcessData('draft', { draftId: this.$route.query.draftId, projectId: this.$route.query.projectId }) + } + if (this.$route.query.taskName) { + // 说明是已发起流程 + this.currentNodeName = this.$route.query.taskName + } else { + this.currentNodeName = '发起人发起' } // 如果是查看进入的,不可编辑,不可操作 if (this.$route.query.onlyLook) { @@ -247,6 +251,7 @@ export default { }, data () { return { + ProcessKey, switchValue: 'base', loading: false, processInfoForm: this.$form.createForm(this), @@ -301,15 +306,26 @@ export default { } }, methods: { - getProcessData (taskId) { - activelyReportGetDataById(taskId).then(res => { + getProcessData (type, param) { + let func + let params = {} + if (type === 'todo') { + func = activelyReportGetDataById + params = param.taskId + } else { + func = activelyReportGetDataDraft + params = param + } + func(params).then(res => { if (res.success) { this.model = res.result this.$nextTick(() => { // 初始化流程信息,节点1没有制修订计划说明,其余节点都有制修订计划说明 this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes', 'processDescription')) - // 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息 - // this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile')) + // 初始化流程审批信息,草稿进来的才回显审批信息 + if (type === 'draft') { + this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile')) + } }) // 初始化业务基本信息 if (this.currentNode === 1) { diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskModal.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskModal.vue index 556a119d..0ec88af2 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskModal.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/ContactEnterSendTaskModal.vue @@ -149,12 +149,12 @@ + @@ -538,7 +538,7 @@ import UploadFile from '@/components/UploadFile' import { getTreeList } from '@/api/enterpriseStandardLibraryApi' import Vue from 'vue' import { USER_INFO } from '@/store/mutation-types' -import { getEnStandardNo } from '@/api/workCenter' +// import { getEnStandardNo } from '@/api/workCenter' import TreeSelection from '@/components/selection/TreeSelection' export default { @@ -734,18 +734,18 @@ export default { } }, watch: { - // 企业标准代号 - 'formInline.enStandardCode' (value) { - this.getEnStandardNo() - }, - // 企业名称代号 - 'formInline.enNameCode' (value) { - this.getEnStandardNo() - }, - // 标准类别代号 - 'formInline.standardCategoryCode' (value) { - this.getEnStandardNo() - } + // // 企业标准代号 + // 'formInline.enStandardCode' (value) { + // this.getEnStandardNo() + // }, + // // 企业名称代号 + // 'formInline.enNameCode' (value) { + // this.getEnStandardNo() + // }, + // // 标准类别代号 + // 'formInline.standardCategoryCode' (value) { + // this.getEnStandardNo() + // } }, mounted () { this.getWorkGroupTree() @@ -789,39 +789,39 @@ export default { this.disabled = true }, // watch监视年代号会滞后 - decadeCodeChange (value) { - this.getEnStandardNo() - }, + // decadeCodeChange (value) { + // this.getEnStandardNo() + // }, // 根据三个代号和一个年代号获取企标编号 - getEnStandardNo () { - // 如果是制定根据填的三个代号和一个年代号获取 - if (this.formInline.projectType === ProjectType.ENACT.value) { - if (!this.formInline.enStandardCode || !this.formInline.enNameCode || - !this.formInline.standardCategoryCode || !this.formInline.decadeCode) { - return - } - const param = {} - param.enStandardCode = this.formInline.enStandardCode - param.enNameCode = this.formInline.enNameCode - param.standardCategoryCode = this.formInline.standardCategoryCode - param.decadeCode = this.formInline.decadeCode - getEnStandardNo(param).then(res => { - if (res.success) { - this.$set(this.formInline, 'newEnStandardNo', res.message) - this.$forceUpdate() - } - }) - } else { - // 是修订,通过选中的企标编号和年代号拼接新企标编号 - if (this.formInline.originEnStandardNo && this.formInline.decadeCode) { - const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode - this.$set(this.formInline, 'newEnStandardNo', standardNo) - this.$forceUpdate() - // 返回流程名称 - this.returnProcessName() - } - } - }, + // getEnStandardNo () { + // // 如果是制定根据填的三个代号和一个年代号获取 + // if (this.formInline.projectType === ProjectType.ENACT.value) { + // if (!this.formInline.enStandardCode || !this.formInline.enNameCode || + // !this.formInline.standardCategoryCode || !this.formInline.decadeCode) { + // return + // } + // const param = {} + // param.enStandardCode = this.formInline.enStandardCode + // param.enNameCode = this.formInline.enNameCode + // param.standardCategoryCode = this.formInline.standardCategoryCode + // param.decadeCode = this.formInline.decadeCode + // getEnStandardNo(param).then(res => { + // if (res.success) { + // this.$set(this.formInline, 'newEnStandardNo', res.message) + // this.$forceUpdate() + // } + // }) + // } else { + // // 是修订,通过选中的企标编号和年代号拼接新企标编号 + // if (this.formInline.originEnStandardNo && this.formInline.decadeCode) { + // const standardNo = this.formInline.originEnStandardNo.split('-')[0] + '-' + this.formInline.decadeCode + // this.$set(this.formInline, 'newEnStandardNo', standardNo) + // this.$forceUpdate() + // // 返回流程名称 + // this.returnProcessName() + // } + // } + // }, // 获取标准体系下拉框数据 initStandardSystemOptions () { getTreeList({ option: 1 }).then(res => { @@ -849,6 +849,10 @@ export default { return item }) }, + // 零部件名称选择完成的回调 + treeSelectNameChange (value, fieldName) { + this.formInline[fieldName + '_dictText'] = value + }, // 授权部门返回参数 authDeptBack (value) { this.formInline.authDept_dictText = value.map(item => item.text).join(',') diff --git a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue index 99498a63..10c533a7 100644 --- a/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue +++ b/src/views/workCenter/annualRevisionPlanActivelyReport/modules/OnlyTableForm.vue @@ -278,10 +278,9 @@ export default { }, methods: { initData (data) { + console.log('--------initData---------', data) // 给表格赋值 - this.$nextTick(() => { - this.dataSource = data.dataList - }) + this.dataSource = data.dataList }, // 外层要获取数据 getData () { diff --git a/src/views/workCenter/processCenter/detail/ProcessDetail.vue b/src/views/workCenter/processCenter/detail/ProcessDetail.vue index 3228d565..2ee0f0bb 100644 --- a/src/views/workCenter/processCenter/detail/ProcessDetail.vue +++ b/src/views/workCenter/processCenter/detail/ProcessDetail.vue @@ -40,7 +40,10 @@ export default { methods: { getPersonInfoStructure (key) { const param = {} - param.processDefinitionKey = key + // param.processDefinitionKey = key + if (this.$route.query.processDefinitionId) { + param.processDefinitionId = this.$route.query.processDefinitionId + } if (this.$route.query.processInstanceId) { param.processInstanceId = this.$route.query.processInstanceId } diff --git a/src/views/workCenter/processCenter/table/DoneList.vue b/src/views/workCenter/processCenter/table/DoneList.vue index df4a8567..7c0d004a 100644 --- a/src/views/workCenter/processCenter/table/DoneList.vue +++ b/src/views/workCenter/processCenter/table/DoneList.vue @@ -245,7 +245,7 @@ export default { path: '/workCenter/processCenter/detail/processDetail', query: { processKey: processKey, - processInstanceId: record.processInstanceId + processDefinitionId: record.processDefinitionId } }) } diff --git a/src/views/workCenter/processCenter/table/MonitorList.vue b/src/views/workCenter/processCenter/table/MonitorList.vue index d7d2d82c..b19dd61b 100644 --- a/src/views/workCenter/processCenter/table/MonitorList.vue +++ b/src/views/workCenter/processCenter/table/MonitorList.vue @@ -257,6 +257,7 @@ export default { path: '/workCenter/processCenter/detail/processDetail', query: { processKey: processKey, + processDefinitionId: record.processDefinitionId, processInstanceId: record.processInstanceId } }) diff --git a/src/views/workCenter/processCenter/table/SentList.vue b/src/views/workCenter/processCenter/table/SentList.vue index f5ed6269..e744ed1f 100644 --- a/src/views/workCenter/processCenter/table/SentList.vue +++ b/src/views/workCenter/processCenter/table/SentList.vue @@ -266,7 +266,7 @@ export default { path: '/workCenter/processCenter/detail/processDetail', query: { processKey: processKey, - processInstanceId: record.processInstanceId + processDefinitionId: record.processDefinitionId } }) },