WXL
2 天以前 c80bc467a41daa6cbae4e5515a300a8ca98cfeaa
unpackage/dist/dev/mp-weixin/pagesSub/ethicalReview/ethicalInfo.js
@@ -7,22 +7,20 @@
  const _easycom_u_radio2 = common_vendor.resolveComponent("u-radio");
  const _easycom_u_radio_group2 = common_vendor.resolveComponent("u-radio-group");
  const _easycom_u__textarea2 = common_vendor.resolveComponent("u--textarea");
  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_u_modal2 = common_vendor.resolveComponent("u-modal");
  (_easycom_up_icon2 + _easycom_u_radio2 + _easycom_u_radio_group2 + _easycom_u__textarea2 + _easycom_u_icon2 + _easycom_u_popup2 + _easycom_uni_icons2 + _easycom_u_modal2)();
  (_easycom_up_icon2 + _easycom_u_radio2 + _easycom_u_radio_group2 + _easycom_u__textarea2 + _easycom_u_popup2 + _easycom_uni_icons2 + _easycom_u_modal2)();
}
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_u_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_u_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
const _easycom_u__textarea = () => "../../uni_modules/uview-plus/components/u--textarea/u--textarea.js";
const _easycom_u_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
const _easycom_uni_icons = () => "../../node-modules/@dcloudio/uni-ui/lib/uni-icons/uni-icons.js";
const _easycom_u_modal = () => "../../uni_modules/uview-plus/components/u-modal/u-modal.js";
if (!Math) {
  (_easycom_up_icon + _easycom_u_radio + _easycom_u_radio_group + _easycom_u__textarea + _easycom_u_icon + _easycom_u_popup + _easycom_uni_icons + _easycom_u_modal)();
  (_easycom_up_icon + _easycom_u_radio + _easycom_u_radio_group + _easycom_u__textarea + _easycom_u_popup + _easycom_uni_icons + _easycom_u_modal)();
}
const canvasWidth = 650;
const canvasHeight = 300;
@@ -44,7 +42,10 @@
    const id = common_vendor.ref(null);
    const fcid = common_vendor.ref(null);
    const materials = common_vendor.ref([]);
    const baseUrlHt = userStore.baseUrlHt;
    const getBaseUrlHt = () => {
      return userStore.baseUrlHt;
    };
    const baseUrlHt = getBaseUrlHt();
    const form = common_vendor.ref({
      expertconclusion: "",
      // 专家结论
@@ -164,7 +165,7 @@
        );
        if (res.code == 200 && res.rows && res.rows.length > 0) {
          const data = res.rows[0];
          common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:475", "加载的审查数据:", data);
          common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:507", "加载的审查数据:", data);
          caseInfo.value = {
            ...caseInfo.value,
            inpatientno: data.inpatientno,
@@ -178,8 +179,8 @@
            endtime: data.endtime || "",
            caseNo: data.caseNo || ""
          };
          common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:491", data.receiveStatus, "data.receiveStatus");
          common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:493", caseInfo.value.receiveStatus, "caseInfo.value");
          common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:523", data.receiveStatus, "data.receiveStatus");
          common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:525", caseInfo.value.receiveStatus, "caseInfo.value");
          if (data.expertconclusion) {
            form.value.expertconclusion = data.expertconclusion.toString();
          }
@@ -195,11 +196,7 @@
            }
          }
          if (data.sigin) {
            if (data.sigin.startsWith("http")) {
              signatureData.signatureUrl = data.sigin;
            } else {
              signatureData.signatureUrl = `/api${data.sigin.startsWith("/") ? "" : "/"}${data.sigin}`;
            }
            signatureData.signatureUrl = getFullUrl(data.sigin);
            signatureData.signatureTime = data.conclusiontime || "";
          }
          if (data.filePatch) {
@@ -229,20 +226,18 @@
        return;
      }
    };
    const replaceUrlDomain = (url) => {
      if (!url)
    const getFullUrl = (path) => {
      if (!path)
        return "";
      if (url.startsWith("http://") || url.startsWith("https://")) {
        const thirdSlashIndex = url.indexOf("/", 8);
        if (thirdSlashIndex !== -1) {
          return `${baseUrlHt}${url.substring(thirdSlashIndex)}`;
        }
        return baseUrlHt;
      if (path.startsWith("blob:") || path.startsWith("file://")) {
        return path;
      }
      if (url.startsWith("/")) {
        return `${baseUrlHt}${url}`;
      if (path.startsWith("http://") || path.startsWith("https://")) {
        const protoEnd = path.indexOf("://") + 3;
        const pathStart = path.indexOf("/", protoEnd);
        return pathStart !== -1 ? `${baseUrlHt}${path.substring(pathStart)}` : baseUrlHt;
      }
      return `${baseUrlHt}/${url}`;
      return `${baseUrlHt}${path.startsWith("/") ? "" : "/"}${path}`;
    };
    const parseAnnexFiles = (filePatch) => {
      if (!filePatch)
@@ -264,7 +259,7 @@
        }
        materials.value = fileList.map((file, index) => {
          const fileName = file.fileName || `附件${index + 1}`;
          const fileUrl = replaceUrlDomain(file.fileUrl || file.path || file.url || "");
          const fileUrl = getFullUrl(file.fileUrl || file.path || file.url || "");
          const ext = fileName.split(".").pop().toLowerCase();
          let icon = "file-text";
          let color = "#909399";
@@ -299,11 +294,11 @@
          };
        });
      } catch (error) {
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:666", "解析附件失败:", error, filePatch);
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:703", "解析附件失败:", error, filePatch);
        const fileList = filePatch.split(";").filter((item) => item.trim());
        materials.value = fileList.map((file, index) => {
          const fileName = file.split("/").pop() || `附件${index + 1}`;
          const fileUrl = replaceUrlDomain(file);
          const fileUrl = getFullUrl(file);
          const ext = fileName.split(".").pop().toLowerCase();
          let icon = "file-text";
          let color = "#909399";
@@ -444,7 +439,7 @@
          tempSignatureData.value = res.tempFilePath;
        },
        fail: (err) => {
          common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:851", "获取画布图片失败:", err);
          common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:889", "获取画布图片失败:", err);
        }
      });
    };
@@ -460,7 +455,7 @@
        common_vendor.index.showLoading({ title: "保存签名中..." });
        const uploadResult = await uploadSignature(tempSignatureData.value);
        if (uploadResult) {
          signatureData.signatureUrl = uploadResult.url;
          signatureData.signatureUrl = getFullUrl(uploadResult.url);
          signatureData.signatureTime = (/* @__PURE__ */ new Date()).toLocaleString("zh-CN");
          signatureData.fileName = uploadResult.originalFilename || `signature_${Date.now()}.png`;
          signatureData.serverData = uploadResult;
@@ -480,7 +475,7 @@
          });
        }
      } catch (error) {
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:899", "签名上传失败:", error);
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:937", "签名上传失败:", error);
        common_vendor.index.hideLoading();
        common_vendor.index.showToast({
          title: "签名上传失败",
@@ -510,7 +505,7 @@
          success: (res) => {
            if (res.statusCode == 200) {
              const data = JSON.parse(res.data);
              common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:935", "签名上传成功:", data);
              common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:973", "签名上传成功:", data);
              if (data.code == 200) {
                resolve({
                  url: data.url,
@@ -546,7 +541,7 @@
        };
        common_vendor.index.setStorageSync("expert_review_signature", signatureInfo);
      } catch (error) {
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:974", "保存签名到本地失败:", error);
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1012", "保存签名到本地失败:", error);
      }
    };
    const removeSignature = () => {
@@ -573,12 +568,19 @@
    };
    const previewSignature = () => {
      if (signatureData.signatureUrl) {
        let previewUrl = signatureData.signatureUrl;
        if (!previewUrl.startsWith("http")) {
          previewUrl = `${(userStore == null ? void 0 : userStore.baseUrlHt) || ""}${previewUrl}`;
        }
        let previewUrl = getFullUrl(signatureData.signatureUrl);
        common_vendor.index.previewImage({
          urls: [previewUrl]
          urls: [previewUrl],
          success: () => {
            common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1050", "签名预览成功");
          },
          fail: (err) => {
            common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1053", "签名预览失败:", err);
            common_vendor.index.showToast({
              title: "签名加载失败",
              icon: "none"
            });
          }
        });
      }
    };
@@ -586,15 +588,16 @@
      if (material.url) {
        common_vendor.index.showLoading({ title: "加载中..." });
        const fileExt = material.type || material.url.split(".").pop().toLowerCase();
        const fileUrl = getFullUrl(material.url);
        if (["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(fileExt)) {
          common_vendor.index.previewImage({
            urls: [material.url],
            urls: [fileUrl],
            current: 0,
            success: () => {
              common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1036", "图片预览成功");
              common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1081", "图片预览成功");
            },
            fail: (err) => {
              common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1039", "图片预览失败:", err);
              common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1084", "图片预览失败:", err);
              common_vendor.index.showToast({
                title: "图片加载失败",
                icon: "none"
@@ -608,7 +611,7 @@
          fileExt
        )) {
          common_vendor.index.downloadFile({
            url: material.url,
            url: fileUrl,
            success: (res) => {
              if (res.statusCode == 200) {
                const filePath = res.tempFilePath;
@@ -617,10 +620,10 @@
                  showMenu: true,
                  fileType: fileExt == "pdf" ? "pdf" : "",
                  success: () => {
                    common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1065", "打开文档成功");
                    common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1110", "打开文档成功");
                  },
                  fail: (err) => {
                    common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1068", "打开文档失败:", err);
                    common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1113", "打开文档失败:", err);
                    common_vendor.index.showToast({
                      title: "无法打开该文件",
                      icon: "none"
@@ -630,7 +633,7 @@
              }
            },
            fail: (err) => {
              common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1078", "下载文件失败:", err);
              common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1123", "下载文件失败:", err);
              common_vendor.index.showToast({
                title: "文件下载失败",
                icon: "none"
@@ -655,7 +658,7 @@
      }
    };
    const onConclusionChange = (value) => {
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1105", "选中结论:", value);
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1150", "选中结论:", value);
    };
    const saveDraft = async () => {
      if (isReadonly.value) {
@@ -697,7 +700,7 @@
          });
        }
      } catch (error) {
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1152", "保存草稿失败:", error);
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1197", "保存草稿失败:", error);
        common_vendor.index.showToast({
          title: "保存失败",
          icon: "none"
@@ -707,7 +710,7 @@
      }
    };
    const submitReview = () => {
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1164", 1);
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1209", 1);
      if (isReadonly.value) {
        common_vendor.index.showToast({
          title: "当前任务已超时,不可操作",
@@ -715,7 +718,7 @@
        });
        return;
      }
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1173", 2);
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1218", 2);
      if (!validateForm())
        return;
      modalTitle.value = "确认提交";
@@ -725,7 +728,7 @@
    const confirmSubmit = async () => {
      try {
        common_vendor.index.showLoading({ title: "提交中..." });
        common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1186", caseInfo.value, "form.value");
        common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1231", caseInfo.value, "form.value");
        const submitData = {
          id: fcid.value,
          expertconclusion: form.value.expertconclusion,
@@ -760,7 +763,7 @@
          });
        }
      } catch (error) {
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1227", "提交失败:", error);
        common_vendor.index.__f__("error", "at pagesSub/ethicalReview/ethicalInfo.vue:1272", "提交失败:", error);
        common_vendor.index.showToast({
          title: "提交失败",
          icon: "none"
@@ -777,7 +780,7 @@
        });
        return false;
      }
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1246", 3);
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1291", 3);
      if (!form.value.expertopinion.trim() && !isDraft) {
        common_vendor.index.showToast({
          title: "请输入审查意见",
@@ -785,7 +788,7 @@
        });
        return false;
      }
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1255", signatureData, "signatureData");
      common_vendor.index.__f__("log", "at pagesSub/ethicalReview/ethicalInfo.vue:1300", signatureData, "signatureData");
      if (!signatureData.signatureUrl && !isDraft) {
        common_vendor.index.showToast({
          title: "请进行手写签名",