Ver código fonte

历史病历加载列表,显示:历史看诊日期、接诊科室、接诊医生

yanqiliang 2 meses atrás
pai
commit
cf1889b461

+ 67 - 9
src/pages/entryWrite/page/Entry/medicalRecord/medicalRecord.vue

@@ -41,7 +41,25 @@
                             class="history-record-popup__item"
                             @tap="selectHistoryRecord(index)"
                         >
-                            {{ item.name }}
+                            <view class="history-record-popup__info">
+                                <view class="history-record-popup__field">
+                                    <text class="history-record-popup__label">历史看诊日期:</text>
+                                    <text class="history-record-popup__value">{{ item.admDate || '--' }}</text>
+                                </view>
+                                <view class="history-record-popup__field">
+                                    <text class="history-record-popup__label">接诊科室:</text>
+                                    <text class="history-record-popup__value">{{ item.admLocDesc || '--' }}</text>
+                                </view>
+                                <view class="history-record-popup__field">
+                                    <text class="history-record-popup__label">接诊医生:</text>
+                                    <text class="history-record-popup__value">{{ item.admDoctorName || '--' }}</text>
+                                </view>
+                            </view>
+                            <button
+                                class="history-record-popup__reference"
+                                hover-class="history-record-popup__reference--pressed"
+                                @tap.stop="selectHistoryRecord(index)"
+                            >引用</button>
                         </view>
                     </scroll-view>
                 </view>
@@ -1536,14 +1554,8 @@ export default {
                 success: function (res) {
                     if (+res.errorCode === 0) {
                         let list = (res.result && res.result) || [];
-                        let mappedList = list.map(function(item) {
-                            return {
-                                name: item.patientName + ' ' + item.dateTime,
-                                ...item
-                            };
-                        });
-                        that.setData({ historyRecordList: mappedList, historyRecordLoading: false });
-                        if (mappedList.length === 0) {
+                        that.setData({ historyRecordList: list, historyRecordLoading: false });
+                        if (list.length === 0) {
                             uni.showToast({ title: '暂无可引用病历', icon: 'none' });
                             return;
                         }
@@ -2424,6 +2436,8 @@ export default {
 }
 
 .history-record-popup__item {
+    display: flex;
+    align-items: center;
     padding: 28rpx 30rpx;
     border-bottom: 1rpx solid #edf1f5;
     color: #3f4a5a;
@@ -2431,6 +2445,50 @@ export default {
     line-height: 40rpx;
 }
 
+.history-record-popup__info {
+    flex: 1;
+    min-width: 0;
+}
+
+.history-record-popup__reference {
+    flex: 0 0 auto;
+    margin: 0 0 0 20rpx;
+    padding: 0 24rpx;
+    border-radius: 8rpx;
+    background: #1890ff;
+    color: #fff;
+    font-size: 28rpx;
+    font-weight: 500;
+    line-height: 68rpx;
+}
+
+.history-record-popup__reference::after {
+    border: none;
+}
+
+.history-record-popup__reference--pressed {
+    background: #147ad6;
+}
+
+.history-record-popup__field {
+    display: flex;
+}
+
+.history-record-popup__field + .history-record-popup__field {
+    margin-top: 8rpx;
+}
+
+.history-record-popup__label {
+    flex: 0 0 196rpx;
+    color: #8a94a6;
+}
+
+.history-record-popup__value {
+    flex: 1;
+    min-width: 0;
+    word-break: break-all;
+}
+
 .diag-form__line {
     width: 100%;
     min-height: 72rpx;