From 2cc85c64f1c64a2dbaeae276a3e2ca8420de76b7 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 22 四月 2026 18:09:58 +0800
Subject: [PATCH] 上报转运调试
---
pages/case/CaseDetails.vue | 95 ++++++++++++++++++++++++-----------------------
1 files changed, 49 insertions(+), 46 deletions(-)
diff --git a/pages/case/CaseDetails.vue b/pages/case/CaseDetails.vue
index e2ead72..c925fb5 100644
--- a/pages/case/CaseDetails.vue
+++ b/pages/case/CaseDetails.vue
@@ -207,7 +207,23 @@
:customStyle="textareaStyle(!form.diagnosisname)"
/>
</view>
-
+ <view class="form-item">
+ <text class="item-label">鏄惁闇�瑕佽浆杩�</text>
+ <view class="radio-group horizontal">
+ <view
+ v-for="bloodType in isTransportOptions"
+ :key="bloodType.value"
+ class="radio-item"
+ @click="form.isTransport = bloodType.value"
+ >
+ <view
+ class="radio-dot"
+ :class="{ active: form.isTransport === bloodType.value }"
+ ></view>
+ <text class="radio-label">{{ bloodType.label }}</text>
+ </view>
+ </view>
+ </view>
<view class="form-item">
<text class="item-label">琛�鍨�</text>
<view class="radio-group horizontal">
@@ -540,7 +556,10 @@
{ label: "O鍨�", value: "O" },
{ label: "AB鍨�", value: "AB" },
]);
-
+const isTransportOptions = ref([
+ { label: "闇�瑕�", value: "2" },
+ { label: "涓嶉渶瑕�", value: "1" },
+]);
const rhOptions = ref([
{ label: "闃虫��", value: "positive" },
{ label: "闃存��", value: "negative" },
@@ -615,7 +634,6 @@
? idCardTypeLabels.value[idCardTypeIndex.value]
: "璇烽�夋嫨璇佷欢绫诲瀷";
});
-
const onNationChange = (e) => {
const index = parseInt(e.detail.value);
@@ -804,16 +822,19 @@
// 澶勭悊鍩虹闄勪欢涓婁紶
const handleBaseUpload = (file) => {
console.log("鍩虹闄勪欢涓婁紶鎴愬姛:", file);
+ attachments.value.push(file);
};
// 澶勭悊鍏朵粬闄勪欢涓婁紶
const handleFilesUpdate = (files) => {
- formData.attachments = files.map((file) => ({
+ console.log(files, "files");
+
+ attachments.value = files.map((file) => ({
...file,
// 纭繚鍙瓨鍌ㄥ崐璺緞
- url: file.url.startsWith("http")
- ? file.url.replace(baseUrlHt, "")
- : file.url,
+ // url: file.url.startsWith("http")
+ // ? file.url.replace(baseUrlHt, "")
+ // : file.url,
}));
};
@@ -825,7 +846,7 @@
if (file.type.includes("image")) {
uni.previewImage({
- urls: formData.attachments
+ urls: attachments.value
.filter((f) => f.type.includes("image"))
.map((f) =>
f.url.startsWith("http")
@@ -946,14 +967,13 @@
try {
uni.showLoading({ title: isEditMode.value ? "淇敼涓�..." : "鎻愪氦涓�..." });
-
// 鍑嗗鎻愪氦鏁版嵁
const submitData = {
...form.value,
age: parseInt(form.value.age) || 0,
annexfilesList: attachments.value.map((file) => ({
- url: file.url,
- name: file.name,
+ path: file.url,
+ fileName: file.name,
type: file.type,
})),
phone: form.value.infophone,
@@ -1013,47 +1033,26 @@
};
const loadCaseData = async (id) => {
- // 妯℃嫙鍔犺浇缂栬緫鏁版嵁
- // form.value = {
- // caseNo: "DON20241216001",
- // treatmenthospitalname: "闈掑矝闀滄箹鍖婚櫌",
- // treatmentdeptname: "绁炵粡澶栫",
- // name: "寮犱笁",
- // nation: "姹夋棌",
- // nationality: "涓浗",
- // idcardtype: "灞呮皯韬唤璇�",
- // idcardno: "370203198510123456",
- // sex: "1",
- // birthday: "1985-10-12",
- // age: "38",
- // inpatientno: "ZY20241216001",
- // diagnosisname: "鑴戝浼ゅ鑷磋剳姝讳骸",
- // bloodType: "A",
- // rhYin: "positive",
- // infoname: "鏉庡尰鐢�",
- // infophone: "13800138000",
- // reporterno: "寮犲尰鐢�",
- // reporttime: currentTime.value,
- // };
try {
loading.value = true;
const res = await uni.$uapi.get(
`/project/donatebaseinforeport/getInfo/${id}`,
);
- if (res) {
- console.log(res, "res");
-
- form.value = res;
- console.log(1, "res");
+ if (res.code) {
+ form.value = res.data;
// 澶勭悊閫夋嫨鍣ㄧ储寮�
// updatePickerIndexes();
console.log(2, "res");
// 澶勭悊闄勪欢
- if (res.annexfilesList) {
- attachments.value = res.annexfilesList;
+ if (res.data.annexfilesList) {
+ attachments.value = res.data.annexfilesList;
+ attachments.value.forEach((item) => {
+ item.url = item.path;
+ item.name = item.fileName;
+ });
}
console.log(3, "res");
@@ -1234,6 +1233,16 @@
display: flex;
gap: 20rpx;
margin-top: 40rpx;
+ // background: #fff;
+ // padding: 20rpx 0;
+ // position: fixed;
+ // bottom: 0;
+ // left: 0;
+ // right: 0;
+ // padding: 20rpx 30rpx;
+ // padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+ // box-shadow: 0 -2rpx 20rpx rgba(0, 0, 0, 0.08);
+ // z-index: 9;
}
.btn {
@@ -1457,12 +1466,6 @@
border-radius: 12rpx !important;
padding: 20rpx 24rpx !important;
background: #fff !important;
-}
-
-.action-buttons {
- display: flex;
- gap: 20rpx;
- margin-top: 40rpx;
}
.btn {
--
Gitblit v1.9.3