fix 标准法规入库/变更流程保存
This commit is contained in:
+51
-49
@@ -497,51 +497,52 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
|
||||||
this.currentNode = this.$route.query.nodeId || FGEntryChangeProcessNode.initiate.value
|
|
||||||
this.initProcessData()
|
|
||||||
} else {
|
|
||||||
this.currentNode = FGEntryChangeProcessNode.initiate.value
|
|
||||||
// 处理非管理员从国内/海外标准模块进入发起页面,不可修改来源和操作类型
|
|
||||||
if (this.$route.query.source && this.$route.query.operateType) {
|
|
||||||
this.formInline = {
|
|
||||||
source: this.$route.query.source,
|
|
||||||
operateType: this.$route.query.operateType
|
|
||||||
}
|
|
||||||
switch (this.$route.query.source) {
|
|
||||||
// 国内标准
|
|
||||||
case StandardSource.DOMESTIC.value:
|
|
||||||
this.initDomesticStandardForm()
|
|
||||||
if (this.$route.query.standardId) {
|
|
||||||
this.initDomesticFormData(this.$route.query.standardId)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
// 海外标准
|
|
||||||
case StandardSource.OVERSEAS.value:
|
|
||||||
this.initOverseasStandardForm()
|
|
||||||
if (this.$route.query.standardId) {
|
|
||||||
this.initOverseasFormData(this.$route.query.standardId)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 默认选中国内
|
|
||||||
this.initDomesticStandardForm()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 获取按钮清单
|
|
||||||
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
|
|
||||||
if (btnList && btnList.length > 0) {
|
|
||||||
this.btnList = btnList
|
|
||||||
} else {
|
|
||||||
this.btnList = FGEntryChangeProcessNode.approve.btn
|
|
||||||
}
|
|
||||||
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.currentNode) || false
|
|
||||||
// 获取人员信息
|
// 获取人员信息
|
||||||
this.getPersonInfoStructure(this.processKey, () => {
|
this.getPersonInfoStructure(this.processKey, () => {
|
||||||
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
|
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
|
||||||
|
this.currentNode = this.$route.query.nodeId || FGEntryChangeProcessNode.initiate.value
|
||||||
|
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
|
||||||
|
this.initProcessData()
|
||||||
|
} else {
|
||||||
|
this.currentNode = FGEntryChangeProcessNode.initiate.value
|
||||||
|
this.initPersonInfoData(this.currentNode === FGEntryChangeProcessNode.initiate.value)
|
||||||
|
// 处理非管理员从国内/海外标准模块进入发起页面,不可修改来源和操作类型
|
||||||
|
if (this.$route.query.source && this.$route.query.operateType) {
|
||||||
|
this.formInline = {
|
||||||
|
source: this.$route.query.source,
|
||||||
|
operateType: this.$route.query.operateType
|
||||||
|
}
|
||||||
|
switch (this.$route.query.source) {
|
||||||
|
// 国内标准
|
||||||
|
case StandardSource.DOMESTIC.value:
|
||||||
|
this.initDomesticStandardForm()
|
||||||
|
if (this.$route.query.standardId) {
|
||||||
|
this.initDomesticFormData(this.$route.query.standardId)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
// 海外标准
|
||||||
|
case StandardSource.OVERSEAS.value:
|
||||||
|
this.initOverseasStandardForm()
|
||||||
|
if (this.$route.query.standardId) {
|
||||||
|
this.initOverseasFormData(this.$route.query.standardId)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 默认选中国内
|
||||||
|
this.initDomesticStandardForm()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 获取按钮清单
|
||||||
|
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.currentNode)
|
||||||
|
if (btnList && btnList.length > 0) {
|
||||||
|
this.btnList = btnList
|
||||||
|
} else {
|
||||||
|
this.btnList = FGEntryChangeProcessNode.approve.btn
|
||||||
|
}
|
||||||
|
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.currentNode) || false
|
||||||
})
|
})
|
||||||
this.getSourceOptions()
|
this.getSourceOptions()
|
||||||
},
|
},
|
||||||
@@ -554,6 +555,12 @@ export default {
|
|||||||
const { processInstanceId, draftId, taskId, projectId } = this.$route.query
|
const { processInstanceId, draftId, taskId, projectId } = this.$route.query
|
||||||
queryStandardECProcessData({ processInstanceId, draftId, taskId, projectId }).then(async res => {
|
queryStandardECProcessData({ processInstanceId, draftId, taskId, projectId }).then(async res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
let result = res.result || {}
|
||||||
|
// 如果草稿中有内容,就从草稿里取值
|
||||||
|
if (res.result.infoJsonStr) {
|
||||||
|
result = JSON.parse(res.result.infoJsonStr)
|
||||||
|
this.draftInitPersonInfo(result.userInfoMap)
|
||||||
|
}
|
||||||
const businessData = Object.assign({}, { ...res.result.businessInfoDTO.businessMap })
|
const businessData = Object.assign({}, { ...res.result.businessInfoDTO.businessMap })
|
||||||
this.businessId = res.result.businessId
|
this.businessId = res.result.businessId
|
||||||
this.formInline.source = businessData.source
|
this.formInline.source = businessData.source
|
||||||
@@ -571,7 +578,7 @@ export default {
|
|||||||
|
|
||||||
// 处理业务基本信息部分的数据
|
// 处理业务基本信息部分的数据
|
||||||
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
this.formInline = Object.assign({ ...this.formInline }, { ...businessData })
|
this.formInline = { ...Object.assign({ ...this.formInline }, { ...businessData }) }
|
||||||
const nodeId = this.$route.query.nodeId
|
const nodeId = this.$route.query.nodeId
|
||||||
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
||||||
treeMultipleField.forEach(field => {
|
treeMultipleField.forEach(field => {
|
||||||
@@ -584,14 +591,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.formInline[field.dbFieldName] = valueArr
|
this.formInline[field.dbFieldName] = valueArr
|
||||||
} else {
|
|
||||||
this.formInline[field.dbFieldName] = undefined
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value)
|
const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value)
|
||||||
dictField.forEach(field => {
|
|
||||||
this.formInline[field.dbFieldName] = this.formInline[field.dbFieldName] || null
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user