|
@@ -86,7 +86,15 @@
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
<template #action>
|
|
<template #action>
|
|
- <HcPages :pages="searchForm" @change="pageChange" />
|
|
|
|
|
|
+ <div class="lr-dialog-footer h-full">
|
|
|
|
+ <div class="left hc-flex h-full text-14px">
|
|
|
|
+ <span class="text">当前页的文件总页数:</span>
|
|
|
|
+ <span>{{ fileTotalPage || 0 }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="right">
|
|
|
|
+ <HcPages :pages="searchForm" @change="pageChange" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
</hc-new-card>
|
|
</hc-new-card>
|
|
|
|
|
|
@@ -695,6 +703,7 @@ const tableData = ref([])
|
|
const tableLoading = ref(false)
|
|
const tableLoading = ref(false)
|
|
const getTableData = async () => {
|
|
const getTableData = async () => {
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
|
|
+ fileTotalPage.value = 0
|
|
const { error, code, data } = await archiveFileApi.getarchiveFilePage({
|
|
const { error, code, data } = await archiveFileApi.getarchiveFilePage({
|
|
...searchForm.value,
|
|
...searchForm.value,
|
|
projectId: projectId.value,
|
|
projectId: projectId.value,
|
|
@@ -708,6 +717,23 @@ const getTableData = async () => {
|
|
tableData.value = []
|
|
tableData.value = []
|
|
searchForm.value.total = 0
|
|
searchForm.value.total = 0
|
|
}
|
|
}
|
|
|
|
+ getFileTotalPage()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//获取当前页的总页数
|
|
|
|
+const fileTotalPage = ref(0)
|
|
|
|
+const getFileTotalPage = () => {
|
|
|
|
+ const arr = tableData.value
|
|
|
|
+ if (arr.length <= 0) {
|
|
|
|
+ fileTotalPage.value = 0
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ //遍历数据
|
|
|
|
+ let newPage = 0
|
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
|
+ newPage = newPage + Number(arr[i].filePage || 0)
|
|
|
|
+ }
|
|
|
|
+ fileTotalPage.value = newPage
|
|
}
|
|
}
|
|
|
|
|
|
//多选
|
|
//多选
|