12.2提交

This commit is contained in:
zoujiandong
2025-12-02 15:24:51 +08:00
parent 9788e723a2
commit 60531b339e
11 changed files with 93 additions and 45 deletions
+20 -10
View File
@@ -84,7 +84,7 @@
<view v-else-if="loadMoreStatus === 'more'" class="more">
<text>上拉加载更多</text>
</view>
<view v-else-if="loadMoreStatus === 'noMore'" class="no-more">
<view v-else-if="loadMoreStatus === 'noMore' && currentPage > 1" class="no-more">
<text>没有更多数据了</text>
</view>
</view>
@@ -92,7 +92,7 @@
<!-- 无数据提示 -->
<view class="no-data" v-if="guidelinesList.length === 0 && !isLoading">
<uni-icons type="info" size="60" color="#999"></uni-icons>
<text>暂无诊疗指南数据</text>
<text>暂无数据</text>
</view>
</scroll-view>
</view>
@@ -170,9 +170,7 @@ const innerSortTitle = ref("上传时间");
import downloadStore from "@/store/downloadStoreFile.js";
const downloadTasks=ref([]);
const downLoadtaskList=computed(()=>{
console.log('downLoadtaskList');
console.log(downloadTasks.value.map((item)=>item.id));
return downloadTasks.value.map((item)=>item.id);
return downloadTasks.value.filter((item)=>item.status == "completed").map((item)=>item.id);
});
const chooseInnerSort = (index) => {
sort.value = index;
@@ -451,13 +449,24 @@ const viewGuideline = (cell) => {
return;
}
const pdfUrl = docUrl + cell.path;
console.log('下载列表');
console.log(downloadTasks.value);
downloadTasks.value.forEach(item => {
if(item.id == cell.uuid) {
uni.openDocument({
filePath: item.localPath,
fileType: 'pdf',
success: () => console.log('打开成功'),
fail: (err) => console.error('打开失败', err)
fail: (err) => {
uni.showModal({
title: '提示',
content: JSON.stringify(err),
showCancel: false,
confirmText: '确定',
success: (res) => {
if(res.confirm){
}
}
});
}
});
@@ -497,12 +506,13 @@ const startDownload = (index) => {
const taskItem = downloadStore.getTask(index);
if (!taskItem) return;
if(taskItem.status == "loading"){
uni.showToast({
title: "正在下载",
icon: "none",
});
return false;
};
uni.showToast({
title: "正在下载中",
icon: "none",
});
downloadStore.updateTask(index, {
status: "loading"
});