From 2140c5aae2032673cef7055df9738b9bacf37816 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 23 九月 2026 16:46:20 +0800
Subject: [PATCH] 青岛维护
---
pagesSub/case/CaseDetails.vue | 184 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 179 insertions(+), 5 deletions(-)
diff --git a/pagesSub/case/CaseDetails.vue b/pagesSub/case/CaseDetails.vue
index 0b149ff..a5e5ffb 100644
--- a/pagesSub/case/CaseDetails.vue
+++ b/pagesSub/case/CaseDetails.vue
@@ -25,11 +25,10 @@
</view>
<view class="form-item">
<text class="item-label">涓婃姤鍖婚櫌</text>
- <u-input
- v-model="form.toHospital"
- placeholder="璇疯緭鍏ヤ笂鎶ュ尰闄�"
- maxlength="100"
- />
+ <view class="picker" @click="openHospitalPopup">
+ <text>{{ form.toHospital || "璇烽�夋嫨涓婃姤鍖婚櫌" }}</text>
+ <text class="icon-arrow">鈥�</text>
+ </view>
</view>
<view class="form-item">
<text class="item-label">绉戝鍚嶇О</text>
@@ -416,6 +415,51 @@
{{ loading ? "鎻愪氦涓�..." : isEditMode ? "淇濆瓨淇敼" : "鎻愪氦涓婃姤" }}
</u-button>
</view>
+
+ <!-- 涓婃姤鍖婚櫌鏈烘瀯閫夋嫨寮圭獥 -->
+ <u-popup
+ :show="hospitalPopupShow"
+ mode="bottom"
+ round="20"
+ :close-on-click-overlay="true"
+ @close="hospitalPopupShow = false"
+ >
+ <view class="hospital-popup">
+ <view class="popup-header">
+ <text class="popup-title">閫夋嫨涓婃姤鍖婚櫌</text>
+ <text class="popup-close" @click="hospitalPopupShow = false">脳</text>
+ </view>
+ <view class="popup-search">
+ <u-search
+ v-model="hospitalKeyword"
+ placeholder="璇疯緭鍏ユ満鏋勫悕绉版ā绯婃煡璇�"
+ :showAction="false"
+ :clearabled="true"
+ @change="onHospitalKeywordChange"
+ @search="searchHospital(hospitalKeyword)"
+ @clear="onHospitalClear"
+ />
+ </view>
+ <scroll-view scroll-y class="hospital-list">
+ <view
+ v-for="org in hospitalOptions"
+ :key="org.id"
+ class="hospital-item"
+ :class="{ active: org.organizationname === form.toHospital }"
+ @click="selectHospital(org)"
+ >
+ <text class="hospital-name">{{ org.organizationname }}</text>
+ <text class="hospital-id" v-if="org.organizationid">
+ {{ org.organizationid }}
+ </text>
+ </view>
+ <view v-if="hospitalLoading" class="list-tip">鍔犺浇涓�...</view>
+ <view v-else-if="!hospitalOptions.length" class="list-tip">
+ {{ hospitalKeyword ? "鏈煡璇㈠埌鐩稿叧鏈烘瀯" : "鏆傛棤鏈烘瀯鏁版嵁" }}
+ </view>
+ </scroll-view>
+ </view>
+ </u-popup>
</view>
</view>
</template>
@@ -438,6 +482,7 @@
"sys_AgeUnit", // 骞撮緞鍗曚綅锛堝凡瀛樺湪锛�
"sys_education",
"sys_occupation",
+ "sys_RegionalLevel", // 鏈烘瀯鎵�灞炲湴鍖�
];
const { dictData, loading: dictLoading } = useDictMapper(requiredDictTypes);
@@ -485,6 +530,13 @@
// 鎶ュ憡鏃堕棿閫夋嫨鍣�
const showReportTimePicker = ref(false);
const reportTimeValue = ref(Date.now());
+
+// 涓婃姤鍖婚櫌鏈烘瀯妯$硦鏌ヨ
+const hospitalPopupShow = ref(false);
+const hospitalKeyword = ref("");
+const hospitalOptions = ref([]);
+const hospitalLoading = ref(false);
+let hospitalSearchTimer = null;
// 鍦板潃鏁版嵁
const residenceAddress = ref({ sheng: "", shi: "", qu: "" });
@@ -535,6 +587,7 @@
registerprovincename: "",
registercityname: "",
registertownname: "",
+ registerCountyName: "",
registercommunityname: "",
residenceaddress: "",
residenceprovince: "",
@@ -896,6 +949,53 @@
if (!isEditMode.value) {
generateCaseNo();
}
+};
+
+// ===== 涓婃姤鍖婚櫌鏈烘瀯妯$硦鏌ヨ =====
+const openHospitalPopup = () => {
+ hospitalPopupShow.value = true;
+ hospitalKeyword.value = "";
+ hospitalOptions.value = [];
+ searchHospital("");
+};
+
+const onHospitalKeywordChange = (val) => {
+ clearTimeout(hospitalSearchTimer);
+ const keyword = (val || "").trim();
+ if (!keyword) {
+ searchHospital("");
+ return;
+ }
+ hospitalSearchTimer = setTimeout(() => searchHospital(keyword), 300);
+};
+
+const onHospitalClear = () => {
+ hospitalKeyword.value = "";
+ searchHospital("");
+};
+
+const searchHospital = async (keyword) => {
+ hospitalLoading.value = true;
+ try {
+ const params = { pageNum: 1, pageSize: 50 };
+ if (keyword) params.organizationname = keyword;
+ const res = await uni.$uapi.get("/project/organization/list", params);
+ hospitalOptions.value = res.rows || [];
+ } catch (e) {
+ hospitalOptions.value = [];
+ } finally {
+ hospitalLoading.value = false;
+ }
+};
+
+const selectHospital = (org) => {
+ form.value.toHospital = org.organizationname;
+ // 閫変腑鏈烘瀯鐨勬墍灞炲湴鍖�(regionallevel)瀵圭収 sys_RegionalLevel 瀛楀吀鍙栧嚭鍦板尯鍚嶇О锛屽瓨鍏ユ埛绫嶅幙鍚�
+ const regionalItem = getDictList("sys_RegionalLevel").find(
+ (item) => item.value == org.regionallevel,
+ );
+ form.value.registerCountyName = regionalItem ? regionalItem.label : "";
+ hospitalPopupShow.value = false;
};
// 闄勪欢澶勭悊锛堢ず渚嬶紝闇�鏍规嵁瀹為檯闄勪欢缁勪欢璋冩暣锛�
@@ -1496,4 +1596,78 @@
}
}
}
+
+// ===== 涓婃姤鍖婚櫌鏈烘瀯閫夋嫨寮圭獥 =====
+.hospital-popup {
+ padding: 30rpx;
+ background: #fff;
+
+ .popup-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 20rpx;
+
+ .popup-title {
+ font-size: 32rpx;
+ font-weight: 650;
+ color: #1d1d1f;
+ }
+
+ .popup-close {
+ font-size: 44rpx;
+ color: #86868b;
+ line-height: 1;
+ padding: 0 10rpx;
+ }
+ }
+
+ .popup-search {
+ margin-bottom: 20rpx;
+ }
+
+ .hospital-list {
+ max-height: 600rpx;
+
+ .hospital-item {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 28rpx 20rpx;
+ border-bottom: 2rpx solid #f0f0f0;
+
+ &:active {
+ background: #f5f5f7;
+ }
+
+ &.active {
+ background: rgba(15, 149, 176, 0.08);
+
+ .hospital-name {
+ color: #0f95b0;
+ font-weight: 600;
+ }
+ }
+
+ .hospital-name {
+ font-size: 29rpx;
+ color: #1d1d1f;
+ flex: 1;
+ }
+
+ .hospital-id {
+ font-size: 24rpx;
+ color: #86868b;
+ margin-left: 20rpx;
+ }
+ }
+
+ .list-tip {
+ padding: 60rpx 0;
+ text-align: center;
+ font-size: 26rpx;
+ color: #86868b;
+ }
+ }
+}
</style>
--
Gitblit v1.9.3