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 merageClause = (params) => postAction('/laws/DocumentTool/documentSplit/mergeDocumentSplitDetail', params)
|
||||||
// 文档拆分编辑-批量编辑
|
// 文档拆分编辑-批量编辑
|
||||||
const editBatchEditClause = (params) => postAction('/laws/DocumentTool/documentSplit/editBatchDocumentSplitDetail', 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)
|
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 editClauseTreeNode = (params) => postAction('/split/sarFileSplitMenu/updateMenu', params)
|
||||||
// 文档拆分-编辑-复制
|
// 文档拆分-编辑-复制
|
||||||
const copyClause = (params) => getAction('/laws/DocumentTool/documentSplit/copyDocumentSplitDetail', 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)
|
const withdrawPublication = (params) => postAction('/compare/sarFileCompareInfo/changeState', params)
|
||||||
@@ -92,12 +90,11 @@ export {
|
|||||||
batchCopyClause,
|
batchCopyClause,
|
||||||
merageClause,
|
merageClause,
|
||||||
editBatchEditClause,
|
editBatchEditClause,
|
||||||
getFormForBatchEditClause,
|
|
||||||
getFormDataForBatchEditClause,
|
|
||||||
getClauseTreeData,
|
getClauseTreeData,
|
||||||
addClauseTreeNode,
|
addClauseTreeNode,
|
||||||
editClauseTreeNode,
|
editClauseTreeNode,
|
||||||
copyClause,
|
copyClause,
|
||||||
|
getInterpretationArticlesList,
|
||||||
|
|
||||||
// 文档比对
|
// 文档比对
|
||||||
withdrawPublication,
|
withdrawPublication,
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ module.exports = {
|
|||||||
gbt: 'GB/T',
|
gbt: 'GB/T',
|
||||||
gso: 'GSO',
|
gso: 'GSO',
|
||||||
batchSetting: '批量设置',
|
batchSetting: '批量设置',
|
||||||
clauseContent: '条款内容',
|
clauseContent: '条文内容',
|
||||||
clauseNo: '条款号',
|
clauseNo: '条款号',
|
||||||
clauseName: '条款名称',
|
clauseName: '条款名称',
|
||||||
selectDirectoryTerms: '请选择添加条款的目录位置',
|
selectDirectoryTerms: '请选择添加条款的目录位置',
|
||||||
|
|||||||
@@ -143,7 +143,14 @@
|
|||||||
|
|
||||||
<!--条文内容-->
|
<!--条文内容-->
|
||||||
<template slot="item_content" slot-scope="{text, record}">
|
<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, ' ') : '' }}
|
{{ text && text !== 'null' ? text.replace(/<.*?>/ig, ' ') : '' }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -153,7 +160,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--条款详情-->
|
<!--条文内容、条文解读-->
|
||||||
<split-clause-detail ref="splitClauseDetail"/>
|
<split-clause-detail ref="splitClauseDetail"/>
|
||||||
<!--添加节点-->
|
<!--添加节点-->
|
||||||
<split-detail-node-add ref="splitDetailNodeAdd" @ok="nodeAddOk"/>
|
<split-detail-node-add ref="splitDetailNodeAdd" @ok="nodeAddOk"/>
|
||||||
@@ -261,7 +268,7 @@ export default {
|
|||||||
downTemplateUrl: '/split/sarFileSplitItems/exportTemplate' // 模板下载
|
downTemplateUrl: '/split/sarFileSplitItems/exportTemplate' // 模板下载
|
||||||
},
|
},
|
||||||
disabledMixinsCreate: true,
|
disabledMixinsCreate: true,
|
||||||
tableSlotField: ['item_content']
|
tableSlotField: ['item_content', 'interpretation_articles']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -326,8 +333,16 @@ export default {
|
|||||||
this.loadData()
|
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)
|
this.$refs.splitClauseDetail.open(val)
|
||||||
},
|
},
|
||||||
// 获取左侧目录数据
|
// 获取左侧目录数据
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="unscramble-item-operate">
|
<div class="unscramble-item-operate">
|
||||||
<a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>
|
<a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>
|
||||||
<a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)"
|
<a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)"
|
||||||
:disabled="unscrambleIndex === interpretationArticlesList.length - 1">
|
:disabled="interpretationArticlesList.length === 1 && unscrambleIndex === interpretationArticlesList.length - 1">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,7 +207,8 @@ import {
|
|||||||
getDocSplitEditFormData,
|
getDocSplitEditFormData,
|
||||||
addClause,
|
addClause,
|
||||||
editClause,
|
editClause,
|
||||||
getEditClauseContent
|
getEditClauseContent,
|
||||||
|
getInterpretationArticlesList
|
||||||
} from '../../../../api/documentToolApi.js'
|
} from '../../../../api/documentToolApi.js'
|
||||||
import UserSelection from '../../../../components/selection/UserSelection.vue'
|
import UserSelection from '../../../../components/selection/UserSelection.vue'
|
||||||
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker.vue'
|
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker.vue'
|
||||||
@@ -321,6 +322,7 @@ export default {
|
|||||||
this.getForm(() => {
|
this.getForm(() => {
|
||||||
this.loadFormInfo()
|
this.loadFormInfo()
|
||||||
this.getClauseContentList()
|
this.getClauseContentList()
|
||||||
|
this.initInterpretationArticlesList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -442,14 +444,6 @@ export default {
|
|||||||
if (!this.formInline.is_long_effect) {
|
if (!this.formInline.is_long_effect) {
|
||||||
this.formInline.is_long_effect = YesOrNoEnum.NO.value
|
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.visible = false
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
this.contentList = []
|
this.contentList = []
|
||||||
|
this.interpretationArticlesList = []
|
||||||
},
|
},
|
||||||
handleSave () {
|
handleSave () {
|
||||||
if (this.submitFlag) {
|
if (this.submitFlag) {
|
||||||
@@ -642,7 +637,7 @@ export default {
|
|||||||
* @param index
|
* @param index
|
||||||
*/
|
*/
|
||||||
handleAddUnscramble (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) {
|
if (item.id) {
|
||||||
this.deleteIds.push(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;
|
width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
table {
|
/deep/ table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -858,10 +866,6 @@ export default {
|
|||||||
&-content {
|
&-content {
|
||||||
width: 0;
|
width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-operate {
|
&-operate {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<j-modal
|
<j-modal
|
||||||
:title="$t('docTool.split.clauseContent')"
|
:title="title"
|
||||||
:visible="contentVisible"
|
:visible="contentVisible"
|
||||||
:width="1000"
|
:width="1000"
|
||||||
:confirm-loading="confirmLoading"
|
:confirm-loading="confirmLoading"
|
||||||
@@ -17,6 +17,7 @@ export default {
|
|||||||
name: 'SplitClauseDetail',
|
name: 'SplitClauseDetail',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
title: this.$t('docTool.split.clauseContent'),
|
||||||
contentVisible: false,
|
contentVisible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
contentValue: ''
|
contentValue: ''
|
||||||
|
|||||||
@@ -22,22 +22,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" :prop="item.dbFieldName">
|
<a-form-model-item class="item-model" :prop="item.dbFieldName">
|
||||||
<!--条文解读-->
|
<!--条文解读-->
|
||||||
<template v-if="item.dbFieldName === 'interpretation_articles'">
|
<!--<template v-if="item.dbFieldName === 'interpretation_articles'">-->
|
||||||
<div class="unscramble-item"
|
<!-- <div class="unscramble-item"-->
|
||||||
v-for="(unscramble, unscrambleIndex) in interpretationArticlesList"
|
<!-- v-for="(unscramble, unscrambleIndex) in interpretationArticlesList"-->
|
||||||
:key="unscrambleIndex + 'interpretation_articles'">
|
<!-- :key="unscrambleIndex + 'interpretation_articles'">-->
|
||||||
<div class="unscramble-item-content">
|
<!-- <div class="unscramble-item-content">-->
|
||||||
<!--文本-->
|
<!-- <!–文本–>-->
|
||||||
<a-input type="textarea" :maxLength="500" v-model="unscramble.itemContent"/>
|
<!-- <a-input type="textarea" :maxLength="500" v-model="unscramble.itemContent"/>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="unscramble-item-operate">
|
<!-- <div class="unscramble-item-operate">-->
|
||||||
<a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>
|
<!-- <a-button @click="handleAddUnscramble(unscrambleIndex)">{{ $t('newlyAdded') }}</a-button>-->
|
||||||
<a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)">{{ $t('delete') }}</a-button>
|
<!-- <a-button @click="handleDeleteUnscramble(unscrambleIndex, unscramble)">{{ $t('delete') }}</a-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
<!-- 1, 日期单选 -->
|
<!-- 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"
|
class="box-input"
|
||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||||
@@ -192,11 +192,11 @@ export default {
|
|||||||
rules: {},
|
rules: {},
|
||||||
uploadName: '',
|
uploadName: '',
|
||||||
type: 'add',
|
type: 'add',
|
||||||
hiddenFieldList: ['item_num', 'item_title', 'item_content'], // 隐藏的字段
|
hiddenFieldList: ['item_num', 'item_title', 'item_content', 'interpretation_articles'], // 隐藏的字段
|
||||||
disabledFieldList: [], // 禁用的字段
|
disabledFieldList: [], // 禁用的字段
|
||||||
specialPlaceholder: {}, // 特殊的placeholder
|
specialPlaceholder: {}, // 特殊的placeholder
|
||||||
optionsData: {}, // 通过接口获取的下拉数据
|
optionsData: {}, // 通过接口获取的下拉数据
|
||||||
interpretationArticlesList: [] // 条文解读数据
|
// interpretationArticlesList: [] // 条文解读数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -255,9 +255,9 @@ export default {
|
|||||||
// 新注册实施日期
|
// 新注册实施日期
|
||||||
indexArr[2] = res.result.findIndex(tt => tt.dbFieldName === 'new_register_implement_date')
|
indexArr[2] = res.result.findIndex(tt => tt.dbFieldName === 'new_register_implement_date')
|
||||||
// 条文解读数据处理
|
// 条文解读数据处理
|
||||||
this.interpretationArticlesList = [
|
// this.interpretationArticlesList = [
|
||||||
{ id: '', itemContent: null }
|
// { id: '', itemContent: null }
|
||||||
]
|
// ]
|
||||||
// 是否长期有效默认选否
|
// 是否长期有效默认选否
|
||||||
this.formInline = Object.assign(this.formInline, { is_long_effect: YesOrNoEnum.NO.value })
|
this.formInline = Object.assign(this.formInline, { is_long_effect: YesOrNoEnum.NO.value })
|
||||||
this.dataList = res.result
|
this.dataList = res.result
|
||||||
@@ -394,7 +394,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 处理条文解读数据
|
// 处理条文解读数据
|
||||||
formData.interpretationArticlesList = this.interpretationArticlesList
|
// formData.interpretationArticlesList = this.interpretationArticlesList
|
||||||
editBatchEditClause(formData).then(res => {
|
editBatchEditClause(formData).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user