|
|
@ -130,7 +130,7 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="项目阶段" prop="projectPhase" :rules="rules.projectPhase"> |
|
|
<el-form-item label="项目阶段" prop="projectPhase" :rules="rules.projectPhase"> |
|
|
<el-select v-model="modalData.projectPhase" placeholder="请选择" clearable style="width: 140px"> |
|
|
|
|
|
|
|
|
<el-select v-model="modalData.projectPhase" placeholder="请选择" clearable style="width: 140px" @input="handleInput"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in projectPhaseList" |
|
|
v-for = "i in projectPhaseList" |
|
|
:key = "i.projectPhase" |
|
|
:key = "i.projectPhase" |
|
|
@ -140,7 +140,7 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="项目分类" prop="projectCategory" :rules="rules.projectCategoryType"> |
|
|
<el-form-item label="项目分类" prop="projectCategory" :rules="rules.projectCategoryType"> |
|
|
<el-select v-model="modalData.projectCategory" placeholder="请选择" clearable style="width: 110px"> |
|
|
|
|
|
|
|
|
<el-select v-model="modalData.projectCategory" placeholder="请选择" clearable style="width: 110px" @input="handleInput"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in projectCategoryList" |
|
|
v-for = "i in projectCategoryList" |
|
|
:key = "i.projectCategory" |
|
|
:key = "i.projectCategory" |
|
|
@ -250,6 +250,7 @@ |
|
|
modalFlag:false, |
|
|
modalFlag:false, |
|
|
modalDisableFlag:false, |
|
|
modalDisableFlag:false, |
|
|
disableButton: false, |
|
|
disableButton: false, |
|
|
|
|
|
isDataModified: false, |
|
|
modalData:{ |
|
|
modalData:{ |
|
|
flag:'', |
|
|
flag:'', |
|
|
bu: '', |
|
|
bu: '', |
|
|
@ -261,6 +262,17 @@ |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
}, |
|
|
}, |
|
|
|
|
|
modalCompareData:{ |
|
|
|
|
|
flag:'', |
|
|
|
|
|
bu: '', |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
documentTypeId:'', |
|
|
|
|
|
projectCategory:'', |
|
|
|
|
|
projectPhase:'', |
|
|
|
|
|
// active:'', |
|
|
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
|
|
}, |
|
|
departmentList:[], |
|
|
departmentList:[], |
|
|
// 展示列集 |
|
|
// 展示列集 |
|
|
columnList: [ |
|
|
columnList: [ |
|
|
@ -758,6 +770,23 @@ |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
} |
|
|
} |
|
|
|
|
|
this.modalCompareData = { |
|
|
|
|
|
flag: '2', |
|
|
|
|
|
site: this.modalData.site, |
|
|
|
|
|
id: this.modalData.id, |
|
|
|
|
|
bu: this.modalData.bu, |
|
|
|
|
|
documentTypeId: this.modalData.documentTypeId, |
|
|
|
|
|
documentType: this.modalData.documentType, |
|
|
|
|
|
projectCategory: this.modalData.projectCategory, |
|
|
|
|
|
responsibleDepartment: this.modalData.responsibleDepartment, |
|
|
|
|
|
estimatedCompletionDays: this.modalData.estimatedCompletionDays, |
|
|
|
|
|
projectPhase: this.modalData.projectPhase, |
|
|
|
|
|
// active: this.modalData.active, |
|
|
|
|
|
createBy: this.modalData.createBy, |
|
|
|
|
|
updateBy: this.modalData.updateBy, |
|
|
|
|
|
} |
|
|
|
|
|
console.log("modalCompareData",this.modalCompareData) |
|
|
|
|
|
console.log("modalData",this.modalData) |
|
|
this.disableButton = true |
|
|
this.disableButton = true |
|
|
this.modalDisableFlag = true |
|
|
this.modalDisableFlag = true |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
@ -837,23 +866,35 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
eamBuDocumentEdit(this.modalData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === '0') { |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.modalFlag=false |
|
|
|
|
|
this.disableButton = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
if (this.modalCompareData.projectCategory !== this.modalData.projectCategory || this.modalCompareData.projectPhase !== this.modalData.projectPhase) { |
|
|
|
|
|
// 用户进行了修改,可以继续保存数据 |
|
|
|
|
|
// 向后端发送保存请求的逻辑 |
|
|
|
|
|
eamBuDocumentEdit(this.modalData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === '0') { |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.modalFlag=false |
|
|
|
|
|
this.disableButton = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.modalCompareData.projectPhase = '' |
|
|
|
|
|
this.modalCompareData.projectCategory = '' |
|
|
|
|
|
} else { |
|
|
|
|
|
// 用户没有修改数据,不需要保存 |
|
|
|
|
|
this.modalCompareData.projectPhase = '' |
|
|
|
|
|
this.modalCompareData.projectCategory = '' |
|
|
|
|
|
this.modalFlag = false; |
|
|
|
|
|
this.disableButton = false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -929,6 +970,9 @@ |
|
|
this.authUpdate = !updateFlag |
|
|
this.authUpdate = !updateFlag |
|
|
this.authDelete = !deleteFlag |
|
|
this.authDelete = !deleteFlag |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleInput() { |
|
|
|
|
|
this.isDataModified = true; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|