From 1d295d847adbbbf7c57857830c50630400db9eca Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Wed, 28 Aug 2024 16:24:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=BE=85=E5=8A=A9=E8=BF=98=E8=BD=A6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=A2=9E=E5=8A=A0=E5=8A=A0=E8=BD=BD=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/order/index.vue | 43 ++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/src/views/system/order/index.vue b/src/views/system/order/index.vue index bb89596..d02c5f9 100644 --- a/src/views/system/order/index.vue +++ b/src/views/system/order/index.vue @@ -702,12 +702,25 @@ export default { }, returnVehicle(row){ // console.log('returnVehicle--------------'+JSON.stringify(row)) - this.$modal.confirm('是否确认辅助还车MAC为:' + row.sn + '"的设备吗?').then(function() { - return returnVehicle({orderNo:row.orderNo,returnType:"2"}); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("操作成功"); + this.$modal.confirm('是否确认辅助还车MAC为:' + row.sn + '的设备吗?').then(() => { + // 显示加载中状态 + const loading = this.$loading({ + lock: true, + text: '加载中...', + spinner: 'custom-loading-spinner', + background: 'rgba(0, 0, 0, 0.7)' + }); + + return returnVehicle({ orderNo: row.orderNo, returnType: "2" }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("操作成功"); + }).finally(() => { + // 关闭加载中状态 + loading.close(); + }); }).catch(() => { + // 如果用户取消了确认框 }); }, formatDistance(row){ @@ -979,4 +992,24 @@ export default { padding: 10px !important; } + .custom-loading-spinner { + border: 6px solid rgba(0, 0, 0, 0.1); + border-left-color: #409EFF; + border-radius: 50%; + display: inline-block; + width: 40px; + height: 40px; + animation: spin 1s linear infinite; + } + + @keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } + +