update 文档拆分-编辑

This commit is contained in:
赵霄
2023-10-18 10:02:40 +08:00
parent 0610d1b33b
commit a56832d622
6 changed files with 67 additions and 50 deletions
@@ -33,7 +33,7 @@
<div class="unscramble-item-operate">
<a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>
<a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)"
:disabled="unscrambleIndex === interpretationArticlesList.length - 1">
:disabled="interpretationArticlesList.length === 1 && unscrambleIndex === interpretationArticlesList.length - 1">
{{ $t('delete') }}
</a-button>
</div>
@@ -207,7 +207,8 @@ import {
getDocSplitEditFormData,
addClause,
editClause,
getEditClauseContent
getEditClauseContent,
getInterpretationArticlesList
} from '../../../../api/documentToolApi.js'
import UserSelection from '../../../../components/selection/UserSelection.vue'
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker.vue'
@@ -321,6 +322,7 @@ export default {
this.getForm(() => {
this.loadFormInfo()
this.getClauseContentList()
this.initInterpretationArticlesList()
})
},
/**
@@ -442,14 +444,6 @@ export default {
if (!this.formInline.is_long_effect) {
this.formInline.is_long_effect = YesOrNoEnum.NO.value
}
// 条文解读数据处理
if (this.formInline.interpretationArticlesList && this.formInline.interpretationArticlesList.length > 0) {
this.interpretationArticlesList = this.formInline.interpretationArticlesList
} else {
this.interpretationArticlesList = [{
itemContent: null
}]
}
}
})
},
@@ -581,6 +575,7 @@ export default {
this.visible = false
this.formInline = {}
this.contentList = []
this.interpretationArticlesList = []
},
handleSave () {
if (this.submitFlag) {
@@ -642,7 +637,7 @@ export default {
* @param index
*/
handleAddUnscramble (index) {
this.interpretationArticlesList.splice(index + 1, 0, { id: '', itemContent: null })
this.interpretationArticlesList.splice(index + 1, 0, { id: '', itemContent: null, displaySeq: 1 })
},
/**
* 删除条文解读
@@ -652,6 +647,19 @@ export default {
if (item.id) {
this.deleteIds.push(item.id)
}
},
/**
* 获取条文解读数据
*/
initInterpretationArticlesList () {
getInterpretationArticlesList({ id: this.itemVal.id }).then(res => {
if (res.success) {
this.interpretationArticlesList = res.result || [{
itemContent: null,
displaySeq: 1
}]
}
})
}
}
}
@@ -829,7 +837,7 @@ export default {
width: 0;
flex: 1;
table {
/deep/ table {
width: 100%;
}
}
@@ -858,10 +866,6 @@ export default {
&-content {
width: 0;
flex: 1;
table {
width: 100%;
}
}
&-operate {