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