fix 项目合规流程、未符合项流程保存调整

This commit is contained in:
赵霄
2024-01-10 16:48:15 +08:00
parent a0b1cae045
commit b973182064
2 changed files with 11 additions and 5 deletions
@@ -417,7 +417,7 @@ export default {
if (res.success) {
const { result = {} } = res
// 草稿从json里取得
if (this.$route.query.draftId) {
if (result.infoJsonStr) {
const draftResult = JSON.parse(result.infoJsonStr)
this.processInfo = draftResult.processInfo
this.businessInfo = draftResult.businessInfo
@@ -523,6 +523,7 @@ export default {
const processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
const businessInfo = Object.assign(this.businessInfo, this.businessInfoForm.getFieldsValue())
const approvalInfo = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue())
approvalInfo.taskId = this.$route.query.taskId
const userInfo = this.$refs.personnelInfo.getDataObj()
const checkValueArr = Object.values({ ...processInfo, ...businessInfo, ...approvalInfo, ...userInfo })
if (!checkValueArr.some(tt => !tt) && this.dataSource.length === 0) {
@@ -530,7 +531,11 @@ export default {
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
return
}
const formData = { processInfo, businessInfo, approvalInfo, dataSource: this.dataSource, userInfo }
const formData = {
processInfo, businessInfo, approvalInfo, userInfo,
dataSource: this.dataSource,
basicTaskInfoDTO: approvalInfo
}
this.loading = true
saveNoMatchTrackingProcess({ infoJsonStr: JSON.stringify(formData) }).then(res => {
if (res.success) {
@@ -897,8 +897,8 @@ export default {
if (res.success) {
const { result = {} } = res
this.approvalInfo = Object.assign({}, result.basicTaskInfoDTO)
// 如果草稿,会从json里取数据
if (this.$route.query.draftId) {
// 如果草稿,会从json里取数据
if (result.infoJsonStr) {
const draftResult = JSON.parse(result.infoJsonStr)
// 发起节点数据处理
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
@@ -1318,7 +1318,8 @@ export default {
const params = {
infoJsonStr: JSON.stringify(formData),
basicProcessInfoDTO: processInfo,
draftId: this.$route.query.draftId
draftId: this.$route.query.draftId,
basicTaskInfoDTO: Object.assign(formData.approvalInfo, { taskId: this.$route.query.taskId })
}
this.loading = true
saveProjectComplianceEvaluation(params).then(res => {