|
|
@@ -38,7 +38,11 @@
|
|
|
<!-- 右侧诊断列表 -->
|
|
|
<view class="hd-right">
|
|
|
<scroll-view scroll-y class="hd-right-scroll">
|
|
|
- <view v-if="diagDetailList.length === 0" class="hd-empty">
|
|
|
+ <view v-if="isHistoryDiagLoading" class="hd-loading">
|
|
|
+ <view class="hd-loading__spinner"></view>
|
|
|
+ <text>加载中...</text>
|
|
|
+ </view>
|
|
|
+ <view v-else-if="diagDetailList.length === 0" class="hd-empty">
|
|
|
<text>请选择左侧就诊记录</text>
|
|
|
</view>
|
|
|
<view v-else class="diag-list">
|
|
|
@@ -103,6 +107,8 @@ export default {
|
|
|
diagDetailList: [],
|
|
|
selectedArr: [],
|
|
|
isLoading: false,
|
|
|
+ isHistoryDiagLoading: false,
|
|
|
+ historyDiagRequestId: 0,
|
|
|
select: 0,
|
|
|
descripts: '',
|
|
|
listKey: 0
|
|
|
@@ -148,6 +154,10 @@ export default {
|
|
|
|
|
|
getHistoryDiagList: function (admID) {
|
|
|
var that = this;
|
|
|
+ const requestId = ++this.historyDiagRequestId;
|
|
|
+ this.isHistoryDiagLoading = true;
|
|
|
+ this.diagDetailList = [];
|
|
|
+ this.selectedArr = [];
|
|
|
$http.post('urlDeault', this, {
|
|
|
code: '03050033',
|
|
|
data: {
|
|
|
@@ -161,12 +171,18 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
success: function (res) {
|
|
|
+ if (requestId !== that.historyDiagRequestId) return;
|
|
|
if (res.errorCode === '0') {
|
|
|
var list = res.result && res.result.diagList || [];
|
|
|
that.diagDetailList = list;
|
|
|
that.selectedArr = [];
|
|
|
that.listKey = that.listKey + 1;
|
|
|
}
|
|
|
+ },
|
|
|
+ complete: function () {
|
|
|
+ if (requestId === that.historyDiagRequestId) {
|
|
|
+ that.isHistoryDiagLoading = false;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -563,6 +579,32 @@ export default {
|
|
|
font-size: 26rpx;
|
|
|
}
|
|
|
|
|
|
+.hd-loading {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ height: 200rpx;
|
|
|
+ gap: 16rpx;
|
|
|
+ color: #8b98a8;
|
|
|
+ font-size: 26rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.hd-loading__spinner {
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ border: 4rpx solid #dbeafe;
|
|
|
+ border-top-color: #1687ff;
|
|
|
+ border-radius: 50%;
|
|
|
+ animation: hd-spinner-rotate 0.8s linear infinite;
|
|
|
+}
|
|
|
+
|
|
|
+@keyframes hd-spinner-rotate {
|
|
|
+ to {
|
|
|
+ transform: rotate(360deg);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/* 底部操作栏 */
|
|
|
.hd-footer {
|
|
|
flex-shrink: 0;
|