排序、已报工判断、预览

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

View File

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

View File

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

View File

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

View File

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