排序、已报工判断、预览

This commit is contained in:
Ledo 2025-01-15 11:16:16 +08:00
parent 61a6a66650
commit 08953ad7cb
7 changed files with 46 additions and 58 deletions

View File

@ -68,7 +68,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
default boolean judgeHasOver(Long id){
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
query.eq(TaskDispatchDetailDO::getDispatchId,id)
.eq(TaskDispatchDetailDO::getStatus,2);
.eq(TaskDispatchDetailDO::getProcedureStatus,2);
Long aLong = selectCount(query);
return aLong.compareTo(Long.valueOf(0))>0;
}
@ -162,9 +162,12 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
.leftJoin(TaskReportDO.class, "f", TaskReportDO::getDispatchDetailId, TaskDispatchDetailDO::getId)
.ne(ProjectOrderDO::getStatus,6)
.groupBy(TaskDispatchDetailDO::getId)
.orderByAsc(TaskDispatchDetailDO::getId)
.disableSubLogicDel();
if (reqVO.getProcedureStatusList().size()==1 && reqVO.getProcedureStatusList().get(0)==2){
query.orderByDesc(TaskDispatchDO::getCode);
}else {
query.orderByAsc(TaskDispatchDO::getCode);
}
if (CollUtil.isNotEmpty(postIds)) {
query.and(i -> i
.and(j -> j.in(TaskDispatchDetailDO::getPostId, postIds))

View File

@ -11,7 +11,7 @@ import {
getFileAPI,
getLogAPI,
} from '@/services/approveOrder'
import {Base64} from '@/utils/base64.js';
import {Base64} from '@/uni_modules/base64/base64.js';
const popup = ref<UniHelper.UniPopupInstance>()
@ -209,31 +209,9 @@ const handleDownload = (pdfUrl: any) => {
window.open(fileUrl.value);
// #endif
//#ifdef MP-WEIXIN
uni.showLoading({
title: '正在加载中..'
})
uni.downloadFile({
url: pdfUrl,
success: function(res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
uni.hideLoading()
},
uni.navigateTo({
url: './components/showFileWx?fileUrl=' + encodeURIComponent(Base64.encode(pdfUrl))
});
},
complete: function(r) {
uni.hideLoading()
}
});
// fileUrl.value = 'https://star.hz-hl.com/FileServer/onlinePreview?url='+encodeURIComponent(Base64.encode(pdfUrl));
// uni.navigateTo({
// url: './components/showFileWx?fileUrl=' + encodeURIComponent(fileUrl.value)
// });
//#endif
// showFile.value = true;

View File

@ -1,30 +1,38 @@
<template>
<view>
<web-view :src="showUrl"></web-view>
<web-view :src="showUrl" />
</view>
</template>
<script>
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
ref
} from 'vue';
const fileUrl = ref("");
const showUrl = ref("");
import { ref, onMounted, onUnmounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
export default {
setup() {
const showUrl = ref('');
// 使 onLoad
onLoad((options) => {
fileUrl.value = options.fileUrl;
if (fileUrl.value) {
try {
showUrl.value = decodeURIComponent(fileUrl.value);
} catch (error) {
console.error('Error parsing picture data:', error);
console.log('页面加载中...');
console.log(options.fileUrl);
if (options.fileUrl) {
showUrl.value = `https://star.hz-hl.com/FileServer/onlinePreview?url=${options.fileUrl}`;
console.log(showUrl.value);
}
}
})
});
// 使 onMounted onLoad
onMounted(() => {
console.log('Vue 组件挂载完成');
});
return {
showUrl,
};
},
};
</script>
<style>
<style scoped>
/* 你的样式 */
</style>

View File

@ -10,5 +10,5 @@
// export const serviceDomain = 'https://star.hz-hl.com'
// export const serviceDomain = 'http://222.71.165.187:9010'
export const serviceDomain = 'http://localhost:8080'
// export const serviceDomain = 'https://nxhs.cjyx.cc'
// export const serviceDomain = 'http://localhost:8080'
export const serviceDomain = 'https://nxhs.cjyx.cc'

View File

@ -86,7 +86,6 @@ export const http = <T>(options: UniApp.RequestOptions) => {
...options,
// 响应成功
success(res) {
console.log(res)
// 状态码 2xx axios 就是这样设计的
if (res.statusCode >= 200 && res.statusCode < 300) {
if (res.data?.code == 0) {