update 项目合规流程
This commit is contained in:
+96
-32
@@ -127,7 +127,7 @@
|
||||
|
||||
<!--责任单位-->
|
||||
<template v-slot:depart="{text, record, index}">
|
||||
<j-select-depart v-if="record.canAssignFlag"
|
||||
<j-select-depart v-if="record.canAssignFlag + '' === '1'"
|
||||
multi
|
||||
:back-depart="true"
|
||||
:value="record.responsibleUnits"
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
<!--责任单位负责人-->
|
||||
<template v-slot:user="{text, record, index}">
|
||||
<user-selection v-if="record.canAssignFlag"
|
||||
:name-str="record.responsibleUnitLeader_dictText"
|
||||
<user-selection v-if="record.canAssignFlag + '' === '1'"
|
||||
:name-str="record.responsibleUnitLeaders_dictText"
|
||||
:show-btn="false"
|
||||
:value="record.responsibleUnitLeaders"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead')"
|
||||
@@ -324,6 +324,8 @@ import JExpandTable from '../../../components/JExpandTable'
|
||||
import { queryStandardClauseList, initiateProjectComplianceEvaluation, submitProjectComplianceEvaluation } from '../../../api/workCenter'
|
||||
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 {
|
||||
name: 'ProjectComplianceEvaluationProcess',
|
||||
components: {
|
||||
@@ -641,13 +643,13 @@ export default {
|
||||
// 法规工程师发起
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
return this.basicColumns.concat([
|
||||
// 责任单位
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.accountabilityUnit'),
|
||||
dataIndex: 'responsibleUnits',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'depart' }
|
||||
},
|
||||
// // 责任单位
|
||||
// {
|
||||
// title: this.$t('workCenter.projectComplianceEvaluationProcess.accountabilityUnit'),
|
||||
// dataIndex: 'responsibleUnits',
|
||||
// width: 150,
|
||||
// scopedSlots: { customRender: 'depart' }
|
||||
// },
|
||||
// 责任单位负责人
|
||||
{
|
||||
title: this.$t('workCenter.projectComplianceEvaluationProcess.responsibleUnitHead'),
|
||||
@@ -751,18 +753,51 @@ export default {
|
||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.value
|
||||
}
|
||||
},
|
||||
created () {
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
this.currentNode = this.$route.query.nodeId
|
||||
this.initProcessInfo()
|
||||
} else {
|
||||
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
}
|
||||
mounted () {
|
||||
// if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
// this.currentNode = this.$route.query.nodeId
|
||||
// this.initProcessInfo()
|
||||
// } else {
|
||||
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
this.initProcessInfo()
|
||||
// }
|
||||
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
|
||||
this.initPersonInfoData()
|
||||
})
|
||||
},
|
||||
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))
|
||||
// 关联条款列表(发起第四步)
|
||||
processProjectAssessTermList = JSON.parse(JSON.stringify(this.dataSource))
|
||||
// 校验责任单位必填
|
||||
if (processProjectAssessTermList.some(tt => !tt.responsibleUnits)) {
|
||||
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnit'))
|
||||
flag = false
|
||||
}
|
||||
// // 校验责任单位必填
|
||||
// if (processProjectAssessTermList.some(tt => !tt.responsibleUnits)) {
|
||||
// this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnit'))
|
||||
// flag = false
|
||||
// }
|
||||
// 校验责任单位负责人必填
|
||||
if (processProjectAssessTermList.some(tt => !tt.responsibleUnitLeaders)) {
|
||||
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectResponsibleUnitLeader'))
|
||||
flag = false
|
||||
}
|
||||
// 校验责任单位和责任单位负责人是一对一的关系
|
||||
if (processProjectAssessTermList.some(tt => {
|
||||
const responsibleUnitList = (tt.responsibleUnits || '').split(',')
|
||||
const responsibleUnitLeadersList = (tt.responsibleUnitLeaders || '').split(',')
|
||||
return responsibleUnitList.length !== responsibleUnitLeadersList.length
|
||||
})) {
|
||||
this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.aUnitOnlyALeader'))
|
||||
flag = false
|
||||
}
|
||||
// // 校验责任单位和责任单位负责人是一对一的关系
|
||||
// if (processProjectAssessTermList.some(tt => {
|
||||
// const responsibleUnitList = (tt.responsibleUnits || '').split(',')
|
||||
// const responsibleUnitLeadersList = (tt.responsibleUnitLeaders || '').split(',')
|
||||
// return responsibleUnitList.length !== responsibleUnitLeadersList.length
|
||||
// })) {
|
||||
// this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.aUnitOnlyALeader'))
|
||||
// flag = false
|
||||
// }
|
||||
formData.businessInfoDTO = {
|
||||
processProjectAssess, processProjectAssessLinkList, processProjectAssessTermList
|
||||
}
|
||||
@@ -1023,8 +1058,37 @@ export default {
|
||||
}
|
||||
return formData
|
||||
},
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
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