[update 标准解读流程] 选择稿件增加不带入

This commit is contained in:
danshihao
2024-07-12 21:17:07 +08:00
parent 2dc1ab89ff
commit f48477e6a2
4 changed files with 26 additions and 3 deletions
@@ -62,7 +62,7 @@
import StandardSelectionModal from '@comp/selection/StandardSelectionModal'
import { interpretGetClauseList, interpretGetFileByStandardId } from '@api/workCenter'
import { randomUUID } from '@/utils/util'
import { StandardSource } from '@/enums/commonEnums'
import { DecompositionSource, StandardSource } from '@/enums/commonEnums'
import InterpretationClauseTable
from '@views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable'
export default {
@@ -165,6 +165,11 @@ export default {
// 校验失败就标记true
obj._flag = true
}
// 如果是不带入,就提示选择条款
if (this.dataSource.length && (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value)) {
this.$message.warn('workCenter.standardInterpretationProcess.pleaseSelectClause')
obj._flag = true
}
}
// 选择的标准列表
obj.standardData = this.dataSource
@@ -205,6 +210,16 @@ export default {
// 如果有条款的表格,就清空然后隐藏
this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([])
this.showClauseTable = true
// 如果是不带入,不需要请求,直接将标准数据带入
if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) {
this.$nextTick(() => {
this.$refs.interpretationClauseTable.setData([{
itemTitle: this.dataSource[0].standardName,
itemNum: this.dataSource[0].standardNumber
}])
})
return
}
this.loading = true
interpretGetClauseList({
standardId: this.dataSource[0].id,
@@ -231,6 +246,7 @@ export default {
this.showClauseTable = false
if (this.dataSource.length) {
this.dataSource[0].standardId = this.dataSource[0].id
this.dataSource[0].decompositionSource = DecompositionSource.NO_INPUT.value
this.initInterpretGetFileByStandardId(this.dataSource[0].id)
}
},