Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangzhijiang
2024-03-12 18:46:44 +08:00
5 changed files with 25 additions and 12 deletions
@@ -468,7 +468,7 @@ export default {
} }
/deep/ .ant-tree li span.ant-tree-switcher { /deep/ .ant-tree li span.ant-tree-switcher {
float: right; /*float: right;*/
} }
.ant-spin-nested-loading { .ant-spin-nested-loading {
@@ -38,11 +38,11 @@
:replace-fields="{key: 'menuId'}" :replace-fields="{key: 'menuId'}"
@select="onSelectLeft" @select="onSelectLeft"
:tree-data="resultData.menuLeft"> :tree-data="resultData.menuLeft">
<a-icon slot="switcherIcon" type="down" :style="{ fontSize: '12px', color: '#103770' }" />
<template slot="title" slot-scope="{title}"> <template slot="title" slot-scope="{title}">
<!-- 目录前三个和有子集的标题加粗 --> <!-- 目录前三个和有子集的标题加粗 -->
<span :style="title.indexOf('.')===-1?'font-weight: 600;':''">{{ title }}</span> <span :style="title.indexOf('.')===-1?'font-weight: 600;':''">{{ title }}</span>
</template> </template>
<a-icon slot="switcherIcon" type="down" :style="{ fontSize: '12px', color: '#103770' }" />
</a-tree> </a-tree>
</div> </div>
</div> </div>
@@ -714,7 +714,7 @@ export default {
} }
/deep/ .ant-tree li span.ant-tree-switcher { /deep/ .ant-tree li span.ant-tree-switcher {
float: right; /*float: right;*/
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
@@ -489,7 +489,7 @@ export default {
} }
/deep/ .ant-tree li span.ant-tree-switcher { /deep/ .ant-tree li span.ant-tree-switcher {
float: right; /*float: right;*/
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
@@ -189,7 +189,7 @@ export default {
cancelText: this.$t('docTool.split.gotIt'), cancelText: this.$t('docTool.split.gotIt'),
title: this.$t('docTool.split.formatRequirement'), title: this.$t('docTool.split.formatRequirement'),
content: (h) => { content: (h) => {
const contentArr = [this.$t('docTool.split.formatRequirementContentOne'), this.$t('docTool.split.formatRequirementContentTwo'), this.$t('docTool.split.formatRequirementContentThree'), this.$t('docTool.split.formatRequirementContentFour')] const contentArr = ['1.导入的文档是zip格式', '2.图片为jpg、jpeg、 png、 gif格式', '3.文档中的图片,在导入exceI中以文件名填写,图文件存放在相对路径的目录下', '4.文档中的表格,在导入exceI中以链接的形式展示,击链接跳转到指定的sheet页面']
const contentDomArr = [] const contentDomArr = []
for (const content of contentArr) { for (const content of contentArr) {
console.log(content) console.log(content)
@@ -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)
}, },
/** /**
* 表格编辑 * 表格编辑