diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js
index 40ac8887..c782db32 100644
--- a/src/common/lang/workCenter/zh.js
+++ b/src/common/lang/workCenter/zh.js
@@ -381,7 +381,8 @@ module.exports = {
ccPerson: '抄送人员',
pleaseSelectResponsibleUnit: '请选择责任单位',
pleaseSelectResponsibleUnitLeader: '请选择责任单位负责人',
- aUnitOnlyALeader: '一个责任单位只能选择一个责任单位负责人,请检查'
+ aUnitOnlyALeader: '一个责任单位只能选择一个责任单位负责人,请检查',
+ pleaseSelectModuleOwner: '请选择模块负责人'
},
// 未符合项跟踪流程
noMatchTracking: {
diff --git a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue
index ec745904..c7fda305 100644
--- a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue
+++ b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue
@@ -154,13 +154,13 @@
- handleUserChange(value, record, index, 'moduleOwner')" />
+ v-if="!record.notInvolved && record.canAssignFlag + '' === '1'"
+ @listChange="value => handleUserChange(value, record, index, 'moduleOwners')" />
{{ global.emptyLine }}
@@ -172,7 +172,7 @@
:value="record.designEngineer"
:placeholder="$t('pleaseSelect') + $t('workCenter.standardConsultationProcess.designEngineer')"
type="checkbox"
- v-if="!record.uninvolved"
+ v-if="!record.notInvolved"
@listChange="value => handleUserChange(value, record, index, 'designEngineer')" />
{{ global.emptyLine }}
@@ -183,10 +183,10 @@
-
-
+
+
{{
- !record.uninvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
+ !record.notInvolved ? $t('projectLibrary.vehicleItemLibrary.uninvolved') : $t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
}}
@@ -576,12 +576,13 @@ export default {
]
}
},
- echoDataSource: [] // 发起节点,保存第二、三步回显的表格数据
+ businessId: null
}
},
computed: {
pageTitle () {
- return `${this.$t('flowCenter')}${this.$route.meta.title}`
+ const subTitle = this.$route.query.taskName || ProjectComplianceEvaluationProcessNode.initiate.text
+ return `${this.$t('flowCenter')}${this.$route.meta.title}(${subTitle})`
},
// 流程信息禁用
processInfoDisabled () {
@@ -687,7 +688,7 @@ export default {
// 模块负责人
{
title: this.$t('workCenter.standardConsultationProcess.moduleOwner'),
- dataIndex: 'moduleOwner',
+ dataIndex: 'moduleOwners',
width: 150,
scopedSlots: { customRender: 'moduleOwner' }
},
@@ -696,7 +697,7 @@ export default {
title: this.$t('operation'),
fixed: 'right',
width: 120,
- scopedSlots: { customRender: 'uninvolved' }
+ scopedSlots: { customRender: 'notInvolved' }
}
])
}
@@ -715,7 +716,7 @@ export default {
title: this.$t('operation'),
fixed: 'right',
width: 120,
- scopedSlots: { customRender: 'uninvolved' }
+ scopedSlots: { customRender: 'notInvolved' }
}
])
}
@@ -780,34 +781,40 @@ export default {
initProcessInfo () {
const params = {
draftId: this.$route.query.draftId,
- processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId
+ processInstanceId: this.$route.query.draftId ? null : this.$route.query.processInstanceId,
+ taskId: this.$route.query.taskId
}
this.loading = true
queryProjectComplianceEvaluation(params).then(res => {
if (res.success) {
const { result = {} } = res
- const draftResult = JSON.parse(result.infoJsonStr)
+ this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO)
+ // 如果是草稿,会从json里取数据
+ if (this.$route.query.draftId) {
+ const draftResult = JSON.parse(result.infoJsonStr)
+ 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)
+ } else if (this.currentNode === ProjectComplianceEvaluationProcessNode.departLeaderIssued.value) {
+ const dataList = result.businessInfoDTO.processProjectAssessTermList || []
+ this.dataSource = dataList.map((item, index) => {
+ item.tableRowKey = index
+ return item
+ })
+ }
// 流程信息
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.businessId = result.businessId
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)
}
@@ -951,7 +958,7 @@ export default {
break
// 各部门主管级领导下发,批量选择的是模块负责人
case ProjectComplianceEvaluationProcessNode.departLeaderIssued.value:
- fieldName = 'moduleOwner'
+ fieldName = 'moduleOwners'
break
// 模块负责人分发,批量选择的是设计工程师
case ProjectComplianceEvaluationProcessNode.moduleOwnerIssued.value:
@@ -1017,10 +1024,9 @@ export default {
/**
* 不涉及
* @param record
- * @param index
*/
- handleUninvolved (record, index) {
- this.$refs.uninvolvedModal.open(record, index)
+ handleUninvolved (record) {
+ this.$refs.uninvolvedModal.open(record, record.tableRowKey)
},
handleUninvolvedOk (record, index) {
this.$set(this.dataSource, index, record)
@@ -1072,17 +1078,30 @@ export default {
formData.businessInfoDTO = {
processProjectAssess, processProjectAssessLinkList, processProjectAssessTermList
}
+ } else {
+ const data = JSON.parse(JSON.stringify(this.dataSource))
+ formData.businessInfoDTO = {
+ processProjectAssessTermList: data
+ }
+ // 各部门主管级领导下发,校验模块负责人必填
+ if (this.currentNode === ProjectComplianceEvaluationProcessNode.departLeaderIssued.value) {
+ if (data.some(tt => !tt.moduleOwners && !tt.notInvolved)) {
+ this.$message.warning(this.$t('workCenter.projectComplianceEvaluationProcess.pleaseSelectModuleOwner'))
+ flag = false
+ }
+ }
}
// 流程审批意见数据
this.approvalInfoForm.validateFields((errors, values) => {
if (!errors) {
basicTaskInfoDTO = Object.assign(this.approvalInfo, values)
+ basicTaskInfoDTO.taskId = basicTaskInfoDTO.taskId || this.$route.query.taskId
} else {
flag = false
}
})
formData.basicTaskInfoDTO = basicTaskInfoDTO
- console.log(formData)
+ formData.businessId = this.businessId
if (!flag) {
return false
}
diff --git a/src/views/workCenter/projectComplianceEvaluationProcess/modules/UninvolvedModal.vue b/src/views/workCenter/projectComplianceEvaluationProcess/modules/UninvolvedModal.vue
index ee5e4dde..acdcc621 100644
--- a/src/views/workCenter/projectComplianceEvaluationProcess/modules/UninvolvedModal.vue
+++ b/src/views/workCenter/projectComplianceEvaluationProcess/modules/UninvolvedModal.vue
@@ -17,7 +17,7 @@
+ v-decorator="['notInvolved', validatorRules.notInvolved]" />
@@ -49,7 +49,7 @@ export default {
},
validatorRules: {
// 不涉及原因
- uninvolved: {
+ notInvolved: {
rules: [{
required: true,
message: this.$t('pleaseEnter') + this.$t('workCenter.projectComplianceEvaluationProcess.noCauseInvolved')
@@ -71,9 +71,9 @@ export default {
})
},
handleOk (flag) {
- this.validatorRules.uninvolved.rules[0].required = flag
+ this.validatorRules.notInvolved.rules[0].required = flag
if (!flag) {
- this.form.setFieldsValue({ uninvolved: null })
+ this.form.setFieldsValue({ notInvolved: null })
}
this.form.validateFields((errors, values) => {
if (!errors) {