From 05c363fdd7ab04e3bd9a753e2c5d5bfff04d681c Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 09 六月 2026 10:21:35 +0800
Subject: [PATCH] 备份上传
---
pages/case/CaseDetails.vue | 164 ++++++++++++++++++++++++++++++++++++------------------
1 files changed, 109 insertions(+), 55 deletions(-)
diff --git a/pages/case/CaseDetails.vue b/pages/case/CaseDetails.vue
index 4e84cef..b70d3f5 100644
--- a/pages/case/CaseDetails.vue
+++ b/pages/case/CaseDetails.vue
@@ -192,8 +192,11 @@
<text class="item-label">GCS璇勫垎</text>
<u-input
v-model="form.gcsScore"
- placeholder="璇疯緭鍏CS璇勫垎"
+ type="number"
+ maxlength="1"
+ placeholder="鈮�7"
border="none"
+ @blur="handleGcsBlur"
/>
</view>
@@ -207,7 +210,7 @@
:customStyle="textareaStyle(!form.diagnosisname)"
/>
</view>
- <view class="form-item">
+ <!-- <view class="form-item">
<text class="item-label">鏄惁闇�瑕佽浆杩�</text>
<view class="radio-group horizontal">
<view
@@ -223,7 +226,7 @@
<text class="radio-label">{{ bloodType.label }}</text>
</view>
</view>
- </view>
+ </view> -->
<view class="form-item">
<text class="item-label">琛�鍨�</text>
<view class="radio-group horizontal">
@@ -238,6 +241,23 @@
:class="{ active: form.bloodType === bloodType.value }"
></view>
<text class="radio-label">{{ bloodType.label }}</text>
+ </view>
+ </view>
+ </view>
+ <view class="form-item">
+ <text class="item-label">Rh(D)</text>
+ <view class="radio-group horizontal">
+ <view
+ v-for="rh in rhOptions"
+ :key="rh.value"
+ class="radio-item"
+ @click="form.rhYin = rh.value"
+ >
+ <view
+ class="radio-dot"
+ :class="{ active: form.rhYin === rh.value }"
+ ></view>
+ <text class="radio-label">{{ rh.label }}</text>
</view>
</view>
</view>
@@ -264,31 +284,13 @@
</view>
</view>
</view>
- <view class="form-item full-width"">
+ <view class="form-item full-width">
<text class="item-label">鍏朵粬</text>
<u-input
v-model="form.infectiousOther"
placeholder="璇疯緭鍏ュ叾浠栦紶鏌撶梾"
border="none"
/>
- </view>
-
- <view class="form-item">
- <text class="item-label">Rh(D)</text>
- <view class="radio-group horizontal">
- <view
- v-for="rh in rhOptions"
- :key="rh.value"
- class="radio-item"
- @click="form.rhYin = rh.value"
- >
- <view
- class="radio-dot"
- :class="{ active: form.rhYin === rh.value }"
- ></view>
- <text class="radio-label">{{ rh.label }}</text>
- </view>
- </view>
</view>
</view>
</view>
@@ -301,6 +303,24 @@
</view>
<view class="form-grid">
+ <view class="form-item">
+ <text class="item-label">ICU璇勪及鍖荤敓</text>
+ <u-input
+ v-model="form.icuDoctor"
+ placeholder="璇疯緭鍏CU璇勪及鍖荤敓"
+ border="none"
+ />
+ </view>
+
+ <view class="form-item">
+ <text class="item-label">ICU鍖荤敓鐢佃瘽</text>
+ <u-input
+ v-model="form.icuDoctorPhone"
+ placeholder="璇疯緭鍏CU鍖荤敓鐢佃瘽"
+ type="number"
+ border="none"
+ />
+ </view>
<view class="form-item">
<text class="item-label">涓婃姤淇℃伅鍛�</text>
<u-input
@@ -453,10 +473,10 @@
// 琛ㄥ崟鏁版嵁
const form = ref({
caseNo: "",
- treatmenthospitalname: userStore.userInfo.user.orgName,
- toHospital: userStore.userInfo.user.orgName,
- coordinatorName: userStore.userInfo.user.coordinatorName,
- coordinatorNo: userStore.userInfo.user.coordinatorNo,
+ treatmenthospitalname: "",
+ toHospital: "",
+ coordinatorName: "",
+ coordinatorNo: "",
treatmentdeptname: "",
name: "",
nation: "",
@@ -471,10 +491,10 @@
diagnosisname: "",
bloodType: "",
rhYin: "",
- infoName: userStore.userInfo.user.nickName,
- phone: userStore.userInfo.user.phonenumber,
- reportername: userStore.name || "",
- reporterno: userStore.userId || "",
+ infoName: "",
+ phone: "",
+ reportername: "",
+ reporterno: "",
reporterphone: "", // 鎶ュ憡鑰呰仈绯荤數璇�
reporttime: "",
contactperson: "", // 鏂板锛氳仈绯讳汉锛堝崗璋冨憳锛�
@@ -482,7 +502,7 @@
illnessoverview: "", // 鏂板锛氱梾鎯呮鍐�
infectious: "", // 浼犳煋鐥呮儏鍐�
infectiousOther: "", // 浼犳煋鐥呭叾浠�
- isTransport: "1", // 鏂板锛氭槸鍚﹂渶瑕佽浆杩愶紝榛樿1涓嶉渶瑕�
+ isTransport: "", // 鏂板锛氭槸鍚﹂渶瑕佽浆杩愶紝榛樿1涓嶉渶瑕�
nativeplace: "", // 鏂板锛氱睄璐�
occupation: "", // 鏂板锛氳亴涓�
patientstate: "", // 鏂板锛氱梾浜虹姸鍐�
@@ -589,7 +609,7 @@
const isFormValid = computed(() => {
return (
form.value.name &&
- form.value.idcardno &&
+ // form.value.idcardno &&
form.value.diagnosisname &&
form.value.toHospital
);
@@ -636,7 +656,9 @@
const currentNation = computed(() => {
return nationIndex.value >= 0
? nationLabels.value[nationIndex.value]
- : (form.value.nation?form.value.nation:"璇烽�夋嫨璇佷欢绫诲瀷");
+ : form.value.nation
+ ? form.value.nation
+ : "璇烽�夋嫨姘戞棌";
});
const currentIdCardType = computed(() => {
@@ -644,7 +666,6 @@
? idCardTypeLabels.value[idCardTypeIndex.value]
: "璇烽�夋嫨璇佷欢绫诲瀷";
});
-
const onNationChange = (e) => {
const index = parseInt(e.detail.value);
nationIndex.value = index;
@@ -681,16 +702,15 @@
const idCard = form.value.idcardno;
console.log(idCard, "褰撳墠杈撳叆");
- if (!idCard) {
- idCardError.value = "璇疯緭鍏ヨ瘉浠跺彿鐮�";
- return false;
- }
+ // if (!idCard) {
+ // idCardError.value = "璇疯緭鍏ヨ瘉浠跺彿鐮�";
+ // return false;
+ // }
if (idCard.length !== 18) {
idCardError.value = "韬唤璇佸彿鐮佸繀椤绘槸18浣�";
return false;
}
- console.log(1);
// 楠岃瘉鍓�17浣嶅繀椤绘槸鏁板瓧
const reg = /^\d{17}(\d|X|x)$/;
@@ -698,8 +718,6 @@
idCardError.value = "韬唤璇佸彿鐮佹牸寮忎笉姝g‘";
return false;
}
- console.log(2);
-
// 楠岃瘉鍑虹敓鏃ユ湡
const birthStr = idCard.substring(6, 14);
const year = birthStr.substring(0, 4);
@@ -740,6 +758,29 @@
extractBirthdayFromIdCard();
}
};
+const handleGcsBlur = () => {
+ const val = Number(form.value.gcsScore);
+
+ if (!val && val !== 0) return;
+ console.log(val);
+
+ if (val > 7) {
+ uni.showToast({
+ title: "GCS璇勫垎涓嶈兘澶т簬7",
+ icon: "none",
+ });
+ form.value.gcsScore = "";
+ }
+
+ if (val < 3) {
+ uni.showToast({
+ title: "GCS璇勫垎涓嶈兘灏忎簬3",
+ icon: "none",
+ });
+ form.value.gcsScore = "";
+ }
+};
+
// 韬唤璇佹牎楠岀爜楠岃瘉鍑芥暟
const validateIdCardCheckCode = (idCard) => {
// 绯绘暟鏁扮粍
@@ -850,6 +891,19 @@
isEditMode.value = false;
generateDonorNo();
}
+ console.log(userStore.userInfo, "userStoreuserInfo");
+
+ if (!userStore.userInfo) {
+ await userStore.refreshUserInfo();
+ }
+ form.value.treatmenthospitalname = userStore.userInfo.orgName;
+ form.value.toHospital = userStore.userInfo.orgName;
+ form.value.coordinatorName = userStore.userInfo.coordinatorName;
+ form.value.coordinatorNo = userStore.userInfo.coordinatorNo;
+ form.value.infoName = userStore.userInfo.nickName;
+ form.value.phone = userStore.userInfo.phonenumber;
+ form.value.reportername = userStore.userInfo.name;
+ form.value.reporterno = userStore.userInfo.userId;
// 鑾峰彇瀛楀吀鏁版嵁
dict.value = await useDict(
"sys_IDType",
@@ -1128,7 +1182,7 @@
// 閲嶇疆闄勪欢
attachments.value = [];
form.value.nationality = "涓浗";
- form.value.isTransport = "1";
+ form.value.isTransport = "";
form.value.terminationCase = 0;
form.value.reportStatus = "1";
@@ -1162,7 +1216,7 @@
fileName: file.name,
type: file.type,
})),
- isTransport: form.value.isTransport || "1",
+ isTransport: form.value.isTransport,
terminationCase: form.value.terminationCase || 0,
reportStatus: form.value.reportStatus || "1",
};
@@ -1231,8 +1285,8 @@
.split(",")
.filter((item) => item.trim() !== "");
}
- currentNation.value=form.value.nation;
- idCardTypeIndex.value=form.value.idcardtype;
+ currentNation.value = form.value.nation;
+ idCardTypeIndex.value = form.value.idcardtype;
// 澶勭悊閫夋嫨鍣ㄧ储寮�
// updatePickerIndexes();
// 澶勭悊闄勪欢
@@ -1683,13 +1737,13 @@
overflow-x: auto; /* 姘村钩婊氬姩 */
padding-bottom: 10rpx; /* 缁欐粴鍔ㄦ潯鐣欏嚭绌洪棿 */
-webkit-overflow-scrolling: touch; /* iOS骞虫粦婊氬姩 */
-
+
&.single-line {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
width: 100%;
-
+
/* 闅愯棌婊氬姩鏉★紝浣嗕繚鎸佹粴鍔ㄥ姛鑳� */
&::-webkit-scrollbar {
display: none;
@@ -1706,7 +1760,7 @@
border-radius: 20rpx;
background: #f5f5f7;
transition: all 0.3s ease;
-
+
&.active {
background: rgba(15, 149, 176, 0.1);
}
@@ -1723,7 +1777,7 @@
background: #fff;
transition: all 0.3s ease;
flex-shrink: 0;
-
+
&.active {
border-color: #0f95b0;
background: #0f95b0;
@@ -1750,11 +1804,11 @@
gap: 20rpx;
padding-bottom: 10rpx;
-webkit-overflow-scrolling: touch;
-
+
&::-webkit-scrollbar {
display: none;
}
-
+
.radio-item {
flex-shrink: 0;
display: flex;
@@ -1763,10 +1817,10 @@
padding: 8rpx 16rpx;
border-radius: 20rpx;
}
-
+
.radio-item .radio-dot.active {
border-color: #0f95b0;
-
+
&::after {
background: #0f95b0;
}
@@ -1797,11 +1851,11 @@
.checkbox-group.single-line {
gap: 12rpx;
}
-
+
.checkbox-item {
padding: 6rpx 14rpx;
}
-
+
.checkbox-label {
font-size: 22rpx;
}
--
Gitblit v1.9.3