排序、已报工判断、预览
This commit is contained in:
parent
61a6a66650
commit
08953ad7cb
@ -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))
|
||||
|
Binary file not shown.
@ -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;
|
||||
|
@ -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>
|
@ -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'
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user