From 28fcbc85bcb8be593f57cbf232968c30d31e8e86 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 18 三月 2025 10:36:48 +0800 Subject: [PATCH] 1、DNC结构树页面解决因keep-alive标签缓存组件后切换路由无法正常销毁组件从而使组件内事件通过$bus重复调用的问题 2、DNC产品结构树页面工艺规程版本层级下可以导入和挂载其它文档并且展示相关属性信息 3、DNC设备结构树设备的层级由2调整到7并且调整层级影响的相关功能 --- src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue | 715 ++++++++++++++++++++++++++++++----------------------------- 1 files changed, 361 insertions(+), 354 deletions(-) diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue index cfaa481..bdca851 100644 --- a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue +++ b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue @@ -4,11 +4,13 @@ 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> @@ -22,403 +24,408 @@ </template> <script> - import dncApi from '@/api/dnc' - import TableContextMenu from '../../../common/TableContextMenu' - import HasSentDocumentTableList from './Document/HasSentDocumentTableList' - import HasReceivedDocumentTableList from './Document/HasReceivedDocumentTableList' - import DocumentBatchDeleteModal from '../../../common/DocumentBatchDeleteModal' +import dncApi from '@/api/dnc' +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: { DocumentBatchDeleteModal, HasReceivedDocumentTableList, HasSentDocumentTableList, TableContextMenu }, - props: { - currentTreeNodeInfo: { - type: Object - } +export default { + name: 'DeviceStructureMainTop', + components: { DocumentBatchDeleteModal, HasReceivedDocumentTableList, HasSentDocumentTableList, TableContextMenu }, + props: { + currentTreeNodeInfo: { + type: Object + } + }, + data() { + return { + activeTabKey: 1, + tableContainerSize: 'small', + currentTypeOfDevice: 7,// 浜у搧缁撴瀯鏍戜腑瀹氫箟鐨勮澶囧眰绾ype涓�7 + currentRightClickedTableRowInfo: {}, + hasLoadedDataTabKeyArray: [] + } + }, + created() { + 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: { + /** + * 鎺у埗鍙抽敭鑿滃崟寮�鍚� + * @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) }, - data() { - return { - activeTabKey: 1, - tableContainerSize: 'small', - currentRightClickedTableRowInfo: {}, - hasLoadedDataTabKeyArray: [] - } - }, - created() { - this.$bus.$on('reloadDocumentListData', this.reloadDocumentListData) - this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod) - }, - methods: { - /** - * 鎺у埗鍙抽敭鑿滃崟寮�鍚� - * @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) - }, - /** - * 褰撴爲缁勪欢閫変腑璁惧灞傜骇鑺傜偣鏃惰Е鍙戣幏鍙栧凡鍙戦�佹枃妗e垪琛� - * @param treeNodeInfo 鏍戣妭鐐逛俊鎭� - */ - loadHasSentDocumentListData(treeNodeInfo) { - this.$nextTick(() => { - if (this.$refs.hasSentDocumentTableListRef) { - this.$refs.hasSentDocumentTableListRef.loadData(1) - this.hasLoadedDataTabKeyArray.push(this.activeTabKey) - } - }) - }, - - /** - * tab鏍囩鍒囨崲鏃惰Е鍙� - * @param activeTabKey 褰撳墠宸叉縺娲籺ab鐨刱ey - */ - handleTabChange(activeTabKey) { - this.$bus.$emit('handleSwitchDeviceDocClassCode', activeTabKey) - if (activeTabKey && !this.hasLoadedDataTabKeyArray.includes(activeTabKey)) { - if (activeTabKey === 1) { - this.$nextTick(() => { - if (this.$refs.hasSentDocumentTableListRef) this.$refs.hasSentDocumentTableListRef.loadData(1) - }) - } else { - this.$nextTick(() => { - if (this.$refs.hasReceivedDocumentTableListRef) this.$refs.hasReceivedDocumentTableListRef.loadData(1) - }) - } - this.hasLoadedDataTabKeyArray.push(activeTabKey) + /** + * 褰撴爲缁勪欢閫変腑璁惧灞傜骇鑺傜偣鏃惰Е鍙戣幏鍙栧凡鍙戦�佹枃妗e垪琛� + * @param treeNodeInfo 鏍戣妭鐐逛俊鎭� + */ + loadHasSentDocumentListData(treeNodeInfo) { + this.$nextTick(() => { + if (this.$refs.hasSentDocumentTableListRef) { + this.$refs.hasSentDocumentTableListRef.loadData(1) + this.hasLoadedDataTabKeyArray.push(this.activeTabKey) } - }, + }) + }, - /** - * 鏂囨。浠ュ強NC绋嬪簭瀵煎叆/鍑哄簱/鍏ュ簱/鍒犻櫎鎴愬姛鍚庤Е鍙戦噸鏂板姞杞芥枃妗e垪琛� - * @param docClassCode 鏂囨。绫诲埆 - * @param attributionId 鑺傜偣Id - */ - reloadDocumentListData({ docClassCode, attributionId }) { - // 濡傛灉涓婁紶鐨勬枃妗d笉鏄墍灞炰簬褰撳墠鎵�灞曠ず鑺傜偣鐨勬枃妗e垯涓嶉噸鏂拌幏鍙栨枃妗e垪琛� - if (this.currentTreeNodeInfo.key !== attributionId) return - if (docClassCode === 'SEND') { - if (this.$refs.hasSentDocumentTableListRef) this.$refs.hasSentDocumentTableListRef.loadData(1) - } else { - if (this.$refs.hasReceivedDocumentTableListRef) this.$refs.hasReceivedDocumentTableListRef.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 - }) - } + /** + * tab鏍囩鍒囨崲鏃惰Е鍙� + * @param activeTabKey 褰撳墠宸叉縺娲籺ab鐨刱ey + */ + handleTabChange(activeTabKey) { + this.$bus.$emit('handleSwitchDeviceDocClassCode', activeTabKey) + if (activeTabKey && !this.hasLoadedDataTabKeyArray.includes(activeTabKey)) { + if (activeTabKey === 1) { + this.$nextTick(() => { + if (this.$refs.hasSentDocumentTableListRef) this.$refs.hasSentDocumentTableListRef.loadData(1) }) - .catch(err => { + } else { + this.$nextTick(() => { + if (this.$refs.hasReceivedDocumentTableListRef) this.$refs.hasReceivedDocumentTableListRef.loadData(1) + }) + } + this.hasLoadedDataTabKeyArray.push(activeTabKey) + } + }, + + /** + * 鏂囨。浠ュ強NC绋嬪簭瀵煎叆/鍑哄簱/鍏ュ簱/鍒犻櫎鎴愬姛鍚庤Е鍙戦噸鏂板姞杞芥枃妗e垪琛� + * @param docClassCode 鏂囨。绫诲埆 + * @param attributionId 鑺傜偣Id + */ + reloadDocumentListData({ docClassCode, attributionId }) { + // 濡傛灉涓婁紶鐨勬枃妗d笉鏄墍灞炰簬褰撳墠鎵�灞曠ず鑺傜偣鐨勬枃妗e垯涓嶉噸鏂拌幏鍙栨枃妗e垪琛� + if (this.currentTreeNodeInfo.key !== attributionId) return + if (docClassCode === 'SEND') { + if (this.$refs.hasSentDocumentTableListRef) this.$refs.hasSentDocumentTableListRef.loadData(1) + } else { + if (this.$refs.hasReceivedDocumentTableListRef) this.$refs.hasReceivedDocumentTableListRef.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: err.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 modalTitle 寮圭獥鏍囬 - */ - handleBatchRemove(modalTitle) { - if (!this.$refs.documentBatchDeleteModalRef) return - this.$refs.documentBatchDeleteModalRef.title = modalTitle - this.$refs.documentBatchDeleteModalRef.visible = true - }, + // 鍒犻櫎褰撳墠鍙抽敭閫変腑鏂囨。 + 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 => { + /** + * 鐐瑰嚮鎵归噺鍒犻櫎鍚庡嚭鐜板脊绐� + * @param modalTitle 寮圭獥鏍囬 + */ + handleBatchRemove(modalTitle) { + if (!this.$refs.documentBatchDeleteModalRef) return + this.$refs.documentBatchDeleteModalRef.title = modalTitle + this.$refs.documentBatchDeleteModalRef.visible = true + }, + + /** + * 鍑哄簱褰撳墠鍙抽敭閫変腑鏂囨。 + * @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: err.message + description: res.message }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, + }) + .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 => { + /** + * 鍙戝竷褰撳墠鍙抽敭閫変腑鏂囨。 + * @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: err.message + description: res.message }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, + }) + .finally(() => { + that.$destroyAll() + }) + }, + onCancel: () => { + that.$destroyAll() + } + }) + }, - /** - * 鐐瑰嚮鍙戝竷鏃惰Е鍙戝綋鍓嶆枃妗e彂甯� - * @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 => { + /** + * 鐐瑰嚮鍙戝竷鏃惰Е鍙戝綋鍓嶆枃妗e彂甯� + * @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: err.message + description: res.message }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, + }) + .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 => { + /** + * 閲嶆柊鍙戝竷褰撳墠鍙抽敭閫変腑鏂囨。骞堕噸鏂板彂甯冮��鍥炰笂涓�鏂囨。鐗堟湰 + * @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: err.message + description: res.message }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, + }) + .finally(() => { + that.$destroyAll() + }) + }, + onCancel: () => { + that.$destroyAll() + } + }) + }, - /** - * 閲嶅綊妗e綋鍓嶅彸閿�変腑鏂囨。涓斿悗缁棤娉曠户缁彂甯冩垨褰掓。 - * @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 => { + /** + * 閲嶅綊妗e綋鍓嶅彸閿�変腑鏂囨。涓斿悗缁棤娉曠户缁彂甯冩垨褰掓。 + * @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: err.message + description: res.message }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message }) - .finally(() => { - that.$destroyAll() - }) - }, - onCancel: () => { - that.$destroyAll() - } - }) - }, + }) + .finally(() => { + that.$destroyAll() + }) + }, + onCancel: () => { + that.$destroyAll() + } + }) + }, - // 閲嶇疆tabKey骞朵笖閲婃斁鍔犺浇鏂囨。鍒楄〃鐨勬帴鍙� - releaseLoadDocumentListApi() { - this.hasLoadedDataTabKeyArray = [] - this.handleTabChange(this.activeTabKey) - }, + // 閲嶇疆tabKey骞朵笖閲婃斁鍔犺浇鏂囨。鍒楄〃鐨勬帴鍙� + releaseLoadDocumentListApi() { + this.hasLoadedDataTabKeyArray = [] + this.handleTabChange(this.activeTabKey) + }, - // 鎺у埗鍙抽敭鑿滃崟鍏抽棴 - handleMenuClose() { - this.$refs.tableContextMenuRef.menuVisible = false - document.body.removeEventListener('click', this.handleMenuClose) - }, + // 鎺у埗鍙抽敭鑿滃崟鍏抽棴 + handleMenuClose() { + this.$refs.tableContextMenuRef.menuVisible = false + document.body.removeEventListener('click', this.handleMenuClose) + }, - triggerCorrespondingMethod({ methodName, modalTitle }) { - if (this[methodName]) this[methodName](modalTitle) - } + triggerCorrespondingMethod({ methodName, modalTitle }) { + if (this[methodName]) this[methodName](modalTitle) } } +} </script> <style scoped> - /deep/ .ant-table-tbody .ant-table-row { - cursor: pointer; - } +/deep/ .ant-table-tbody .ant-table-row { + cursor: pointer; +} </style> \ No newline at end of file -- Gitblit v1.9.3