update 文档拆分-查看标准分解单
This commit is contained in:
@@ -36,7 +36,10 @@
|
||||
</div>
|
||||
<!--条文内容-->
|
||||
<div class="standard-content">
|
||||
<div class="clause-content-item" v-for="clause in clauseContentList" :key="clause.id">
|
||||
<div class="clause-content-item"
|
||||
v-for="clause in clauseContentList"
|
||||
:key="clause.id"
|
||||
@click="handleClickClauseContentItem(clause)">
|
||||
<div class="clause-content-item-title">{{ clause.item_num }} {{ clause.item_title }}</div>
|
||||
<div class="clause-content-item-content"
|
||||
:class="{'clause-content-item-content-hight': clause.menu_id === hightMenuId}"
|
||||
@@ -51,7 +54,8 @@
|
||||
<template v-for="clause in clauseField">
|
||||
<div class="clause-item" v-if="!clauseLabelHideField.includes(clause.dbFieldName)" :key="clause.id">
|
||||
<label>{{ clause.dbFieldTxt }}</label>
|
||||
<div class="clause-item-content" v-html="clauseLabelInfo[clause.dbFieldName]"></div>
|
||||
<div class="clause-item-content"
|
||||
v-html="clauseLabelInfo[needDictField.includes(clause.fieldShowType) ? clause.dbFieldName + '_dictText' : clause.dbFieldName]"></div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -88,6 +92,7 @@
|
||||
|
||||
<script>
|
||||
import { getDocSplitEditForm, previewDocSplit } from '@api/documentToolApi'
|
||||
import { FieldType } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'StandardResolutionSheet',
|
||||
@@ -107,13 +112,11 @@ export default {
|
||||
spiltInfo: {}, // 拆分的整体信息
|
||||
clauseContentList: [], // 条文内容的数据
|
||||
clauseLabelInfo: {}, // 条文标签数据
|
||||
clauseLabelHideField: ['item_content']
|
||||
clauseLabelHideField: ['item_content'],
|
||||
needDictField: [FieldType.USER_SINGLE.value, FieldType.ORGAN_SINGLE.value, FieldType.STANDARD_MORE.value, FieldType.ORGAN_MORE.value, FieldType.OPTION_SINGLE.value, FieldType.OPTION_MORE.value, FieldType.TREE.value],
|
||||
splitId: null // 文档拆分处的id
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.initClauseFieldList()
|
||||
this.initDetailInfo()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取条文标签字段
|
||||
@@ -127,7 +130,7 @@ export default {
|
||||
},
|
||||
initDetailInfo () {
|
||||
this.loading = true
|
||||
previewDocSplit({ id: this.$route.query.id }).then(res => {
|
||||
previewDocSplit({ id: this.splitId }).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
this.treeData = data.sarFileSplitMenuEO || []
|
||||
@@ -158,9 +161,25 @@ export default {
|
||||
const contentItemDomList = document.getElementsByClassName('clause-content-item')
|
||||
const contentDom = document.getElementsByClassName('standard-content')[0]
|
||||
const contentItemIndex = this.clauseContentList.findIndex(tt => tt.menu_id === this.hightMenuId)
|
||||
this.clauseLabelInfo = Object.assign({}, this.clauseContentList[contentItemIndex])
|
||||
this.handleProcessClauseLabelInfo(contentItemIndex)
|
||||
contentDom.scrollTop = contentItemDomList[contentItemIndex].offsetTop - 150
|
||||
},
|
||||
/**
|
||||
* 处理条文标签的数据
|
||||
* @param contentItemIndex
|
||||
*/
|
||||
handleProcessClauseLabelInfo (contentItemIndex) {
|
||||
this.clauseLabelInfo = Object.assign({}, this.clauseContentList[contentItemIndex])
|
||||
},
|
||||
/**
|
||||
* 点击条文内容
|
||||
*/
|
||||
handleClickClauseContentItem ({ menu_id: menuId }) {
|
||||
this.selectedTreeKeys = [menuId]
|
||||
this.hightMenuId = menuId
|
||||
const contentItemIndex = this.clauseContentList.findIndex(tt => tt.menu_id === this.hightMenuId)
|
||||
this.handleProcessClauseLabelInfo(contentItemIndex)
|
||||
},
|
||||
/**
|
||||
* 标准内容展开
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="split-content">
|
||||
<standard-resolution-sheet></standard-resolution-sheet>
|
||||
<standard-resolution-sheet ref="resolutionSheet" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -10,7 +10,14 @@ import StandardResolutionSheet from '../../../components/StandardResolutionSheet
|
||||
|
||||
export default {
|
||||
name: 'StandardSplitSheet',
|
||||
components: { StandardResolutionSheet }
|
||||
components: { StandardResolutionSheet },
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.resolutionSheet.splitId = this.$route.query.id
|
||||
this.$refs.resolutionSheet.initClauseFieldList()
|
||||
this.$refs.resolutionSheet.initDetailInfo()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<a-button type="primary"
|
||||
ghost
|
||||
icon="file-text"
|
||||
@click="previewStandardResolutionSheet"
|
||||
@click="previewStandardResolutionSheet(detailData[formItem.dbFieldName + '_standardSplit'])"
|
||||
v-has="btnPermission.standardResolutionSheet"
|
||||
:disabled="!detailData[formItem.dbFieldName + '_standardSplit']">
|
||||
{{ $t('standardRegulationLibrary.standardResolutionSheet') }}
|
||||
@@ -348,8 +348,8 @@ export default {
|
||||
/**
|
||||
* 查看标准分解单
|
||||
*/
|
||||
previewStandardResolutionSheet () {
|
||||
this.$refs.standardResolutionSheetModal.open()
|
||||
previewStandardResolutionSheet (id) {
|
||||
this.$refs.standardResolutionSheetModal.open(id)
|
||||
},
|
||||
handlePreview (file) {
|
||||
if (!file || !file.url) {
|
||||
|
||||
+9
-3
@@ -10,7 +10,7 @@
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<div class="page-container">
|
||||
<standard-resolution-sheet></standard-resolution-sheet>
|
||||
<standard-resolution-sheet ref="resolutionSheet" />
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
@@ -31,12 +31,18 @@ export default {
|
||||
return {
|
||||
width: '90%',
|
||||
visible: false,
|
||||
confirmLoading: false
|
||||
confirmLoading: false,
|
||||
splitId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
open (id) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.resolutionSheet.splitId = id
|
||||
this.$refs.resolutionSheet.initClauseFieldList()
|
||||
this.$refs.resolutionSheet.initDetailInfo()
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.visible = false
|
||||
|
||||
Reference in New Issue
Block a user