duy 1 tahun lalu
induk
melakukan
48dbe45974

+ 3 - 3
src/views/config/parameter.vue

@@ -144,9 +144,9 @@ const getConfigByProjectId = async ()=>{
         // 如果projectType 为 1 则选中 公路工程,为 2,则选中水里水电工程,为3,则两个都选中
         // factorType信息为字符串,格式为"1,2,3,4",包含 1,则选中案卷封面,包含2则选中卷内目录,包含3则选中脊背,包含4则选中备考表
         config.value = res.data
-        dirType.value = res.data['dirType']//目录类型
-        indexType.value = res.data['indexType']//流水号类型
-        indexNum.value = res.data['indexNum']//虚位树
+        dirType.value = res.data['dirType'] || 0//目录类型
+        indexType.value = res.data['indexType'] || 0//流水号类型
+        indexNum.value = res.data['indexNum'] || 0//虚位树
         if (config.value.projectType == 1 || config.value.projectType == 2) {
             projectTypeList.value = [config.value.projectType]
         } else if (config.value.projectType == 3) {

+ 0 - 1
src/views/transfer/components/table-collect.vue

@@ -138,7 +138,6 @@ const getTotalTabledata = (data)=>{
     totalTabledata.value = []
     data.forEach((ele)=>{
        ele.nodeLists.forEach((ele1)=>{
-        console.log(ele1, 'ele1')
         if (ele1.list !== null) {
             ele1?.list.forEach((ele2)=>{
                 totalTabledata.value.push(ele2)

+ 6 - 4
src/views/transfer/components/visual-table.vue

@@ -100,16 +100,18 @@ const scrollBehavior = async (e)=>{
       if (scrollDirection === 'down') {
         // 获取提供实际滚动的容器
         const dom = tableRef.value.tableRef.$refs.bodyWrapper.getElementsByClassName('el-scrollbar__wrap')[0]
-        
         const { clientHeight, scrollTop, scrollHeight } = dom
-        // 父容器高度 + 子容器距离父容器顶端的高度 = 子容器可滚动的高度
-        if (clientHeight + scrollTop === scrollHeight) {
+      // 容差值(根据页面缩放比例调整)
+        const tolerance = 8 // 可根据需要调整
+        // 计算剩余可滚动距离
+        const remainingScroll = scrollHeight - clientHeight - scrollTop
+        console.log(remainingScroll, 'remainingScroll')
+        if (remainingScroll <= tolerance) {
           console.log('竖向滚动条已经滚动到底部')
           const res = await queryData()
           if (res) {
             tableData.value = res
           }
-         
         }
       }
 }