新旧拆分单对比--发起比对--新旧条款目录,展示不完整
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<div class="header-text">
|
||||
{{ $t('docTool.split.clauseContent') }}
|
||||
<!--新增条款项-->
|
||||
<a-button type="primary" icon="plus" ghost @click="handleAddClauseContent(1)">{{ $t('newlyAdded') }}</a-button>
|
||||
<a-button type="primary" icon="plus" ghost @click="handleAddClauseContent()">{{ $t('newlyAdded') }}</a-button>
|
||||
</div>
|
||||
<template v-if="contentList && contentList.length > 0">
|
||||
<div class="clause-item" v-for="(clause, index) in contentList" :key="index + 'clause'">
|
||||
@@ -59,13 +59,12 @@
|
||||
v-model="clause.itemContent"
|
||||
v-if="clause.type === TypeOfClauseItem.TEXT.value" />
|
||||
<!--图片-->
|
||||
<viewer>
|
||||
<img v-if="clause.type === TypeOfClauseItem.IMG.value"
|
||||
:src="clause.thumbUrl?clause.thumbUrl:clause.itemContent"
|
||||
<viewer v-else-if="clause.type === TypeOfClauseItem.IMG.value">
|
||||
<img :src="clause.thumbUrl?clause.thumbUrl:clause.itemContent"
|
||||
alt="">
|
||||
</viewer>
|
||||
<!--表格-->
|
||||
<div v-if="clause.type === TypeOfClauseItem.TABLE.value" v-html="clause.itemContent"></div>
|
||||
<div v-else-if="clause.type === TypeOfClauseItem.TABLE.value" v-html="clause.itemContent"></div>
|
||||
</div>
|
||||
<div class="clause-item-operate">
|
||||
<a-button @click="handleAddClauseContent(index)">{{ $t('newlyAdded') }}</a-button>
|
||||
@@ -145,6 +144,7 @@ export default {
|
||||
itemVal: {},
|
||||
contentTrees: '',
|
||||
isTableEdit: false,
|
||||
isTopList: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -214,16 +214,28 @@ export default {
|
||||
*/
|
||||
handleAddClauseContent (index) {
|
||||
if (index === -1) {
|
||||
this.isTopList = false
|
||||
this.addIndex = this.contentList.length - 1
|
||||
} else if (!index) {
|
||||
this.isTopList = true
|
||||
this.addIndex = this.contentList.length - 1
|
||||
} else {
|
||||
this.addIndex = index
|
||||
this.isTopList = false
|
||||
}
|
||||
this.$refs.splitDetailAddTypeCheck.open()
|
||||
},
|
||||
// 增加条款内容成功
|
||||
handleAddOk (type, content) {
|
||||
const headerArr = this.contentList.splice(0, this.addIndex + 1)
|
||||
const footerArr = this.contentList.splice(-this.addIndex)
|
||||
let headerArr = []
|
||||
let footerArr = []
|
||||
if (this.isTopList) {
|
||||
headerArr = this.contentList
|
||||
footerArr = []
|
||||
} else {
|
||||
headerArr = this.contentList.splice(0, this.addIndex + 1)
|
||||
footerArr = this.contentList.splice(-this.addIndex)
|
||||
}
|
||||
const insertArr = []
|
||||
switch (type) {
|
||||
case TypeOfClauseItem.TEXT.value:
|
||||
@@ -251,6 +263,7 @@ export default {
|
||||
}
|
||||
}
|
||||
this.contentList = [...headerArr, ...insertArr, ...footerArr]
|
||||
console.log(this.contentList)
|
||||
},
|
||||
/**
|
||||
* 表格编辑
|
||||
|
||||
Reference in New Issue
Block a user