[update 标准解读流程] 完善

This commit is contained in:
danshihao
2024-07-11 19:29:16 +08:00
parent c7a8258401
commit a4cb5a8cba
3 changed files with 32 additions and 8 deletions
@@ -162,6 +162,10 @@ export default {
// 更新组件内的数据
setData (data) {
this.dataSource = [data.data.processStandardInterpret]
// 有数据更新下拉菜单
if (this.dataSource.length) {
this.initInterpretGetFileByStandardId(this.dataSource[0].standardId)
}
// 如果有条款列表就回显条款列表
if (data.data.processStandardInterpretClauseList && data.data.processStandardInterpretClauseList.length) {
this.showClauseTable = true
@@ -210,18 +214,26 @@ export default {
handleAddStandardCallback (list) {
console.log(list)
this.dataSource = list || []
this.decompositionSourceList = []
this.dataSource[0].standardId = this.dataSource[0].id
// 如果有条款的表格,就清空然后隐藏
this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([])
this.showClauseTable = false
if (this.dataSource.length) {
interpretGetFileByStandardId({ standardId: this.dataSource[0].id }).then(res => {
if (res.success) {
this.decompositionSourceList = res.result || []
}
})
this.initInterpretGetFileByStandardId(this.dataSource[0].id)
}
},
/**
* 获取分解单来源下拉
* @param standardId - 标准id
*/
initInterpretGetFileByStandardId (standardId) {
this.decompositionSourceList = []
interpretGetFileByStandardId({ standardId }).then(res => {
if (res.success) {
this.decompositionSourceList = res.result || []
}
})
},
// 修改分解单来源
handleChangeDecompositionSource (val) {
this.decompositionSource = val
@@ -252,7 +252,7 @@ export default {
}
} else {
// 不需要校验,直接获取各部分数据
Object.assign({}, this.form.getFieldsValue())
Object.assign(obj.formData, this.form.getFieldsValue())
// 选择下一步,获取新增部分的数据
if (this.isNextStep) {
obj.clauseData = this.$refs.interpretationClauseTable.getData()