设备结构树:
1、实现文档批量删除功能
2、实现文档列表的排序以及筛选功能
3、实现树节点车间与设备的权限配置功能
系统管理:删除DNC部门管理页面以及在菜单管理中删除对应菜单
| | |
| | | </a-tab-pane> |
| | | |
| | | <TableContextMenu :tableRowInfo="currentRightClickedTableRowInfo" ref="tableContextMenuRef"/> |
| | | |
| | | <DocumentBatchDeleteModal :currentDocumentInfo="currentRightClickedTableRowInfo" :size="tableContainerSize" |
| | | @reloadDocumentListData="reloadDocumentListData" ref="documentBatchDeleteModalRef"/> |
| | | </a-tabs> |
| | | </template> |
| | | |
| | |
| | | import TableContextMenu from '../../../common/TableContextMenu' |
| | | import HasSentDocumentTableList from './Document/HasSentDocumentTableList' |
| | | import HasReceivedDocumentTableList from './Document/HasReceivedDocumentTableList' |
| | | import DocumentBatchDeleteModal from '../../../common/DocumentBatchDeleteModal' |
| | | |
| | | export default { |
| | | name: 'DeviceStructureMainTop', |
| | | components: { HasReceivedDocumentTableList, HasSentDocumentTableList, TableContextMenu }, |
| | | components: { DocumentBatchDeleteModal, HasReceivedDocumentTableList, HasSentDocumentTableList, TableContextMenu }, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | |
| | | */ |
| | | 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' |
| | |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»æ¹éå é¤ååºç°å¼¹çª |
| | | * @param modalTitle å¼¹çªæ é¢ |
| | | */ |
| | | handleBatchRemove(modalTitle) { |
| | | if (!this.$refs.documentBatchDeleteModalRef) return |
| | | this.$refs.documentBatchDeleteModalRef.title = modalTitle |
| | | this.$refs.documentBatchDeleteModalRef.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * åºåºå½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | | */ |
| | |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | dataIndex: 'docName', |
| | | key: 'docName', |
| | | align: 'center', |
| | | width: 300, |
| | | sorter: true |
| | | }, |
| | | { title: '代ç çæ¬', dataIndex: 'docAlias', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { |
| | | title: 'åºåºç¶æ', |
| | | dataIndex: 'pullStatus_dictText', |
| | | key: 'pullStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | | dataIndex: 'docStatus_dictText', |
| | | key: 'docStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ] |
| | | }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | { |
| | | title: 'å建æ¶é´', |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | sorter: true |
| | | } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å页ãæåºæ¹åãçéæ¶è§¦å |
| | | * @param pagination å页å¨é项 |
| | | * @param filters çéé项 |
| | | * @param sorter æåºé项 |
| | | */ |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (sorter.order) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' |
| | | } else { |
| | | this.isorter.column = 'createTime' |
| | | this.isorter.order = 'desc' |
| | | } |
| | | for (let key in filters) { |
| | | this.filters[key] = filters[key].join(',') |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | dataIndex: 'docName', |
| | | key: 'docName', |
| | | align: 'center', |
| | | width: 300, |
| | | sorter: true |
| | | }, |
| | | { title: '代ç çæ¬', dataIndex: 'docAlias', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { |
| | | title: 'åºåºç¶æ', |
| | | dataIndex: 'pullStatus_dictText', |
| | | key: 'pullStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | | dataIndex: 'docStatus_dictText', |
| | | key: 'docStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ] |
| | | }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | { |
| | | title: 'åæ¥ç¶æ', |
| | | dataIndex: 'syncStatus_dictText', |
| | | key: 'syncStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåæ¥', value: 1 }, |
| | | { text: '已忥', value: 2 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | sorter: true |
| | | } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å页ãæåºæ¹åãçéæ¶è§¦å |
| | | * @param pagination å页å¨é项 |
| | | * @param filters çéé项 |
| | | * @param sorter æåºé项 |
| | | */ |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (sorter.order) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' |
| | | } else { |
| | | this.isorter.column = 'createTime' |
| | | this.isorter.order = 'desc' |
| | | } |
| | | for (let key in filters) { |
| | | this.filters[key] = filters[key].join(',') |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»æ¹éå é¤ååºç°å¼¹çª |
| | | * @param modalTitle å¼¹çªæ é¢ |
| | | */ |
| | | handleBatchRemove(modalTitle) { |
| | | if (!this.$refs.documentBatchDeleteModalRef) return |
| | | this.$refs.documentBatchDeleteModalRef.title = modalTitle |
| | |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ], |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ], |
| | | ] |
| | | }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center', width: 200 }, |
| | | { |
| | |
| | | // 确认æ¹éå é¤ææ¡£ |
| | | confirmBatchDeleteDocument() { |
| | | const that = this |
| | | const { selectedRowKeys, $notification, $confirm, currentDocumentInfo: { param, attributionId } } = that |
| | | const { selectedRowKeys, $notification, $confirm, currentDocumentInfo: { param, attributionId, attributionType } } = that |
| | | |
| | | if (selectedRowKeys.length === 0) { |
| | | $notification.warning({ |
| | |
| | | onOk: () => { |
| | | let hasRequestedSuccessCount = 0 |
| | | let hasRequestedCount = 0 |
| | | let method |
| | | let queryParam |
| | | selectedRowKeys.forEach(key => { |
| | | dncApi.deleteDocumentApi(key) |
| | | if (attributionType !== 4) { |
| | | method = dncApi.deleteDocumentApi |
| | | queryParam = key |
| | | } else { |
| | | method = dncApi.deleteDeviceRelativeDocumentApi |
| | | queryParam = { docId: key, attributionId } |
| | | } |
| | | method(queryParam) |
| | | .then(res => { |
| | | if (res.success) { |
| | | $notification.success({ |