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