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