From 8b311e8310a5ff81068129f59e4e1c434a1e3a25 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期一, 23 六月 2025 14:25:10 +0800
Subject: [PATCH] 新增流程处理,新增程序确认表处理

---
 src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue |  792 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 401 insertions(+), 391 deletions(-)

diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureMainTop.vue
index cfaa481..31fc780 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,411 @@
 </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'
+import { postAction } from '@api/manage'
 
-  export default {
-    name: 'DeviceStructureMainTop',
-    components: { DocumentBatchDeleteModal, HasReceivedDocumentTableList, HasSentDocumentTableList, TableContextMenu },
-    props: {
-      currentTreeNodeInfo: {
-        type: Object
-      }
-    },
-    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)
-      },
+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: [],
+      url:{
 
-      /**
-       * 褰撴爲缁勪欢閫変腑璁惧灞傜骇鑺傜偣鏃惰Е鍙戣幏鍙栧凡鍙戦�佹枃妗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)
-        }
-      },
-
-      /**
-       * 鏂囨。浠ュ強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
-              })
-            }
-          })
-          .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
-      },
-
-      /**
-       * 鍑哄簱褰撳墠鍙抽敭閫変腑鏂囨。
-       * @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()
-          }
-        })
-      },
-
-      /**
-       * 鐐瑰嚮鍙戝竷鏃惰Е鍙戝綋鍓嶆枃妗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 => {
-                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()
-          }
-        })
-      },
-
-      /**
-       * 閲嶅綊妗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 => {
-                that.$notification.error({
-                  message: '娑堟伅',
-                  description: err.message
-                })
-              })
-              .finally(() => {
-                that.$destroyAll()
-              })
-          },
-          onCancel: () => {
-            that.$destroyAll()
-          }
-        })
-      },
-
-      // 閲嶇疆tabKey骞朵笖閲婃斁鍔犺浇鏂囨。鍒楄〃鐨勬帴鍙�
-      releaseLoadDocumentListApi() {
-        this.hasLoadedDataTabKeyArray = []
-        this.handleTabChange(this.activeTabKey)
-      },
-
-      // 鎺у埗鍙抽敭鑿滃崟鍏抽棴
-      handleMenuClose() {
-        this.$refs.tableContextMenuRef.menuVisible = false
-        document.body.removeEventListener('click', this.handleMenuClose)
-      },
-
-      triggerCorrespondingMethod({ methodName, modalTitle }) {
-        if (this[methodName]) this[methodName](modalTitle)
       }
     }
+  },
+  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)
+    },
+
+    /**
+     * 褰撴爲缁勪欢閫変腑璁惧灞傜骇鑺傜偣鏃惰Е鍙戣幏鍙栧凡鍙戦�佹枃妗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)
+      }
+    },
+
+    /**
+     * 鏂囨。浠ュ強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
+            })
+          }
+        })
+        .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
+    },
+
+    /**
+     * 鍑哄簱褰撳墠鍙抽敭閫変腑鏂囨。
+     * @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()
+        }
+      })
+    },
+
+    /**
+     * 鐐瑰嚮鍙戝竷鏃惰Е鍙戝綋鍓嶆枃妗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 => {
+              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()
+        }
+      })
+    },
+
+    /**
+     * 閲嶅綊妗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 => {
+              that.$notification.error({
+                message: '娑堟伅',
+                description: err.message
+              })
+            })
+            .finally(() => {
+              that.$destroyAll()
+            })
+        },
+        onCancel: () => {
+          that.$destroyAll()
+        }
+      })
+    },
+
+    // 閲嶇疆tabKey骞朵笖閲婃斁鍔犺浇鏂囨。鍒楄〃鐨勬帴鍙�
+    releaseLoadDocumentListApi() {
+      this.hasLoadedDataTabKeyArray = []
+      this.handleTabChange(this.activeTabKey)
+    },
+
+    // 鎺у埗鍙抽敭鑿滃崟鍏抽棴
+    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;
-  }
+/deep/ .ant-table-tbody .ant-table-row {
+  cursor: pointer;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3