| | |
| | | <template> |
| | | <a-tabs style="height: 100%" v-model="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane :key="1" tab="设备属性" v-if="currentTreeNodeInfo.equipmentId"> |
| | | <DeviceInfo :currentLevelDetails="currentTreeNodeInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <template v-else> |
| | | <a-tab-pane :key="1" tab="文档属性"> |
| | | <DocumentInfo :currentLevelDetails="currentDocumentInfo" :size="containerSize"/> |
| | | <div> |
| | | <a-tabs v-model="activeTabKey" @change="handleTabChange"> |
| | | <a-tab-pane :key="1" tab="设备属性" v-if="currentTreeNodeInfo.type===2&&!currentDocumentInfo.docId"> |
| | | <DeviceInfo :currentLevelDetails="currentTreeNodeInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="预览"> |
| | | <FilePreview ref="filePreviewRef" :currentDocumentInfo="currentDocumentInfo"/> |
| | | </a-tab-pane> |
| | | <template v-if="currentDocumentInfo.docId"> |
| | | <a-tab-pane :key="1" tab="文档属性"> |
| | | <DocumentInfo :currentLevelDetails="currentDocumentInfo" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="3" tab="文档版本"> |
| | | <DocumentVersionTableList ref="documentVersionTableRef" :currentDocumentInfo="currentDocumentInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" |
| | | @releaseFilePreviewApi="releaseFilePreviewApi" |
| | | :size="containerSize"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | <a-tab-pane :key="2" tab="预览"> |
| | | <FilePreview ref="filePreviewRef" :currentDocumentInfo="currentDocumentInfo"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="3" tab="文档版本"> |
| | | <DocumentVersionTableList ref="documentVersionTableRef" :currentDocumentInfo="currentDocumentInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" |
| | | @releaseFilePreviewApi="releaseFilePreviewApi" |
| | | :size="containerSize"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | | |
| | | <TableContextMenu :tableRowInfo="currentRightClickedTableRowInfo" ref="tableContextMenuRef"/> |
| | | </a-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import DeviceInfo from './Device/DeviceInfo' |
| | | import DocumentInfo from '../../../common/DocumentInfo' |
| | |
| | | hasLoadedDataTabKeyArray: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | currentTreeNodeInfo: { |
| | | handler(value) { |
| | | this.currentDocumentInfo = {} |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentDocumentInfo) |
| | | this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData) |