update 企标稽查计划-业务信息调整前端存储

This commit is contained in:
danshihao
2024-01-03 14:41:13 +08:00
parent bb7e444dba
commit f9725d1fc2
4 changed files with 101 additions and 56 deletions
@@ -59,9 +59,9 @@
</div>
<!-- 新增/编辑稽查计划 -->
<inspection-plan-drawer ref="modalForm" @ok="modalFormOk" :project-id="projectId"/>
<inspection-plan-drawer ref="modalForm" @ok="handleAddOrEditCallback" :project-id="projectId"/>
<!-- 节点2:填写意见、意见回显 -->
<write-opinion-modal ref="writeOpinionModal" @ok="modalFormOk"/>
<write-opinion-modal ref="writeOpinionModal" @ok="handleWriteOpinionCallback"/>
<!-- 节点3:所属部门意见-查看 -->
<show-opinion-modal ref="showOpinionModal" @ok="modalFormOk"/>
</div>
@@ -274,6 +274,22 @@ export default {
this.filters.taskId = this.$route.query.taskId
},
methods: {
// 编辑弹框
handleEdit (record, index) {
this.$refs.modalForm.edit(record, index)
this.$refs.modalForm.title = this.$t('edit')
this.$refs.modalForm.disableSubmit = false
},
// 添加回调
handleAddOrEditCallback (row, index) {
console.log(row, index)
// index -1就是添加
if (index === -1) {
this.dataSource.push(row)
} else {
this.dataSource.splice(index, 1, row)
}
},
// 是否显示意见
isShowOpinion (record) {
const list = record.processEsInspectPlanOpinionList || []
@@ -315,8 +331,16 @@ export default {
this.$refs.writeOpinionModal.show(record)
},
// 填写意见
handleWriteOpinion (record) {
this.$refs.writeOpinionModal.show(record)
handleWriteOpinion (record, index) {
this.$refs.writeOpinionModal.show(record, index)
},
// 填写意见回调
handleWriteOpinionCallback (data, index) {
this.dataSource.splice(index, 1, {
...this.dataSource[index],
// 填写意见的数据
processEsInspectPlanOpinion: data
})
},
// 查看所属部门意见
showDepartOpinion (record) {