update 文档拆分-编辑
This commit is contained in:
@@ -34,10 +34,6 @@ const batchCopyClause = (params) => getAction('/laws/DocumentTool/documentSplit/
|
||||
const merageClause = (params) => postAction('/laws/DocumentTool/documentSplit/mergeDocumentSplitDetail', params)
|
||||
// 文档拆分编辑-批量编辑
|
||||
const editBatchEditClause = (params) => postAction('/laws/DocumentTool/documentSplit/editBatchDocumentSplitDetail', params)
|
||||
// 文档拆分编辑-批量编辑-获取表单
|
||||
const getFormForBatchEditClause = (params) => getAction('/split/sarFileSplitItems/getBatchSetForm', params)
|
||||
// 文档拆分编辑-批量编辑-获取表单内容
|
||||
const getFormDataForBatchEditClause = (params) => getAction('/split/sarFileSplitItems/batchSet', params)
|
||||
// 文档拆分编辑-获取左侧树数据
|
||||
const getClauseTreeData = (params) => getAction('/split/sarFileSplitMenu/getSplitMenusByInfoId', params)
|
||||
// 文档拆分-编辑-树节点新增
|
||||
@@ -46,6 +42,8 @@ const addClauseTreeNode = (params) => postAction('/split/sarFileSplitMenu/addMen
|
||||
const editClauseTreeNode = (params) => postAction('/split/sarFileSplitMenu/updateMenu', params)
|
||||
// 文档拆分-编辑-复制
|
||||
const copyClause = (params) => getAction('/laws/DocumentTool/documentSplit/copyDocumentSplitDetail', params)
|
||||
// 文档拆分-编辑-获取条文解读数据
|
||||
const getInterpretationArticlesList = (params) => getAction('/laws/DocumentTool/documentSplit/queryInterpretationArticlesList', params)
|
||||
|
||||
// 文档对比-发布/撤回
|
||||
const withdrawPublication = (params) => postAction('/compare/sarFileCompareInfo/changeState', params)
|
||||
@@ -92,12 +90,11 @@ export {
|
||||
batchCopyClause,
|
||||
merageClause,
|
||||
editBatchEditClause,
|
||||
getFormForBatchEditClause,
|
||||
getFormDataForBatchEditClause,
|
||||
getClauseTreeData,
|
||||
addClauseTreeNode,
|
||||
editClauseTreeNode,
|
||||
copyClause,
|
||||
getInterpretationArticlesList,
|
||||
|
||||
// 文档比对
|
||||
withdrawPublication,
|
||||
|
||||
@@ -434,7 +434,7 @@ module.exports = {
|
||||
gbt: 'GB/T',
|
||||
gso: 'GSO',
|
||||
batchSetting: '批量设置',
|
||||
clauseContent: '条款内容',
|
||||
clauseContent: '条文内容',
|
||||
clauseNo: '条款号',
|
||||
clauseName: '条款名称',
|
||||
selectDirectoryTerms: '请选择添加条款的目录位置',
|
||||
|
||||
@@ -143,7 +143,14 @@
|
||||
|
||||
<!--条文内容-->
|
||||
<template slot="item_content" slot-scope="{text, record}">
|
||||
<div class="table-text" @click="showContent(text,record)">
|
||||
<div class="table-text" @click="showContent('item_content', text,record)">
|
||||
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--条文解读-->
|
||||
<template slot="interpretation_articles" slot-scope="{text, record}">
|
||||
<div class="table-text" @click="showContent('interpretation_articles', text,record)">
|
||||
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -153,7 +160,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--条款详情-->
|
||||
<!--条文内容、条文解读-->
|
||||
<split-clause-detail ref="splitClauseDetail"/>
|
||||
<!--添加节点-->
|
||||
<split-detail-node-add ref="splitDetailNodeAdd" @ok="nodeAddOk"/>
|
||||
@@ -261,7 +268,7 @@ export default {
|
||||
downTemplateUrl: '/split/sarFileSplitItems/exportTemplate' // 模板下载
|
||||
},
|
||||
disabledMixinsCreate: true,
|
||||
tableSlotField: ['item_content']
|
||||
tableSlotField: ['item_content', 'interpretation_articles']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -326,8 +333,16 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
// 显示条款内容弹框
|
||||
showContent (val) {
|
||||
/**
|
||||
* 显示条款内容、条文解读弹框
|
||||
* @param fieldName
|
||||
* @param val
|
||||
*/
|
||||
showContent (fieldName, val) {
|
||||
const title = (this.columns.find(tt => tt.dbFieldName === fieldName) || {}).dbFieldTxt
|
||||
if (title) {
|
||||
this.$refs.splitClauseDetail.title = title
|
||||
}
|
||||
this.$refs.splitClauseDetail.open(val)
|
||||
},
|
||||
// 获取左侧目录数据
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="$t('docTool.split.clauseContent')"
|
||||
:title="title"
|
||||
:visible="contentVisible"
|
||||
:width="1000"
|
||||
:confirm-loading="confirmLoading"
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
name: 'SplitClauseDetail',
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('docTool.split.clauseContent'),
|
||||
contentVisible: false,
|
||||
confirmLoading: false,
|
||||
contentValue: ''
|
||||
|
||||
@@ -22,22 +22,22 @@
|
||||
</div>
|
||||
<a-form-model-item class="item-model" :prop="item.dbFieldName">
|
||||
<!--条文解读-->
|
||||
<template v-if="item.dbFieldName === 'interpretation_articles'">
|
||||
<div class="unscramble-item"
|
||||
v-for="(unscramble, unscrambleIndex) in interpretationArticlesList"
|
||||
:key="unscrambleIndex + 'interpretation_articles'">
|
||||
<div class="unscramble-item-content">
|
||||
<!--文本-->
|
||||
<a-input type="textarea" :maxLength="500" v-model="unscramble.itemContent"/>
|
||||
</div>
|
||||
<div class="unscramble-item-operate">
|
||||
<a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>
|
||||
<a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)">{{ $t('delete') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!--<template v-if="item.dbFieldName === 'interpretation_articles'">-->
|
||||
<!-- <div class="unscramble-item"-->
|
||||
<!-- v-for="(unscramble, unscrambleIndex) in interpretationArticlesList"-->
|
||||
<!-- :key="unscrambleIndex + 'interpretation_articles'">-->
|
||||
<!-- <div class="unscramble-item-content">-->
|
||||
<!-- <!–文本–>-->
|
||||
<!-- <a-input type="textarea" :maxLength="500" v-model="unscramble.itemContent"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="unscramble-item-operate">-->
|
||||
<!-- <a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>-->
|
||||
<!-- <a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)">{{ $t('delete') }}</a-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!--</template>-->
|
||||
<!-- 1, 日期单选 -->
|
||||
<a-date-picker v-else-if="item.fieldShowType === FieldType.DATE_SINGLE.value"
|
||||
<a-date-picker v-if="item.fieldShowType === FieldType.DATE_SINGLE.value"
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
@@ -192,11 +192,11 @@ export default {
|
||||
rules: {},
|
||||
uploadName: '',
|
||||
type: 'add',
|
||||
hiddenFieldList: ['item_num', 'item_title', 'item_content'], // 隐藏的字段
|
||||
hiddenFieldList: ['item_num', 'item_title', 'item_content', 'interpretation_articles'], // 隐藏的字段
|
||||
disabledFieldList: [], // 禁用的字段
|
||||
specialPlaceholder: {}, // 特殊的placeholder
|
||||
optionsData: {}, // 通过接口获取的下拉数据
|
||||
interpretationArticlesList: [] // 条文解读数据
|
||||
// interpretationArticlesList: [] // 条文解读数据
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -255,9 +255,9 @@ export default {
|
||||
// 新注册实施日期
|
||||
indexArr[2] = res.result.findIndex(tt => tt.dbFieldName === 'new_register_implement_date')
|
||||
// 条文解读数据处理
|
||||
this.interpretationArticlesList = [
|
||||
{ id: '', itemContent: null }
|
||||
]
|
||||
// this.interpretationArticlesList = [
|
||||
// { id: '', itemContent: null }
|
||||
// ]
|
||||
// 是否长期有效默认选否
|
||||
this.formInline = Object.assign(this.formInline, { is_long_effect: YesOrNoEnum.NO.value })
|
||||
this.dataList = res.result
|
||||
@@ -394,7 +394,7 @@ export default {
|
||||
}
|
||||
})
|
||||
// 处理条文解读数据
|
||||
formData.interpretationArticlesList = this.interpretationArticlesList
|
||||
// formData.interpretationArticlesList = this.interpretationArticlesList
|
||||
editBatchEditClause(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
Reference in New Issue
Block a user