[update 标准解读流程] 发起节点完善
This commit is contained in:
+21
-7
@@ -165,9 +165,18 @@ export default {
|
|||||||
// 校验失败就标记true
|
// 校验失败就标记true
|
||||||
obj._flag = true
|
obj._flag = true
|
||||||
}
|
}
|
||||||
// 如果是不带入,就提示选择条款
|
// 如果来源选择不带入,至少选择一条条款信息
|
||||||
if (this.dataSource.length && (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value)) {
|
const isNoInput = this.dataSource.length && (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value)
|
||||||
this.$message.warn('workCenter.standardInterpretationProcess.pleaseSelectClause')
|
// 是否没有条款数据
|
||||||
|
const isClauseNotData = this.showClauseTable && !this.$refs.interpretationClauseTable.getData().length
|
||||||
|
if (isNoInput && isClauseNotData) {
|
||||||
|
this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseSelectClause'))
|
||||||
|
obj._flag = true
|
||||||
|
}
|
||||||
|
// 来源选择其他,没有条款数据提示至少一条数据
|
||||||
|
if (!isNoInput && isClauseNotData) {
|
||||||
|
this.$message.warn(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
// 校验失败就标记true
|
||||||
obj._flag = true
|
obj._flag = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -214,6 +223,7 @@ export default {
|
|||||||
if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) {
|
if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.interpretationClauseTable.setData([{
|
this.$refs.interpretationClauseTable.setData([{
|
||||||
|
uuid: randomUUID(),
|
||||||
itemTitle: this.dataSource[0].standardName,
|
itemTitle: this.dataSource[0].standardName,
|
||||||
itemNum: this.dataSource[0].standardNumber
|
itemNum: this.dataSource[0].standardNumber
|
||||||
}])
|
}])
|
||||||
@@ -241,15 +251,18 @@ export default {
|
|||||||
handleAddStandardCallback (list) {
|
handleAddStandardCallback (list) {
|
||||||
console.log(list)
|
console.log(list)
|
||||||
this.dataSource = list || []
|
this.dataSource = list || []
|
||||||
// 如果有条款的表格,就清空然后隐藏
|
|
||||||
this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([])
|
|
||||||
this.showClauseTable = false
|
|
||||||
if (this.dataSource.length) {
|
if (this.dataSource.length) {
|
||||||
|
this.resetClauseTable()
|
||||||
this.dataSource[0].standardId = this.dataSource[0].id
|
this.dataSource[0].standardId = this.dataSource[0].id
|
||||||
this.dataSource[0].decompositionSource = DecompositionSource.NO_INPUT.value
|
this.$set(this.dataSource[0], 'decompositionSource', DecompositionSource.NO_INPUT.value)
|
||||||
this.initInterpretGetFileByStandardId(this.dataSource[0].id)
|
this.initInterpretGetFileByStandardId(this.dataSource[0].id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 重置条款表格
|
||||||
|
resetClauseTable () {
|
||||||
|
this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([])
|
||||||
|
this.showClauseTable = false
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取分解单来源下拉
|
* 获取分解单来源下拉
|
||||||
* @param standardId - 标准id
|
* @param standardId - 标准id
|
||||||
@@ -265,6 +278,7 @@ export default {
|
|||||||
// 修改分解单来源
|
// 修改分解单来源
|
||||||
handleChangeDecompositionSource (val) {
|
handleChangeDecompositionSource (val) {
|
||||||
this.decompositionSource = val
|
this.decompositionSource = val
|
||||||
|
this.resetClauseTable()
|
||||||
const find = this.decompositionSourceList.find(item => item.value === val)
|
const find = this.decompositionSourceList.find(item => item.value === val)
|
||||||
if (find) {
|
if (find) {
|
||||||
this.dataSource.decompositionSource_dictText = find.text || find.title
|
this.dataSource.decompositionSource_dictText = find.text || find.title
|
||||||
|
|||||||
Reference in New Issue
Block a user