Selaa lähdekoodia

文件收集跨目录移动列表修改

duy 2 vuotta sitten
vanhempi
commit
f1e7962f88
1 muutettua tiedostoa jossa 39 lisäystä ja 4 poistoa
  1. 39 4
      src/views/file/collection.vue

+ 39 - 4
src/views/file/collection.vue

@@ -208,13 +208,34 @@
                         </div>
                     </div>
                     <div class="panel-body">
-                        <el-scrollbar>
+                        <el-scrollbar v-loading="fileDatasListLoading">
                             <el-checkbox-group v-model="checkedMoves" @change="handleCheckedMovesChange">
-                                <div v-for="item in fileDatasList" :key="item.id" class="hc-file-checkbox">
+                                <!-- <div v-for="item in fileDatasList" :key="item.id" class="hc-file-checkbox">
                                     <el-checkbox class="size-xl space" :label="item">
                                         {{ item.fileName }}
                                     </el-checkbox>
-                                </div>
+                                </div> -->
+                                <DynamicScroller
+                                    :items="fileDatasList" 
+                                    :min-item-size="50" 
+                                    key-field="id" 
+                                    style="height: 100%;"
+                                > 
+                                    <template #default="{ item, index, active }">
+                                        <DynamicScrollerItem
+                                            :item="item"
+                                            :active="active"
+                                            :size-dependencies="[item.id]" 
+                                            :data-index="index"
+                                        >
+                                            <div :key="index" style="padding-top: 20px;">
+                                                <el-checkbox class="size-xl space " :label="item">
+                                                    {{ item.fileName }}
+                                                </el-checkbox>
+                                            </div>
+                                        </DynamicScrollerItem>
+                                    </template>
+                                </DynamicScroller>
                             </el-checkbox-group>
                         </el-scrollbar>
                     </div>
@@ -991,12 +1012,14 @@ const movesClick = async () => {
     checkedMoves.value = []
     movesCheckAll.value = false
     treePanelLoading.value = true
+    fileDatasListLoading.value = true
     const { error, code, data } = await archiveFileApi.getarchiveFilePage({
         ...searchForm.value,
         size:9999,
         projectId: projectId.value,
         contractId: contractId.value,
     })
+    fileDatasListLoading.value = false
     if (!error && code === 200) {
         fileDatasList.value = getArrValue(data['records'])
     } else {
@@ -1011,7 +1034,7 @@ const checkedMoves = ref([])
 
 //左侧待迁移文件
 const fileDatasList = ref([])
-
+const fileDatasListLoading = ref(false)
 //全选
 const handleCheckAllChange = (val) => {
     console.log(val, 'val')
@@ -1569,4 +1592,16 @@ const onmousedown = () => {
 
 <style lang="scss">
 @import '~style/file/collection.scss';
+.panel-body .el-checkbox{
+    height: auto;
+}
+.panel-body .el-checkbox.size-xl .el-checkbox__label, .el-radio.size-xl .el-radio__label {
+    font-size: 16px;
+    font-weight: 400;
+    white-space: wrap;
+}
+.user{
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
 </style>