未符合项新增编辑弹框修改
This commit is contained in:
@@ -386,7 +386,7 @@ export default {
|
||||
formInline: {
|
||||
fileLinkList:[{}],
|
||||
progressTrackingList:[{}],
|
||||
approvalEvidenceLink:[{}]
|
||||
approvalEvidenceLinkList:[{}]
|
||||
},
|
||||
formInlinetracking:{},
|
||||
confirmLoading: false,
|
||||
@@ -494,7 +494,7 @@ export default {
|
||||
this.formInline = {
|
||||
fileLinkList:[{}],
|
||||
progressTrackingList:[{}],
|
||||
approvalEvidenceLink:[{}]
|
||||
approvalEvidenceLinkList:[{}]
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
|
||||
@@ -509,6 +509,12 @@ export default {
|
||||
this.disabled = false
|
||||
this.templateDisabled = true
|
||||
this.$nextTick(() => {
|
||||
if(row.dutyTerritory){
|
||||
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
|
||||
}
|
||||
if(row.projectId){
|
||||
this.formInline.projectId = this.formInline.projectId.split(',')
|
||||
}
|
||||
this.formInline = row
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
@@ -588,12 +594,46 @@ export default {
|
||||
url = this.url.add
|
||||
action = postAction
|
||||
}
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
// Object.keys(formInline).forEach(res => {
|
||||
// if (formInline[res] && formInline[res] instanceof Array) {
|
||||
// formInline[res] = formInline[res].join(',')
|
||||
// }
|
||||
// })
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
if(this.formInline.dutyTerritory && this.formInline.dutyTerritory instanceof Array){
|
||||
this.formInline.dutyTerritory = this.formInline.dutyTerritory.join(',')
|
||||
}
|
||||
if(this.formInline.projectId && this.formInline.projectId instanceof Array){
|
||||
this.formInline.projectId = this.formInline.projectId.join(',')
|
||||
}
|
||||
let fileLinkList = []
|
||||
let approvalEvidenceLinkList = []
|
||||
let progressTrackingList = []
|
||||
if(this.formInline.fileLinkList){
|
||||
this.formInline.fileLinkList.forEach(item => {
|
||||
if(item.fileLink){
|
||||
fileLinkList.push(item.fileLink)
|
||||
}
|
||||
})
|
||||
this.formInline.fileLinkList = fileLinkList
|
||||
}
|
||||
if(this.formInline.approvalEvidenceLinkList){
|
||||
this.formInline.approvalEvidenceLinkList.forEach(item => {
|
||||
if(item.approvalEvidenceLink){
|
||||
approvalEvidenceLinkList.push(item.approvalEvidenceLink)
|
||||
}
|
||||
})
|
||||
this.formInline.approvalEvidenceLinkList = approvalEvidenceLinkList
|
||||
}
|
||||
if(this.formInline.progressTrackingList){
|
||||
this.formInline.progressTrackingList.forEach(item => {
|
||||
if(item.progressTracking){
|
||||
progressTrackingList.push(item.progressTracking)
|
||||
}
|
||||
})
|
||||
this.formInline.progressTrackingList = progressTrackingList
|
||||
}
|
||||
delete this.formInline.lawsName
|
||||
let query = {
|
||||
// problemManagementEO:formInline
|
||||
...this.formInline
|
||||
@@ -603,7 +643,7 @@ export default {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('fillAddForm')
|
||||
this.$emit('addModelForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
|
||||
Reference in New Issue
Block a user