| | |
| | | <template> |
| | | <a-tabs style="height: 100%" v-model="activeTabKey" v-if="Object.keys(currentLevelInfo).length>0"> |
| | | <a-tabs style="height: 100%" v-model="activeTabKey" v-if="Object.keys(currentLevelInfo).length>0" |
| | | @change="handleTabChange"> |
| | | <a-tab-pane :key="1" tab="产品属性" v-if="currentLevelInfo.type===1"> |
| | | <ProductInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | <ProductInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="部件属性" v-if="currentLevelInfo.type===2"> |
| | | <ComponentInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | <ComponentInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="零件属性" v-if="currentLevelInfo.type===3"> |
| | | <PartInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | <PartInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="工序属性" v-if="currentLevelInfo.type===5"> |
| | | <ProcessInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | <ProcessInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="工步属性" v-if="currentLevelInfo.type===6"> |
| | | <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="descriptionsContainerSize"/> |
| | | <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <template v-if="currentLevelInfo.hasOwnProperty('attributionType')"> |
| | | <a-tab-pane :key="1" tab="文档属性"> |
| | | <DocumentInfo :currentLevelDetails="currentLevelInfo" :size="descriptionsContainerSize"/> |
| | | <DocumentInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="预览"> |
| | |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="3" tab="文档版本"> |
| | | <DocumentVersionTableList/> |
| | | <DocumentVersionTableList ref="documentVersionTableRef" :currentDocumentInfo="currentLevelInfo" |
| | | :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="4" tab="使用设备" v-if="currentLevelInfo.attributionType===5"> |
| | | <UseDocumentEquipmentTableList/> |
| | | <UseDocumentEquipmentTableList ref="useDocumentEquipmentTableRef"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | |
| | | data() { |
| | | return { |
| | | activeTabKey: 1, |
| | | descriptionsContainerSize: 'small', |
| | | currentLevelInfo: {} |
| | | containerSize: 'small', |
| | | currentLevelInfo: {}, |
| | | hasLoadedDataTabKeyArray: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentLevelInfo', this.receiveCurrentLevelInfo) |
| | | this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentLevelInfo) |
| | | this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentLevelInfo) |
| | | this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData) |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | */ |
| | | receiveCurrentLevelInfo(levelInfo) { |
| | | this.currentLevelInfo = levelInfo |
| | | if (levelInfo.attributionType) this.activeTabKey = 1 |
| | | this.activeTabKey = 1 |
| | | this.hasLoadedDataTabKeyArray = [] |
| | | }, |
| | | |
| | | handleTabChange(activeTabKey) { |
| | | if (!this.hasLoadedDataTabKeyArray.includes(activeTabKey)) { |
| | | if (activeTabKey === 3) { |
| | | this.$nextTick(() => this.$refs.documentVersionTableRef.loadData()) |
| | | } else if (activeTabKey === 4) { |
| | | this.$nextTick(() => this.$refs.useDocumentEquipmentTableRef.loadData()) |
| | | } |
| | | this.hasLoadedDataTabKeyArray.push(activeTabKey) |
| | | } |
| | | }, |
| | | |
| | | reloadMainBottomTableData(tableName) { |
| | | if (this.$refs[tableName + 'TableRef']) this.$refs[tableName + 'TableRef'].loadData() |
| | | } |
| | | } |
| | | } |