cuilei
2025-06-16 1b8b8bafca4fe4c3556bda5e66e3ff6252bd7acc
src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue
@@ -117,8 +117,7 @@
        this.$message.error('请设置url.list属性!')
        return
      }
      console.log('currentNCDocumentAttributionInfo', this.currentNCDocumentAttributionInfo)
      const { attributionId, attributionType, docClassCode } = this.currentNCDocumentAttributionInfo
        const { attributionId, attributionType, docClassCode, autoClickedLevelInfo } = this.currentNCDocumentAttributionInfo
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) this.ipagination.current = 1
      var params = this.getQueryParams()//查询条件
@@ -131,6 +130,11 @@
      getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records
            if (autoClickedLevelInfo) {
              const tableRowRecord = this.dataSource.find(item => item.docId === autoClickedLevelInfo.docId)
              this.handleTableRowClick(tableRowRecord)
              this.$bus.$emit('searchNcFinished')
            }
          if (res.result.total) {
            this.ipagination.total = res.result.total
          } else {
@@ -144,6 +148,10 @@
      })
    },
      /**
       * 自定义表格行功能
       * @param record 表格行记录
       */
    customRow(record) {
      return {
        style: {
@@ -156,12 +164,20 @@
            this.$emit('handleTableContextMenuOpen', this.currentRightClickedDocumentInfo)
          },
          click: () => {
              this.handleTableRowClick(record)
            }
          }
        }
      },
      /**
       * 表格行点击事件
       * @param record 表格行记录
       */
      handleTableRowClick(record) {
            if (this.currentClickedDocumentInfo.docId === record.docId) return
            this.currentClickedDocumentInfo = Object.assign({}, record)
            this.$bus.$emit('sendCurrentClickedDocumentInfo', record)
          }
        }
      }
    },
    /**