WXL
13 小时以前 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c
pages/ethicalReview/ethicalInfo.vue
@@ -277,6 +277,10 @@
      </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"
@@ -294,6 +298,8 @@
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({});
@@ -408,7 +414,7 @@
// 是否超时
const isTimeout = computed(() => {
  return caseInfo.value.receiveStatus === "3";
  return caseInfo.value.receiveStatus == "3";
});
// 是否只读模式
@@ -429,6 +435,8 @@
// 生命周期
onLoad(async (options) => {
  checkAutoLogin(options);
  id.value = options.id;
  fcid.value = options.fcid;
  if (fcid.value) {
@@ -461,7 +469,7 @@
      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);
@@ -479,6 +487,9 @@
        endtime: data.endtime || "",
        caseNo: data.caseNo || "",
      };
      console.log(data.receiveStatus,'data.receiveStatus');
      console.log(caseInfo.value.receiveStatus, "caseInfo.value");
      // 设置表单数据
      if (data.expertconclusion) {
@@ -534,7 +545,7 @@
      });
    }
  } catch (error) {
    if (error.message === "未登录") {
    if (error.message == "未登录") {
      // ✅ 什么都不做,拦截器已经处理
      return;
    }
@@ -546,21 +557,21 @@
// 检查是否超时
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");
  //   }
  // }
};
// 解析附件文件
@@ -727,7 +738,7 @@
// 撤销上一步
const undoLastStroke = () => {
  if (strokeHistory.length === 0) return;
  if (strokeHistory.length == 0) return;
  // 移除最后一步
  strokeHistory.pop();
@@ -750,7 +761,7 @@
  ctx.draw();
  // 更新预览
  if (strokeHistory.length === 0) {
  if (strokeHistory.length == 0) {
    tempSignatureData.value = "";
  } else {
    getCanvasImage();
@@ -894,11 +905,11 @@
        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,
@@ -1019,12 +1030,12 @@
      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("打开文档成功");
              },
@@ -1098,7 +1109,7 @@
      submitData,
    );
    if (res.code === 200) {
    if (res.code == 200) {
      uni.showToast({
        title: "保存成功",
        icon: "success",
@@ -1165,7 +1176,7 @@
      submitData,
    );
    if (res.code === 200) {
    if (res.code == 200) {
      uni.showToast({
        title: "提交成功",
        icon: "success",
@@ -1534,7 +1545,41 @@
    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;