| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 点击下载时触发下载当前文档 |
| | | */ |
| | | // 下载当前右键选中文档 |
| | | 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) |