| | |
| | | </view> |
| | | </u-popup> |
| | | |
| | | <view v-if="showHomeButton" class="home-fab" @click="goHome"> |
| | | <uni-icons type="home" size="24" color="#fff" /> |
| | | <text class="home-text">首页</text> |
| | | </view> |
| | | <!-- 提交确认弹窗 --> |
| | | <u-modal |
| | | :show="showSubmitModal" |
| | |
| | | import { onLoad, onShow } from "@dcloudio/uni-app"; |
| | | import dayjs from "dayjs"; |
| | | import { useUserStore } from "@/stores/user"; |
| | | import { useHomeButton } from "@/stores/useHomeButton"; |
| | | const { showHomeButton, checkAutoLogin, goHome } = useHomeButton(); |
| | | const userStore = useUserStore(); |
| | | |
| | | const dict = ref({}); |
| | |
| | | |
| | | // 是否超时 |
| | | const isTimeout = computed(() => { |
| | | return caseInfo.value.receiveStatus === "3"; |
| | | return caseInfo.value.receiveStatus == "3"; |
| | | }); |
| | | |
| | | // 是否只读模式 |
| | |
| | | |
| | | // 生命周期 |
| | | onLoad(async (options) => { |
| | | checkAutoLogin(options); |
| | | |
| | | id.value = options.id; |
| | | fcid.value = options.fcid; |
| | | if (fcid.value) { |
| | |
| | | params, |
| | | ); |
| | | |
| | | if (res.code === 200 && res.rows && res.rows.length > 0) { |
| | | if (res.code == 200 && res.rows && res.rows.length > 0) { |
| | | const data = res.rows[0]; |
| | | console.log("加载的审查数据:", data); |
| | | |
| | |
| | | endtime: data.endtime || "", |
| | | caseNo: data.caseNo || "", |
| | | }; |
| | | console.log(data.receiveStatus,'data.receiveStatus'); |
| | | |
| | | console.log(caseInfo.value.receiveStatus, "caseInfo.value"); |
| | | |
| | | // 设置表单数据 |
| | | if (data.expertconclusion) { |
| | |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | if (error.message === "未登录") { |
| | | if (error.message == "未登录") { |
| | | // ✅ 什么都不做,拦截器已经处理 |
| | | return; |
| | | } |
| | |
| | | |
| | | // 检查是否超时 |
| | | const checkTimeoutStatus = (data) => { |
| | | if (data.receiveStatus === "3") { |
| | | if (data.receiveStatus == "3") { |
| | | // 状态已经是超时 |
| | | return; |
| | | } |
| | | |
| | | // 如果有截止时间,检查是否超过当前时间 |
| | | if (data.endtime) { |
| | | const endTime = new Date(data.endtime); |
| | | const now = new Date(); |
| | | if (now > endTime) { |
| | | // 标记为超时状态 |
| | | caseInfo.value.receiveStatus = "3"; |
| | | updateButtonStatus("3"); |
| | | } |
| | | } |
| | | // if (data.endtime) { |
| | | // const endTime = new Date(data.endtime); |
| | | // const now = new Date(); |
| | | // if (now > endTime) { |
| | | // // 标记为超时状态 |
| | | // caseInfo.value.receiveStatus = "3"; |
| | | // updateButtonStatus("3"); |
| | | // } |
| | | // } |
| | | }; |
| | | |
| | | // 解析附件文件 |
| | |
| | | |
| | | // 撤销上一步 |
| | | const undoLastStroke = () => { |
| | | if (strokeHistory.length === 0) return; |
| | | if (strokeHistory.length == 0) return; |
| | | |
| | | // 移除最后一步 |
| | | strokeHistory.pop(); |
| | |
| | | ctx.draw(); |
| | | |
| | | // 更新预览 |
| | | if (strokeHistory.length === 0) { |
| | | if (strokeHistory.length == 0) { |
| | | tempSignatureData.value = ""; |
| | | } else { |
| | | getCanvasImage(); |
| | |
| | | uploadType: "signature", |
| | | }, |
| | | success: (res) => { |
| | | if (res.statusCode === 200) { |
| | | if (res.statusCode == 200) { |
| | | const data = JSON.parse(res.data); |
| | | console.log("签名上传成功:", data); |
| | | |
| | | if (data.code === 200) { |
| | | if (data.code == 200) { |
| | | resolve({ |
| | | url: data.url, |
| | | fileName: data.fileName, |
| | |
| | | uni.downloadFile({ |
| | | url: material.url, |
| | | success: (res) => { |
| | | if (res.statusCode === 200) { |
| | | if (res.statusCode == 200) { |
| | | const filePath = res.tempFilePath; |
| | | uni.openDocument({ |
| | | filePath: filePath, |
| | | showMenu: true, |
| | | fileType: fileExt === "pdf" ? "pdf" : "", |
| | | fileType: fileExt == "pdf" ? "pdf" : "", |
| | | success: () => { |
| | | console.log("打开文档成功"); |
| | | }, |
| | |
| | | submitData, |
| | | ); |
| | | |
| | | if (res.code === 200) { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: "保存成功", |
| | | icon: "success", |
| | |
| | | submitData, |
| | | ); |
| | | |
| | | if (res.code === 200) { |
| | | if (res.code == 200) { |
| | | uni.showToast({ |
| | | title: "提交成功", |
| | | icon: "success", |
| | |
| | | color: #fa8c16; |
| | | } |
| | | } |
| | | .home-fab { |
| | | position: fixed; |
| | | top: 80rpx; /* 避开状态栏,可调 */ |
| | | right: 120rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8rpx; |
| | | background: rgba(24, 144, 255, 0.9); |
| | | backdrop-filter: blur(8rpx); |
| | | border-radius: 60rpx; |
| | | padding: 14rpx 28rpx; |
| | | box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.2); |
| | | z-index: 999; |
| | | transition: all 0.2s ease; |
| | | } |
| | | |
| | | .home-fab:active { |
| | | transform: scale(0.96); |
| | | background: #1890ff; |
| | | } |
| | | |
| | | .home-text { |
| | | color: #fff; |
| | | font-size: 28rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | /* 针对微信小程序,避免与胶囊重叠 (可选) */ |
| | | /* #ifdef MP-WEIXIN */ |
| | | .home-fab { |
| | | top: 100rpx; /* 胶囊大约位置,可调整 */ |
| | | right: 20rpx; |
| | | } |
| | | /* #endif */ |
| | | .signature-section { |
| | | margin-top: 20rpx; |
| | | padding: 24rpx; |