update 项目合规流程
This commit is contained in:
+96
-32
@@ -127,7 +127,7 @@
|
|||||||
|
|
||||||
<!--责任单位-->
|
<!--责任单位-->
|
||||||
<template v-slot:depart="{text, record, index}">
|
<template v-slot:depart="{text, record, index}">
|
||||||
<j-select-depart v-if="record.canAssignFlag"
|
<j-select-depart v-if="record.canAssignFlag + '' === '1'"
|
||||||
multi
|
multi
|
||||||
:back-depart="true"
|
:back-depart="true"
|
||||||
:value="record.responsibleUnits"
|
:value="record.responsibleUnits"
|
||||||
@@ -137,8 +137,8 @@
|
|||||||
|
|
||||||
<!--责任单位负责人-->
|
<!--责任单位负责人-->
|
||||||
<template v-slot:user="{text, record, index}">
|
<template v-slot:user="{text, record, index}">
|
||||||
<user-selection v-if="record.canAssignFlag"
|
<user-selection v-if="record.canAssignFlag + '' === '1'"
|
||||||
:name-str="record.responsibleUnitLeader_dictText"
|
:name-str="record.responsibleUnitLeaders_dictText"
|
||||||
:show-btn="false"
|
:show-btn="false"
|
||||||
:value="record.responsibleUnitLeaders"
|
:value="record.responsibleUnitLeaders"
|
||||||
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead')"
|
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead')"
|
||||||
@@ -324,6 +324,8 @@ import JExpandTable from '../../../components/JExpandTable'
|
|||||||
import { queryStandardClauseList, initiateProjectComplianceEvaluation, submitProjectComplianceEvaluation } from '../../../api/workCenter'
|
import { queryStandardClauseList, initiateProjectComplianceEvaluation, submitProjectComplianceEvaluation } from '../../../api/workCenter'
|
||||||
import SplitClauseDetail from '../../documentTool/documentSplit/modules/SplitClauseDetail'
|
import SplitClauseDetail from '../../documentTool/documentSplit/modules/SplitClauseDetail'
|
||||||
|
|
||||||
|
const saveJson = '{"processInfo":{"processName":"zx测试流程01","processDueDate":"2023-12-31","processDescription":"流程说明"},"currentStep":1,"projectList":[{"id":"1701513651987582978","projectSource":"1","projectName":"ZX测试项目01","projectLeader":"1701412226645331970","workNumber":"ZXTESTPROJECT01","projectHealth":"3","createBy":"admin","createTime":"2023-09-12 16:30:42","updateBy":null,"updateTime":"2023-09-12 16:30:42","orgCode":null,"delFlag":"0","nameWorkNo":null,"projectSource_dictText":"本地新增","projectLeader_dictText":"赵霄-管理员(zx-admin)","projectHealth_dictText":"正常"}],"standardList":[],"dispatchList":[],"approvalInfo":{}}'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProjectComplianceEvaluationProcess',
|
name: 'ProjectComplianceEvaluationProcess',
|
||||||
components: {
|
components: {
|
||||||
@@ -641,13 +643,13 @@ export default {
|
|||||||
// 法规工程师发起
|
// 法规工程师发起
|
||||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||||
return this.basicColumns.concat([
|
return this.basicColumns.concat([
|
||||||
// 责任单位
|
// // 责任单位
|
||||||
{
|
// {
|
||||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.accountabilityUnit'),
|
// title: this.$t('workCenter.projectComplianceEvaluationProcess.accountabilityUnit'),
|
||||||
dataIndex: 'responsibleUnits',
|
// dataIndex: 'responsibleUnits',
|
||||||
width: 150,
|
// width: 150,
|
||||||
scopedSlots: { customRender: 'depart' }
|
// scopedSlots: { customRender: 'depart' }
|
||||||
},
|
// },
|
||||||
// 责任单位负责人
|
// 责任单位负责人
|
||||||
{
|
{
|
||||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead'),
|
title: this.$t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead'),
|
||||||
@@ -751,18 +753,51 @@ export default {
|
|||||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value
|
return this.currentNode === ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
mounted () {
|
||||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
// if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||||
this.currentNode = this.$route.query.nodeId
|
// this.currentNode = this.$route.query.nodeId
|
||||||
this.initProcessInfo()
|
// this.initProcessInfo()
|
||||||
} else {
|
// } else {
|
||||||
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
|
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
|
||||||
}
|
this.initProcessInfo()
|
||||||
|
// }
|
||||||
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
|
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
|
||||||
this.initPersonInfoData()
|
this.initPersonInfoData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initProcessInfo () {
|
||||||
|
const result = JSON.parse(saveJson)
|
||||||
|
console.log('数据初始化=======')
|
||||||
|
console.log(result)
|
||||||
|
|
||||||
|
// 流程信息
|
||||||
|
this.processInfo = Object.assign({}, result.processInfo)
|
||||||
|
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||||
|
// 步骤条回显
|
||||||
|
this.currentStep = result.currentStep
|
||||||
|
// 项目信息
|
||||||
|
this.projectDataSource = result.projectList
|
||||||
|
// 标准信息
|
||||||
|
this.standardDataSource = result.standardDataSource
|
||||||
|
}
|
||||||
|
// 流程审批信息
|
||||||
|
this.approvalInfo = Object.assign({}, result.approvalInfo)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.currentStep === 1) {
|
||||||
|
this.$refs.projectStandardTable.dataSource = this.projectDataSource
|
||||||
|
}
|
||||||
|
if (this.currentStep === 2) {
|
||||||
|
this.$refs.projectStandardTable.dataSource = this.standardDataSource
|
||||||
|
}
|
||||||
|
if (this.processInfoForm) {
|
||||||
|
this.processInfoForm.setFieldsValue(this.processInfo)
|
||||||
|
}
|
||||||
|
if (this.approvalInfoForm) {
|
||||||
|
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 上一步
|
* 上一步
|
||||||
*/
|
*/
|
||||||
@@ -985,25 +1020,25 @@ export default {
|
|||||||
processProjectAssessLinkList = JSON.parse(JSON.stringify(this.standardDataSource))
|
processProjectAssessLinkList = JSON.parse(JSON.stringify(this.standardDataSource))
|
||||||
// 关联条款列表(发起第四步)
|
// 关联条款列表(发起第四步)
|
||||||
processProjectAssessTermList = JSON.parse(JSON.stringify(this.dataSource))
|
processProjectAssessTermList = JSON.parse(JSON.stringify(this.dataSource))
|
||||||
// 校验责任单位必填
|
// // 校验责任单位必填
|
||||||
if (processProjectAssessTermList.some(tt => !tt.responsibleUnits)) {
|
// if (processProjectAssessTermList.some(tt => !tt.responsibleUnits)) {
|
||||||
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnit'))
|
// this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnit'))
|
||||||
flag = false
|
// flag = false
|
||||||
}
|
// }
|
||||||
// 校验责任单位负责人必填
|
// 校验责任单位负责人必填
|
||||||
if (processProjectAssessTermList.some(tt => !tt.responsibleUnitLeaders)) {
|
if (processProjectAssessTermList.some(tt => !tt.responsibleUnitLeaders)) {
|
||||||
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnitLeader'))
|
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnitLeader'))
|
||||||
flag = false
|
flag = false
|
||||||
}
|
}
|
||||||
// 校验责任单位和责任单位负责人是一对一的关系
|
// // 校验责任单位和责任单位负责人是一对一的关系
|
||||||
if (processProjectAssessTermList.some(tt => {
|
// if (processProjectAssessTermList.some(tt => {
|
||||||
const responsibleUnitList = (tt.responsibleUnits || '').split(',')
|
// const responsibleUnitList = (tt.responsibleUnits || '').split(',')
|
||||||
const responsibleUnitLeadersList = (tt.responsibleUnitLeaders || '').split(',')
|
// const responsibleUnitLeadersList = (tt.responsibleUnitLeaders || '').split(',')
|
||||||
return responsibleUnitList.length !== responsibleUnitLeadersList.length
|
// return responsibleUnitList.length !== responsibleUnitLeadersList.length
|
||||||
})) {
|
// })) {
|
||||||
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.aUnitOnlyALeader'))
|
// this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.aUnitOnlyALeader'))
|
||||||
flag = false
|
// flag = false
|
||||||
}
|
// }
|
||||||
formData.businessInfoDTO = {
|
formData.businessInfoDTO = {
|
||||||
processProjectAssess, processProjectAssessLinkList, processProjectAssessTermList
|
processProjectAssess, processProjectAssessLinkList, processProjectAssessTermList
|
||||||
}
|
}
|
||||||
@@ -1023,8 +1058,37 @@ export default {
|
|||||||
}
|
}
|
||||||
return formData
|
return formData
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
handleSave () {
|
handleSave () {
|
||||||
|
const formData = {}
|
||||||
|
// 流程信息
|
||||||
|
formData.processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||||
|
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||||
|
// 记录当前在哪一步
|
||||||
|
formData.currentStep = this.currentStep
|
||||||
|
// 项目列表
|
||||||
|
if (this.currentStep === 1) {
|
||||||
|
formData.projectList = this.$refs.projectStandardTable.getData()
|
||||||
|
} else {
|
||||||
|
formData.projectList = this.projectDataSource
|
||||||
|
}
|
||||||
|
// 标准列表
|
||||||
|
if (this.currentStep === 2) {
|
||||||
|
formData.standardList = this.$refs.projectStandardTable.getData()
|
||||||
|
} else {
|
||||||
|
formData.standardList = this.standardDataSource
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 分发列表
|
||||||
|
formData.dispatchList = this.dataSource
|
||||||
|
// 流程审批信息
|
||||||
|
formData.approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
||||||
|
const params = {
|
||||||
|
saveMap: JSON.stringify(formData)
|
||||||
|
}
|
||||||
|
console.log(params)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 提交
|
* 提交
|
||||||
|
|||||||
Reference in New Issue
Block a user