update 项目合规流程-发起、发起节点保存
This commit is contained in:
@@ -367,6 +367,10 @@ const queryStandardClauseList = (params) => postAction('/process/projectAssess/p
|
||||
const initiateProjectComplianceEvaluation = (params) => postAction('/process/projectAssess/startProcess', params)
|
||||
// 提交
|
||||
const submitProjectComplianceEvaluation = (params) => postAction('/process/projectAssess/submit', params)
|
||||
// 保存
|
||||
const saveProjectComplianceEvaluation = (params) => postAction('/process/projectAssess/saveToDraft', params)
|
||||
// 获取流程数据
|
||||
const queryProjectComplianceEvaluation = (params) => getAction('/process/projectAssess/queryProcessInfoVO', params)
|
||||
|
||||
export {
|
||||
getProcessNodeList,
|
||||
@@ -552,5 +556,7 @@ export {
|
||||
queryProjectRegulationList,
|
||||
queryStandardClauseList,
|
||||
initiateProjectComplianceEvaluation,
|
||||
submitProjectComplianceEvaluation
|
||||
submitProjectComplianceEvaluation,
|
||||
saveProjectComplianceEvaluation,
|
||||
queryProjectComplianceEvaluation
|
||||
}
|
||||
|
||||
@@ -121,6 +121,10 @@ export default {
|
||||
case '2':
|
||||
path = '/workCenter/StandardConsultationProcess'
|
||||
break
|
||||
// 项目合规评估流程
|
||||
case '3':
|
||||
path = '/workCenter/ProjectComplianceEvaluationProcess'
|
||||
break
|
||||
// 法规采购流程
|
||||
case '6':
|
||||
path = '/workCenter/StandardProcurementProcess'
|
||||
|
||||
@@ -160,6 +160,10 @@ export default {
|
||||
case '2':
|
||||
path = '/workCenter/StandardConsultationProcess'
|
||||
break
|
||||
// 项目合规评估流程
|
||||
case '3':
|
||||
path = '/workCenter/ProjectComplianceEvaluationProcess'
|
||||
break
|
||||
// 法规采购流程
|
||||
case '6':
|
||||
path = '/workCenter/StandardProcurementProcess'
|
||||
|
||||
+92
-49
@@ -92,7 +92,11 @@
|
||||
|
||||
<!--发起第二步选择项目、第三步添加标准,采用引入组件的方式-->
|
||||
<keep-alive>
|
||||
<component :is="comp" v-if="comp" ref="projectStandardTable" :project-id="projectId" />
|
||||
<component :is="comp"
|
||||
v-if="comp"
|
||||
ref="projectStandardTable"
|
||||
:project-id="projectId"
|
||||
:echo-data-source="currentStep === 1 ? projectDataSource : standardDataSource" />
|
||||
</keep-alive>
|
||||
|
||||
<!--业务分派信息-->
|
||||
@@ -109,7 +113,7 @@
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
:rowKey="(record,index)=>{return index}"
|
||||
rowKey="tableRowKey"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
@@ -175,7 +179,7 @@
|
||||
|
||||
<!--操作(删除)-->
|
||||
<template v-slot:action="{text, record}">
|
||||
<a @click="handleDelete(record.id)">{{ $t('delete') }}</a>
|
||||
<a @click="handleDelete(record.tableRowKey)">{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
<!--操作(不涉及/不涉及原因)-->
|
||||
@@ -321,11 +325,15 @@ import UserSelection from '../../../components/selection/UserSelection'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||
import UninvolvedModal from './modules/UninvolvedModal'
|
||||
import JExpandTable from '../../../components/JExpandTable'
|
||||
import { queryStandardClauseList, initiateProjectComplianceEvaluation, submitProjectComplianceEvaluation } from '../../../api/workCenter'
|
||||
import {
|
||||
queryStandardClauseList,
|
||||
initiateProjectComplianceEvaluation,
|
||||
submitProjectComplianceEvaluation,
|
||||
saveProjectComplianceEvaluation,
|
||||
queryProjectComplianceEvaluation
|
||||
} 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: {
|
||||
@@ -567,7 +575,8 @@ export default {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
echoDataSource: [] // 发起节点,保存第二、三步回显的表格数据
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -753,49 +762,62 @@ export default {
|
||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.regulatoryEngineerFiling.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()
|
||||
// }
|
||||
created () {
|
||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||
this.currentNode = this.$route.query.nodeId || ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
this.initProcessInfo()
|
||||
} else {
|
||||
this.currentNode = ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
}
|
||||
this.getPersonInfoStructure(ProcessKey.PROJECT_COMPLIANCE_EVALUATION.value, () => {
|
||||
this.initPersonInfoData()
|
||||
this.initPersonInfoData(this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value)
|
||||
})
|
||||
},
|
||||
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
|
||||
const params = {
|
||||
draftId: this.$route.query.draftId,
|
||||
processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId
|
||||
}
|
||||
// 流程审批信息
|
||||
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)
|
||||
this.loading = true
|
||||
queryProjectComplianceEvaluation(params).then(res => {
|
||||
if (res.success) {
|
||||
const { result = {} } = res
|
||||
const draftResult = JSON.parse(result.infoJsonStr)
|
||||
// 流程信息
|
||||
this.processInfo = Object.assign({}, result.basicProcessInfoDTO)
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
// 步骤条回显
|
||||
this.currentStep = draftResult.currentStep
|
||||
// 项目信息
|
||||
this.projectDataSource = draftResult.projectList
|
||||
// 标准信息
|
||||
this.standardDataSource = draftResult.standardList
|
||||
// 业务分派信息
|
||||
this.dataSource = draftResult.dispatchList
|
||||
}
|
||||
// 流程审批信息
|
||||
this.approvalInfo = Object.assign({}, draftResult.approvalInfo)
|
||||
this.$nextTick(() => {
|
||||
if (this.currentStep === 1) {
|
||||
this.echoDataSource = this.projectDataSource
|
||||
}
|
||||
if (this.currentStep === 2) {
|
||||
this.echoDataSource = this.standardDataSource
|
||||
}
|
||||
if (this.processInfoForm) {
|
||||
this.processInfoForm.setFieldsValue(this.processInfo)
|
||||
}
|
||||
if (this.approvalInfoForm) {
|
||||
this.approvalInfoForm.setFieldsValue(this.approvalInfo)
|
||||
}
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -858,7 +880,11 @@ export default {
|
||||
})
|
||||
queryStandardClauseList(params).then(res => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result || []
|
||||
const data = res.result || []
|
||||
this.dataSource = data.map((item, index) => {
|
||||
item.tableRowKey = index
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -948,6 +974,7 @@ export default {
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
onSelectChange (selectedRowKeys) {
|
||||
console.log(selectedRowKeys)
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
},
|
||||
/**
|
||||
@@ -970,10 +997,13 @@ export default {
|
||||
handleUserChange (list, record, index, fieldName) {
|
||||
record[fieldName] = list.map(tt => tt.id).join(',')
|
||||
record[fieldName + '_dictText'] = list.map(tt => tt.realname + '(' + tt.username + ')').join(',')
|
||||
this.$set(this.dataSource, index, record)
|
||||
},
|
||||
handleDelete (id) {
|
||||
const index = this.dataSource.findIndex(tt => tt.id === id)
|
||||
/**
|
||||
* 删除
|
||||
* @param rowKey
|
||||
*/
|
||||
handleDelete (rowKey) {
|
||||
const index = this.dataSource.findIndex(tt => tt.tableRowKey === rowKey)
|
||||
if (index !== -1) {
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
@@ -1064,7 +1094,7 @@ export default {
|
||||
handleSave () {
|
||||
const formData = {}
|
||||
// 流程信息
|
||||
formData.processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||
const processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
// 记录当前在哪一步
|
||||
formData.currentStep = this.currentStep
|
||||
@@ -1086,9 +1116,22 @@ export default {
|
||||
// 流程审批信息
|
||||
formData.approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
|
||||
const params = {
|
||||
saveMap: JSON.stringify(formData)
|
||||
infoJsonStr: JSON.stringify(formData),
|
||||
basicProcessInfoDTO: processInfo,
|
||||
draftId: this.$route.query.draftId
|
||||
}
|
||||
console.log(params)
|
||||
this.loading = true
|
||||
saveProjectComplianceEvaluation(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 提交
|
||||
|
||||
@@ -33,6 +33,16 @@ import SelectProjectModal from '../modules/SelectProjectModal'
|
||||
export default {
|
||||
name: 'ProjectTable',
|
||||
components: { JTable, SelectProjectModal },
|
||||
props: {
|
||||
// 回显的数据
|
||||
echoDataSource: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
columns: [
|
||||
@@ -60,6 +70,17 @@ export default {
|
||||
rowIds: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
echoDataSource: {
|
||||
handler() {
|
||||
if (this.echoDataSource && this.echoDataSource.length > 0) {
|
||||
this.dataSource = JSON.parse(JSON.stringify(this.echoDataSource))
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAdd () {
|
||||
this.$refs.selectProjectModal.open(this.rowIds)
|
||||
|
||||
@@ -52,6 +52,14 @@ export default {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
// 回显的数据
|
||||
echoDataSource: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -118,6 +126,17 @@ export default {
|
||||
rowIds: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
echoDataSource: {
|
||||
handler() {
|
||||
if (this.echoDataSource && this.echoDataSource.length > 0) {
|
||||
this.dataSource = JSON.parse(JSON.stringify(this.echoDataSource))
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAdd () {
|
||||
this.$refs.selectStandardDrawer.open(this.projectId)
|
||||
|
||||
Reference in New Issue
Block a user