[update] 修改企标制修订流程
This commit is contained in:
+73
-28
@@ -171,11 +171,12 @@ import MainDrafterCollectUploadMinuteBaseInfo from './modules/MainDrafterCollect
|
||||
import MainDrafterUploadMinuteBaseInfo from './modules/MainDrafterUploadMinuteBaseInfo'
|
||||
import OtherDrafterProofreadBaseInfo from './modules/OtherDrafterProofreadBaseInfo'
|
||||
import MainDrafterPublishBaseInfo from './modules/MainDrafterPublishBaseInfo'
|
||||
import { ProcessKey } from '../../../enums/commonEnums'
|
||||
import { ProcessKey, EsRevisionNodes } from '../../../enums/commonEnums'
|
||||
import {
|
||||
enStandardEditAgree,
|
||||
enStandardEditApproval,
|
||||
enStandardEditGetDataById,
|
||||
enStandardEditGetDataDraft,
|
||||
enStandardEditReject,
|
||||
enStandardEditSave,
|
||||
enStandardEditTurnTo
|
||||
@@ -212,43 +213,61 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
// 初始化节点
|
||||
const taskName = this.$route.query.taskName
|
||||
if (taskName) {
|
||||
if (taskName === '主起草人起草分发') {
|
||||
const nodeId = this.$route.query.nodeId
|
||||
if (nodeId) {
|
||||
if (nodeId === EsRevisionNodes.mainDrafterSend.value) {
|
||||
// 主起草人起草分发
|
||||
this.currentNode = 1
|
||||
} else if (taskName === '其他起草人上传企标') {
|
||||
} else if (nodeId === EsRevisionNodes.otherDrafterUploadStandard.value) {
|
||||
// 其他起草人上传企标
|
||||
this.currentNode = 2
|
||||
} else if (taskName === '主起草人汇总上传会议纪要') {
|
||||
} else if (nodeId === EsRevisionNodes.mainDrafterAllUploadMinute.value) {
|
||||
// 主起草人汇总上传会议纪要
|
||||
this.currentNode = 3
|
||||
} else if (taskName === '标准化审核') {
|
||||
} else if (nodeId === EsRevisionNodes.standardizationAudit.value) {
|
||||
// 标准化审核
|
||||
this.currentNode = 4
|
||||
} else if (taskName === '评分人评分') {
|
||||
} else if (nodeId === EsRevisionNodes.scorerMark.value) {
|
||||
// 评分人打分
|
||||
this.currentNode = 5
|
||||
} else if (taskName === '标准化确认是否开启征求意见') {
|
||||
} else if (nodeId === EsRevisionNodes.standardizationConfirmIsStartAdvice.value) {
|
||||
// 标准化确认是否开启征求意见
|
||||
this.currentNode = 6
|
||||
} else if (taskName === '部所联络人下发') {
|
||||
} else if (nodeId === EsRevisionNodes.contactSend.value) {
|
||||
// 部所联络人下发
|
||||
this.currentNode = 7
|
||||
} else if (taskName === '征求意见对象填写意见') {
|
||||
} else if (nodeId === EsRevisionNodes.takeAdviceObjectEnterAdvice.value) {
|
||||
// 征求意见对象填写意见
|
||||
this.currentNode = 8
|
||||
} else if (taskName === '部所联络人汇总数据') {
|
||||
} else if (nodeId === EsRevisionNodes.contactAll.value) {
|
||||
// 部所联络人汇总数据
|
||||
this.currentNode = 9
|
||||
} else if (taskName === '部门联络人主管级领导审批') {
|
||||
} else if (nodeId === EsRevisionNodes.contactLeaderApproval.value) {
|
||||
// 部门联络人主管级领导审批
|
||||
this.currentNode = 10
|
||||
} else if (taskName === '主起草人汇总') {
|
||||
} else if (nodeId === EsRevisionNodes.mainDrafterAll.value) {
|
||||
// 主起草人汇总
|
||||
this.currentNode = 11
|
||||
} else if (taskName === '主起草人上传会议纪要') {
|
||||
} else if (nodeId === EsRevisionNodes.mainDrafterUploadMinute.value) {
|
||||
// 主起草人上传会议纪要
|
||||
this.currentNode = 12
|
||||
} else if (taskName === '其他起草人校对') {
|
||||
} else if (nodeId === EsRevisionNodes.otherDrafterProofread.value) {
|
||||
// 其他起草人校对
|
||||
this.currentNode = 13
|
||||
} else if (taskName === '主管级领导审批') {
|
||||
} else if (nodeId === EsRevisionNodes.leaderApproval.value) {
|
||||
// 主管级领导审批
|
||||
this.currentNode = 14
|
||||
} else if (taskName === '标准化审批') {
|
||||
} else if (nodeId === EsRevisionNodes.standardizationApproval.value) {
|
||||
// 标准化审批
|
||||
this.currentNode = 15
|
||||
} else if (taskName === '相关部门领导会签') {
|
||||
} else if (nodeId === EsRevisionNodes.relatedDeptLeaderCountersign.value) {
|
||||
// 相关部门领导会签
|
||||
this.currentNode = 16
|
||||
} else if (taskName === '总工程师审批') {
|
||||
} else if (nodeId === EsRevisionNodes.allEngineerApproval.value) {
|
||||
// 总工程师审批
|
||||
this.currentNode = 17
|
||||
} else if (taskName === '主起草人发布') {
|
||||
} else if (nodeId === EsRevisionNodes.mainDrafterPublish.value) {
|
||||
// 主起草人发布
|
||||
this.currentNode = 18
|
||||
} else {
|
||||
// 预留加签节点
|
||||
@@ -259,19 +278,34 @@ export default {
|
||||
this.getPersonInfoStructure(ProcessKey.ES_EDIT.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.currentNodeName = this.$route.query.taskName
|
||||
if (this.$route.query.taskId && !this.$route.query.draftId) {
|
||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||
this.getProcessData(this.$route.query.taskId)
|
||||
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.currentNode === 1 && this.$route.query.taskId) {
|
||||
// // 有任务id说明是从待办进来的至少是自动发起
|
||||
// this.flowInitType = 'auto'
|
||||
// }
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -333,15 +367,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 根据流程id获取数据并回显
|
||||
getProcessData (taskId) {
|
||||
enStandardEditGetDataById(taskId).then(res => {
|
||||
getProcessData (type, param) {
|
||||
let func
|
||||
let params = {}
|
||||
if (type === 'todo') {
|
||||
func = enStandardEditGetDataById
|
||||
params = param.taskId
|
||||
} else {
|
||||
func = enStandardEditGetDataDraft
|
||||
params = param
|
||||
}
|
||||
func(params).then(res => {
|
||||
if (res.success) {
|
||||
this.model = res.result
|
||||
this.$nextTick(() => {
|
||||
// 初始化流程信息
|
||||
this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes'))
|
||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
|
||||
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||
if (type === 'draft') {
|
||||
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||
}
|
||||
})
|
||||
// 初始化业务基本信息中组件内容
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user