产品结构树:
1、实现文档功能的删除功能
设备结构树:
1、实现获取对应设备的已发送的NC程序列表
2、实现设备层级导入NC程序功能
3、实现设备关联的已发送NC程序功能的删除功能
已重命名7个文件
已添加13个文件
已修改8个文件
| | |
| | | assignDocumentToDeviceApi: params => postAction('/nc/activit/assign/file/apply', params), |
| | | // ä¸è½½ææ¡£ |
| | | downloadDocumentApi: ({ docId, docName }) => downloadFile(`/nc/doc/download/${docId}`, docName), |
| | | // å é¤ææ¡£ |
| | | deleteDocumentApi: docId => deleteAction(`/nc/doc/delete?id=${docId}`), |
| | | // ææ¡£åºåº |
| | | documentOutboundApi: ({ docId, docName }) => requestGetDownLoad(`/nc/doc/pull/${docId}`, docName), |
| | | // ææ¡£åæ¶åºåº |
| | |
| | | // ç§»é¤é¨é¨æé |
| | | removePermissionFromUser: ({ treeNodeType, treeNodeId, isAssignSonNode, userIdArray }) => { |
| | | return postAction(`/nc/product/assign/remove/user/${treeNodeType}/${treeNodeId}/${isAssignSonNode}`, userIdArray) |
| | | } |
| | | }, |
| | | |
| | | //-------------------------设å¤ç»ææ ------------------------------------------------ |
| | | // å é¤ææ¡£ |
| | | deleteDeviceRelativeDocumentApi: ({ docId, attributionId }) => deleteAction(`doc/relative/delete/device/${docId}/${attributionId}`) |
| | | } |
| | |
| | | |
| | | actions: { |
| | | // 产线æ |
| | | QueryProduction({ commit }) { |
| | | QueryProduction({ commit },type='MDC') { |
| | | return new Promise((resolve, reject) => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByProduction").then(response => { |
| | | getAction("/mdc/mdcEquipment/queryTreeListByProduction",{type}).then(response => { |
| | | if(response.success){ |
| | | const result = response.result |
| | | Vue.ls.set(SYS_PRODUCTION, result) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <a-row type="flex" :gutter="16"> |
| | | <a-col :md="5"> |
| | | <DeviceStructureTree/> |
| | | </a-col> |
| | | <a-col :md="19"> |
| | | <DeviceStructureMain/> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <!--导å
¥æä»¶å
Œ
±å¼¹çª--> |
| | | <ImportFileModal/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import DeviceStructureTree from './modules/DeviceStructure/DeviceStructureTree' |
| | | import DeviceStructureMain from './modules/DeviceStructure/DeviceStructureMain' |
| | | import ImportFileModal from '../common/ImportFileModal' |
| | | |
| | | export default { |
| | | name: 'DeviceStructure', |
| | | components: { |
| | | DeviceStructureTree, |
| | | DeviceStructureMain, |
| | | ImportFileModal |
| | | }, |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-card-body { |
| | | padding: 8px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-descriptions bordered :size="size"> |
| | | <a-descriptions-item label="设å¤ç¼å·">{{currentLevelDetails.equipmentId}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åç§°">{{currentLevelDetails.equipmentName}}</a-descriptions-item> |
| | | <a-descriptions-item label="æ°æ§ç³»ç» ">{{currentLevelDetails.driveType}}</a-descriptions-item> |
| | | <a-descriptions-item label="设å¤åå·">{{currentLevelDetails.equipmentModel}}</a-descriptions-item> |
| | | <a-descriptions-item label="龿¥IP">{{currentLevelDetails.equipmentIp}}</a-descriptions-item> |
| | | <a-descriptions-item label="龿¥ç«¯å£">{{currentLevelDetails.dataPort}}</a-descriptions-item> |
| | | <a-descriptions-item label="å建人">{{currentLevelDetails.createBy}}</a-descriptions-item> |
| | | <a-descriptions-item label="å建æ¶é´" :span="2">{{currentLevelDetails.createTime}}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹äºº">{{currentLevelDetails.updateBy}}</a-descriptions-item> |
| | | <a-descriptions-item label="ä¿®æ¹æ¶é´" :span="2">{{currentLevelDetails.updateTime}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'DeviceInfo', |
| | | components: {}, |
| | | props: { |
| | | currentLevelDetails: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="height: 100%;max-height: 748px"> |
| | | <template v-if="+currentTreeNodeInfo.type===2"> |
| | | <div style="height: 100%;max-height: 748px"> |
| | | <!--产åç»ææ å³ä¾§é¡¶é¨åºå--> |
| | | <div style="height: 45%;overflow: hidden"> |
| | | <DeviceStructureMainTop :size="containerSize" ref="mainTopRef" :currentTreeNodeInfo="currentTreeNodeInfo"/> |
| | | </div> |
| | | |
| | | <!--产åç»ææ å³ä¾§åºé¨åºå--> |
| | | <div style="height: 55%;overflow: hidden"> |
| | | <DeviceStructureMainBottom :size="containerSize" :currentTreeNodeInfo="currentTreeNodeInfo"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <a-tabs> |
| | | <a-tab-pane :key="1" tab="车é´å±æ§"> |
| | | <WorkshopInfo :currentLevelDetails="currentTreeNodeInfo" :size="containerSize"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import DeviceStructureMainTop from './DeviceStructureMainTop' |
| | | import DeviceStructureMainBottom from './DeviceStructureMainBottom' |
| | | import WorkshopInfo from './Workshop/WorkshopInfo' |
| | | |
| | | export default { |
| | | name: 'DeviceStructureMain', |
| | | components: { |
| | | WorkshopInfo, |
| | | DeviceStructureMainTop, |
| | | DeviceStructureMainBottom |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentTreeNodeInfo) |
| | | }, |
| | | data() { |
| | | return { |
| | | containerSize: 'small', |
| | | currentTreeNodeInfo: {} |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æ¥æ¶æ ç»ä»¶ä¼ æ¥çå½åéä¸çæ èç¹ä¿¡æ¯ |
| | | * @param treeNodeInfo æ èç¹ä¿¡æ¯ |
| | | */ |
| | | receiveCurrentTreeNodeInfo(treeNodeInfo) { |
| | | // 仿 ç»ä»¶æ¥åæ èç¹ä¿¡æ¯åä»ç¶ç»ä»¶æµå
¥åç»ä»¶ |
| | | this.currentTreeNodeInfo = treeNodeInfo |
| | | if (treeNodeInfo.equipmentId) { |
| | | this.$nextTick(() => { |
| | | if (this.$refs.mainTopRef) this.$refs.mainTopRef.loadHasSentDocumentListData() |
| | | }) |
| | | } |
| | | console.log('currentTreeNodeInfo------------------', this.currentTreeNodeInfo) |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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"/> |
| | | </a-tab-pane> |
| | | |
| | | <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> |
| | | |
| | | <TableContextMenu :tableRowInfo="currentRightClickedTableRowInfo" ref="tableContextMenuRef"/> |
| | | </a-tabs> |
| | | </template> |
| | | |
| | | <script> |
| | | import DeviceInfo from './Device/DeviceInfo' |
| | | import DocumentInfo from '../../../common/DocumentInfo' |
| | | import FilePreview from '../../../common/FilePreview' |
| | | import TableContextMenu from '../../../common/TableContextMenu' |
| | | import DocumentVersionTableList from '../../../common/DocumentVersionTableList' |
| | | |
| | | export default { |
| | | name: 'DeviceStructureMainBottom', |
| | | components: { |
| | | TableContextMenu, |
| | | DeviceInfo, |
| | | DocumentInfo, |
| | | FilePreview, |
| | | DocumentVersionTableList |
| | | }, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | activeTabKey: 1, |
| | | containerSize: 'small', |
| | | currentDocumentInfo: {}, |
| | | currentRightClickedTableRowInfo: {}, |
| | | hasLoadedDataTabKeyArray: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentDocumentInfo) |
| | | this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æ¥æ¶è¡¨æ ¼ä¼ æ¥çå½åé䏿ç¹å»çé¡¹ä¿¡æ¯ |
| | | * @param documentInfo å½åå±çº§ä¿¡æ¯ |
| | | */ |
| | | receiveCurrentDocumentInfo(documentInfo) { |
| | | this.currentDocumentInfo = documentInfo |
| | | this.activeTabKey = 1 |
| | | this.hasLoadedDataTabKeyArray = [] |
| | | }, |
| | | |
| | | handleTabChange(activeTabKey) { |
| | | if (!this.hasLoadedDataTabKeyArray.includes(activeTabKey)) { |
| | | switch (activeTabKey) { |
| | | case 2: |
| | | this.$nextTick(() => this.$refs.filePreviewRef.getFilePreviewByApi()) |
| | | break |
| | | case 3: |
| | | this.$nextTick(() => this.$refs.documentVersionTableRef.loadData()) |
| | | break |
| | | case 4: |
| | | this.$nextTick(() => this.$refs.useDocumentEquipmentTableRef.loadData()) |
| | | break |
| | | default: |
| | | } |
| | | // 黿¢æ¥å£å¨åä¸ææ¡£ä¸æ¬¡ç¹å»å
夿¬¡è§¦å |
| | | this.hasLoadedDataTabKeyArray.push(activeTabKey) |
| | | } |
| | | }, |
| | | |
| | | // éæ¾æä»¶é¢è§æ¥å£ |
| | | releaseFilePreviewApi() { |
| | | // 妿已ç»é¢è§è¿æ¤ææ¡£ï¼å¯å¨æ¤ææ¡£å½åçæ¬åçæ¹åå忬¡é¢è§æ°çæ¬å
容 |
| | | if (this.hasLoadedDataTabKeyArray.includes(2)) this.hasLoadedDataTabKeyArray = this.hasLoadedDataTabKeyArray.filter(item => item !== 2) |
| | | }, |
| | | |
| | | /** |
| | | * æ§å¶å³é®èåå¼å¯ |
| | | * @param record å½åè¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleTableContextMenuOpen(record) { |
| | | this.currentRightClickedTableRowInfo = Object.assign({}, record) |
| | | this.$refs.tableContextMenuRef.currentMenuLevel = record.param |
| | | this.$refs.tableContextMenuRef.menuStyle.top = event.clientY + 'px' |
| | | this.$refs.tableContextMenuRef.menuStyle.left = event.clientX + 'px' |
| | | this.$refs.tableContextMenuRef.menuVisible = true |
| | | document.body.addEventListener('click', this.handleMenuClose) |
| | | }, |
| | | |
| | | /** |
| | | * æ§å¶å³é®èåç¹å»å
³é |
| | | */ |
| | | handleMenuClose() { |
| | | this.$refs.tableContextMenuRef.menuVisible = false |
| | | document.body.removeEventListener('click', this.handleMenuClose) |
| | | }, |
| | | |
| | | reloadMainBottomTableData(tableName) { |
| | | if (this.$refs[tableName + 'TableRef']) this.$refs[tableName + 'TableRef'].loadData() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /deep/ .ant-tabs-content { |
| | | height: calc(100% - 65px); |
| | | } |
| | | |
| | | /deep/ .ant-tabs-tabpane { |
| | | overflow: auto; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-tabs v-model="activeTabKey" @contextmenu.native="e=>e.preventDefault()" |
| | | v-if="Object.keys(currentTreeNodeInfo).length!==0"> |
| | | <a-tab-pane :key="1" tab="åé"> |
| | | <!--<NcDocumentTableList ref="ncDocumentTableListRef" />--> |
| | | <HasSentDocumentTableList ref="hasSentDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane :key="2" tab="æ¥æ¶"> |
| | | <!--<OtherDocumentTableList ref="otherDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo"--> |
| | | <!--@handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/>--> |
| | | </a-tab-pane> |
| | | |
| | | <TableContextMenu :tableRowInfo="currentRightClickedTableRowInfo" ref="tableContextMenuRef"/> |
| | | </a-tabs> |
| | | </template> |
| | | |
| | | <script> |
| | | import dncApi from '@/api/dnc' |
| | | import TableContextMenu from '../../../common/TableContextMenu' |
| | | import HasSentDocumentTableList from './HasSentDocumentTableList' |
| | | |
| | | export default { |
| | | name: 'DeviceStructureMainTop', |
| | | components: { HasSentDocumentTableList, TableContextMenu }, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | activeTabKey: 1, |
| | | tableContainerSize: 'small', |
| | | currentRightClickedTableRowInfo: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('reloadDocumentListData', this.reloadDocumentListData) |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æ§å¶å³é®èåå¼å¯ |
| | | * @param record å½åè¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleTableContextMenuOpen(record) { |
| | | this.currentRightClickedTableRowInfo = Object.assign({}, record) |
| | | console.log('currentRightClickedTableRowInfo', this.currentRightClickedTableRowInfo) |
| | | this.$refs.tableContextMenuRef.currentMenuLevel = record.param |
| | | this.$refs.tableContextMenuRef.menuStyle.top = event.clientY + 'px' |
| | | this.$refs.tableContextMenuRef.menuStyle.left = event.clientX + 'px' |
| | | this.$refs.tableContextMenuRef.menuVisible = true |
| | | document.body.addEventListener('click', this.handleMenuClose) |
| | | }, |
| | | |
| | | /** |
| | | * 彿 ç»ä»¶éä¸è®¾å¤å±çº§èç¹æ¶è§¦åè·åå·²åéææ¡£å表 |
| | | * @param treeNodeInfo æ èç¹ä¿¡æ¯ |
| | | */ |
| | | loadHasSentDocumentListData(treeNodeInfo) { |
| | | this.$nextTick(() => { |
| | | if (this.$refs.hasSentDocumentTableListRef) this.$refs.hasSentDocumentTableListRef.loadData(1) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ææ¡£ä»¥åNCç¨åºå¯¼å
¥/åºåº/å
¥åº/å 餿åå触åéæ°å è½½ææ¡£å表 |
| | | * @param docClassCode ææ¡£ç±»å« |
| | | * @param attributionId èç¹Id |
| | | */ |
| | | reloadDocumentListData({ docClassCode, attributionId }) { |
| | | // 妿ä¸ä¼ çææ¡£ä¸æ¯æå±äºå½åæå±ç¤ºèç¹çææ¡£åä¸éæ°è·åææ¡£å表 |
| | | if (this.currentTreeNodeInfo.key !== attributionId) return |
| | | if (docClassCode === 'SEND') { |
| | | if (this.$refs.hasSentDocumentTableListRef) this.$refs.hasSentDocumentTableListRef.loadData(1) |
| | | } |
| | | }, |
| | | |
| | | // ä¸è½½å½åå³é®éä¸ææ¡£ |
| | | handleDownload() { |
| | | const that = this |
| | | const { docId, docName } = this.currentRightClickedTableRowInfo |
| | | dncApi.downloadDocumentApi({ docId, docName }) |
| | | .then(res => { |
| | | if (res && !res.success) { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | // å é¤å½åå³é®éä¸ææ¡£ |
| | | handleDelete() { |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const that = this |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `å é¤åä¸å¯åæ¶ï¼ç¡®è®¤å é¤åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.deleteDeviceRelativeDocumentApi({ docId, attributionId }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * åºåºå½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handlePull(menuLabel) { |
| | | const that = this |
| | | const { docId, docName, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.documentOutboundApi({ docId, docName }) |
| | | .then(res => { |
| | | console.log('res------------------', res) |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: `${menuLabel}æå` |
| | | }) |
| | | } else { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * åå¸å½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handleCancelPull(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.documentCancelOutboundApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * ç¹å»å叿¶è§¦åå½åææ¡£åå¸ |
| | | * @param menuLabel |
| | | */ |
| | | handlePublish(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.documentPublishApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | this.$bus.$emit('reloadMainBottomTableData', 'documentVersion') |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * éæ°åå¸å½åå³é®éä¸ææ¡£å¹¶éæ°åå¸éåä¸ä¸ææ¡£çæ¬ |
| | | * @param menuLabel |
| | | */ |
| | | handleRepublish(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.documentRepublishApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * é彿¡£å½åå³é®éä¸ææ¡£ä¸åç»æ æ³ç»§ç»å叿彿¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handlePigeonhole(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `${menuLabel}åä¸å¯åæ¶ï¼ç¡®è®¤${menuLabel}åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.documentPigeonholeApi(docId) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | that.$notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æ§å¶å³é®èåå
³é |
| | | handleMenuClose() { |
| | | this.$refs.tableContextMenuRef.menuVisible = false |
| | | document.body.removeEventListener('click', this.handleMenuClose) |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle }) { |
| | | if (this[methodName]) this[methodName](modalTitle) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /deep/ .ant-table-tbody .ant-table-row { |
| | | cursor: pointer; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card class="tree_con" :loading="cardLoading" :bordered="false" @contextmenu.native="e=>e.preventDefault()"> |
| | | <a-spin :spinning="loading"> |
| | | <div style="display: flex;flex-direction: column;height: 100%"> |
| | | <div style="display: flex"> |
| | | <a-input placeholder="è¾å
¥å
³é®åè¿è¡æç´¢" allowClear v-model="searchInput" |
| | | @change="handleSearchInputChange"/> |
| | | <a-dropdown :trigger="['click']" placement="bottomCenter" style="margin: 0 8px"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="expandedKeys = allTreeKeys">å±å¼ææ</a-menu-item> |
| | | <a-menu-item key="2" @click="expandedKeys = ['-1']">åå¹¶ææ</a-menu-item> |
| | | <a-menu-item key="3" @click="getTreeDataByApi">å·æ°</a-menu-item> |
| | | </a-menu> |
| | | <a-button> |
| | | <a-icon type="bars"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!--设å¤ç»ææ --> |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px"> |
| | | <a-tree blockNode show-icon :expandedKeys.sync="expandedKeys" |
| | | :selectedKeys="selectedKeys" :treeData="treeDataSource" :autoExpandParent="autoExpandParent" |
| | | @select="handleTreeSelect" @expand="handleTreeExpand" @rightClick="handleTreeRightClick"> |
| | | <template slot="title" slot-scope="{ title, parentId, entity, key:treeKey,equipmentId}"> |
| | | <DeviceStructureTreeContextMenu ref="contextMenuRef" |
| | | :treeParams="{title,treeKey,searchValue,equipmentId,entity}"/> |
| | | </template> |
| | | |
| | | <a-icon slot="switcherIcon" type="down"/> |
| | | <a-icon slot="workshop" type="bank"/> |
| | | <a-icon slot="device" type="laptop"/> |
| | | </a-tree> |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapActions } from 'vuex' |
| | | import { deleteAction } from '@/api/manage' |
| | | import DeviceStructureTreeContextMenu from './DeviceStructureTreeContextMenu' |
| | | |
| | | export default { |
| | | name: 'DeviceStructureTree', |
| | | components: { |
| | | DeviceStructureTreeContextMenu |
| | | }, |
| | | data() { |
| | | return { |
| | | searchInput: '', |
| | | cardLoading: false, |
| | | loading: false, |
| | | treeDataSource: [], |
| | | selectedKeys: [], |
| | | expandedKeys: [], |
| | | searchValue: '', |
| | | dataList: [], |
| | | autoExpandParent: true, |
| | | checkStrictly: true, |
| | | allTreeKeys: [], |
| | | currentSelected: {}, |
| | | rightClickSelected: {}, |
| | | url: { |
| | | delete: '/nc/product/delete' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeDataByApi() |
| | | this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | |
| | | getTreeDataByApi() { |
| | | this.loading = true |
| | | this.cardLoading = true |
| | | this.QueryProduction('DNC').then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | this.$bus.$emit('sendCurrentTreeNodeInfo', this.treeDataSource[0]) |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | this.cardLoading = false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ èç¹é䏿¶è§¦å |
| | | * @param selectedKeys éä¸èç¹key |
| | | * @param {node} node èç¹å¯¹è±¡ |
| | | */ |
| | | handleTreeSelect(selectedKeys, { node }) { |
| | | let record = node.dataRef |
| | | this.currentSelected = Object.assign({}, record) |
| | | this.selectedKeys = selectedKeys |
| | | // åå³ä¾§ç¶çº§ç»ä»¶åéå½åé䏿 èç¹ä¿¡æ¯ |
| | | this.$bus.$emit('sendCurrentTreeNodeInfo', this.currentSelected) |
| | | }, |
| | | |
| | | /** |
| | | * æ èç¹å³é®åå»èç¹æ¶è§¦å |
| | | * @param event äºä»¶å¯¹è±¡ |
| | | * @param node èç¹å¯¹è±¡ |
| | | */ |
| | | handleTreeRightClick({ event, node }) { |
| | | const record = node.dataRef |
| | | this.rightClickSelected = Object.assign({}, record) |
| | | }, |
| | | |
| | | // æ èç¹å³é®åå»èåä¸å 餿鮿¶è§¦å |
| | | handleDelete() { |
| | | this.$confirm({ |
| | | title: 'æç¤º', |
| | | content: '确认å 餿¤æ¡è®°å½åï¼', |
| | | okText: '确认', |
| | | okType: 'danger', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | console.log('this.rightClickSelected.id', this.rightClickSelected.id) |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | const that = this |
| | | deleteAction(that.url.delete, { id: this.rightClickSelected.id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.getTreeDataByApi() |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èªå¨å±å¼æ·»å ä¸çº§èç¹çç¶èç¹ |
| | | */ |
| | | modalFormSubmitSuccess(isAddNextLevel) { |
| | | // 夿æ¯å¦ä¸ºæ·»å ä¸çº§å¹¶ä¸å¤æç¶èç¹æ¯å¦å±å¼ |
| | | if (isAddNextLevel && !this.expandedKeys.includes(this.rightClickSelected.id)) this.expandedKeys.push(this.rightClickSelected.id) |
| | | this.getTreeDataByApi() |
| | | }, |
| | | |
| | | /** |
| | | * æ èç¹å±å¼åå¹¶æ¶è§¦å |
| | | * @param expandedKeys å±å¼é¡¹key |
| | | */ |
| | | handleTreeExpand(expandedKeys) { |
| | | this.expandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | |
| | | /* è¾å
¥æ¥è¯¢å
容ååæ¶è§¦å */ |
| | | handleSearchInputChange() { |
| | | let search = this.searchInput |
| | | let expandedKeys = this.dataList |
| | | .map(item => { |
| | | if (item.title != null) { |
| | | if (item.title.indexOf(search) > -1) { |
| | | return this.getParentKey(item.key, this.treeDataSource) |
| | | } |
| | | return null |
| | | } |
| | | }) |
| | | .filter((item, i, self) => item && self.indexOf(item) === i) |
| | | Object.assign(this, { |
| | | expandedKeys, |
| | | searchValue: search, |
| | | autoExpandParent: true |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * éå½è·å¾è¾å
¥é¡¹çç¶çº§key |
| | | * @param key å项key |
| | | * @param tree å项 |
| | | */ |
| | | getParentKey(key, tree) { |
| | | let parentKey |
| | | for (let i = 0; i < tree.length; i++) { |
| | | const node = tree[i] |
| | | if (node.children) { |
| | | if (node.children.some(item => item.key === key)) { |
| | | parentKey = node.key |
| | | } else if ( |
| | | this.getParentKey(key, node.children)) { |
| | | parentKey = this.getParentKey(key, node.children) |
| | | } |
| | | } |
| | | } |
| | | return parentKey |
| | | }, |
| | | |
| | | /** |
| | | * éå½è·å¾æææ èç¹key |
| | | * @param data |
| | | */ |
| | | generateList(data) { |
| | | for (let i = 0; i < data.length; i++) { |
| | | const node = data[i] |
| | | const key = node.key |
| | | const title = node.title |
| | | this.dataList.push({ key, title }) |
| | | this.allTreeKeys.push(key) |
| | | this.setTreeNodeIcon(node) |
| | | if (node.children) this.generateList(node.children) |
| | | } |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName }) { |
| | | if (this[methodName]) this[methodName]() |
| | | }, |
| | | |
| | | /** |
| | | * 设置æ èç¹å¾æ |
| | | * @param treeNode |
| | | */ |
| | | setTreeNodeIcon(treeNode) { |
| | | if (!treeNode.equipmentId) { |
| | | treeNode.slots = { icon: 'workshop' } |
| | | } else { |
| | | treeNode.slots = { icon: 'device' } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .ant-card-body { |
| | | padding: 0 12px 0 0; |
| | | } |
| | | |
| | | /deep/ .ant-card-body, /deep/ .ant-spin-nested-loading, /deep/ .ant-spin-container { |
| | | height: 100%; |
| | | } |
| | | |
| | | /deep/ .ant-tree-title, .ant-tree-title .ant-dropdown-trigger { |
| | | display: inline-block; |
| | | width: calc(100% - 24px) !important; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | .tree_con { |
| | | height: 748px !important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | .tree_con { |
| | | height: 748px !important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | .tree_con { |
| | | height: 600px !important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | .tree_con { |
| | | height: 501px !important; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .tree_con { |
| | | height: 501px !important; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-dropdown :trigger="['contextmenu']"> |
| | | <span v-if="treeParams.title.indexOf(treeParams.searchValue) > -1">{{ treeParams.title.substr(0, treeParams.title.indexOf(treeParams.searchValue)) }}<span |
| | | class="replaceSearch">{{ treeParams.searchValue }}</span>{{ treeParams.title.substr(treeParams.title.indexOf(treeParams.searchValue) + treeParams.searchValue.length) }}</span> |
| | | <span v-else>{{ treeParams.title }}</span> |
| | | <template #overlay> |
| | | <a-menu @click="({ key: menuKey }) => onContextMenuClick(treeParams.treeKey, menuKey)" |
| | | @contextmenu="event=>event.preventDefault()"> |
| | | <a-menu-item v-for="item in defaultContextMenuList[getCurrentMenuLevel]" :key="item.code" v-has="item.code"> |
| | | <a-icon :type="item.icon"/> |
| | | {{item.label}} |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </template> |
| | | </a-dropdown> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'DeviceStructureTreeContextMenu', |
| | | components: {}, |
| | | props: { |
| | | treeParams: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | defaultContextMenuList: { |
| | | //è½¦é´ |
| | | workshop: [ |
| | | { label: 'æéé
ç½®', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | | ], |
| | | //è®¾å¤ |
| | | device: [ |
| | | { label: '导å
¥NCææ¡£', code: 'device_import', icon: 'import', isCommonMethod: true }, |
| | | { label: 'æéé
ç½®', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | getCurrentMenuLevel() { |
| | | if (!this.treeParams.equipmentId) return 'workshop' |
| | | else return 'device' |
| | | } |
| | | }, |
| | | methods: { |
| | | onContextMenuClick(treeKey, menuKey) { |
| | | const level = this.getCurrentMenuLevel |
| | | const treeNodeInfo = Object.assign({}, this.treeParams) |
| | | if (treeNodeInfo.equipmentId) treeNodeInfo.type = 4 |
| | | const menuKeyArray = menuKey.split('_') |
| | | const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod |
| | | // product_add => handleAdd 触å对åºç»ä»¶äºä»¶ |
| | | let methodName |
| | | // 夿æ¯å¦ä¸ºå
Œ
±æ¹æ³ï¼å¦æä¸ºå
Œ
±æ¹æ³åæªå䏿屿§product/component/part/processçåæ®µ |
| | | if (isCommonMethod) { |
| | | methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).slice(1).join('') |
| | | } else { |
| | | methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') |
| | | } |
| | | console.log('methodName------------------------------------', methodName) |
| | | console.log('treeParams------------------------------------', this.treeParams) |
| | | const modalTitle = this.defaultContextMenuList[level].find(item => item.code === menuKey).label |
| | | |
| | | this.$bus.$emit('treeMenuItemMethodTrigger', { methodName, modalTitle, treeNodeInfo }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .replaceSearch { |
| | | color: #40a9ff; |
| | | font-weight: bold; |
| | | background-color: rgb(204, 204, 204); |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"/> |
| | | |
| | | <DocumentModal ref="modalForm" @ok="modalFormOk"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from '../../../../common/DocumentModal' |
| | | |
| | | export default { |
| | | name: 'NcDocumentTableList', |
| | | components: { DocumentModal }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: 'rowIndex', |
| | | key: 'rowIndex', |
| | | width: 65, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { title: '代ç çæ¬', dataIndex: 'docAlias', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | | currentClickedDocumentInfo: {}, |
| | | url: { |
| | | list: '/nc/doc/find/page' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | params.attributionId = this.currentTreeNodeInfo.id |
| | | params.attributionType = this.currentTreeNodeInfo.type |
| | | params.docClassCode = 'NC' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | | this.currentRightClickedDocumentInfo = Object.assign({ param: 'NC' }, record) |
| | | this.$emit('handleTableContextMenuOpen', this.currentRightClickedDocumentInfo) |
| | | }, |
| | | click: () => { |
| | | if (this.currentClickedDocumentInfo.docId === record.docId) return |
| | | this.currentClickedDocumentInfo = Object.assign({}, record) |
| | | this.$bus.$emit('sendCurrentClickedDocumentInfo', record) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | | }, |
| | | |
| | | handleDocumentAssign(record, modalTitle) { |
| | | this.$refs.documentAssignModalRef.title = modalTitle |
| | | this.$refs.documentAssignModalRef.visible = true |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName]) this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | | <DocumentModal ref="modalForm" @ok="modalFormOk"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from '../../../../common/DocumentModal' |
| | | |
| | | export default { |
| | | name: 'OtherDocumentTableList', |
| | | components: { DocumentModal }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: 'rowIndex', |
| | | key: 'rowIndex', |
| | | width: 65, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'docCode', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | ], |
| | | dataSource: [], |
| | | currentDocumentInfo: {}, |
| | | url: { |
| | | list: '/nc/doc/find/page' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | params.attributionId = this.currentTreeNodeInfo.id |
| | | params.attributionType = this.currentTreeNodeInfo.type |
| | | params.docClassCode = 'OTHER' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | | this.$emit('handleTableContextMenuOpen', { ...record, param: 'OTHER' }) |
| | | }, |
| | | click: () => { |
| | | if (this.currentDocumentInfo.docId === record.docId) return |
| | | this.currentDocumentInfo = Object.assign({}, record) |
| | | this.$bus.$emit('sendCurrentClickedDocumentInfo', record) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName] && tableRowInfo.attributionType === 1) this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | | <DocumentModal ref="modalForm" @ok="modalFormOk"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from '../../../common/DocumentModal.vue' |
| | | |
| | | export default { |
| | | name: 'HasSentDocumentTableList', |
| | | components: { DocumentModal }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: 'rowIndex', |
| | | key: 'rowIndex', |
| | | width: 65, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { title: '代ç çæ¬', dataIndex: 'docAlias', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | | currentClickedDocumentInfo: {}, |
| | | url: { |
| | | list: '/nc/doc/find/page/device' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.key |
| | | params.attributionType = 4 |
| | | params.docClassCode = 'SEND' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | | this.currentRightClickedDocumentInfo = Object.assign({ param: 'SEND' }, record) |
| | | this.$emit('handleTableContextMenuOpen', this.currentRightClickedDocumentInfo) |
| | | }, |
| | | click: () => { |
| | | if (this.currentClickedDocumentInfo.docId === record.docId) return |
| | | this.currentClickedDocumentInfo = Object.assign({}, record) |
| | | this.$bus.$emit('sendCurrentClickedDocumentInfo', record) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | | }, |
| | | |
| | | handleDocumentAssign(record, modalTitle) { |
| | | this.$refs.documentAssignModalRef.title = modalTitle |
| | | this.$refs.documentAssignModalRef.visible = true |
| | | }, |
| | | |
| | | handleDelete() { |
| | | // æ¤å¤å½æ°ä¸ºå±è½mixinsä¸çåå彿°ï¼éç¨å½æ°åå¨ç¶çº§ä¸ |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName] && tableRowInfo.param === 'SEND') this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | | <DocumentModal ref="modalForm" @ok="modalFormOk"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from '../../../common/DocumentModal.vue' |
| | | |
| | | export default { |
| | | name: 'HasSentDocumentTableList', |
| | | components: { DocumentModal }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: 'rowIndex', |
| | | key: 'rowIndex', |
| | | width: 65, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { title: '代ç çæ¬', dataIndex: 'docAlias', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | | currentClickedDocumentInfo: {}, |
| | | url: { |
| | | list: '/nc/doc/find/page/device' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.key |
| | | params.attributionType = 4 |
| | | params.docClassCode = 'SEND' |
| | | if (!params) return false |
| | | this.dataSource = [] |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | | this.currentRightClickedDocumentInfo = Object.assign({ param: 'SEND' }, record) |
| | | this.$emit('handleTableContextMenuOpen', this.currentRightClickedDocumentInfo) |
| | | }, |
| | | click: () => { |
| | | if (this.currentClickedDocumentInfo.docId === record.docId) return |
| | | this.currentClickedDocumentInfo = Object.assign({}, record) |
| | | this.$bus.$emit('sendCurrentClickedDocumentInfo', record) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | | }, |
| | | |
| | | handleDocumentAssign(record, modalTitle) { |
| | | this.$refs.documentAssignModalRef.title = modalTitle |
| | | this.$refs.documentAssignModalRef.visible = true |
| | | }, |
| | | |
| | | handleDelete() { |
| | | // æ¤å¤å½æ°ä¸ºå±è½mixinsä¸çåå彿°ï¼éç¨å½æ°åå¨ç¶çº§ä¸ |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName] && tableRowInfo.param === 'SEND') this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-descriptions bordered :size="size"> |
| | | <a-descriptions-item label="车é´åç§°">{{currentLevelDetails.title}}</a-descriptions-item> |
| | | <a-descriptions-item label="夿³¨">{{currentLevelDetails.memo}}</a-descriptions-item> |
| | | </a-descriptions> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'WorkshopInfo', |
| | | components: {}, |
| | | props: { |
| | | currentLevelDetails: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from './DocumentModal' |
| | | import DocumentModal from '../../../../common/DocumentModal' |
| | | import NcDocumentAssignModal from './NcDocumentAssignModal' |
| | | |
| | | export default { |
| | |
| | | this.$refs.documentAssignModalRef.visible = true |
| | | }, |
| | | |
| | | handleDelete() { |
| | | // æ¤å¤å½æ°ä¸ºå±è½mixinsä¸çåå彿°ï¼éç¨å½æ°åå¨ç¶çº§ä¸ |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName]) this[methodName](tableRowInfo, modalTitle) |
| | | if (this[methodName] && tableRowInfo.param === 'NC') this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |
| | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from './DocumentModal' |
| | | import DocumentModal from '../../../../common/DocumentModal' |
| | | |
| | | export default { |
| | | name: 'OtherDocumentTableList', |
| | |
| | | this.$refs.modalForm.title = modalTitle |
| | | }, |
| | | |
| | | handleDelete() { |
| | | // æ¤å¤å½æ°ä¸ºå±è½mixinsä¸çåå彿°ï¼éç¨å½æ°åå¨ç¶çº§ä¸ |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName] && tableRowInfo.attributionType === 1) this[methodName](tableRowInfo, modalTitle) |
| | | if (this[methodName] && tableRowInfo.param === 'OTHER') this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |
| | |
| | | import ComponentInfo from './Component/ComponentInfo' |
| | | import PartInfo from './Part/PartInfo' |
| | | import ProcessInfo from './Process/ProcessInfo' |
| | | import DocumentInfo from './Document/DocumentInfo' |
| | | import DocumentVersionTableList from './Document/DocumentVersionTableList' |
| | | import DocumentInfo from '../../../common/DocumentInfo' |
| | | import DocumentVersionTableList from '../../../common/DocumentVersionTableList' |
| | | import UseDocumentEquipmentTableList from './Document/UseNcDocumentEquipmentTableList' |
| | | import ProcessStepInfo from './ProcessStep/ProcessStepInfo' |
| | | import FilePreview from './Document/FilePreview' |
| | | import FilePreview from '../../../common/FilePreview' |
| | | import TableContextMenu from '../../../common/TableContextMenu' |
| | | |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä¸è½½æ¶è§¦åä¸è½½å½åææ¡£ |
| | | */ |
| | | // ä¸è½½å½åå³é®éä¸ææ¡£ |
| | | handleDownload() { |
| | | const that = this |
| | | const { docId, docName } = this.currentRightClickedTableRowInfo |
| | |
| | | }) |
| | | }, |
| | | |
| | | // å é¤å½åå³é®éä¸ææ¡£ |
| | | handleDelete() { |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | const that = this |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `å é¤åä¸å¯åæ¶ï¼ç¡®è®¤å é¤åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | dncApi.deleteDocumentApi(docId) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»åºåºæ¶è§¦åå½åææ¡£åºåº |
| | | * åºåºå½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handlePull(menuLabel) { |
| | | const that = this |
| | | const { docId, docName, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | this.$confirm({ |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | |
| | | .then(res => { |
| | | console.log('res------------------', res) |
| | | if (res.success) { |
| | | this.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.reloadDocumentListData({ docClassCode: param, attributionId }) |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: `${menuLabel}æå` |
| | |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»åæ¶åºåºæ¶è§¦åå½åææ¡£åæ¶åºåº |
| | | * åæ¶åºåºå½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handleCancelPull(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | this.$confirm({ |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * ç¹å»å叿¶è§¦åå½åææ¡£åå¸ |
| | | * åå¸å½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handlePublish(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | this.$confirm({ |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»éæ°å叿¶è§¦åå½åææ¡£éæ°åå¸éåä¸ä¸çæ¬ |
| | | * éæ°åå¸å½åå³é®éä¸ææ¡£å¹¶éæ°åå¸éåä¸ä¸ææ¡£çæ¬ |
| | | * @param menuLabel |
| | | */ |
| | | handleRepublish(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | this.$confirm({ |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `确认${menuLabel}åï¼`, |
| | | okText: '确认', |
| | |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»å½æ¡£æ¶è§¦åå½åææ¡£å½æ¡£ä¸åç»æ æ³ç»§ç»å叿彿¡£ |
| | | * é彿¡£å½åå³é®éä¸ææ¡£ä¸åç»æ æ³ç»§ç»å叿彿¡£ |
| | | * @param menuLabel |
| | | */ |
| | | handlePigeonhole(menuLabel) { |
| | | const that = this |
| | | const { docId, param, attributionId } = this.currentRightClickedTableRowInfo |
| | | this.$confirm({ |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: `${menuLabel}åä¸å¯åæ¶ï¼ç¡®è®¤${menuLabel}åï¼`, |
| | | okText: '确认', |
| | |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ§å¶å³é®èåç¹å»å
³é |
| | | */ |
| | | // æ§å¶å³é®èåå
³é |
| | | handleMenuClose() { |
| | | this.$refs.tableContextMenuRef.menuVisible = false |
| | | document.body.removeEventListener('click', this.handleMenuClose) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-descriptions bordered :size="size"> |
| | | <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.docSuffix}}</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.createBy_dictText}}</a-descriptions-item> |
| | | <a-descriptions-item label="å建æ¶é´" :span="2">{{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> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'DocumentInfo', |
| | | components: {}, |
| | | props: { |
| | | currentLevelDetails: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | if (treeNodeInfo) { |
| | | attributionId = treeNodeInfo.treeKey |
| | | attributionType = treeNodeInfo.type |
| | | if (attributionType === 5 || attributionType === 6) docClassCode = 'NC' |
| | | else if (attributionType === 4) docClassCode = 'SEND' |
| | | else docClassCode = 'OTHER' |
| | | } else { |
| | | attributionId = tableRowInfo.attributionId |
| | | attributionType = tableRowInfo.attributionType |
| | | docClassCode = tableRowInfo.param |
| | | } |
| | | if (attributionType === 5 || attributionType === 6) docClassCode = 'NC' |
| | | else docClassCode = 'OTHER' |
| | | this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode }) |
| | | this.visible = true |
| | | }, |
| | |
| | | return false |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»ä¸ä¼ è³æå¡å¨æé®æ¶è§¦å |
| | | */ |
| | | // ç¹å»ä¸ä¼ è³æå¡å¨æé®æ¶è§¦å |
| | | handleUpload() { |
| | | const { fileList, $notification, isUploadMultiple, uploadParams, $bus, handleModalClose } = this |
| | | this.uploading = true |
| | |
| | | this.fileList = newFileList |
| | | }, |
| | | |
| | | /** |
| | | * æ§å¶æä»¶ä¸ä¼ çªå£å
³éå¹¶æ¸
空æä»¶å表 |
| | | */ |
| | | // æ§å¶æä»¶ä¸ä¼ çªå£å
³éå¹¶æ¸
空æä»¶å表 |
| | | handleModalClose() { |
| | | this.visible = false |
| | | this.fileList = [] |
| | |
| | | icon: 'hourglass' |
| | | } |
| | | ], |
| | | SEND: [ |
| | | { label: 'ç¼è¾ææ¡£ä¿¡æ¯', code: 'document_edit', subMenu: [], icon: 'edit', isCommonMethod: false }, |
| | | { label: '导å
¥NCç¨åº', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: 'ä¸è½½', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { |
| | | label: 'çå½å¨æ', |
| | | subMenu: [ |
| | | { label: 'åºåº', code: 'document_pull', icon: 'export', isCommonMethod: true }, |
| | | { label: 'åæ¶åºåº', code: 'document_cancel_pull', icon: 'stop', isCommonMethod: true }, |
| | | { label: 'å
¥åº', code: 'document_push', icon: 'import', isCommonMethod: true }, |
| | | { label: 'åå¸', code: 'document_publish', icon: 'flag', isCommonMethod: true }, |
| | | { label: 'éæ°åå¸', code: 'document_republish', icon: 'reload', isCommonMethod: true }, |
| | | { label: '彿¡£', code: 'document_pigeonhole', icon: 'database', isCommonMethod: true } |
| | | ], |
| | | icon: 'hourglass' |
| | | } |
| | | ], |
| | | //æä»¶ |
| | | file: [ |
| | | { label: 'æå®å½åçæ¬', code: 'file_assign', subMenu: [], icon: 'highlight', isCommonMethod: false },//æä»¶-æå®å½åçæ¬ |