1、DNC结构树页面解决因keep-alive标签缓存组件后切换路由无法正常销毁组件从而使组件内事件通过$bus重复调用的问题
2、DNC产品结构树页面工艺规程版本层级下可以导入和挂载其它文档并且展示相关属性信息
3、DNC设备结构树设备的层级由2调整到7并且调整层级影响的相关功能
| | |
| | | // ææ´¾ææ¡£å°è®¾å¤ |
| | | assignDocumentToDeviceApi: params => postAction('/nc/activit/assign/file/apply', params), |
| | | // ä¸è½½ææ¡£ |
| | | downloadDocumentApi: ({ docId, docName }) => downloadFile(`/nc/doc/download/${docId}`, docName), |
| | | downloadDocumentApi: ({ docId, docName }) => requestGetDownLoad(`/nc/doc/download/${docId}`, docName), |
| | | // å é¤ææ¡£ |
| | | deleteDocumentApi: docId => deleteAction(`/nc/doc/delete?id=${docId}`), |
| | | // ææ¡£åºåº |
| | |
| | | <template v-if="+currentTreeNodeInfo.type===2"> |
| | | <div style="height: 100%;max-height: 748px"> |
| | | <!--产åç»ææ å³ä¾§é¡¶é¨åºå--> |
| | | <div style="height: 45%;overflow: hidden"> |
| | | <div style="height: 55%;overflow: hidden"> |
| | | <DeviceStructureMainTop :size="containerSize" ref="mainTopRef" :currentTreeNodeInfo="currentTreeNodeInfo"/> |
| | | </div> |
| | | |
| | | <!--产åç»ææ å³ä¾§åºé¨åºå--> |
| | | <div style="height: 55%;overflow: hidden"> |
| | | <div style="height: 45%;overflow: hidden"> |
| | | <DeviceStructureMainBottom :size="containerSize" :currentTreeNodeInfo="currentTreeNodeInfo"/> |
| | | </div> |
| | | </div> |
| | |
| | | v-if="Object.keys(currentTreeNodeInfo).length!==0"> |
| | | <a-tab-pane :key="1" tab="åé"> |
| | | <HasSentDocumentTableList ref="hasSentDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | :currentTypeOfDevice="currentTypeOfDevice" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="æ¥æ¶"> |
| | | <HasReceivedDocumentTableList ref="hasReceivedDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | :currentTypeOfDevice="currentTypeOfDevice" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" |
| | | :size="tableContainerSize"/> |
| | | </a-tab-pane> |
| | |
| | | return { |
| | | activeTabKey: 1, |
| | | tableContainerSize: 'small', |
| | | currentTypeOfDevice: 7,// 产åç»ææ ä¸å®ä¹ç设å¤å±çº§type为7 |
| | | currentRightClickedTableRowInfo: {}, |
| | | hasLoadedDataTabKeyArray: [] |
| | | } |
| | |
| | | this.$bus.$on('reloadDocumentListData', this.reloadDocumentListData) |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | beforeDestroy() { |
| | | this.$bus.$off('reloadDocumentListData', this.reloadDocumentListData) |
| | | this.$bus.$off('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æ§å¶å³é®èåå¼å¯ |
| | |
| | | this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | this.$bus.$on('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) |
| | | }, |
| | | beforeDestroy() { |
| | | this.$bus.$off('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | this.$bus.$off('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) |
| | | }, |
| | | methods: { |
| | | getTreeDataByApi() { |
| | | this.loading = true |
| | |
| | | this.$bus.$emit('sendDeviceTreeNodeInfo', this.currentSelected) |
| | | if (selectedKeys.length === 0) return |
| | | this.selectedKeys = selectedKeys |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | const { param } = this.treeParams |
| | | const treeNodeInfo = Object.assign({}, this.treeParams, { param }) |
| | | console.log('treeNodeInfo++++++++++++++++++++++++++++', treeNodeInfo) |
| | | if (treeNodeInfo.type === 2) treeNodeInfo.type = 4 |
| | | // 设å¤ç»ææ èç¹ä¸ç设å¤å±çº§ä¸º2ï¼ä½å¨äº§åç»ææ ä¸å°è®¾å¤å±çº§çtype设置为4ï¼ä¸ºä¿è¯ä¸¤ä¸ªç»ææ å
±ç¨çæ¹æ³è½æ£å¸¸è¿è¡ï¼å æ¤å¨æ¤å¤åæ ·è®¾ç½®ä¸º4 |
| | | if (treeNodeInfo.type === 2) treeNodeInfo.type = 7 |
| | | // 设å¤ç»ææ èç¹ä¸ç设å¤å±çº§ä¸º2ï¼ä½å¨äº§åç»ææ ä¸å°è®¾å¤å±çº§çtype设置为7ï¼å æ¤å¨æ¤å¤è®¾ç½®ä¸º7 |
| | | const menuKeyArray = menuKey.split('_') |
| | | const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod |
| | | // product_add => handleAdd 触å对åºç»ä»¶äºä»¶ |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | currentTypeOfDevice:{ |
| | | type:Number |
| | | }, |
| | | size: { |
| | | type: String |
| | |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.key |
| | | params.attributionType = 4 |
| | | params.attributionType = this.currentTypeOfDevice |
| | | params.docClassCode = 'REC' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | currentTypeOfDevice:{ |
| | | type:Number |
| | | }, |
| | | size: { |
| | | type: String |
| | |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.key |
| | | params.attributionType = 4 |
| | | params.attributionType = this.currentTypeOfDevice |
| | | params.docClassCode = 'SEND' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle, treeNodeInfo, tableRowInfo }) { |
| | | console.log('触åå³é®èå') |
| | | if (this[methodName]) { |
| | | console.log('触åå³é®èå') |
| | | this.title = modalTitle |
| | | this[methodName](treeNodeInfo, tableRowInfo) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-descriptions bordered :size="size" :column="4"> |
| | | <a-descriptions-item label="å·¥èºè§ç¨çæ¬å·" :span="2">{{ currentLevelDetails.processSpecVersionCode }} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="å·¥èºè§ç¨çæ¬åç§°" :span="2">{{ currentLevelDetails.processSpecVersionName }} |
| | | </a-descriptions-item> |
| | | <a-descriptions-item label="å建人">{{ currentLevelDetails.createBy_dictText }}</a-descriptions-item> |
| | | <a-descriptions-item label="å建æ¶é´">{{ currentLevelDetails.createTime }}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹äºº">{{ currentLevelDetails.updateBy_dictText }}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹æ¶é´">{{ currentLevelDetails.updateTime }}</a-descriptions-item> |
| | | <a-descriptions-item label="æè¿°" :span="4">{{ currentLevelDetails.description }}</a-descriptions-item> |
| | | </a-descriptions> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'ProcessSpecVersionInfo', |
| | | components: {}, |
| | | props: { |
| | | currentLevelDetails: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div v-if="+currentLevelInfo.type!==4" style="height: 100%"> |
| | | <div style="height: 100%"> |
| | | <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"> |
| | |
| | | |
| | | <a-tab-pane :key="1" tab="é¶ä»¶å±æ§" v-if="+currentLevelInfo.type===3"> |
| | | <PartInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="屿§ä¿¡æ¯" v-if="+currentLevelInfo.type===4"> |
| | | <ProcessSpecVersionInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="1" tab="å·¥åºå±æ§" v-if="+currentLevelInfo.type===5"> |
| | |
| | | import UseDocumentEquipmentTableList from './Document/UseNcDocumentEquipmentTableList' |
| | | import FilePreview from '../../../common/FilePreview' |
| | | import TableContextMenu from '../../../common/TableContextMenu' |
| | | import { getAction } from '@/api/manage' |
| | | import UseDeviceCustomTypeEquipmentTableList |
| | | from '@views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue' |
| | | import ProcessSpecVersionInfo |
| | | from '@views/dnc/base/modules/ProductStructure/ProcessSpecVersion/ProcessSpecVersionInfo.vue' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'ProductStructureMainBottom', |
| | | components: { |
| | | ProcessSpecVersionInfo, |
| | | UseDeviceCustomTypeEquipmentTableList, |
| | | CutterTableList, |
| | | TableContextMenu, |
| | |
| | | <template> |
| | | <div v-if="+currentTreeNodeInfo.type!==4"> |
| | | <div> |
| | | <a-tabs v-model="activeTabKey" @contextmenu.native="e=>e.preventDefault()" @change="handleTabChange" |
| | | v-if="Object.keys(currentTreeNodeInfo).length!==0"> |
| | | <a-tab-pane :key="1" tab="NC管ç" v-if="+currentTreeNodeInfo.type===5||+currentTreeNodeInfo.type===6"> |
| | |
| | | this.getDeviceTypeListDisplayPermission('dnc_device_type_process', 'isProcessHasDeviceTypeList') |
| | | this.getDeviceTypeListDisplayPermission('dnc_device_type_step', 'isProcessStepHasDeviceTypeList') |
| | | }, |
| | | beforeDestroy() { |
| | | this.$bus.$off('sendCurrentTreeNodeInfo', this.receiveCurrentTreeNodeInfo) |
| | | this.$bus.$off('sendCurrentClickedTypeInfo', this.receiveCurrentClickedTypeInfo) |
| | | this.$bus.$off('reloadDocumentListData', this.reloadDocumentListData) |
| | | this.$bus.$off('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·å设å¤ç±»åå表å¨å·¥åºåå·¥æ¥å±çº§çå±ç¤ºæé |
| | |
| | | */ |
| | | receiveCurrentTreeNodeInfo(treeNodeInfo) { |
| | | console.log('treeNodeInfo', treeNodeInfo) |
| | | const { id, type } = treeNodeInfo |
| | | // 仿 ç»ä»¶æ¥åæ èç¹ä¿¡æ¯åä»ç¶ç»ä»¶æµå
¥åç»ä»¶ |
| | | this.currentTreeNodeInfo = treeNodeInfo |
| | | this.currentNCDocumentAttributionInfo = Object.assign({}, { |
| | | attributionId: id, |
| | | attributionType: type, |
| | | docClassCode: 'NC' |
| | | }) |
| | | // æ¸
空ä¸ä¸èç¹å·²ç»å è½½è¿å¾ææ¡£å表tabKey |
| | | this.hasLoadedDataTabKeyArray = [] |
| | | if (+treeNodeInfo.type === 5 || +treeNodeInfo.type === 6) { |
| | | if (+type === 5 || +type === 6) { |
| | | this.activeTabKey = 1 |
| | | this.$nextTick(() => { |
| | | if (this.$refs.deviceCustomTypeTableList) this.$refs.deviceCustomTypeTableList.setQueryParamAndLoadData() |
| | | else if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | | if (this.$refs.deviceCustomTypeTableList) { |
| | | this.$refs.deviceCustomTypeTableList.setQueryParamAndLoadData() |
| | | // 忢æ ä¹åæ¸
空NCç¨åºå表 |
| | | if (this.$refs.ncDocumentTableListRef && this.$refs.ncDocumentTableListRef.dataSource.length > 0) this.$refs.ncDocumentTableListRef.dataSource = [] |
| | | } else if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1) |
| | | }) |
| | | } else { |
| | | this.activeTabKey = 2 |
| | |
| | | const { docId, docName } = this.currentRightClickedTableRowInfo |
| | | dncApi.downloadDocumentApi({ docId, docName }) |
| | | .then(res => { |
| | | if (res && !res.success) { |
| | | if (!res.success) { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | |
| | | onOk: () => { |
| | | dncApi.documentOutboundApi({ docId, docName }) |
| | | .then(res => { |
| | | console.log('res------------------', res) |
| | | if (res.success) { |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId, attributionType }) |
| | | that.$notification.success({ |
| | |
| | | this.getTreeDataByApi() |
| | | this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | beforeDestroy() { |
| | | this.$bus.$off('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | getTreeDataByApi() { |
| | | this.loading = true |
| | |
| | | |
| | | /** |
| | | * èªå¨å±å¼æ·»å ä¸çº§èç¹çç¶èç¹ |
| | | * @param isAddNextLevel æ¯å¦éè¦å±å¼ä¸çº§ |
| | | */ |
| | | modalFormSubmitSuccess(isAddNextLevel) { |
| | | // 夿æ¯å¦ä¸ºæ·»å ä¸çº§å¹¶ä¸å¤æç¶èç¹æ¯å¦å±å¼ |
| | |
| | | { label: 'å建工èºè§ç¨çæ¬', code: 'version_add', icon: 'plus', isCommonMethod: false }, |
| | | { label: 'å建工åº', code: 'version_add_child', icon: 'plus', isCommonMethod: false }, |
| | | { label: 'ç¼è¾å·¥èºè§ç¨çæ¬ä¿¡æ¯', code: 'version_edit', icon: 'edit', isCommonMethod: false }, |
| | | { label: '导å
¥å
¶ä»ææ¡£', code: 'version_import', icon: 'import', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'version_delete', icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æéé
ç½®', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | | ], |
| | |
| | | return 'OTHER' |
| | | case 3: |
| | | return 'OTHER' |
| | | case 4: |
| | | return 'OTHER' |
| | | case 5: |
| | | return 'NC' |
| | | case 6: |
| | |
| | | <template> |
| | | <a-descriptions bordered :size="size"> |
| | | <a-descriptions bordered :size="size" :column="4"> |
| | | <a-descriptions-item label="ææ¡£åç§°">{{currentLevelDetails.docName}}</a-descriptions-item> |
| | | <a-descriptions-item label="代ç çæ¬">{{currentLevelDetails.docAlias}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤ç¼å· ">{{currentLevelDetails.docCode}}</a-descriptions-item> |
| | |
| | | <a-descriptions-item label="ææ¡£ç¶æ">{{currentLevelDetails.docStatus_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="ç³»ç»æå®çæ¬">{{currentLevelDetails.publishVersion}}</a-descriptions-item> |
| | | <a-descriptions-item label="åºåºç¶æ">{{currentLevelDetails.pullStatus_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="åºåºäºº" :span="2">{{currentLevelDetails.pullUser_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="åºåºäºº">{{currentLevelDetails.pullUser_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="å建人">{{currentLevelDetails.createBy_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="å建æ¶é´" :span="2">{{currentLevelDetails.createTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="å建æ¶é´">{{currentLevelDetails.createTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹äºº">{{currentLevelDetails.updateBy_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹æ¶é´" :span="2">{{currentLevelDetails.updateTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="æè¿°" :span="3">{{currentLevelDetails.description}}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹æ¶é´">{{currentLevelDetails.updateTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="æè¿°" :span="4">{{currentLevelDetails.description}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | </template> |
| | | |