Browse Source

修复医嘱页面异常滑动问题

yanqiliang 6 days ago
parent
commit
c69962bae8

+ 6 - 17
src/pages/entryWrite/page/Entry/Entry.vue

@@ -49,15 +49,15 @@
                     </van-row>
                 </view>
                 <view class="diagnosticcontent">
-                    <view v-if="select === 0" style="height: 100%">
+                    <view v-if="select === 0" class="entry-panel">
                         <!-- 病历 -->
                         <medicalRecord id="medicalRecord" @resetSelect="resetSelect($event, { tagId: 'medicalRecord' })"></medicalRecord>
                     </view>
-                    <view v-if="select === 1" style="height: 100%">
+                    <view v-if="select === 1" class="entry-panel">
                         <!-- 诊断 -->
                         <diagnostic ref="diagnostic" id="diagnostic" @resetSelect="resetSelect($event, { tagId: 'diagnostic' })"></diagnostic>
                     </view>
-                    <view v-if="select === 2" style="height: 100%;">
+                    <view v-if="select === 2" class="entry-panel">
                         <!-- 处方 -->
                         <prescription id="prescription" ref="prescription" @resetSelect="resetSelect" :callData="callData" :callData2="callData2"></prescription>
                     </view>
@@ -615,15 +615,6 @@ export default {
     top: calc(40px + 100rpx);
 }
 
-.diagnostic-wrapper {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    top: 0;
-    overflow: auto;
-}
-
 .diagnostibutton {
     background: #1890ff;
     font-size: 30rpx;
@@ -815,16 +806,14 @@ export default {
     overflow: hidden;
 }
 
-/* 子页面填满正文区域,长病历/医嘱在内部滚动,避免被 overflow:hidden 截断。 */
-.entry-page .entry-layout .diagnostic-wrapper {
+/* 每个 Tab 使用入口页自身的容器填满正文区域,滚动由子页面独立管理。 */
+.entry-page .entry-layout > .diagnosticcontent > .entry-panel {
     position: absolute;
     top: 0;
     bottom: 0;
     left: 0;
     right: 0;
     height: auto;
-    overflow-x: hidden;
-    overflow-y: auto;
-    -webkit-overflow-scrolling: touch;
+    min-height: 0;
 }
 </style>

+ 14 - 5
src/pages/entryWrite/page/Entry/prescription/prescription.vue

@@ -1,8 +1,8 @@
 <template>
-    <view>
+    <view class="prescription-record">
         <!-- pages/diagnosticEntry/prescription/prescription.wxml -->
 
-        <view class="diagnostic-wrapper">
+        <scroll-view class="prescription-record__scroll" scroll-y>
             <van-toast id="van-toast" />
             <van-dialog id="van-dialog" />
             <view class="topTitle">
@@ -415,7 +415,7 @@
                 </van-tabs>
             </view>
             <view style="width: 100%; height: 120rpx;"></view>
-        </view>
+        </scroll-view>
         <button :disabled="saveLoaing" class="diagnostibutton" @tap="sureChange" v-if="!(wList.length === 0 && gList.length === 0 && jList.length === 0 && yList.length === 0)">确认医嘱</button>
     </view>
 </template>
@@ -2006,7 +2006,7 @@ export default {
     border: initial;
 }
 
-.diagnostic-wrapper .detail-btn {
+.prescription-record .detail-btn {
     background: #fff;
     color: #1890ff;
     border: 1rpx solid #1890ff !important;
@@ -2095,10 +2095,19 @@ export default {
     padding-left: 10rpx;
 }
 
-.diagnostic-wrapper {
+.prescription-record {
+    position: relative;
+    height: 100%;
+    min-height: 0;
+    overflow: hidden;
     background: #f4f6f8;
 }
 
+.prescription-record__scroll {
+    height: 100%;
+    -webkit-overflow-scrolling: touch;
+}
+
 .box {
     background: #fff;
     margin: 0 0 8rpx;